:root {
  --bg: #f6f5f2;
  --surface: rgba(255, 255, 255, 0.88);
  --ink: #141414;
  --muted: #6b675f;
  --line: #e3e0d9;
  --accent: #ff4d2e;
  --green: #138a55;
  --red: #d63a3a;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 8px 24px rgba(20, 20, 20, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: 18px; line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior: none;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button {
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 12px 18px; cursor: pointer; font-weight: 600;
  transition: transform .08s, background .15s, border-color .15s;
}
button:hover { border-color: #cfcbc2; }
button:active { transform: scale(.97); }
button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
button.primary:hover { background: #2a2a2a; }
button.ghost { background: none; border: none; font-size: 26px; padding: 4px 10px; }
button.big { width: 100%; padding: 20px; font-size: 22px; font-weight: 700; border-radius: 16px; }
input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: 14px; font-size: 20px;
  border: 1px solid var(--line); background: #fff; outline: none;
}
input:focus { border-color: var(--ink); }

/* ---------- background instruments ---------- */
#stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.inst { position: absolute; opacity: .16; filter: grayscale(1); transform: rotate(var(--r)); will-change: transform, opacity, filter; }
.inst svg { width: 100%; height: 100%; display: block; }
.inst .spin { transform-origin: 50px 50px; }
body.music .inst .spin { animation: spin 1.8s linear infinite; }

/* ---------- layout ---------- */
.screen { position: relative; z-index: 1; display: none; min-height: 100dvh; padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top)); max-width: 1100px; margin: 0 auto; flex-direction: column; gap: 14px; }
.screen.active { display: flex; }
.bar { display: flex; align-items: center; gap: 10px; }
.bar h2 { flex: 1; margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.card { background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 14px; font-size: 22px; font-weight: 800; }
.card h3 small { color: var(--muted); font-weight: 500; font-size: 16px; margin-left: 8px; }
.row { display: flex; gap: 10px; align-items: center; }
.center { justify-content: center; text-align: center; }
.muted { color: var(--muted); font-size: 17px; }
.stack { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 440px; margin: 0 auto; }

/* ---------- home ---------- */
#home { justify-content: center; align-items: center; text-align: center; }
.home-card { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 520px; padding: 36px 24px; }
.kicker { text-transform: uppercase; letter-spacing: .18em; font-size: 14px; font-weight: 700; color: var(--accent); }
h1 { font-size: clamp(44px, 11vw, 68px); line-height: 1; margin: 4px 0 6px; font-weight: 800; letter-spacing: -.03em; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 21px; }
.rules { width: 100%; max-width: 440px; text-align: left; color: var(--ink); font-size: 18px; margin-top: 14px; }
.rules summary { cursor: pointer; text-align: center; font-size: 19px; font-weight: 700; color: var(--muted); }
.rules p { margin: 10px 0; }
.ladder-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ladder-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ladder-table td:nth-child(even) { font-weight: 800; text-align: right; }

/* ---------- setup ---------- */
.player-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.player-list:empty::before { content: "No players yet"; color: var(--muted); font-size: 17px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 20px; font-weight: 700;
  border-radius: 999px; background: var(--ink); color: #fff; }
.pill button { border: none; background: none; padding: 0 2px; color: rgba(255,255,255,.6); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border-radius: 999px; padding: 10px 18px; font-size: 18px; font-weight: 700; background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.off { background: #fff; border-color: var(--line); color: var(--muted); text-decoration: line-through; }
.toggles { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 19px; font-weight: 600; }
.toggle input { flex: none; width: 24px; height: 24px; accent-color: var(--ink); }

/* ---------- board ---------- */
.dot { width: 12px; height: 12px; border-radius: 50%; background: #e0a63a; }
.dot.on { background: var(--green); }
.dot.off { background: var(--red); }
.end-btn { color: var(--red); border-color: rgba(214, 58, 58, .4); font-weight: 800; font-size: 18px; background: #fff; }
.board-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 820px) { .board-layout { grid-template-columns: 1.6fr 1fr; } }
.turn-panel { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; min-height: 440px; justify-content: center; }
.turn-name { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.turn-name span { color: var(--accent); }
.qr { background: #fff; padding: 14px; border-radius: 18px; line-height: 0; border: 1px solid var(--line); }
.qr svg { width: min(66vw, 320px); height: auto; }
.code-label { font-size: 18px; color: var(--muted); letter-spacing: .08em; }
.code-label b { color: var(--ink); font-size: 28px; letter-spacing: .12em; }
.scores { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.scores li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.scores li.current { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }
.scores .rank { width: 24px; color: var(--muted); font-weight: 700; }
.scores .nm { flex: 1; font-weight: 700; font-size: 22px; }
.scores .pts { font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.live-timer { font-size: 84px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.answer { display: flex; align-items: center; gap: 16px; text-align: left; background: #fff; padding: 14px; border-radius: 18px; border: 1px solid var(--line); width: 100%; max-width: 460px; }
.answer img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; }
.answer .t { font-size: 28px; font-weight: 800; line-height: 1.15; }
.answer .a { color: var(--muted); font-size: 20px; margin-top: 4px; }
.judge { display: flex; gap: 12px; width: 100%; max-width: 460px; }
.judge button { flex: 1; font-size: 26px; padding: 18px; font-weight: 800; border: none; color: #fff; }
.yes { background: var(--green); }
.no { background: var(--red); }
.gain { font-size: 72px; font-weight: 800; letter-spacing: -.03em; animation: pop .45s; }
.gain.pos { color: var(--green); } .gain.neg { color: var(--red); } .gain.zero { color: var(--muted); }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } }
.small-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.small-links button { font-size: 18px; padding: 12px 18px; }
.winner-label { text-transform: uppercase; letter-spacing: .18em; font-size: 15px; font-weight: 800; color: var(--accent); }

/* ---------- scan ---------- */
.scanner { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: #111; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 15%; border: 3px solid #fff; border-radius: 20px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
#manualCode { max-width: 480px; margin: 0 auto; width: 100%; }

/* ---------- play ---------- */
#play { gap: 18px; justify-content: center; }
.timer-wrap { text-align: center; }
.timer { font-size: clamp(96px, 30vw, 170px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.worth { display: inline-block; margin-top: 8px; padding: 8px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.ladder { display: flex; flex-direction: row-reverse; gap: 4px; margin: 16px auto 0; max-width: 520px; }
.ladder i { flex: 1; height: 10px; border-radius: 5px; background: var(--accent); transition: background .3s; }
.ladder i.gone { background: var(--line); }
.penalty { color: var(--red); font-weight: 800; font-size: 22px; min-height: 30px; margin-top: 8px; }
.play-body { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; width: 100%; max-width: 480px; margin: 0 auto; }
.stop-btn { width: min(70vw, 280px); aspect-ratio: 1; border-radius: 50%; border: none; font-size: 42px; font-weight: 800; letter-spacing: -.01em;
  background: var(--accent); color: #fff; box-shadow: 0 14px 40px rgba(255, 77, 46, .35); }
.stop-btn:hover { background: #f2401f; }
.stop-btn:active { transform: scale(.94); }
.wait { font-size: 24px; font-weight: 700; margin: 0; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { font-size: 20px; font-weight: 600; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; z-index: 9; }

/* ---------- multi-phone ---------- */
.side { display: flex; flex-direction: column; gap: 14px; }
.join-mini { display: flex; align-items: center; gap: 14px; padding: 14px; }
.join-mini .qr { padding: 6px; border-radius: 12px; }
.join-mini .qr svg { width: 110px; }
.join-mini b { font-size: 22px; letter-spacing: .1em; }
.scores .on-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.scores .on-dot.on { background: var(--green); }
.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; }
.history li { display: flex; gap: 10px; align-items: center; font-size: 16px; }
.history img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.history .t { font-weight: 800; }
.history .a, .history .w { color: var(--muted); font-size: 15px; }
.ready-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ready-list span { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--muted); }
.ready-list span.ok { background: var(--ink); border-color: var(--ink); color: #fff; }
.ready-list span.out { text-decoration: line-through; }
.reveal { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: 100%; max-width: 460px; }
.reveal img { width: min(56vw, 220px); aspect-ratio: 1; border-radius: 18px; object-fit: cover; box-shadow: var(--shadow); margin: 6px 0; }
.reveal .t { font-size: clamp(30px, 7vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.reveal .a { font-size: 22px; color: var(--muted); font-weight: 600; }
.reveal .kicker { margin-bottom: 2px; }
.peek { position: relative; width: 100%; max-width: 460px; user-select: none; -webkit-user-select: none; touch-action: none; cursor: pointer; }
.peek .answer { filter: blur(14px); transition: filter .15s; }
.peek.open .answer { filter: none; }
.peek .hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.peek.open .hint { display: none; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.name-grid button { padding: 20px 12px; font-size: 22px; font-weight: 800; }
.me-bar { display: flex; justify-content: space-between; font-weight: 800; font-size: 20px; }
.me-bar span:last-child { color: var(--muted); }
#play.idle .timer-wrap { display: none; }
#scan #manualCode input { font-size: 26px; letter-spacing: .2em; text-align: center; font-weight: 800; }
#scan #manualCode button { font-size: 22px; padding: 14px 22px; }
.scores li.current { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--accent); }

/* ---------- answers on the phone ---------- */
.mic { padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--muted); }
.mic.on { background: var(--accent); border-color: var(--accent); color: #fff; animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse { 50% { box-shadow: 0 0 0 10px rgba(255, 77, 46, .15); } }
.answer-input { width: 100%; font-size: 24px; font-weight: 700; text-align: center; padding: 16px; }
.said { font-size: 20px; margin: 0; }
.said small { color: var(--muted); font-size: 16px; }
.fix { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.fix button { padding: 8px 14px; font-size: 16px; }
.fix button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.judge #bArtist { background: #fff; color: var(--ink); border: 1px solid var(--line); font-size: 20px; }
.records { width: 100%; max-width: 460px; text-align: left; }
.records h3 { margin: 6px 0 10px; font-size: 18px; }
.records .scores li { padding: 8px 12px; }
.records .scores .nm { font-size: 18px; }
.records .scores .pts { font-size: 20px; }

/* ---------- account ---------- */
.col-form { display: flex; flex-direction: column; gap: 10px; }
.col-form input { font-size: 22px; text-align: center; }
.pin { font-size: 56px; font-weight: 800; letter-spacing: .25em; margin: 8px 0; }
#acctLine a, #acctLine button { color: var(--ink); font-weight: 700; }

/* ---------- iPad / computer: everything on one screen, no page scrolling ---------- */
@media (min-width: 768px) and (min-height: 500px) {
  #board.screen { height: 100dvh; min-height: 0; overflow: hidden; }
  #board .board-layout { flex: 1; min-height: 0; grid-template-columns: 1.6fr 1fr; }
  #board .turn-panel { min-height: 0; overflow: hidden; gap: min(14px, 1.6vh); padding: min(20px, 2.2vh); }
  #board .side { min-height: 0; }
  #board .score-panel { flex: 0 1 auto; min-height: 0; overflow: auto; }
  #board .history-card { flex: 1 1 0; min-height: 0; overflow: auto; }
  #board .history { max-height: none; }
  #board .turn-name { font-size: min(40px, 5.2vh); }
  #board .qr svg { width: min(40vh, 320px); }
  #board .join-mini .qr svg { width: min(13vh, 110px); }
  #board .live-timer { font-size: min(84px, 11vh); }
  #board .gain { font-size: min(72px, 9vh); }
  #board .reveal img { width: min(24vh, 220px); }
  #board .reveal .t { font-size: min(40px, 4.8vh); }
  #board .reveal .a { font-size: min(22px, 2.8vh); }
  #board .answer img { width: min(96px, 11vh); height: min(96px, 11vh); }
  #board .judge button { padding: min(18px, 2vh); font-size: min(26px, 3.2vh); }
  #board button.big { padding: min(20px, 2.2vh); font-size: min(22px, 2.8vh); }
  #board .wait { font-size: min(24px, 3vh); }
  #board .muted, #board .said { font-size: min(17px, 2.2vh); }

  /* the listening screen (solo on a computer / iPad) */
  #play.screen { height: 100dvh; min-height: 0; overflow: auto; justify-content: center; }
  #play .timer { font-size: min(30vw, 170px, 17vh); }
  #play .stop-btn { width: min(70vw, 280px, 32vh); font-size: min(42px, 5vh); }
  #play .reveal img { width: min(56vw, 220px, 26vh); }
  #play button.big { padding: min(20px, 2vh); }

  /* setup in two columns */
  #setup.screen { display: none; }
  #setup.screen.active { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 14px; }
  #setup .bar, #setup #startGame { grid-column: 1 / -1; }
  #setup #recordsCard { grid-row: span 2; }
}

/* ---------- favorite artists: floating bubbles ---------- */
#favs { max-width: 900px; gap: 10px; }
.fav-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fav-head h2 { margin: 0; font-size: clamp(26px, 6vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.fav-head .muted { margin: 0; }
.fav-head input { width: 100%; max-width: 420px; text-align: center; margin-top: 6px; }
.fav-slots { display: flex; gap: 14px; margin: 6px 0; }
.fav-slots .slot { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed #cfcbc2; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 800; font-size: 20px; overflow: hidden; background: #fff; padding: 0; position: relative; }
.fav-slots .slot img { width: 100%; height: 100%; object-fit: cover; }
.fav-slots .slot.full { border: 3px solid var(--accent); animation: pop .35s; }
.fav-slots .slot.full::after { content: "✕"; position: absolute; inset: auto 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.bubble-field { flex: 1; min-height: 0; overflow: auto; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start;
  gap: 8px 4px; padding: 14px 0 24px; -webkit-mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 24px), transparent); }
.bubble { --s: 80px; width: calc(var(--s) + 22px); margin-top: var(--o, 0); padding: 0; border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: float var(--d, 6s) ease-in-out var(--dl, 0s) infinite; }
.bubble .ball { width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; background: #e9e6df; box-shadow: 0 6px 18px rgba(20,20,20,.12);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .25s; outline: 3px solid transparent; outline-offset: 3px; }
.bubble .ball img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bubble span { font-size: 13px; font-weight: 700; line-height: 1.15; width: 100%; text-align: center; overflow-wrap: break-word; max-height: 2.4em; overflow: hidden; }
.bubble:hover .ball { transform: scale(1.05); }
.bubble.on .ball { transform: scale(1.14); outline-color: var(--accent); box-shadow: 0 10px 28px rgba(255, 77, 46, .35); }
.bubble.on span { color: var(--accent); }
.bubble:active { transform: none; }
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(3px, -7px); }
  50% { transform: translate(-2px, -11px); }
  75% { transform: translate(-4px, -4px); }
}
.fav-go { position: sticky; bottom: 12px; }
.fav-go:disabled { background: #d8d4cc; border-color: #d8d4cc; color: #fff; cursor: default; }
#favs.screen.active { height: 100dvh; min-height: 0; }
.ready-list span.picking { border-style: dashed; }
@media (min-width: 768px) { .bubble-field { gap: 14px 12px; } }
@media (max-width: 520px) {
  .bubble { width: calc(var(--s) * .74 + 30px); }
  .bubble .ball { width: calc(var(--s) * .74); height: calc(var(--s) * .74); }
}

/* ---------- artists of the game + song links ---------- */
.fav-slots .slot { width: 56px; height: 56px; }
.fav-slots .slot.extra { opacity: .5; }
.fav-slots { gap: 10px; }
.game-artists { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 520px; }
.game-artists .muted { width: 100%; }
.game-artists span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 15px; }
.game-artists span.mine { background: var(--accent); border-color: var(--accent); color: #fff; }
.artist-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 8px; }
.mini-artist { width: 78px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; text-align: center; }
.mini-artist .ball { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: #e9e6df; }
.mini-artist .ball img { width: 100%; height: 100%; object-fit: cover; }
.mini-artist.mine .ball { outline: 3px solid var(--accent); outline-offset: 2px; }
.song-links { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.song-links a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.song-links a:first-child { color: #1a9c4b; }
.song-links a:last-child { color: #e23a52; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; font-weight: 700; }
.field small { color: var(--muted); font-weight: 500; }
.field input { font-size: 22px; }
.handle { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: 6px; }

/* ---------- small see-through circles above GOT IT ---------- */
.side-btns { display: flex; gap: 28px; justify-content: center; }
.ghost-circle { width: 104px; height: 104px; border-radius: 50%; padding: 10px; display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: rgba(255, 255, 255, .35); border: 2px solid rgba(20, 20, 20, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 15px; font-weight: 700; line-height: 1.15; text-align: center; color: var(--ink); }
.ghost-circle:hover { background: rgba(255, 255, 255, .6); }
.ghost-circle.done { border-color: var(--accent); color: var(--muted); font-size: 13px; overflow: hidden; }
.ghost-circle.done b { color: var(--ink); font-size: 14px; word-break: break-word; }
@media (min-width: 768px) and (min-height: 500px) { #play .ghost-circle { width: min(104px, 13vh); height: min(104px, 13vh); font-size: min(15px, 1.9vh); } }
.inst .glint { opacity: .5; }
body.music .inst .glint { animation: glint 1.2s ease-in-out infinite; }
@keyframes glint { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
/* secondary buttons inside a .judge row (Speak again / Keep listening / Speak) were white-on-white */
.judge button:not(.yes):not(.no):not(.primary) { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.judge { justify-content: center; }

/* ---------- Spotify / Apple Music / Save ---------- */
.song-links { flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.song-links .svc { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink) !important; text-decoration: none; font-weight: 800; font-size: 16px; box-shadow: var(--shadow); }
.song-links .svc svg { width: 26px; height: 26px; flex: none; }
.song-links .save { color: var(--accent) !important; }
.song-links .save.on { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.song-links.small .svc { padding: 7px 12px; font-size: 14px; }
.song-links.small .svc svg { width: 20px; height: 20px; }
.my-songs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.my-songs li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; }
.my-songs img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.my-songs .info { flex: 1; min-width: 0; }
.my-songs .t { font-weight: 800; }
.my-songs .a { color: var(--muted); font-size: 15px; }
.icon-link svg { width: 34px; height: 34px; display: block; }
#mysongs .bar #copySongs { font-size: 15px; }
#play .judge button { font-size: 19px; padding: 14px; }
.icon-link svg { width: 32px; height: 32px; }
.video-box { width: 100%; max-width: 460px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); margin: 6px 0; }
.video-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.song-links .video { color: #e00 !important; }

/* ---------- short intro ---------- */
#intro { justify-content: center; align-items: center; }
.intro-card { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 30px 22px; }
.intro-card h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.intro-steps { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.intro-steps li { display: flex; align-items: center; gap: 14px; font-size: 20px; font-weight: 700; opacity: 0; transform: translateY(10px); animation: stepIn .45s ease forwards; }
.intro-steps li b { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; }
@keyframes stepIn { to { opacity: 1; transform: none; } }

/* ---------- score digits with spinning-record zeros ---------- */
.digits { display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.d0 { display: inline-block; width: .96em; height: .96em; margin: 0 .04em; vertical-align: -.14em; }
.d0 svg { width: 100%; height: 100%; display: block; animation: spin 2.4s linear infinite; }
.worth .d0 svg { animation-duration: 1.4s; }
.gain .d0 { width: .9em; height: .9em; }
.pts-fx { font-weight: 800; color: var(--accent); white-space: nowrap; display: inline-flex; align-items: center; }
.note-fly { position: fixed; z-index: 20; pointer-events: none; font-size: 26px; color: var(--accent); font-weight: 800;
  animation: noteFly 1.1s ease-out forwards; }
@keyframes noteFly { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 15% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(25deg) scale(1.1); opacity: 0; } }

/* ---------- endless solo: disco-ball lives ---------- */
.lives { display: inline-flex; gap: 4px; align-items: center; }
.life { position: relative; width: 38px; height: 38px; display: inline-block; }
.life svg { width: 100%; height: 100%; display: block; }
.life.gone::after { content: ""; position: absolute; inset: 7px 4px 2px; border: 2px dashed var(--line); border-radius: 50%; }
.life.crack svg { animation: crackShake .45s ease; }
.life.heal svg { animation: healGlow .7s ease; }
.life.shatter svg { animation: shatterOut .5s ease forwards; }
.life.shatter i { position: absolute; left: 50%; top: 55%; width: 6px; height: 6px; background: #b8c0ca; border: 1px solid #6f7884;
  animation: shard .7s ease-out forwards; }
.life.shatter i:nth-child(2) { --x: -22px; --y: -18px; } .life.shatter i:nth-child(3) { --x: 20px; --y: -20px; }
.life.shatter i:nth-child(4) { --x: -24px; --y: 14px; background: #7fd3ff; } .life.shatter i:nth-child(5) { --x: 22px; --y: 16px; background: #ffe27a; }
.life.shatter i:nth-child(6) { --x: 0; --y: -28px; } .life.shatter i:nth-child(7) { --x: 4px; --y: 26px; }
@keyframes crackShake { 20%, 60% { transform: translateX(-3px) rotate(-6deg); } 40%, 80% { transform: translateX(3px) rotate(6deg); } }
@keyframes healGlow { 0% { transform: scale(.7); filter: brightness(2); } 60% { transform: scale(1.2); } }
@keyframes shatterOut { to { transform: scale(1.4); opacity: 0; } }
@keyframes shard { to { transform: translate(var(--x), var(--y)) rotate(160deg); opacity: 0; } }
.me-bar { align-items: center; }

/* ---------- links: just the icons, big and clear, with the heart in the same row ---------- */
.song-links { flex-wrap: nowrap; gap: 16px; margin-top: 12px; align-items: center; }
.song-links .svc { padding: 0; width: 58px; height: 58px; justify-content: center; border-radius: 50%; gap: 0; }
.song-links .svc svg { width: 40px; height: 40px; }
.song-links .save { font-size: 32px; line-height: 1; color: var(--accent) !important; }
.song-links .save.on { color: #fff !important; animation: pop .35s; }
.song-links.small .svc { width: 44px; height: 44px; padding: 0; }
.song-links.small .svc svg { width: 30px; height: 30px; }

/* ---------- running score at the top of the reveal ---------- */
.tally { position: relative; overflow: hidden; width: 100%; max-width: 460px; list-style: none; margin: 0 0 6px; padding: 10px 12px;
  border-radius: 20px; color: #fff; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 10px 30px rgba(40, 20, 60, .25);
  background: linear-gradient(135deg, #18122b 0%, #2b1746 55%, #4a1c35 100%); animation: tallyIn .45s ease; }
.tally::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(circle at 12% 30%, rgba(255,255,255,.35) 0 1.5px, transparent 2px), radial-gradient(circle at 78% 20%, rgba(255,214,120,.5) 0 1.5px, transparent 2px),
    radial-gradient(circle at 60% 80%, rgba(127,211,255,.45) 0 1.5px, transparent 2px), radial-gradient(circle at 92% 70%, rgba(255,255,255,.3) 0 1px, transparent 1.5px),
    radial-gradient(circle at 35% 75%, rgba(255,120,200,.4) 0 1.5px, transparent 2px);
  animation: sparkle 2.6s ease-in-out infinite; }
.tally li { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; }
.tally li.me { background: rgba(255, 255, 255, .13); box-shadow: inset 3px 0 0 var(--accent); }
.tally .rk { width: 30px; text-align: center; font-size: 22px; font-weight: 800; color: rgba(255,255,255,.7); }
.tally .nm { flex: 1; min-width: 0; font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tally .pts { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.tally .d0 svg { filter: drop-shadow(0 0 1.5px rgba(255,255,255,.75)); }
.tally .delta { font-size: 15px; font-weight: 800; padding: 3px 9px; border-radius: 999px; animation: pop .5s .2s both; }
.tally .delta.up { background: rgba(46, 204, 113, .25); color: #7dffb0; }
.tally .delta.down { background: rgba(255, 77, 77, .25); color: #ff9b9b; }
.tally.one { flex-direction: row; align-items: center; justify-content: center; gap: 14px; padding: 12px 18px; }
.tally.one .lbl { position: relative; text-transform: uppercase; letter-spacing: .14em; font-size: 14px; font-weight: 800; color: rgba(255,255,255,.65); }
.tally.one .pts { position: relative; font-size: 46px; line-height: 1; }
.tally.one .delta { position: relative; font-size: 17px; }
@keyframes tallyIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes sparkle { 50% { opacity: .15; } }
.tally .d0 { width: .86em; height: .86em; }

/* ---------- design pass 2 ---------- */
/* records bigger everywhere */
.d0 { width: 1.08em; height: 1.08em; margin: 0 .03em; vertical-align: -.2em; }
.me-bar #meScore { font-size: 22px; color: var(--ink); }
/* the countdown: one record as the unit, then a plain number */
.worth { display: inline-flex; align-items: center; gap: 10px; }
.worth .unit { width: 1.15em; height: 1.15em; display: inline-block; }
.worth .unit svg { width: 100%; height: 100%; display: block; animation: spin 1.4s linear infinite; filter: drop-shadow(0 0 1.5px rgba(255,255,255,.7)); }
/* lives: the new disco ball */
.life { width: 34px; height: 34px; }
.life svg { filter: drop-shadow(0 2px 3px rgba(40, 50, 70, .25)); }
.life.full svg { animation: ballSpin 6s ease-in-out infinite; }
.life.gone::after { inset: 3px; }
@keyframes ballSpin { 50% { transform: rotate(8deg); } }
/* listen links: just the icons, no frame */
.song-links .svc { width: auto; height: auto; padding: 2px; border: 0; background: none; box-shadow: none; border-radius: 0; }
.song-links .svc svg { width: 48px; height: 48px; }
.song-links .save { font-size: 44px; line-height: 1; padding: 0 2px; }
.song-links .save.on { background: none; color: var(--accent) !important; }
.song-links.small .svc svg { width: 34px; height: 34px; }
/* trimmed reveal: the result in place of "The song was" */
.reveal .result { font-size: 20px; font-weight: 800; line-height: 1.25; }
.reveal .result small { font-weight: 600; color: var(--muted); }
.reveal { gap: 4px; }
/* score card bigger */
.tally.one .pts { font-size: 60px; }
.tally.one .lbl { font-size: 15px; }
.tally .pts { font-size: 32px; }
.tally .nm { font-size: 21px; }
.tally .d0 { width: .9em; height: .9em; }

/* ---------- design pass 3 ---------- */
/* the score is in the capsule on the reveal: no second score in the top bar */
#play:has(.tally) #meScore { display: none; }
/* result bubble inside the score capsule */
.tally .badge { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.tally .badge b { font-weight: 900; }
.tally .badge.good { background: #22c55e; color: #fff; box-shadow: 0 0 18px rgba(34, 197, 94, .55); }
.tally .badge.bad { background: #ef4444; color: #fff; box-shadow: 0 0 18px rgba(239, 68, 68, .55); }
.tally .badge.info { background: rgba(255, 255, 255, .16); color: #fff; text-transform: none; }
.tally .badge.fx { animation: bubblePop .6s cubic-bezier(.2, 1.6, .4, 1) .25s both; }
.tally li.head { justify-content: center; padding: 2px 0 4px; }
.tally.one { flex-wrap: wrap; }
@keyframes bubblePop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
/* lives: bigger silver balls */
.life { width: 40px; height: 40px; }
.life svg { filter: drop-shadow(0 2px 3px rgba(20, 25, 35, .35)); }
/* buttons wait (dimmed) while the song loads, instead of a separate "Get ready" screen */
.stop-btn.waiting, .side-btns.waiting .ghost-circle { opacity: .45; pointer-events: none; }

/* ---------- design pass 4: a fixed reveal screen ---------- */
#play:has(.play-body.rv) { justify-content: flex-start; }
.play-body.rv { gap: 12px; }
.rv .tally.one { display: block; height: 104px; padding: 0; text-align: center; }
.rv .tally.one .lbl { position: absolute; top: 10px; left: 16px; font-size: 11px; letter-spacing: .16em; }
.rv .tally.one .pts { position: absolute; left: 0; right: 0; top: 8px; justify-content: center; font-size: 50px; line-height: 1; display: flex; }
.rv .tally.one .brow { position: absolute; left: 0; right: 0; bottom: 10px; height: 30px; display: flex; justify-content: center; align-items: center; }
.rv .reveal { gap: 6px; }
.rv .media { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #15121c; box-shadow: var(--shadow); }
.rv .media::before { content: ""; position: absolute; inset: -20px; background: var(--art) center / cover; filter: blur(18px) brightness(.7); }
.rv .media img { position: relative; display: block; height: 100%; width: auto; aspect-ratio: 1; margin: 0 auto; border-radius: 0; box-shadow: none; object-fit: cover; }
.rv .media .video-box { position: relative; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; box-shadow: none; }
.rv .reveal .t { height: 2.2em; width: 100%; display: flex; align-items: center; justify-content: center; font-size: clamp(24px, 6.4vw, 34px); line-height: 1.1; }
.rv .reveal .t span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rv .reveal .a { height: 1.3em; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 20px; }
.rv .song-links { margin-top: 2px; height: 54px; }
.rv-after { min-height: 92px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rv-after p { margin: 0; }
.rv-after .winner-label { margin: 0; }
/* the result bubble: same place and shape every time */
.tally .badge { font-size: 15px; padding: 5px 14px; letter-spacing: .05em; }
.tally .badge.singer { background: #8b5cf6; color: #fff; box-shadow: 0 0 18px rgba(139, 92, 246, .6); }
.tally .badge.info { text-transform: uppercase; }

/* ---------- full-screen effects ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
#play.shake { animation: shakeS .4s ease; }
#play.shake-big { animation: shakeB .6s ease; }
@keyframes shakeS { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
@keyframes shakeB { 10% { transform: translate(-12px, 4px) rotate(-1deg); } 25% { transform: translate(11px, -5px) rotate(1deg); } 40% { transform: translate(-9px, 3px); }
  55% { transform: translate(7px, -2px); } 70% { transform: translate(-4px, 1px); } }
.crack-flash { background: rgba(239, 68, 68, .18); animation: fadeOut .5s ease forwards; }
.shatter-fx { animation: shatterFlash 1.9s ease forwards; }
@keyframes shatterFlash { 0% { background: rgba(255, 255, 255, .95); } 12% { background: rgba(239, 68, 68, .22); } 100% { background: transparent; } }
.shatter-fx i { position: absolute; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(40, 48, 58, .35), 0 0 6px rgba(255, 255, 255, .8);
  transform: translate(-50%, -50%); animation: shardFly 1.6s cubic-bezier(.15, .7, .4, 1) forwards; }
@keyframes shardFly { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.4) rotate(0); }
  70% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r)); } }
.disco-fx { animation: discoFade 2s ease forwards; }
.disco-fx .beams { position: absolute; inset: -50%; mix-blend-mode: multiply; opacity: .55;
  background: conic-gradient(from 0deg, transparent 0 8deg, #ff3b8d 10deg 18deg, transparent 20deg 52deg, #3bc9ff 54deg 62deg, transparent 64deg 98deg,
    #ffe14a 100deg 108deg, transparent 110deg 150deg, #7dff6a 152deg 160deg, transparent 162deg 200deg, #b26bff 202deg 210deg, transparent 212deg 250deg,
    #ff3b8d 252deg 260deg, transparent 262deg 300deg, #3bc9ff 302deg 310deg, transparent 312deg 360deg);
  animation: beamSpin 2s linear forwards; }
.disco-fx b { position: absolute; width: 22px; height: 22px; border-radius: 50%; filter: blur(2px); opacity: 0; animation: spotBlink .7s ease-in-out 3 alternate; }
@keyframes beamSpin { to { transform: rotate(140deg); } }
@keyframes spotBlink { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: .9; transform: scale(1.6); } }
@keyframes discoFade { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.chip.pick { background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.chip.pick.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.solo-picks { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.chips.small { justify-content: center; gap: 6px; }
.chips.small .chip { padding: 6px 12px; font-size: 14px; }
.ghost-circle.hint-btn { border-color: var(--accent); color: var(--accent); animation: pop .4s; }
.ghost-circle.hint { font-size: 14px; line-height: 1.25; }
.ghost-circle.hint b { font-size: 17px; letter-spacing: .04em; }

/* ---------- Journey ---------- */
.journey-btn small, #btnJourney small { display: block; font-size: 14px; font-weight: 700; opacity: .7; margin-top: 2px; }
.journey-btn { background: linear-gradient(135deg, #18122b, #2b1746 55%, #4a1c35); color: #fff !important; border-color: transparent !important; }
#journey { padding-bottom: 0; }
#journey .bar { position: sticky; top: 0; z-index: 3; }
.j-total { margin-left: auto; font-weight: 900; font-size: 20px; color: #e8a400; }
.j-map { display: flex; flex-direction: column; gap: 18px; padding: 20px 0 60px; width: 100%; max-width: 480px; margin: 0 auto; }
.j-row { display: flex; flex-direction: column; align-items: center; transform: translateX(var(--x)); }
.j-node { position: relative; width: 74px; height: 74px; border-radius: 50%; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 6px 0 rgba(20, 20, 30, .18); }
.j-node.done { background: #fff6dc; border-color: #e8a400; }
.j-node.current { background: var(--accent); border-color: var(--accent); color: #fff; animation: jPulse 1.6s ease-in-out infinite; }
.j-node.locked { background: #eceae6; border-color: #d9d6d0; color: #b0aca5; box-shadow: none; font-size: 20px; }
.j-node.boss { width: 88px; height: 88px; border-width: 4px; }
.j-node.boss:not(.locked):not(.current) { background: #18122b; color: #fff; border-color: #e8a400; }
.j-icon { position: absolute; top: -12px; right: -10px; font-size: 24px; }
.j-st { position: absolute; bottom: -20px; font-size: 15px; color: #e8a400; letter-spacing: 1px; white-space: nowrap; }
.j-name { margin-top: 22px; font-size: 14px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
@keyframes jPulse { 50% { box-shadow: 0 0 0 12px rgba(255, 77, 46, .18), 0 6px 0 rgba(20, 20, 30, .18); } }
.j-overlay { position: fixed; inset: 0; z-index: 30; background: rgba(20, 16, 30, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.j-overlay[hidden] { display: none; }
.j-card { width: 100%; max-width: 400px; text-align: center; display: flex; flex-direction: column; gap: 10px; padding: 26px 20px; animation: pop .35s; }
.j-card h2 { margin: 0; font-size: 30px; }
.j-big-icon { font-size: 48px; }
.j-stars { display: flex; justify-content: center; gap: 6px; font-size: 34px; color: #ddd8cf; }
.j-stars .on { color: #e8a400; }
.j-stars.big { font-size: 70px; gap: 10px; }
.j-stars.big span { animation: starIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.j-stars.big span.on { text-shadow: 0 0 22px rgba(232, 164, 0, .6); }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.j-result { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; text-align: center; }
.j-count { font-size: 22px; margin: 0; }
.j-dots { display: inline-flex; gap: 5px; align-items: center; }
.j-dots i { width: 13px; height: 13px; border-radius: 50%; background: #e2dfda; display: block; }
.j-dots i.ok { background: var(--green); }
.j-dots i.miss { background: var(--red); }
.j-dots i.now { background: var(--ink); animation: jPulse 1.6s infinite; }
.j-dots i.goal { outline: 2px solid #e8a400; outline-offset: 2px; }
.lives[hidden] { display: none; }
.pass-rule { display: block; margin: -4px 2px 0; font-size: 13px; }
/* broken glass, about 3 seconds */
.shatter-fx { animation: shatterFlash 3.2s ease forwards; }
@keyframes shatterFlash { 0% { background: rgba(255, 255, 255, .95); } 8% { background: rgba(239, 68, 68, .28); } 60% { background: rgba(239, 68, 68, .12); } 100% { background: transparent; } }
.shatter-fx .cracks { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.5;
  filter: drop-shadow(0 0 1px #2a3038) drop-shadow(0 0 4px rgba(0, 0, 0, .35)); stroke-dasharray: 3000; stroke-dashoffset: 3000;
  animation: crackRun .35s ease-out forwards, crackFade 3.2s ease forwards; }
@keyframes crackRun { to { stroke-dashoffset: 0; } }
@keyframes crackFade { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
.shatter-fx i { position: absolute; transform: translate(-50%, -50%); border-radius: 0; box-shadow: none;
  background: linear-gradient(135deg, #fff 0%, var(--c) 35%, #7d8792 70%, #fff 100%);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .45)); animation: shardFly 2.9s cubic-bezier(.2, .6, .4, 1) forwards; opacity: 0; }
@keyframes shardFly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.3) rotate(0); }
  35% { opacity: 1; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(calc(var(--r) * .4)); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + var(--fall))) scale(.9) rotate(var(--r)); } }
/* board lobby: start button on top, smaller QR once players are in */
#turnBody { overflow-y: auto; }
.start-btn { width: 100%; max-width: 520px; font-size: 26px; padding: 18px; animation: pop .4s; }
.start-btn:not([disabled]) { box-shadow: 0 0 0 0 rgba(255, 77, 46, .5); animation: startPulse 1.8s ease-in-out infinite; }
@keyframes startPulse { 50% { box-shadow: 0 0 0 14px rgba(255, 77, 46, 0); } }
.lobby-join { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.lobby-join.small { flex-direction: row; gap: 16px; text-align: left; }
.lobby-join.small .qr { width: min(150px, 18vh); }
.lobby-join.small .qr svg { width: 100%; height: auto; }
.lobby-join.small .code-label { font-size: 18px; }
.lobby-join.small p { margin: 6px 0 0; font-size: 14px; }
.lobby-join.small .qr { flex: none; width: auto; padding: 8px; }
#board .lobby-join.small .qr svg, .lobby-join.small .qr svg { width: min(140px, 17vh); height: auto; }
/* game over: room to breathe between the records and the buttons */
#turnBody .records { width: 100%; max-width: 520px; margin: 10px 0 8px; }
#turnBody .records h3 { margin: 0 0 10px; }
#turnBody .records .scores { gap: 10px; }
.end-actions { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.end-actions .big { width: 100%; }
#board .gain + .muted { margin: 0 0 6px; }
.turn-body { width: 100%; display: flex; flex-direction: column; align-items: center; }
.fix button { font-size: 15px; padding: 6px 14px; background: none; border: 1px dashed var(--line); color: var(--muted); }
/* board, during a song: clear sections with room between them */
.turn-body { flex: 1; justify-content: center; }
.live { width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 22px; padding: 8px 0; }
.live-main { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.live-main .worth { margin-top: 0; }
.live-sec { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.live-sec .kicker { margin: 0; }
.reveal-now { background: none; border: 1px dashed var(--line); color: var(--muted); font-size: 16px; padding: 10px 18px; }
#board .live .live-timer { font-size: min(140px, 13vh, 16vw); }
#board .live .worth { font-size: min(30px, 3.6vh); }
/* board, after a song: room between the song, the links, the fix button and the buttons */
#board .reveal { gap: min(10px, 1.2vh); }
#board .reveal .song-links { margin: min(8px, 1vh) 0 0; }
#board .fix { margin-top: min(10px, 1.2vh); }
#board .judge { max-width: 560px; margin-top: min(18px, 2.2vh); gap: 16px; }
#board .judge button { white-space: nowrap; }
/* board panels keep a margin inside, and the video never takes more than about a third of the height */
#board .turn-panel { padding-bottom: max(18px, 2.4vh); }
#board .video-box { max-height: 34vh; width: auto; max-width: 100%; aspect-ratio: 16 / 9; height: min(34vh, 260px); }
/* who is playing: always visible at the top */
#whoBadge { position: fixed; top: max(4px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 40; pointer-events: none;
  font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px;
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(6px); }
#whoBadge b { color: var(--ink); }
#whoBadge span { opacity: .75; }
.screen { padding-top: calc(16px + 22px + env(safe-area-inset-top)); }
.j-map { gap: 30px; padding-top: 28px; }
.lb-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; text-align: center; padding: 22px 18px; animation: pop .3s; }
.lb-card h2 { margin: 0; font-size: 28px; }
.lb-list { text-align: left; max-height: 52vh; overflow: auto; }
.lb-list li { padding: 9px 12px; }
.lb-list .nm { font-size: 18px; }
.lb-list .pts { font-size: 20px; }
.lb-list li.gap { justify-content: center; border: 0; background: none; padding: 0; color: var(--muted); }
.j-total { font-size: 18px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }

/* ---------- My profile ---------- */
.me-grid { display: grid; gap: 14px; width: 100%; }
@media (min-width: 760px) { .me-grid { grid-template-columns: 1fr 1fr; } }
.me-card { display: flex; flex-direction: column; gap: 14px; }
.me-top { display: flex; align-items: center; gap: 16px; }
.me-avatar { width: 76px; height: 76px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 38px; font-weight: 900; box-shadow: 0 8px 22px rgba(40, 20, 60, .25); }
.me-name { font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.me-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.me-stat { background: linear-gradient(135deg, #18122b, #2b1746 60%, #4a1c35); color: #fff; border-radius: 14px; padding: 10px 6px; text-align: center; }
.me-stat b { display: block; font-size: 22px; font-weight: 900; }
.me-stat span { font-size: 12px; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }
.me-acct { display: flex; gap: 14px; justify-content: center; }
.me-acct .ghost { font-size: 15px; }
.me-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.me-head h3 { margin: 0; }
.me-head .ghost { font-size: 15px; font-weight: 800; color: var(--accent); }
#me .chips.small { justify-content: flex-start; }
.me-know { display: flex; flex-direction: column; gap: 8px; }
.me-bar-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; font-weight: 700; }
.me-bar-row i { height: 10px; border-radius: 999px; background: #ece9e4; overflow: hidden; display: block; }
.me-bar-row b { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #ffb347); }
.me-link { font-size: 17px; font-weight: 800; }
/* ---------- avatars ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), 0 2px 6px rgba(30, 20, 50, .15); overflow: hidden; }
.avatar svg { width: 74%; height: 74%; }
.avatar.big { width: 84px; height: 84px; }
.avatar.small { width: 30px; height: 30px; }
.avatar.tiny { width: 20px; height: 20px; vertical-align: -5px; margin-right: 6px; box-shadow: none; }
.me-avatar { position: relative; width: auto; height: auto; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 50%; }
.me-avatar .av-edit { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; }
.av-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 22px 18px; }
.av-card h2 { margin: 0; }
.av-now { display: flex; justify-content: center; }
.av-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.av-opt { padding: 3px; border-radius: 50%; border: 2px solid transparent; background: none; }
.av-opt.on { border-color: var(--accent); }
.av-opt .avatar { width: 100%; height: auto; aspect-ratio: 1; }
.av-colors { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.av-col { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.av-col.on { box-shadow: 0 0 0 3px var(--accent); }
#scoreList li .avatar { margin-right: 2px; }
.av-card .judge button { font-size: 17px; padding: 12px; white-space: nowrap; }
.me-acct .me-del { color: var(--red); }
#whoBadge { pointer-events: auto; cursor: pointer; font: inherit; font-size: 13px; }
#whoBadge em { font-style: normal; font-weight: 800; color: var(--accent); margin-left: 2px; }
.acct-why { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 17px; }
.me-rename { font-size: 18px; padding: 0 4px; color: var(--accent); vertical-align: 3px; }
.mini-artist.add-slot { background: none; border: 0; padding: 0; cursor: pointer; }
.mini-artist.add-slot .ball { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: var(--accent);
  border: 2px dashed var(--accent); background: #fff; animation: jPulse 1.6s ease-in-out infinite; }
.mini-artist.locked-slot .ball { display: flex; align-items: center; justify-content: center; font-size: 22px; background: #eceae6; border: 2px dashed #d9d6d0; }
.mini-artist.locked-slot span { color: var(--muted); font-size: 12px; }
/* setup on wide screens: three columns (Songs & music · Years · Answers), Start below */
@media (min-width: 900px) {
  #setup.screen.active { display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; gap: 16px; max-width: 1200px; }
  #setup .bar, #setup #startGame, #setup #recordsCard { grid-column: 1 / -1; }
  #setup #recordsCard { grid-row: auto; }
  #setup .card { margin: 0; }
}
#answerModes .chip { white-space: normal; text-align: left; }
/* home: one short line under each mode */
#home .stack .big small { display: block; font-size: 14px; font-weight: 600; opacity: .65; margin-top: 3px; line-height: 1.25; }
#home .stack .big { padding-top: 14px; padding-bottom: 14px; }
/* ---------- login / new player ---------- */
#account { justify-content: center; align-items: center; }
#account .bar { position: absolute; top: calc(16px + 22px + env(safe-area-inset-top)); left: 16px; }
#account .sr-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.acct-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 26px 22px 18px; text-align: center; }
.acct-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.acct-badge { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 10px 26px rgba(255, 77, 46, .35); }
.acct-badge svg { width: 100%; height: 100%; animation: spin 6s linear infinite; }
.acct-hero h1 { margin: 4px 0 0; font-size: 32px; letter-spacing: -.02em; }
.acct-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.acct-perks span { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: #f3f0ea; color: var(--ink); }
.acct-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f1eee8; border-radius: 14px; padding: 4px; gap: 4px; }
.acct-tabs button { border: 0; background: none; padding: 10px; border-radius: 10px; font-weight: 800; font-size: 16px; color: var(--muted); }
.acct-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(20, 20, 30, .1); }
.acct-card .col-form { gap: 10px; }
.acct-card .col-form input { text-align: left; font-size: 18px; padding: 14px 16px; }
.acct-hint { text-align: left; font-size: 13px; margin: -2px 2px 2px; }
.acct-guest { font-size: 16px; font-weight: 800; color: var(--muted); padding: 6px; }
#acctPass { width: 100%; max-width: 420px; }
#account .acct-guest { font-size: 16px !important; }
.acct-perks span { display: inline-flex; gap: 4px; align-items: center; }
#home .stack .big small { font-size: 15px; font-weight: 700; opacity: .85; margin-top: 4px; letter-spacing: 0; }
#home .stack .big:not(.primary):not(.journey-btn) small { color: #5a5550; opacity: 1; }
#home .stack .big small { word-spacing: 1px; }
#home .stack .big small { font-size: 14.5px; }
