/* ==========================================================================
   Bopla: liquid glass UI, festival edition
   Glass only reads as glass when there is something colourful behind it,
   so the page sits on a slow-moving aurora; panels blur, saturate and (in
   Chromium) refract it, with a rim light and a cursor-tracked specular sheen.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #14061c;
  --ink: #f5f6ff;
  --ink-2: rgb(245 246 255 / .72);
  --ink-3: rgb(245 246 255 / .5);

  /* Festival at sunset: the sky goes gold, orange, pink and violet while
     lime stage lasers cut through it. */
  --sun: #ffc23d;
  --orange: #ff7a2f;
  --pink: #ff3d8b;
  --violet: #b13dff;
  --night: #3a1d8f;
  --laser: #c6ff3d;
  --good: #c6ff3d;
  --bad: #ff4d5e;
  --gold: #ffc23d;
  --brand-gradient: linear-gradient(120deg, var(--sun), var(--orange) 30%, var(--pink) 62%, var(--violet));

  --glass-tint: rgb(255 255 255 / .07);
  --glass-tint-hi: rgb(255 255 255 / .16);
  --glass-blur: 22px;
  --glass-shadow: 0 18px 50px -18px rgb(0 0 0 / .65), 0 2px 6px rgb(0 0 0 / .18);

  /* One spacing scale for the whole app, so gaps stay generous and even. */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;

  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;

  --page: 1080px;

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
p { margin: 0; }
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; }

:focus-visible { outline: 2px solid var(--laser); outline-offset: 3px; }

/* --- backdrop -------------------------------------------------------------- */

.aurora {
  position: fixed;
  top: -20vmax; right: -20vmax; bottom: -20vmax; left: -20vmax;
  z-index: -2;
  filter: blur(70px) saturate(140%);
  pointer-events: none;
}
.aurora i {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  opacity: .55;
  animation: drift 28s var(--ease) infinite alternate;
}
/* Night sky at the top, the sun going down at the bottom. */
.aurora i:nth-child(1) { background: var(--night); top: -15%; left: 5%; opacity: .7; }
.aurora i:nth-child(2) { background: var(--pink); top: 30%; left: 55%; opacity: .45; animation-duration: 34s; animation-delay: -8s; }
.aurora i:nth-child(3) { background: var(--orange); top: 62%; left: 0%; opacity: .5; animation-duration: 40s; animation-delay: -16s; }
.aurora i:nth-child(4) { background: var(--violet); top: 0%; left: 60%; opacity: .5; animation-duration: 31s; animation-delay: -4s; }

/* Stage lights: soft beams sweeping from below, like a festival main stage. */
.beams {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}
.beams i {
  position: absolute;
  bottom: -20vh;
  width: 14vmax;
  height: 140vh;
  transform-origin: 50% 100%;
  background: linear-gradient(to top, var(--beam) 0%, transparent 85%);
  filter: blur(28px);
  opacity: .22;
  animation: sweep 14s ease-in-out infinite alternate;
}
.beams i:nth-child(1) { --beam: var(--laser); left: 18%; animation-delay: -3s; }
.beams i:nth-child(2) { --beam: var(--sun); left: 48%; opacity: .16; animation-duration: 18s; animation-delay: -9s; }
.beams i:nth-child(3) { --beam: var(--pink); left: 78%; animation-duration: 16s; }
@keyframes sweep {
  from { transform: translateX(-50%) rotate(-24deg); }
  to   { transform: translateX(-50%) rotate(24deg); }
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(12vmax, -8vmax) scale(1.15); }
  100% { transform: translate(-10vmax, 10vmax) scale(.9); }
}

/* Album art bleeds into the background once a song is revealed. */
.ambient {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  background: var(--ambient-image, none) center / cover no-repeat;
  filter: brightness(.6);
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  pointer-events: none;
}
.ambient.is-on { opacity: .4; }

/* --- glass ----------------------------------------------------------------- */

.glass {
  --mx: 30%;
  --my: 0%;
  position: relative;
  isolation: isolate;
  border-radius: var(--r-lg);
  background:
    linear-gradient(150deg, var(--glass-tint-hi), var(--glass-tint) 42%, rgb(255 255 255 / .04) 70%, rgb(255 255 255 / .09));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .42),
    inset 0 -1px 0 rgb(255 255 255 / .06),
    inset 0 0 22px rgb(255 255 255 / .05),
    var(--glass-shadow);
}

/* Rim light: a gradient hairline, bright where light would hit the edge. */
.glass::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgb(255 255 255 / .75), rgb(255 255 255 / .1) 30%, rgb(255 255 255 / 0) 55%, rgb(255 255 255 / .3) 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Specular sheen that follows the pointer (--mx/--my set from app.js). */
.glass::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(140% 90% at var(--mx) var(--my), rgb(255 255 255 / .2), transparent 45%);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity .3s;
}

.refract .glass--refract {
  -webkit-backdrop-filter: url(#lg-refract) blur(var(--glass-blur)) saturate(190%);
  backdrop-filter: url(#lg-refract) blur(var(--glass-blur)) saturate(190%);
}

.glass--pill { border-radius: 999px; }
.glass--quiet { --glass-tint-hi: rgb(255 255 255 / .1); --glass-tint: rgb(255 255 255 / .04); --glass-shadow: 0 8px 24px -12px rgb(0 0 0 / .5); }

/* Pressable glass: squishes with a spring, like a droplet. */
.press {
  transition: transform .45s var(--spring), background-color .3s, opacity .3s;
}
.press:hover { --glass-tint-hi: rgb(255 255 255 / .22); }
.press:active { transform: scale(.97); transition-duration: .12s; }
.press:disabled { cursor: default; }

/* --- layout ---------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: max(var(--s4), env(safe-area-inset-top)) var(--s4) 0;
}
.topbar__inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s2) var(--s2) var(--s3);
}
.brand { display: flex; align-items: center; gap: 2px; padding-right: var(--s3); }
.brand img { width: 36px; height: 36px; }
.wordmark {
  /* The wordmark keeps the Beatquessr logo's face: Unbounded SemiBold, lowercase. */
  font: 600 1.5rem/1 "Unbounded", var(--font-display);
  letter-spacing: -.03em;
  text-transform: lowercase;
  color: var(--ink);
}
.topbar__links { display: flex; gap: var(--s1); margin-right: auto; }
.navlink {
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.navlink:hover { color: var(--ink); background: rgb(255 255 255 / .08); }
.navlink.is-active { color: var(--ink); background: rgb(255 255 255 / .14); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); }

.player-chip {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  background: rgb(255 255 255 / .08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2);
  font-weight: 500;
  max-width: 200px;
}
.player-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-gradient);
  font: 700 .85rem var(--font-display);
  text-transform: uppercase;
}

main {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--s7) var(--s4) var(--s8);
  outline: none;
}

.view { display: grid; gap: var(--s7); animation: rise .6s var(--ease) both; }
/* Grid columns default to their content's min width; pin them to the
   viewport so a long tab row scrolls instead of widening the page. */
.view, .picker, .group { grid-template-columns: minmax(0, 1fr); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* --- type ------------------------------------------------------------------ */

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.04em; margin: 0; }
h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.08; font-weight: 800; }
h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--ink-2); }
.lead { font-size: 1.1rem; line-height: 1.65; max-width: 48ch; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: var(--s4); }
.page-head { display: grid; gap: var(--s4); }

/* --- buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 52px;
  padding: 0 var(--s5);
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.btn--primary {
  --glass-tint-hi: rgb(255 90 140 / .6);
  --glass-tint: rgb(255 140 50 / .35);
}
.btn--primary:hover { --glass-tint-hi: rgb(255 110 155 / .75); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* --- home ------------------------------------------------------------------ */


.size-pick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.size-pick > span { font-weight: 600; color: var(--ink-2); }

.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); }

.segmented {
  --count: 2;
  --index: 0;
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 5px;
}
.segmented button {
  position: relative;
  z-index: 1;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink-2);
  transition: color .3s;
}
.segmented button[aria-pressed="true"] { color: var(--ink); }
.segmented__thumb {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / var(--count));
  border-radius: 999px;
  background: rgb(255 255 255 / .18);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 4px 14px rgb(0 0 0 / .25);
  transform: translateX(calc(100% * var(--index)));
  transition: transform .5s var(--spring);
}

/* --- home: poster rows ----------------------------------------------------- */

.rows { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
.row { display: grid; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
.row__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.row__nav { display: flex; gap: var(--s2); }
.row-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgb(255 255 255 / .12);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 0 0 1px rgb(255 255 255 / .14), 0 8px 20px -10px rgb(0 0 0 / .7);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  color: var(--ink);
  transition: background .25s, transform .4s var(--spring), opacity .25s;
}
.row-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.row-arrow:hover:not(:disabled) { background: rgb(255 255 255 / .22); transform: scale(1.06); }
.row-arrow:disabled { opacity: .3; cursor: default; }
.row__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(150px, 16vw, 190px);
  gap: var(--s4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--s4);
  /* Room around the cards so the hover lift isn't clipped by the scroller. */
  padding: var(--s5) var(--s4) var(--s5);
  margin: 0 calc(var(--s4) * -1);
  scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  scroll-snap-align: start;
  text-align: left;
  background: linear-gradient(135deg, hsl(var(--hue) 90% 55%), var(--violet));
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / .85);
  transition: transform .5s var(--spring);
}
.poster img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.poster::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 0 0 1px rgb(255 255 255 / .14);
  pointer-events: none;
}
.poster:hover, .poster:focus-visible {
  z-index: 1;
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 30px 60px -22px rgb(0 0 0 / .95), 0 0 0 2px rgb(255 255 255 / .6);
}
.poster:hover img, .poster:hover .art { transform: scale(1.06); }
.poster:active { transform: scale(.97); }
.poster__shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(to bottom, rgb(12 3 18 / .45), transparent 30%); }
.poster__badge { position: absolute; top: var(--s2); left: var(--s2); padding: 4px 11px; font-size: .75rem; font-weight: 700; }
.poster.is-done .poster__badge { color: var(--good); }
.poster.is-partial .poster__badge { color: var(--gold); }
.poster__title {
  position: absolute;
  left: var(--s3);
  right: var(--s3);
  bottom: var(--s4);
  font: 800 1.35rem/1.05 var(--font-display);
  letter-spacing: -.04em;
  text-shadow: 0 2px 12px rgb(0 0 0 / .4);
}
.poster__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgb(255 255 255 / .25); }
.poster__bar i { display: block; height: 100%; background: var(--brand-gradient); }

/* Drawn art (art.js) for categories without a poster image. */
.art { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; transition: transform .9s var(--ease); }
.art .f { fill: #fff; }
.art__icon { filter: drop-shadow(0 3px 6px rgb(0 0 0 / .35)); }

.tile__orb {
  position: absolute;
  z-index: -2;
  right: -36px;
  top: -36px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, hsl(var(--hue) 100% 75%), hsl(var(--hue) 90% 55% / .7) 45%, transparent 70%);
  filter: blur(6px);
  opacity: .85;
}

.empty { padding: var(--s7) var(--s5); text-align: center; color: var(--ink-2); border-radius: var(--r-lg); }

/* --- game ------------------------------------------------------------------ */

.game { gap: var(--s6); max-width: 680px; margin: 0 auto; }

