/* Host TV screen — big, readable from across the room. */
.screen { min-height: 100vh; padding: 4vh 5vw; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; }

.logo { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 800; letter-spacing: -1px; margin: 0;
  background: var(--title-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 26px rgba(255,90,60,.32)); }
.logo span { -webkit-text-fill-color: var(--accent); }
.tagline { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.5rem); max-width: 22ch; }

.setup-card { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 24px; width: min(640px, 92vw); }
.setup-card label { display: grid; gap: 6px; text-align: left; color: var(--muted); font-weight: 600; }
.setup-card > .btn, .setup-card .full, .setup-card .check { grid-column: 1 / -1; }
@media (max-width: 560px) { .setup-card { grid-template-columns: 1fr; } }
.setup-card select { padding: 12px; border-radius: 12px; border: 1px solid var(--card-br); background: #1c123f; color: var(--ink); font-size: 1rem; }

/* Lobby */
/* Lobby = a broadcast title card, fits ONE screen (TV-safe height-driven sizes). */
#screen-lobby { height: 100dvh; max-height: 100dvh; overflow: hidden;
  /* studio background photo + dark overlay tuned to the theatre-black theme */
  background: linear-gradient(rgba(18,9,9,.78), rgba(18,9,9,.9)),
    url('/static/assets/generated/img/bg_party.png') center/cover no-repeat fixed;
  padding: clamp(16px, 4vh, 48px) clamp(20px, 5vw, 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(12px, 3vh, 36px); }

.lobby-head { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lobby-head .logo { font-size: clamp(2rem, 6.5vh, 4.6rem); }
.lobby-wifi { color: var(--muted); font-weight: 600; font-size: clamp(.78rem, 1.7vh, 1.05rem); }
.lobby-wifi .wifi-net { color: var(--primary-soft); font-weight: 700; }

/* Hero: the room code is THE element; QR is supporting. */
.lobby-hero { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(20px, 4vw, 72px); margin: clamp(2px, 1.5vh, 20px) 0; max-width: 100%; }
.hero-code { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.hero-code .code { color: var(--muted); letter-spacing: .32em; text-transform: uppercase; font-size: clamp(.78rem, 1.7vh, 1.1rem); }
.hero-code .big-code { font-family: var(--font-display); font-weight: 800; color: var(--accent);
  font-size: clamp(3rem, 13vw, 10rem); letter-spacing: .25rem; line-height: .95; max-width: 100%; overflow-wrap: anywhere; }
.hero-code .join-url { color: var(--muted); word-break: break-all; font-size: clamp(.68rem, 1.4vh, 1rem); }
.hero-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: clamp(12px, 2vh, 22px); }
#qr { background: #fff; padding: clamp(8px, 1.4vh, 14px); border-radius: 14px; line-height: 0; }
#qr img, #qr canvas { display: block; width: clamp(120px, 22vh, 220px) !important; height: clamp(120px, 22vh, 220px) !important; }
.host-controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Contestants arriving — pill chips in a centered, wrapping row. */
.players-panel { width: 100%; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.6vh, 16px); }
.players-panel h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 3vh, 2.2rem); margin: 0; display: flex; align-items: center; gap: 12px; }
.player-list { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start;
  gap: clamp(8px, 1.2vh, 14px); flex: 1 1 auto; min-height: 0; overflow: hidden; width: 100%; }
.player-chip { padding: clamp(7px, 1.1vh, 12px) clamp(12px, 1.6vh, 18px); border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow-1);
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: clamp(.95rem, 1.8vh, 1.3rem); }
.player-chip .av { font-size: clamp(1.4rem, 2.6vh, 2rem); }
.player-chip.off { opacity: .45; }
.hint { color: var(--muted); font-size: .9rem; }

/* Game views */
.game-view { height: 100dvh; max-height: 100dvh; overflow: hidden;
  padding: clamp(74px, 13vh, 132px) clamp(16px, 4vw, 64px) clamp(12px, 3vh, 44px);
  display: flex; flex-direction: column; justify-content: center; gap: 1.5vh; }
