:root {
  --bg-deep: #16002f;
  --bg-mid: #45106d;
  --bg-bright: #df2f93;
  --panel: rgba(18, 8, 40, 0.78);
  --panel-soft: rgba(255, 255, 255, 0.1);
  --panel-line: rgba(255, 255, 255, 0.15);
  --text: #f8f7ff;
  --muted: rgba(248, 247, 255, 0.78);
  --shadow: 0 24px 80px rgba(7, 3, 18, 0.45);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.2, 1);
  --answer-blue: #5f67ff;
  --answer-red: #ff5a6b;
  --answer-green: #4ec49f;
  --answer-yellow: #ffd54a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 18%, rgba(249, 255, 158, 0.68), transparent 18%),
    radial-gradient(circle at 82% 12%, rgba(119, 154, 255, 0.35), transparent 22%),
    radial-gradient(circle at 50% 110%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(155deg, var(--bg-bright) 0%, var(--bg-mid) 38%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 42%),
    repeating-conic-gradient(
      from -12deg at 50% 100%,
      rgba(255, 255, 255, 0.08) 0deg 10deg,
      transparent 10deg 20deg
    );
  opacity: 0.85;
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 20px 0 36px;
}

.shell-dashboard {
  padding-top: 24px;
}

.shell-game {
  width: min(100vw, 1920px);
  min-height: 100vh;
  padding: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: rgba(16, 8, 33, 0.55);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar-meta strong {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar-user {
  color: var(--text);
  font-weight: 800;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 230, 111, 0.12), rgba(95, 103, 255, 0.1)),
    rgba(16, 8, 33, 0.58);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.admin-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    transform 160ms var(--ease-pop),
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.admin-nav-link:hover,
.admin-nav-link:focus-visible {
  color: var(--text);
  border-color: rgba(255, 230, 111, 0.35);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(7, 3, 18, 0.24);
  outline: none;
  transform: translateY(-1px);
}

.admin-nav-link.is-active {
  color: #14051f;
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, #ffe66f 0%, #ff7ea9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 12px 28px rgba(7, 3, 18, 0.3);
}

.link-button {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.hero,
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-xl);
  background: rgba(21, 9, 45, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 40%);
  pointer-events: none;
}

.hero {
  padding: 30px;
  margin-bottom: 18px;
}

.hero-showtime {
  background:
    linear-gradient(135deg, rgba(116, 255, 221, 0.13), transparent 55%),
    rgba(21, 9, 45, 0.82);
}

.hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.96;
  text-wrap: balance;
}

.hero.compact h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
}

.eyebrow,
.small-label {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(248, 247, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.lede,
.muted,
.mono {
  color: var(--muted);
}

.mono {
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 0.82rem;
  word-break: break-word;
}

.card {
  padding: 22px;
  margin-bottom: 18px;
}

.card-vibrant {
  background:
    linear-gradient(140deg, rgba(255, 213, 74, 0.16), rgba(255, 90, 107, 0.12) 55%, rgba(95, 103, 255, 0.12)),
    rgba(21, 9, 45, 0.78);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.stack {
  display: grid;
  gap: 14px;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

input,
select,
.button {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--panel-line);
  font: inherit;
}

input,
select {
  padding: 15px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

input::placeholder {
  color: rgba(248, 247, 255, 0.5);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 54px;
  color: var(--text);
  background-color: rgba(19, 10, 41, 0.96);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4.5 6.75L9 11.25L13.5 6.75' stroke='%23F8F7FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 16px center;
  background-size: auto, 18px 18px;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 18px rgba(7, 3, 18, 0.18);
  cursor: pointer;
}

.form-select:hover,
.form-select:focus-visible {
  border-color: rgba(255, 230, 111, 0.58);
  background-color: rgba(26, 12, 55, 0.98);
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 230, 111, 0.14),
    0 14px 26px rgba(7, 3, 18, 0.28);
}

.form-select option {
  color: var(--text);
  background: #24103f;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 20px;
  border: none;
  border-radius: 18px;
  color: #14041f;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform 180ms var(--ease-pop),
    filter 180ms var(--ease-pop);
}

.button:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.05);
}

.button-primary {
  background: linear-gradient(135deg, #ffe66f 0%, #ffb454 100%);
}

.button-secondary {
  background: linear-gradient(135deg, #ff7ea9 0%, #ff5a6b 100%);
}

.inline-action {
  margin-top: 14px;
}

.inline-action-compact {
  margin-top: 0;
}

.form-card {
  max-width: 640px;
}

.landing-session-card {
  margin-left: auto;
  margin-right: auto;
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.stats-summary-head {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.stats-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.stats-table th,
.stats-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-line);
  text-align: left;
  vertical-align: top;
}

.stats-table th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-row {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--panel-line);
}

.user-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
}

.dashboard-grid-host {
  grid-template-columns: 1fr;
}

.launch-card {
  display: grid;
  align-content: start;
}

.qr-showcase {
  display: grid;
  align-content: center;
}

.qr-stage {
  display: grid;
  gap: 16px;
}

.qr-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-line);
  background: rgba(255, 255, 255, 0.08);
}

