/* VoiceOff — karaoke-screen identity: royal blue stage, outlined white lyrics, magenta wipe, gold for actions */
@font-face {
  font-family: 'Twemoji Country Flags';
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1.10/dist/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}

:root {
  --blue-950: #050C42;
  --blue-900: #081257;
  --blue-800: #0D1A78;
  --blue-700: #15269A;
  --blue-600: #2338B8;
  --blue-400: #5C6FE0;
  --blue-300: #A4B1F5;
  --white: #FFFFFF;
  --ink: #060B3A;
  --magenta: #FF3D9A;
  --gold: #FFD23F;
  --red: #FF4B3E;
  --mint: #4BE3B0;
  --display: 'Dela Gothic One', 'Arial Black', system-ui, sans-serif;
  --body: 'Twemoji Country Flags', 'M PLUS 1', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --outline: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
             2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 0 6px 0 var(--ink);
  --outline-sm: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 0 4px 0 var(--ink);
  --r-lg: 24px;
  --r-md: 16px;
  --wrap: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--blue-800);
  background-image: radial-gradient(120% 60% at 50% -10%, #2a3fd0 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--white);
  font: 500 16px/1.55 var(--body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
#app { overflow-x: clip; }
.muted { color: var(--blue-300); }
.hidden { display: none !important; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--blue-900) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 2px solid var(--blue-700); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-family: var(--display); font-size: 24px; letter-spacing: .5px; text-decoration: none; text-shadow: var(--outline-sm); white-space: nowrap; }
.brand b { color: var(--magenta); font-weight: 400; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; color: var(--blue-300); }
.nav a:hover { color: var(--white); background: var(--blue-700); }
.nav a[aria-current='page'] { color: var(--white); background: var(--blue-700); }
.topbar .icon-btn { margin-left: auto; }
.userchip { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; padding: 4px 14px 4px 4px; border-radius: 999px; border: 2px solid var(--blue-600); background: var(--blue-800); }
.userchip:hover { border-color: var(--blue-400); }
.userchip .sub { display: block; font-size: 12px; font-weight: 600; color: var(--blue-300); line-height: 1.1; }
.icon-btn { background: none; border: 2px solid var(--blue-600); border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.icon-btn:hover { border-color: var(--blue-400); }
@media (max-width: 720px) {
  .topbar .wrap { gap: 10px; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; justify-content: space-around; background: var(--blue-900); border-top: 2px solid var(--blue-700); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); margin: 0; z-index: 30; }
  .nav a { flex: 1; text-align: center; font-size: 14px; }
  body { padding-bottom: 72px; }
  .userchip .sub { display: none; }
  body.in-room { padding-bottom: 0; }
  body.in-room .nav { display: none; }
}

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--blue-600); background: var(--blue-700); font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .08s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--blue-400); }
.btn:active { transform: translateY(2px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-gold { background: var(--gold); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.btn-gold:hover { background: #ffdc66; border-color: var(--ink); }
.btn-gold:active { box-shadow: 0 2px 0 var(--ink); transform: translateY(3px); }
.btn-magenta { background: var(--magenta); color: var(--white); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.btn-magenta:hover { border-color: var(--ink); filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-lg { min-height: 60px; font-size: 19px; padding: 0 30px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--blue-300); }
.input, select.input { width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--r-md); border: 2px solid var(--blue-600); background: var(--blue-950); font-weight: 600; }
.input:focus { border-color: var(--gold); outline: none; }
.code-input { font-family: var(--display); letter-spacing: 6px; text-transform: uppercase; text-align: center; font-size: 22px; }
.error-text { color: #ffb4ad; font-weight: 700; font-size: 14px; min-height: 1.2em; }

/* segmented + chips */
.seg { display: inline-flex; background: var(--blue-950); border: 2px solid var(--blue-600); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; min-height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 800; cursor: pointer; color: var(--blue-300); }
.seg button[aria-pressed='true'] { background: var(--gold); color: var(--ink); }
.seg button:disabled { cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--blue-600); background: var(--blue-900); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: 14px; }
.chip[aria-pressed='true'] { background: var(--white); color: var(--ink); border-color: var(--white); }
.chip:disabled { cursor: default; }

/* ---------- avatars & flags ---------- */
.av { --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; font-size: calc(var(--s) * .55); line-height: 1; overflow: hidden; border: 2px solid var(--ink); position: relative; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.flag { font-family: 'Twemoji Country Flags', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 1.05em; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--blue-700); color: var(--blue-300); }
.badge-gold { background: var(--gold); color: var(--ink); }

/* ---------- karaoke lyric (the signature element) ---------- */
.lyric { position: relative; font-family: var(--display); font-weight: 400; line-height: 1.12; text-shadow: var(--outline); overflow-wrap: anywhere; }
.lyric .w { position: relative; display: inline-block; }
.lyric .fill { position: absolute; inset: 0; color: var(--magenta); clip-path: inset(-30% calc(100% - var(--p, 0) * 100%) -30% -10%); pointer-events: none; }
.lyric-md { font-size: clamp(22px, 3vw, 30px); text-shadow: var(--outline-sm); }
.lyric-md .fill { text-shadow: var(--outline-sm); }
.lyric-xl { font-size: clamp(32px, 5vw, 58px); }
.hero h1 { container-type: inline-size; }
.wordmark { font-size: min(17cqi, 150px); letter-spacing: -1px; line-height: .95; white-space: nowrap; overflow-wrap: normal; }
.wordmark .fill { color: var(--magenta); }
.wordmark.gold .fill { color: var(--gold); }

/* ---------- home ---------- */
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin: 0; }
.tagline { font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; max-width: 30ch; margin: 22px 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.join-inline { display: flex; gap: 8px; margin-top: 18px; max-width: 360px; }
.join-inline .input { min-height: 52px; }
.mic-test { display: flex; align-items: center; gap: 12px; margin-top: 26px; color: var(--blue-300); font-weight: 700; font-size: 15px; }
.mic-test button { background: none; border: 0; color: var(--white); text-decoration: underline; text-underline-offset: 3px; font-weight: 800; cursor: pointer; padding: 0; }
.livestats { display: flex; gap: 22px; margin-top: 22px; font-weight: 700; color: var(--blue-300); font-size: 15px; }
.livestats strong { color: var(--white); font-size: 18px; }
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); display: inline-block; margin-right: 6px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 25%, transparent); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 32px; gap: 32px; } }

