/* KaraoKry: a dark karaoke bar lit by neon signs.
   Colours come only from the tokens below (spec section 13.1). */

:root {
  --bg: #0A0612;
  --bg-raised: #140C22;
  --bg-raised-2: #1E1330;
  --line: #2E2245;
  --text: #F5F0FF;
  --text-muted: #A99BC4;
  --pink: #FF2E97;
  --cyan: #22E4FF;
  --violet: #9B5CFF;
  --amber: #FFB020;
  --danger: #FF4D6D;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --glow-pink: 0 0 10px var(--pink), 0 0 28px color-mix(in srgb, var(--pink) 40%, transparent);
  --glow-cyan: 0 0 10px var(--cyan), 0 0 28px color-mix(in srgb, var(--cyan) 40%, transparent);
  --text-glow-pink: 0 0 4px var(--pink), 0 0 12px var(--pink), 0 0 28px var(--pink);
  --text-glow-cyan: 0 0 4px var(--cyan), 0 0 12px var(--cyan), 0 0 28px var(--cyan);

  color-scheme: dark;
}

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

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

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(60vmax 60vmax at 0% 0%, color-mix(in srgb, var(--pink) 12%, transparent), transparent 70%),
    radial-gradient(60vmax 60vmax at 100% 100%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow: hidden;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--cyan); }
code { font-size: 13px; word-break: break-all; color: var(--text); }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.noscript { padding: 24px; text-align: center; }

/* ---- Screens -------------------------------------------------------------- */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding:
    calc(16px + var(--safe-top))
    calc(var(--gutter) + var(--safe-right))
    calc(24px + var(--safe-bottom))
    calc(var(--gutter) + var(--safe-left));
  animation: screen-in 200ms ease-out;
}

.screen--center {
  justify-content: center;
  align-items: stretch;
  text-align: center;
}

.screen--center > * { width: 100%; max-width: 520px; margin-inline: auto; }

.screen--plain { background: var(--bg); }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.screen-title { font-size: 28px; font-weight: 700; line-height: 1.2; }
.lead { font-size: 17px; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.small { font-size: 14px; }
.error { color: var(--danger); }
.hint { font-size: 14px; color: var(--text-muted); }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row--start { justify-content: flex-start; }

/* ---- Wordmark -------------------------------------------------------------- */

.wordmark { font-weight: 800; letter-spacing: 0.04em; line-height: 1; }
.wordmark__karao { color: var(--pink); text-shadow: var(--text-glow-pink); }
.wordmark__kry { color: var(--cyan); text-shadow: var(--text-glow-cyan); }
.wordmark--xl { font-size: 52px; }
.wordmark--lg { font-size: 40px; }
.wordmark--sm { font-size: 22px; }
.wordmark--sm .wordmark__karao, .wordmark--sm .wordmark__kry { text-shadow: 0 0 6px currentColor; }

.neon-title {
  font-size: 44px;
  font-weight: 800;
  color: var(--pink);
  text-shadow: var(--text-glow-pink);
}

/* ---- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  width: 100%;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: none;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease, opacity 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }

.btn--primary {
  background: var(--pink);
  color: var(--bg);
  box-shadow: var(--glow-pink);
}
.btn--secondary {
  background: var(--bg-raised-2);
  border-color: var(--line);
  color: var(--text);
}
.btn--outline {
  border-color: var(--line);
  color: var(--text-muted);
}
.btn--danger {
  background: var(--danger);
  color: var(--bg);
}
.btn--plain {
  color: var(--cyan);
  min-height: 48px;
}
.btn--small {
  width: auto;
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
}
.btn--xl { min-height: 72px; font-size: 24px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { background: var(--bg-raised-2); }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.pill--amber {
  background: var(--amber);
  color: var(--bg);
  box-shadow: 0 0 10px color-mix(in srgb, var(--amber) 50%, transparent);
}

.notice {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 15px;
}

/* ---- Spinner ---------------------------------------------------------------- */

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid color-mix(in srgb, var(--cyan) 25%, transparent);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.spinner--lg { width: 40px; height: 40px; margin: 24px auto 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Top bar ------------------------------------------------------------------ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  flex: 0 0 auto;
}
.topbar--end { justify-content: flex-end; }
.topbar__actions { display: flex; gap: 4px; margin-right: -8px; }
.topbar__title { flex: 1; font-size: 22px; font-weight: 700; text-align: center; }
.topbar__spacer { width: 48px; }

/* ---- Welcome ----------------------------------------------------------------- */

.welcome { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.welcome__icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--pink) 45%, transparent));
}
.tagline { font-size: 24px; font-weight: 700; }