.qr-card-bright {
  background:
    linear-gradient(145deg, rgba(95, 103, 255, 0.18), rgba(78, 196, 159, 0.18)),
    rgba(255, 255, 255, 0.08);
}

.qr-image {
  display: block;
  width: min(100%, 250px);
  border-radius: 22px;
  background: white;
  padding: 10px;
}

.qr-thumb {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: white;
  padding: 6px;
}

.scoreboard-card {
  display: grid;
  align-content: start;
}

.score-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.score-list.compact {
  gap: 10px;
}

.score-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--panel-line);
  background: rgba(255, 255, 255, 0.08);
  transition:
    transform 220ms var(--ease-pop),
    background 220ms var(--ease-pop);
}

.score-item.is-leading {
  background:
    linear-gradient(135deg, rgba(255, 213, 74, 0.24), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  transform: scale(1.01);
}

.score-item.is-current {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.13);
}

.score-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 900;
}

.score-points {
  font-size: 1.2rem;
  font-weight: 900;
}

.score-bonus {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(18, 86, 63, 0.92);
  color: #e9fff5;
  font-size: 0.82rem;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(144, 255, 215, 0.22);
}

.tag,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
}

.auth-error {
  color: #ffd1db;
  font-weight: 800;
}

.game-body {
  overflow: hidden;
}

.game-stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  height: 100dvh;
  min-height: 100dvh;
  padding: 14px;
  overflow: hidden;
}

.game-stage-finish {
  justify-items: center;
  grid-template-rows: 1fr;
  align-content: center;
  overflow: visible;
}

.stage-top {
  display: grid;
  gap: 12px;
}

.timer-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.timer-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #78ffd6 0%, #73a5ff 50%, #ffdc60 100%);
  box-shadow: 0 0 28px rgba(120, 255, 214, 0.45);
  transition: width 320ms var(--ease-pop);
}

.question-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.question-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition:
    transform 220ms var(--ease-pop),
    background 220ms var(--ease-pop),
    opacity 220ms var(--ease-pop);
}

.question-dot.is-complete {
  background: rgba(255, 255, 255, 0.24);
  opacity: 0.55;
}

.question-dot.is-upcoming {
  background: rgba(255, 255, 255, 0.78);
}

.question-dot.is-current {
  width: 22px;
  height: 22px;
  background: #fff17a;
  box-shadow: 0 0 20px rgba(255, 241, 122, 0.6);
  transform: scale(1.05);
}

.game-panel {
  display: grid;
  gap: 18px;
  align-content: stretch;
  min-height: 0;
  height: 100%;
  width: 100%;
  padding: 26px;
  border-radius: 32px;
  border: 1px solid var(--panel-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 28%),
    rgba(13, 7, 31, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: stage-enter 360ms var(--ease-pop);
}

.game-copy {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: center;
  text-align: center;
  width: 100%;
  min-height: 0;
}

.game-question {
  margin: 0;
  max-width: min(92vw, 1500px);
  font-size: clamp(1.8rem, 3.6vw, 4.2rem);
  line-height: 0.96;
  text-wrap: balance;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.game-status {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}

.intro-stage-card,
.waiting-card,
.scoreboard-stage {
  border: 1px solid var(--panel-line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
}

.intro-stage-card {
  min-height: 28vh;
  display: grid;
  place-items: center;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 800;
}

.answer-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
  width: 100%;
  align-self: stretch;
}

.answer-form {
  min-height: 0;
}

.answer-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: clamp(120px, 16vh, 220px);
  padding: 20px;
  border: 0;
  border-radius: 26px;
  color: #fff;
  text-align: center;
  font: inherit;
  font-size: clamp(1.05rem, 1.7vw, 1.8rem);
  font-weight: 900;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2), 0 16px 28px rgba(0, 0, 0, 0.25);
  transition:
    transform 220ms var(--ease-pop),
    box-shadow 220ms var(--ease-pop),
    filter 220ms var(--ease-pop);
}

