/* ============================================================
   HOST — TV display. Late-night game-show stage.
   Midnight-navy canvas with theatrical spotlights, marquee
   bulbs, condensed neon headlines, and the four neon answer
   gels as the loudest accent.
   ============================================================ */

body {
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 210, 63, 0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(255, 46, 136, 0.12), transparent 65%),
    var(--stage-deep);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
/* Curtain side-shadows to suggest a stage proscenium */
body::before,
body::after {
  content: '';
  position: fixed;
  top: 0; bottom: 0;
  width: 14vw;
  pointer-events: none;
  z-index: 0;
}
body::before {
  left: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55), transparent);
}
body::after {
  right: 0;
  background: linear-gradient(270deg, rgba(0,0,0,0.55), transparent);
}

.frame {
  min-height: 100vh;
  padding: 22px 28px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.surface {
  width: 100%;
  max-width: 1480px;
  background:
    var(--stage-spotlight),
    linear-gradient(180deg, var(--stage-soft), var(--stage) 70%);
  background-blend-mode: screen, normal;
  border-radius: var(--radius-lg);
  padding: 36px 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 30px 80px -10px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255, 210, 63, 0.04);
}
/* Film grain over the stage */
.surface::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--paper-grain);
  opacity: 0.35;
  mix-blend-mode: overlay;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}
/* Gold corner brackets — proscenium clamps */
.surface::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid transparent;
  border-image: linear-gradient(135deg, var(--gold) 0%, transparent 8%, transparent 92%, var(--gold) 100%) 1;
  pointer-events: none;
  z-index: 0;
}
.surface > * { position: relative; z-index: 1; }

/* ============================================================
   LOBBY — opening title sequence
   ============================================================ */

.lobby-surface { gap: 28px; }

.masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}
.masthead-sep { color: var(--gold); opacity: 0.6; }
.masthead-spacer { flex: 1; }
.masthead .mono { color: var(--gold); letter-spacing: 0.18em; font-weight: 500; }
.masthead-bit.live {
  color: var(--magenta);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.live-dot {
  width: 10px; height: 10px;
  background: var(--magenta);
  border-radius: 50%;
  display: inline-block;
  box-shadow: var(--glow-magenta);
  animation: live-pulse 1.4s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 46, 136, 0.7), var(--glow-magenta); }
  100% { box-shadow: 0 0 0 18px rgba(255, 46, 136, 0),  var(--glow-magenta); }
}

/* ─── Wordmark — the big title ─── */

.wordmark {
  display: block;
  padding: 4px 0 0;
}
.wordmark-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 8.5vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--chrome);
  text-transform: uppercase;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.04em;
  text-shadow:
    0 0 12px rgba(255, 210, 63, 0.12),
    0 0 1px rgba(255, 255, 255, 0.4);
}
.wordmark-title .word {
  display: inline-block;
  transform-origin: 50% 100%;
}
.wordmark-title .word:first-child {
  color: var(--gold);
  text-shadow: var(--glow-gold);
  animation: bulb-throb 3.5s ease-in-out infinite;
}
.word-dot {
  display: inline-block;
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
  margin-left: -0.05em;
  animation: bulb-throb 1.6s ease-in-out infinite;
}
/* ─── Lobby grid (QR + join code) ─── */

.lobby-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: center;
  padding-top: 0;
}
/* Right column: wordmark stacked above the join info, freeing the left side
   for a larger QR. */
.lobby-right {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.qr-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.qr-card .label { margin-bottom: 0; }
.qr {
  width: clamp(440px, 60vh, 680px);
  height: clamp(440px, 60vh, 680px);
  background: var(--chrome);
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 0 6px rgba(255, 210, 63, 0.18),
    0 22px 50px -12px rgba(255, 210, 63, 0.35),
    0 28px 70px -16px rgba(0,0,0,0.6);
}
/* gold corner clamps on the ticket */
.qr::before,
.qr::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--gold);
}
.qr::before { top: -8px; left: -8px; border-right: none; border-bottom: none; }
.qr::after  { bottom: -8px; right: -8px; border-left: none; border-top: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-fallback {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0;
  letter-spacing: 0.05em;
}

.join-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
}
.join-info .label { margin-bottom: -10px; color: var(--ink-soft); }
.room-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1;
  color: var(--gold);
  text-shadow:
    0 0 1px rgba(255, 210, 63, 0.5),
    0 0 22px rgba(255, 210, 63, 0.55),
    0 0 50px rgba(255, 210, 63, 0.3);
  text-transform: uppercase;
  word-break: break-word;
}
.join-info button.primary {
  font-size: 1.4rem;
  padding: 20px 36px;
}
.hint {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0;
}
/* Lobby prompt nudging the host to tap once so audio unlocks before players
   join (browsers block sound until a user gesture). Hidden once unlocked. */
