/* JoyForge Sound jukebox. Brand colors from the approved kit; DJ pages are always dark. */
:root {
  --ground: #14101c;
  --panel: #1f1929;
  --panel-2: #2a2236;
  --text: #f5f1fa;
  --quiet: #b0a6c0;
  --hairline: #342b45;
  --sound: #3df5ff;
  --hot: #ff2e7e;
  --warm: #ffd23f;
  --good: #3ce0c4;
  --gradient: linear-gradient(120deg, #ff2e7e, #ff7a3d 58%, #ffd23f);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--font); }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; }
input:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--sound); outline-offset: 2px; }
.hidden { display: none !important; }
.quiet { color: var(--quiet); }
.mark { width: 28px; height: 28px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.01em; }
.brand b { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- guest ---------- */
.g-top { position: sticky; top: 0; z-index: 5; background: rgba(20, 16, 28, 0.94); backdrop-filter: blur(8px); padding: 12px 16px 10px; border-bottom: 1px solid var(--hairline); }
.g-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-event { font-size: 13px; color: var(--quiet); margin-top: 2px; }
.lang { display: flex; border: 1px solid var(--hairline); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: 0; padding: 6px 10px; font-size: 13px; color: var(--quiet); }
.lang button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.g-round { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.g-round h1 { font-size: 22px; margin: 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); font-size: 15px; }
.timer.closing { background: var(--hot); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.7; } }
.dots { display: flex; gap: 6px; margin-left: auto; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sound); }
.dot.used { background: var(--sound); }
.status { margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--hairline); font-size: 15px; line-height: 1.35; }
.status.open { border-color: var(--good); }
.status.closing { border-color: var(--hot); }
.status.locked { border-color: var(--warm); }
.status strong { display: block; font-size: 17px; margin-top: 4px; }
.np { margin: 10px 16px 0; font-size: 14px; color: var(--quiet); }
.np b { color: var(--text); font-weight: 600; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; background: var(--warm); color: #14101c; font-weight: 600; padding: 12px 14px; border-radius: 12px; transition: opacity 0.3s; }
.offline { background: var(--hot); color: #fff; padding: 8px 16px; font-size: 14px; text-align: center; }
.search { margin: 14px 16px 0; }
.search input { width: 100%; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--hairline); background: var(--panel); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--ground); border-color: var(--text); }
.list { list-style: none; margin: 8px 0 96px; padding: 0 16px; }
.song { display: flex; align-items: center; gap: 10px; padding: 12px; margin-top: 8px; background: var(--panel); border: 1px solid var(--hairline); border-left: 4px solid var(--c, var(--sound)); border-radius: 14px; }
.song.mine { background: var(--panel-2); }
.song-main { flex: 1; min-width: 0; }
.song-title { font-weight: 700; font-size: 16px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.song-sub { font-size: 13px; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-count { font-size: 12px; color: var(--quiet); margin-top: 4px; }
.song-count b { color: var(--text); }
.vote { display: flex; align-items: center; gap: 6px; }
.vote button { width: 44px; height: 44px; border-radius: 12px; border: 0; font-size: 22px; font-weight: 700; line-height: 1; }
.vote .plus { background: var(--sound); color: #14101c; }
.vote .minus { background: transparent; color: var(--text); border: 2px solid var(--quiet) !important; }
.vote button:disabled { opacity: 0.3; }
.vote .plus, .vote .minus { position: relative; }
.vote .plus::before, .vote .plus::after, .vote .minus::before { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 3px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
.vote .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.vote .n { min-width: 18px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.vote .ghost { visibility: hidden; } /* − and the count keep their space before the first vote */
.empty { text-align: center; color: var(--quiet); padding: 32px 0; }
.foot { text-align: center; font-size: 12px; color: var(--quiet); padding: 24px 16px 40px; }
.foot a { color: var(--quiet); }

/* ---------- big screen (16:9) ---------- */
.screen { width: 100vw; height: 100vh; overflow: hidden; display: grid; grid-template-columns: 1fr 30vw; grid-template-rows: auto minmax(0, 1fr) auto; gap: 2vh 3vw; padding: 4vh 4vw; background: radial-gradient(120vw 80vh at 10% -10%, #2b1640 0%, var(--ground) 60%); }
.s-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.s-title { font-size: 4.6vh; font-weight: 800; line-height: 1.05; }
.s-title small { display: block; font-size: 2.4vh; font-weight: 500; color: var(--quiet); margin-top: 0.8vh; line-height: 1.2; }
.s-state { display: flex; align-items: center; gap: 1.5vw; font-size: 3vh; font-weight: 700; }
.s-pill { padding: 0.8vh 1.6vw; border-radius: 999px; background: var(--panel-2); font-variant-numeric: tabular-nums; }
.s-pill.open { background: var(--good); color: #14101c; }
.s-pill.closing { background: var(--hot); color: #fff; animation: pulse 1s infinite; }
.s-pill.locked { background: var(--warm); color: #14101c; }
.s-board { display: flex; flex-direction: column; gap: 1.6vh; justify-content: center; }
.bar { position: relative; display: grid; grid-template-columns: 5vh 1fr auto; align-items: center; gap: 1.5vw; height: 10vh; padding: 0 2vw; border-radius: 2vh; background: var(--panel); overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--c); opacity: 0.28; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.bar > :not(.bar-fill) { position: relative; }
.bar-rank { font-size: 4vh; font-weight: 800; color: var(--c); }
.bar-name { min-width: 0; }
.bar-title { font-size: 3.6vh; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-artist { font-size: 2.3vh; line-height: 1.3; margin-top: 0.3vh; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-pct { min-width: 3.2ch; text-align: right; font-size: 4.4vh; font-weight: 800; font-variant-numeric: tabular-nums; }
.bar.empty-bar { opacity: 0.35; }
.s-side { display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 1.6vh; min-height: 0; overflow: hidden; }
/* The QR is sized by height and may shrink, so the column never overflows (brand and the picks box stay whole). */
.qr { height: min(26vw, 46vh); width: auto; flex: 0 1 auto; min-height: 14vh; box-sizing: border-box; aspect-ratio: 1; background: #fff; border-radius: 2vh; padding: 1.2vh; }
.qr img { width: auto; height: 100%; aspect-ratio: 1; display: block; }
.s-scan { font-size: 4vh; font-weight: 800; text-align: center; line-height: 1.1; }
.s-scan small { display: block; font-size: 2.2vh; color: var(--quiet); font-weight: 500; margin-top: 0.6vh; }
.s-url { font-size: 2.2vh; font-weight: 700; color: var(--sound); text-align: center; overflow-wrap: normal; word-break: keep-all; }
/* With the Suggested box showing, the QR gives up room so everything fits on one screen. */
.s-side:has(.s-picks:not(.hidden)) .qr { height: min(22vw, 30vh); }
.s-side:has(.s-picks:not(.hidden)) .s-scan { font-size: 3.2vh; }
.bar.hint-bar { opacity: 1; }
.bar.hint-bar .bar-title { color: var(--sound); }
.bar.wait-bar .bar-title { color: var(--quiet); font-weight: 600; }
.s-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: 3vh; color: var(--quiet); }
.s-foot b { color: var(--text); }
.s-winner { grid-column: 1; display: flex; flex-direction: column; justify-content: center; gap: 2vh; }
.s-winner .label { font-size: 3.2vh; color: var(--warm); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.s-winner .wt { font-size: 9vh; font-weight: 800; line-height: 1.15; padding-bottom: 0.08em; color: var(--warm); text-shadow: 0 0 3vh rgba(255, 210, 63, 0.35); }
.s-winner .wa { font-size: 4.5vh; font-weight: 600; }
.s-banner { position: fixed; left: 0; right: 0; bottom: 0; padding: 1.6vh 4vw; background: var(--gradient); color: #14101c; font-size: 4vh; font-weight: 800; text-align: center; }
.s-cd { padding: 0.8vh 1.6vw; border-radius: 999px; background: var(--gradient); color: #14101c; font-variant-numeric: tabular-nums; }
.cd.big { font-size: 64px; line-height: 1.1; padding: 14px; }
.cd { margin: 8px 16px 0; padding: 10px 14px; border-radius: 14px; background: var(--gradient); color: #14101c; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.s-offline { position: fixed; top: 2vh; right: 2vw; background: var(--hot); color: #fff; padding: 1vh 1.5vw; border-radius: 1vh; font-size: 2.2vh; }

/* ---------- DJ console ---------- */
.dj { max-width: 980px; margin: 0 auto; padding: 16px; }
.card { background: var(--panel); border: 1px solid var(--hairline); border-radius: 16px; padding: 16px; margin-top: 14px; }
.card h2 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; background: var(--panel-2); min-height: 44px; }
.btn.primary { background: var(--sound); color: #14101c; }
.btn.hot { background: var(--hot); color: #fff; }
.btn.warm { background: var(--warm); color: #14101c; }
.btn.small { padding: 6px 10px; min-height: 32px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: 0.35; }
.light { width: 10px; height: 10px; border-radius: 50%; background: var(--hot); display: inline-block; }
.light.on { background: var(--good); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kv div { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.kv b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.kv span { font-size: 12px; color: var(--quiet); }
.kv label { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; height: 100%; }
.kv label input { width: 100%; }
.count-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--quiet); }
input[type="file"] { width: 100%; padding: 10px; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 700; border: 0; border-radius: 9px; padding: 8px 12px; margin-right: 12px; background: var(--panel-2); color: var(--text); cursor: pointer; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.rows li:first-child { border-top: 0; }
.rows .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .num { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 32px; text-align: right; }
.rows li.off .grow { opacity: 0.45; text-decoration: line-through; }
.field { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field input[type="text"], .field input[type="password"], .field input[type="number"] { flex: 1; min-width: 160px; }
textarea { width: 100%; min-height: 120px; }
.links a { color: var(--sound); word-break: break-all; }
.dj-winner { font-size: 20px; font-weight: 800; }

/* ---------- New Year's countdown (big screen) ---------- */
.nye { position: fixed; inset: 0; z-index: 30; overflow: hidden; background: #14101c; display: grid; place-items: center; text-align: center; --heat: 0; animation: nye-in 0.8s ease-out; }
.nye.fade { opacity: 0; transition: opacity 1.2s ease; }
@keyframes nye-in { from { opacity: 0; } }
.nye-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.nye-blob { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(8vmax); z-index: 1; opacity: calc(0.34 + var(--heat) * 0.35); transition: opacity 0.5s; }
.nye-blob.a { background: #ff3dcb; left: -20vmax; top: -25vmax; animation: nye-drift-a 18s ease-in-out infinite alternate; }
.nye-blob.b { background: #3df5ff; right: -25vmax; bottom: -30vmax; opacity: calc(0.26 + var(--heat) * 0.35); animation: nye-drift-b 22s ease-in-out infinite alternate; }
.nye.final .nye-blob { animation-duration: 6s, 6s; }
@keyframes nye-drift-a { to { transform: translate(25vw, 20vh) scale(1.15); } }
@keyframes nye-drift-b { to { transform: translate(-20vw, -15vh) scale(1.2); } }
.nye-logo { position: absolute; top: 5vh; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; align-items: center; gap: 0.6vw; font-size: 4vh; font-weight: 800; color: #f5f1fa; letter-spacing: -0.02em; }
.nye-logo img { height: 5vh; filter: drop-shadow(0 0 1vh rgba(61, 245, 255, 0.7)); }
.nye-logo b { color: #ff3dcb; text-shadow: 0 0 1.2vh #ff3dcb, 0 0 3vh rgba(255, 61, 203, 0.6); }
.nye-num { position: relative; z-index: 3; font-size: 42vh; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; color: #f5f1fa; text-shadow: 0 0 2vh rgba(245, 241, 250, 0.45), 0 0 6vh rgba(255, 61, 203, 0.35); }
.nye-num.pop { animation: nye-pop 0.6s cubic-bezier(.2, 1.6, .4, 1); }
.nye-num.tenth { color: #3df5ff; font-size: 58vh; text-shadow: 0 0 3vh #3df5ff, 0 0 9vh rgba(61, 245, 255, 0.6); }
.nye-num.tenth.pop { animation: nye-pop-big 0.8s cubic-bezier(.2, 1.8, .4, 1); }
.nye-num.last { font-size: 64vh; }
.nye-num.last.odd { color: #3df5ff; text-shadow: 0 0 3vh #3df5ff, 0 0 10vh rgba(61, 245, 255, 0.7); }
.nye-num.last.even { color: #ff3dcb; text-shadow: 0 0 3vh #ff3dcb, 0 0 10vh rgba(255, 61, 203, 0.7); }
.nye-num.last.pop { animation: nye-punch 0.9s cubic-bezier(.15, 1.7, .35, 1); }
.nye-num.last.shake.pop { animation: nye-punch 0.9s cubic-bezier(.15, 1.7, .35, 1), nye-shake 0.5s linear; }
@keyframes nye-pop { from { transform: scale(1.12); } }
@keyframes nye-pop-big { from { transform: scale(1.5); filter: brightness(2); } }
@keyframes nye-punch { 0% { transform: scale(1.6); filter: brightness(2.2); } 30% { filter: none; } 100% { transform: scale(1); } }
@keyframes nye-shake { 0%, 100% { translate: 0 0; } 20% { translate: -1.2vh 0.6vh; } 40% { translate: 1vh -0.8vh; } 60% { translate: -0.8vh -0.4vh; } 80% { translate: 0.6vh 0.8vh; } }
.nye-ring { position: absolute; z-index: 2; left: 50%; top: 50%; width: 40vh; height: 40vh; margin: -20vh 0 0 -20vh; border-radius: 50%; border: 1.2vh solid #3df5ff; opacity: 0; filter: blur(0.4vh); }
.nye-ring.even { border-color: #ff3dcb; }
.nye-ring.go { animation: nye-ring 1s ease-out; }
@keyframes nye-ring { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(3); opacity: 0; } }
.nye-label { position: absolute; z-index: 3; bottom: 12vh; left: 0; right: 0; font-size: 5vh; font-weight: 700; color: #b0a6c0; transition: opacity 0.8s; }
.nye-label.gone { opacity: 0; }
.nye-flash { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; --op: 0.85; }
.nye-flash.go { animation: nye-flash 1.4s ease-out; }
@keyframes nye-flash { from { opacity: var(--op); } to { opacity: 0; } }
.nye-year { position: relative; z-index: 3; font-size: 32vh; font-weight: 800; line-height: 1; color: #fff; letter-spacing: -0.03em; text-shadow: 0 0 3vh rgba(255, 255, 255, 0.7), 0 0 10vh rgba(255, 61, 203, 0.6); animation: nye-year 1s cubic-bezier(.3, 1.6, .5, 1) both; margin-bottom: 16vh; }
@keyframes nye-year { from { transform: scale(0.2); opacity: 0; filter: blur(3vh); } }
.nye.done { align-content: center; }
.nye-done { position: absolute; z-index: 3; bottom: 12vh; left: 0; right: 0; }
.nye-pl { font-size: 9.5vh; font-weight: 800; color: #ff3dcb; text-shadow: 0 0 1.5vh #ff3dcb, 0 0 5vh rgba(255, 61, 203, 0.6); animation: nye-beat 0.5s ease-in-out 2.5s infinite alternate; }
.nye-pl span { display: inline-block; opacity: 0; animation: nye-letter 0.5s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes nye-letter { from { opacity: 0; transform: translateY(4vh) scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes nye-beat { to { transform: scale(1.05); } }
.nye-en { font-size: 6.4vh; font-weight: 700; color: #3df5ff; margin-top: 1.5vh; text-shadow: 0 0 1.5vh rgba(61, 245, 255, 0.8); opacity: 0; animation: nye-letter 0.8s ease-out 1.8s forwards; }
@media (prefers-reduced-motion: reduce) { .nye-blob { animation: none; } }
.cd-big { font-size: 40px; font-weight: 800; color: var(--text) !important; font-variant-numeric: tabular-nums; }

/* ---------- ✨ Fits right now (suggestions) ---------- */
/* Phone "Leading now" card: top 3 with bars and percentages, like the big screen. */
.lead { margin: 10px 16px 2px; padding: 8px 10px 10px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); }
.lead-head { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; color: inherit; font: inherit; padding: 2px 2px 6px; text-align: left; cursor: pointer; }
.lead-title-h { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lead-total { margin-left: auto; flex: none; color: var(--quiet); font-size: 13px; white-space: nowrap; }
.lead-more { color: var(--sound); font-size: 18px; font-weight: 700; line-height: 1; }
.lead-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.lead-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 10px 4px 8px; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, 0.04); }
.lead-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), color-mix(in srgb, var(--c) 20%, transparent)); border-radius: 10px; transition: width 0.4s ease; }
.lead-row > :not(.lead-fill) { position: relative; }
.lead-rank { flex: none; width: 18px; text-align: center; font-weight: 800; color: var(--c); }
.lead-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.lead-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-artist { font-size: 12px; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-pct { flex: none; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.lead-row.mine { box-shadow: inset 0 0 0 2px var(--sound); }
.lead-row.won { box-shadow: inset 0 0 0 2px #ffd23f; }
.lead-note { margin: 6px 2px 0; font-size: 13px; color: var(--quiet); }
.picks { margin: 12px 16px 4px; padding: 12px 12px 4px; border-radius: 18px; background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, linear-gradient(120deg, #3df5ff, #ff3dcb) border-box; border: 2px solid transparent; box-shadow: 0 0 24px rgba(61, 245, 255, 0.18); }
.picks-head { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 4px; }
.picks-title { font-size: 18px; font-weight: 800; color: var(--sound); }
.picks-sub { font-size: 13px; color: var(--quiet); }
.picks-list { padding: 0; margin: 0; }
.picks-list .song { background: var(--panel); }
.song-why { margin-top: 3px; font-size: 13px; color: var(--sound); font-weight: 600; }
.pick-tag { display: inline-block; vertical-align: 2px; margin-right: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; color: #14101c; background: var(--sound); }
.song.picked { border-left-color: var(--sound); box-shadow: inset 0 0 0 1px rgba(61, 245, 255, 0.35); }
.s-picks { width: 100%; padding: 1.4vh 1.2vw; border-radius: 2vh; border: 0.3vh solid rgba(61, 245, 255, 0.6); background: rgba(61, 245, 255, 0.06); box-shadow: 0 0 3vh rgba(61, 245, 255, 0.15); }
.s-picks-head { font-size: 2.6vh; font-weight: 800; color: var(--sound); margin-bottom: 0.6vh; }
.s-picks-head small { margin-left: 0.6vw; font-size: 1.8vh; font-weight: 500; color: var(--quiet); }
.s-pick { margin-top: 0.8vh; font-size: 2.2vh; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-pick span { color: var(--quiet); margin-left: 0.5vw; }
.s-pick i { display: block; margin-top: 0.2vh; font-size: 1.7vh; line-height: 1.25; font-style: normal; color: var(--sound); opacity: 0.85; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* DJ console: suggested + steering */
.ai-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; background: var(--panel-2); }
.ai-bar .grow { flex: 1 1 220px; }
h3.sub { margin: 14px 0 8px; font-size: 14px; color: var(--quiet); text-transform: uppercase; letter-spacing: 0.04em; }
.steer-note { display: flex; gap: 8px; margin-top: 10px; }
.steer-note input { flex: 1; min-width: 0; }

/* ---------- optional nicknames ---------- */
.g-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.me { min-width: 0; background: var(--panel-2); border: 0; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--text); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me.empty { color: var(--quiet); font-weight: 500; }
.sheet { position: fixed; inset: 0; z-index: 15; background: rgba(10, 8, 16, 0.72); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.sheet-card { width: 100%; max-width: 440px; background: var(--panel); border-radius: 18px; padding: 20px; display: grid; gap: 12px; margin-bottom: env(safe-area-inset-bottom); }
.sheet-card h2 { margin: 0; font-size: 22px; }
.sheet-card p { margin: 0; font-size: 14px; }
.sheet-card input { font: inherit; font-size: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--ground); color: var(--text); }
.sheet-btns { display: flex; gap: 10px; justify-content: flex-end; }
.who { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; background: none; border: 0; padding: 0; }
.ini { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.02em; background: var(--panel-2); color: var(--text); border: 1px solid var(--hairline); }
.ini.more { color: var(--quiet); }
.who[aria-expanded="true"] .ini { border-color: var(--sound); }
.who-list { font-size: 12px; color: var(--quiet); margin-top: 4px; }
.s-who { font-size: 1.9vh; line-height: 1.3; color: var(--quiet); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-list { display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.person { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.person.hid { opacity: 0.5; }
.person .p-main { flex: 1; min-width: 0; }
.person .p-songs { font-size: 12px; color: var(--quiet); }
.linkish { background: none; border: 0; padding: 2px 0; color: var(--sound); font-size: 12px; font-weight: 600; }

/* ---------- big screen: round changes and quiet stretches ---------- */
.s-left { grid-column: 1; display: flex; flex-direction: column; gap: 1.6vh; min-height: 0; }
.s-left > .s-board, .s-left > .s-winner, .s-left > .s-celebrate, .s-left > .s-interlude { flex: 1; min-height: 0; }
.s-left .bar { height: 9vh; }
.s-meter { display: flex; align-items: center; gap: 1.4vw; padding: 1vh 1.4vw; border-radius: 1.6vh; background: var(--panel); }
.m-dots { display: flex; gap: 0.6vw; }
.m-dots span { width: 2.4vh; height: 2.4vh; border-radius: 50%; border: 0.35vh solid var(--sound); }
.m-dots span.on { background: var(--sound); box-shadow: 0 0 1.4vh rgba(61, 245, 255, 0.7); }
.m-text { font-size: 2.6vh; font-weight: 800; line-height: 1.15; }
.m-text small { display: block; font-size: 1.7vh; font-weight: 500; color: var(--quiet); margin-top: 0.4vh; line-height: 1.2; }
.s-meter.done { background: rgba(60, 224, 196, 0.16); }
.s-meter.done .m-dots span { border-color: var(--good); background: var(--good); box-shadow: none; }
.s-meter.done .m-text { color: var(--good); }
.s-meter.urgent { background: rgba(255, 46, 126, 0.18); animation: pulse 1s infinite; }
.s-meter.urgent .m-dots span { border-color: var(--hot); }
.s-meter.urgent .m-dots span.on { background: var(--hot); box-shadow: none; }
.bar.warm-bar { background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), var(--panel)); border: 0.25vh dashed var(--hairline); }
.bar.warm-bar .bar-rank { opacity: 0.55; }
.bar.warm-bar .bar-title { font-size: 3.2vh; }
.warm-tag { text-align: right; font-size: 2vh; font-weight: 800; color: var(--c); line-height: 1.1; }
.warm-tag small { display: block; margin-top: 0.3vh; font-size: 1.5vh; font-weight: 500; color: var(--quiet); }
.s-ticker { min-height: 8.5vh; display: flex; align-items: center; padding: 1.2vh 1.4vw; border-radius: 1.6vh; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.t-item { min-width: 0; font-size: 2.8vh; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: tickIn 0.7s cubic-bezier(.2,.8,.2,1); }
.t-item small { display: block; margin-top: 0.4vh; font-size: 1.8vh; line-height: 1.3; font-weight: 500; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; }
@keyframes tickIn { from { opacity: 0; transform: translateY(1.6vh); } to { opacity: 1; transform: none; } }
.s-celebrate { display: flex; flex-direction: column; justify-content: center; gap: 2vh; animation: celIn 0.8s cubic-bezier(.2,.8,.2,1); }
.c-label { font-size: 5vh; font-weight: 900; color: var(--warm); line-height: 1.15; }
.c-label small { display: block; font-size: 2.2vh; font-weight: 600; color: var(--quiet); margin-top: 1vh; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; }
.c-title { font-size: 8.5vh; font-weight: 900; line-height: 1.15; padding-bottom: 0.08em; white-space: nowrap; color: var(--warm); text-shadow: 0 0 3vh rgba(255, 210, 63, 0.35); overflow: hidden; text-overflow: ellipsis; }
.c-artist { margin-top: -1vh; font-size: 4vh; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-count { margin-top: 1vh; font-size: 3.2vh; font-weight: 800; line-height: 1.2; color: var(--sound); }
.c-count small { display: block; margin-top: 0.5vh; font-size: 1.9vh; line-height: 1.2; font-weight: 500; color: var(--quiet); }
.c-who { display: flex; flex-wrap: wrap; gap: 1.2vh 1vw; margin-top: 0.4vh; }
.c-ini { display: inline-grid; place-items: center; min-width: 6.4vh; height: 6.4vh; padding: 0 1vh; border-radius: 999px; font-size: 2.6vh; font-weight: 900; background: var(--panel-2); border: 0.35vh solid var(--sound); box-shadow: 0 0 2vh rgba(61, 245, 255, 0.35); opacity: 0; animation: iniIn 0.5s cubic-bezier(.2,.8,.2,1.4) forwards; }
.c-ini.more { border-color: var(--hairline); color: var(--quiet); box-shadow: none; }
.c-names { font-size: 2.4vh; line-height: 1.3; color: var(--quiet); font-weight: 600; }
@keyframes celIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes iniIn { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
.bar-artist .s-who { margin-left: 1vw; font-size: 2vh; color: var(--sound); opacity: 0.9; }
.rows .grow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.rows li > .btn, .rows li > .num { flex-shrink: 0; }

/* Big screen: one-line header and footer; room for a DJ banner; 4:3 projectors */
.s-title, .s-state, .s-foot > * { white-space: nowrap; }
.s-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.s-head { gap: 2vw; }
.s-foot { gap: 2vw; }
.s-foot > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.s-foot > :last-child { flex: none; }
body:has(.s-banner:not(.hidden)) .screen { padding-bottom: 12vh; }
@media (max-aspect-ratio: 3/2) {
  .s-title { font-size: 3.8vh; }
  .s-title small { font-size: 2vh; }
  .s-state { font-size: 2.4vh; gap: 1vw; }
  .s-foot { font-size: 2.4vh; }
  .qr, .s-side:has(.s-picks:not(.hidden)) .qr { height: min(22vw, 26vh); }
  .s-scan, .s-side:has(.s-picks:not(.hidden)) .s-scan { font-size: 2.8vh; }
  .s-url { font-size: 1.8vh; }
  .c-title { font-size: 7vh; }
}
@media (max-width: 380px) {
  .g-top { padding-left: 12px; padding-right: 12px; }
  .g-row { gap: 8px; }
  .brand { font-size: 14px; }
  .lang button { padding: 6px 8px; }
  .me { max-width: 30vw; }
}
.lang { flex: none; }
.brand { min-width: 0; }
@media (max-width: 340px) {
  .me { max-width: 24vw; padding: 6px 8px; }
  .brand > span { font-size: 13px; }
}

/* Guest: share the vote code with friends nearby */
.g-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; min-height: 26px; }
.g-sub .g-event { margin-top: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.share-btn.icon { padding: 4px 8px; font-size: 15px; line-height: 1; }
.share-sheet { align-items: center; }
.share-sheet .sheet-card { text-align: center; justify-items: center; }
.share-qr { width: min(72vw, 300px); aspect-ratio: 1; background: #fff; border-radius: 16px; padding: 12px; }
.share-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.share-url { font-size: 13px; font-weight: 700; color: var(--sound); word-break: break-all; }
.share-sheet .sheet-btns { width: 100%; justify-content: center; }

/* Big screen: light bars on the right edge, on the beat (hidden when the bridge is off or the deck is paused) */
.beat-bars { position: fixed; top: 3vh; bottom: 3vh; right: 0.6vw; width: 2.8vw; height: 94vh; z-index: 31; pointer-events: none; opacity: 0; filter: drop-shadow(0 0 1vh rgba(255, 61, 203, 0.45)); }

/* Big screen: round closed with too few votes, waiting for the DJ's next song */
.s-interlude { display: flex; flex-direction: column; justify-content: center; gap: 2vh; min-height: 0; animation: celIn 0.8s cubic-bezier(.2,.8,.2,1); }
.i-label { font-size: 5vh; font-weight: 800; line-height: 1.15; color: var(--warm); }
.i-label small { display: block; margin-top: 0.8vh; font-size: 2.2vh; font-weight: 600; line-height: 1.2; color: var(--quiet); letter-spacing: 0.04em; text-transform: uppercase; }
.i-why { font-size: 3.4vh; font-weight: 700; line-height: 1.25; }
.i-why small { display: block; margin-top: 0.5vh; font-size: 2vh; font-weight: 500; line-height: 1.25; color: var(--quiet); }
.i-sub { font-size: 2.6vh; font-weight: 700; line-height: 1.25; color: var(--sound); }
.i-next { margin-top: 1vh; padding: 1.8vh 1.6vw; border-radius: 2vh; background: var(--panel); display: grid; gap: 1.1vh; }
.i-next-head { font-size: 2.4vh; font-weight: 800; line-height: 1.2; color: var(--quiet); text-transform: uppercase; letter-spacing: 0.04em; }
.i-next-head small { margin-left: 0.8vw; font-size: 1.8vh; font-weight: 500; text-transform: none; letter-spacing: 0; }
.i-song { padding-left: 1vw; border-left: 0.5vh solid var(--c); font-size: 3vh; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i-song span { margin-left: 0.8vw; color: var(--quiet); font-size: 2.4vh; }

/* Big screen: nothing has played for a while (big welcome, night stats; the side QR stays) */
.s-left > .s-idle { flex: 1; min-height: 0; }
.s-idle { display: flex; flex-direction: column; justify-content: center; gap: 2.6vh; min-height: 0; animation: celIn 0.8s cubic-bezier(.2,.8,.2,1); }
.q-label { font-size: 6vh; font-weight: 800; line-height: 1.15; padding-bottom: 0.08em; color: #ff6a4d; text-shadow: 0 0 2.4vh rgba(255, 106, 77, 0.35); }
.q-label small { display: block; margin-top: 0.6vh; font-size: 2.4vh; font-weight: 600; line-height: 1.2; color: var(--quiet); text-shadow: none; letter-spacing: 0.04em; text-transform: uppercase; }
.q-sub { font-size: 3vh; font-weight: 700; line-height: 1.25; color: var(--sound); }
.q-sub small { display: block; margin-top: 0.5vh; font-size: 2vh; font-weight: 500; color: var(--quiet); }
.q-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4vh 1.4vw; }
.q-stat { padding: 1.6vh 1.4vw; border-radius: 1.6vh; background: var(--panel); font-size: 2.5vh; font-weight: 700; line-height: 1.3; overflow: hidden; }
.q-stat small { display: block; margin-top: 0.4vh; font-size: 1.7vh; font-weight: 500; line-height: 1.25; color: var(--quiet); }
body.is-idle .s-ticker { display: none; }

/* Guest: header is just the logo, share and a settings gear; language and name live in the settings sheet */
.gear { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--hairline); font-size: 16px; line-height: 1; padding: 0; }
.g-right .share-btn, .g-right .share-btn.icon { width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 16px; line-height: 1; }
.g-row .brand > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-right { flex: none; }
.set-card { gap: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.set-row > span:first-child { min-width: 0; font-weight: 600; }
.set-row small { display: block; font-weight: 400; font-size: 12px; line-height: 1.35; margin-top: 2px; }
.set-row .lang button { padding: 8px 12px; font-size: 14px; }
.set-row .me { max-width: 50vw; padding: 8px 12px; font-size: 14px; }
body.text-l { zoom: 1.15; }
/* Guest: lights to the beat, a thin strip under "Now playing" */
.g-beat-wrap { margin: 6px 16px 0; height: 14px; }
.g-beat { display: block; width: 100%; height: 14px; opacity: 0; transition: none; }
@media (prefers-reduced-motion: reduce) { .s-idle, .s-interlude, .s-celebrate { animation: none; } }

/* DJ console: what steering is active; on a phone, song titles get two lines instead of a few letters */
.steer-now { margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); font-size: 14px; line-height: 1.35; }
.steer-now b { color: var(--warm); }
@media (max-width: 600px) {
  .rows .grow { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .rows .grow small { -webkit-line-clamp: 2; white-space: normal; }
}
#chips { scroll-margin-top: 120px; }
.set-row[hidden], .lang button[hidden] { display: none; }
.kv .lang-boxes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.kv .lang-boxes > span { flex-basis: 100%; }
.kv .lang-boxes label { flex-direction: row; align-items: center; gap: 8px; height: auto; font-size: 15px; }
.kv .lang-boxes label input { width: 22px; height: 22px; }
/* Floating search: shows once the search box has scrolled away under the header. Bottom-left, so it never covers the + buttons. */
.fab-search { position: fixed; left: calc(16px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 12; width: 56px; height: 56px; border-radius: 999px; border: 0; background: var(--sound); color: #14101c; font-size: 24px; line-height: 1; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 18px rgba(61, 245, 255, 0.35); transition: opacity 0.2s, transform 0.2s; }
.fab-search.off { opacity: 0; transform: scale(0.6); pointer-events: none; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s; }
/* Big screen branding: small logo and name above the QR code (solid colours: gradient-clipped text can render dark on some screens). */
.s-brand { display: flex; align-items: center; gap: 0.7vw; font-size: 3vh; font-weight: 800; letter-spacing: -0.01em; color: #f5f1fa; }
.s-brand img { height: 4.4vh; filter: drop-shadow(0 0 0.8vh rgba(61, 245, 255, 0.5)); }
.s-brand b { color: #ff3dcb; }
.s-side:has(.s-picks:not(.hidden)) .s-brand { font-size: 2.4vh; }
.s-side:has(.s-picks:not(.hidden)) .s-brand img { height: 3.4vh; }
/* Vote feedback: the row stays put, pops, the count gets a ✓ once the server confirms. */
.song.mine { border-top-color: rgba(61, 245, 255, 0.35); border-right-color: rgba(61, 245, 255, 0.35); border-bottom-color: rgba(61, 245, 255, 0.35); }
.vote .n { transition: opacity 0.25s ease; }
.song.pending .vote .n { opacity: 0.5; }
.vote button:active:not(:disabled) { transform: scale(0.9); }
.vote-float { position: fixed; z-index: 30; pointer-events: none; transform: translate(-50%, 0); font-weight: 800; font-size: 18px; color: var(--sound); text-shadow: 0 0 8px rgba(61, 245, 255, 0.6); animation: voteFloat 0.8s ease-out forwards; }
.vote-float.minus { color: #ff7a3d; text-shadow: 0 0 8px rgba(255, 122, 61, 0.6); } /* taking a vote back: orange, not the "added" cyan */
@keyframes voteFloat { to { opacity: 0; transform: translate(-50%, -38px); } }
/* "Your votes" bar under the header */
.mybar { display: flex; align-items: center; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.mybar::-webkit-scrollbar { display: none; }
.mybar-label { flex: none; font-size: 12px; font-weight: 700; color: var(--quiet); }
.mychip { flex: none; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid rgba(61, 245, 255, 0.45); }
.mychip-name { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: none; border: 0; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; }
.mychip-name .t { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; }
.mychip-name .x { color: var(--sound); font-weight: 800; }
.mychip .step { position: relative; width: 30px; height: 30px; margin: 2px; border-radius: 999px; border: 0; font-size: 0; }
.mychip .step.plus { background: var(--sound); color: #14101c; }
.mychip .step.minus { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--quiet); }
.mychip .step:disabled { opacity: 0.3; }
.mychip .step::before, .mychip .step.plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
.mychip .step.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .vote-float { animation: none; opacity: 0; } }
.s-pick-wait b { color: var(--quiet); font-weight: 600; }
.dj-alarm { position: sticky; top: 0; z-index: 20; margin: 0 0 12px; padding: 14px 16px; border-radius: 12px; background: #B3261E; color: #fff; font-weight: 700; line-height: 1.35; }
.dj-warn { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 196, 0, 0.14); color: #FFD54A; font-weight: 600; }
/* Phone list stays still while others vote too: fixed-height artist/count line, fixed lead box, "Your votes" bar always there. */
.song-sub { display: flex; align-items: center; gap: 8px; height: 22px; }
.song-sub .sub-a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-sub .song-count { flex: none; margin-top: 0; white-space: nowrap; }
.song-sub .who { margin-left: 4px; }
.mybar { min-height: 34px; }
.mybar-hint { font-size: 12px; color: var(--quiet); }
.lead-row.lead-empty { background: rgba(255, 255, 255, 0.02); }
.lead-row.lead-empty .lead-rank, .lead-row.lead-empty .lead-title { color: var(--quiet); opacity: 0.5; }
.lead-row { height: 42px; }
.lead-note { min-height: 2.6em; line-height: 1.3; }
.lead-note.ghost { visibility: hidden; }

/* Song requests (guest) */
.req-ask { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 8px 0; border: 1px dashed var(--hairline); border-radius: 14px; color: var(--quiet); list-style: none; }
.req-ask b { color: var(--text); font-weight: 700; }
.my-reqs { margin: 8px 0 4px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--hairline); font-size: 14px; }
.req-head { color: var(--quiet); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.req-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.req-row.tap { cursor: pointer; }
.req-row .grow, .req-ask .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.req-chip { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--quiet); white-space: nowrap; }
.req-found { color: var(--good); border-color: var(--good); }
.req-added { color: var(--sound); border-color: var(--sound); }
.req-no { opacity: 0.6; }

/* ---------- Line icons (icons.js) instead of emoji: the same on every device, in the app's colours ---------- */
.ic { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; flex: none; }
.ic-lead { width: 1.1em; height: 1.1em; margin-right: 0.45em; vertical-align: -0.2em; color: var(--sound); }
.ic-hot { color: var(--hot); }
.ic-warm { color: var(--warm); }
.ic-orange { color: #ff7a3d; }
.ic-good { color: var(--good); }
.ic-star4 { vertical-align: -0.12em; }
.gear .ic, .g-right .share-btn .ic { width: 18px; height: 18px; color: var(--text); }
.fab-search .ic { width: 26px; height: 26px; stroke-width: 2.5; }
.me .ic { margin-right: 2px; }
.i-label .ic { color: var(--text); }
/* The AI's reason for a pick: a thin cyan rule and italics, no speech-bubble emoji. */
.song-why, .s-pick i { border-left: 2px solid var(--sound); padding-left: 8px; font-style: italic; }
.s-pick i { padding-left: 0.6vw; }

/* ---------- Vote race on the big screen (race.js) ----------
   One heat gradient spans the whole row; each bar reveals only its share, so longer bars reach hotter colours.
   Bars move with transform only (light on a Fire TV Stick): the fill slides in from the left while its gradient
   slides the other way, so the colours stay fixed to the row. */
.s-left { position: relative; }
.race-fx { position: absolute; inset: -2vh -1vw; width: calc(100% + 2vw); height: calc(100% + 4vh); pointer-events: none; z-index: 4; }
.s-board.race { --dur: 1s; --ease: cubic-bezier(.2, .8, .2, 1); --heat: linear-gradient(90deg, #1fb8d6 0%, #3df5ff 14%, #b04bff 38%, #ff3d8b 58%, #ff7f6e 78%, #ffb08a 90%, #ffe39a 100%); }
.s-board.race.snap { --dur: 0.24s; --ease: cubic-bezier(.34, 1.7, .5, 1); }
.race-row { background: #1b1625; transition: opacity 0.5s, transform 0.5s cubic-bezier(.2, .8, .2, 1); }
.race-row .bar-title, .race-row .bar-pct { text-shadow: 0 0.1vh 0.8vh rgba(20, 16, 28, 0.55); }
.race-row > .bar-fill { inset: 0; width: auto; opacity: 1; background: none; overflow: hidden; border-radius: inherit; transform: translateX(calc(var(--w, 0%) - 100%)); transition: transform var(--dur) var(--ease); }
/* Full-strength colours (0.55 read as pastel on the TV). */
.race-row > .bar-fill::before { content: ""; position: absolute; inset: 0; background: var(--heat); opacity: 0.82; transform: translateX(calc(100% - var(--w, 0%))); transition: transform var(--dur) var(--ease); }
/* The hot end, inside the bar: a light, bright glow (never a dark or brown edge), a little brighter when votes land. */
.race-row > .bar-fill::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 0.4vh; background: #fff6dc; box-shadow: 0 0 1.2vh 0.3vh rgba(255, 214, 120, 0.9); opacity: 0; transition: opacity 0.8s; }
.race-row.voted > .bar-fill::after { opacity: 0.9; }
.race-row.glow > .bar-fill::after { opacity: 1; animation: raceFlicker 3.2s ease-in-out infinite; }
.race-row.hit > .bar-fill::after { animation: raceHit 1.2s ease-out; }
@keyframes raceFlicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }
@keyframes raceHit { 0% { opacity: 1; } 100% { opacity: 0.9; } }
/* The leader's calm life between votes: a slow shimmer drifting through its heat, and a gentle steady glow. */
.race-row > .bar-fill > .flash { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.28) 70%, rgba(255, 240, 220, 0.55)); opacity: 0; mix-blend-mode: screen; }
.race-row > .bar-fill > .shine { position: absolute; top: 0; bottom: 0; left: 0; width: 35%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13), transparent); transform: translateX(-120%); opacity: 0; }
.race-row.leader > .bar-fill > .shine { opacity: 1; animation: raceShine 7s linear infinite; }
@keyframes raceShine { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
.race-row.leader { box-shadow: none; }
/* A soft heat bloom just past the hot end (follows the bar with the same move). */
.race-row > .bar-tip { position: absolute; inset: 0; pointer-events: none; transform: translateX(calc(var(--w, 0%) - 100%)); transition: transform var(--dur) var(--ease); }
.race-row > .bar-tip::after { content: ""; position: absolute; top: 0; bottom: 0; right: -3.2vh; width: 3.2vh; background: linear-gradient(90deg, rgba(255, 200, 120, 0.55), rgba(255, 90, 140, 0.2) 45%, rgba(255, 46, 126, 0)); filter: blur(6px); opacity: 0; transition: opacity 0.8s; }
.race-row.voted:not(.glow) > .bar-tip::after { opacity: 0.5; }
.race-row.glow > .bar-tip::after { opacity: 0.9; }
/* Last 20 s: a fuse in the brand's pink and lilac burns along the bottom of the leader down to the lock. */
.race-row > .fuse { position: absolute; left: 0; right: 0; bottom: 0; height: 0.5vh; background: linear-gradient(90deg, #ff2e7e, #c46bff); box-shadow: 0 0 1.2vh rgba(255, 46, 126, 0.75), 0 0 0.4vh rgba(196, 107, 255, 0.9); transform-origin: left; transform: scaleX(var(--fuse, 0)); transition: transform 0.12s linear, opacity 0.3s; opacity: 0; pointer-events: none; }
.race-row.leader.fusing > .fuse { opacity: 1; }
.race-row .bar-rank { color: var(--hot); }
.race-row .bar-artist { color: rgba(245, 241, 250, 0.82); }
.race-row .bar-pct { line-height: 1; }
.race-row .bar-pct small { display: block; margin-top: 0.4vh; text-align: right; font-size: 1.7vh; font-weight: 600; color: rgba(245, 241, 250, 0.8); }
.race-row > .plus { position: absolute; right: 13vw; top: 50%; translate: 0 -50%; font-size: 2.6vh; font-weight: 800; color: #fff; opacity: 0; pointer-events: none; }
.race-row > .plus.go { animation: racePlus 1.1s ease-out; }
@keyframes racePlus { 0% { opacity: 0; transform: translateY(1vh); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-2.6vh); } }
.race-row > .tag-lead { position: absolute; right: 19vw; top: 50%; translate: 0 -50%; font-size: 2vh; font-weight: 800; color: #2a1400; background: linear-gradient(90deg, #ff7a3d, #ffd23f); border-radius: 999px; padding: 0.4vh 1vw; opacity: 0; transform: scale(0.7); pointer-events: none; }
.race-row.takeover > .tag-lead { animation: raceTag 2.2s ease-out forwards; }
@keyframes raceTag { 0% { opacity: 0; transform: scale(0.7); } 12% { opacity: 1; transform: scale(1.12); } 22% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
/* Close race: the top two take turns kicking on the beat (race.js). Nothing here darkens the look.
   */
/* Last seconds: everyone but the leader (and a tied row) steps back a little. */
.s-board.race.late > .bar:not(.leader):not(.beat) { opacity: 0.8; }
/* The win: the others slide out, the winner sweeps to 100 % in gold with a sheen, then the winner card follows. */
.s-board.race.done > .bar:not(.win) { opacity: 0; transform: translateX(-3vw); }
.race-row.win { z-index: 2; }
.race-row.win > .bar-fill, .race-row.win > .bar-fill::before { transition-duration: 0.9s; transition-timing-function: cubic-bezier(.3, 1.2, .4, 1); }
.race-row.win > .bar-fill::before { opacity: 1; background: linear-gradient(90deg, #ff8a3d, #ffc93a 45%, #ffe27a 80%, #fff3c4); }
.race-row.win { background: #ffc93a; box-shadow: 0 0 3vh rgba(255, 201, 58, 0.45); }
.race-row.win > .bar-fill::after { right: auto; left: 0; width: 28%; opacity: 1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent); transform: translateX(-100%); animation: raceSheen 1.1s 0.9s ease-in-out forwards; }
@keyframes raceSheen { to { transform: translateX(380%); } }
.race-row.win > .bar-tip { display: none; }
.race-row.win .bar-rank, .race-row.win .bar-title, .race-row.win .bar-artist, .race-row.win .bar-pct, .race-row.win .bar-pct small, .race-row.win .s-who { color: #2a1400; }
@media (prefers-reduced-motion: reduce) {
  .race-row, .race-row > .bar-fill, .race-row > .bar-fill::before, .race-row > .bar-tip { transition: none; }
  .race-row.leader > .bar-fill > .shine, .race-row.glow > .bar-fill::after, .race-row.hit > .bar-fill::after, .race-row.takeover > .tag-lead, .race-row > .plus.go, .race-row.win > .bar-fill::after { animation: none; }
}

/* ---------- Phone: the same heat as the big screen, kept compact ---------- */
.lead-fill { background: linear-gradient(90deg, #1fb8d6 0%, #3df5ff 14%, #b04bff 38%, #ff2e7e 58%, #ff7a3d 80%, #ffd23f 100%); background-repeat: no-repeat; opacity: 0.92; overflow: hidden; border-radius: 10px 0 0 10px; }
.lead-row .lead-title, .lead-row .lead-pct { text-shadow: 0 1px 5px rgba(20, 16, 28, 0.6); }
.lead-row .lead-artist { color: rgba(245, 241, 250, 0.82); }
.lead-row .lead-fill::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent); animation: leadShine 3.2s linear infinite; }
.lead-row:nth-child(2) .lead-fill::before { animation-delay: 0.5s; }
.lead-row:nth-child(3) .lead-fill::before { animation-delay: 1s; }
.lead-row:nth-child(n+4) .lead-fill::before { animation-delay: 1.5s; }
.lead-row.lead-empty .lead-fill::before { display: none; }
@keyframes leadShine { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .lead-row .lead-fill::before { animation: none; display: none; } }
.lead-fill::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 2px; background: #fff3d0; box-shadow: 0 0 8px 1px rgba(255, 200, 110, 0.8); }
.lead-row .lead-rank { color: var(--hot); }
.tap-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
.win-flash { position: fixed; inset: 0; pointer-events: none; z-index: 45; background: radial-gradient(circle at 50% 40%, rgba(255, 210, 63, 0.55), rgba(255, 122, 61, 0.25) 45%, transparent 75%); animation: winFlash 1.2s ease-out forwards; }
@keyframes winFlash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .win-flash { animation-duration: 0.01s; } }
/* A tied round won by the song that got there first: one quiet line under the headline. */
.c-tie { font-size: 2.6vh; font-weight: 700; color: var(--hot); line-height: 1.25; }
.c-tie small { display: block; margin-top: 0.3vh; font-size: 1.8vh; font-weight: 500; color: var(--quiet); }

/* ---------- DJ console: VirtualDJ card (Step away, heads-up, mix card) ---------- */
.btn.vdj-away { width: 100%; min-height: 56px; font-size: 18px; background: var(--sound); color: #14101c; }
.btn.vdj-away.on { background: var(--gradient); color: #14101c; }
.vdj-heads { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 210, 63, 0.14); color: var(--warm); font-weight: 700; }
.vdj-mix { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.vdj-mix-head { font-weight: 800; margin-bottom: 6px; }
.vdj-line { display: flex; gap: 10px; padding: 3px 0; font-size: 14px; }
.vdj-line b { flex: none; width: 64px; color: var(--quiet); font-weight: 600; }
.vdj-line.ok span { color: var(--good); }
.vdj-line.bad span { color: var(--warm); }
.vdj-song.missing b, .vdj-song.failed b { color: var(--warm); }
.vdj-song.placed b { color: var(--good); }
