/* Theme Tune: mixtape look. Paper, ink, tape red. Condensed poster type + typewriter mono. */
:root {
  --paper: #f1e9d6;
  --paper-2: #e6dbc1;
  --paper-3: #fbf6ea;
  --ink: #1b1814;
  --ink-2: #5a5243;
  --rule: #c7b996;
  --red: #dd4127;
  --blue: #2347c5;
  --yellow: #f2c624;
  --green: #23825a;
  --deck: #161412;
  --deck-2: #23201b;
  --deck-line: #3b362e;
  --note: #f4e4a1;
  --cond: "Archivo", "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .05 0 0 0 .11 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--grain), var(--paper);
  color: var(--ink);
  font-family: var(--cond);
  font-size: 17px;
  line-height: 1.45;
}
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 {
  margin: 0 0 0.35em;
  font-stretch: 62%;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
}
p { margin: 0 0 0.8em; }
b, strong { font-weight: 800; }
.muted { color: var(--ink-2); }
.small { font-size: 0.86em; }
.hidden { display: none !important; }
.kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 0.6em;
}
.kicker .dot { color: var(--red); }

/* ---------- logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: inherit;
  text-decoration: none;
  font-stretch: 62%;
  font-weight: 900;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.logo svg { width: 1.9em; height: auto; flex: none; }

/* little equaliser, used sparingly */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 1em; }
.eq i { width: 4px; background: currentColor; height: 40%; }
.eq i:nth-child(2) { height: 90%; }
.eq i:nth-child(3) { height: 60%; }
.eq i:nth-child(4) { height: 100%; }
.eq i:nth-child(5) { height: 50%; }
.eq.live i { animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.2s; }
.eq i:nth-child(3) { animation-delay: -0.5s; }
.eq i:nth-child(4) { animation-delay: -0.1s; }
.eq i:nth-child(5) { animation-delay: -0.7s; }
@keyframes eq { from { height: 15%; } to { height: 100%; } }