.sound-hint {
  margin-top: 10px;
  font-style: normal;
  color: var(--gold);
  opacity: 0.9;
  animation: sound-hint-pulse 1.8s ease-in-out infinite;
}
@keyframes sound-hint-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.95; } }

/* ─── Players section ─── */

.players-section {
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.players-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.readers-count {
  margin-left: 10px;
  font-family: var(--font-mono);
  color: var(--gold);
  letter-spacing: 0.14em;
  font-weight: 500;
}
.micro {
  margin: 0;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.player-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  counter-reset: reader;
}
.player-list .chip {
  counter-increment: reader;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--chrome);
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--stage-card), var(--stage-soft));
  border: 1px solid rgba(255, 210, 63, 0.35);
  border-radius: var(--radius);
  text-transform: uppercase;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 6px 14px -10px rgba(0,0,0,0.6),
    0 0 14px -6px rgba(255, 210, 63, 0.25);
  animation: chip-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.player-list .chip::before {
  content: counter(reader, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-shadow: var(--glow-gold);
  background: rgba(255, 210, 63, 0.08);
  border: 1px solid rgba(255, 210, 63, 0.3);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  min-width: 36px;
  text-align: center;
}
.player-list .chip::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--answer-d-bg);
  box-shadow: var(--glow-lime);
  margin-left: auto;
  animation: bulb-throb 1.6s ease-in-out infinite;
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.colophon {
  display: flex;
  gap: 10px;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-dim);
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}

/* ============================================================
   GAME SHELL — round play + reveal + bonus
   ============================================================ */

.game-shell {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  padding: 4px 0;
}
.game-main { min-width: 0; }
/* On reveal screens the sidebar is hidden and the main area spans full width. */
.game-shell.side-hidden { grid-template-columns: 1fr; }
.game-shell.side-hidden .game-side { display: none; }
.game-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: pane-fade 0.35s ease both;
}
.game-pane.hidden { display: none; }
@keyframes pane-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Round header ─── */

/* Question and the max-points badge share one row below the image. */
.question-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.question-row .round-question { margin: 0; }
.question-row .max-points { flex-shrink: 0; white-space: nowrap; }
.round-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.round-eyebrow .eyebrow em {
  font-family: var(--font-sans);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 0.9em;
}
.round-eyebrow .serif {
  font-family: var(--font-display);
  font-size: 1.8em;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-shadow: var(--glow-gold);
}
.dot-sep { color: var(--ink-dim); opacity: 0.7; }
.max-points {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.max-points strong {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--gold);
  font-size: 1.4rem;
  margin: 0 6px;
  letter-spacing: 0.04em;
  text-shadow: var(--glow-gold);
}

/* ─── Image stage ─── */

.image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 66vh;
  background: #000;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 3px rgba(255, 210, 63, 0.18),
    0 18px 40px -16px rgba(0,0,0,0.7);
}
.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
/* gold corner brackets on the screen */
.image-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--gold);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255, 210, 63, 0.5));
}
.image-corner-tl { top: 12px;    left: 12px;    border-right: none; border-bottom: none; }
.image-corner-tr { top: 12px;    right: 12px;   border-left: none;  border-bottom: none; }
.image-corner-bl { bottom: 12px; left: 12px;    border-right: none; border-top: none; }
.image-corner-br { bottom: 12px; right: 12px;   border-left: none;  border-top: none; }

/* ─── Reveal styles ─── theatrical enhancements over the four mechanics. */

/* Custom property for the spotlight radius (animatable). */
@property --spot-r {
  syntax: '<length>';
  initial-value: 60px;
  inherits: true;
}

/* Continuous-reveal mode: extends every reveal-style transition to the
   full round duration so the image animates smoothly from obscured to
   clear over the single timer. Driven by --reveal-duration set in JS. */