/* prompt card (used on home demo + in game) */
.stagecard { border: 3px solid var(--ink); border-radius: var(--r-lg); background: var(--blue-950); overflow: hidden; box-shadow: 0 10px 0 var(--ink); }
.stagecard .art { aspect-ratio: 4 / 3; position: relative; display: grid; place-items: center; overflow: hidden; }
.stagecard .art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.stagecard .art .emoji { font-size: clamp(88px, 14vw, 150px); filter: drop-shadow(0 8px 0 rgba(6, 11, 58, .55)); position: relative; }
.stagecard .art .namecard { position: absolute; left: 16px; bottom: 14px; right: 16px; font-weight: 800; font-size: 13px; color: var(--ink); }
.stagecard .art .cat { position: absolute; top: 14px; left: 14px; background: var(--ink); color: var(--white); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 800; }
.stagecard .body { padding: 18px 20px 22px; border-top: 3px solid var(--ink); background: var(--blue-700); }
.stagecard .lyric { font-size: clamp(26px, 3.6vw, 40px); }
.stagecard .dir { margin: 8px 0 0; font-weight: 700; color: var(--blue-300); font-size: 16px; }
.art-bg-0 { background: #FFB3D6; } .art-bg-1 { background: #9FE7FF; } .art-bg-2 { background: #FFE27A; } .art-bg-3 { background: #B8F5C9; }
.art-bg-4 { background: #D4C2FF; } .art-bg-5 { background: #FFC59E; } .art-bg-6 { background: #A9C8FF; } .art-bg-7 { background: #F7F09A; }
.art::before { content: ''; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .28) 0 10deg, transparent 10deg 20deg); }
.art.has-img::before { display: none; }