.game__bar { display: flex; align-items: center; gap: var(--s4); padding: var(--s2) var(--s2) var(--s2) var(--s5); }
.game__title { margin-right: auto; min-width: 0; }
.game__title strong { display: block; font: 700 1.1rem/1.3 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game__title small { color: var(--ink-3); font-size: .85rem; }
.score-pill { padding: 10px 18px; border-radius: 999px; background: rgb(0 0 0 / .2); font: 700 1.1rem var(--font-display); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
/* Interface icons (UI in icons.js): sized and coloured like the text around them. */
.i { width: 1em; height: 1em; flex: none; vertical-align: -.14em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.i--fill { fill: currentColor; stroke-width: 1.5; }
.btn .i { margin-right: .1em; }
.icon-btn .i, .stage-btn--icon .i { width: 20px; height: 20px; }
.icon-btn:hover { background: rgb(255 255 255 / .1); }

.progress { display: flex; gap: var(--s2); }
.progress span {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgb(255 255 255 / .14);
  transition: background .4s, box-shadow .4s;
}
.progress .is-now { background: rgb(255 255 255 / .55); box-shadow: 0 0 10px rgb(255 255 255 / .5); }
.progress .is-good { background: var(--good); box-shadow: 0 0 10px var(--good); }
.progress .is-bad { background: var(--bad); }
.progress .is-miss { background: rgb(255 255 255 / .3); }

.stage { display: grid; place-items: center; padding: var(--s5) 0; }
.orb {
  position: relative;
  display: grid;
  place-items: center;
  width: min(290px, 68vw);
  aspect-ratio: 1;
  border-radius: 50%;
}
.orb canvas { position: absolute; top: -14%; right: -14%; bottom: -14%; left: -14%; width: 128%; height: 128%; z-index: -2; }
.orb__ring { position: absolute; top: -6px; right: -6px; bottom: -6px; left: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); }
.orb__ring circle { fill: none; stroke-width: 4; }
.orb__ring .track { stroke: rgb(255 255 255 / .1); }
.orb__ring .fill { stroke: url(#ring-grad); stroke-linecap: round; transition: stroke .3s; }
.orb__center { text-align: center; }
.orb__points { font: 800 clamp(2.4rem, 10vw, 3.4rem)/1 var(--font-display); letter-spacing: -.04em; }
.orb__label { margin-top: var(--s2); color: var(--ink-3); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.orb__cover {
  position: absolute;
  top: 10%; right: 10%; bottom: 10%; left: 10%;
  border-radius: 50%;
  background: var(--cover) center / cover;
  box-shadow: 0 10px 40px rgb(0 0 0 / .5);
  opacity: 0;
  transform: scale(.85) rotate(-8deg);
  transition: opacity .6s var(--ease), transform .9s var(--spring);
}
.orb.is-revealed .orb__cover { opacity: 1; transform: none; animation: spin 18s linear infinite .9s; }
.orb.is-revealed .orb__center { opacity: 0; }
.orb.is-loading .orb__points { animation: pulse 1.2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.choice {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 108px;
  padding: var(--s5);
  text-align: left;
  border-radius: var(--r-md);
}
.choice__key {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgb(255 255 255 / .1);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2);
  color: var(--ink-2);
  font: 700 .9rem var(--font-display);
}
/* Album cover on each choice, with the keyboard number as a small badge. */
.choice__cover { position: relative; flex: none; width: 64px; height: 64px; }
.choice__cover img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 16px -6px rgb(0 0 0 / .7); }
.choice__cover .choice__key { position: absolute; left: -6px; top: -6px; width: 24px; height: 24px; border-radius: 8px; font-size: .75rem; background: rgb(20 8 30 / .85); }
.choice__text { display: grid; gap: 2px; min-width: 0; }
.choice__title { font-weight: 700; font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.choice__artist { color: var(--ink-2); font-size: 1rem; overflow-wrap: anywhere; }
.choice.is-correct { --glass-tint-hi: rgb(198 255 61 / .45); --glass-tint: rgb(198 255 61 / .15); }
.choice.is-correct .choice__key { background: var(--good); color: #1d2b05; }
.choice.is-wrong { --glass-tint-hi: rgb(255 77 94 / .5); --glass-tint: rgb(255 77 94 / .18); animation: shake .45s; }
.choice.is-wrong .choice__key { background: var(--bad); color: #2b0510; }
.choice.is-dim { opacity: .4; }
.choices.is-locked .choice { pointer-events: none; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.reveal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4) var(--s5);
  padding: var(--s5) var(--s5) var(--s5) var(--s6);
  animation: rise .5s var(--ease) both;
}
.reveal__text { display: grid; gap: var(--s1); flex: 1 1 260px; min-width: 0; }
.reveal__verdict { font: 800 1.6rem/1.2 var(--font-display); }
.reveal__verdict.good { color: var(--good); }
.reveal__verdict.bad { color: var(--bad); }
.reveal__song { display: grid; color: var(--ink-2); overflow-wrap: anywhere; }
.reveal__song a { font-weight: 600; text-decoration: none; }
/* Deezer's official "Listen on Deezer" badge, used as-is. */
.deezer-btn { display: block; flex: none; margin-left: auto; line-height: 0; }
/* Same height as the round Next button beside it. */
.deezer-btn img { width: auto; height: 72px; }

/* Next song: a big round arrow (a trophy after the last song). */
.next-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
}
.next-btn svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.reveal__song a { color: var(--ink); text-decoration-color: rgb(255 255 255 / .3); }

.tap-to-play { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; border-radius: 50%; font-weight: 600; }

/* --- results & boards ------------------------------------------------- */

.results { gap: var(--s6); max-width: 720px; margin: 0 auto; }
.results__card { display: grid; justify-items: center; gap: var(--s3); padding: var(--s7) var(--s6); text-align: center; border-radius: var(--r-xl); }
.results__score { font: 800 clamp(3.4rem, 14vw, 5.4rem)/1 var(--font-display); letter-spacing: -.05em; margin: var(--s2) 0; }
.results__grid { font-size: 1.6rem; letter-spacing: .15em; margin: var(--s3) 0 0; }
.results__card .actions { justify-content: center; margin-top: var(--s5); }


.board { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-lg); }
.board__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s4); padding: var(--s4) var(--s4) var(--s2); }
.board ol { display: grid; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.board li {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
}
.board li:nth-child(-n+3) .rank { color: var(--gold); }
.board li.is-me { background: rgb(255 255 255 / .12); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); }
.rank { font: 700 1rem var(--font-display); color: var(--ink-3); text-align: center; }
.board .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.board .tag { margin-left: var(--s2); color: var(--ink-3); font-size: .85rem; font-weight: 400; }
.board .correct { color: var(--ink-3); font-size: .88rem; }
.board .pts { font: 700 1rem var(--font-display); }
.board .recap li { grid-template-columns: 52px 1fr auto; }
.recap img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.recap .name { white-space: normal; line-height: 1.4; }
.recap a { color: inherit; text-decoration: none; }
.recap a:hover { text-decoration: underline; }
.board__empty { padding: var(--s6) var(--s4); text-align: center; color: var(--ink-2); }

.chips { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s1) var(--s1) var(--s3); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 10px 18px; border-radius: 999px; font-weight: 500; color: var(--ink-2); }
.chip[aria-pressed="true"] { color: var(--ink); --glass-tint-hi: rgb(255 255 255 / .28); }

.code-form { display: flex; align-items: center; gap: var(--s2); max-width: 460px; padding: var(--s2) var(--s2) var(--s2) var(--s5); }
.code-form input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  background: none;
  outline: none;
  font: 600 1.05rem var(--font-display);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.code-form input::placeholder { font-family: var(--font-body); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); }


/* --- category detail ------------------------------------------------------- */

body.detail-open { overflow: hidden; }
.detail {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--s5);
  background: rgb(6 2 12 / .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: fade .3s both;
}
.detail__panel {
  display: grid;
  grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: var(--s7);
  width: min(940px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: var(--s7);
  border-radius: var(--r-xl);
  background-color: rgb(20 8 30 / .45);
  animation: fade .35s both;
}
/* The poster's colours, blurred, behind the panel. */
.detail__bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -2; overflow: hidden; border-radius: inherit; }
.detail__bg::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px; bottom: -60px; left: -60px;
  background: var(--bg-img, none) center / cover no-repeat, linear-gradient(135deg, hsl(var(--hue, 330) 85% 45%), var(--violet));
  filter: blur(48px) saturate(150%);
  opacity: .55;
}
.detail__close { position: absolute; top: var(--s4); right: var(--s4); width: 44px; height: 44px; z-index: 1; }
.detail__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  transform-origin: top left;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .25);
}
.detail__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail__info { display: grid; gap: var(--s5); animation: rise .5s .1s var(--ease) both; }
.detail__group { color: var(--ink-3); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.detail__info h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.05; }
.detail__bio { color: var(--ink-2); font-size: 1.1rem; line-height: 1.7; }
.detail__status { font-weight: 600; }
.detail__facts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.btn--danger { color: #ffb3bd; }
.btn--danger:hover { --glass-tint-hi: rgb(255 77 94 / .35); }
.detail__status.is-done { color: var(--good); }
.detail__status.is-partial { color: var(--gold); }
.detail .actions .btn { min-height: 60px; padding: 0 var(--s6); font-size: 1.1rem; }

@media (max-width: 720px) {
  .detail { padding: var(--s3); align-items: end; }
  .detail__panel { grid-template-columns: 1fr; gap: var(--s5); padding: var(--s6) var(--s5); max-height: 92vh; }
  .detail__poster { width: 46%; margin: 0 auto; }
  .detail .actions .btn { flex: 1 1 auto; }
}

/* --- Bopla Live ------------------------------------------------------------ */

/* Live page */
.live-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  align-items: center;
  gap: var(--s7);
  padding: var(--s7);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.live-hero__eq {
  position: absolute;
  z-index: -2;
  right: -2%;
  bottom: 0;
  left: 38%;
  display: flex;
  align-items: flex-end;
  gap: 1.2%;
  height: 100%;
  opacity: .16;
  pointer-events: none;
}
.live-hero__eq i { flex: 1; height: 100%; transform: scaleY(.3); transform-origin: bottom; border-radius: 999px 999px 0 0; background: var(--brand-gradient); animation: eq 1.4s ease-in-out infinite alternate; }
.live-hero__eq i:nth-child(3n) { animation-duration: .9s; }
.live-hero__eq i:nth-child(4n+1) { animation-duration: 1.9s; animation-delay: -.6s; }
.live-hero__eq i:nth-child(5n+2) { animation-delay: -1.1s; }
.live-hero__copy { display: grid; gap: var(--s5); }
.live-hero h1 { font-size: clamp(3rem, 8vw, 5.6rem); line-height: .95; letter-spacing: -.05em; }
.live-steps { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-weight: 600; }
.live-steps b {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: var(--s2);
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: .85rem;
}
.live-quickjoin { display: grid; gap: var(--s3); padding: var(--s5); border-radius: var(--r-lg); }
.live-quickjoin > span { font-weight: 700; font-size: 1.1rem; }
.live-quickjoin .btn { width: 100%; min-height: 56px; font-size: 1.05rem; }

/* Stage mode: the host screen and phones drop the site chrome. */
body.stage-mode .topbar { display: none !important; }
body.stage-mode main { max-width: 1480px; padding-top: var(--s5); padding-bottom: var(--s6); }

/* The bopla live logo: same mark and face as the site's wordmark. */
.live-logo { display: inline-flex; align-items: center; gap: 4px; font: 600 1.9rem/1 "Unbounded", var(--font-display); letter-spacing: -.03em; white-space: nowrap; }
.live-logo img { width: 44px; height: 44px; }
.live-logo b { font-weight: 600; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); padding: var(--s2) 0; }
.stage-bar__title { margin-right: auto; padding-left: var(--s4); border-left: 2px solid rgb(255 255 255 / .2); color: var(--ink-2); font-size: 1.3rem; font-weight: 700; }
.stage-pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; font-size: 1.1rem; font-weight: 600; color: var(--ink-2); }
.stage-pill b { color: var(--ink); font-size: 1.2em; }
.stage-btn { min-height: 52px; padding: 0 var(--s5); font-size: 1.1rem; font-weight: 600; }
.stage-btn--icon { display: inline-grid; place-items: center; width: 52px; padding: 0; font-size: 1.25rem; line-height: 1; }
.sound-icon { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound-icon path:first-child { fill: currentColor; }

.live-host { gap: var(--s5); min-height: calc(100vh - 56px); grid-template-rows: auto 1fr; }
.live-kicker { color: var(--ink-3); font-weight: 700; font-size: clamp(.9rem, 1.4vw, 1.15rem); letter-spacing: .16em; text-transform: uppercase; }
.live-big { font-size: clamp(2.8rem, 7.5vw, 6.4rem); line-height: 1; letter-spacing: -.05em; }
.live-cta { min-height: 72px; padding: 0 var(--s7); font-size: 1.35rem; }
.live-cta:disabled { opacity: .45; }

/* Lobby */
.lobby { display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: var(--s7); align-items: center; }
.lobby__join { display: grid; justify-items: center; gap: var(--s3); padding: var(--s6); text-align: center; border-radius: var(--r-xl); }
.lobby__label { font-weight: 700; font-size: 1.2rem; }
.live-qr { width: min(300px, 100%); aspect-ratio: 1; padding: 6px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 20px 50px -20px rgb(0 0 0 / .8); }
.lobby__or { color: var(--ink-2); font-size: 1.05rem; }
.lobby__or strong { display: block; color: var(--ink); font-size: 1.35rem; word-break: break-all; }
.live-code { display: flex; align-items: center; gap: .18em; font-size: clamp(3rem, 4.4vw, 4.6rem); font-weight: 800; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.live-code span { width: .1em; }
.live-warn { padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: rgb(255 194 61 / .15); color: var(--gold); font-size: .9rem; }
.live-warn code { font-weight: 700; }
.lobby__main { display: grid; gap: var(--s5); align-content: center; }
.lobby__title { font-size: clamp(3rem, 7vw, 5.6rem); line-height: 1; letter-spacing: -.05em; }
.lobby__players { display: grid; gap: var(--s4); padding: var(--s5); border-radius: var(--r-xl); min-height: 220px; align-content: start; }
.lobby__count { font-size: 1.1rem; font-weight: 600; color: var(--ink-2); }
.lobby__count span { font-size: 2.4rem; font-weight: 800; color: var(--ink); margin-right: 6px; }
.lobby__waiting { display: flex; align-items: center; gap: var(--s4); color: var(--ink-2); font-size: 1.2rem; }
.live-chips { display: flex; flex-wrap: wrap; gap: var(--s2); align-content: flex-start; }
.live-chip {
  padding: 10px 20px;
  border-radius: 999px;
  background: hsl(var(--hue) 80% 60% / .28);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 0 0 1px hsl(var(--hue) 90% 70% / .45);
  font-weight: 700;
  font-size: 1.2rem;
  animation: pop .5s var(--spring) both;
}
.live-chip.is-away { opacity: .4; }

/* Rounds */
.live-stage { display: grid; justify-items: center; align-content: center; gap: var(--s5); text-align: center; animation: rise .5s var(--ease) both; }
.live-stage--wide { justify-items: stretch; text-align: left; align-content: start; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); }
.live-head .live-big { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.live-answered { display: flex; align-items: center; justify-content: center; gap: var(--s3); color: var(--ink-2); font-size: 1.3rem; font-weight: 600; }
.live-answered .num { color: var(--ink); font-weight: 800; }
.live-dots { display: flex; flex-wrap: wrap; gap: 6px; max-width: 50%; }
.live-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgb(255 255 255 / .18); transition: background .3s, transform .4s var(--spring); }
.live-dots i.on { background: var(--good); transform: scale(1.15); }

.live-ring { position: relative; display: grid; place-items: center; width: 120px; aspect-ratio: 1; flex: none; }
.live-ring svg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: rotate(-90deg); }
.live-ring circle { fill: none; stroke-width: 7; }
.live-ring .track { stroke: rgb(255 255 255 / .12); }
.live-ring .fill { stroke: var(--laser); stroke-linecap: round; stroke-dasharray: 100; filter: drop-shadow(0 0 8px rgb(198 255 61 / .5)); }
.live-ring span { font-size: 2.6rem; font-weight: 800; }
.live-ring--big { width: 180px; }
.live-ring--big span { font-size: 4rem; }
.live-ring--small { width: 84px; }
.live-ring--small span { font-size: 1.8rem; }