/* TV "cut": each view eases in when it comes on screen (set via showView). */
.game-view.cut-in { animation: viewCut .42s var(--ease-out) both; }
@keyframes viewCut { 0% { opacity: 0; transform: translateY(22px) scale(.984); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .game-view.cut-in { animation: none; } }
.host-comment { position: fixed; top: 0; left: 0; right: 0; text-align: center; padding: 16px;
  font-size: clamp(1.1rem, 2.6vw, 1.8rem); font-weight: 700; color: var(--ink);
  background: linear-gradient(180deg, rgba(18,9,9,.94), transparent); z-index: 5; min-height: 2.4em;
  line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.round-title { font-family: var(--font-display); font-size: clamp(1.8rem, 6vh, 4.2rem); font-weight: 800; }

.q-head { display: flex; align-items: center; justify-content: space-between; margin-top: 0; }
.q-text { font-family: var(--font-display); font-size: clamp(1.4rem, 4.2vh, 3.1rem); font-weight: 700; text-align: center; margin: 2vh auto; max-width: 24ch; line-height: 1.15; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.6vh, 18px); width: 100%; max-width: 1100px; margin: 0 auto; }
.answer { padding: clamp(12px, 2.2vh, 26px); border-radius: 18px; font-size: clamp(1rem, 2.6vh, 1.9rem); font-weight: 800;
  border: 2px solid var(--card-br); background: var(--card); display: flex; gap: 16px; align-items: center; transition: transform .2s; }
.answer .letter { width: clamp(34px, 5vh, 48px); height: clamp(34px, 5vh, 48px); border-radius: 10px; display: grid; place-items: center; background: var(--neon-2); color: #fff; flex: 0 0 auto; }
.answer.correct { background: rgba(56,224,138,.22); border-color: var(--good); box-shadow: 0 0 48px rgba(56,224,138,.5);
  animation: answerWin .6s var(--ease-spring) both; z-index: 2; }
@keyframes answerWin { 0% { transform: scale(1); } 35% { transform: scale(1.07); } 100% { transform: scale(1.02); } }
.answer.wrong { opacity: .5; filter: grayscale(.55); transform: scale(.97); }
.answer.suspense { animation: ansPulse 1s ease-in-out infinite; border-color: var(--gold); }
@keyframes ansPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); box-shadow: 0 0 30px rgba(255,210,63,.35); } }
/* Reveal roulette: a single option lit green as the flash hops between them. */
.answer.flash { border-color: var(--good); background: rgba(76,214,147,.30);
  box-shadow: 0 0 40px rgba(76,214,147,.55); transform: scale(1.035); }
.host-fox.suspense { animation: foxSuspense 1s ease-in-out infinite; }
@keyframes foxSuspense { 0%,100% { transform: translateY(0) rotate(-2deg) scale(1.04); } 50% { transform: translateY(-4px) rotate(2deg) scale(1.08); } }
.q-explain { max-width: 60ch; margin: 1.5vh auto 0; text-align: center; font-size: clamp(1rem, 2.2vh, 1.5rem);
  font-weight: 700; color: var(--neon-3); background: var(--card); border: 1px solid var(--card-br);
  border-radius: 14px; padding: 10px 18px; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .4s; }
.q-explain.show { opacity: 1; transform: none; }

/* "Difficulty up" heat flash when a runaway leader is detected. */
#screen-game.heat::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 30;
  box-shadow: inset 0 0 140px 30px rgba(255,60,40,.55); animation: heatPulse 2.6s ease-out forwards; }