/* cassette illustration */
.cassette { display: block; width: 100%; height: auto; overflow: visible; }
.cassette .reel { transform-box: fill-box; transform-origin: center; }
.spinning .cassette .reel { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .eq i, .spinning .cassette .reel { animation: none !important; }
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 16px 72px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 22px; flex-wrap: wrap; }
.card { border-top: 3px solid var(--ink); padding: 14px 0 4px; margin: 0 0 26px; }
.card h2 { font-size: 2rem; }
.card h3 { font-size: 1.35rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 14px; }
hr { border: 0; border-top: 2px dashed var(--rule); margin: 18px 0; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  font-family: var(--cond); font-stretch: 80%; font-weight: 800; font-size: 1.02rem;
  text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none; line-height: 1.1;
  padding: 0.7em 1.1em; min-height: 48px;
  border: 2.5px solid var(--ink); border-radius: 4px;
  background: var(--paper-3); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn.primary { background: var(--ink); color: var(--paper-3); }
.btn.sun { background: var(--yellow); }
.btn.mint { background: var(--green); color: var(--paper-3); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); box-shadow: 3px 3px 0 var(--red); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { min-height: 34px; padding: 0.35em 0.75em; font-size: 0.86rem; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; }
.btn.small.danger { box-shadow: 2px 2px 0 var(--red); }
.btn.small.ghost { box-shadow: none; }
.btn.wide { width: 100%; }
.btn.big { font-size: 1.25rem; min-height: 60px; }

input[type="text"], input[type="url"], select, textarea {
  font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--paper-3);
  border: 2.5px solid var(--ink); border-radius: 4px;
  padding: 0.7em 0.85em; width: 100%; min-height: 50px;
}
input::placeholder { color: #9b9078; }
input:disabled { background: var(--paper-2); border-style: dashed; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
label { display: block; font-family: var(--mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 7px; }
label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.code-input { text-transform: uppercase; letter-spacing: 0.4em; font-family: var(--mono); font-weight: 700; font-size: 1.5rem; text-align: center; }

/* ---------- team labels, badges, counters ---------- */
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.28em 0.65em 0.28em 0.6em;
  background: var(--paper-3); color: var(--ink);
  border: 1.5px solid var(--ink); border-left: 0.6em solid var(--c);
  border-radius: 2px;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.badge {
  display: inline-block; font-family: var(--mono); font-size: 0.7em; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap;
  padding: 0.18em 0.5em; border: 1.5px solid var(--ink); border-radius: 2px; color: var(--ink);
}
.badge.cracked { background: var(--green); border-color: var(--green); color: var(--paper-3); }
.badge.pending { background: var(--yellow); }
.badge.locked { color: var(--red); border-color: var(--red); }
.counter {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em; background: var(--ink); color: var(--paper-3);
  padding: 0.12em 0.4em; border-radius: 3px; line-height: 1.2;
}

.board { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.board li:last-child { border-bottom: 0; }
.board .pts { margin-left: auto; font-size: 1.05rem; }
.members { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); }

/* ---------- tracklist (the J-card) ---------- */
.trail { list-style: none; margin: 0; padding: 0; }
.trail li { display: grid; grid-template-columns: 2.1em 1fr auto; gap: 2px 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.trail li:last-child { border-bottom: 0; }
.trail .n { font-family: var(--mono); font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.trail .t { font-weight: 800; font-stretch: 85%; }
.trail .a { font-family: var(--mono); font-size: 0.8em; color: var(--ink-2); }
.trail .note { grid-column: 2 / -1; font-family: var(--mono); font-size: 0.8em; color: var(--blue); }
.trail .who { font-size: 0.85em; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 160%);
  background: var(--ink); color: var(--paper-3);
  font-family: var(--mono); font-size: 0.9rem; font-weight: 500;
  padding: 12px 16px; border-radius: 4px; max-width: calc(100% - 32px);
  transition: transform 0.22s ease; z-index: 50; text-align: center;
}
#toast.show { transform: translate(-50%, 0); }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; padding: 3vh 0 4vh; }
.hero h1 { font-size: clamp(4.6rem, 19vw, 8.6rem); line-height: 0.8; margin: 0 0 0.18em; letter-spacing: -0.01em; }
.hero h1 span { color: var(--red); }
.hero .lede { font-size: clamp(1.1rem, 3.4vw, 1.3rem); max-width: 26em; }
.hero-tape { transform: rotate(4deg); filter: drop-shadow(6px 8px 0 rgba(27, 24, 20, 0.18)); }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .hero-tape { width: 78%; justify-self: center; order: -1; margin-top: 6px; }
}
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 2.6em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--rule); }
.steps li:last-child { border-bottom: 0; }
.steps .num { font-family: var(--mono); font-weight: 700; color: var(--red); padding-top: 2px; }
.steps.setup li.done .num { color: var(--green); font-size: 1.35em; line-height: 1; }
.points { width: 100%; border-collapse: collapse; }
.points td { padding: 9px 0; border-bottom: 1px dashed var(--rule); vertical-align: top; }
.points td:last-child { text-align: right; font-family: var(--mono); font-weight: 700; white-space: nowrap; padding-left: 14px; }
.points tr:last-child td { border-bottom: 0; }

/* ---------- player ---------- */
.pbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--grain), var(--paper); border-bottom: 3px solid var(--ink); }
.pbar .score { margin-left: auto; }
.status-line { font-family: var(--mono); font-size: 0.86rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; text-align: center; margin: 20px 0 12px; min-height: 1.4em; }
.buzz {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; height: min(44vh, 340px); margin: 4px 0 30px; padding: 0 8%;
  border: 3px solid var(--ink); border-radius: 8px;
  background: var(--red); color: var(--paper-3);
  box-shadow: 0 10px 0 var(--ink);
  font-family: var(--cond); font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  font-size: clamp(4.4rem, 28vw, 8rem); line-height: 0.85; letter-spacing: 0.01em;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}