/* Equalizer that bounces while the song plays. */
.live-eq { display: flex; align-items: flex-end; justify-content: center; gap: 12px; height: clamp(140px, 24vh, 240px); }
.live-eq i { width: clamp(14px, 1.6vw, 24px); height: 100%; transform: scaleY(.2); transform-origin: bottom; border-radius: 999px; background: var(--brand-gradient); }
.live-eq.is-playing i { animation: eq 1s ease-in-out infinite alternate; }
.live-eq.is-paused i { animation-play-state: paused; opacity: .5; }
.live-eq i:nth-child(2n) { animation-duration: .7s; }
.live-eq i:nth-child(3n) { animation-duration: 1.3s; }
.live-eq i:nth-child(4n) { animation-delay: -.4s; }
.live-eq i:nth-child(5n+1) { animation-delay: -.8s; }
.live-eq--small { height: 36px; gap: 4px; }
.live-eq--small i { width: 6px; }
@keyframes eq { from { transform: scaleY(.15); } to { transform: scaleY(1); } }

.live-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.live-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: clamp(110px, 18vh, 170px);
  padding: var(--s5) var(--s6);
  border-radius: var(--r-xl);
  background: var(--opt);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .35), inset 0 -4px 0 rgb(0 0 0 / .18), 0 24px 50px -24px rgb(0 0 0 / .9);
  color: #fff;
  text-align: left;
  animation: rise .45s var(--ease) both;
  transition: opacity .4s, transform .5s var(--spring), filter .4s;
}
.opt-0 { --opt: linear-gradient(140deg, #ff5a9e, #d4246d); }
.opt-1 { --opt: linear-gradient(140deg, #ffad4a, #ff6a2f); }
.opt-2 { --opt: linear-gradient(140deg, #c25cff, #7b2bd6); }
.opt-3 { --opt: linear-gradient(140deg, #4cc8ff, #2a6fd6); }
.live-option__key {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(52px, 5vw, 72px);
  aspect-ratio: 1;
  border-radius: 18px;
  background: rgb(255 255 255 / .22);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .4);
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 800;
}
.live-option__cover { position: relative; flex: none; width: clamp(64px, 7vw, 104px); aspect-ratio: 1; }
.live-option__cover img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .8); }
.live-option__cover .live-option__key { position: absolute; left: -10px; top: -10px; width: 40px; font-size: 1.2rem; border-radius: 12px; background: rgb(0 0 0 / .55); }
.live-option__text { display: grid; gap: 4px; min-width: 0; }
.live-option__text strong { font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.15; overflow-wrap: anywhere; }
.live-option__text small { font-size: clamp(1rem, 1.5vw, 1.35rem); opacity: .85; overflow-wrap: anywhere; }
.live-option__tick { margin-left: auto; font-size: 2.6rem; font-weight: 800; }
.live-option.is-dim { opacity: .25; filter: saturate(.4); }
.live-option.is-correct { transform: scale(1.03); box-shadow: 0 0 0 5px var(--laser), 0 24px 50px -24px rgb(0 0 0 / .9); }
button.live-option { cursor: pointer; border: 0; font: inherit; }
button.live-option:active { transform: scale(.96); }

.live-reveal { display: flex; align-items: center; gap: var(--s7); }
/* Making a game: the bars bounce, the dots hop one after another. */
.live-loading { min-height: 70vh; align-content: center; }
html.tv .live-loading { min-height: calc(var(--screen-h, 100vh) * .8); }
.live-loading__dots { display: flex; gap: 12px; }
.live-loading__dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--laser); animation: hop 1.1s var(--ease) infinite; }
.live-loading__dots i:nth-child(2) { animation-delay: .15s; }
.live-loading__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-14px); opacity: 1; } }
.live-reveal img { width: clamp(200px, 30vw, 420px); aspect-ratio: 1; border-radius: var(--r-xl); object-fit: cover; box-shadow: 0 40px 80px -30px rgb(0 0 0 / .9); animation: pop .6s var(--spring) both; }
.live-reveal .live-big { font-size: clamp(2.4rem, 5.5vw, 4.8rem); }
.live-reveal__artist { font-size: clamp(1.3rem, 2.4vw, 2rem); color: var(--ink-2); font-weight: 600; }
.live-reveal .stage-pill { justify-self: start; margin-top: var(--s2); font-size: 1.1rem; }
.live-reveal__credit { margin: 0; color: var(--ink-3); font-size: .9rem; }

/* Scoreboard: each row's bar grows to its share of the leader's score. */
.live-scores { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.live-scores li {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / .06);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18);
  overflow: hidden;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  animation: rise .5s var(--ease) both;
}
.live-scores__bar {
  position: absolute;
  top: 0; right: auto; bottom: 0; left: 0;
  z-index: -1;
  width: var(--w);
  background: linear-gradient(90deg, rgb(255 61 139 / .35), rgb(255 122 47 / .25));
  transform-origin: left;
  animation: grow 1s .2s var(--ease) both;
}
@keyframes grow { from { transform: scaleX(0); } }
.live-scores li:first-child .live-scores__bar { background: linear-gradient(90deg, rgb(255 194 61 / .5), rgb(255 122 47 / .3)); }
.live-scores .rank { font-weight: 800; color: var(--ink-2); }
.live-scores li:nth-child(-n+3) .rank { color: var(--gold); }
.live-scores .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-scores .gain { color: var(--good); font-weight: 700; font-size: .8em; }
.live-scores .pts { font-weight: 800; }
.live-scores--rest { width: min(760px, 100%); }
.live-scores--rest li { font-size: 1.15rem; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: var(--s4); width: min(760px, 100%); margin-top: var(--s4); }
.podium__step { display: grid; justify-items: center; gap: var(--s1); flex: 1; animation: rise .8s var(--spring) both; }
.podium__name { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 800; }
.podium__pts { color: var(--ink-2); font-weight: 700; }
.podium__block {
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: var(--s2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(180deg, rgb(255 255 255 / .2), rgb(255 255 255 / .05));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45);
  font-size: 3rem;
  font-weight: 800;
}
.podium__step--1 .podium__block { height: 240px; background: linear-gradient(180deg, #ffc23d, #ff7a2f); color: #2b1300; }
.podium__step--2 .podium__block { height: 170px; }
.podium__step--3 .podium__block { height: 120px; }
.podium__step--1 { animation-delay: .5s; }
.podium__step--2 { animation-delay: .25s; }

/* Phone controller: one thing at a time, huge buttons. */
.live-phone { max-width: 560px; margin: 0 auto; gap: var(--s4); }
/* The logo keeps its size; the name gets the room that's left and is
   shortened with "…" when it doesn't fit. */
.phone-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.phone-top .live-logo { flex: none; font-size: 1.45rem; }
.phone-top .live-logo img { width: 34px; height: 34px; }
.phone-top__right { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: var(--s2); min-width: 0; }
.phone-me { display: grid; justify-items: end; flex: 0 1 auto; min-width: 0; line-height: 1.2; }
.phone-me b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.phone-me small { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
/* A small phone shows the mark and the game's name, without "bopla". */
@media (max-width: 420px) {
  .phone-top .live-logo { font-size: 1.3rem; }
  .phone-top .live-logo__brand { display: none; }
}
.phone-top .stage-btn { min-height: 44px; }
.phone-top .stage-btn--icon { width: 44px; }
.phone-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--s3);
  min-height: calc(100dvh - 140px);
  padding: var(--s6) var(--s5);
  text-align: center;
  border-radius: var(--r-xl);
  animation: rise .45s var(--ease) both;
}
.phone-card h1 { font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1.05; }
.phone-card .live-eq { height: 120px; gap: 8px; }
.phone-card .live-eq i { width: 16px; }
.phone-kicker { color: var(--ink-3); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .9rem; }
.phone-big { font-size: clamp(5rem, 28vw, 8rem); font-weight: 800; line-height: 1; }
.phone-card.is-good { --glass-tint-hi: rgb(198 255 61 / .45); --glass-tint: rgb(198 255 61 / .15); }
.phone-card.is-good .phone-big, .phone-card.is-good h1 { color: var(--good); }
.phone-card.is-bad { --glass-tint-hi: rgb(255 77 94 / .45); --glass-tint: rgb(255 77 94 / .15); }
.phone-card.is-bad .phone-big, .phone-card.is-bad h1 { color: var(--bad); }
.phone-card[class*="opt-"] { background: var(--opt); }
.phone-answer { display: grid; grid-template-rows: auto 1fr; gap: var(--s3); height: calc(100dvh - 120px); }
.phone-answer .live-ring { justify-self: center; }
.phone-answer .live-options { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: var(--s3); }
.phone-answer .live-option { flex-direction: column; justify-content: center; gap: var(--s3); min-height: 0; padding: var(--s4); text-align: center; border-radius: var(--r-lg); }
.phone-answer .live-option__text strong { font-size: 1.05rem; }
.phone-answer .live-option__text small { font-size: .85rem; }
.phone-answer .live-option__cover { width: min(28vw, 110px); }
.live-code-input { height: 84px; font-size: 2.6rem; font-weight: 800; letter-spacing: .3em; text-align: center; }

/* Not on a TV: Android TVs show pages 960 wide (at twice the size), and a TV
   keeps the big-screen layout, which is sized to fit its one screen. */
@media (max-width: 960px) {
  html:not(.tv) .live-hero, html:not(.tv) .lobby { grid-template-columns: 1fr; }
  html:not(.tv) .live-hero__eq { left: 0; }
  html:not(.tv) .live-options { grid-template-columns: 1fr; }
  html:not(.tv) .live-reveal { flex-direction: column; text-align: center; }
  html:not(.tv) .live-reveal .stage-pill { justify-self: center; }
  html:not(.tv) .stage-bar__title { display: none; }
}

/* --- sheet & toast --------------------------------------------------------- */

.sheet {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--s4);
  background: rgb(4 5 18 / .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade .3s both;
}
@keyframes fade { from { opacity: 0; } }
.sheet__panel {
  display: grid;
  gap: var(--s4);
  width: min(440px, 100%);
  padding: var(--s6);
  border-radius: var(--r-xl);
  --glass-tint-hi: rgb(255 255 255 / .2);
  background-color: rgb(14 14 38 / .55);
  animation: pop .55s var(--spring) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.88) translateY(20px); } }
.sheet__actions { display: flex; gap: var(--s3); justify-content: flex-end; margin-top: var(--s3); }
/* An on/off switch in the profile (automatic mode). */
.toggle { display: flex; align-items: center; gap: var(--s4); width: 100%; padding: var(--s3) var(--s4); border-radius: var(--r-md); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.toggle__text { display: grid; gap: 2px; flex: 1; }
.toggle__text small { color: var(--ink-2); font-size: .9rem; }
.toggle__switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 15px; background: rgb(255 255 255 / .2); transition: background .25s; }
.toggle__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); }
.toggle[aria-pressed="true"] .toggle__switch { background: var(--laser); }
.toggle[aria-pressed="true"] .toggle__switch::after { transform: translateX(22px); background: var(--night); }
/* Profile: what saving the name means, and the way to the policy and your data. */
.consent { color: var(--ink-3); font-size: .85rem; line-height: 1.5; }
.profile-links { display: flex; flex-wrap: wrap; gap: var(--s2); }
.profile-links .btn { min-height: 44px; padding: 0 var(--s4); font-size: .95rem; }
/* The privacy policy and Your data, read over the profile. */
.sheet__panel--read { width: min(720px, 100%); max-height: 88vh; grid-template-rows: auto minmax(0, 1fr) auto; }
html.tv .sheet__panel--read { max-height: calc(var(--screen-h, 100vh) * .88); }
/* The profile has grown: a little tighter on a TV, so it fits the screen. */
html.tv .sheet__panel { gap: var(--s3); padding: var(--s5) var(--s6); }
.read { display: grid; gap: var(--s4); overflow-y: auto; padding-right: var(--s2); }
.read section { display: grid; gap: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-sm); }
.read section p { color: var(--ink-2); line-height: 1.65; }
.read h2 { font-size: 1.05rem; }
.read section:focus-visible { outline: 2px solid var(--laser); outline-offset: 0; background: rgb(255 255 255 / .05); }
.mydata { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s5); margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: rgb(0 0 0 / .18); }
.mydata dt { color: var(--ink-3); }
.mydata dd { margin: 0; overflow-wrap: anywhere; }
/* How long a game? Three big choices. */
.length-pick { display: grid; gap: var(--s3); }
.length-pick__btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 64px;
  padding: var(--s4) var(--s5);
  border-radius: var(--r-lg);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.length-pick__btn b { font-size: 1.25rem; }
.length-pick__btn span { color: var(--ink-2); font-weight: 600; }
.length-pick__btn:hover, .length-pick__btn:focus-visible { background-color: rgb(255 255 255 / .16); }
.length-pick__btn:focus-visible { outline: 3px solid var(--laser); outline-offset: 2px; }