/* ---- How to play --------------------------------------------------------------- */

.howto { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 24px; text-align: center; }
.howto-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  font-size: 19px;
  animation: screen-in 200ms ease-out;
}
.howto-card__num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: var(--glow-cyan);
  color: var(--cyan);
  font-size: 24px;
  font-weight: 800;
}
.dots { display: flex; justify-content: center; gap: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots span.is-on { background: var(--pink); box-shadow: 0 0 8px var(--pink); }

/* ---- Picker ------------------------------------------------------------------- */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised-2);
}
.search svg { width: 20px; height: 20px; color: var(--text-muted); flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 0;
  background: none;
  outline: none;
  font-size: 17px;
}
.search:focus-within { border-color: var(--cyan); }
.search input::placeholder { color: var(--text-muted); }

.status:empty { display: none; }
.status { color: var(--text-muted); text-align: center; padding: 16px 0; }
.status .stack { margin-top: 12px; }

.pl-list { display: flex; flex-direction: column; gap: 8px; }
.pl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.pl-item:active { background: var(--bg-raised-2); }
.pl-item[aria-disabled="true"] { cursor: default; opacity: 0.55; }
.pl-item__art {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-raised-2);
  object-fit: cover;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.pl-item__art svg { width: 26px; height: 26px; }
.pl-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-item__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item__meta { font-size: 14px; color: var(--text-muted); }
.pl-list--muted .pl-item { opacity: 0.55; }

.followed summary {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 48px;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.followed summary::-webkit-details-marker { display: none; }
.followed summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.followed[open] summary::after { transform: rotate(-135deg); }
.followed[open] summary { margin-bottom: 8px; }

/* ---- Preparing ------------------------------------------------------------------ */

.prep { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.cover {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised-2);
  box-shadow: 0 0 24px color-mix(in srgb, var(--violet) 35%, transparent);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover__placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-raised-2), var(--line)); }
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-raised-2);
  overflow: hidden;
}
.progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--pink);
  box-shadow: var(--glow-pink);
  transition: width 240ms ease;
}
.quip { color: var(--cyan); font-weight: 600; min-height: 1.5em; }
.ready-count { font-size: 56px; font-weight: 800; line-height: 1.1; color: var(--text); text-shadow: var(--text-glow-pink); }

/* ---- Pass the phone ----------------------------------------------------------------- */

.screen--plain .chip { background: transparent; }
.pass { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; text-align: center; }
.pass__icon { width: 72px; height: 72px; color: var(--text-muted); }
.pass__title { font-size: 34px; font-weight: 800; line-height: 1.15; max-width: 14em; }
.screen--plain .btn--primary { box-shadow: none; }

/* ---- Round ------------------------------------------------------------------------ */