.buzz:active:not(:disabled) { transform: translateY(8px); box-shadow: 0 2px 0 var(--ink); }
.buzz:disabled { background: var(--paper-2); color: var(--ink-2); border-style: dashed; box-shadow: none; cursor: default; font-size: clamp(1.8rem, 9vw, 2.6rem); line-height: 1; }
.buzz.mine, .buzz.mine:disabled { background: var(--c); color: var(--on); border-style: solid; box-shadow: 0 10px 0 var(--ink); font-size: clamp(2.4rem, 12vw, 3.4rem); }
.guess-form { display: flex; gap: 8px; }
.guess-form input { flex: 1 1 auto; }
.guesses { list-style: none; padding: 0; margin: 12px 0 0; }
.guesses li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.team-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.team-pick button { flex-direction: column; align-items: flex-start; gap: 5px; max-width: 100%; text-transform: none; }
.team-pick button[aria-pressed="true"] { background: var(--yellow); }

/* ---------- host ---------- */
.song-card { background: var(--paper-3); border: 2.5px solid var(--ink); border-top: 10px solid var(--red); border-radius: 4px; padding: 16px; margin-bottom: 18px; }
.song-card h2 { font-size: 2.3rem; margin: 10px 0 4px; }
.song-card .meta { font-family: var(--mono); font-weight: 500; margin: 0; }
.song-card .note { font-family: var(--mono); font-size: 0.9rem; color: var(--blue); margin: 10px 0 0; }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.controls { display: grid; gap: 12px; margin-bottom: 26px; }
.controls .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.secret {
  position: relative; background: var(--note); padding: 18px 16px 14px; margin: 8px 2px 24px;
  transform: rotate(-0.6deg); box-shadow: 3px 4px 0 rgba(27, 24, 20, 0.16);
}
.secret::before { content: ""; position: absolute; top: -11px; left: 50%; width: 96px; height: 22px; margin-left: -48px; background: rgba(214, 203, 170, 0.85); transform: rotate(-2.5deg); }
.secret .label { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.secret h2 { font-size: 2.1rem; margin: 6px 0 6px; }
.pending-guess { background: var(--paper-3); border: 3px solid var(--red); border-radius: 4px; padding: 14px; margin-bottom: 18px; }
.pending-guess blockquote { margin: 8px 0 12px; font-size: 1.6rem; font-weight: 900; font-stretch: 70%; line-height: 1.05; }
.judge3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pick-list { display: grid; gap: 12px; }
.pick { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-align: left; width: 100%; padding: 12px 14px; text-transform: none; letter-spacing: 0; font-stretch: 100%; }
.pick .t { font-stretch: 62%; font-weight: 900; font-size: 1.35rem; text-transform: uppercase; }
.pick .theme { grid-column: 1 / -1; font-family: var(--mono); font-weight: 500; font-size: 0.86rem; color: var(--blue); }
.pick .theme.muted { color: var(--ink-2); }
.pick[aria-pressed="true"] { background: var(--yellow); }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper-3); }
.countdown { height: 12px; border: 2px solid var(--ink); border-radius: 2px; background: var(--paper-3); overflow: hidden; margin: 8px 0 4px; }
.countdown i { display: block; height: 100%; background: var(--red); width: 100%; transform-origin: left; }
.conn { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.conn::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--red); }
.conn.off::before { background: var(--rule); box-shadow: none; }
.adjust { display: inline-flex; gap: 6px; }
.adjust .btn { min-width: 36px; padding: 0.2em 0.5em; }
.code-tag { font-family: var(--mono); font-weight: 700; letter-spacing: 0.2em; background: var(--ink); color: var(--paper-3); padding: 0.2em 0.5em; border-radius: 3px; }

