/* Pass The Mic — "game show" design: warm stage lighting, poster type, player avatars */
:root {
  --night: #120a07;
  --stage: #1d110c;
  --card: rgba(255, 236, 214, .06);
  --card-2: rgba(255, 236, 214, .1);
  --line: rgba(255, 236, 214, .12);
  --cream: #fff4e6;
  --dim: rgba(255, 244, 230, .6);
  --orange: #ff6b1a;
  --gold: #ffc23d;
  --green: #19e68c;
  --red: #ff2e63;
  --cyan: #33d6ff;
  --violet: #a37bff;
  --poster: Anton, Impact, "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--night); color: var(--cream); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--cream); }
.hidden { display: none !important; }
.muted { color: var(--dim); }
.small { font-size: 14px; }
.narrow { max-width: 300px; margin-left: auto; margin-right: auto; }
.center-text { text-align: center; }

/* stage lighting */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
    radial-gradient(120% 55% at 50% -12%, rgba(255, 107, 26, .32), transparent 60%),
    radial-gradient(70% 45% at 100% 105%, rgba(255, 46, 99, .16), transparent 60%),
    radial-gradient(60% 40% at -10% 80%, rgba(255, 194, 61, .08), transparent 60%),
    linear-gradient(180deg, #1d110c, #120a07 70%); }
.bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 244, 230, .07) 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(180deg, #000, transparent 55%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

html, body { overflow-x: clip; }
.screen > *, .row > *, .col > * { min-width: 0; }
.who-sm, .np b, .kl, h2 { overflow-wrap: anywhere; }
.who, .go { width: 100%; max-width: 100%; overflow-wrap: normal; }
#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.screen { display: none; flex: 1; flex-direction: column; gap: 14px; animation: enter .35s ease-out; }
.screen.active { display: flex; }
.screen.center { justify-content: center; align-items: center; text-align: center; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
h2 { font: 400 34px/1 var(--poster); letter-spacing: .01em; margin-top: 4px; }
.kicker { font: 800 11.5px var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.status { color: var(--dim); font-size: 14px; min-height: 18px; }
.row { display: flex; gap: 8px; width: 100%; }
.col { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.push { margin-top: auto; }

/* buttons & inputs */
.btn { border: 0; border-radius: 16px; padding: 14px 18px; font-weight: 800; transition: transform .1s, filter .2s, opacity .2s; }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.big { width: 100%; padding: 17px 14px; font-size: clamp(14.5px, 4.4vw, 17px); border-radius: 18px; }
.btn.hot { color: #1a0d06; background: linear-gradient(180deg, #ffc23d, #ff6b1a); box-shadow: 0 5px 0 #b8430a, 0 16px 28px -12px rgba(255, 107, 26, .7); letter-spacing: .02em; }
.btn.hot:active { box-shadow: 0 2px 0 #b8430a; transform: translateY(3px); }
.btn.hot:disabled { box-shadow: none; }
.btn.cream { background: var(--cream); color: #1a0d06; }
.btn.ghost { color: var(--cream); background: var(--card); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--card-2); }
.btn.pass { flex: 1; background: var(--green); color: #052b1b; font-size: 18px; padding: 16px; box-shadow: 0 5px 0 #0b8f55; }
.btn.fail { flex: 1; background: var(--red); color: #fff; font-size: 18px; padding: 16px; box-shadow: 0 5px 0 #a10c38; }
.btn.danger { color: var(--red); border-color: rgba(255, 46, 99, .35); }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; }
.chip:hover { background: var(--card-2); }
input, select { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; outline: none; min-width: 0; }
input { flex: 1; font-size: 16px; }
input:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 26, .2); }
select option { background: #241611; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--dim); }
.opts { display: flex; gap: 10px; }
.opts label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--dim); font-weight: 700; letter-spacing: .04em; }
.warn { background: rgba(255, 194, 61, .1); border: 1px solid rgba(255, 194, 61, .35); color: var(--gold); padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.mic-test { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 13px; font-weight: 600; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-in { text-transform: uppercase; letter-spacing: .3em; font: 400 22px var(--poster); }
.topbar { display: flex; align-items: center; min-height: 34px; }
.back { border: 0; background: none; color: var(--dim); font-weight: 700; font-size: 15px; padding: 6px 0; }
.back:hover { color: var(--cream); }

/* avatars: each player keeps a colour + face for the whole game */
.av { --c: var(--orange); position: relative; width: 52px; height: 52px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-size: 26px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 65%, white), var(--c));
  box-shadow: 0 0 0 3px var(--night), 0 0 0 5px color-mix(in srgb, var(--c) 55%, transparent); }
.av.xs { width: 26px; height: 26px; font-size: 14px; box-shadow: 0 0 0 2px var(--night), 0 0 0 3px color-mix(in srgb, var(--c) 55%, transparent); }
.av.sm { width: 34px; height: 34px; font-size: 18px; box-shadow: 0 0 0 2px var(--night), 0 0 0 3.5px color-mix(in srgb, var(--c) 55%, transparent); }
.av.lg { width: 64px; height: 64px; font-size: 32px; }
.av.xl { width: 104px; height: 104px; font-size: 54px; }
.c1 { --c: #ff6b1a; } .c2 { --c: #19e68c; } .c3 { --c: #ff2e63; } .c4 { --c: #33d6ff; } .c5 { --c: #a37bff; } .c6 { --c: #ffc23d; }
.av.ready::after { content: '✓'; position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #052b1b; font: 800 13px/22px var(--body); text-align: center; box-shadow: 0 0 0 3px var(--night); }

/* home */
.hero { display: flex; flex-direction: column; gap: 22px; justify-content: center; flex: 1; padding: 14px 0; }
.logo-wrap { position: relative; }
.logo { font: 400 clamp(84px, 26vw, 128px)/.86 var(--poster); letter-spacing: -.005em; position: relative; z-index: 1; }
.logo span { background: linear-gradient(180deg, #ffc23d, #ff6b1a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-disc { position: absolute; right: 0; top: -6px; width: clamp(120px, 36vw, 180px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, transparent 0 30%, rgba(255,255,255,.05) 30.5% 31%, transparent 31.5%), repeating-radial-gradient(circle, #0d0d0d 0 2px, #1b1b1b 2px 3.5px);
  box-shadow: 0 0 0 5px #050505, 0 30px 60px -10px rgba(0,0,0,.9); display: grid; place-items: center; animation: spin 4s linear infinite; opacity: .9; }
.logo-disc::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 10%, rgba(255,255,255,.1) 14%, transparent 20% 60%, rgba(255,255,255,.07) 64%, transparent 70%); }
.logo-disc span { width: 32%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(160deg, #ffc23d, #ff6b1a); display: grid; place-items: center; font-size: clamp(22px, 7vw, 34px); }
.tag { font-size: 18px; line-height: 1.5; color: var(--dim); max-width: 420px; }
.tag b { color: var(--cream); }
.how { list-style: none; display: grid; gap: 8px; }
.how li { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: 14.5px; color: var(--dim); }
.how li span { font-size: 22px; }
.how b { color: var(--cream); }

/* install */
.install { align-self: center; border: 1px dashed rgba(255, 194, 61, .5); background: rgba(255, 194, 61, .08); color: var(--gold); font-weight: 800; font-size: 14px; border-radius: 999px; padding: 10px 18px; }
.install-tip { text-align: center; color: var(--dim); font-size: 13.5px; }
.install-tip b { color: var(--cream); }

/* crowd of avatars (players + lobby) */
.crowd { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 16px 8px; }
.crowd li .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crowd li { min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; text-align: center; animation: popin .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.crowd li .tag { font-size: 10.5px; font-weight: 700; color: var(--dim); margin-top: -3px; letter-spacing: .02em; }
.crowd li .tag.ok { color: var(--green); }
.crowd li .rm { position: absolute; top: -4px; right: calc(50% - 40px); width: 22px; height: 22px; border-radius: 50%; border: 0; background: #3a2a22; color: var(--cream); font-size: 11px; box-shadow: 0 0 0 2px var(--night); }
.crowd li.empty .av { background: transparent; border: 2px dashed var(--line); box-shadow: none; font-size: 22px; color: var(--dim); }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }

/* lobby ticket */
.ticket { position: relative; border-radius: 22px; padding: 16px 18px 14px; text-align: center; background: linear-gradient(160deg, #ffc23d, #ff6b1a 72%); color: #1a0d06; box-shadow: 0 20px 40px -18px rgba(255, 107, 26, .7); }
.ticket::before, .ticket::after { content: ''; position: absolute; top: 64%; width: 22px; height: 22px; border-radius: 50%; background: var(--night); }
.ticket::before { left: -11px; } .ticket::after { right: -11px; }
.ticket .lbl { font: 800 11px var(--body); letter-spacing: .2em; opacity: .7; }
.ticket .code { font: 400 clamp(64px, 20vw, 84px)/1 var(--poster); letter-spacing: .08em; margin: 4px 0 10px; }
.ticket .perf { border-top: 2px dashed rgba(26, 13, 6, .35); margin: 0 -6px 8px; }
.ticket .inv { border: 0; background: none; color: #1a0d06; font: 800 15px var(--body); padding: 4px 8px; }
#readyUp.on { border-color: rgba(25, 230, 140, .5); color: var(--green); }

/* song packs */
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pack { position: relative; overflow: hidden; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 132px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); transition: transform .12s, border-color .2s; }
.pack::before { content: ''; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%; background: repeating-radial-gradient(circle, #0d0d0d 0 2px, #1b1b1b 2px 3.5px); opacity: .55; }
.pack:hover { border-color: var(--orange); }
.pack:active { transform: scale(.97); }
.pack > * { position: relative; }
.pack .pe { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.pack b { font: 400 19px/1.05 var(--poster); letter-spacing: .02em; }
.pack .pb { font-size: 12.5px; color: var(--dim); line-height: 1.3; }
.pack .pt { margin-top: auto; padding-top: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 6px; }
.pack .live { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite; }
.pack[data-pack="mix"] { grid-column: 1 / -1; min-height: 0; background: linear-gradient(120deg, #ffc23d, #ff6b1a); color: #1a0d06; border: 0; box-shadow: 0 16px 30px -16px rgba(255, 107, 26, .8); }
.pack[data-pack="mix"] .pb, .pack[data-pack="mix"] .pt { color: rgba(26, 13, 6, .7); }
.pack[data-pack="mix"] b { font-size: 26px; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .4; } }

/* search results + playlist tray */
.results { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.res { min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px 8px 8px; }
.res img, .res .noart { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; background: var(--card-2); display: grid; place-items: center; }
.res .ri { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res .ri b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res .ri span { color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res .chip { flex: none; }
.res .add.on { color: var(--green); border-color: rgba(25, 230, 140, .5); }
.tray { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); margin-top: auto; background: #2a1a12; border: 1px solid rgba(255, 107, 26, .5); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); z-index: 5; }
.tray-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tray-top b { font-size: 14.5px; line-height: 1.25; min-width: 0; }
.tray-top .btn { flex: none; white-space: nowrap; padding: 12px 16px; }
.tray-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tchip { flex: none; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 11px; }
.tchip button { border: 0; background: var(--card-2); width: 20px; height: 20px; border-radius: 50%; font-size: 10px; }
@media (max-width: 420px) {
  .res { gap: 8px; padding: 7px 8px 7px 7px; }
  .res .chip { padding: 8px 10px; font-size: 12.5px; }
  .res img, .res .noart { width: 42px; height: 42px; }
}
@media (max-width: 350px) { .res .chip .lbl { display: none; } }

/* in-game scoreboard */
.board { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.board-top { display: flex; align-items: center; gap: 10px; }
.board .songname { flex: 1; min-width: 0; font-size: 11.5px; color: var(--dim); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 7px 12px; font-size: 13px; font-weight: 800; }
.board .pl { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 2px; }
.board .pc { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; color: var(--dim); max-width: 62px; }
.board .pc b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62px; }
.board .pc.cur { color: var(--cream); }
.board .pc.cur .av { animation: bob 1.2s ease-in-out infinite; box-shadow: 0 0 0 2px var(--night), 0 0 0 4px var(--gold), 0 0 16px rgba(255, 194, 61, .6); }
.board .pc.out { opacity: .35; filter: grayscale(1); }
.board .pc.me b::after { content: ' •'; color: var(--gold); }
.board .hearts { font-size: 8px; letter-spacing: -1px; }
@keyframes bob { 50% { transform: translateY(-3px); } }

/* YouTube player as a little "LIVE" TV; parked off-screen when no slot is visible */
#ytwrap { position: absolute; z-index: 6; border-radius: 16px; overflow: hidden; background: #000; border: 3px solid #3a2a22; box-shadow: 0 16px 30px rgba(0, 0, 0, .6); }
#ytwrap.parked { position: fixed; left: -10000px; top: 0; width: 320px; height: 200px; }
#ytwrap iframe { width: 100%; height: 100%; display: block; }
#ytwrap .live-tag { position: absolute; top: 8px; left: 8px; font: 800 9px var(--body); letter-spacing: .12em; color: #fff; background: var(--red); border-radius: 4px; padding: 2px 6px; pointer-events: none; }
.tv-slot { width: 200px; height: 200px; flex: none; border-radius: 16px; background: #000; }
.tv-slot.wide { width: 100%; height: auto; aspect-ratio: 16 / 9; min-height: 200px; max-height: 240px; }

/* handoff */
.next-song { font-weight: 800; font-size: 14px; color: var(--cream); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; max-width: 100%; }
.next-song:empty { display: none; }
.hand-av { margin: 8px 0 2px; }
.hand-av .av { animation: popin .6s cubic-bezier(.3, 1.6, .5, 1); }
.who { font: 400 clamp(56px, 17vw, 88px)/.95 var(--poster); letter-spacing: .01em; background: linear-gradient(180deg, #fff4e6 30%, #ffc23d); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 2px 0; text-transform: uppercase; }
.countin { font: 400 28px var(--poster); color: var(--gold); letter-spacing: .04em; }
#s-handoff .btn.big { max-width: 360px; margin-top: 8px; }
#s-handoff .skip-song { max-width: 360px; width: 100%; font-weight: 700; font-size: 14px; }

/* listen: record deck */
.deck { position: relative; height: 210px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.deck .tv-slot { position: relative; z-index: 2; margin-right: 86px; }
.vinyl { position: absolute; left: 50%; margin-left: -46px; width: 196px; height: 196px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, transparent 0 33%, rgba(255,255,255,.05) 33.5% 34%, transparent 34.5%), repeating-radial-gradient(circle, #0d0d0d 0 2px, #1b1b1b 2px 3.5px);
  box-shadow: 0 0 0 5px #050505, 0 30px 50px -10px rgba(0,0,0,.9); display: grid; place-items: center; animation: spin 2.4s linear infinite; }
.vinyl::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 10%, rgba(255,255,255,.12) 14%, transparent 20% 60%, rgba(255,255,255,.08) 64%, transparent 70%); }
.vinyl img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--orange); background: var(--orange); }
.vinyl .hole { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--night); z-index: 2; }
.vinyl.stopped { animation: halt 1.3s cubic-bezier(.15, .75, .3, 1) forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes halt { from { transform: rotate(0); } to { transform: rotate(160deg); filter: brightness(.45) saturate(.6); } }
.arm { position: absolute; left: 50%; margin-left: 132px; top: -4px; width: 8px; height: 140px; border-radius: 6px; z-index: 3; background: linear-gradient(90deg, #d9cbbb, #8f8478); transform-origin: 4px 6px; transform: rotate(24deg); box-shadow: 0 6px 12px rgba(0,0,0,.6); }
.arm::before { content: ''; position: absolute; top: -8px; left: -8px; width: 24px; height: 24px; border-radius: 50%; background: #3a2c24; border: 3px solid #d9cbbb; }
.arm::after { content: ''; position: absolute; bottom: -6px; left: -5px; width: 18px; height: 22px; border-radius: 4px; background: #2a1d17; border: 2px solid #d9cbbb; }
@media (max-width: 370px) { .deck { transform: scale(.88); } }
.np { text-align: center; }
.np b { font: 400 24px/1.1 var(--poster); letter-spacing: .02em; text-transform: uppercase; }
.np small { display: block; color: var(--dim); font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.karaoke { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center; min-height: 150px; }
.kl { transition: all .3s; line-height: 1.25; }
.kl.prev, .kl.next { color: var(--dim); font-size: 15px; font-weight: 600; }
.kl.cur { font: 800 clamp(21px, 6vw, 27px)/1.2 var(--body); color: var(--gold); text-shadow: 0 0 22px rgba(255, 194, 61, .45); }
.kl.cur.pop { animation: kpop .35s ease-out; }
.kl.mystery { color: var(--orange); font-weight: 800; letter-spacing: .3em; animation: blink 1s infinite; }
@keyframes kpop { from { transform: scale(.94); opacity: .3; } }
@keyframes blink { 50% { opacity: .35; } }
.upnext { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.upnext .t { flex: 1; font-size: 12px; color: var(--dim); font-weight: 700; }
.upnext .t b { display: block; color: var(--cream); font: 400 21px/1.1 var(--poster); letter-spacing: .03em; text-transform: uppercase; }
.eq { display: flex; gap: 3px; align-items: end; height: 22px; }
.eq i { width: 4px; border-radius: 2px; background: var(--orange); animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; background: var(--gold); } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; background: var(--gold); }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 22px; } }
.tools { display: flex; flex-direction: column; gap: 8px; }
.sync { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sync-panel { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 40; background: #241611; border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -20px 50px rgba(0, 0, 0, .5); animation: enter .25s ease-out; }
.sync-lines { display: grid; gap: 8px; }
.sync-lines button { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 15px; font-weight: 700; }
.sync-lines button:active { background: rgba(255, 107, 26, .25); border-color: var(--orange); }

/* the cut: flash, shake, STOP! */
.cut-fx { position: fixed; inset: 0; z-index: 45; pointer-events: none; display: grid; place-items: center; }
.cut-fx .flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.cut-fx b { font: 400 clamp(72px, 24vw, 120px)/1 var(--poster); color: var(--cream); transform: rotate(-8deg); text-shadow: 6px 6px 0 var(--red); opacity: 0; }
body.cutting .cut-fx .flash { animation: flash .5s ease-out; }
body.cutting .cut-fx b { animation: scr .9s ease-out; }
body.cutting #app { animation: shake .45s; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
@keyframes scr { 0% { opacity: 0; transform: rotate(-8deg) scale(2.2); } 18% { opacity: 1; transform: rotate(-8deg) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes shake { 20% { transform: translate(-7px, 2px) rotate(-.6deg); } 40% { transform: translate(7px, -2px) rotate(.6deg); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } }

/* your turn: spotlight */
.spot::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
    conic-gradient(from 180deg at 50% -20%, transparent 0 168deg, rgba(255, 194, 61, .28) 175deg 185deg, transparent 192deg),
    radial-gradient(60% 34% at 50% 34%, rgba(255, 194, 61, .22), transparent 70%), #0a0504; }
.ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin-top: 4px; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .bg { stroke: rgba(255, 244, 230, .1); }
.ring .fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 390; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgba(255, 194, 61, .7)); transition: stroke-dashoffset .1s linear; }
.who-sm { font: 800 13px var(--body); letter-spacing: .22em; color: var(--gold); text-transform: uppercase; }
.go { font: 400 clamp(54px, 17vw, 76px)/.92 var(--poster); letter-spacing: .01em; background: linear-gradient(180deg, #fff4e6 30%, #ffc23d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.go.count { animation: kpop .4s ease-out; }
.go.sing { background: linear-gradient(180deg, #b9ffe0 20%, #19e68c); -webkit-background-clip: text; background-clip: text; animation: kpop .4s ease-out; }
.cue { color: var(--dim); font-style: italic; font-size: 15px; max-width: 420px; }
.wave { display: flex; gap: 4px; align-items: center; justify-content: center; height: 56px; }
.wave i { width: 5px; height: 6px; border-radius: 3px; background: linear-gradient(180deg, var(--gold), var(--orange)); transition: height .12s ease-out; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 6px; justify-content: center; max-width: 470px; }
.w { display: inline-flex; justify-content: center; align-items: center; min-width: calc(var(--len) * .6em + 16px); height: 42px; padding: 0 10px; border-radius: 12px; border: 2px dashed rgba(255, 244, 230, .22); font-weight: 800; font-size: 16px; transition: border-color .25s, background .25s, color .25s; }
.w b { visibility: hidden; }
.w.ok { border: 2px solid var(--green); background: rgba(25, 230, 140, .14); color: var(--green); animation: wpop .4s cubic-bezier(.3, 1.8, .5, 1); box-shadow: 0 0 18px -4px rgba(25, 230, 140, .6); }
.w.hint:not(.ok):not(.miss) { border: 2px solid var(--gold); color: var(--gold); }
.w.ok b, .w.miss b, .w.show b, .w.hint b { visibility: visible; }
.w.miss { border: 2px solid var(--red); background: rgba(255, 46, 99, .12); color: var(--red); }
.w.show { border-style: solid; border-color: rgba(255, 244, 230, .4); }
@keyframes wpop { from { transform: scale(.5); } }
.heard { color: var(--dim); font-size: 13.5px; min-height: 18px; max-width: 420px; }
#doneBtn { min-width: 170px; }

/* reveal */
.verdict-wrap { position: relative; display: grid; place-items: center; width: 100%; max-width: 330px; height: 164px; }
.dial { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.dial svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 12; }
.dial .bg { stroke: rgba(255, 244, 230, .08); }
.dial .fg { stroke: url(#dg); stroke-linecap: round; stroke-dasharray: 408.4; stroke-dashoffset: 408.4; }
.dial b { font: 400 54px/1 var(--poster); }
.stamp { position: absolute; right: 0; bottom: 6px; font: 400 36px/1 var(--poster); border: 5px solid currentColor; border-radius: 14px; padding: 4px 14px 2px; transform: rotate(-10deg); background: rgba(10, 5, 4, .78); letter-spacing: .04em; animation: stamp .5s cubic-bezier(.3, 1.6, .5, 1); }
.stamp.pass { color: var(--green); box-shadow: 0 0 30px -6px rgba(25, 230, 140, .7); }
.stamp.fail { color: var(--red); box-shadow: 0 0 30px -6px rgba(255, 46, 99, .7); }
.stamp.vote { color: var(--gold); box-shadow: 0 0 30px -6px rgba(255, 194, 61, .7); }
@keyframes stamp { from { transform: rotate(-10deg) scale(3); opacity: 0; } }
.verdict { font: 800 15px var(--body); letter-spacing: .04em; min-height: 20px; }
.verdict.pass { color: var(--green); }
.verdict.fail { color: var(--red); }
.verdict.vote { color: var(--gold); }
.flaps { perspective: 600px; }
.flaps .w { position: relative; border: 0; transform-style: preserve-3d; animation: flip .55s ease-out backwards; }
.flaps .w.ok { background: linear-gradient(180deg, #1fe896, #12c477); color: #04261a; box-shadow: none; }
.flaps .w.miss { background: linear-gradient(180deg, #ff4774, #e0184c); color: #fff; }
.flaps .w.show { background: var(--card-2); color: var(--cream); }
.flaps .w::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .22); }
@keyframes flip { from { transform: rotateX(-100deg); opacity: 0; } }
.vote { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.standings { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.standings:empty { display: none; }
.st { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 14px; text-align: left; }
.st .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .hearts { font-size: 9px; letter-spacing: -1px; }
.st .pts { font: 400 19px var(--poster); color: var(--gold); min-width: 40px; text-align: right; }
.st.me { border-color: rgba(25, 230, 140, .5); background: rgba(25, 230, 140, .08); }
.st .delta { flex: none; font: 800 11px var(--body); color: var(--green); }
.st.out { opacity: .45; }
#contBtn { max-width: 420px; }
/* auto-continue: the button fills up over 5s */
.btn.hot.counting { background-image: linear-gradient(90deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .38)), linear-gradient(180deg, #ffc23d, #ff6b1a); background-repeat: no-repeat; background-size: 0% 100%, 100% 100%; animation: fillbar 5s linear forwards; white-space: pre; }
@keyframes fillbar { to { background-size: 100% 100%, 100% 100%; } }
.hold { border: 0; background: none; color: var(--dim); font-weight: 700; font-size: 14px; padding: 4px 10px; }
.hold:hover { color: var(--cream); }
.replay-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; }

/* end */
.end-av .av { animation: popin .7s cubic-bezier(.3, 1.6, .5, 1); }
.end-av .crown { display: block; font-size: 40px; margin-bottom: -14px; position: relative; z-index: 2; animation: bob 1.4s ease-in-out infinite; }
.rank { list-style: none; width: 100%; max-width: 420px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.rank li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; text-align: left; }
.rank li .pos { font: 400 20px var(--poster); color: var(--dim); width: 18px; }
.rank li:first-child { border-color: rgba(255, 194, 61, .6); background: rgba(255, 194, 61, .1); }
.rank li:first-child .pos { color: var(--gold); }
.rank .nm { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .stt { color: var(--dim); font-size: 12.5px; font-weight: 600; text-align: right; }
#s-end .col { max-width: 420px; }


/* ---------- accounts, profile, leaderboards ---------- */
.av.photo { background-size: cover; background-position: center; font-size: 0; }
.home-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acct { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 14px 4px 4px; font-weight: 800; font-size: 13.5px; min-height: 36px; max-width: 60%; }
.acct:hover { background: var(--card-2); }
.acct #acctName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct.out { padding: 7px 14px; }
.signin { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; text-align: center; padding-bottom: 40px; }
.logo-disc.static { position: relative; right: auto; top: auto; width: 150px; opacity: 1; }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 12px; background: #fff; color: #1f1f1f; box-shadow: 0 5px 0 #c9bfb4, 0 16px 28px -12px rgba(0, 0, 0, .6); max-width: 360px; }
.btn.google:active { box-shadow: 0 2px 0 #c9bfb4; transform: translateY(3px); }
.prof-head { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 4px; }
.prof-av .av { width: 116px; height: 116px; font-size: 60px; }
.center-row { justify-content: center; }
.small-btn { width: auto; padding: 10px 14px; font-size: 13.5px; border-radius: 12px; cursor: pointer; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats:empty { display: none; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stats b { display: block; font: 400 24px/1 var(--poster); color: var(--gold); }
.stats span { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.at { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding-left: 14px; }
.at span { color: var(--dim); font-weight: 800; }
.at input { border: 0; background: none; padding-left: 4px; box-shadow: none !important; }
.at:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 26, .2); }
.faces { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 4px; }
.faces button { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 24px; }
.faces button.on { border-color: var(--gold); background: rgba(255, 194, 61, .15); }
.swatches { display: flex; gap: 10px; margin-top: 10px; }
.swatches button { background: var(--c); width: 34px; height: 34px; border-radius: 50%; border: 0; box-shadow: 0 0 0 2px var(--night), 0 0 0 3px var(--line); }
.swatches button.on { box-shadow: 0 0 0 3px var(--night), 0 0 0 5px var(--cream); }
.tabs { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tab { flex: 1; border: 0; background: none; border-radius: 10px; padding: 10px; font-weight: 800; font-size: 14px; color: var(--dim); }
.tab.on { background: linear-gradient(180deg, #ffc23d, #ff6b1a); color: #1a0d06; }
.leaders { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.leaders li { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; animation: popin .4s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.leaders li .pos { font: 400 22px var(--poster); color: var(--dim); width: 26px; text-align: center; }
.leaders li:nth-child(1) .pos { color: #ffc23d; } .leaders li:nth-child(2) .pos { color: #e6e1da; } .leaders li:nth-child(3) .pos { color: #e0904f; }
.leaders li:nth-child(1) { border-color: rgba(255, 194, 61, .6); background: rgba(255, 194, 61, .1); }
.leaders li.me { border-color: rgba(25, 230, 140, .55); background: rgba(25, 230, 140, .08); }
.leaders .who2 { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.leaders .who2 b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaders .who2 small { color: var(--dim); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaders .pts { font: 400 22px var(--poster); color: var(--gold); }
#savedNote { text-align: center; min-height: 18px; }

.legal { text-align: center; font-size: 12.5px; color: var(--dim); }
.legal a { color: var(--dim); }

/* highlight reel */
.btn.reel { color: #fff; background: linear-gradient(100deg, #ff2e63, #a37bff); box-shadow: 0 5px 0 #7d1a52, 0 16px 28px -12px rgba(255, 46, 99, .6); }
.reel-card { gap: 14px; }
.reel-bar { height: 10px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-top: 10px; }
.reel-bar i { display: block; height: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #ffc23d, #ff6b1a, #ff2e63); transition: transform .2s linear; }
#reelVideo { display: block; width: 100%; max-height: 58vh; aspect-ratio: 9 / 16; object-fit: contain; background: #000; border-radius: 16px; margin-bottom: 4px; }
#reelReady .row .btn { flex: 1; }

/* keyboard focus */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:focus-visible, .chip:focus-visible, .pack:focus-visible { outline-offset: 3px; }

/* menu sheet + toast */
.sheet { position: fixed; inset: 0; z-index: 70; background: rgba(8, 4, 2, .75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: enter .2s ease-out; }
.sheet-card { width: 100%; max-width: 520px; background: #241611; border: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 22px 16px max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sheet-card .kicker { text-align: center; margin-bottom: 4px; }
@media (min-width: 600px) { .sheet { align-items: center; } .sheet-card { border-radius: 24px; max-width: 420px; } }
.toast { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translate(-50%, -20px); box-shadow: 0 14px 30px rgba(0, 0, 0, .5); background: #2e1d15; border: 1px solid var(--line); padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .3s; z-index: 80; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

@media (max-width: 380px) {
  .leaders li, .rank li { gap: 9px; padding: 9px 11px; }
  .leaders .pts { font-size: 19px; }
  .rank .stt { font-size: 11px; }
  .rank li .pos { width: 14px; }
  .opts { gap: 8px; }
  h2 { font-size: 30px; }
}