button.answer-card {
  cursor: pointer;
}

button.answer-card:hover,
button.answer-card:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.22), 0 24px 36px rgba(0, 0, 0, 0.32);
  filter: brightness(1.04);
}

.answer-card-1 {
  background: linear-gradient(160deg, #6c73ff 0%, #5259da 100%);
}

.answer-card-2 {
  background: linear-gradient(160deg, #ff6477 0%, #ff4f5f 100%);
}

.answer-card-3 {
  background: linear-gradient(160deg, #56cdaa 0%, #44b18f 100%);
}

.answer-card-4 {
  background: linear-gradient(160deg, #ffd95d 0%, #ffcb38 100%);
  color: #3a2c00;
}

.answer-grid-preview .answer-card {
  cursor: default;
}

.answer-label {
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  text-wrap: balance;
}

.reveal-answers {
  align-items: stretch;
}

.reveal-card {
  overflow: hidden;
}

.reveal-card .answer-label {
  position: relative;
  z-index: 1;
}

.reveal-card-badges {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 92px);
}

.reveal-card.is-correct {
  background: linear-gradient(160deg, #59d8ae 0%, #2da86d 100%);
  color: #14211d;
}

.reveal-card.is-player-wrong {
  background: linear-gradient(160deg, #ff6f7d 0%, #dd3348 100%);
  color: #2b0e14;
}

.reveal-mark {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.reveal-mark-correct {
  color: #d3ffe9;
}

.reveal-mark-wrong {
  color: #ffe1e5;
}

.score-interlude {
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 0;
}

.reveal-answer,
.reveal-note {
  margin: 0;
  text-align: center;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}

.score-award-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.score-award-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34, 18, 61, 0.94);
  color: #f8f7ff;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.score-award-multiplier {
  background: linear-gradient(135deg, rgba(77, 47, 0, 0.98), rgba(111, 67, 0, 0.98));
  color: #fff4cc;
}

.score-award-speed {
  background: linear-gradient(135deg, rgba(48, 61, 168, 0.96), rgba(33, 120, 103, 0.96));
  color: #f4fbff;
}

.score-award-phase {
  background: linear-gradient(135deg, rgba(126, 40, 74, 0.96), rgba(108, 52, 137, 0.96));
  color: #fff1f7;
}

.scoreboard-stage {
  display: grid;
  gap: 14px;
  padding: 20px;
  min-height: 0;
  align-content: start;
  overflow: hidden;
}

.scoreboard-stage h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
}

.score-interlude .scoreboard-stage .score-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.game-stage-finish .scoreboard-stage .score-list {
  overflow: hidden;
}

.host-control-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
  min-height: 0;
  overflow: hidden;
}

.host-control-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  border: 1px solid var(--panel-line);
  background: rgba(12, 7, 27, 0.7);
}

.host-meta {
  font-weight: 800;
}

.player-ticker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.player-chip.is-current {
  background: rgba(255, 255, 255, 0.2);
}

.host-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.waiting-panel {
  justify-content: center;
}

.waiting-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  align-content: center;
  min-height: 36vh;
  padding: 26px;
}