.screen--round {
  gap: 8px;
  overflow: hidden;
  padding-bottom: calc(12px + var(--safe-bottom));
  touch-action: pan-x pan-y;
}
.titles { display: flex; align-items: center; gap: 12px; flex: none; }
.now-playing { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.now-playing__title,
.now-playing__artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing__title { font-size: 22px; font-weight: 800; line-height: 1.2; }
.now-playing__artist { font-size: 16px; font-weight: 600; color: var(--text); }
.label { flex: none; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.label--playing { color: var(--pink); text-shadow: 0 0 8px var(--pink); }

.selfie {
  --level: 0;
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid var(--pink);
  box-shadow: 0 0 10px color-mix(in srgb, var(--pink) 50%, transparent);
  background: var(--bg-raised-2);
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.selfie:active { transform: scale(0.94); }
/* Tap to turn filming off (it saves battery) and on again. Off: a crossed-out camera. */
.selfie__icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  display: none;
}
.selfie__slash { display: none; }
.selfie:not(.is-live) .selfie__video { visibility: hidden; }
.selfie:not(.is-live) .selfie__icon { display: block; }
.selfie.is-off {
  border-color: var(--line);
  box-shadow: none;
}
.selfie.is-off .selfie__slash { display: inline; }
.selfie.is-off .selfie__rec { display: none; }
/* Voice ring: grows and brightens with the microphone level (set from JavaScript). */
.selfie::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 3px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan);
  opacity: var(--level);
  transform: scale(calc(1 + var(--level) * 0.25));
  pointer-events: none;
}
.selfie__video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transform: scaleX(-1); /* a mirror, like any selfie camera */
}
.selfie__rec {
  position: absolute;
  right: -2px;
  top: -2px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--text-muted);
}
.selfie.is-recording .selfie__rec {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: rec-blink 1.4s ease-in-out infinite;
}
@keyframes rec-blink { 50% { opacity: 0.35; } }

.lyrics-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin-inline: calc(-1 * var(--gutter));
  border-radius: var(--radius);
}
.lyrics {
  height: 100%;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
  padding: 24px var(--gutter) 48px;
  font-size: var(--lyrics-size, clamp(22px, 6.5vw, 34px));
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  user-select: none;
  -webkit-user-select: none;
}
.lyrics:focus-visible { outline-offset: -3px; }
.lyrics__line { overflow-wrap: anywhere; }
.lyrics__gap { height: 0.8em; }

.round-notice, .ended {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--bg) 80%, transparent);
  text-align: center;
  animation: screen-in 200ms ease-out;
}
.round-notice__text { font-weight: 600; }
.round-notice__actions { display: flex; flex-direction: column; gap: 10px; }
.round-notice__actions:empty { display: none; }
.ended { top: 50%; bottom: auto; transform: translateY(-50%); animation: none; }
.ended__title { font-size: 22px; font-weight: 800; }

.player { flex: none; display: flex; flex-direction: column; gap: 4px; }
.pill-row { display: flex; justify-content: center; min-height: 40px; }

.scrub {
  position: relative;
  height: 48px;
  margin-inline: 0;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.scrub.is-disabled { opacity: 0.5; cursor: default; }
.scrub__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--bg-raised-2);
  overflow: hidden;
}
.scrub__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}
.scrub__stretches { position: absolute; inset: 0; pointer-events: none; }
.scrub__stretch {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--amber) 0 4px,
    color-mix(in srgb, var(--amber) 55%, var(--bg)) 4px 7px
  );
  opacity: 0.95;
}
.scrub__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 45%, transparent), 0 0 12px var(--pink);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.scrub.is-dragging .scrub__thumb { transform: translate(-50%, -50%) scale(1.15); }
.scrub__bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}
.scrub.is-dragging .scrub__bubble { opacity: 1; }
.scrub__paused {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
  pointer-events: none;
}

.times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: -8px;
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.legend__swatch {
  width: 18px;
  height: 8px;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 4px, color-mix(in srgb, var(--amber) 55%, var(--bg)) 4px 7px);
}

.transport { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 4px; }
.round-btn {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-raised);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.round-btn:active { background: var(--bg-raised-2); }
.round-btn:disabled { opacity: 0.45; }
.play-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 3px solid var(--cyan);
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--cyan);
  box-shadow: var(--glow-cyan);
  cursor: pointer;
  touch-action: manipulation;
}
.play-btn svg { width: 34px; height: 34px; grid-area: 1 / 1; }
.play-btn:disabled { opacity: 0.45; }
.play-btn__pause, .play-btn__spinner { display: none; }
.play-btn.is-playing .play-btn__play { display: none; }
.play-btn.is-playing .play-btn__pause { display: block; }
.play-btn.is-busy .play-btn__play, .play-btn.is-busy .play-btn__pause { display: none; }
.play-btn.is-busy .play-btn__spinner { display: block; grid-area: 1 / 1; width: 32px; height: 32px; }
.starting { min-height: 1.3em; font-size: 14px; color: var(--text-muted); text-align: center; }