.field {
  width: 100%;
  padding: var(--s4) var(--s5);
  border: 0;
  border-radius: var(--r-md);
  background: rgb(0 0 0 / .22);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / .35), inset 0 -1px 0 rgb(255 255 255 / .12);
  font-size: 1.05rem;
  outline: none;
}
.field:focus { box-shadow: inset 0 1px 3px rgb(0 0 0 / .35), 0 0 0 2px var(--laser); }
.suggestions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.suggestions button { padding: 8px 14px; font-size: .9rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(var(--s5), env(safe-area-inset-bottom));
  z-index: 60;
  padding: 14px 22px;
  transform: translateX(-50%);
  font-weight: 500;
  animation: pop .45s var(--spring) both;
  max-width: calc(100vw - 32px);
}

/* Two quiet links at the bottom of the phone menu. */
.menu__small--next { margin-top: 0; }

/* --- legal pages (/privacy, /terms) ---------------------------------------- */

/* Plain text in Bopla's glass panels on the aurora. */
.policy { max-width: 820px; margin: 0 auto; gap: var(--s6); }
.policy__hero { display: grid; gap: var(--s3); }
/* Clear of the fixed top bar when opened at a section (/privacy#cookies). */
.policy section { display: grid; gap: var(--s3); padding: var(--s6); scroll-margin-top: 112px; }
.policy section p, .policy section li { color: var(--ink-2); line-height: 1.7; }
.policy section ul { display: grid; gap: var(--s2); margin: 0; padding-left: 1.2em; }
.policy a { color: var(--ink); text-underline-offset: 3px; }
.policy__back { justify-self: start; }
/* Links dressed as Bopla's buttons. */
.legal .topbar a, .policy__back { text-decoration: none; }
.legal .topbar .brand { margin-right: auto; }
@media (max-width: 640px) {
  .policy section { padding: var(--s5); }
  .legal .site-foot { padding-bottom: var(--s6); }
}

/* --- small screens --------------------------------------------------------- */

@media (max-width: 640px) {
  .topbar__links { display: none; }
  .brand { margin-right: auto; }
  main { padding: var(--s4) var(--s4) var(--s6); }
  .view { gap: var(--s6); }
  .rows { gap: var(--s6); }
  .row__nav { display: none; }
  .row__track { grid-auto-columns: 40vw; gap: var(--s3); }
  .choices { grid-template-columns: 1fr; gap: var(--s3); }
  .choice { min-height: 80px; padding: var(--s4); }
  .reveal { padding: var(--s5); }
  .next-btn { width: 64px; height: 64px; }
  .deezer-btn { margin-left: 0; }
  .deezer-btn img { height: 64px; }
  .results__card { padding: var(--s6) var(--s5); }
  .board li { grid-template-columns: 32px 1fr auto; gap: var(--s3); }
  .board li .correct { display: none; }
  .board .recap li { grid-template-columns: 48px 1fr auto; }
  .player-chip { display: none; }
  .menu-btn { display: grid; }
}

/* Quiet links at the very bottom of the page, with the copyright and the
   credit to Deezer; out of the way during games and on TVs, where the
   remote shouldn't wander off to a web page. */
.site-foot {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  padding: 0 var(--s4) var(--s6);
  color: var(--ink-3);
  font-size: .9rem;
  text-align: center;
}
.site-foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s4); }
.site-foot__meta { margin: 0; }
.site-foot a { color: var(--ink-2); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--ink); }
body.in-game .site-foot, body.stage-mode .site-foot, html.tv .site-foot { display: none; }
@media (max-width: 640px) { .site-foot { padding-bottom: calc(var(--s8) + var(--s6) + env(safe-area-inset-bottom)); } }

/* The menu on a phone: a button in the top bar, and a panel from the side. */
.menu-btn { display: none; place-content: center; gap: 5px; width: 44px; height: 44px; margin-left: auto; border-radius: 50%; }
.menu-btn span { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--ink); }
.menu { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; background: rgb(8 2 12 / .6); animation: menu-fade .2s ease both; }
.menu__panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: var(--s1); width: min(320px, 84vw); padding: max(var(--s4), env(safe-area-inset-top)) var(--s4) var(--s5); background: #1c0b28; box-shadow: -18px 0 50px rgb(0 0 0 / .5); animation: menu-slide .26s var(--ease) both; }
.menu__close { align-self: flex-end; position: relative; width: 44px; height: 44px; margin-bottom: var(--s3); }
.menu__close::before, .menu__close::after { content: ""; position: absolute; top: 21px; left: 10px; width: 24px; height: 2.5px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
.menu__close::after { transform: rotate(-45deg); }
.menu__item { min-height: 58px; padding: 0 var(--s4); border-radius: var(--r-sm); text-align: left; font: 700 1.3rem var(--font-display); color: var(--ink); }
.menu__small { margin-top: auto; padding: var(--s3) var(--s4); color: var(--ink-3); text-decoration: none; }
body.menu-open { overflow: hidden; }
@keyframes menu-fade { from { opacity: 0; } }
@keyframes menu-slide { from { transform: translateX(100%); } }
html.tv .menu-btn, html.tv .menu { display: none !important; }

/* --- TV mode (html.tv, see tv.js) ---------------------------------------- */

/* Browsers without backdrop blur (many older TVs) get solid glass so text
   stays readable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background-color: rgb(32 14 46 / .88); }
}

/* Old TV chips struggle with big blurs and moving layers, so TV mode swaps
   them for still gradients that look nearly the same. */
html.tv .aurora { filter: none; top: 0; right: 0; bottom: 0; left: 0; }
html.tv .aurora i { animation: none; background: radial-gradient(circle, var(--c) 0%, transparent 65%) !important; opacity: .55; }
html.tv .aurora i:nth-child(1) { --c: var(--night); }
html.tv .aurora i:nth-child(2) { --c: var(--pink); }
html.tv .aurora i:nth-child(3) { --c: var(--orange); }
html.tv .aurora i:nth-child(4) { --c: var(--violet); }
html.tv .beams, html.tv .live-hero__eq { display: none; }
html.tv .ambient { top: 0; right: 0; bottom: 0; left: 0; filter: none; }
html.tv .ambient.is-on { opacity: .32; }
html.tv .glass,
html.tv .refract .glass--refract {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background-color: rgb(32 14 46 / .86);
}
html.tv .glass::after { display: none; }
html.tv .sheet, html.tv .detail { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(8 2 14 / .85); }
html.tv .tile__orb, html.tv .detail__bg::before { filter: none; }
html.tv .poster img, html.tv .art { transition: none; }

/* TVs crop the picture edges (overscan): keep everything inside a safe area. */
/* Bopla TV: a rail on the left instead of the top bar, and the content
   using the full width. Insets keep everything clear of TV overscan. */
html.tv .topbar { display: none; }
.tv-rail { display: none; }
html.tv body:not(.stage-mode) .tv-rail {
  position: fixed;
  top: calc(var(--screen-h, 100vh) * 0.03);
  bottom: calc(var(--screen-h, 100vh) * 0.03);
  left: calc(var(--screen-w, 100vw) * 0.02);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--screen-h, 100vh) * 0.014);
  width: 112px;
  padding: calc(var(--screen-h, 100vh) * 0.024) 0;
  border-radius: 32px;
  background: rgb(14 5 22 / .82);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), 0 20px 50px -20px rgb(0 0 0 / .9);
}
.tv-rail__logo { width: 52px; height: 52px; margin-bottom: 2vh; }
.tv-rail .tv-rail__item {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 92px;
  padding: 1.4vh 0;
  border-radius: 22px;
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 700;
}
.tv-rail__item svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tv-rail .tv-rail__item.is-active { color: var(--ink); background: rgb(255 255 255 / .12); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); }
.tv-rail .tv-rail__item.is-active svg { stroke: var(--laser); }
/* One screen, no page scrolling: the page is exactly the screen's height
   (--screen-h, measured in tv.js) and only regions inside it scroll, such as
   the rows of cards. The bottom keeps room for the "by accident?" bar. */
html.tv body:not(.stage-mode) { overflow: hidden; }
html.tv body:not(.stage-mode) main {
  max-width: none;
  height: var(--screen-h, 100vh);
  margin: 0 0 0 calc(calc(var(--screen-w, 100vw) * 0.02) + 112px);
  padding: calc(var(--screen-h, 100vh) * 0.03) calc(var(--screen-w, 100vw) * 0.04) 0 calc(var(--screen-w, 100vw) * 0.03);
  overflow-y: auto;
  scrollbar-width: none;
}
html.tv body:not(.stage-mode) main::-webkit-scrollbar { display: none; }
/* The top scrolls away with the page to make room for the rows, which snap
   into place one at a time so a row is never cut off. */
html.tv body:not(.stage-mode) main.snaps { scroll-snap-type: y mandatory; scroll-padding-top: calc(var(--screen-h, 100vh) * 0.03); }
html.tv main.snaps .tvlive__hero, html.tv main.snaps .row { scroll-snap-align: start; }
html.tv main.snaps .tv-exit { scroll-snap-align: end; }
html.tv .tvlive { gap: calc(var(--screen-h, 100vh) * 0.025); animation: none; }
html.tv .tvlive__hero { min-height: 0; }
html.tv .tvlive .rows { gap: calc(var(--screen-h, 100vh) * 0.03); padding-bottom: calc(var(--screen-h, 100vh) * 0.02); }
html.tv .tvlive .rows > .tv-exit { align-self: start; }
html.tv .tvlive .rows > .tv-exit:only-child { display: none; }
/* Sized from the screen height so the preview plus one full row of cards
   always fit: the preview takes about half, a row the rest. */
html.tv .tvlive .row__track { grid-auto-columns: calc(var(--screen-h, 100vh) * .19); padding-top: 14px; padding-bottom: 16px; }
html.tv .tvlive .row { gap: 0; }
html.tv .tvlive .row__head p { display: none; }
html.tv .tvlive .row__head h2 { font-size: calc(var(--screen-h, 100vh) * .03); }
html.tv .tvlive__info { gap: calc(var(--screen-h, 100vh) * .018); }
html.tv .tvlive__info .live-logo { font-size: calc(var(--screen-h, 100vh) * .032); }
html.tv .tvlive__pick { min-height: 0; gap: calc(var(--screen-h, 100vh) * .012); }
html.tv .tvlive__kicker { font-size: calc(var(--screen-h, 100vh) * .02); }
html.tv .tvlive__title { font-size: calc(var(--screen-h, 100vh) * .085); }
html.tv .tvlive__bio { font-size: calc(var(--screen-h, 100vh) * .024); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
html.tv .tvlive__facts .stage-pill { padding: 6px 14px; font-size: calc(var(--screen-h, 100vh) * .02); }
html.tv .tvlive__actions .btn { min-height: calc(var(--screen-h, 100vh) * .075); font-size: calc(var(--screen-h, 100vh) * .026); }
html.tv .tvlive .size-pick button { padding: 8px 18px; }
html.tv .tvlive__poster { width: calc(var(--screen-h, 100vh) * .24); }

html.tv body.stage-mode main { padding: calc(var(--screen-h, 100vh) * .03) calc(var(--screen-w, 100vw) * 0.03); }

/* With a remote, the focused item must be obvious from across the room. */
html.tv :focus { outline: none; }
html.tv :focus-visible { outline: 4px solid var(--laser); outline-offset: 3px; }
html.tv button:focus,
html.tv a:focus,
html.tv input:focus,
html.tv [tabindex="0"]:focus {
  outline: 4px solid var(--laser);
  outline-offset: 3px;
}
/* Cards get a ring that follows their rounded corners, drawn inside the
   room the row leaves around them so it is never clipped. */
html.tv .poster:focus {
  outline: none;
  transform: scale(1.05);
  box-shadow: 0 0 0 4px var(--laser), 0 24px 50px -20px rgb(0 0 0 / .9);
  z-index: 2;
}
html.tv .row__track { padding: 22px 28px 28px; margin: 0 -28px; scroll-padding-inline: 28px; }
html.tv .live-option:focus, html.tv .choice:focus { transform: scale(1.04); }

/* On a TV the host screen can't scroll, so the lobby and rounds are sized
   by the screen height and always fit on one screen, even at 720p. The
   page is zoomed to the TV, which would zoom vh a second time, so sizes use
   the measured screen height (--screen-h, from tv.js) instead. */
html.tv .live-host { min-height: 0; gap: calc(var(--screen-h, 100vh) * 0.025); }
html.tv .lobby { gap: calc(var(--screen-w, 100vw) * 0.04); }
html.tv .lobby__join { gap: calc(var(--screen-h, 100vh) * 0.012); padding: calc(var(--screen-h, 100vh) * 0.03) calc(var(--screen-w, 100vw) * 0.025); }
html.tv .live-qr { width: min(300px, calc(var(--screen-h, 100vh) * 0.3)); }
html.tv .live-code { font-size: min(4.6rem, calc(var(--screen-h, 100vh) * 0.085)); }
html.tv .lobby__or strong { font-size: min(1.35rem, calc(var(--screen-h, 100vh) * 0.03)); }
html.tv .lobby__main { gap: calc(var(--screen-h, 100vh) * 0.024); }
html.tv .lobby__title { font-size: min(5.6rem, calc(var(--screen-h, 100vh) * 0.11)); }
html.tv .lobby__players { min-height: 0; padding: calc(var(--screen-h, 100vh) * 0.025) calc(var(--screen-w, 100vw) * 0.02); }
html.tv .live-cta { min-height: min(72px, calc(var(--screen-h, 100vh) * 0.09)); }
html.tv .live-warn { font-size: .8rem; padding: calc(var(--screen-h, 100vh) * 0.01) calc(var(--screen-w, 100vw) * 0.01); }
html.tv .live-big { font-size: min(6.4rem, calc(var(--screen-h, 100vh) * 0.12)); }
html.tv .live-eq:not(.live-eq--small) { height: min(240px, calc(var(--screen-h, 100vh) * 0.22)); }
html.tv .live-option { min-height: min(170px, calc(var(--screen-h, 100vh) * 0.17)); padding: calc(var(--screen-h, 100vh) * 0.02) calc(var(--screen-w, 100vw) * 0.02); }
html.tv .live-reveal img { width: min(460px, calc(var(--screen-h, 100vh) * 0.52)); }

/* "In TV mode by accident?" sits at the very bottom of every TV page except
   during a game, below the content rather than floating over it. */
.tv-exit { display: none; }
html.tv body:not(.in-game):not(.stage-mode) .tv-exit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  width: fit-content;
  margin: calc(var(--screen-h, 100vh) * 0.04) auto calc(var(--screen-h, 100vh) * 0.03);
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: rgb(20 8 30 / .92);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2);
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink-2);
}
html.tv body:not(.in-game) .tv-exit .btn { min-height: 46px; color: var(--ink); }

