/* ============================================================
   HOT TAKES – shared styles (player, host, stage)
   Minimal: black, electric pink, big type.
   ============================================================ */

@font-face { font-family: 'Yellowtail'; font-display: swap; src: url(/fonts/yellowtail.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Yellowtail'; font-display: swap; src: url(/fonts/yellowtail-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Shrikhand'; font-display: swap; src: url(/fonts/shrikhand.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Shrikhand'; font-display: swap; src: url(/fonts/shrikhand-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Bricolage'; font-display: swap; font-weight: 200 800; src: url(/fonts/bricolage.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Bricolage'; font-display: swap; font-weight: 200 800; src: url(/fonts/bricolage-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --pink: #ff2d95;
  --pink-line: rgba(255, 45, 149, .45);
  --bg: #000;
  --card: #0d0d0d;
  --line: #222;
  --text: #fff;
  --muted: #8c8c8c;
  --script: 'Yellowtail', 'Brush Script MT', cursive;
  --display: 'Shrikhand', 'Bricolage', system-ui, sans-serif;
  --sans: 'Bricolage', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.45, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden; overflow-x: clip;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }

.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(70% 45% at 50% -8%, rgba(255, 45, 149, .17), transparent 70%); }

/* ------------------------------------------------------------------ type */
/* neon headings */
.script {
  font-family: var(--script); font-weight: 400; line-height: 1.02; margin: 0;
  color: #ffd7ec;
  text-shadow: 0 0 2px #fff, 0 0 8px #ff4fa8, 0 0 18px var(--pink), 0 0 42px var(--pink), 0 0 90px rgba(255, 45, 149, .7);
}
.flicker { animation: flicker-on 1.8s linear both, hum 5s 2s ease-in-out infinite; }
@keyframes flicker-on {
  0% { opacity: 0; } 8% { opacity: .9; } 10% { opacity: .1; } 18% { opacity: 1; } 20% { opacity: .25; }
  32% { opacity: 1; } 34% { opacity: .5; } 40%, 100% { opacity: 1; }
}
@keyframes hum {
  0%, 100% { text-shadow: 0 0 2px #fff, 0 0 8px #ff4fa8, 0 0 18px var(--pink), 0 0 42px var(--pink), 0 0 90px rgba(255, 45, 149, .7); }
  50% { text-shadow: 0 0 2px #fff, 0 0 10px #ff4fa8, 0 0 24px var(--pink), 0 0 60px var(--pink), 0 0 130px rgba(255, 45, 149, .85); }
}
.kicker { font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.kicker.pink { color: var(--pink); }
.num { font-family: var(--display); font-weight: 400; line-height: 1; }
.countdown { font-family: var(--display); color: var(--pink); line-height: 1; text-shadow: 0 0 60px rgba(255, 45, 149, .4); }
.countdown.tick { animation: tick 1s var(--ease) both; }
@keyframes tick { 0% { transform: scale(1.9); opacity: 0; } 22% { transform: scale(1); opacity: 1; } 82% { opacity: 1; } 100% { transform: scale(.8); opacity: 0; } }

/* --------------------------------------------------------------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; padding: .95rem 1.7rem; min-height: 54px;
  background: var(--pink); color: #000; font-weight: 800; font-size: 1.1rem;
  transition: transform .15s var(--ease), filter .2s, opacity .2s, box-shadow .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn.block { width: 100%; }
.btn.big { min-height: 64px; font-size: 1.25rem; }
.btn.small { min-height: 40px; padding: .5rem 1.1rem; font-size: .95rem; }
.btn.ghost { background: transparent; color: var(--pink); box-shadow: inset 0 0 0 1.5px var(--pink); }
.btn.light { background: #fff; }
.btn.loading { pointer-events: none; }
.btn.loading > * { opacity: 0; }
.btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid #000; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.arrow-btn {
  width: 104px; height: 104px; border-radius: 50%; border: 0; padding: 0; background: var(--pink); color: #000;
  display: grid; place-items: center; animation: halo 2.4s var(--ease) infinite; transition: transform .2s var(--ease);
}
.arrow-btn svg { width: 44%; height: 44%; animation: nudge 1.6s var(--ease) infinite; }
.arrow-btn:active { transform: scale(.94); }
.arrow-btn.launch { animation: launch .5s cubic-bezier(.6, -0.3, .7, 1) forwards; }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 149, .45); } 70%, 100% { box-shadow: 0 0 0 22px rgba(255, 45, 149, 0); } }
@keyframes nudge { 0%, 100% { transform: translateX(-5%); } 50% { transform: translateX(9%); } }
@keyframes launch { 30% { transform: scale(.9); } 100% { transform: translateX(60vw); opacity: 0; } }

/* ---------------------------------------------------------------- inputs */
.take-input {
  display: block; width: 100%; min-height: 150px; resize: none; background: #fff; color: #000; border: 0; border-radius: 18px;
  padding: 1.05rem 1.15rem; font-size: 1.2rem; font-weight: 600; line-height: 1.4; transition: box-shadow .2s;
}
.take-input::placeholder { color: #9a9a9a; font-weight: 500; }
.take-input:focus { outline: none; box-shadow: 0 0 0 3px var(--pink); }
.text-input { width: 100%; background: #fff; color: #000; border: 0; border-radius: 12px; padding: .8rem 1rem; font-size: 1.05rem; font-weight: 600; }
.text-input:focus { outline: none; box-shadow: 0 0 0 3px var(--pink); }
.char-count { font-size: .85rem; color: var(--muted); text-align: right; margin-top: .4rem; font-variant-numeric: tabular-nums; }
.char-count.warn { color: var(--pink); }

/* ------------------------------------------------------------- generics */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.bump { animation: bump .4s var(--spring); }
.rise { animation: rise .7s var(--ease) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .4s; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; z-index: 100; pointer-events: none; }
.toast { background: #fff; color: #000; font-weight: 700; padding: .7rem 1.1rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); animation: rise .3s var(--ease); max-width: min(92vw, 520px); text-align: center; }
.toast.out { animation: fade .25s reverse forwards; }
.conn {
  position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -160%); z-index: 101;
  background: #fff; color: #000; font-weight: 700; font-size: .85rem; padding: .45rem .9rem; border-radius: 999px;
  transition: transform .35s var(--ease); display: flex; gap: .5rem; align-items: center;
}
.conn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); animation: blink 1s infinite; }
body.offline .conn { transform: translate(-50%, 0); }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .75); display: grid; place-items: center; z-index: 120; padding: 20px; animation: fade .2s; }
.modal { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1.5rem; text-align: center; animation: rise .35s var(--ease); }
.modal h3 { font-size: 1.35rem; font-weight: 800; margin: 0 0 .4rem; }
.modal p { color: var(--muted); margin: 0 0 1.3rem; line-height: 1.5; }
.modal .row { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

.loader { display: flex; gap: 8px; }
.loader i { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); animation: blink 1.2s infinite; }
.loader i:nth-child(2) { animation-delay: .15s; } .loader i:nth-child(3) { animation-delay: .3s; }

/* ============================================================
   PLAYER (phones)
   ============================================================ */
.player main {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
}
.player .screen { display: none; width: 100%; max-width: 520px; flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; }
.player .screen.active { display: flex; animation: screen-in .55s var(--ease) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.p-title { font-size: clamp(4.6rem, 22vw, 8rem); white-space: nowrap; }
.p-h { font-size: clamp(2.7rem, 12vw, 4.1rem); }
.p-sub { color: var(--muted); font-size: 1.02rem; line-height: 1.5; margin: 0; }
.p-sub b { color: #fff; }
.note { color: var(--muted); font-size: .85rem; margin: 0; line-height: 1.45; }
.join { display: grid; justify-items: center; gap: 1rem; margin-top: 1.4rem; }
.p-form { width: 100%; display: grid; gap: .9rem; text-align: left; }
.card { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.3rem; text-align: left; }
.card.pink { border-color: var(--pink-line); }
.card .label { display: block; margin-bottom: .6rem; }
.take-quote { margin: 0; font-size: 1.22rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-line; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; }
.meta { color: var(--muted); font-size: .95rem; }
.meta b { color: #fff; font-family: var(--display); font-weight: 400; margin-right: .2em; }
.player .countdown { font-size: clamp(7rem, 38vw, 11rem); min-height: 1em; }

.vote-head { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
.p-take {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1.6rem 1.3rem;
  font-size: clamp(1.35rem, 6vw, 1.75rem); font-weight: 800; line-height: 1.25; text-align: center; overflow-wrap: anywhere; white-space: pre-line;
}
.p-take.enter { animation: card-in .6s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.yours { display: block; margin-top: .9rem; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--pink); font-weight: 700; }
.vote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.vote-btn { min-height: 96px; border-radius: 20px; font-size: 1.25rem; }
.vote-btn.chosen { box-shadow: 0 0 0 3px #000, 0 0 0 5px #fff; }
.vote-btn.other { opacity: .3; }

/* leaderboard on phones */
.my-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 1rem; }
.stat-box { background: #000; border: 1px solid var(--line); border-radius: 14px; padding: .75rem .4rem; text-align: center; }
.stat-box .num { display: block; font-size: 2rem; }
.stat-box .num.pink { color: var(--pink); }
.stat-box span { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.board { width: 100%; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.board li {
  list-style: none; display: grid; grid-template-columns: 2.1rem 1fr auto; gap: .7rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .8rem .9rem; animation: rise .5s var(--ease) both;
}
.board .rk { font-family: var(--display); color: var(--pink); font-size: 1.3rem; text-align: center; }
.board .tx { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; font-size: .98rem; }
.board .ct { display: grid; justify-items: end; gap: 2px; font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.board .ct b { color: #fff; font-weight: 800; }
.board .ct .a b { color: var(--pink); }
.board li.me { border-color: var(--pink); background: linear-gradient(90deg, rgba(255, 45, 149, .13), var(--card) 75%); }
.you-tag { display: inline-block; margin-left: .45rem; font-size: .62rem; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; background: var(--pink); color: #000; padding: .15rem .4rem; border-radius: 5px; vertical-align: 2px; }

/* ============================================================
   HOST (admin phone)
   ============================================================ */
.host main { position: relative; z-index: 1; width: min(640px, 100%); margin: 0 auto; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); }
.h-top {
  position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: rgba(0, 0, 0, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; gap: 12px; border-bottom: 1px solid var(--line);
}
.h-brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.h-brand .script { font-size: 2.3rem; }
.role { font-weight: 800; letter-spacing: .2em; font-size: .7rem; text-transform: uppercase; color: #000; background: var(--pink); padding: .3rem .6rem; border-radius: 6px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stepper span { text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .5rem .2rem; border-radius: 999px; background: var(--card); color: #555; border: 1px solid var(--line); transition: all .3s var(--ease); }
.stepper span.done { color: #bbb; }
.stepper span.now { background: var(--pink); color: #000; border-color: var(--pink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .8rem .6rem; text-align: center; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.9rem; line-height: 1.1; }
.stat span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem; margin-bottom: 12px; }
.panel h2 { font-family: var(--script); font-weight: 400; color: var(--pink); font-size: 2.1rem; margin: 0 0 .5rem; line-height: 1; }
.panel h3 { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; font-weight: 700; }
.panel p { color: var(--muted); line-height: 1.5; margin: 0 0 1rem; }
.stack { display: grid; gap: 10px; }
.inline { display: flex; gap: 10px; align-items: center; }
.inline > input { flex: 1; min-width: 0; }
.links { display: grid; gap: 8px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #000; border: 1px solid var(--line); padding: .6rem .8rem; border-radius: 12px; }
.link-row code { font-size: .88rem; color: #fff; overflow-wrap: anywhere; }
.link-row small { display: block; color: var(--muted); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.take-list { display: grid; gap: 8px; margin: 0; padding: 0; }
.take-item { list-style: none; display: grid; grid-template-columns: auto 1fr; gap: .5rem .8rem; background: #000; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; animation: rise .35s var(--ease) both; }
.take-item .num { color: var(--pink); min-width: 1.6em; text-align: center; font-size: 1.1rem; line-height: 1.35; }
.take-item .txt { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-line; }
.take-item .meta { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.take-item .tally { font-size: .84rem; color: var(--muted); margin-right: auto; }
.take-item.hidden-take { opacity: .45; }
.take-item.hidden-take .txt { text-decoration: line-through; }
.take-item.live { border-color: var(--pink); }
.chip { border: 1px solid var(--line); background: #111; color: #ddd; border-radius: 999px; padding: .38rem .8rem; font-size: .82rem; font-weight: 700; }
.chip.pink { background: var(--pink); color: #000; border-color: var(--pink); }
.chip.danger { color: #ff7ab8; }
.chip:active { transform: scale(.95); }
.live-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #000; background: var(--pink); padding: .22rem .5rem; border-radius: 6px; }
.live-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #000; animation: blink 1.2s infinite; }
.now-take { font-size: 1.25rem; font-weight: 800; line-height: 1.3; margin: .5rem 0 1rem; overflow-wrap: anywhere; white-space: pre-line; }
.split { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; background: #1c1c1c; margin: .3rem 0 .5rem; }
.split .a { background: var(--pink); border-radius: 999px; transition: flex-grow .6s var(--ease); }
.split .d { background: #fff; border-radius: 999px; transition: flex-grow .6s var(--ease); }
.split-legend { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; color: var(--muted); }
.split-legend .a { color: var(--pink); }
.nav-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 1rem; }
.h-vote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h-vote .btn.chosen { box-shadow: 0 0 0 3px #000, 0 0 0 5px #fff; }
.h-vote .btn.other { opacity: .3; }
.danger-zone { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.pin-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; text-align: center; position: relative; z-index: 1; padding: 24px; }
.pin-screen form { display: grid; gap: 14px; width: min(340px, 100%); justify-items: center; }
.pin-input { text-align: center; font-family: var(--display); font-size: 2.2rem; letter-spacing: .3em; padding: .6rem 1rem; border-radius: 16px; width: 100%; }
.empty { text-align: center; color: var(--muted); padding: 1rem; border: 1px dashed var(--line); border-radius: 14px; }
@media (min-width: 900px) {
  .host main { width: min(1100px, 100%); }
  .host .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
}

/* ============================================================
   STAGE (iPad / TV)
   ============================================================ */
.stage { overflow: hidden; height: 100vh; height: 100dvh; }
html:has(> body.stage) { overflow: hidden; height: 100%; }
.stage main { position: relative; z-index: 1; height: 100%; overflow: hidden; }
.stage .scene { position: absolute; inset: 0; display: none; padding: clamp(28px, 5vmin, 72px); overflow: hidden; }
.stage .scene.active { display: flex; animation: fade .7s var(--ease) both; }
.stage-wait { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; }
/* marquee bulbs around the screen */
.bulbs { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.bulb {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #5a0c33; animation: bulb 1.2s steps(1) infinite;
}
@keyframes bulb {
  0% { background: #fff0f7; box-shadow: 0 0 6px #fff, 0 0 14px var(--pink), 0 0 26px var(--pink); }
  33.33% { background: #6b0f3d; box-shadow: none; }
}
.stage.party .bulb { animation-duration: .45s; }
.fs-btn { position: fixed; top: 16px; right: 16px; z-index: 50; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: .45rem .75rem; font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }

/* lobby */
.lobby { align-items: center; justify-content: center; gap: clamp(32px, 8vw, 120px); }
.lobby-left { display: grid; gap: clamp(12px, 2.6vh, 30px); justify-items: start; min-width: 0; }
.s-title { font-size: clamp(4.4rem, min(13vw, 22vh), 12rem); white-space: nowrap; padding-right: .15em; }
.s-tag { font-size: clamp(1.05rem, 2.3vmin, 1.6rem); color: var(--muted); margin: 0; }
.count-line { display: flex; align-items: baseline; gap: .7rem; }
.count-line .num { font-size: clamp(2.6rem, 7vmin, 4.6rem); color: #fff; display: inline-block; }
.count-line .lbl { color: var(--muted); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: clamp(.8rem, 1.6vmin, 1rem); }
.qr { display: grid; justify-items: center; gap: 14px; min-width: 0; }
.qr-box { background: #fff; border-radius: 20px; padding: clamp(12px, 2vmin, 18px); }
.qr-box img { display: block; width: clamp(180px, 32vmin, 340px); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.qr .kicker { color: #fff; }
.join-url { font-weight: 700; color: var(--pink); font-size: clamp(.95rem, 2vmin, 1.25rem); text-align: center; overflow-wrap: anywhere; }

/* collecting */
.collect { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(14px, 3.5vh, 40px); }
.s-prompt { font-size: clamp(3.2rem, min(9vw, 14vh), 8.5rem); max-width: 15ch; }
.tally-big { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.tally-big .num { font-size: clamp(5rem, 20vmin, 14rem); color: #fff; display: inline-block; }
.tally-big .lbl { text-align: left; font-weight: 700; font-size: clamp(1.1rem, 3vmin, 2rem); line-height: 1.2; }
.tally-big .lbl small { display: block; color: var(--muted); font-weight: 500; font-size: .6em; margin-top: .4em; }
.corner-join { position: absolute; right: clamp(22px, 3vmin, 40px); bottom: clamp(22px, 3vmin, 40px); display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; font-size: clamp(.8rem, 1.5vmin, .95rem); text-align: left; }
.corner-join img { width: clamp(64px, 10vmin, 96px); background: #fff; border-radius: 8px; padding: 5px; }
.corner-join b { display: block; color: #fff; }

/* intro */
.intro { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2vh; }
.intro .locked { font-size: clamp(3.4rem, min(11vw, 17vh), 10rem); animation: flicker-on 1.8s linear both, hum 5s 2s ease-in-out infinite; }
.intro .sub { font-weight: 700; font-size: clamp(1.1rem, 2.8vmin, 1.9rem); color: var(--muted); margin: 1.5vh 0 0; animation: rise .8s .2s var(--ease) both; }
.intro .countdown { font-size: clamp(10rem, 45vmin, 30rem); }

/* reveal */
.reveal { flex-direction: column; gap: clamp(14px, 3vh, 34px); }
.reveal-top { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.take-no { font-family: var(--display); color: var(--pink); font-size: clamp(1.3rem, 3.2vmin, 2.2rem); white-space: nowrap; }
.take-no.in { animation: rise .6s var(--ease) both; }
.progress { flex: 1; height: 4px; background: #1c1c1c; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--pink); transition: width .8s var(--ease); }
.card-zone { flex: 1; position: relative; display: grid; place-items: center; min-height: 0; }
.take-card { grid-area: 1 / 1; width: min(1200px, 100%); text-align: center; }
.take-card.enter { animation: take-enter .9s var(--ease) both; }
.take-card.leave { animation: take-leave .45s cubic-bezier(.7, 0, .84, 0) forwards; }
@keyframes take-enter { from { opacity: 0; transform: translateX(8vw); } to { opacity: 1; transform: none; } }
@keyframes take-leave { to { opacity: 0; transform: translateX(-8vw); } }
.take-text { font-weight: 800; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; white-space: pre-line; }
.take-text .w { display: inline-block; opacity: 0; transform: translateY(.35em); animation: word-in .5s var(--ease) forwards; }
@keyframes word-in { to { opacity: 1; transform: none; } }
.meter { width: min(1200px, 100%); margin: 0 auto; }
.meter-labels { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.lab { display: grid; gap: 4px; }
.lab.dis { justify-items: end; text-align: right; }
.lab .pct { font-family: var(--display); font-size: clamp(2rem, 6vmin, 4rem); line-height: 1; }
.lab.agree .pct { color: var(--pink); }
.lab .name { font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: clamp(.72rem, 1.7vmin, 1rem); color: var(--muted); }
.lab .name b { color: #fff; }
.track { display: flex; gap: 3px; height: clamp(14px, 2.4vmin, 22px); border-radius: 999px; overflow: hidden; background: #1c1c1c; }
.track .fa { flex: 1 1 0; background: var(--pink); border-radius: 999px; transition: flex-grow .8s var(--ease); }
.track .fd { flex: 1 1 0; background: #fff; border-radius: 999px; transition: flex-grow .8s var(--ease); }
.track.empty .fa, .track.empty .fd { opacity: .12; }
.total-votes { text-align: center; margin-top: 12px; font-weight: 600; color: var(--muted); font-size: clamp(.85rem, 1.9vmin, 1.1rem); display: block; }

/* podium */
.summary { flex-direction: column; gap: clamp(10px, 2.2vh, 24px); }
.sum-head { text-align: center; }
.sum-title { font-size: clamp(3rem, min(8vw, 11vh), 7rem); animation: flicker-on 1.8s linear both, hum 5s 2s ease-in-out infinite; }
.podium { flex: 1; min-height: 0; width: min(1200px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 28px); align-items: end; }
.place { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 0; gap: clamp(10px, 1.8vh, 20px); }
.place .info { text-align: center; animation: rise .8s var(--ease) both; min-height: 0; }
.place .ptext { font-weight: 800; line-height: 1.2; font-size: clamp(1rem, 3.1vmin, 2.2rem); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.place .pcount { margin-top: .6em; font-weight: 600; color: var(--muted); font-size: clamp(.78rem, 2vmin, 1.25rem); }
.place .pcount b { color: #fff; font-weight: 800; }
.place .pcount .a b { color: var(--pink); }
.block { border-radius: 16px 16px 4px 4px; display: grid; justify-items: center; align-content: start; padding-top: clamp(10px, 2vh, 22px); transform-origin: bottom; animation: grow 1s var(--ease) both; }
.block .num { font-size: clamp(2.6rem, 8vmin, 6rem); }
.place.p1 .block { height: clamp(110px, 36vh, 380px); background: var(--pink); color: #000; }
.place.p2 .block { height: clamp(80px, 25vh, 265px); background: #fff; color: #000; }
.place.p3 .block { height: clamp(58px, 16vh, 175px); background: #262626; color: #fff; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.rest { width: min(1200px, 100%); margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; max-height: 22vh; overflow-y: auto; scrollbar-width: none; }
.rest::-webkit-scrollbar { display: none; }
.rest li { list-style: none; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; font-size: clamp(.8rem, 1.6vmin, 1rem); animation: rise .5s var(--ease) both; }
.rest .rk { font-family: var(--display); color: var(--pink); }
.rest .tx { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rest .ct { color: var(--muted); font-weight: 600; white-space: nowrap; }
.rest .ct b { color: #fff; }

/* stage: portrait tablets and phones */
@media (orientation: portrait), (max-width: 760px) {
  .lobby { flex-direction: column; gap: 5vh; }
  .lobby-left { justify-items: center; text-align: center; }
  .s-title { font-size: clamp(4.4rem, min(19vw, 18vh), 12rem); }
  .corner-join { left: 50%; right: auto; transform: translateX(-50%); }
}
@media (max-width: 560px) {
  .lab .name { letter-spacing: .08em; }
  .place .pcount { font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .take-text .w { opacity: 1; transform: none; }
}

/* ============================================================
   DEBUG (/debug only)
   ============================================================ */
.dbg-btn {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 115;
  background: #000; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: .45rem .75rem;
  font: 700 .75rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.dbg-btn:active { color: #fff; border-color: #444; }
body.debug .fs-btn { right: 84px; }
body.debug .h-brand { padding-right: 64px; }
.dbg-modal { width: min(560px, 100%); }
.dbg-text {
  width: 100%; height: min(50vh, 420px); margin: 0 0 1rem; padding: .7rem; resize: none;
  background: #000; color: #ccc; border: 1px solid var(--line); border-radius: 12px;
  font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; white-space: pre;
}