@keyframes heatPulse { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
.answer .picks { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.answer .pick { background: rgba(0,0,0,.45); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.9);
  font-size: clamp(.7rem, 1.6vh, 1.05rem); font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.answer-progress { text-align: center; margin-top: 1.5vh; color: var(--muted); font-size: clamp(1rem, 2.2vh, 1.4rem); font-weight: 700; }

.timer { position: relative; width: clamp(64px, 11vh, 96px); height: clamp(64px, 11vh, 96px); }
.timer svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.timer circle { fill: none; stroke-width: 3.5; }
.timer-track { stroke: rgba(255,255,255,.12); }
.timer-arc { stroke: var(--neon-3); stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
#timer-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; }

.scoreboard { display: grid; gap: clamp(8px, 1.4vh, 14px); width: 100%; max-width: 900px; margin: 2vh auto; overflow: hidden; }
.score-row { display: grid; grid-template-columns: 48px 56px 1fr auto; gap: 16px; align-items: center; }
.score-row.reveal-row { animation: rowIn .5s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes rowIn { 0% { opacity: 0; transform: translateY(26px); } 100% { opacity: 1; transform: none; } }
.score-row .rank { font-family: var(--font-display); font-size: clamp(1rem, 2.4vh, 1.6rem); font-weight: 700; color: var(--muted); text-align: center; }
.score-row.rank-1 .rank { color: var(--accent); }   /* gold for the leader only */
.score-row .av { font-size: 2rem; }
.score-bar-wrap { background: var(--card); border-radius: 999px; height: 36px; overflow: hidden; position: relative; }
.score-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--neon-2), var(--neon-1));
  transform-origin: left; transform: scaleX(0); transition: transform .9s cubic-bezier(.2,.9,.3,1); }
.score-row .name { position: absolute; top: 0; left: 16px; line-height: 36px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,.9); }
.score-row .pts { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.score-row.rank-1 .pts { color: var(--accent); }

.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 20vw, 260px), 1fr)); gap: clamp(10px, 1.6vh, 18px); width: 100%; max-width: 1100px; margin: 2vh auto; overflow: hidden; }
.award-card { padding: 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-br); text-align: left; }
.award-card .title { font-size: 1.4rem; font-weight: 900; color: var(--gold); }
.award-card .who { font-size: 1.1rem; font-weight: 800; margin: 4px 0; }
.award-card .reason { color: var(--muted); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* One-time enable overlay (sound + fullscreen gesture) */
.enable-overlay { position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; justify-content: center; text-align: center; cursor: pointer;
  background: rgba(22,10,10,.66); backdrop-filter: blur(3px); }
.enable-box { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 36px 44px; }
.enable-emoji { font-size: clamp(2.5rem, 7vh, 5rem); }
.enable-btn { font-size: clamp(1.2rem, 3vh, 2rem); padding: 20px 40px; }
.enable-hint { color: var(--muted); font-size: clamp(.9rem, 2vh, 1.2rem); max-width: 24ch; }
.vip-hint { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.4rem); font-weight: 700;
  padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-br); text-align: center; }

/* Wi-Fi reminder banner */
.wifi-banner { padding: 12px 20px; font-size: clamp(.9rem, 2vw, 1.2rem); font-weight: 600;
  color: var(--muted); border-color: var(--hairline); display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; justify-content: center; text-align: center; max-width: 900px; }
.wifi-net { color: var(--primary-soft); font-weight: 700; }
.lobby-wifi { margin: 0 auto 18px; }

/* Setup extras */
.setup-card .full { grid-column: 1 / -1; }
.setup-card textarea { padding: 12px; border-radius: 12px; border: 1px solid var(--card-br);
  background: #1c123f; color: var(--ink); font-size: 1rem; font-family: var(--font); resize: vertical; }
.setup-card .check { display: flex; flex-direction: row; align-items: center; gap: 10px; color: var(--ink); cursor: pointer; }
.setup-card .check input { width: 22px; height: 22px; accent-color: var(--gold); }

/* Host character on the game stage */
.host-stage { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: flex-start; gap: 14px; padding: 12px 20px;
  background: linear-gradient(180deg, rgba(22,10,10,.92), transparent); }
.host-char { font-size: clamp(2rem, 4vw, 3rem); line-height: 1; filter: drop-shadow(0 0 12px rgba(255,60,168,.6)); }
.host-char.talking { animation: hostTalk .35s ease-in-out infinite; }
@keyframes hostTalk { 50% { transform: translateY(-6px) scale(1.12) rotate(-4deg); } }
.host-stage .host-comment { position: static; background: none; padding: 6px 0; flex: 1; text-align: left; }

/* Generated studio backdrop on the game stage (dark overlay keeps text readable;
   gradient alone shows if the image is missing). */
#screen-game {
  height: 100dvh; max-height: 100dvh; overflow: hidden;
  background:
    radial-gradient(135% 95% at 50% -12%, var(--scene-glow, rgba(255,120,66,.40)), transparent 66%),
    linear-gradient(rgba(18,9,9,.74), rgba(18,9,9,.88)),
    url('/static/assets/generated/img/bg_neon.png') center/cover no-repeat fixed;
}
/* Per-game "set change": each game lights the shared studio in its own mood.
   None reuse the banned indigo/violet — they read as distinct stage gels. */