.waiting-badge {
  width: 90px;
  height: 90px;
  border-radius: 28px;
  background: linear-gradient(160deg, #6c73ff 0%, #ff5a6b 100%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.waiting-badge.is-locked {
  background: linear-gradient(160deg, #4ec49f 0%, #73a5ff 100%);
}

.waiting-copy {
  margin: 0;
  max-width: 26ch;
  text-align: center;
  color: var(--muted);
}

.waiting-points {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
}

.reveal-panel {
  width: min(100%, 980px);
  align-self: center;
}

.game-stage-finish .game-panel {
  height: auto;
  grid-template-rows: auto auto;
}

.game-stage-finish .scoreboard-stage {
  height: auto;
}

@keyframes stage-enter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 960px) {
  .dashboard-grid-host {
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1fr) minmax(280px, 0.85fr);
    align-items: stretch;
  }

  .game-stage {
    padding: 14px 18px;
  }

  .game-panel {
    grid-template-rows: minmax(0, 40%) minmax(0, 60%);
  }

  .game-stage-player .game-panel,
  .game-stage-host .game-panel {
    max-height: 100%;
  }

  .game-stage-player .game-copy,
  .game-stage-host .game-copy {
    padding-inline: clamp(20px, 3vw, 56px);
    align-content: center;
  }

  .game-stage-player .game-question,
  .game-stage-host .game-question {
    max-width: min(90vw, 1640px);
  }

  .player-answers,
  .answer-grid-preview {
    height: 100%;
  }

  .answer-card {
    min-height: clamp(100px, 13vh, 170px);
  }

  .game-status {
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  .intro-stage-card,
  .score-interlude,
  .scoreboard-stage,
  .reveal-answers {
    height: 100%;
    min-height: 0;
  }

  .score-interlude {
    grid-template-rows: minmax(0, 0.8fr) auto minmax(0, 1.2fr);
    gap: 12px;
  }

  .score-interlude-host {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }

  .reveal-answers-host .reveal-card:not(.is-correct),
  .reveal-answers-player .reveal-card:not(.is-correct) {
    display: none;
  }

  .reveal-answers-player .reveal-card.is-correct {
    grid-column: 1 / -1;
    min-height: min(20vh, 190px);
    padding: 18px 24px;
  }

  .reveal-answers-host .reveal-card.is-correct {
    grid-column: 1 / -1;
    min-height: 100%;
    padding: clamp(24px, 3vw, 44px);
  }

  .score-interlude-host .scoreboard-stage {
    min-height: 0;
    height: 100%;
  }

  .score-interlude-host .scoreboard-stage .score-list {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .scoreboard-stage {
    padding: 16px 18px;
    gap: 10px;
  }

  .scoreboard-stage h2 {
    font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  }

  .scoreboard-stage .score-item {
    padding: 10px 14px;
  }

  .scoreboard-stage .score-rank {
    width: 36px;
    height: 36px;
  }

  .scoreboard-stage .score-points {
    font-size: 1rem;
  }

  .reveal-answer,
  .reveal-note {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  }
}

@media (max-width: 959px) {
  .shell {
    width: min(100vw, calc(100vw - 20px));
  }

  .game-panel {
    min-height: calc(100vh - 140px);
  }

  .host-control-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .host-actions {
    width: 100%;
  }

  .host-actions form,
  .host-actions .button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw, calc(100vw - 14px));
    padding: 14px 0 22px;
  }

  .hero,
  .card {
    border-radius: 24px;
    padding: 18px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .admin-nav {
    border-radius: 28px;
    padding: 8px;
  }

  .admin-nav-link {
    width: 100%;
  }

  .game-stage {
    gap: 12px;
    padding: 8px;
  }

  .game-panel {
    gap: 12px;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: calc(100vh - 92px);
    padding: 14px 14px 12px;
    border-radius: 24px;
  }

  .game-question {
    max-width: min(92vw, 26ch);
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  .answer-grid {
    gap: 12px;
  }

  .answer-card {
    min-height: 0;
    height: 100%;
    padding: 10px;
    border-radius: 22px;
  }

  .player-answers {
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-height: 48vh;
  }

  .player-answers .answer-label {
    display: none;
  }

  .player-answers .answer-card::after {
    content: "";
    width: 42%;
    aspect-ratio: 1;
    border-radius: 18px;
    border: 4px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
  }

  .reveal-answers-player .reveal-card,
  .reveal-answers-host .reveal-card {
    display: none;
    min-height: 0;
  }

  .reveal-answers-player .reveal-card.is-correct,
  .reveal-answers-player .reveal-card.is-player-choice,
  .reveal-answers-host .reveal-card.is-correct {
    display: grid;
  }

  .reveal-answers-player .answer-label,
  .reveal-answers-host .answer-label {
    display: none;
  }

  .reveal-answers-player .reveal-mark,
  .reveal-answers-host .reveal-mark {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    font-size: 1.9rem;
    background: rgba(255, 255, 255, 0.22);
  }

  .answer-grid-preview .answer-label {
    font-size: 0.92rem;
  }

  .score-item {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 12px;
  }

  .score-rank {
    width: 36px;
    height: 36px;
  }

  .qr-image {
    width: min(100%, 180px);
  }
}