.actions-row { display: flex; gap: 12px; align-items: stretch; }
.actions-row .btn { min-height: 60px; }
.hold { position: relative; flex: 0 0 42%; font-size: 16px; }
.hold__ring {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  overflow: visible;
  pointer-events: none;
}
.hold__ring rect {
  x: 1.5px;
  y: 1.5px;
  width: calc(100% - 3px);
  height: calc(100% - 3px);
  rx: 30px;
  fill: none;
  stroke: var(--pink);
  stroke-width: 3px;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - 100 * var(--hold-progress, 0));
  opacity: 0;
  filter: drop-shadow(0 0 4px var(--pink));
}
.hold.is-holding .hold__ring rect { opacity: 1; }
.hold.is-holding { color: var(--text); }
.btn--gotit { flex: 1; font-size: 22px; font-weight: 800; }

.countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 30vh;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 25%, transparent) 0%,
    color-mix(in srgb, var(--bg) 70%, transparent) 45%,
    color-mix(in srgb, var(--bg) 85%, transparent) 100%);
  transition: opacity 300ms ease;
  z-index: 5;
}
.countdown.is-leaving { opacity: 0; }
.countdown__num {
  font-size: 160px;
  font-weight: 800;
  line-height: 1;
  color: var(--cyan);
  text-shadow: var(--text-glow-cyan);
  font-variant-numeric: tabular-nums;
}
.countdown__num.is-ticking { animation: count-in 1000ms ease-out forwards; }
@keyframes count-in {
  0% { transform: scale(0.6); opacity: 0; }
  20% { transform: scale(1); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* ---- Reveal ------------------------------------------------------------------------- */

.reveal-classic { display: flex; flex-direction: column; gap: 16px; }

.screen--replay { padding: 0; overflow: hidden; }
.screen--center > .replay { max-width: none; }
/* The video fills the whole screen; the answer and the buttons float over it. */
.replay { position: absolute; inset: 0; overflow: hidden; background: #000; text-align: left; }
.replay__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
/* A wide screen (a computer while testing) shows the whole portrait video instead. */
@media (orientation: landscape) {
  .replay__video { object-fit: contain; }
}
.replay__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
}
.replay__tap {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 28px;
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  box-shadow: var(--glow-cyan);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.replay__tap svg { width: 48px; height: 48px; color: var(--cyan); }
.replay__answer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) 48px calc(16px + var(--safe-left));
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 72%, transparent),
    color-mix(in srgb, var(--bg) 40%, transparent) 60%,
    transparent);
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.7);
}
.replay__art {
  flex: none;
  width: 76px;
  height: 76px;
  border: 2px solid var(--pink);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--glow-pink);
  background: var(--bg-raised-2);
}
.replay__art img { width: 100%; height: 100%; object-fit: cover; }
.replay__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.replay__title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.replay__artist { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replay__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 64px calc(16px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(16px + var(--safe-left));
  background: linear-gradient(to top,
    color-mix(in srgb, var(--bg) 75%, transparent),
    color-mix(in srgb, var(--bg) 45%, transparent) 55%,
    transparent);
}
.replay__hint { font-size: 13px; color: var(--text); text-align: center; text-shadow: 0 1px 4px rgb(0 0 0 / 0.8); }
.replay__row { display: flex; gap: 10px; }
.replay__row .btn { flex: 1; }
.replay .btn--secondary {
  background: color-mix(in srgb, var(--bg-raised-2) 55%, transparent);
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.replay .btn--plain { text-shadow: 0 1px 4px rgb(0 0 0 / 0.8); }

.reveal-card { perspective: 1200px; }
.reveal-card__inner {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 400ms ease;
}
.reveal-card.is-flipped .reveal-card__inner { transform: rotateY(180deg); }
.reveal-card__face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-raised);
}
.reveal-card__front { display: flex; }
.reveal-card__tap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: min(110vw, 460px);
  padding: 32px 24px;
  border: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 70%);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}