/* sections */
.section { padding: 48px 0; }
.section h2 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 22px; text-shadow: var(--outline-sm); line-height: 1.15; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; list-style: none; margin: 0; padding: 0; border: 2px solid var(--blue-600); border-radius: var(--r-lg); overflow: hidden; counter-reset: step; }
.steps li { padding: 22px 22px 26px; border-right: 2px solid var(--blue-600); counter-increment: step; }
.steps li:last-child { border-right: 0; }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 40px; color: var(--gold); text-shadow: var(--outline-sm); display: block; margin-bottom: 6px; }
.steps h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.steps p { margin: 0; color: var(--blue-300); font-weight: 600; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } .steps li:nth-child(2) { border-right: 0; } .steps li:nth-child(-n+2) { border-bottom: 2px solid var(--blue-600); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { border-right: 0; border-bottom: 2px solid var(--blue-600); } .steps li:last-child { border-bottom: 0; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- lists (leaderboard, rooms) ---------- */
.board { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--blue-600); }
.board li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 2px solid var(--blue-700); }
.board .rank { font-family: var(--display); font-size: 22px; text-align: center; color: var(--blue-300); }
.board li:nth-child(1) .rank { color: var(--gold); text-shadow: var(--outline-sm); }
.board .who { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.board .who .name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .num { font-family: var(--display); font-size: 20px; text-align: right; }
.board .num small { display: block; font-family: var(--body); font-size: 12px; color: var(--blue-300); font-weight: 700; }
.board li.me { background: color-mix(in srgb, var(--gold) 12%, transparent); border-radius: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 56px); margin: 0 0 8px; text-shadow: var(--outline); line-height: 1.05; }
.page-head p { margin: 0; color: var(--blue-300); font-weight: 600; max-width: 60ch; }
.empty { padding: 40px 20px; text-align: center; color: var(--blue-300); font-weight: 700; border: 2px dashed var(--blue-600); border-radius: var(--r-lg); }

.roomlist { display: grid; gap: 10px; }
.roomrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 14px 18px; border: 2px solid var(--blue-600); border-radius: var(--r-md); background: var(--blue-900); }
.roomrow .code { font-family: var(--display); font-size: 20px; letter-spacing: 2px; }
.roomrow .meta { min-width: 0; font-weight: 700; }
.roomrow .meta .sub { color: var(--blue-300); font-size: 14px; }
.roomrow .count { font-family: var(--display); font-size: 18px; }
@media (max-width: 600px) { .roomrow { grid-template-columns: 1fr auto; } .roomrow .code { grid-column: 1; } .roomrow .count { grid-row: 1; grid-column: 2; } .roomrow .meta { grid-column: 1 / -1; } .roomrow .btn { grid-column: 1 / -1; } }

/* ---------- forms / auth / profile ---------- */
.narrow { width: min(100% - 32px, 460px); margin: 0 auto; padding: 40px 0 60px; }
.form { display: grid; gap: 18px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; justify-items: center; }
.avatar-grid button { border: 3px solid transparent; background: none; padding: 2px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.avatar-grid button[aria-pressed='true'] { border-color: var(--gold); }
.profile-head { display: flex; gap: 24px; align-items: center; padding: 40px 0 24px; flex-wrap: wrap; }
.profile-head .av { --s: 120px; border-width: 4px; box-shadow: 0 6px 0 var(--ink); }
.profile-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 5vw, 52px); margin: 0; text-shadow: var(--outline); line-height: 1.05; overflow-wrap: anywhere; }
.statline { display: flex; flex-wrap: wrap; gap: 28px; margin: 8px 0 28px; }
.statline div { font-weight: 700; color: var(--blue-300); font-size: 14px; }
.statline strong { display: block; font-family: var(--display); font-weight: 400; color: var(--white); font-size: 30px; line-height: 1.1; }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 12, 66, .75); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(100%, 460px); background: var(--blue-800); border: 3px solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 10px 0 var(--ink); padding: 26px; max-height: 92vh; overflow: auto; }
.modal h2 { font-family: var(--display); font-weight: 400; margin: 0 0 6px; font-size: 28px; text-shadow: var(--outline-sm); }
.toasts { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(92vw, 420px); }
.toast { background: var(--white); color: var(--ink); font-weight: 800; padding: 12px 18px; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); animation: toast-in .2s ease-out; }
.toast.err { background: #FFD9D5; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------- room ---------- */
.room { padding: 20px 0 32px; }
.roombar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.roombar .code-pill { font-family: var(--display); letter-spacing: 3px; font-size: 20px; padding: 6px 16px; border-radius: 999px; border: 2px solid var(--blue-600); background: var(--blue-950); cursor: pointer; }
.roombar .round { font-weight: 800; }
.roombar .spacer { flex: 1; }
.timer { font-family: var(--display); font-size: 26px; min-width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--ink); background: var(--white); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.timer.low { background: var(--red); color: var(--white); }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 960px) {
  .room-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .room-grid aside { order: -1; }
}