.image-wrap[data-reveal-mode="continuous"][data-reveal="deblur"] img,
.image-wrap[data-reveal-mode="continuous"][data-reveal="deblur"]::before,
.image-wrap[data-reveal-mode="continuous"][data-reveal="zoom"] img,
.image-wrap[data-reveal-mode="continuous"][data-reveal="zoom"]::before,
.image-wrap[data-reveal-mode="continuous"][data-reveal="spotlight"] {
  transition-duration: var(--reveal-duration, 0.7s) !important;
  transition-timing-function: linear !important;
}

/* DEBLUR — blur + desaturation lifts together; vignette fades back. */
.image-wrap[data-reveal="deblur"] img { transition: filter 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.image-wrap[data-reveal="deblur"][data-stage="1"] img { filter: blur(30px) saturate(0.55); }
.image-wrap[data-reveal="deblur"][data-stage="2"] img { filter: blur(14px) saturate(0.75); }
.image-wrap[data-reveal="deblur"][data-stage="3"] img { filter: blur(5px)  saturate(0.92); }
.image-wrap[data-reveal="deblur"][data-stage="4"] img,
.image-wrap[data-reveal="deblur"][data-stage="5"] img { filter: blur(0) saturate(1.05); }

.image-wrap[data-reveal="deblur"]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 40%, rgba(0,0,0,0.75) 100%);
  transition: opacity 0.7s ease;
}
.image-wrap[data-reveal="deblur"][data-stage="1"]::before { opacity: 1; }
.image-wrap[data-reveal="deblur"][data-stage="2"]::before { opacity: 0.7; }
.image-wrap[data-reveal="deblur"][data-stage="3"]::before { opacity: 0.35; }
.image-wrap[data-reveal="deblur"][data-stage="4"]::before,
.image-wrap[data-reveal="deblur"][data-stage="5"]::before { opacity: 0; }

/* ZOOM — scale recedes with a synchronized vignette pulling back. */
.image-wrap[data-reveal="zoom"] img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.image-wrap[data-reveal="zoom"][data-stage="1"] img { transform: scale(10); }
.image-wrap[data-reveal="zoom"][data-stage="2"] img { transform: scale(5); }
.image-wrap[data-reveal="zoom"][data-stage="3"] img { transform: scale(2); }
.image-wrap[data-reveal="zoom"][data-stage="4"] img,
.image-wrap[data-reveal="zoom"][data-stage="5"] img { transform: scale(1); }

.image-wrap[data-reveal="zoom"]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 30%, rgba(0,0,0,0.7) 100%);
  transition: opacity 0.7s ease;
}
.image-wrap[data-reveal="zoom"][data-stage="1"]::before { opacity: 0.9; }
.image-wrap[data-reveal="zoom"][data-stage="2"]::before { opacity: 0.55; }
.image-wrap[data-reveal="zoom"][data-stage="3"]::before { opacity: 0.25; }
.image-wrap[data-reveal="zoom"][data-stage="4"]::before,
.image-wrap[data-reveal="zoom"][data-stage="5"]::before { opacity: 0; }

/* SPOTLIGHT — soft-edged mask using animatable @property radius, gold halo at the edge. */
.image-wrap[data-reveal="spotlight"] {
  --spot-r: 60px;
  --spot-feather: 90px;
  transition: --spot-r 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-wrap[data-reveal="spotlight"][data-stage="1"] { --spot-r: 0px; }
.image-wrap[data-reveal="spotlight"][data-stage="2"] { --spot-r: 130px; }
.image-wrap[data-reveal="spotlight"][data-stage="3"] { --spot-r: 280px; }
.image-wrap[data-reveal="spotlight"][data-stage="4"],
.image-wrap[data-reveal="spotlight"][data-stage="5"] { --spot-r: 900px; }

.image-wrap[data-reveal="spotlight"] img {
  -webkit-mask-image: radial-gradient(circle at center, black 0%, black var(--spot-r), transparent calc(var(--spot-r) + var(--spot-feather)));
  mask-image: radial-gradient(circle at center, black 0%, black var(--spot-r), transparent calc(var(--spot-r) + var(--spot-feather)));
}
.image-wrap[data-reveal="spotlight"]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  /* gold halo + cool fall-off so the dark area still feels like a stage, not a hole. */
  background:
    radial-gradient(circle at center,
      transparent 0%,
      transparent calc(var(--spot-r) - 4px),
      rgba(255, 210, 63, 0.20) calc(var(--spot-r) + var(--spot-feather) * 0.2),
      rgba(255, 210, 63, 0.04) calc(var(--spot-r) + var(--spot-feather)),
      rgba(11, 16, 51, 0.55) 100%);
}