.reveal-card__tap svg { width: 80px; height: 80px; color: var(--pink); filter: drop-shadow(0 0 10px var(--pink)); }
.reveal-card__back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
}
.it-was { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.art {
  width: min(70vw, 320px);
  height: min(70vw, 320px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--pink);
  box-shadow: var(--glow-pink);
  background: var(--bg-raised-2);
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--pink); }
.art__placeholder svg { width: 45%; height: 45%; filter: drop-shadow(0 0 10px var(--pink)); }
.reveal-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.reveal-artist { font-size: 19px; color: var(--text); }
.divider { width: 60%; margin: 6px auto; border: 0; border-top: 1px solid var(--line); }

/* ---- Settings ------------------------------------------------------------------------- */

.settings { display: flex; flex-direction: column; gap: 12px; max-width: 640px; width: 100%; margin: 0 auto; }
.group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.group__title { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.group--details summary { display: flex; align-items: center; justify-content: space-between; min-height: 32px; cursor: pointer; list-style: none; }
.group--details summary::-webkit-details-marker { display: none; }
.group--details summary::after { content: "+"; font-size: 22px; color: var(--text-muted); }
.group--details[open] summary::after { content: "−"; }
.field { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.field--plain { padding-top: 0; border-top: 0; }
select.input { font-family: var(--font); font-size: 16px; color: var(--text); }
.input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
}
.input:focus { border-color: var(--cyan); outline: none; }
.radios { display: flex; flex-direction: column; gap: 8px; }
.radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.radio:has(input:checked) { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.radio input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--cyan); flex: none; }
.radio span { display: flex; flex-direction: column; gap: 2px; }
.radio small { font-size: 14px; color: var(--text-muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; }
.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 999px;
  background: var(--bg-raised-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 160ms ease;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 160ms ease, background-color 160ms ease;
}
.switch:checked { background: color-mix(in srgb, var(--cyan) 30%, var(--bg-raised-2)); border-color: var(--cyan); }
.switch:checked::after { transform: translateX(20px); background: var(--cyan); }
.switch:disabled { opacity: 0.4; }
.debug {
  margin: 0;
  padding: 12px;
  max-height: 220px;
  overflow: auto;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---- Dialogs ---------------------------------------------------------------------------- */

.dialog {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
}
.dialog::backdrop { background: color-mix(in srgb, var(--bg) 75%, transparent); }
.dialog__panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-raised);
  box-shadow: 0 0 40px color-mix(in srgb, var(--violet) 25%, transparent);
  animation: screen-in 200ms ease-out;
}
.dialog__title { font-size: 22px; font-weight: 800; }
.dialog__body { color: var(--text-muted); }
.dialog__actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 6px; }
.dialog--sheet {
  margin: auto 0 0;
  max-width: none;
  width: 100%;
}
.dialog--sheet .dialog__panel {
  border-radius: 20px 20px 0 0;
  padding-bottom: calc(16px + var(--safe-bottom));
  gap: 4px;
}
.dialog--sheet .dialog__actions { flex-direction: column; gap: 4px; margin-top: 0; }
.btn--menu, .btn--menu-danger {
  justify-content: flex-start;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 12px;
  font-weight: 600;
}
.btn--menu:active, .btn--menu-danger:active { background: var(--bg-raised-2); transform: none; }
.btn--menu-danger { color: var(--danger); }
.dialog--sheet .btn--plain { color: var(--text-muted); }