.players { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--blue-900); border: 2px solid var(--blue-700); }
.pl .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .sub { font-size: 13px; color: var(--blue-300); font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pl .pts { font-family: var(--display); font-size: 24px; text-shadow: var(--outline-sm); min-width: 28px; text-align: right; }
.pl.live { border-color: var(--magenta); background: color-mix(in srgb, var(--magenta) 16%, var(--blue-900)); }
.pl.off { opacity: .5; }
.pl.empty { border-style: dashed; color: var(--blue-300); background: transparent; font-weight: 700; }
.pl .acts { display: flex; gap: 6px; }
.pl .acts button { background: none; border: 0; color: var(--blue-300); cursor: pointer; font-size: 13px; font-weight: 800; text-decoration: underline; padding: 2px; }
@media (hover: hover) and (min-width: 961px) { .pl .acts { opacity: 0; transition: opacity .15s; } .pl:hover .acts, .pl:focus-within .acts { opacity: 1; } }
@media (max-width: 960px) {
  .players.strip { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px; scrollbar-width: none; }
  .players.strip .pl { grid-template-columns: auto; justify-items: center; text-align: center; min-width: 92px; padding: 10px 8px; gap: 4px; }
  .players.strip .pl .nm { max-width: 80px; font-size: 14px; }
  .players.strip .pl .sub, .players.strip .pl .acts { display: none; }
  .players.strip .pl .pts { font-size: 18px; text-align: center; }
}
@media (max-width: 600px) {
  .players.strip .pl { min-width: 74px; padding: 6px 6px 8px; border-radius: 14px; }
  .players.strip .pl .av { --s: 34px !important; font-size: 19px; }
  .players.strip .pl .nm { font-size: 12px; max-width: 66px; }
  .players.strip .pl .pts { font-size: 16px; }
}

.panel { border: 2px solid var(--blue-600); border-radius: var(--r-lg); padding: 22px; background: var(--blue-900); }
.panel h3 { margin: 0 0 14px; font-size: 17px; font-weight: 800; }
.settings { display: grid; gap: 20px; }
.settings .row { display: grid; gap: 8px; justify-items: start; }
.settings .row select { width: min(100%, 320px); }
.settings .row > span { font-weight: 800; font-size: 14px; }
.stepper { display: inline-flex; align-items: center; gap: 0; border: 2px solid var(--blue-600); border-radius: 999px; background: var(--blue-950); }
.stepper button { width: 44px; height: 42px; border: 0; background: none; font-size: 22px; font-weight: 800; cursor: pointer; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { font-family: var(--display); font-size: 20px; min-width: 44px; text-align: center; }
.lobby-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.lobby-hero .lyric { font-size: clamp(34px, 6vw, 64px); }
.invite { display: flex; gap: 8px; flex-wrap: wrap; }

/* stage */
.stage { display: grid; gap: 18px; }
.stage .stagecard { max-width: 640px; width: 100%; margin: 0 auto; }
.status-line { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; font-size: 19px; text-align: center; min-height: 44px; flex-wrap: wrap; }
.onair { font-family: var(--display); font-size: 15px; letter-spacing: 2px; padding: 6px 12px; border-radius: 8px; border: 2px solid #5a1f1b; color: #7a3a35; background: #2a0d0b; }
.onair.lit { color: var(--white); background: var(--red); border-color: var(--ink); box-shadow: 0 0 24px color-mix(in srgb, var(--red) 70%, transparent); }
.wave { width: 100%; height: 88px; display: block; }
.countdown { font-family: var(--display); font-size: clamp(90px, 18vw, 180px); line-height: 1; text-align: center; text-shadow: var(--outline); color: var(--gold); }
.reactions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.reactions button { font-size: 26px; width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--blue-600); background: var(--blue-900); cursor: pointer; }
.reactions button:active { transform: scale(.92); }
.floaties { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.floaty { position: absolute; bottom: 10%; font-size: 40px; animation: floaty 2.2s ease-out forwards; }
@keyframes floaty { to { transform: translateY(-60vh) rotate(var(--rot, 0deg)); opacity: 0; } }
.actions-center { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* voting + results */
.vote-list { display: grid; gap: 10px; max-width: 640px; margin: 0 auto; width: 100%; }
.vote-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); border: 2px solid var(--blue-600); background: var(--blue-900); }
.vote-row.picked { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--blue-900)); }
.vote-row .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink); background: var(--white); color: var(--ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.play.on { background: var(--magenta); color: var(--white); }
.meter { height: 26px; border-radius: 8px; background: var(--blue-950); border: 2px solid var(--ink); overflow: hidden; position: relative; }
.meter span { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--mint) 0 10px, transparent 10px 13px); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.meter.win span { background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 13px); }
.result-row { display: grid; grid-template-columns: auto 140px 1fr 40px; gap: 12px; align-items: center; }
.result-row .votes { font-family: var(--display); text-align: right; }
@media (max-width: 560px) { .result-row { grid-template-columns: auto 1fr 40px; } .result-row .meter { grid-column: 1 / -1; } }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; max-width: 620px; margin: 10px auto 26px; }
.podium .spot { text-align: center; display: grid; justify-items: center; gap: 8px; }
.podium .spot .av { --s: 72px; border-width: 3px; }
.podium .spot.first .av { --s: 96px; }
.podium .block { width: 100%; border: 3px solid var(--ink); border-bottom: 0; border-radius: 16px 16px 0 0; display: grid; place-items: center; font-family: var(--display); font-size: 34px; text-shadow: var(--outline-sm); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); }
.podium .first .block { height: 150px; background: var(--gold); color: var(--white); }
.podium .second .block { height: 110px; background: var(--blue-400); }
.podium .third .block { height: 80px; background: var(--magenta); }
.podium .nm { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delta-up { color: var(--mint); font-weight: 800; } .delta-down { color: #ffb4ad; font-weight: 800; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 45; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.footer { padding: 40px 0 60px; color: var(--blue-300); font-weight: 600; font-size: 14px; border-top: 2px solid var(--blue-700); margin-top: 40px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }

/* phone layout for the room; kept last so it overrides the base room rules */
@media (max-width: 600px) {
  .room { padding-top: 12px; }
  .roombar { gap: 8px; flex-wrap: nowrap; margin-bottom: 12px; }
  .roombar .code-pill { font-size: 16px; letter-spacing: 2px; padding: 5px 12px; }
  .roombar .round { font-size: 14px; white-space: nowrap; }
  .timer { min-width: 46px; height: 46px; font-size: 20px; }
  .stage { gap: 14px; }
  .stage .stagecard .art { aspect-ratio: 16 / 10; }
  .stage .stagecard .art .emoji { font-size: 84px; }
  .status-line { font-size: 16px; min-height: 36px; }
  .countdown { font-size: 96px; }
  .wave { height: 56px; }
  .roombar .btn-magenta { min-height: 36px; padding: 0 12px; box-shadow: 0 3px 0 var(--ink); }
}