/* Simpler on a TV: the hero is just the logo and the three steps. */
html.tv .live-hero { grid-template-columns: 1fr; }

.live-hero__logo { line-height: 1; }
/* Sized so "bopla live" always fits its column next to the join box. */
.live-hero__logo .live-logo { font-size: min(3.6rem, 5.4vw); gap: .12em; }
@media (max-width: 960px) { html:not(.tv) .live-hero__logo .live-logo { font-size: min(3.6rem, 10vw); } }
.live-hero__logo .live-logo img { width: 1.25em; height: 1.25em; }

.live-tv { justify-self: start; min-height: 46px; padding: 0 var(--s4); font-size: .95rem; }
.live-tv[aria-pressed="true"] { --glass-tint-hi: rgb(198 255 61 / .35); }
.live-tv .sound-icon path:first-child { fill: none; }

/* --- Live home on a TV (tvlive) -------------------------------------------- */

.tvlive { position: relative; gap: 4vh; }
/* The selected playlist fills the screen behind the preview. No blur, so
   it stays light on older TVs. */
.tvlive__backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 25%, rgb(20 6 28 / .55) 60%, rgb(20 6 28 / .2)),
    linear-gradient(0deg, var(--bg) 0%, transparent 45%),
    var(--img, none) right center / cover no-repeat,
    radial-gradient(120% 90% at 85% 30%, hsl(var(--hue, 300) 85% 45%), transparent 70%);
  opacity: .9;
  transition: opacity .9s var(--ease);
  pointer-events: none;
}
.tvlive__backdrop.is-entering { opacity: 0; }
.tvlive__hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4vw; min-height: 52vh; }
.tvlive__info { display: grid; gap: 2.4vh; align-content: center; }
.tvlive__info .live-logo { font-size: min(2.2rem, 4vh); }
.tvlive__info .live-logo img { width: 1.2em; height: 1.2em; }
.tvlive__pick { display: grid; gap: 1.6vh; min-height: 22vh; align-content: start; }
.tvlive__kicker { color: var(--ink-2); font-weight: 700; font-size: min(1.1rem, 2.4vh); letter-spacing: .14em; text-transform: uppercase; }
.tvlive__title { font-size: min(5.6rem, 11vh); line-height: 1; letter-spacing: -.05em; }
.tvlive__bio { max-width: 52ch; color: var(--ink-2); font-size: min(1.3rem, 2.8vh); line-height: 1.5; }
.tvlive__facts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tvlive__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
/* The song count by the Play button. */
.song-count { align-self: center; padding: 8px 16px; font-weight: 700; }
.tvlive__dots { display: flex; gap: 8px; margin-left: var(--s2); }
.tvlive__dots span { width: 10px; height: 10px; border-radius: 5px; background: rgb(255 255 255 / .3); transition: width .3s, background .3s; }
.tvlive__dots span.is-on { width: 30px; background: var(--laser); }
/* The carousel turns softly: the text rises in line by line, the poster
   settles in. */
.tvlive__pick > * { animation: tv-turn .8s var(--ease) both; }
.tvlive__pick > :nth-child(2) { animation-delay: .07s; }
.tvlive__pick > :nth-child(3) { animation-delay: .14s; }
.tvlive__pick > :nth-child(4) { animation-delay: .21s; }
.tvlive__poster > * { animation: tv-settle .9s var(--ease) both; }
@keyframes tv-turn { from { opacity: 0; transform: translateY(12px); } }
@keyframes tv-settle { from { opacity: 0; transform: scale(.96); } }
.tvlive__actions .btn { min-height: min(72px, 9vh); padding: 0 var(--s6); font-size: min(1.35rem, 3vh); }
.tvlive__poster {
  position: relative;
  width: min(300px, 42vh);
  aspect-ratio: 2 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -25px rgb(0 0 0 / .95), 0 0 0 1px rgb(255 255 255 / .2);
}
.tvlive__poster img { width: 100%; height: 100%; object-fit: cover; }
/* The daily game's posters are 9:16 with their name printed at the bottom:
   shown whole, not cropped to 2:3. */
.tvlive__poster--tall { aspect-ratio: 9 / 16; width: min(260px, 36vh); }
html.tv .tvlive__poster--tall { width: calc(var(--screen-h, 100vh) * .2); }
.tvlive .row__head h2 { font-size: min(1.6rem, 3.4vh); }

/* Live rounds: a darker take on the playlist backdrop so the questions stay
   easy to read. */
.tvlive__backdrop--game { opacity: .7; }
html.tv .tvlive__backdrop { background-blend-mode: normal; }
.tvlive__facts .stage-pill.is-done { color: var(--good); }
.tvlive__facts .stage-pill.is-partial { color: var(--gold); }

/* Daily game on a TV: the spinning record on the left, the choices and
   then the result with the Next button on the right, all on one screen. */
html.tv .game {
  max-width: none;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "bar bar"
    "progress progress"
    "stage choices"
    "stage reveal";
  grid-template-rows: auto auto 1fr auto;
  align-items: center;
  gap: calc(var(--screen-h, 100vh) * 0.024) calc(var(--screen-w, 100vw) * 0.04);
  min-height: calc(calc(var(--screen-h, 100vh) * 1) - calc(var(--screen-h, 100vh) * 0.07));
}
html.tv .game__bar { grid-area: bar; }
html.tv .game .progress { grid-area: progress; }
html.tv .game .stage { grid-area: stage; align-self: center; padding: 0; }
html.tv .game .choices { grid-area: choices; align-self: end; grid-template-columns: 1fr 1fr; }
html.tv .game #reveal-slot { grid-area: reveal; align-self: start; min-height: calc(var(--screen-h, 100vh) * 0.13); }
html.tv .game .orb { width: min(calc(var(--screen-h, 100vh) * 0.46), calc(var(--screen-w, 100vw) * 0.3)); }
html.tv .game .choice { min-height: calc(var(--screen-h, 100vh) * 0.15); }
html.tv .game .reveal { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: calc(var(--screen-w, 100vw) * 0.015); padding: calc(var(--screen-h, 100vh) * 0.02) calc(var(--screen-w, 100vw) * 0.02); }
html.tv .game .reveal .deezer-btn { margin: 0; }
html.tv .game .reveal .deezer-btn img { height: min(64px, calc(var(--screen-h, 100vh) * 0.08)); }
html.tv .game .next-btn { width: min(64px, calc(var(--screen-h, 100vh) * 0.08)); height: min(64px, calc(var(--screen-h, 100vh) * 0.08)); }
html.tv .game .reveal__verdict { font-size: min(1.6rem, calc(var(--screen-h, 100vh) * 0.036)); }

/* Older TV browsers (Samsung 2022 and earlier, Chromium 85) have no
   aspect-ratio: the same shapes from fixed heights or padding instead. */
@supports not (aspect-ratio: 1) {
  .poster { height: 0; padding-bottom: 150%; }
  .detail__poster { height: 0; padding-bottom: 150%; }
  .tvlive__poster { height: min(450px, 63vh); }
  html.tv .tvlive__poster { height: calc(var(--screen-h, 100vh) * .36); }
  .tvlive__poster--tall { height: min(462px, 64vh); }
  html.tv .tvlive__poster--tall { height: calc(var(--screen-h, 100vh) * .356); }
  .orb { height: min(290px, 68vw); }
  .live-ring { height: 120px; }
  .live-ring--big { height: 180px; }
  .live-ring--small { height: 84px; }
  .live-option__key { height: clamp(52px, 5vw, 72px); }
  .live-option__cover { height: clamp(64px, 7vw, 104px); }
}

/* Lite mode, for weak and slow TVs (see tv.js): the costly layers (soft
   moving backgrounds, big shadows) and endless animations go, so moving
   around with the remote stays quick. Short fades (the TV top turning, a
   page coming in) and the artist backdrop stay, as they cost the TV little. */
html.lite .aurora, html.lite .beams, html.lite .ambient, html.lite .live-hero__eq, html.lite #viz { display: none; }
html.lite .orb__cover, html.lite .orb__points, html.lite .live-eq i { animation: none !important; }
html.lite .poster, html.lite .glass, html.lite .tvlive__poster { box-shadow: none; }
html.lite .poster:focus { transform: none; }


@media (prefers-reduced-motion: reduce) {
  .beams { display: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- Bopla Timeline ------------------------------------------------------------- */

.tl-title { margin: 0; }
.tl-title .live-logo { font-size: min(2.5rem, 6vw); gap: .12em; }
.tl-title .live-logo img { width: 1.25em; height: 1.25em; }
.tl-lead { margin: 0; font-size: 1.15rem; color: var(--ink); }
.tl-rules { display: grid; gap: var(--s2); max-width: 520px; margin: var(--s2) 0 0; padding: 0 0 0 1.3em; color: var(--ink-2); text-align: left; }

/* Phones: one thing at a time, with the buttons along the bottom. */
.tl-phone { display: flex; flex-direction: column; gap: var(--s3); min-height: calc(100svh - var(--s6)); animation: none; }
.tl-phone__me { display: flex; align-items: center; gap: var(--s3); font-size: 1rem; }
.tl-phone__me b { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-phone__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 64px; animation: tl-in .3s var(--ease) both; }
.tl-phone__head h1 { margin: 0; font: 800 1.9rem/1.12 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tl-phone__head h1.is-good { color: var(--good); }
.tl-phone__note { margin: 0; color: var(--ink-2); animation: tl-in .3s var(--ease) both; }
.tl-phone__main { flex: 1 1 auto; }
.tl-phone__actions { position: sticky; bottom: 0; display: grid; gap: var(--s2); padding: var(--s3) 0 var(--s2); }
.tl-phone__actions .btn { min-height: 56px; background-color: rgb(20 6 28 / .72); font-size: 1.05rem; }
.tl-phone__actions .btn:disabled { opacity: .5; }

.tl-line { display: grid; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.tl-card { display: grid; grid-template-columns: 4.2ch 44px minmax(0, 1fr); align-items: center; gap: var(--s3); padding: var(--s2) var(--s4) var(--s2) var(--s3); border-radius: var(--r-md); }
.tl-card__year { font: 800 1.15rem var(--font-display); color: var(--sun); }
.tl-card img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.tl-card__song { display: grid; min-width: 0; }
.tl-card__song strong, .tl-card__song small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-card__song small { color: var(--ink-3); }
.tl-slot { display: grid; place-items: center; width: 100%; min-height: 52px; border: 2px dashed var(--laser); border-radius: var(--r-sm); background: rgb(198 255 61 / .08); color: var(--laser); font-weight: 700; cursor: pointer; animation: tl-in .3s var(--ease) both; }
.tl-slot:active { background: rgb(198 255 61 / .24); }

.tl-score { font: 800 1.1rem var(--font-display); color: var(--sun); }
.tl-points { color: var(--laser); font-weight: 700; white-space: nowrap; }
/* A long title wraps onto more lines instead of pushing past the screen. */
.tl-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.tl-choice { display: block; width: 100%; min-height: 64px; padding: var(--s3) var(--s4); border-radius: var(--r-md); text-align: left; font-weight: 500; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; animation: tl-in .3s var(--ease) both; }

/* A photo can be any colour, so names always sit on a dark fade. */
.poster .poster__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgb(0 0 0 / .78), rgb(0 0 0 / .25) 38%, transparent 62%); pointer-events: none; }
.poster .poster__title, .poster .poster__badge, .poster .poster__bar { z-index: 2; }
.tvlive__poster { position: relative; overflow: hidden; }
.tvlive__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .72), transparent 50%); pointer-events: none; }
.tvlive__poster .poster__title { z-index: 1; }

/* The game modes on the TV home page: wide photos with a line of text. */
html.tv .tvlive .tvh-modes { grid-auto-columns: calc(var(--screen-h, 100vh) * .54); }
.tvh-mode { aspect-ratio: 16 / 9; }
.tvh-mode__text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: 2px; padding: calc(var(--screen-h, 100vh) * .02) calc(var(--screen-h, 100vh) * .024); text-align: left; }
.tvh-mode__text strong { font: 800 calc(var(--screen-h, 100vh) * .042)/1.1 var(--font-display); text-shadow: 0 2px 12px rgb(0 0 0 / .6); }
.tvh-mode__text small { color: var(--ink); font-size: calc(var(--screen-h, 100vh) * .022); text-shadow: 0 1px 8px rgb(0 0 0 / .7); }