/* TILE reveal — bevel + gold glint per tile, 3D flip-away on remove. */
.tile-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  z-index: 2;
  pointer-events: none;
  perspective: 1200px;
  perspective-origin: 50% 50%;
}
.tile-overlay.hidden { display: none; }
.tile {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 210, 63, 0.10), transparent 60%),
    linear-gradient(135deg, #0F1336, #1b2261 60%, #0F1336);
  border: 1px solid rgba(255, 210, 63, 0.10);
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 63, 0.12),
    inset 0 -1px 0 rgba(0,0,0,0.45),
    inset 1px 0 0 rgba(255,255,255,0.04),
    inset -1px 0 0 rgba(0,0,0,0.25);
  transform-origin: center;
  transition:
    opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.5, 0, 0.2, 1),
    filter 0.55s ease;
  backface-visibility: hidden;
}
.tile.removed {
  opacity: 0;
  transform: rotateY(78deg) scale(0.88);
  filter: brightness(1.4);
}
/* Stagger tile flip with a 7-step rotation — random-looking without JS. */
.tile:nth-child(7n+1).removed { transition-delay: 0.00s, 0.00s, 0.00s; }
.tile:nth-child(7n+2).removed { transition-delay: 0.10s, 0.10s, 0.10s; }
.tile:nth-child(7n+3).removed { transition-delay: 0.22s, 0.22s, 0.22s; }
.tile:nth-child(7n+4).removed { transition-delay: 0.05s, 0.05s, 0.05s; }
.tile:nth-child(7n+5).removed { transition-delay: 0.16s, 0.16s, 0.16s; }
.tile:nth-child(7n+6).removed { transition-delay: 0.28s, 0.28s, 0.28s; }
.tile:nth-child(7n).removed   { transition-delay: 0.08s, 0.08s, 0.08s; }

/* ─── Stage-advance accent — gold corner brackets brighten on final reveal. */
.image-wrap[data-stage="4"] .image-corner,
.image-wrap[data-stage="5"] .image-corner {
  animation: corner-flash 0.7s ease-out 1;
}
@keyframes corner-flash {
  0%   { filter: drop-shadow(0 0 4px rgba(255, 210, 63, 0.5)); }
  40%  { filter: drop-shadow(0 0 18px var(--gold)) brightness(1.5); }
  100% { filter: drop-shadow(0 0 6px rgba(255, 210, 63, 0.6)); }
}

/* ─── Timer — thin gold line with glow trail ─── */

.timer-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  position: relative;
  border-radius: 2px;
  overflow: visible;
}
.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-hot) 100%);
  border-radius: inherit;
  box-shadow: var(--glow-gold);
  transform-origin: left;
}
.timer-bar::before,
.timer-bar::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 14px;
  background: var(--gold);
  top: -5px;
  box-shadow: var(--glow-gold);
}
.timer-bar::before { left: 0; }
.timer-bar::after  { right: 0; }

.bonus-timer .timer-fill {
  background: linear-gradient(90deg, var(--magenta) 0%, var(--magenta-hot) 100%);
  box-shadow: var(--glow-magenta);
}
.bonus-timer::before,
.bonus-timer::after { background: var(--magenta); box-shadow: var(--glow-magenta); }

/* ─── Question + choices ─── */

.round-question {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--chrome);
  margin: 4px 0;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice {
  --c-bg: var(--answer-a-bg);
  --c-fg: var(--answer-a-fg);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-bg) 90%, white 10%), var(--c-bg) 60%, color-mix(in srgb, var(--c-bg) 85%, black 15%));
  color: var(--c-fg);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--c-bg) 70%, white 30%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -2px 0 rgba(0,0,0,0.18),
    0 4px 0 color-mix(in srgb, var(--c-bg) 50%, black 50%),
    0 8px 20px -8px color-mix(in srgb, var(--c-bg) 60%, transparent 40%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.choice-a { --c-bg: var(--answer-a-bg); --c-fg: var(--answer-a-fg); }
.choice-b { --c-bg: var(--answer-b-bg); --c-fg: var(--answer-b-fg); }
.choice-c { --c-bg: var(--answer-c-bg); --c-fg: var(--answer-c-fg); }
.choice-d { --c-bg: var(--answer-d-bg); --c-fg: var(--answer-d-fg); }

.choice .badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.32);
  color: var(--c-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.choice .text { flex: 1; }
.choice .lock-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
  padding: 4px 8px;
  background: rgba(0,0,0,0.18);
  border-radius: 4px;
}