/* ---- Overlays, toasts, confetti ---------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px calc(24px + var(--safe-right)) 32px calc(24px + var(--safe-left));
  background: var(--bg);
  text-align: center;
}
.overlay .btn { max-width: 360px; }
.overlay--rotate { display: none; z-index: 100; }
@media (orientation: landscape) and (max-height: 540px) and (pointer: coarse) {
  .overlay--rotate { display: flex; }
}

/* Toasts appear at the top, below the header, so they never cover the main buttons. */
.toasts {
  position: fixed;
  left: 50%;
  top: calc(64px + var(--safe-top));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 480px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--bg) 70%, transparent);
  pointer-events: none;
  animation: toast-in 200ms ease-out;
}
.toast--action { pointer-events: auto; cursor: pointer; border-color: var(--cyan); min-height: 48px; }
.toast__action { color: var(--cyan); }
.toast.is-leaving { opacity: 0; transition: opacity 200ms ease; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }

/* ---- Reduced motion ----------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .screen, .howto-card, .dialog__panel, .round-notice, .toast { animation: fade-in 200ms ease-out; }
  .reveal-card__inner { transition: none; }
  .reveal-card.is-flipped .reveal-card__inner { transform: none; }
  .reveal-card.is-flipped .reveal-card__front { display: none; }
  .reveal-card__back { transform: none; animation: fade-in 300ms ease-out; }
  .reveal-card:not(.is-flipped) .reveal-card__back { visibility: hidden; }
  .countdown__num.is-ticking { animation: fade-out 1000ms ease-out forwards; }
  .btn:active { transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* ===========================================================================
   V2 additions: access code, playlist tiles, continuous play,
   Follow the song and the sing-now light. Same tokens as everything above.
   =========================================================================== */

/* "alpha" after the wordmark, while the game is being play-tested. */
.wordmark__tag {
  margin-left: 0.3em;
  font-size: 0.3em;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: super;
  color: var(--amber);
  text-shadow: 0 0 6px color-mix(in srgb, var(--amber) 60%, transparent);
}

/* ---- Access code ----------------------------------------------------------- */

.code-form { display: flex; flex-direction: column; gap: 10px; }
.code-form__label { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.code-form__input {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.error { color: var(--danger); }

/* ---- Home: Keep playing and the playlist tiles ------------------------------- */

.keep-playing {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label icon" "detail icon";
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 16px;
  border: 1px solid var(--pink);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--pink) 14%, var(--bg-raised));
  box-shadow: var(--glow-pink);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.keep-playing__label { grid-area: label; font-size: 18px; font-weight: 800; }
.keep-playing__detail { grid-area: detail; font-size: 14px; color: var(--text-muted); }
.keep-playing svg { grid-area: icon; width: 28px; height: 28px; color: var(--pink); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  padding-bottom: calc(16px + var(--safe-bottom));
}
.tile {
  --hue: 300;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 100% 0%, hsl(var(--hue) 80% 55% / 0.28), transparent 70%),
    var(--bg-raised);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.tile:active { transform: scale(0.98); }
.tile:disabled { cursor: default; opacity: 0.45; }
.tile.is-current { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.tile__icon { position: absolute; top: 10px; right: 12px; font-size: 30px; line-height: 1; }
.tile__name { font-size: 17px; font-weight: 800; line-height: 1.2; padding-right: 36px; }
.tile__count { font-size: 13px; color: var(--text-muted); }
.tile.is-current .tile__count { color: var(--cyan); font-weight: 700; }
.tiles--sheet { max-height: 60vh; overflow-y: auto; padding: 4px 2px 8px; }

/* ---- Pass the phone: the playlist chip -------------------------------------- */

.playlist-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 55%;
  min-height: 40px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.playlist-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-chip svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--text-muted); }

/* ---- Round: the sing-now light ---------------------------------------------- */

.sing-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 56px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
}
.sing-now i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-raised-2);
  transition: background-color 120ms, box-shadow 120ms;
}
.sing-now.is-on { border-color: var(--pink); color: var(--pink); }
.sing-now.is-on i { background: var(--pink); box-shadow: var(--glow-pink); }
.sing-now b { min-width: 0.6em; color: var(--amber); }

/* ---- Round: Follow the song --------------------------------------------------- */

.lyrics--follow { scroll-behavior: auto; }
/* Room above the first line, so it can start on the reading line (30% down), and below the last. */
.follow__space { height: 30%; }
.follow__space--end { height: 70%; }
.follow__restart { margin: 0.8em 0; font-size: 13px; font-weight: 700; color: var(--cyan); letter-spacing: 0.04em; }