/* What the Timeline page shows on a TV under its top: how the game works. */
.tlt-rule { display: grid; align-content: start; gap: calc(var(--screen-h, 100vh) * .012); padding: calc(var(--screen-h, 100vh) * .024); border-radius: var(--r-md); }
.tlt-rule strong { color: var(--sun); font: 800 calc(var(--screen-h, 100vh) * .027)/1.15 var(--font-display); }
.tlt-rule span { color: var(--ink-2); font-size: calc(var(--screen-h, 100vh) * .021); line-height: 1.3; }
.tlt-rule .tlt__icon { width: calc(var(--screen-h, 100vh) * .06); height: calc(var(--screen-h, 100vh) * .06); padding: calc(var(--screen-h, 100vh) * .013); border-radius: 50%; background: rgb(255 255 255 / .1); color: var(--sun); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.tv .tvlive .tlt-rules { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }

/* The profile popup on a TV: wide, and made for a remote. --u is as on the pages. */
.sheet__panel--tv {
  --u: min(calc(var(--screen-h, 100vh) / 100), calc(var(--screen-w, 100vw) / 150));
  width: calc(var(--u) * 100);
  max-width: 94%;
}
html.tv .sheet__panel.sheet__panel--tv { gap: calc(var(--u) * 3); padding: calc(var(--u) * 4.4); border-radius: calc(var(--u) * 3); }
.sheet__panel--tv h2 { margin: 0; font-size: calc(var(--u) * 5); }
.tvs__names { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 1.1); }
#tvs-names { display: contents; }
.tvs__names .btn { min-height: calc(var(--u) * 6.6); padding: 0 calc(var(--u) * 2.8); font-size: calc(var(--u) * 2.4); }
.tvs__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: calc(var(--u) * 1.1); }
.tvs__row .field { min-height: calc(var(--u) * 7.6); font-size: calc(var(--u) * 2.7); }
.sheet__panel--tv .consent { margin: 0; font-size: calc(var(--u) * 1.9); line-height: 1.35; }
.tvs__row .btn { min-height: calc(var(--u) * 7.6); padding: 0 calc(var(--u) * 4); font-size: calc(var(--u) * 2.6); }

/* The profile page on a TV. */
.tvp {
  --u: min(calc(var(--screen-h, 100vh) / 100), calc(var(--screen-w, 100vw) / 150));
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: center;
  gap: calc(var(--u) * 5);
  min-height: calc(var(--u) * 95);
  margin-top: max(0px, calc((var(--screen-h, 100vh) - var(--u) * 100) / 2));
}
.tvp__me { display: grid; justify-items: center; gap: calc(var(--u) * 3.5); text-align: center; }
.tvp__me > div:first-child { display: grid; justify-items: center; gap: calc(var(--u) * 1.4); width: 100%; }
.tvp__avatar { display: grid; place-items: center; width: calc(var(--u) * 22); height: calc(var(--u) * 22); border-radius: 50%; background: var(--brand-gradient); color: #fff; font: 800 calc(var(--u) * 10)/1 var(--font-display); box-shadow: var(--glass-shadow); }
.tvp__name { margin: calc(var(--u) * 1) 0 0; max-width: 100%; font: 800 calc(var(--u) * 5.4)/1.1 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tvp__line { margin: 0; color: var(--ink-2); font-size: calc(var(--u) * 2.5); line-height: 1.3; text-wrap: balance; }
.tvp__stats { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 1.4); width: 100%; margin: 0; }
.tvp__stats > div { display: grid; gap: calc(var(--u) * .4); padding: calc(var(--u) * 2) calc(var(--u) * 1); border-radius: calc(var(--u) * 2); }
.tvp__stats dd { margin: 0; color: var(--sun); font: 800 calc(var(--u) * 5)/1 var(--font-display); }
.tvp__stats dt { color: var(--ink-2); font-size: calc(var(--u) * 2.2); }

.tvp__form { display: grid; gap: calc(var(--u) * 1.8); padding: calc(var(--u) * 3.4) calc(var(--u) * 3.6); border-radius: calc(var(--u) * 3); }
.tvp__label { margin: 0; color: var(--ink-2); font-size: calc(var(--u) * 2.3); font-weight: 600; }
.tvp__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: calc(var(--u) * 1.4); }
.tvp__row .field { min-height: calc(var(--u) * 8); font-size: calc(var(--u) * 3); }
.tvp__row .btn { min-height: calc(var(--u) * 8); padding: 0 calc(var(--u) * 5); font-size: calc(var(--u) * 2.8); }
.tvp__names { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 1.1); }
#tvp-names { display: contents; }
.tvp__names .btn, .tvp__links .btn { min-height: calc(var(--u) * 6.4); padding: 0 calc(var(--u) * 2.6); font-size: calc(var(--u) * 2.3); }
.tvp__bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: calc(var(--u) * 1.4); align-items: stretch; }
.tvp__form .toggle { padding: calc(var(--u) * 1.8) calc(var(--u) * 2.4); border-radius: calc(var(--u) * 2); }
.tvp__form .toggle b { font-size: calc(var(--u) * 2.5); }
.tvp__form .toggle small { font-size: calc(var(--u) * 2); }
.tvp__links { display: grid; align-content: space-between; gap: calc(var(--u) * 1.1); }
.tvp__consent { margin: 0; color: var(--ink-3); font-size: calc(var(--u) * 1.7); line-height: 1.35; }

/* The big screen, for a TV across the room: who's on turn, the timeline, the
   score, and nothing else. Everything is sized in --u, one hundredth of the
   screen's height or less, so it fits any window. */
.tls {
  --u: min(calc(var(--screen-h, 100vh) / 100), calc(var(--screen-w, 100vw) / 150));
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: calc(var(--u) * 3);
  height: calc(var(--u) * 93);
  margin-top: max(0px, calc((var(--screen-h, 100vh) - var(--u) * 100) / 2));
  animation: none;
}
/* The middle of the top bar is free, so that's where the news goes. */
.tls .stage-bar__title { flex: 1 1 0; display: flex; justify-content: center; min-width: 0; margin: 0; padding: 0; border: 0; }
.tls--final .stage-bar__title { visibility: hidden; }
.tls-pop { max-width: 100%; white-space: normal; text-align: center; padding: calc(var(--u) * 1.4) calc(var(--u) * 2.6); color: var(--ink); font-size: calc(var(--u) * 2.2); font-weight: 600; line-height: 1.2; animation: tls-rise .35s var(--ease) both; transition: opacity .3s, transform .3s; }
.tls-pop.is-leaving { opacity: 0; transform: translateY(calc(var(--u) * -1)); }

.tls__hero { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 5); min-height: 0; text-align: center; }
.tls__hero > * { animation: tls-rise .5s var(--ease) both; }
.tls__text { display: grid; gap: calc(var(--u) * 1.4); min-width: 0; }
.tls__title { margin: 0; font: 800 calc(var(--u) * 10)/1.03 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tls__title.is-good { color: var(--good); }
.tls__title.is-bad { color: var(--bad); }
.tls__note { margin: 0; color: var(--ink-2); font-size: calc(var(--u) * 3.2); }
.tls__song { margin: 0; color: var(--ink-2); font-size: calc(var(--u) * 3.6); overflow-wrap: anywhere; }
.tls__song strong { color: var(--ink); }
.tls__next { justify-self: center; min-height: calc(var(--u) * 8); margin-top: calc(var(--u) * 1); padding: 0 calc(var(--u) * 5); font-size: calc(var(--u) * 2.8); }
.tls__ring { flex: none; width: calc(var(--u) * 16); height: calc(var(--u) * 16); font-size: calc(var(--u) * 5.4); }
.tls__cover { flex: none; width: calc(var(--u) * 26); height: calc(var(--u) * 26); border-radius: calc(var(--u) * 2); object-fit: cover; box-shadow: var(--glass-shadow); animation-name: tls-pop; }
.tls__year { flex: none; font: 800 calc(var(--u) * 13)/1 var(--font-display); color: var(--sun); animation-name: tls-pop; animation-delay: .12s; }

.tls__line { position: relative; display: flex; justify-content: center; gap: calc(var(--u) * 1.2); min-height: calc(var(--u) * 23); list-style: none; margin: 0; padding: 0; transition: opacity .3s; }
.tls__line::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--u) * 5.2); height: calc(var(--u) * .5); border-radius: 99px; background: var(--brand-gradient); }
.tls-card { position: relative; flex: 0 1 calc(var(--u) * 15); min-width: 0; display: grid; justify-items: center; align-content: start; }
.tls-card__year { height: calc(var(--u) * 4.6); font: 800 calc(var(--u) * 3.6)/calc(var(--u) * 4.6) var(--font-display); color: var(--sun); }
.tls-card__node { width: calc(var(--u) * 1.8); height: calc(var(--u) * 1.8); margin-bottom: calc(var(--u) * 1); border-radius: 50%; background: #fff; box-shadow: 0 0 calc(var(--u) * 1) rgb(255 255 255 / .7); }
.tls-card img { width: 100%; max-width: calc(var(--u) * 14); aspect-ratio: 1; height: auto; border-radius: calc(var(--u) * 1.2); object-fit: cover; }
.tls__line.is-new .tls-card { animation: tls-rise .45s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
.tls-pin { flex: 0 1 calc(var(--u) * 14); min-width: calc(var(--u) * 8); display: grid; place-items: center; margin-top: calc(var(--u) * 7.4); max-height: calc(var(--u) * 14); padding: calc(var(--u) * 1); border-radius: calc(var(--u) * 1.2); font: 800 calc(var(--u) * 2.4)/1.15 var(--font-display); text-align: center; overflow-wrap: anywhere; }
.tls-pin.is-turn { background: var(--laser); color: #14061c; }
.tls-pin:not(.is-turn) { background: var(--violet); color: #fff; }
.tls-pin.is-right { background: var(--good); color: #14061c; animation: tls-win .6s var(--ease) both; }
.tls-pin.is-wrong { background: rgb(255 77 94 / .28); color: var(--ink); box-shadow: inset 0 0 0 2px var(--bad); transition: background .4s; }
.tls-pin.is-new { animation: tls-drop .45s var(--ease) both; }

.tls__seats { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--u) * 1.2); }
.tls-seat { display: flex; align-items: baseline; gap: calc(var(--u) * 1.4); padding: calc(var(--u) * 1) calc(var(--u) * 2.4); border-radius: 999px; background: rgb(255 255 255 / .08); font-size: calc(var(--u) * 2.8); transition: box-shadow .35s, opacity .35s; }
.tls-seat.is-turn { box-shadow: 0 0 0 calc(var(--u) * .35) var(--sun); }
.tls-seat.is-away { opacity: .45; }
.tls-seat .num { color: var(--sun); font-weight: 800; }
.tls-seat small { color: var(--ink-2); font-size: calc(var(--u) * 2.1); }

.tls--final { grid-template-rows: auto minmax(0, 1fr); }
.tls__win { display: grid; justify-items: center; align-content: center; gap: calc(var(--u) * 3); text-align: center; }
.tl-final { display: grid; gap: var(--s2); width: min(calc(var(--u) * 70), 100%); list-style: none; margin: 0; padding: 0; font-size: calc(var(--u) * 3); }
.tl-final li { animation: tls-rise .5s var(--ease) both; animation-delay: calc(var(--i) * 90ms + .2s); display: grid; grid-template-columns: 2ch minmax(0, 1fr) auto; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); text-align: left; }
.tl-final li:first-child { box-shadow: 0 0 0 2px var(--sun), var(--glass-shadow); }
.tls__actions { justify-content: center; }

@keyframes tl-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes tls-rise { from { opacity: 0; transform: translateY(calc(var(--u, 8px) * 2.4)); } }
@keyframes tls-pop { from { opacity: 0; transform: scale(.7); } }
@keyframes tls-drop { from { opacity: 0; transform: translateY(calc(var(--u) * -6)) scale(.85); } }
@keyframes tls-win { 40% { transform: scale(1.1); } }

html.lite .tls *, html.lite .tl-phone * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .tls *, .tl-phone * { animation: none !important; transition: none !important; }
}

@media (max-width: 800px) {
  html:not(.tv) .tls { height: auto; }
  html:not(.tv) .tls__hero { flex-wrap: wrap; }
  html:not(.tv) .tls__line { justify-content: flex-start; overflow-x: auto; }
}

/* The home page and Original on a computer or a phone. */
.tvh-turn { display: flex; align-items: center; gap: var(--s3); }
.tvh-join { display: none; }
html.tv .tvh-turn .row-arrow { display: none; }
html:not(.tv) .tvlive { gap: var(--s6); }
html:not(.tv) .tvlive__pick { min-height: 0; }
html:not(.tv) .tvlive__hero { min-height: min(46vh, 420px); }
@media (max-width: 640px) {
  html:not(.tv) .tvlive__hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: var(--s4); }
  html:not(.tv) .tvlive__poster { display: none; }
  html:not(.tv) .tvlive__title { letter-spacing: -.03em; }
  html:not(.tv) .tvlive__actions { display: grid; gap: var(--s2); }
  html:not(.tv) .tvlive__actions .btn { width: 100%; min-height: 54px; font-size: 1.05rem; }
  .tvh-join { display: inline-flex; align-items: center; justify-content: center; }
  html:not(.tv) .tvlive__actions .song-count { justify-self: center; }
  .tvh-turn .row-arrow { display: none; }
  .tvh-turn { justify-content: center; }
  html:not(.tv) .tvlive__backdrop { background: linear-gradient(0deg, var(--bg) 35%, rgb(20 6 28 / .55) 75%, rgb(20 6 28 / .3)), var(--img, none) center top / cover no-repeat, radial-gradient(120% 90% at 85% 30%, hsl(var(--hue, 300) 85% 45%), transparent 70%); }
}

/* Game mode cards outside a TV are sized to the card, not to the screen. */
html:not(.tv) .tvlive .tvh-modes { grid-auto-columns: min(320px, 74vw); }
html:not(.tv) .tvh-mode__text { padding: var(--s3) var(--s4); }
html:not(.tv) .tvh-mode__text strong { font-size: 1.35rem; }
html:not(.tv) .tvh-mode__text small { font-size: .92rem; }

