/* The party game: the host screen (party/) and the phone controller (join/).
   Same look as Heidi's Table: gallery-white, Fraunces for names, DM Sans for text, emerald. */
:root {
  --ink: #26221e; --soft: #7a7166; --line: #e2d9ca; --paper: #fffdf9; --bg: #f4efe6;
  --emerald: #145a5c; --emerald-hi: #2e8a87; --terracotta: #c4643f; --gold: #c9a24a;
  --head: Fraunces, Georgia, "Times New Roman", serif;
  --font: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; margin: 0; line-height: 1.1; }
.hidden { display: none !important; }
button { font-family: var(--font); cursor: pointer; }
.btn { font-weight: 600; font-size: 1.1rem; color: #fff; background: var(--emerald); border: 2px solid var(--emerald); border-radius: 999px; padding: 0.8em 1.6em; white-space: nowrap; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn:active:not(:disabled) { transform: scale(0.98); }
canvas.face { display: block; }

/* --- host screen (TV / laptop / iPad) --- */
.host { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 2.5vh 4vw; gap: 2vh; }
.host header { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.host .brand { font-family: var(--head); font-size: clamp(1.4rem, 3vw, 2.6rem); font-weight: 600; }
.host .brand small { display: block; font-family: var(--font); font-size: 0.45em; font-weight: 500; color: var(--soft); letter-spacing: 0.08em; text-transform: uppercase; }
.host .join-at { text-align: right; font-size: clamp(0.9rem, 1.6vw, 1.3rem); color: var(--soft); }
.host .join-at b { display: block; color: var(--ink); font-family: var(--head); font-size: 2.2em; letter-spacing: 0.12em; }
.host main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; text-align: center; }
.host footer { display: flex; align-items: center; justify-content: space-between; gap: 2vw; min-height: 3.5rem; }
.heidi-says { display: flex; align-items: flex-end; gap: 1.2vw; max-width: 72vw; margin-bottom: -2.5vh; }
.heidi { display: block; line-height: 0; }
.heidi-host { display: block; filter: drop-shadow(0 6px 10px rgba(60, 45, 30, 0.12)); }
.heidi-says .bubble { position: relative; margin-bottom: 4.5rem; }
.heidi-says .bubble::before { content: ''; position: absolute; left: -12px; bottom: 18px; border: 10px solid transparent; border-right-color: var(--line); border-left: 0; }
.heidi-says .bubble { background: var(--paper); border: 2px solid var(--line); border-radius: 1.2rem; padding: 0.7em 1.1em; font-size: clamp(1rem, 2vw, 1.6rem); text-align: left; }
.kind { font-size: clamp(0.8rem, 1.4vw, 1.1rem); letter-spacing: 0.16em; text-transform: uppercase; color: var(--emerald); font-weight: 700; }
.prompt { font-size: clamp(1.8rem, 4.6vw, 4rem); max-width: 80vw; }
.timer { font-family: var(--head); font-size: clamp(1.4rem, 3vw, 2.4rem); color: var(--soft); min-width: 3ch; }
.roster { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6vw; }
.roster .p { display: flex; flex-direction: column; align-items: center; gap: 0.4em; font-weight: 600; font-size: clamp(0.9rem, 1.5vw, 1.2rem); position: relative; }
.roster .p.off { opacity: 0.35; }
.roster .p .tick { position: absolute; top: -0.3em; right: -0.3em; background: var(--emerald); color: #fff; border-radius: 50%; width: 1.6em; height: 1.6em; display: grid; place-items: center; font-size: 0.85em; }
.roster .p .vip { font-size: 0.7em; color: var(--gold); letter-spacing: 0.1em; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(26vw, 22rem), 1fr)); gap: 1.4vw; width: min(92vw, 1400px); }
.opt { background: var(--paper); border: 2px solid var(--line); border-radius: 1rem; padding: 1em 1.2em; font-size: clamp(1rem, 2vw, 1.7rem); display: flex; align-items: center; gap: 0.8em; min-height: 4.5em; text-align: left; }
.opt .txt { flex: 1; }
.opt.win { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(20, 90, 92, 0.15); }
.opt.truth { border-color: var(--gold); background: #fbf6e6; }
.opt .meta { font-size: 0.6em; color: var(--soft); margin-top: 0.3em; }
.opt .voters { display: flex; gap: 0.2em; }
.crown { font-family: var(--head); font-style: italic; font-size: clamp(1.6rem, 3.6vw, 3rem); color: var(--emerald); }
.standings { display: grid; gap: 0.8vh; width: min(80vw, 900px); }
.standings .row { display: grid; grid-template-columns: 3ch auto 1fr auto auto; align-items: center; gap: 1.2vw; background: var(--paper); border: 2px solid var(--line); border-radius: 0.9rem; padding: 0.5em 1em; font-size: clamp(1rem, 2vw, 1.6rem); }
.standings .row:first-child { border-color: var(--gold); }
.standings .gain { color: var(--emerald); font-weight: 700; }
.standings .score { font-family: var(--head); font-weight: 600; font-size: 1.3em; }

/* --- phone controller --- */
.phone { max-width: 32rem; margin: 0 auto; padding: 1.2rem 1rem 2rem; min-height: 100vh; display: flex; flex-direction: column; gap: 1rem; }
.phone .top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.phone .top .who { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.phone .top .pts { font-family: var(--head); font-weight: 600; font-size: 1.3rem; }
.phone h2 { font-size: 1.6rem; }
.phone p { margin: 0; line-height: 1.4; }
.phone .muted { color: var(--soft); }
.field { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea { font: inherit; font-size: 1.25rem; font-weight: 500; padding: 0.7em 0.8em; border: 2px solid var(--line); border-radius: 0.8rem; background: var(--paper); color: var(--ink); width: 100%; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--emerald); }
.code-input { text-transform: uppercase; letter-spacing: 0.4em; text-align: center; font-family: var(--head) !important; font-size: 2rem !important; }
.number-input { text-align: center; font-family: var(--head) !important; font-size: 2rem !important; }
.faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.faces button { background: var(--paper); border: 2px solid var(--line); border-radius: 0.8rem; padding: 0.4rem 0.2rem; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; font-size: 0.75rem; font-weight: 600; color: var(--ink); }
.faces button.on { border-color: var(--emerald); background: #eef6f4; }
.choices { display: grid; gap: 0.6rem; }
.choices button { background: var(--paper); border: 2px solid var(--line); border-radius: 0.9rem; padding: 0.9em 1em; font-size: 1.1rem; font-weight: 600; color: var(--ink); text-align: left; display: flex; align-items: center; gap: 0.7rem; }
.choices button.on { border-color: var(--emerald); background: #eef6f4; }
.msg { background: #fbf0ea; border: 2px solid #efd2c2; color: #8a3d1d; border-radius: 0.8rem; padding: 0.7em 0.9em; font-weight: 600; }
.big-note { text-align: center; padding: 2rem 0; display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }
.big-note .gain { font-family: var(--head); font-size: 3rem; color: var(--emerald); }

/* ===== the host screen, with animations ============================================== */
.host header .join-at { font-size: clamp(0.9rem, 1.5vw, 1.25rem); color: var(--soft); }
.host header .join-at b { display: inline; font-family: var(--font); font-size: 1em; letter-spacing: 0; color: var(--ink); }
.host header .join-at b.code { font-family: var(--head); letter-spacing: 0.14em; font-size: 1.5em; }
.host .controls { display: flex; gap: 0.8rem; align-items: center; }
.host .icon { background: var(--paper); border: 2px solid var(--line); border-radius: 50%; width: 2.6rem; height: 2.6rem; font-size: 1.1rem; }
.style-pick { font: inherit; font-size: 0.9rem; padding: 0.45em 0.6em; border-radius: 0.6rem; border: 2px solid var(--line); background: var(--paper); color: var(--ink); }
.btn:focus-visible, .chip:focus-visible, .icon:focus-visible, .style-pick:focus-visible, .tv-start:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.scene { position: relative; overflow: hidden; }
.prompt.small { font-size: clamp(1.6rem, 3.4vw, 3rem); }
.muted { color: var(--soft); }

/* the countdown ring */
.ring { width: 3.2rem; height: 3.2rem; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--emerald); stroke-dasharray: 113; transition: stroke-dashoffset 1s linear, stroke 0.3s; stroke-linecap: round; }
.ring.low .ring-fg { stroke: var(--terracotta); }
.ring text { transform: rotate(90deg); transform-origin: 20px 20px; font: 600 13px var(--font); fill: var(--ink); text-anchor: middle; dominant-baseline: middle; }

/* the lobby: QR code and code on the left, who's playing and the packs on the right */
.lobby { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; width: min(92vw, 1400px); text-align: left; }
.lobby-join { display: flex; flex-direction: column; align-items: center; gap: 0.8vh; background: var(--paper); border: 2px solid var(--line); border-radius: 1.4rem; padding: 2.5vh 2.5vw; }
.qr { width: min(26vh, 22vw); height: min(26vh, 22vw); display: block; border-radius: 0.6rem; }
.join-url { font-weight: 600; color: var(--soft); font-size: clamp(0.9rem, 1.4vw, 1.2rem); }
.join-code { font-family: var(--head); font-weight: 600; font-size: clamp(2.4rem, 5vw, 4.6rem); letter-spacing: 0.16em; line-height: 1; }
.lobby-right { display: flex; flex-direction: column; gap: 2vh; }
.lobby-right .roster { justify-content: flex-start; }
.packs { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.chip { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.6rem; align-items: center; text-align: left; background: var(--paper); border: 2px solid var(--line); border-radius: 1rem; padding: 0.6em 1em; color: var(--ink); }
.chip.on { border-color: var(--emerald); background: #eef6f4; }
.chip-icon { grid-row: span 2; font-size: 1.6rem; }
.chip-name { font-weight: 700; font-size: 1.05rem; }
.chip-blurb { font-size: 0.8rem; color: var(--soft); }

/* faces pop in, cards are dealt, prompts rise */
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes deal { from { transform: translateY(40px) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fly { from { transform: translateY(-120px) scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tick { from { transform: scale(0); } to { transform: scale(1); } }
.pop { animation: pop 0.55s cubic-bezier(.2,1.4,.4,1) both; }
.rise { animation: rise 0.6s ease-out both; }
.deal { animation: deal 0.5s cubic-bezier(.2,1,.3,1) both; }
.fly { animation: fly 0.45s cubic-bezier(.2,1.2,.4,1) both; }
.roster .p .tick { animation: tick 0.3s cubic-bezier(.2,1.6,.4,1); }
.roster .p.done canvas { filter: saturate(1.1); }

/* the reveal: the card being revealed lifts; the truth glows gold; winners get a crown */
.opt { transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s, opacity 0.35s; }
.options:has(.spot) .opt:not(.spot):not(.shown) { opacity: 0.55; }
.opt.spot { transform: scale(1.05); border-color: var(--emerald-hi); box-shadow: 0 12px 30px rgba(20, 90, 92, 0.18); }
.opt.truth { animation: pop 0.6s cubic-bezier(.2,1.4,.4,1); }
.opt.win { transform: scale(1.04); }
.crown-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(244, 239, 230, 0.82); animation: rise 0.5s ease-out both; z-index: 3; }
.crown { display: flex; flex-direction: column; align-items: center; gap: 1rem; background: var(--paper); border: 3px solid var(--gold); border-radius: 1.6rem; padding: 2rem 3.5rem; box-shadow: 0 20px 60px rgba(60, 45, 30, 0.18); animation: pop 0.7s cubic-bezier(.2,1.4,.4,1) both; }
.crown-icon { font-size: 3rem; line-height: 1; animation: fly 0.6s 0.3s cubic-bezier(.2,1.2,.4,1) both; }
.crown-faces { display: flex; gap: 1.2rem; }
.crown canvas.crowned { border: 5px solid var(--gold); border-radius: 22%; background: #fbf6e6; }
.crown-line { font-family: var(--head); font-style: italic; font-weight: 600; font-size: clamp(1.8rem, 3.8vw, 3.2rem); color: var(--emerald); text-align: center; }
.crown-quote { font-family: var(--head); font-size: clamp(1.2rem, 2.4vw, 2rem); text-align: center; }

/* the score race */
.standings .row { position: relative; overflow: hidden; grid-template-columns: 3ch auto 1fr auto auto; }
.standings .row > *:not(.bar) { position: relative; }
.standings .bar { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(46,138,135,0.12), rgba(46,138,135,0.22)); transition: width 0.9s cubic-bezier(.2,.8,.2,1); }
.standings .name { font-weight: 600; text-align: left; }

/* the finale: the winner hung like a work of art, with a wall label */
.artwork { display: flex; align-items: center; gap: 4vw; animation: rise 0.9s ease-out both; }
.frame { background: #1d1a17; padding: 1.1rem; box-shadow: 0 24px 60px rgba(40, 30, 20, 0.35), inset 0 0 0 2px #3a342e; }
.mat { background: #fbf8f2; padding: 2.6rem; box-shadow: inset 0 0 0 1px #e8e1d4; }
.wall-label { text-align: left; border-left: 3px solid var(--line); padding-left: 1.4rem; }
.wall-label .artist { font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.6rem); }
.wall-label .title { font-family: var(--head); font-style: italic; font-size: clamp(1.6rem, 3.4vw, 3rem); margin: 0.2em 0; }
.wall-label .medium { color: var(--soft); font-size: clamp(0.9rem, 1.6vw, 1.3rem); }
.also { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; }
.also-p { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--soft); }
.also-p .rank { color: var(--ink); }

/* confetti */
@keyframes fall { from { transform: translate(0, -10vh) rotate(0); } to { transform: translate(var(--drift), 110vh) rotate(720deg); } }
.confetti { position: fixed; top: 0; width: 10px; height: 6px; border-radius: 2px; animation: fall linear both; pointer-events: none; z-index: 5; }

/* "press OK to start": browsers need one press before they'll play sound */
.tv-start { position: fixed; inset: 0; z-index: 20; border: 0; background: rgba(244, 239, 230, 0.92); display: grid; place-items: center; cursor: pointer; font-family: var(--font); }
.tv-start-card { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; background: var(--paper); border: 2px solid var(--line); border-radius: 1.6rem; padding: 3rem 4rem; box-shadow: 0 20px 60px rgba(60,45,30,0.15); }
.tv-start-card b { font-family: var(--head); font-size: 3rem; }
.tv-start-card span { color: var(--soft); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9rem; }
.tv-start-card em { margin-top: 1rem; font-style: normal; font-weight: 700; background: var(--emerald); color: #fff; border-radius: 999px; padding: 0.7em 1.6em; font-size: 1.2rem; }

/* the demo panel (/party/?demo) */
.demo { position: fixed; right: 1rem; top: 1rem; bottom: 1rem; width: 17rem; overflow-y: auto; z-index: 30; background: rgba(255, 253, 249, 0.97); border: 2px solid var(--line); border-radius: 1rem; padding: 1rem; box-shadow: 0 10px 40px rgba(60,45,30,0.15); font-size: 0.9rem; }
.demo.mini { width: auto; bottom: auto; top: 0.4rem; right: auto; left: 50%; transform: translateX(-50%); padding: 0.3rem; opacity: 0.85; }
.demo.mini > :not(.ghost) { display: none; }
.demo h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.demo-section { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.demo-title { width: 100%; font-weight: 700; color: var(--emerald); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }
.demo-btn { background: var(--paper); border: 2px solid var(--line); border-radius: 0.6rem; padding: 0.4em 0.7em; font-weight: 600; color: var(--ink); font-size: 0.85rem; }
.demo-btn:hover { border-color: var(--emerald); }
.demo-btn.ghost { margin-top: 0.4rem; }
.demo-check { width: 100%; font-weight: 600; }
.demo-select { width: 100%; font: inherit; padding: 0.3em; border-radius: 0.5rem; border: 2px solid var(--line); }
@media (max-width: 900px) { .lobby { grid-template-columns: 1fr; justify-items: center; } .demo { top: auto; height: 45vh; width: auto; left: 1rem; } }

.choices button.pack { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.choices button.pack .small { font-size: 0.85rem; font-weight: 500; }

/* ===== the game-show studio (host screen) ============================================== */
body.studio { background: radial-gradient(ellipse 90% 70% at 50% -5%, #2b8a86 0%, #125a5c 38%, #0a3133 75%, #071f20 100%) fixed; color: #f6efe2; }
.studio .host { grid-template-rows: auto 1fr auto auto; }
.studio .brand { color: #f6efe2; }
.studio .brand small, .studio .host header .join-at { color: rgba(246, 239, 226, 0.7); }
.studio .host header .join-at b { color: #ffe7a3; }
.studio .kind { color: #e9c766; }
.studio .prompt { color: #f6efe2; }
.studio .roster .p, .studio .lobby-right .prompt { color: #f6efe2; }
.studio .muted { color: rgba(246, 239, 226, 0.65); }
.studio .status { font-size: clamp(1rem, 2vw, 1.6rem); color: rgba(246, 239, 226, 0.75); font-weight: 600; }
.studio .chip { background: rgba(255, 253, 249, 0.92); }
.studio .ring-bg { stroke: rgba(255, 255, 255, 0.2); }
.studio .ring text { fill: #f6efe2; }
.studio .standings .row { color: var(--ink); }
.studio .also-p { color: rgba(246, 239, 226, 0.75); }
.studio .also-p .rank { color: #ffe7a3; }
.studio .wall-label { border-left-color: rgba(246, 239, 226, 0.3); color: #f6efe2; }
.studio .wall-label .medium { color: rgba(246, 239, 226, 0.7); }
.studio .frame { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 2px #3a342e, 0 0 120px rgba(255, 231, 163, 0.18); }
.studio .crown-overlay { background: rgba(7, 31, 32, 0.72); }
.studio .options:has(.spot) .opt:not(.spot):not(.shown) { opacity: 0.55; }
.studio .opt, .studio .chip, .studio .crown, .studio .standings .row, .studio .lobby-join, .studio .bubble { color: var(--ink); }
.studio .lobby-join .kind { color: var(--emerald); }
/* keep it all on one screen: the middle shrinks, never the podiums or Heidi */
.studio .host { height: 100vh; min-height: 0; overflow: hidden; padding-bottom: 0; }
.studio .host main { min-height: 0; overflow: hidden; justify-content: center; gap: 2.2vh; }
.studio .options.many .opt { min-height: 0; padding: 0.55em 1em; font-size: clamp(0.9rem, 1.6vw, 1.35rem); }
.studio .qr { width: min(20vh, 18vw); height: min(20vh, 18vw); }
.studio .join-code { font-size: clamp(2rem, 4vw, 3.6rem); }
.studio .lobby-join { padding: 1.6vh 2vw; }

/* the question board, edged with chasing marquee bulbs */
.marquee { position: relative; isolation: isolate; border-radius: 22px; }
.marquee::after { content: ''; position: absolute; inset: 0; border-radius: 22px; z-index: -1; background: var(--paper); box-shadow: inset 0 0 0 2px #e7d6a8; }
.marquee::before { content: ''; position: absolute; inset: -16px; border-radius: 32px; z-index: -1;
  background: radial-gradient(circle, #fff2c4 0 3.5px, rgba(255, 215, 120, 0.4) 4.5px, transparent 6.5px) 0 0 / 22px 22px, linear-gradient(160deg, #8a6420, #5a4012);
  box-shadow: 0 0 40px rgba(255, 215, 120, 0.25); animation: bulbs 0.9s steps(1) infinite; }
@keyframes bulbs { 50% { background-position: 11px 11px, 0 0; } }
.board { padding: 2.4vh 3.2vw; max-width: 84vw; margin: 0 16px; }
.board .prompt { color: var(--ink); margin: 0; }

/* the title card between rounds */
.titlecard { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; }
.titlecard .sign { padding: 4vh 6vw; text-align: center; animation: pop 0.7s cubic-bezier(.2,1.4,.4,1) both; }
.sign-round { font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--emerald); font-size: clamp(0.9rem, 1.8vw, 1.5rem); }
.sign-title { font-family: var(--head); font-weight: 600; color: var(--ink); font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: 1.05; }
.titlecard.leave { animation: leave 0.5s ease-in both; }
@keyframes leave { to { opacity: 0; transform: scale(0.9); } }

/* the contestants' podiums */
.podiums { display: flex; justify-content: center; align-items: flex-end; gap: 1.2vw; padding-top: 30px; margin-bottom: -1.5vh; }
.podium { position: relative; width: min(9.5vw, 128px); display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0 0.3rem 0.5rem;
  background: linear-gradient(#1f6e70, #0f4a4c); border-top: 4px solid #c9a24a; border-radius: 12px 12px 4px 4px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); transition: box-shadow 0.3s, transform 0.3s; }
.podium canvas { margin-top: -30px; }
.podium .plate { background: #fff8e6; color: var(--ink); font-weight: 700; font-size: clamp(0.75rem, 1.2vw, 1rem); border-radius: 6px; padding: 0.1em 0.5em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pscore { font-family: var(--head); font-weight: 600; color: #ffe7a3; font-size: clamp(1rem, 1.8vw, 1.5rem); }
.podium.lit { box-shadow: 0 0 0 3px #ffe08a, 0 0 28px rgba(255, 224, 138, 0.65); transform: translateY(-4px); }
.podium.off { opacity: 0.4; }
.podium.flash { animation: flash 0.9s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(255, 231, 163, 0.9); } 40% { box-shadow: 0 0 0 10px rgba(255, 231, 163, 0.5), 0 0 40px rgba(255, 231, 163, 0.8); } 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); } }

/* Heidi at her lectern */
.studio .heidi-says .bubble { color: var(--ink); }
.studio .heidi-host { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)); }

/* voting, reveals and scores: a smaller board so everything fits on one screen */
.studio .scene-vote .board, .studio .scene-reveal .board { padding: 1.2vh 2.4vw; }
.studio .scene-vote .prompt, .studio .scene-reveal .prompt { font-size: clamp(1.2rem, 2.8vw, 2.4rem); }
.studio .scene-vote .kind, .studio .scene-reveal .kind { margin-bottom: -0.6vh; }
.studio .scene-vote .options, .studio .scene-reveal .options { gap: 1vh 1.2vw; }
.studio .crown-overlay { position: fixed; z-index: 10; }
.studio .crown canvas.crowned { width: 110px !important; height: 110px !important; }
.studio .crown { padding: 1.6rem 3rem; gap: 0.6rem; }
.studio .scene-scores { justify-content: center; }
.studio .standings { gap: 0.6vh; }
.studio .standings .row { padding: 0.3em 1em; font-size: clamp(0.95rem, 1.8vw, 1.45rem); }

.studio .options.many { grid-template-columns: repeat(4, 1fr); }
.studio .standings.two { grid-template-columns: repeat(var(--cols, 2), 1fr); grid-auto-flow: column; grid-template-rows: repeat(var(--rows), auto); width: min(94vw, 1400px); column-gap: 1.4vw; }

/* up to 15 players: podiums share the stage, faces and cards shrink to fit */
.podium { width: min(9.5vw, 128px, calc((94vw - (var(--n, 6) - 1) * 0.8vw) / var(--n, 6))); }
.podiums.crowd { gap: 0.8vw; }
.podiums.crowd .podium canvas { margin-top: -22px; }
.podiums.crowd .plate { font-size: clamp(0.6rem, 0.95vw, 0.85rem); padding: 0.05em 0.3em; }
.studio .options.lots { grid-template-columns: repeat(5, 1fr); }
.studio .options.lots .opt { font-size: clamp(0.8rem, 1.3vw, 1.15rem); padding: 0.4em 0.6em; gap: 0.5em; }
.opt .voters { flex-wrap: wrap; justify-content: flex-end; max-width: 48%; gap: 2px; }
.studio .heidi-host { width: auto !important; height: min(214px, 27vh) !important; }
.demo-btn.on { border-color: var(--emerald); background: #eef6f4; }

/* in a round, the title shrinks to a slim strip and the question gets the room */
.studio .host.ingame { padding-top: 1.2vh; gap: 1.2vh; }
.studio .host.ingame .brand { font-size: clamp(1rem, 1.6vw, 1.4rem); }
.studio .host.ingame .brand small { display: inline; margin-left: 0.8em; font-size: 0.6em; }
.studio .host.ingame header .join-at { font-size: clamp(0.8rem, 1.2vw, 1rem); }
/* bigger questions, sized by the screen's height as well as its width */
.studio .board { max-width: 92vw; }
.studio .board .prompt { font-size: clamp(1.8rem, min(5.2vw, 9.5vh), 4.8rem); max-width: 88vw; }
.studio .scene-vote .board .prompt, .studio .scene-reveal .board .prompt { font-size: clamp(1.4rem, min(3.8vw, 6.6vh), 3.3rem); }
.studio .scene-vote .kind, .studio .scene-reveal .kind, .studio .scene-prompt .kind, .studio .scene-answer .kind { font-size: clamp(0.8rem, min(1.4vw, 2.4vh), 1.2rem); }

/* more than 8 players: a row of faces with their scores, no podiums */
.podiums.seats { gap: 0.7vw; padding-top: 6px; margin-bottom: 0.6vh; }
.podiums.seats .podium { width: auto; background: none; border: 0; box-shadow: none; padding: 0; gap: 0; }
.podiums.seats .podium canvas { margin-top: 0; border-radius: 50%; background: radial-gradient(circle, rgba(31, 110, 112, 0.9) 62%, transparent 64%); }
.podiums.seats .pscore { position: relative; margin-top: -8px; font-size: clamp(0.85rem, 1.4vw, 1.2rem); line-height: 1.3; background: #0f4a4c; border-top: 2px solid #c9a24a; border-radius: 8px; padding: 0 0.5em; }
.podiums.seats .podium.lit { box-shadow: none; transform: translateY(-6px); }
.podiums.seats .podium.lit canvas { box-shadow: 0 0 0 3px #ffe08a, 0 0 20px rgba(255, 224, 138, 0.7); }
.podiums.seats .podium.flash { animation: none; }
.podiums.seats .podium.flash canvas { animation: flash 0.9s ease-out; }
/* a big crowd's cards: one line each, voters' faces overlapping like a hand of cards */
.studio .options.crowd { gap: 0.8vh 1vw; }
.studio .options.crowd .opt { min-height: 0; padding: 0.3em 0.7em; gap: 0.5em; font-size: clamp(0.8rem, min(1.4vw, 2.5vh), 1.2rem); border-radius: 0.7rem; }
.studio .options.crowd .opt .meta { margin-top: 0; }
.studio .options.crowd .voters { flex-wrap: nowrap; max-width: 50%; gap: 0; }
.studio .options.crowd .voters canvas { margin-left: -9px; }
.studio .options.crowd .voters canvas:first-child { margin-left: 0; }
.studio .scene-vote .board .prompt, .studio .scene-reveal .board .prompt { font-size: clamp(1.3rem, min(3.4vw, 6vh), 3rem); }
.studio .scene-vote .kind, .studio .scene-reveal .kind { margin-bottom: 0.4vh; }
.studio .options.crowd { width: min(90vw, 1400px); }

/* the lobby: a big QR code, easy to scan from across the room */
.studio .scene-lobby .lobby { gap: 3.5vw; }
.studio .qr { width: min(42vh, 32vw); height: min(42vh, 32vw); border-radius: 0.4rem; }
/* the address is in the header already, so the card is just the code to scan and the room code */
.studio .lobby-join .join-url { display: none; }
.studio .lobby-join { padding: 1.4vh 1.6vw 1.6vh; gap: 0.6vh; }
.studio .lobby-join .kind { font-size: clamp(0.8rem, min(1.3vw, 2.2vh), 1.15rem); }
.studio .join-code { font-size: clamp(1.8rem, min(3.6vw, 6.4vh), 3.4rem); }

/* --- Would you rather: two big sides --- */
.studio .options.sides { grid-template-columns: 1fr 1fr; width: min(88vw, 1200px); }
.options.sides .opt { min-height: 0; padding: 0.7em 1em; font-size: clamp(1rem, 2.1vw, 1.7rem); font-family: var(--head); }
.opt .side { flex: none; width: 1.8em; height: 1.8em; border-radius: 50%; display: grid; place-items: center; background: var(--emerald); color: #fff; font-family: var(--head); font-weight: 600; }
.options.sides .opt .voters { max-width: 40%; }

/* --- Closest wins: the guesses, then the answer --- */
.opt .num { font-family: var(--head); font-size: 1.5em; font-weight: 600; line-height: 1.1; }
.answer-card { display: flex; align-items: baseline; gap: 0.6em; padding: 0.15em 1.4em; border-radius: 999px; background: #fbf6e6; border: 3px solid var(--gold); color: var(--ink); box-shadow: 0 0 24px rgba(231, 198, 109, 0.5); }
.answer-label { font-size: clamp(0.8rem, 1.4vw, 1.1rem); letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); font-weight: 600; }
.answer-num { font-family: var(--head); font-weight: 600; font-size: clamp(1.6rem, 4.5vh, 3rem); line-height: 1.15; }
.studio .options.guesses .opt { min-height: 0; padding: 0.35em 0.9em; }
.options.guesses .opt .num { font-size: 1.25em; }
.options.guesses .opt .meta { margin-top: 0; }
.studio .options.guesses.lots { grid-template-columns: repeat(6, 1fr); }
.studio .options.guesses.crowd .opt { padding: 0.25em 0.6em; gap: 0.4em; }