/* ---- Settings: timing slider -------------------------------------------------- */

.range { width: 100%; accent-color: var(--cyan); min-height: 40px; }

@media (prefers-reduced-motion: reduce) {
  .sing-now i { transition: none; }
}

/* ---- Sign in with Google, and waiting to be let in ------------------------------ */

/* Google's own button colours (its branding rules), so it looks like the button people know. */
.btn--google {
  background: #FFFFFF;
  color: #1F1F1F;
  border-color: #FFFFFF;
  font-family: Roboto, var(--font);
  font-weight: 600;
}
.btn--google svg { width: 22px; height: 22px; flex: none; }
.code-alt { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.code-alt summary { list-style: none; margin: 0 auto; }
.code-alt summary::-webkit-details-marker { display: none; }
.code-alt .code-form { width: 100%; }

/* ---- The host's pages ------------------------------------------------------------- */

.notice-bar {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--amber) 14%, var(--bg-raised));
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--bg);
  font-size: 13px;
  font-weight: 800;
}
.admin { display: flex; flex-direction: column; gap: 12px; max-width: 640px; width: 100%; margin: 0 auto; }
.people { display: flex; flex-direction: column; }
.person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.person:first-child { border-top: 0; padding-top: 0; }
.person__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.person__email { overflow-wrap: anywhere; }
.person__actions { display: flex; gap: 8px; }
.segments { display: flex; flex-wrap: wrap; gap: 8px; }
.segment { position: relative; cursor: pointer; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  font-size: 14px;
  font-weight: 700;
}
.segment input:checked + span { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.segment input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.song-stats { display: flex; flex-direction: column; gap: 8px; }
.song-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
}

/* ---- Pages of their own (privacy.html) -------------------------------------------- */

body.doc { overflow-y: auto; }
.doc main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(24px + var(--safe-top)) calc(var(--gutter) + var(--safe-right)) calc(40px + var(--safe-bottom)) calc(var(--gutter) + var(--safe-left));
}
.doc h2 { margin-top: 10px; font-size: 20px; }
.doc ul { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; list-style: disc; }

/* ---- Replay: sharing ------------------------------------------------------------------- */

.btn--share {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: var(--glow-cyan);
}
.replay__mode { font-size: 13px; color: var(--text-muted); text-align: center; }
.link-btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--cyan);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* Staging's "Test site" label, next to the wordmark on home. */
.site-badge {
  margin-right: auto;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--amber);
  border-radius: 999px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* How to play: a tap or a swipe changes cards, and the new card slides in from its side. */
.howto__cards { touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; }
.howto-card.from-right { animation: card-from-right 220ms ease-out; }
.howto-card.from-left { animation: card-from-left 220ms ease-out; }
@keyframes card-from-right { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes card-from-left { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .howto-card.from-right, .howto-card.from-left { animation: fade-in 200ms ease-out; }
}

/* ---- Playtest feedback: why skip, fun round, song problems --------------------------- */

.why-skip { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.why-skip__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.chip-btn:active { background: var(--bg-raised-2); }
.rate { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.rate__btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  font-size: 18px;
  cursor: pointer;
}
.rate__btn[aria-pressed="true"] { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 22%, var(--bg-raised)); box-shadow: 0 0 0 1px var(--cyan); }
.rate__problem { margin-left: 4px; font-size: 13px; }

/* ---- Host: playlists and songs (curating) ------------------------------------------------- */

.curate { display: flex; flex-direction: column; gap: 8px; }
.curate-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.curate-row:active { background: var(--bg-raised-2); }
.verdict-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; }
.song-stat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.verdict {
  flex: none;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.verdict--danger { border-color: var(--danger); color: var(--danger); }
.verdict--warn { border-color: var(--amber); color: var(--amber); }
.verdict--good { border-color: var(--cyan); color: var(--cyan); }
.verdict--plain { color: var(--text-muted); }
.verdict--early { border-style: dashed; }