/* This comes last so that it beats the button's hidden default above. */
@media (max-width: 640px) { html:not(.tv) .menu-btn { display: grid; } }

/* The top bar already has the logo. */
html:not(.tv) .tvh-logo { display: none; }

/* The new feature on the home page: a label and a switch, so that it doesn't
   read as one more game. */
.tvlive__kicker.tvh-new { justify-self: start; padding: 6px 14px; border-radius: 999px; background: var(--laser); color: #150a1d; letter-spacing: .08em; }
/* Its picture is a record playing, standing free on the photo. */
.tvlive__poster.is-demo { overflow: visible; aspect-ratio: 1; background: none; box-shadow: none; border-radius: 50%; }
.tvlive__poster.is-demo::after { display: none; }
.tvh-spin { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; font-size: clamp(14px, 1.2vw, 26px); }
.tvh-spin__record { position: absolute; top: 5%; right: 5%; bottom: 5%; left: 5%; border-radius: 50%; background: conic-gradient(from 20deg, rgb(255 255 255 / .17), transparent 12%, transparent 44%, rgb(255 255 255 / .17) 50%, transparent 62%, transparent 94%, rgb(255 255 255 / .17)), repeating-radial-gradient(circle, #120c18 0 2px, #231a2c 2px 4px); box-shadow: 0 30px 70px -20px rgb(0 0 0 / .9); animation: tvh-spin 3s linear infinite; }
.tvh-spin__ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tvh-spin__ring circle { fill: none; stroke: var(--laser); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100; animation: tvh-ring 8s linear infinite; }
.tvh-spin__label { position: absolute; top: 31%; right: 31%; bottom: 31%; left: 31%; display: grid; place-content: center; justify-items: center; border-radius: 50%; background: var(--brand-gradient); color: #fff; text-align: center; box-shadow: 0 0 0 .35em rgb(0 0 0 / .35); }
.tvh-spin__label small { font-weight: 700; font-size: .78em; line-height: 1.15; }
.tvh-spin__label b { font: 800 4em/1 var(--font-display); }
@keyframes tvh-spin { to { transform: rotate(360deg); } }
@keyframes tvh-ring { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
html.tv .tvlive__poster.is-demo { width: calc(var(--screen-h, 100vh) * .36); height: calc(var(--screen-h, 100vh) * .36); }
html.tv .tvh-spin { font-size: calc(var(--screen-h, 100vh) * .017); }
html.tv .tvh-spin__label small { font-size: 1em; }
html.lite .tvh-spin * { animation: none !important; }
html.lite .tvh-spin__ring circle { stroke-dashoffset: 25; }

/* A row a button goes to stops below the top bar. */
html:not(.tv) .tvlive .row { scroll-margin-top: 104px; }

/* A computer uses the whole window. */
@media (min-width: 641px) {
  html:not(.tv) { --page: none; --gutter: clamp(24px, 4vw, 72px); }
  html:not(.tv) .topbar { padding-left: var(--gutter); padding-right: var(--gutter); }
  html:not(.tv) main { padding-left: var(--gutter); padding-right: var(--gutter); }
  html:not(.tv) main:has(> .tvlive) { padding-top: var(--s4); }
  html:not(.tv) .tvlive__hero { min-height: min(72vh, 860px); }
  html:not(.tv) .tvlive__bio { max-width: 60ch; }
  html:not(.tv) .tvlive__poster { width: min(25vw, 42vh); }
  html:not(.tv) .tvlive__actions .btn { min-height: 60px; padding: 0 var(--s6); font-size: clamp(1.05rem, 1.25vw, 1.35rem); }
  html:not(.tv) .row__track { grid-auto-columns: clamp(190px, 17vw, 440px); }
  /* A row runs to the edge of the window and fades out there, instead of
     stopping in a hard line in the middle of a card. */
  html:not(.tv) .row__track {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    scroll-padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  }
  html:not(.tv) .tvlive .row__track.tvh-modes { grid-auto-columns: clamp(300px, 28vw, 720px); }
  html:not(.tv) .row__head h2 { font-size: clamp(1.5rem, 2vw, 2.3rem); }
  html:not(.tv) .poster__title { font-size: clamp(1.15rem, 1.6vw, 1.9rem); }
}

/* The page itself can hold the focus, and shouldn't draw a line round it. */
main:focus-visible { outline: none; }

/* Home and Original keep their text in a box of one size, so that the buttons
   under it stay put whatever a slide says. */
.tvlive__pick--even {
  --title: min(5.6rem, 11vh);
  --bio: min(1.3rem, 2.8vh);
  align-content: end;
  height: calc(var(--title) * 2.2 + var(--bio) * 4.5 + 4.4rem);
  overflow: hidden;
}
.tvlive__pick--even .tvlive__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding-bottom: .06em; font-size: var(--title); line-height: 1.05; }
.tvlive__pick--even .tvlive__title.is-long { -webkit-line-clamp: 3; font-size: calc(var(--title) * .66); }
.tvlive__pick--even .tvlive__bio { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: var(--bio); }
html.tv .tvlive__pick--even {
  --title: calc(var(--screen-h, 100vh) * .085);
  --bio: calc(var(--screen-h, 100vh) * .024);
  height: calc(var(--title) * 2.2 + var(--bio) * 4.5 + var(--screen-h, 100vh) * .07);
}
@media (min-width: 641px) { html:not(.tv) .tvlive__pick--even { --title: min(5.6vw, 12vh); --bio: clamp(1.1rem, 1.5vw, 1.6rem); } }
@media (max-width: 640px) { html:not(.tv) .tvlive__pick--even { --title: clamp(2.2rem, 11vw, 3rem); --bio: 1rem; } }

/* A category on a phone: everything fits, and Play is always on screen. */
@media (max-width: 720px) {
  .detail__panel { gap: var(--s3); padding: var(--s4) var(--s4) 0; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .detail__poster { width: 96px; }
  .detail__info { gap: var(--s3); }
  .detail__info h2 { font-size: 1.7rem; padding-right: var(--s5); }
  .detail__bio { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; font-size: 1rem; line-height: 1.5; }
  .detail .size-pick { gap: var(--s2); }
  .detail .segmented button { padding-left: 4px; padding-right: 4px; white-space: nowrap; font-size: .95rem; }
  .detail .actions { position: sticky; bottom: 0; z-index: 1; margin: 0 calc(var(--s4) * -1); padding: var(--s3) var(--s4) var(--s4); background: linear-gradient(transparent, rgb(20 8 30 / .92) 28%); }
  .detail .actions .btn { width: 100%; min-height: 56px; }
}

/* The profile on a phone is a page of its own, sized for a hand and not for a
   room. Automatic mode is left out: a phone can't host a game. */
html:not(.tv) .tvp { --u: 4.8px; grid-template-columns: minmax(0, 1fr); gap: var(--s5); min-height: 0; margin-top: 0; }
html:not(.tv) .tvp__line { font-size: 1rem; }
html:not(.tv) .tvp__stats dt { font-size: .9rem; }
html:not(.tv) .tvp__form { gap: var(--s3); padding: var(--s5) var(--s4); border-radius: var(--r-lg); }
html:not(.tv) .tvp__label { font-size: .95rem; }
html:not(.tv) .tvp__row .field { min-height: 54px; font-size: 1rem; }
html:not(.tv) .tvp__row .btn { min-height: 54px; padding: 0 var(--s5); font-size: 1rem; }
html:not(.tv) .tvp__names .btn, html:not(.tv) .tvp__links .btn { min-height: 46px; padding: 0 var(--s4); font-size: .95rem; }
html:not(.tv) .tvp__bottom { grid-template-columns: minmax(0, 1fr); }
html:not(.tv) .tvp .toggle { display: none; }
html:not(.tv) .tvp__links { grid-template-columns: 1fr 1fr; }
html:not(.tv) .tvp__consent { font-size: .82rem; }

/* A popup with a photo: the photo is the background of the whole popup, and
   darkens where the text sits. */
.detail__panel--photo { grid-template-columns: minmax(0, 1fr); align-items: end; width: min(1100px, 100%); min-height: min(600px, 84vh); background-color: rgb(14 6 22 / .9); }
.detail__panel--photo .detail__bg::before {
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    linear-gradient(90deg, rgb(14 6 22 / .96) 30%, rgb(14 6 22 / .55) 58%, transparent 85%),
    var(--bg-img, none) center / cover no-repeat;
  filter: none;
  opacity: 1;
}
.detail__panel--photo .detail__info { max-width: 56%; }
.detail__panel--photo .detail__close { background: rgb(0 0 0 / .5); }
@media (max-width: 720px) {
  .detail__panel--photo { width: 100%; min-height: 0; padding-top: min(34vh, 240px); }
  .detail__panel--photo .detail__bg::before {
    background:
      linear-gradient(0deg, rgb(14 6 22 / .97) 45%, rgb(14 6 22 / .6) 66%, transparent 92%),
      var(--bg-img, none) center top / cover no-repeat;
  }
  .detail__panel--photo .detail__info { max-width: none; }
  .detail__panel--photo .actions { background: none; }
}

/* Joining a game: a party photo at the top, the code as six big boxes in
   two threes (as the big screen shows it), and the name the phone has. */
.join__backdrop {
  background:
    linear-gradient(0deg, var(--bg) 42%, rgb(20 6 28 / .6) 68%, rgb(20 6 28 / .25)),
    var(--img, none) center top / cover no-repeat,
    radial-gradient(120% 90% at 85% 30%, hsl(var(--hue, 300) 85% 45%), transparent 70%);
}
.join { width: min(480px, 100%); margin: 0 auto; gap: var(--s5); padding-top: clamp(var(--s6), 16vh, 180px); }
.join__head { display: grid; gap: var(--s2); }
.join__kicker { color: var(--laser); font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.join__head h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); line-height: 1; letter-spacing: -.04em; }
.join__lead { color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }
.join__form { display: grid; gap: var(--s3); }
.join__label { color: var(--ink-2); font-size: .95rem; font-weight: 600; }
.join__code { position: relative; }
.join__boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 6px repeat(3, minmax(0, 1fr)); column-gap: 8px; }
.join__boxes span {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border: 2px solid rgb(255 255 255 / .18);
  border-radius: 14px;
  background: rgb(0 0 0 / .38);
  font: 800 clamp(1.7rem, 8vw, 2.4rem) var(--font-display);
  transition: border-color .2s, box-shadow .2s;
}
.join__boxes span:nth-child(4) { grid-column: 5; }
.join__boxes span.is-filled { border-color: rgb(255 255 255 / .55); }
.join__boxes span.is-next { border-color: var(--laser); box-shadow: 0 0 0 3px rgb(198 255 61 / .25); }
/* The real field lies over the boxes, unseen: a tap anywhere on them types. */
.join__code input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; opacity: 0; font-size: 16px; }
.join__who { display: grid; gap: var(--s2); margin-top: var(--s2); }
.join__me { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-md); background: rgb(0 0 0 / .32); border: 1px solid rgb(255 255 255 / .12); }
.join__avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-gradient); font: 800 1.2rem var(--font-display); }
.join__me-text { display: grid; flex: 1; min-width: 0; }
.join__me-text small { color: var(--ink-2); font-size: .82rem; }
.join__me-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.1rem; }
.join__change { min-height: 44px; padding: 0 var(--s3); border-radius: 999px; color: var(--laser); font-weight: 700; }
.join__name { min-height: 58px; font-size: 1.1rem; }
.join__go { min-height: 64px; margin-top: var(--s2); font-size: 1.2rem; }
.join__rejoin { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); text-align: left; }
.join__rejoin span { display: grid; }
.join__rejoin small { color: var(--laser); font-size: .82rem; font-weight: 700; }
.join__rejoin b { font-size: 1.4rem; letter-spacing: .06em; }