/* ─── Input kit — answer region for type-a-guess / slider rounds ───
   Replaces the choice grid for non-choice round types. Shows what players
   are doing on their phones + an answered count, but NEVER the answer. */
.answer-kit {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 22px 28px;
  background: linear-gradient(180deg, var(--stage-card), var(--stage-soft));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 16px 40px -18px rgba(0,0,0,0.6);
}
.answer-kit.hidden { display: none; }
.answer-kit-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.kit-prompt {
  margin: 0;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* Free-text "type a guess": a stylized input bar with a blinking caret —
   evocative of players typing, no answer shown. */
.kit-typebar {
  height: 56px;
  border-radius: var(--radius);
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255, 210, 63, 0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  padding: 0 18px;
}
.kit-caret {
  width: 3px;
  height: 28px;
  background: var(--gold);
  box-shadow: var(--glow-gold);
  border-radius: 2px;
  animation: kit-caret-blink 1.1s step-end infinite;
}
@keyframes kit-caret-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* Slider scale: a static numeric track with min/max endpoints + unit.
   Deliberately NO marker — a position would read as the answer. */
.kit-scale {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kit-scale-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-hot) 100%);
  box-shadow: var(--glow-gold);
  opacity: 0.85;
}
.kit-scale-ends {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.kit-end {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.02em;
  color: var(--chrome);
}
.kit-unit {
  font-family: var(--font-mono);
  font-size: 0.5em;
  font-weight: 500;
  color: var(--gold);
  margin-left: 2px;
}

/* Generic "N / total answered" indicator, shared by both kit types. */
.answered-line {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.answered-count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--gold);
  text-shadow: var(--glow-gold);
  font-variant-numeric: tabular-nums;
}
.answered-label {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   SIDEBAR — live standings (dark panel inside the stage)
   ============================================================ */

.game-side {
  background: linear-gradient(180deg, var(--stage-card), var(--stage-soft));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 36px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 20px 40px -16px rgba(0,0,0,0.6);
}
.game-side .eyebrow {
  margin-bottom: 0;
  color: var(--gold);
}

.leaderboard {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: standing;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.leaderboard li {
  counter-increment: standing;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hairline);
  will-change: transform;
  background: transparent;
  transition: background 0.3s ease;
}
.leaderboard li:last-child { border-bottom: none; }
.leaderboard .rank {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.leaderboard li:first-child .rank { color: var(--gold); }
.leaderboard .name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--chrome);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}
.leaderboard .score {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--gold);
}
.leaderboard li.score-changed {
  animation: score-pulse 1s ease-out;
}
@keyframes score-pulse {
  0%   { background: rgba(255, 210, 63, 0.28); box-shadow: inset 3px 0 0 var(--gold); }
  100% { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}
.leaderboard .eligible-mark {
  display: inline-block;
  margin-left: 8px;
  font-weight: 700;
  color: var(--magenta);
  font-family: var(--font-mono);
  text-shadow: 0 0 8px rgba(255, 46, 136, 0.6);
}

/* ============================================================
   REVEAL PANE — theatrical answer
   ============================================================ */

.reveal-pane {
  gap: 20px;
  align-items: center;
  text-align: center;
  padding: 24px 16px 8px;
}
.reveal-pane .eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 210, 63, 0.4);
}
.reveal-correct {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--chrome);
  text-transform: uppercase;
  text-shadow:
    0 0 1px rgba(255,255,255,0.4),
    0 0 28px rgba(255, 210, 63, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.reveal-correct em {
  font-family: var(--font-sans);
  font-style: italic;
  font-weight: 500;
  font-size: 0.22em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
  text-shadow: none;
}
.reveal-correct strong { color: var(--gold); }
.reveal-correct .word-dot { color: var(--magenta); }

.reveal-pane .divider { width: 100%; margin-top: 12px; }

.reveal-results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  align-self: center;
  text-align: left;
}
.reveal-results .result {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: baseline;
  gap: 18px;
  padding: 14px 4px;
  font-size: 1.15rem;
  border-bottom: 1px solid var(--hairline);
}
.reveal-results .result:last-child { border-bottom: none; }
.reveal-results .result .mark {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ink-dim);
}
.reveal-results .result.correct .mark {
  color: var(--answer-d-bg);
  text-shadow: var(--glow-lime);
}
.reveal-results .result.wrong .mark {
  color: var(--magenta);
  text-shadow: var(--glow-magenta);
}
/* Slider rows that answered but weren't an exact hit: neutral gold bullet,
   not a green "win" tick (every slider answer scores something). */