#screen-game[data-game="ai_quiz_show"]   { --scene-glow: rgba(255,120,66,.40); }  /* coral — main stage */
#screen-game[data-game="defuse_bomb"]    { --scene-glow: rgba(255,58,42,.48);  }  /* red alert */
#screen-game[data-game="wit_off"]        { --scene-glow: rgba(255,193,77,.42); }  /* gold comedy club */
#screen-game[data-game="most_likely_to"] { --scene-glow: rgba(255,93,143,.42); }  /* warm party rose */
#screen-game[data-game="fool_them_all"]  { --scene-glow: rgba(76,214,147,.40); }  /* green deception */
#screen-game[data-game="masterpiece"]    { --scene-glow: rgba(64,200,196,.40); }  /* teal art studio */

/* Rigged fox host — corner presenter (must NOT cover answers). Parts animate
   independently: body bobs, eyes blink, and while .talking the mouth flaps,
   head nods and the right arm waves. */
.host-fox {
  position: fixed; right: .5vw; bottom: 0; z-index: 6; pointer-events: none;
  height: clamp(120px, 19vh, 210px); width: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.5));
  transform-origin: bottom center; animation: foxIdle 2.8s ease-in-out infinite;
}
.host-fox svg { height: 100%; width: auto; overflow: visible; }
@keyframes foxIdle { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1.2deg); } }

.host-fox .fx-head  { transform-origin: 110px 150px; }
.host-fox .fx-mouth { transform-origin: 110px 130px; }
.host-fox .fx-arm-r { transform-origin: 166px 150px; }
.host-fox .fx-eye   { transform-origin: center; transform-box: fill-box; animation: foxBlink 4.2s ease-in-out infinite; }
@keyframes foxBlink { 0%,92%,100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

/* Speaking */
.host-fox.talking .fx-mouth { animation: foxMouth .2s ease-in-out infinite; }
.host-fox.mouth-live .fx-mouth { animation: none !important; }   /* JS drives scaleY from voice amplitude */
.host-fox.talking .fx-head  { animation: foxNod .42s ease-in-out infinite; }
.host-fox.talking .fx-arm-r { animation: foxWave .5s ease-in-out infinite; }
@keyframes foxMouth { 0%,100% { transform: scaleY(.5); } 50% { transform: scaleY(2.3); } }
@keyframes foxNod   { 0%,100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes foxWave  { 0%,100% { transform: rotate(-16deg); } 50% { transform: rotate(20deg); } }

/* Suspense (lock-in): lean in, eyes wide, hold still */
.host-fox.suspense .fx-head { transform: scale(1.05) rotate(-3deg); }
.host-fox.suspense .fx-eye  { transform: scaleY(1.25); }
/* Cheer (correct/celebrate): bounce + arm up */
.host-fox.cheer { animation: foxCheer .5s ease-in-out 2; }
.host-fox.cheer .fx-arm-r { transform: rotate(40deg); }
@keyframes foxCheer { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-22px) rotate(3deg); } }

.award-trophy { height: clamp(120px, 18vh, 200px); width: auto; filter: drop-shadow(0 6px 20px rgba(255,210,63,.4)); animation: foxIdle 3s ease-in-out infinite; }

