/* The Deck (direction A, "Mikseri"): one laptop screen, no scrolling. */
html, body { height: 100%; overflow: hidden; }
.deck { height: 100vh; display: flex; flex-direction: column; }
.grow { flex-grow: 1; }
.hint { font-size: 14px; color: var(--muted); }
.link { background: none; border: 0; padding: 0; font-size: 13px; color: var(--muted); text-decoration: underline; text-transform: none; letter-spacing: 0; }
.link:hover { color: var(--ink); }

/* Header */
.top { height: 72px; flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.logo { width: 56px; height: 56px; object-fit: contain; }
.match { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; padding: 6px 8px; border-radius: 10px; text-align: left; }
.match:hover { background: var(--card); }
.match-title { font-size: 22px; font-weight: 600; }
.match-sub { font-size: 14px; color: var(--muted); }
#code, #code2 { color: var(--ink); letter-spacing: .12em; }
button.chip:hover, a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
a.chip { text-decoration: none; }
a.chip.cta { border-color: var(--accent); color: var(--ink); }

/* Game state strip */

/* Body */
.body { flex-grow: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; padding: 20px 24px; }
.pads-area { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.pads-head { display: flex; align-items: baseline; justify-content: space-between; }
.pads-head h2 { margin: 0; font-size: 20px; }
.pads { flex-grow: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; min-height: 0; }
.pad-wrap { position: relative; min-height: 0; }
.pad { position: absolute; inset: 0; width: 100%; text-align: left; display: flex; flex-direction: column; justify-content: space-between; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.pad:hover { border-color: var(--line-strong); }
.pad.playing { border: 2px solid var(--accent); }
.pad.empty { background: transparent; border-style: dashed; color: var(--muted); }
.pad.drop { border: 2px dashed var(--accent-soft); background: var(--accent-deep); }
.pad-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.pad-tag { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pad-tag.music { color: #a8e6b8; } .pad-tag.sfx { color: var(--accent-soft); } .pad-tag.voice { color: var(--voice); } .pad-tag.own { color: var(--chant); } .pad-tag.spotify { color: #1ed760; }
.pad kbd { font-family: var(--display); font-weight: 600; font-size: 15px; min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.pad-label { font-size: 19px; font-weight: 600; line-height: 1.2; }
.pad-sub { font-size: 14px; color: var(--muted); }
.pad-progress { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); }
.pad-reset { position: absolute; right: 8px; bottom: 8px; z-index: 1; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--floor); font-size: 12px; color: var(--muted); }

.side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.score { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.score-head { display: flex; justify-content: flex-end; align-items: center; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.team { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team.them { text-align: right; color: var(--ink-2); }
.nums { font-size: 52px; line-height: 1; }
.dash { color: #5c5c5c; padding: 0 8px; }
.goal { flex-grow: 1; min-height: 180px; border: 0; border-radius: 18px; background: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 0 0 1px #ff5a5f inset, 0 18px 48px rgba(227,36,43,.35); transition: transform .08s; }
.goal:active { transform: scale(.98); }
.goal.drop { outline: 3px dashed #fff; outline-offset: -10px; }
.goal-word { font-size: 68px; line-height: 1; }
.goal-sub { font-size: 15px; font-weight: 500; }
.goal-sub kbd { background: rgba(0,0,0,.25); color: #fff; }
/* Both teams announced alike: two equal MAALI! buttons, each naming its team. */
.goal-team { font-size: 24px; line-height: 1; }
.side.equal .goal { min-height: 110px; }
.side.equal .side-row { grid-template-columns: 1fr; }
.side.equal .goal-word { font-size: 52px; }
.side-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-row .btn { height: 64px; font-size: 17px; }

.adjust { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.adjust-pair { display: flex; gap: 6px; }
.adjust button { width: 44px; height: 36px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); font-size: 20px; font-weight: 600; line-height: 1; }
.adjust button:hover { color: var(--ink); border-color: #5c5c5c; }
.adjust-note { font-size: 12px; color: var(--muted); }

.goal-own { margin: 0; font-size: 13px; color: var(--muted); }
.goal-own .link { font-size: 13px; }

/* Now playing lane */
.lane { height: 150px; flex-shrink: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; gap: 24px; align-items: center; padding: 0 24px; border-top: 1px solid var(--line); background: var(--panel); }
.now { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.now-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-soft); }
.now-title { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wave-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#wave { width: 100%; height: 64px; }
#wave.seekable { cursor: pointer; touch-action: none; }
.lane-buttons { display: flex; gap: 10px; }
.lane-buttons .btn { height: 40px; }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; height: 118px; }
.meter { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; }
.meter-bar { position: relative; width: 10px; flex-grow: 1; border-radius: 5px; background: var(--raised); overflow: hidden; }
.meter-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 5px; }
.meter label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.meter input { width: 84px; accent-color: var(--accent); }
.meter-note { font-size: 12px; color: var(--muted); height: 14px; }

/* Goal mode */
.overlay { position: fixed; inset: 0; z-index: 10; background: var(--floor); display: flex; flex-direction: column; }
.ov-band { height: 88px; flex-shrink: 0; display: flex; align-items: center; gap: 24px; padding: 0 32px; background: var(--accent); }
.ov-band.away { background: var(--raised); }
.ov-word { font-size: 48px; line-height: 1; }
.ov-team { font-size: 30px; }
.ov-score { font-size: 40px; line-height: 1; }
.ov-song { display: flex; flex-direction: column; gap: 6px; width: 360px; font-size: 14px; font-weight: 600; }
.ov-song-row { display: flex; justify-content: space-between; }
.ov-track { position: relative; height: 6px; border-radius: 3px; background: rgba(0,0,0,.3); }
.ov-track span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #fff; }
.steps { list-style: none; margin: 0; padding: 20px 32px 0; display: flex; gap: 10px; }
.steps li { height: 40px; display: flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: 15px; }
.steps li.done { background: var(--raised); border-color: var(--raised); color: var(--ink-2); }
.steps li.on { background: #fff; border-color: #fff; color: #0b0b0b; font-weight: 700; }
.ov-main { flex-grow: 1; min-height: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; padding: 24px 32px; }
.ov-left { display: flex; flex-direction: column; gap: 16px; }
.ov-q { font-size: 22px; }
.typed { height: 132px; border-radius: 18px; border: 3px solid var(--accent); background: var(--card); font-family: var(--slab); font-size: 96px; line-height: 126px; padding: 0 28px; }
.typed.empty { font-family: var(--body); font-size: 20px; line-height: 1.3; display: flex; align-items: center; color: var(--muted); }
.typed .caret { display: inline-block; width: 4px; height: 80px; background: var(--accent-soft); vertical-align: middle; margin-left: 6px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.suggest { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.suggest-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-soft); }
.suggest-name { font-size: 18px; font-weight: 600; }
.lines { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.lines button { height: 36px; min-width: 44px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; font-weight: 600; }
.lines button.on { background: #fff; color: #0b0b0b; border-color: #fff; }
.countdown { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.ring { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ring span { width: 34px; height: 34px; border-radius: 50%; background: var(--floor); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }
.ov-right { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.ov-right-head { display: flex; align-items: baseline; justify-content: space-between; }
.ov-right-head h2 { margin: 0; font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; overflow: auto; align-content: start; }
.jersey { position: relative; height: 104px; border-radius: 14px; border: 1px solid #222; background: #141414; color: #8a8a8a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.jersey.match { background: var(--raised); border-color: #5c5c5c; color: #fff; }
.jersey.best { background: var(--accent); border: 2px solid var(--accent-soft); color: #fff; }
.jersey.hot:not(.best) { border-color: var(--accent); }
.jersey-no { font-family: var(--slab); font-size: 38px; line-height: 1; }
.jersey-name { font-size: 14px; font-weight: 500; max-width: 100%; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jersey-badge { position: absolute; top: 8px; right: 8px; font-size: 12px; font-weight: 700; background: #fff; color: #0b0b0b; padding: 2px 7px; border-radius: 5px; }
.ov-foot { height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 32px; border-top: 1px solid var(--line); background: var(--panel); }
.ov-foot .btn { height: 44px; }

.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 24px 32px 0; }
.who-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.who-no { width: 64px; height: 64px; border-radius: 12px; background: var(--line-strong); display: flex; align-items: center; justify-content: center; font-family: var(--slab); font-size: 28px; flex-shrink: 0; }
.who-no.scorer { background: var(--accent); }
.who-text { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.who-role { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.who-name { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-card .link { color: var(--accent-soft); font-size: 15px; }
.timeline { margin: 18px 32px 0; flex-grow: 1; min-height: 0; overflow: hidden; background: #141414; border: 1px solid var(--line); border-radius: 18px; padding: 20px 26px; display: flex; flex-direction: column; gap: 12px; }
.timeline-head { display: flex; justify-content: space-between; align-items: baseline; }
.timeline-head h2 { margin: 0; font-size: 20px; }
#timeline { width: 100%; height: clamp(100px, 24vh, 190px); flex-shrink: 0; }
.transcript { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 1000px; }
.ann-buttons { display: flex; gap: 12px; align-items: center; padding: 20px 32px 24px; }
.ann-buttons .btn { height: 64px; font-family: var(--display); font-weight: 600; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.ann-buttons .btn.selected { background: #fff; color: #0b0b0b; border-color: #fff; }

/* Dialogs */
.dialog { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 18px; padding: 20px 24px; width: min(720px, 92vw); max-height: 80vh; }
.dialog::backdrop { background: rgba(0,0,0,.7); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dialog-head h2 { margin: 0; font-size: 24px; }
.teams { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.teams button { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-weight: 600; }
.teams button.on { background: var(--accent); border-color: var(--accent); }
.matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; overflow: auto; max-height: 52vh; }
.matches button { width: 100%; display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--floor); }
.matches button.on { border-color: var(--accent); }
.matches .muted { color: var(--muted); font-size: 14px; }
/* The match dialog: a team's games or the hall's day, and the announcement mode below. */
.match-dialog { width: min(900px, 94vw); max-height: 90vh; }
/* The list scrolls; the tabs and the mode row below it stay in view. */
.match-dialog[open] { display: flex; flex-direction: column; }
.match-dialog [role="tabpanel"]:not([hidden]) { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.match-dialog .matches { max-height: none; min-height: 60px; flex: 1 1 auto; }
.match-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.venue-days { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.day-chip { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.day-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.day-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(255,255,255,.14); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ours-tag { padding: 3px 10px; border-radius: 999px; background: var(--accent-deep); color: var(--accent-soft); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.match-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.match-foot:empty { display: none; }
.foot-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.foot-label { width: 120px; font-size: 17px; color: var(--ink-2); }
.foot-text { font-size: 15px; color: var(--ink-2); }
.foot-row .btn.primary { margin-left: auto; }
/* A practice game typed in: two teams side by side, each with its players one per line. */
.practice { display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.practice-ours { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.practice-ours input { width: 18px; height: 18px; accent-color: var(--accent); }
.practice-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.practice-team { display: flex; flex-direction: column; gap: 6px; }
.practice-team label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.practice-team input, .practice-team textarea { background: var(--floor); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; }
.practice-team input:disabled { color: var(--muted); }
.practice-team textarea { resize: vertical; font-variant-numeric: tabular-nums; line-height: 1.5; }
.practice-go { display: flex; align-items: center; gap: 14px; }
.practice-go .btn { margin-left: auto; }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.seg button { height: 44px; padding: 0 18px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); }
.seg button:disabled { color: #6b6b6b; }
.join { width: auto; text-align: center; }
.join img { background: #fff; border-radius: 12px; padding: 8px; }
.join-url { font-size: 18px; font-weight: 600; word-break: break-all; }
.overlay[hidden] { display: none; }

/* Short laptop screens: tighten the goal mode so nothing hides behind the buttons. */
@media (max-height: 760px) {
  .ov-band { height: 68px; } .ov-word { font-size: 38px; } .ov-score { font-size: 32px; }
  .who { padding-top: 14px; } .who-no { width: 48px; height: 48px; font-size: 22px; }
  .ann-buttons { padding: 12px 32px 14px; } .ann-buttons .btn { height: 52px; font-size: 17px; }
  .typed { height: 100px; line-height: 94px; font-size: 72px; } .jersey { height: 84px; }
  .goal { min-height: 120px; } .goal-word { font-size: 52px; } .side-row .btn { height: 52px; }
}

/* Settings */
.chip.icon { width: 40px; padding: 0; justify-content: center; }
.settings { width: min(760px, 94vw); }
.settings-section { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.settings-section h3 { margin: 0 0 4px; font-size: 18px; }
.settings label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.settings select, .settings textarea, .settings input[type="password"] { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--floor); color: var(--ink); font: inherit; font-size: 15px; padding: 8px 12px; }
.settings textarea { resize: vertical; line-height: 1.4; }
.settings input[type="range"] { width: 100%; accent-color: var(--accent); }
.settings-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.settings-row input { flex: 1 1 260px; }
.settings-key { display: flex; flex-direction: column; gap: 6px; }
.settings-check { display: flex; gap: 8px; align-items: center; font-weight: 500 !important; }
.settings-check input, .settings-radio input { width: 18px; height: 18px; accent-color: var(--accent); }
.settings-radio { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.settings-radio legend { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.settings-radio label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.settings-ok { margin: 0; color: #8fe0a8; font-size: 15px; }
.settings-error { margin: 0; color: var(--danger-ink); font-size: 15px; }
.settings code { background: var(--raised); border-radius: 5px; padding: 1px 6px; }
.settings .hint { margin: 0; }
.settings-build { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.settings-build .bar { position: relative; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.settings-build .bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.settings-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ink-2); }
.settings-steps code { word-break: break-all; }
.btn.small { height: 32px; padding: 4px 10px; font-size: 13px; }
.now-label.error { color: var(--danger-ink); }

/* Tabs: the pads or the jukebox; MAALI! stays on the right */
.pads-head { justify-content: flex-start; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font-size: 19px; display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px; border-bottom: 3px solid transparent; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab:hover { color: var(--ink); }
.tab kbd { font-size: 12px; }
.tab-now { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: #a8e6b8; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-now::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 3px; background: #1ed760; margin-right: 6px; vertical-align: middle; }
.pads-head .hint { margin-left: auto; }

/* Tooltips for icon buttons */
.tip { position: relative; }
.tip::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 30; padding: 6px 10px; border-radius: 8px; background: #f5f5f5; color: #0b0b0b; font: 500 13px var(--body); letter-spacing: 0; text-transform: none; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.tip.tip-left::after { bottom: auto; left: auto; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.tip:hover::after, .tip:focus-visible::after { opacity: 1; }

/* Jukebox */
.jukebox { flex-grow: 1; min-height: 0; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); column-gap: 18px; row-gap: 12px; align-content: start; }
.jukebox[hidden] { display: none; }
/* Left: the list choice, the song playing and the search; right: the rest of the list, as tall as there is room. */
#jbHead, .jb-now, .jb-search { grid-column: 1; }
#jbHead:has(.jb-empty) { grid-column: 1 / -1; }
.jb-queue { grid-column: 2; grid-row: 1 / -1; }
.jb-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 14px; }
.jb-empty p { margin: 0; color: var(--ink-2); }
.jb-top { display: flex; align-items: flex-end; gap: 6px 14px; flex-wrap: wrap; }
#jbHead { display: flex; flex-direction: column; gap: 10px; }
.jb-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; min-width: 0; }
.jb-field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.jb-field select { height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; padding: 0 10px; }
.jb-held { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); font-size: 15px; }
.jb-held .slab { font-size: 20px; color: var(--accent-soft); }
.jb-held span:nth-child(2) { flex: 1; }
.jb-now { display: flex; gap: 16px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); flex-shrink: 0; }
.jb-cover { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; background: var(--raised); }
.jb-now > .jb-cover { width: 96px; height: 96px; border-radius: 12px; }
.jb-cover-empty { display: inline-flex; align-items: center; justify-content: center; font-family: var(--slab); color: var(--muted); font-size: 14px; }
.jb-now > .jb-cover-empty { font-size: 32px; }
.jb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.jb-status { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.jb-status.on { color: #1ed760; } .jb-status.fade { color: #a8e6b8; } .jb-status.goal { color: var(--accent-soft); }
.jb-title { font-size: 28px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-artist { font-size: 16px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.jb-seek { flex: 1; display: flex; align-items: center; padding: 10px 0; cursor: pointer; touch-action: none; }
.jb-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; position: relative; }
.jb-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.jb-bar > span.in { background: #1ed760; }
.jb-fade { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.jb-fade .jb-in { color: #a8e6b8; }
.jb-fade[hidden] { display: none; }
.jb-controls { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
/* The roar to the next song: beside the crossfade, outlined so the two don't blur together. */
.jb-cross.jb-roar { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.jb-cross { height: 44px; width: 60px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.jb-icon { height: 40px; width: 40px; flex: none; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.jb-icon.big { height: 44px; width: 44px; }
.jb-icon:hover { color: var(--ink); border-color: #5c5c5c; }
.jb-icon.jb-goalbtn { border-color: var(--danger-line); background: var(--danger-bg); color: var(--accent-soft); }
.jb-menu-wrap { position: relative; }
.jb-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 230px; padding: 6px; border-radius: 12px; background: #1c1c1c; border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 2px; }
.jb-controls .jb-menu { left: 0; right: auto; }
.jb-menu.up { top: auto; bottom: calc(100% + 6px); }
.jb-menu button, .jb-menu-note { height: 42px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.jb-menu button:hover { background: var(--raised); }
.jb-menu .goal-item { color: var(--accent-soft); }
.jb-menu-note { color: var(--muted); }
.jb-menu hr { border: 0; height: 1px; background: var(--line-strong); margin: 4px 6px; width: auto; }
.jb-mark { width: 16px; color: var(--chant); }
.jb-search { position: relative; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.jb-search[hidden] { display: none; }
.jb-search-icon { position: absolute; left: 12px; top: 12px; color: var(--muted); display: flex; }
.jb-search input { flex: 1; height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--floor); color: var(--ink); font: inherit; font-size: 15px; padding: 0 12px 0 40px; }
.jb-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; overflow-y: auto; padding: 8px; border-radius: 12px; background: #161616; border: 1px solid var(--line-strong); box-shadow: 0 16px 40px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 4px; }
.jb-results .hint { margin: 2px 4px 4px; font-size: 13px; }
.jb-result { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.jb-result:hover { background: #1f1f1f; }
.jb-song { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.jb-song-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-song-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-listed { font-size: 13px; color: #a8e6b8; white-space: nowrap; }
.jb-goal-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-soft); white-space: nowrap; }
.jb-queue { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.jb-queue[hidden] { display: none; }
.jb-queue-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.jb-queue-head h3 { margin: 0; font-size: 17px; color: var(--ink-2); }
.jb-queue-head h3 .hint { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; }
.jb-list { list-style: none; margin: 0; padding: 0 4px 0 0; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.jb-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: #131313; border: 1px solid var(--line); }
.jb-row.dragging { opacity: .45; }
.jb-row.over-up { box-shadow: inset 0 3px 0 var(--accent); }
.jb-row.over-down { box-shadow: inset 0 -3px 0 var(--accent); }
.jb-grip { color: #6b6b6b; cursor: grab; display: flex; }
.jb-n { width: 22px; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--muted); }
.jb-toast { position: absolute; left: 0; right: 50%; margin-right: 9px; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: #1c1c1c; border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; }
.jb-toast span { flex: 1; }
.jb-toast .btn { height: 34px; }

/* Spotify setup, for a club volunteer */
.sp-needs { padding: 12px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.sp-needs ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.sp-steps { margin: 4px 0 0; padding-left: 0; list-style: none; counter-reset: sp; display: flex; flex-direction: column; gap: 14px; }
.sp-steps > li { counter-increment: sp; position: relative; padding-left: 40px; display: flex; flex-direction: column; gap: 8px; }
.sp-steps > li::before { content: counter(sp); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 14px; background: var(--accent); color: #fff; font-family: var(--display); font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.sp-steps h4 { margin: 3px 0 0; font-size: 16px; }
.sp-steps p { margin: 0; }
.sp-steps a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.sp-form { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 14px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); align-items: center; }
.sp-form dt { font-size: 14px; font-weight: 600; color: var(--muted); }
.sp-form dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.sp-form code, .sp-field code { word-break: break-all; }
.sp-important { flex-basis: 100%; font-size: 13px; color: var(--chant); }
.sp-validate { font-size: 14px; min-height: 18px; color: var(--muted); }
.sp-validate.ok { color: #8fe0a8; } .sp-validate.bad { color: var(--danger-ink); }
.settings-key input[type="text"] { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--floor); color: var(--ink); font: inherit; font-size: 15px; padding: 8px 12px; font-family: ui-monospace, monospace; }
.sp-stuck { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); font-size: 15px; }
.sp-stuck p { margin: 0; color: var(--ink-2); }
.sp-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.sp-check > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sp-mark { width: 24px; height: 24px; flex: none; border-radius: 12px; background: var(--raised); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.sp-check.ok .sp-mark { background: #16351f; color: #8fe0a8; }
.sp-check.bad .sp-mark { background: var(--danger-bg); color: var(--danger-ink); }
.sp-help { font-size: 14px; color: var(--ink-2); }
.sp-help summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 32px; display: flex; align-items: center; }
.sp-help ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