/* Popups never run off the screen: what doesn't fit scrolls inside them. */
html:not(.tv) .sheet__panel { max-height: calc(100vh - 2 * var(--s4)); max-height: calc(100dvh - 2 * var(--s4)); overflow-y: auto; overscroll-behavior: contain; }
/* On a phone they rise from the bottom, and their buttons stay in reach. */
@media (max-width: 640px) {
  html:not(.tv) .sheet { align-items: end; padding: 0; }
  html:not(.tv) .sheet__panel { width: 100%; max-height: 92vh; max-height: 92dvh; gap: var(--s3); padding: var(--s5) var(--s4) 0; border-radius: var(--r-xl) var(--r-xl) 0 0; animation: sheet-up .35s var(--ease) both; }
  html:not(.tv) .sheet__panel h2 { font-size: 1.6rem; }
  html:not(.tv) .sheet__actions { position: sticky; bottom: 0; z-index: 1; margin: var(--s2) calc(var(--s4) * -1) 0; padding: var(--s3) var(--s4) max(var(--s4), env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgb(14 10 30 / .97) 28%); }
  html:not(.tv) .sheet__actions .btn { flex: 1; min-height: 52px; }
  /* Automatic mode is for the big screen, and a phone doesn't host. */
  html:not(.tv) .sheet .toggle { display: none; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }

/* Buzzer: the phones become one big button. */
.buzz-flash { padding: 8px 20px; border-radius: 999px; background: rgb(255 77 109 / .2); color: #ffb3c1; font-weight: 700; font-size: 1.2rem; animation: pop .5s var(--spring) both; }
.live-phone--buzz { display: grid; justify-items: center; align-content: start; gap: var(--s5); min-height: calc(100dvh - var(--s6)); text-align: center; }
.buzz-note { color: var(--ink-2); font-weight: 700; }
.buzz-btn {
  display: grid;
  place-items: center;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  margin-top: var(--s4);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a5c, #ff2d6f 55%, #b3125a);
  box-shadow: 0 18px 0 #7c0a3e, 0 30px 60px -10px rgb(255 45 111 / .55), inset 0 -10px 30px rgb(0 0 0 / .25);
  color: #fff;
  font: 900 clamp(2.6rem, 13vw, 3.6rem) var(--font-display);
  letter-spacing: -.02em;
  transition: transform .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
}
.buzz-btn:active, .buzz-btn.is-pressed { transform: translateY(14px); box-shadow: 0 4px 0 #7c0a3e, 0 10px 30px -10px rgb(255 45 111 / .55), inset 0 -6px 20px rgb(0 0 0 / .3); }
.buzz-btn.is-pressed { filter: saturate(.6) brightness(.85); }
.buzz-hint { max-width: 28ch; }

/* A phone answering: all four choices on one screen, two by two, never a
   scroll (the narrow-screen rule above would otherwise stack them). */
html:not(.tv) .phone-answer .live-options { grid-template-columns: 1fr 1fr; }
.live-phone--answer { display: flex; flex-direction: column; height: calc(100dvh - var(--s5) - var(--s6)); }
.live-phone--answer .phone-answer { flex: 1; height: auto; min-height: 0; }
.phone-answer .live-option { overflow: hidden; }
.phone-answer .live-option__text strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.phone-answer .live-option__cover { width: min(24vw, 96px, 12dvh); }

/* Buzzer: what a right answer is worth, counting down as the song plays. */
.buzz-worth { padding: 10px 24px; border-radius: 999px; background: rgb(198 255 61 / .12); color: var(--ink); font-weight: 700; font-size: 1.4rem; }
.buzz-worth b { color: var(--laser); font-size: 1.6em; font-variant-numeric: tabular-nums; }
.buzz-worth--phone { font-size: 1.1rem; }
html.tv .buzz-worth { font-size: calc(var(--screen-h, 100vh) * .03); }

/* The TV side menu: a slim strip of icons down the left edge, which opens
   out over the page with the names when the remote goes into it, as on
   Google TV. The page you're on is marked with a lime bar. */
html.tv body:not(.stage-mode) .tv-rail {
  top: 0;
  bottom: 0;
  left: 0;
  align-items: stretch;
  gap: calc(var(--screen-h, 100vh) * .012);
  width: 104px;
  padding: calc(var(--screen-h, 100vh) * .05) 16px;
  border-radius: 0;
  background: linear-gradient(90deg, rgb(10 3 16 / .96), rgb(10 3 16 / .82));
  box-shadow: 1px 0 0 rgb(255 255 255 / .06);
  transition: width .28s var(--ease), background .28s, box-shadow .28s;
}
html.tv body:not(.stage-mode) .tv-rail:focus-within,
html.tv body:not(.stage-mode) .tv-rail:hover {
  width: 320px;
  background: linear-gradient(90deg, rgb(10 3 16 / .98) 60%, rgb(10 3 16 / .9));
  box-shadow: 40px 0 80px rgb(0 0 0 / .65);
}
html.tv .tv-rail__logo { align-self: flex-start; width: 48px; height: 48px; margin: 0 0 calc(var(--screen-h, 100vh) * .04) 8px; }
html.tv .tv-rail .tv-rail__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: calc(var(--screen-h, 100vh) * .075);
  padding: 0 21px;
  border-radius: 18px;
  overflow: hidden;
  white-space: nowrap;
  color: var(--ink-2);
  font-size: calc(var(--screen-h, 100vh) * .026);
  font-weight: 700;
  outline: none;
}
html.tv .tv-rail__item svg { flex: none; width: 30px; height: 30px; }
html.tv .tv-rail__item span { opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .28s var(--ease); }
html.tv .tv-rail:focus-within .tv-rail__item span,
html.tv .tv-rail:hover .tv-rail__item span { opacity: 1; transform: none; }
html.tv .tv-rail .tv-rail__item.is-active { color: var(--ink); background: none; box-shadow: none; }
html.tv .tv-rail .tv-rail__item.is-active::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 5px; border-radius: 3px; background: var(--laser); }
html.tv .tv-rail .tv-rail__item:focus,
html.tv .tv-rail .tv-rail__item:hover { color: #fff; background: rgb(255 255 255 / .16) !important; box-shadow: inset 0 0 0 3px var(--laser); outline: none; transform: none; }
html.tv .tv-rail .tv-rail__item:focus svg,
html.tv .tv-rail .tv-rail__item:hover svg { stroke: var(--laser); }
html.tv .tv-rail__item span { color: inherit; }
html.tv body:not(.stage-mode) main { margin-left: 104px; }
html.lite .tv-rail, html.lite .tv-rail__item span { transition: none !important; }

/* --- TV pages laid out like the home screen ------------------------------- */
/* A playlist's page and "How long a game?" share the home screen's shape on a
   TV: the photo across the screen, the text on the left where the home
   screen has it, and the poster on the right. */

/* Pages without a carousel keep the dots' line, so their buttons line up. */
.tvlive__dots:empty { min-height: 10px; }

/* Off a TV, a photo popup shows the photo, not the poster. */
html:not(.tv) .detail__panel--photo .detail__poster { display: none; }
.length-kicker { margin: 0; color: var(--ink-2); font-weight: 600; }

/* Profile on a TV: a settings menu, a list on the left and what the
   highlighted item does on the right (see showProfileTV). */
.tvset { --h: var(--screen-h, 100vh); display: grid; gap: calc(var(--h) * .04); animation: none; }
.tvset > .live-logo { font-size: calc(var(--h) * .032); }
.tvset > .live-logo img { width: 1.2em; height: 1.2em; }
.tvset__body { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr); gap: calc(var(--screen-w, 100vw) * .03); align-items: start; }
.tvset__menu { display: grid; gap: calc(var(--h) * .004); }
.tvset__me { display: flex; align-items: center; gap: calc(var(--h) * .018); margin-bottom: calc(var(--h) * .018); }
.tvset__me strong { display: block; font: 800 calc(var(--h) * .034)/1.1 var(--font-display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.tvset__me small { color: var(--ink-2); font-size: calc(var(--h) * .022); }
.tvset__avatar { flex: none; display: grid; place-items: center; width: calc(var(--h) * .075); height: calc(var(--h) * .075); border-radius: 50%; background: var(--brand-gradient); color: #fff; font: 800 calc(var(--h) * .038)/1 var(--font-display); box-shadow: var(--glass-shadow); }
.tvset__item { display: flex; align-items: center; justify-content: space-between; gap: 1em; width: 100%; padding: calc(var(--h) * .013) calc(var(--h) * .024); border-radius: var(--r-md); color: var(--ink-2); font-size: calc(var(--h) * .026); font-weight: 600; text-align: left; transition: background .2s, color .2s; }
.tvset__item small { overflow: hidden; color: var(--ink-3); font-size: .82em; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.tvset__item.is-on { color: var(--ink); background: rgb(255 255 255 / .1); box-shadow: inset 4px 0 0 var(--laser); }
.tvset__item.is-on small { color: var(--ink-2); }
.tvset__pane { display: grid; align-content: start; gap: calc(var(--h) * .016); padding: calc(var(--h) * .034) calc(var(--screen-w, 100vw) * .024); border-radius: var(--r-lg); }
.tvset__pane h2 { margin-top: calc(var(--h) * -.01); font-size: calc(var(--h) * .046); line-height: 1.05; letter-spacing: -.04em; overflow-wrap: anywhere; }
.tvset__kicker { color: var(--ink-2); font-size: calc(var(--h) * .018); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tvset__text { max-width: 52ch; color: var(--ink-2); font-size: calc(var(--h) * .023); line-height: 1.4; }
.tvset__small { max-width: 70ch; color: var(--ink-3); font-size: calc(var(--h) * .017); line-height: 1.4; }
.tvset__form { display: grid; gap: calc(var(--h) * .014); }
.tvset__names, .tvset__actions { display: flex; flex-wrap: wrap; gap: calc(var(--h) * .012); }
#tvset-names { display: contents; }
.tvset__row { display: flex; gap: calc(var(--h) * .012); }
.tvset__row .field { flex: 1; min-height: calc(var(--h) * .06); padding: 0 calc(var(--h) * .025); font-size: calc(var(--h) * .026); }
.tvset__pane .btn { min-height: calc(var(--h) * .058); padding: 0 calc(var(--h) * .028); font-size: calc(var(--h) * .022); }
.tvset__switch { justify-self: start; gap: calc(var(--h) * .018); }
.tvset__switch .toggle__switch { transform: scale(1.2); }
.tvset__switch[aria-pressed="true"] .toggle__switch { background: var(--laser); }
.tvset__switch[aria-pressed="true"] .toggle__switch::after { transform: translateX(22px); background: var(--night); }
.tvset__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: calc(var(--h) * .012) calc(var(--h) * .03); margin: 0; font-size: calc(var(--h) * .024); }
.tvset__facts dt { color: var(--ink-2); }
.tvset__facts dd { margin: 0; }

/* A playlist's page. It sits beside the side menu, like a page. */
html.tv .detail { left: 104px; padding: 0; place-items: stretch; background: var(--bg); }
html.tv .detail .detail__panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4vw;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: var(--tvpage-top) var(--tvpage-right) 0 var(--tvpage-left);
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: hidden;
}
html.tv .detail .detail__panel::before { display: none; }
html.tv .detail .detail__bg { border-radius: 0; }
html.tv .detail .detail__bg::before {
  top: 0; right: 0; bottom: 0; left: 0;
  filter: none;
  opacity: .9;
  background:
    linear-gradient(90deg, var(--bg) 25%, rgb(20 6 28 / .55) 60%, rgb(20 6 28 / .2)),
    linear-gradient(0deg, var(--bg) 0%, transparent 45%),
    var(--bg-img, none) right center / cover no-repeat,
    radial-gradient(120% 90% at 85% 30%, hsl(var(--hue, 300) 85% 45%), transparent 70%);
}
html.tv .detail .detail__poster { order: 2; width: calc(var(--screen-h, 100vh) * .24); }
/* The text ends where the home screen's buttons do, and grows upwards. */
html.tv .detail .detail__info {
  order: 1;
  max-width: none;
  height: var(--tvpage-text);
  align-content: end;
  gap: calc(var(--screen-h, 100vh) * .018);
}
html.tv .detail .detail__group { color: var(--ink-2); font-weight: 700; font-size: calc(var(--screen-h, 100vh) * .02); letter-spacing: .14em; text-transform: uppercase; }
html.tv .detail .detail__info h2 { font-size: calc(var(--screen-h, 100vh) * .085); line-height: 1.05; letter-spacing: -.05em; }
html.tv .detail .detail__bio { max-width: 52ch; font-size: calc(var(--screen-h, 100vh) * .024); line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
html.tv .detail .actions .btn { min-height: calc(var(--screen-h, 100vh) * .075); padding: 0 var(--s6); font-size: calc(var(--screen-h, 100vh) * .026); }
html.tv .detail .detail__close { top: calc(var(--screen-h, 100vh) * .03); right: var(--tvpage-right); width: 48px; height: 48px; }

/* "How long a game?": the choices are a row of big cards. */
html.tv .sheet.sheet--page { left: 104px; padding: 0; place-items: stretch; background: linear-gradient(90deg, var(--bg) 62%, rgb(20 6 28 / .82)); }
html.tv .sheet--page .sheet__panel {
  align-content: start;
  gap: calc(var(--screen-h, 100vh) * .02);
  width: 100%;
  height: 100%;
  padding: calc(var(--tvpage-top) + var(--screen-h, 100vh) * .16) var(--tvpage-right) 0 var(--tvpage-left);
  border-radius: 0;
  background: none;
  box-shadow: none;
  animation: fade .3s both;
}
html.tv .sheet--page .sheet__panel::before { display: none; }
html.tv .sheet--page .length-kicker { color: var(--ink-2); font-weight: 700; font-size: calc(var(--screen-h, 100vh) * .02); letter-spacing: .14em; text-transform: uppercase; }
html.tv .sheet--page h2 { font-size: calc(var(--screen-h, 100vh) * .085); line-height: 1.05; letter-spacing: -.05em; }
html.tv .sheet--page .length-pick { grid-template-columns: repeat(3, calc(var(--screen-h, 100vh) * .3)); gap: calc(var(--screen-w, 100vw) * .022); margin-top: calc(var(--screen-h, 100vh) * .03); }
html.tv .sheet--page .length-pick__btn {
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: calc(var(--screen-h, 100vh) * .008);
  min-height: calc(var(--screen-h, 100vh) * .2);
  padding: calc(var(--screen-h, 100vh) * .026);
  border-radius: var(--r-lg);
}
html.tv .sheet--page .length-pick__btn b { font: 800 calc(var(--screen-h, 100vh) * .036)/1.1 var(--font-display); letter-spacing: -.03em; }
html.tv .sheet--page .length-pick__btn span { font-size: calc(var(--screen-h, 100vh) * .022); }
html.tv .sheet--page .length-pick__btn:focus { transform: scale(1.04); }
html.tv .sheet--page .sheet__actions { justify-content: flex-start; margin-top: calc(var(--screen-h, 100vh) * .02); }
html.tv .sheet--page .sheet__actions .btn { min-height: calc(var(--screen-h, 100vh) * .06); padding: 0 var(--s6); font-size: calc(var(--screen-h, 100vh) * .022); }

/* Where the home screen puts things, measured from beside the side menu. */
html.tv {
  --tvpage-top: calc(var(--screen-h, 100vh) * .123);
  --tvpage-left: calc(var(--screen-w, 100vw) * .03);
  --tvpage-right: calc(var(--screen-w, 100vw) * .04);
  --tvpage-text: calc(var(--screen-h, 100vh) * .421);
}