.reveal-results .result.answered .mark {
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 210, 63, 0.35);
  font-size: 1.2rem;
}
.reveal-results .result .name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--chrome);
  text-transform: uppercase;
}
.reveal-results .result .delta {
  font-family: var(--font-sans);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.reveal-results .result .total {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
  text-align: right;
  color: var(--gold);
}
.reveal-results .result.spectator {
  opacity: 0.45;
}
.reveal-results .result.spectator .mark { color: var(--ink-dim); }
.reveal-results .result.spectator .total { color: var(--ink-soft); }

/* ============================================================
   BONUS PANE
   ============================================================ */

.bonus-pane { gap: 24px; }
.bonus-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.bonus-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--magenta);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--glow-magenta);
}
.bonus-star {
  color: var(--gold);
  text-shadow: var(--glow-gold);
  font-size: 1.1em;
}
.bonus-points {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-shadow: var(--glow-gold);
}

/* ============================================================
   FINAL — podium spread
   ============================================================ */

.final-surface { gap: 22px; }
.final-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.final-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: 0.005em;
  color: var(--chrome);
  text-transform: uppercase;
  text-shadow:
    0 0 1px rgba(255,255,255,0.4),
    0 0 30px rgba(255, 210, 63, 0.35);
}
.final-title::after {
  content: '';
  display: inline-block;
  width: 0.32em; height: 0.32em;
  background: var(--magenta);
  border-radius: 50%;
  margin-left: 0.12em;
  vertical-align: 0.12em;
  box-shadow: var(--glow-magenta);
  animation: bulb-throb 1.4s ease-in-out infinite;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  align-items: end;
  gap: 14px;
  padding: 6px 0 2px;
}
.podium-seat {
  background: linear-gradient(180deg, var(--stage-card), var(--stage-soft));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 16px 40px -16px rgba(0,0,0,0.7);
}
.podium-seat.empty { opacity: 0.4; }
.seat-first  { min-height: 200px; }
.seat-second { min-height: 160px; }
.seat-third  { min-height: 135px; }
.seat-first {
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 0 1px rgba(255, 210, 63, 0.3),
    0 20px 60px -10px rgba(255, 210, 63, 0.35),
    0 24px 60px -16px rgba(0,0,0,0.7);
}
.seat-first::before {
  content: '';
  position: absolute;
  top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  filter: drop-shadow(var(--glow-gold));
}
.podium-rank {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.seat-first .podium-rank {
  color: var(--gold);
  text-shadow: var(--glow-gold);
}
.podium-name {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--chrome);
  text-transform: uppercase;
}
.seat-first .podium-name {
  font-size: 3rem;
  color: var(--gold);
  text-shadow: var(--glow-gold);
}
.podium-score {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--gold);
  margin-top: auto;
  letter-spacing: 0.04em;
}
.seat-first .podium-score {
  font-size: 2.2rem;
  color: var(--chrome);
}

/* Full ranking under the podium. Awards stay hidden (kept in the DOM so the
   game-over JS doesn't need to change). */
.final-grid {
  display: block;
}
.final-awards-col { display: none; }
.final-standings-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.final-standings-col .eyebrow { color: var(--gold); }
/* Newspaper-style columns: as many ~240px columns as fit, so 30 names stay
   compact instead of one tall overflowing list. Adapts to player count + width. */
.final-standings {
  display: block;
  columns: 240px;
  column-gap: 48px;
  font-size: 1rem;
}
.final-standings li {
  break-inside: avoid;
  padding: 9px 6px;
}

.awards { display: flex; flex-direction: column; gap: 14px; }
.award {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.award:last-child { border-bottom: none; }
.award-title {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  grid-row: 1 / 3;
  align-self: center;
  min-width: 180px;
}
.award-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--gold);
  text-transform: uppercase;
}
.award-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
}
.awards h3 { display: none; }

.final-actions { display: flex; justify-content: center; gap: 16px; }
.final-actions .primary { font-size: 1.3rem; padding: 20px 36px; }

.lobby-logo {
  display: block;
  max-height: 72px;
  max-width: 260px;
  object-fit: contain;
  margin-bottom: 14px;
}
.lobby-logo[hidden] { display: none; }