/* ── Broadcast lower-third: slides in to caption a beat (round, leader) ── */
.lower-third { position: fixed; left: clamp(20px, 4vw, 64px); bottom: clamp(46px, 8vh, 84px); z-index: 40;
  display: flex; flex-direction: column; gap: 3px; padding: 12px 28px 12px 22px; max-width: 62vw;
  background: linear-gradient(100deg, rgba(20,9,10,.94), rgba(20,9,10,.62));
  border-left: 5px solid var(--primary); border-radius: 4px 12px 12px 4px;
  box-shadow: var(--shadow-raised); backdrop-filter: blur(6px); }
.lower-third .lt-kicker { font-size: clamp(.66rem, 1.5vh, 1rem); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.lower-third .lt-title { font-family: var(--font-display); font-size: clamp(1.15rem, 3.2vh, 2.1rem); font-weight: 800; color: var(--ink); line-height: 1.04; }
.lower-third.in  { animation: ltIn .5s var(--ease-spring) both; }
.lower-third.out { animation: ltOut .38s var(--ease-out) both; }
@keyframes ltIn  { 0% { opacity: 0; transform: translateX(-46px); } 100% { opacity: 1; transform: none; } }
@keyframes ltOut { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-46px); } }
@media (prefers-reduced-motion: reduce) { .lower-third.in, .lower-third.out { animation: none; } }

/* ── Permanent broadcast ticker: scrolling news strip along the bottom ── */
.ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; height: 32px;
  display: flex; align-items: stretch; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(20,9,10,.0) 8%, rgba(20,9,10,.94) 55%);
  border-top: 1px solid var(--hairline); }
.ticker-live { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: var(--bad); color: #fff; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(.66rem, 1.4vh, .82rem); letter-spacing: .14em; }
.ticker-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: tkBlink 1.2s ease-in-out infinite; }
@keyframes tkBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.ticker-window { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ticker-track { white-space: nowrap; padding-left: 100%; font-weight: 700;
  font-size: clamp(.78rem, 1.7vh, 1rem); color: var(--ink); animation: tkScroll 34s linear infinite; }
.ticker-track .sep { color: var(--accent); margin: 0 20px; font-weight: 900; }
@keyframes tkScroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; padding-left: 16px; } .ticker-live::before { animation: none; } }

/* ── Cold open: cinematic flash + host walk-on + title build ────────── */
.coldflash { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0; background: #fff; }
.coldflash.fire { animation: coldFlash .7s ease-out both; }
@keyframes coldFlash { 0% { opacity: 0; } 8% { opacity: .9; } 100% { opacity: 0; } }
.bumper { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-0)); }
.bumper.show { animation: bumpIn .4s ease both; }
.bumper-card { text-align: center; }
.bumper-emoji { font-size: clamp(4rem, 16vh, 11rem); animation: foxIdle 2s ease-in-out infinite; }
.bumper-text { font-size: clamp(1.6rem, 5vh, 3.4rem); font-weight: 900; color: var(--gold); margin-top: 2vh; }
@keyframes bumpIn { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: none; } }

/* "How to play" rules card — opens every game, like a Jackbox MC explainer. */
.rulescard { position: fixed; inset: 0; z-index: 46; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-0)); }
.rulescard.show { animation: bumpIn .4s ease both; }
.rules-card { width: min(82vw, 980px); text-align: center; }
.rules-title { font-family: var(--font-display); font-weight: 800; color: var(--accent, var(--gold));
  font-size: clamp(1.8rem, 6vh, 4rem); margin-bottom: 4vh; }
.rules-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2vh;
  text-align: left; counter-reset: rstep; }
.rules-steps li { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem);
  font-size: clamp(1.2rem, 3.4vh, 2.2rem); font-weight: 700; color: var(--ink);
  opacity: 0; transform: translateX(-24px); animation: ruleIn .5s cubic-bezier(.2,1.3,.4,1) both; }
.rules-steps li::before { counter-increment: rstep; content: counter(rstep);
  flex: 0 0 auto; width: clamp(2.4rem, 6vh, 3.6rem); height: clamp(2.4rem, 6vh, 3.6rem);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: #fff; font-family: var(--font-display);
  font-weight: 800; font-size: .9em; box-shadow: 0 0 24px rgba(91,108,255,.5); }