/* ---------- TV: the tape deck ---------- */
body.tv { background: var(--grain), var(--deck); color: var(--paper); font-size: clamp(16px, 1.22vw, 28px); overflow: hidden; }
body.tv .muted { color: #a99f8a; }
body.tv .members { font-size: 0.72em; color: #a99f8a; }
.tv-shell { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; padding: 2.4vh 2.6vw; gap: 2.2vh; }
.tv-top { display: flex; align-items: center; gap: 2vw; }
.tv-top .logo { font-size: 1.6em; }
.tv-top .meta { font-family: var(--mono); font-size: 0.85em; letter-spacing: 0.1em; text-transform: uppercase; color: #a99f8a; }
.tv-top .worth { margin-left: auto; font-family: var(--mono); font-weight: 700; font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.06em; background: var(--yellow); color: var(--ink); padding: 0.45em 0.9em; border-radius: 3px; }
.tv-main { display: grid; grid-template-columns: 1.55fr 1fr; gap: 2vw; min-height: 0; }
.tv-stage { position: relative; overflow: hidden; display: grid; place-items: center; text-align: center; min-height: 0; padding: 3vh 3vw; background: var(--grain), var(--paper); color: var(--ink); border-radius: 6px; }
body.tv .tv-stage .muted, body.tv .tv-side .muted, body.tv .tv-ask .muted { color: var(--ink-2); }
.tv-ask .row { flex-wrap: nowrap; }
.join-panel .head { font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: 3em; line-height: 0.9; margin: 0; }
.tv-stage .big { font-size: 4.6em; font-stretch: 62%; font-weight: 900; text-transform: uppercase; line-height: 0.88; margin: 0.1em 0 0.15em; overflow-wrap: anywhere; }
.tv-stage .mid { font-family: var(--mono); font-size: 1.15em; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin: 0; }
.tv-stage .cassette { width: min(21em, 80%); margin: 0 auto 1.1em; }
.tv-stage > div { width: 100%; }
.tv-stage .spinning .cassette { width: min(31em, 92%); }
.tape-counter { display: inline-flex; gap: 0.12em; font-family: var(--mono); font-weight: 700; font-size: 2.4em; }
.tape-counter span { background: var(--ink); color: var(--paper-3); padding: 0.05em 0.22em; border-radius: 3px; min-width: 1.05em; }
.buzzed-banner { position: absolute; inset: 0; display: grid; place-items: center; padding: 4vh 3vw; background: var(--c); color: var(--on); }
.buzzed-banner .mid { color: var(--on); }
.buzzed-banner .big { font-size: 7em; }
.flash-text { font-size: 5em; font-stretch: 62%; font-weight: 900; text-transform: uppercase; line-height: 0.88; overflow-wrap: anywhere; margin: 0 0 0.25em; }
.tv-side { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 2.6vh 1.8vw; background: var(--grain), var(--paper); color: var(--ink); border-radius: 6px; }
.tv-side h3 { font-family: var(--mono); font-size: 0.78em; font-weight: 700; letter-spacing: 0.16em; color: var(--red); margin-bottom: 0.6em; }
.tv-side .trail { overflow-y: auto; scrollbar-width: none; }
.tv-side .trail::-webkit-scrollbar { display: none; }
.trail.cols { columns: 2; column-gap: 2.4vw; }
.trail.cols li { break-inside: avoid; }
.tv-board { display: flex; gap: 1vw; flex-wrap: wrap; }
.tv-team { flex: 1 1 10em; min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.3em 0.8em; padding: 0.75em 0.9em; background: var(--deck-2); border: 2px solid var(--deck-line); border-left: 0.55em solid var(--c); border-radius: 4px; }
.tv-team .name { font-stretch: 62%; font-weight: 900; font-size: 1.5em; text-transform: uppercase; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-team .pts { grid-row: span 2; font-size: 1.7em; }
.tv-team .counter { background: var(--paper); color: var(--ink); }
.tv-team .badge { border-color: #a99f8a; color: var(--paper); }
.tv-team .badge.cracked { background: var(--green); border-color: var(--green); }
.tv-team .badge.pending { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.tv-team .badge.locked { border-color: var(--red); color: #ff8a73; }
.tv-lobby { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3vw; align-items: center; min-height: 0; }
.join-panel { text-align: center; }
.join-panel .url { font-family: var(--mono); font-size: 1.3em; font-weight: 700; color: var(--yellow); margin: 0.2em 0 0; }
.join-panel .letters { display: flex; justify-content: center; gap: 0.22em; margin: 0.45em 0 0.5em; }
.join-panel .letters span { font-size: 6em; font-stretch: 62%; font-weight: 900; width: 1.02em; line-height: 1.15; background: var(--paper); color: var(--ink); border-radius: 4px; box-shadow: 0.06em 0.06em 0 var(--red); }
.qr { display: inline-block; background: var(--paper-3); padding: 12px; border-radius: 4px; }
.qr img, .qr canvas { display: block; width: 10em !important; height: 10em !important; }
.reveal-theme { font-size: 5em; font-stretch: 62%; font-weight: 900; text-transform: uppercase; color: var(--red); line-height: 0.86; margin: 0.12em 0 0.3em; overflow-wrap: anywhere; }
.reveal-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2vw; min-height: 0; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.6vw; }
.podium .step { width: 14em; text-align: center; }
.podium .step p { font-stretch: 62%; font-weight: 900; font-size: 1.8em; text-transform: uppercase; margin: 0 0 0.3em; line-height: 1; }
.podium .block { height: var(--h); display: grid; place-items: center; background: var(--c); color: var(--on); border-radius: 4px 4px 0 0; font-family: var(--mono); font-weight: 700; font-size: 2.6em; }
.final-title { font-size: 6em; font-stretch: 62%; font-weight: 900; text-transform: uppercase; text-align: center; line-height: 0.88; margin: 0; color: var(--paper); }
.tv-ask { width: min(560px, 92vw); text-align: center; background: var(--grain), var(--paper); color: var(--ink); border-radius: 6px; padding: 28px 24px; }
.tv-ask h2 { font-size: 2.4em; }
.sound-btn { position: fixed; right: 1.2vw; bottom: 1.2vh; z-index: 10; opacity: 0.7; color: var(--paper) !important; border-color: var(--deck-line) !important; }
.leave-btn { position: fixed; left: 1.2vw; bottom: 1.2vh; z-index: 10; opacity: 0.7; color: var(--paper) !important; border-color: var(--deck-line) !important; }

@media (max-width: 900px) {
  body.tv { overflow: auto; font-size: 15px; }
  .tv-shell { height: auto; min-height: 100dvh; }
  .tv-main, .tv-lobby, .reveal-grid { grid-template-columns: 1fr; }
  .tv-stage { min-height: 52vh; }
  .tv-stage .big, .reveal-theme { font-size: 2.8em; }
  .join-panel .letters span { font-size: 3.6em; }
  .trail.cols { columns: 1; }
}

/* ---------- round builder ---------- */
.song-row { display: grid; grid-template-columns: 2em 1fr 1fr 5.5em auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.song-row .n { font-family: var(--mono); font-weight: 700; color: var(--red); }
.song-row .note-in, .song-row .yt-in, .song-row .yt-found { grid-column: 2 / 5; }
.song-row .yt-found { margin-top: -4px; }
.song-row .tools { display: flex; gap: 6px; }
.song-row .tools .btn { min-width: 36px; min-height: 36px; padding: 0.2em 0.5em; }
@media (max-width: 600px) {
  .song-row { grid-template-columns: 2em 1fr auto; }
  .song-row .artist-in, .song-row .year-in, .song-row .note-in, .song-row .yt-in, .song-row .yt-found { grid-column: 2 / 3; }
  .song-row .tools { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; }
}

/* Host: who has the title and artist, and the typed answers coming in. */
.claims { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-family: var(--mono); font-size: 0.85rem; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.feed li:last-child { border-bottom: 0; }
.feed .grow { min-width: 0; overflow-wrap: anywhere; }
.answer-form input { font-size: 1.15rem; min-height: 52px; }
#answers { margin: 4px 0 16px; }

/* A sheet over the page, for copying by hand when the browser won't copy for us. */
.sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: end center; padding: 16px; background: rgba(27, 24, 20, 0.55); }
.sheet .card { width: 100%; max-width: 460px; margin: 0; padding: 16px; background: var(--paper-3); border: 2.5px solid var(--ink); border-radius: 4px; }
.sheet textarea { width: 100%; font-family: var(--mono); font-size: 0.85rem; line-height: 1.5; resize: vertical; }
@media (min-width: 700px) { .sheet { place-items: center; } }

/* Folded-away tips, e.g. playing over a video call */
details.tip { margin-top: 12px; }
details.tip summary { cursor: pointer; font-weight: 700; }
details.tip p { margin: 6px 0 0; }

/* Saving rounds and the library */
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; cursor: pointer; text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 1rem; margin: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); margin: 1px 0 0; flex: none; }
.badge.live { background: var(--green); border-color: var(--green); color: var(--paper-3); }
.badge.off { color: var(--red); border-color: var(--red); }
.pick .by { font-size: 0.85em; }