@keyframes ruleIn { to { opacity: 1; transform: none; } }

/* Fake "commercial break" ad card — absurd product the MC reads aloud. */
.adcard { position: fixed; inset: 0; z-index: 47; display: grid; place-items: center;
  background: radial-gradient(120vh 120vh at 50% 40%, #2a1c3f, var(--bg-0) 70%); }
.adcard.show { animation: bumpIn .4s ease both; }
.ad-inner { text-align: center; width: min(86vw, 1000px);
  padding: clamp(2rem, 5vh, 4rem); border-radius: 28px;
  background: linear-gradient(160deg, rgba(91,108,255,.16), rgba(255,178,63,.10));
  border: 3px solid var(--accent, var(--gold)); box-shadow: 0 0 80px rgba(255,178,63,.25); }
.ad-kicker { font-family: var(--font-display); font-weight: 800; letter-spacing: .22em;
  font-size: clamp(.9rem, 2.4vh, 1.4rem); color: var(--accent, var(--gold));
  text-transform: uppercase; animation: adBlink 1s steps(2) infinite; }
.ad-image { display: block; margin: 1vh auto 0; width: clamp(140px, 26vh, 320px);
  height: clamp(140px, 26vh, 320px); object-fit: cover; border-radius: 18px;
  border: 3px solid var(--accent, var(--gold)); box-shadow: 0 8px 40px rgba(0,0,0,.35); }
.ad-image.hidden { display: none; }
.ad-brand { font-family: var(--font-display); font-weight: 800; color: var(--ink);
  font-size: clamp(1.6rem, 5.5vh, 4.2rem); line-height: 1.05; margin: 1.6vh 0;
  transform: rotate(-2deg); overflow-wrap: anywhere; hyphens: auto; }
.ad-slogan { font-size: clamp(1.2rem, 3.6vh, 2.4rem); font-weight: 700; color: var(--ink);
  opacity: .92; }
@keyframes adBlink { 50% { opacity: .35; } }
/* Champion spotlight */
.champ { position: fixed; inset: 0; z-index: 48; display: grid; place-items: center;
  background: radial-gradient(circle at center, rgba(255,210,63,.18), rgba(10,4,30,.92) 60%); }
.champ-card { text-align: center; animation: champRise .7s cubic-bezier(.2,1.4,.4,1) both; }
.champ-crown { font-size: clamp(3rem, 10vh, 7rem); animation: foxIdle 1.6s ease-in-out infinite; }
.champ-av { font-size: clamp(5rem, 22vh, 15rem); line-height: 1; filter: drop-shadow(0 0 40px rgba(255,210,63,.6)); }
.champ-name { font-family: var(--font-display); font-size: clamp(2rem, 7vh, 5rem); font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.champ-label { font-size: clamp(1.2rem, 3vh, 2.2rem); font-weight: 900; letter-spacing: .3em; color: var(--gold); margin-top: 1vh; }
@keyframes champRise { 0% { opacity: 0; transform: translateY(60px) scale(.7); } 100% { opacity: 1; transform: none; } }

/* Outro credits crawl */
.outro { position: fixed; inset: 0; z-index: 48; overflow: hidden;
  background: linear-gradient(160deg, var(--bg-1), var(--bg-0)); }
.outro-crawl { position: absolute; left: 0; right: 0; top: 100%; text-align: center; animation: crawl 14s linear forwards; }
.outro-crawl .oc-title { font-size: clamp(2rem, 7vh, 4.5rem); font-weight: 900; color: var(--gold); margin-bottom: 3vh; }
.outro-crawl .oc-sub { font-size: clamp(1.1rem, 3vh, 2rem); color: var(--neon-3); font-weight: 800; margin: 2vh 0; }
.outro-crawl .oc-name { font-size: clamp(1.4rem, 4vh, 2.6rem); color: var(--ink); font-weight: 800; margin: 1vh 0; }
@keyframes crawl { from { transform: translateY(0); } to { transform: translateY(calc(-100% - 100vh)); } }

/* Finale theme — last round gets a hot red/gold edge glow. */
#screen-game.finale::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 4;
  box-shadow: inset 0 0 120px 18px rgba(255,90,40,.28); }

.host-fox.walkon { animation: foxWalkOn 1.3s cubic-bezier(.2,1.3,.35,1) both; }
@keyframes foxWalkOn {
  0% { transform: translateX(160%) translateY(20px) rotate(8deg); opacity: 0; }
  60% { transform: translateX(-8%) translateY(-6px) rotate(-3deg); opacity: 1; }
  100% { transform: translateX(0) translateY(0) rotate(0); opacity: 1; }
}
.round-title .ltr { display: inline-block; opacity: 0; animation: ltrIn .5s cubic-bezier(.2,1.5,.4,1) both; white-space: pre; }
@keyframes ltrIn { 0% { opacity: 0; transform: translateY(40px) scale(.4) rotate(-8deg); } 100% { opacity: 1; transform: none; } }

/* ── Intro / round-transition ──────────────────────────────────────── */
.intro-kicker { font-size: clamp(1rem, 2.4vh, 1.6rem); font-weight: 900; letter-spacing: .22em;
  text-transform: uppercase; color: var(--neon-3); opacity: 0; }
.intro-kicker.show { animation: kickIn .5s ease both; }
.intro-sub { margin-top: clamp(8px, 1.6vh, 18px); font-size: clamp(1.1rem, 2.6vh, 1.9rem);
  font-weight: 700; color: var(--muted); max-width: 80%; text-align: center; opacity: 0; }
.intro-sub.show { animation: kickIn .6s .15s ease both; }
/* Contestant nameplates — TV "lower-third" banners that slide in one by one. */
.intro-players { display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 16px); align-items: stretch;
  margin-top: clamp(12px, 3vh, 30px); width: min(560px, 80%); }
.intro-players .ip { display: flex; align-items: center; gap: 16px; opacity: 0;
  background: var(--card); border: 1px solid var(--card-br); border-left: 6px solid var(--gold);
  border-radius: 12px; padding: 10px 18px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
  animation: ipIn .5s cubic-bezier(.2,1.4,.4,1) both; }
.intro-players .ip-av { font-size: clamp(1.8rem, 4.6vh, 3rem); }
.intro-players .ip-name { font-weight: 900; color: #fff; font-size: clamp(1.1rem, 2.6vh, 1.8rem); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
@keyframes ipIn { 0% { opacity: 0; transform: translateX(-40px); } 100% { opacity: 1; transform: none; } }
@keyframes kickIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.round-title.pop-in { animation: roundPop .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes roundPop { 0% { opacity: 0; transform: scale(.5) rotate(-3deg); }
  60% { opacity: 1; transform: scale(1.08) rotate(1deg); } 100% { transform: scale(1) rotate(0); } }

/* ── 3·2·1·GO countdown overlay ────────────────────────────────────── */
.countdown { position: absolute; inset: 0; display: grid; place-items: center; z-index: 40;
  pointer-events: none; background: radial-gradient(circle at center, rgba(10,4,30,.55), rgba(10,4,30,.15) 60%, transparent); }
.countdown span { font-family: var(--font-display); font-size: clamp(7rem, 30vh, 22rem); font-weight: 800; line-height: 1;
  color: var(--gold); text-shadow: 0 0 50px rgba(255,178,63,.55), 0 8px 0 rgba(0,0,0,.25);
  background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.countdown span.go { color: var(--neon-3); background: linear-gradient(180deg, #fff, var(--neon-3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.countdown span.beat { animation: cdBeat .92s cubic-bezier(.2,1.3,.3,1) both; }
@keyframes cdBeat { 0% { opacity: 0; transform: scale(2.4); } 18% { opacity: 1; transform: scale(1); }
  72% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.6); } }

/* The fox keeps moving even under reduced-motion (it's the host — must feel alive). */
@media (prefers-reduced-motion: reduce) {
  .stage-bg::before, .stage-bg::after { animation: none; }
  .countdown span.beat { animation-duration: .6s; }
}
