/* ============================================================
   Mother's Day Trivia — Demetria's Edition
   Mobile-first, full-bleed responsive
   ============================================================ */

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  background: var(--bone);
  font-family: var(--font-body);
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
}

#root {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ───────────────────────────── App shell ───────────────────────────── */

.app {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bone);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 320ms var(--ease), color 320ms var(--ease);
}
.app, .screen, .tactile-stage, .stage-area, .turntable-wrap {
  overscroll-behavior: contain;
}
.app.dark {
  background: var(--ink);
  color: var(--bone);
  /* Re-point semantic foreground vars so headings + base text flip in dark mode.
     Rules using var(--ink) directly still need their own .app.dark overrides. */
  --fg: var(--bone);
  --fg-soft: rgba(251,246,238,0.78);
  --fg-mute: rgba(251,246,238,0.55);
}

/* On wide screens, give the page a soft "stage" feel */
@media (min-width: 600px) {
  body { background: var(--bone-deep); display: grid; place-items: center; }
  .app {
    height: min(100vh, 880px);
    border-radius: 32px;
    border: 1.5px solid var(--border);
    box-shadow: 0 32px 80px rgba(14,13,16,0.12);
  }
  .app.dark { border-color: rgba(251,246,238,0.08); }
}

/* ───────────────────────────── Top bar ───────────────────────────── */

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
  gap: 12px;
}
.topbar .brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}
.app.dark .topbar .brand { color: rgba(251,246,238,0.55); }
button.topbar .brand,
.topbar button.brand {
  background: transparent; border: none; padding: 0; font: inherit;
  letter-spacing: inherit; text-transform: inherit; color: inherit;
}
.topbar .brand-toggle {
  cursor: pointer;
  padding: 4px 6px; margin: -4px -6px;
  border-radius: var(--r-pill);
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.topbar .brand-toggle:hover { color: var(--primary); background: rgba(0,0,0,0.04); }
.app.dark .topbar .brand-toggle:hover { color: var(--rose-soft); background: rgba(251,246,238,0.06); }
.topbar .brand-toggle:active { transform: scale(0.97); }
.topbar .brand .mini-disc {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--vinyl-sheen) 0%, var(--vinyl) 70%);
  position: relative;
}
.topbar .brand .mini-disc::after {
  content: ""; position: absolute; inset: 35%; border-radius: 50%; background: var(--primary);
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-cog {
  appearance: none;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-mute);
  cursor: pointer;
  transition: transform 320ms var(--ease), color 200ms var(--ease),
              border-color 200ms var(--ease), background 200ms var(--ease);
}
.settings-cog:hover {
  color: var(--primary);
  border-color: var(--border-strong);
  transform: rotate(45deg);
}
.settings-cog:active { transform: rotate(45deg) scale(0.94); }
.app.dark .settings-cog {
  background: rgba(251,246,238,0.08);
  border-color: rgba(251,246,238,0.18);
  color: rgba(251,246,238,0.7);
}
.app.dark .settings-cog:hover {
  color: var(--rose-soft);
  border-color: rgba(251,246,238,0.32);
}

.notes-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--paper); border: 1.5px solid var(--border);
  border-radius: 9999px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink);
  transition: transform 240ms var(--ease), background 240ms var(--ease),
              border-color 240ms var(--ease);
}
button.notes-pill,
.notes-pill-btn {
  appearance: none;
  font: inherit; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  cursor: pointer;
}
.notes-pill-btn:hover { border-color: var(--border-strong); }
.notes-pill-btn:active { transform: scale(0.97); }
.app.dark .notes-pill-btn:hover { border-color: rgba(251,246,238,0.32); }
.app.dark .notes-pill {
  background: rgba(251,246,238,0.08);
  border-color: rgba(251,246,238,0.18);
  color: var(--bone);
}
.notes-pill .glyph {
  font-family: var(--font-display); font-size: 14px; line-height: 1;
  color: var(--primary); font-style: italic;
}
.app.dark .notes-pill .glyph { color: var(--rose-soft); }
.notes-pill.bumped { animation: notes-bump 540ms var(--ease); }
@keyframes notes-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity .18s var(--ease);
}
.back-btn:hover { opacity: 0.7; }
.app.dark .back-btn { color: var(--bone); }

/* ───────────────────────────── Screens ───────────────────────────── */

.screen {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 8px 24px 24px;
  overflow-y: auto;
  position: relative;
}

.screen::-webkit-scrollbar { width: 4px; }
.screen::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 2px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.app.dark .eyebrow { color: rgba(251,246,238,0.55); }

.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 60, "opsz" 96;
  margin: 0;
}
.h-display em {
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.app.dark .h-display em { color: var(--rose-soft); }

.body-lead {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}
.app.dark .body-lead { color: rgba(251,246,238,0.78); }

.caption {
  font-size: 13px;
  color: var(--ink-mute);
}
.app.dark .caption { color: rgba(251,246,238,0.55); }

/* ───────────────────────────── Buttons ───────────────────────────── */

.btn {
  font: inherit;
  border: none;
  cursor: pointer;
  transition: transform 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease), opacity 180ms var(--ease);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 9999px;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:active { transform: scale(0.96) translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: var(--bone);
}
.btn-primary:hover { background: var(--rose-deep); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 13px 27px;
  border: 1.5px solid var(--primary);
}
.app.dark .btn-ghost { color: var(--rose-soft); border-color: var(--rose-soft); }
.btn-ghost:hover { opacity: 0.8; }

.btn-block { width: 100%; }

/* ───────────────────────────── Welcome screen ───────────────────────────── */

.welcome {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(8px, 1.6vh, 22px);
  padding: clamp(10px, 2vh, 24px);
  overflow: hidden;          /* everything fits — no scroll */
  min-height: 0;
}
.welcome .h-display {
  font-size: clamp(22px, 4.6vh, 38px);
}
.welcome .body-lead {
  font-size: clamp(13px, 1.9vh, 17px);
  margin-top: clamp(6px, 1vh, 14px) !important;
}

.hero-stack {
  position: relative;
  width: clamp(132px, 24vh, 220px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Sleeve behind, vinyl peeking out — homage to album art */
.hero-stack .sleeve-bg {
  position: absolute;
  width: 91%; aspect-ratio: 1;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sleeve);
  transform: rotate(-6deg) translateX(-6%);
  box-shadow: var(--shadow-sleeve);
  display: grid; place-items: center;
}
.app.dark .hero-stack .sleeve-bg { background: rgba(251,246,238,0.06); border-color: rgba(251,246,238,0.18); }
.hero-stack .sleeve-bg .rings {
  width: 70%; height: 70%;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  opacity: 0.85;
}
.app.dark .hero-stack .sleeve-bg .rings { border-color: var(--bone); }
.hero-stack .sleeve-bg .rings::after {
  content: "";
  width: 60%; height: 60%; border-radius: 50%;
  border: 1px solid currentColor;
}

.hero-stack .vinyl-hero {
  position: relative;
  width: 91%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(251,246,238,0.04) 0 1px, transparent 1px 4px),
    radial-gradient(circle, var(--vinyl-sheen) 0%, var(--vinyl) 100%);
  box-shadow: var(--shadow-vinyl);
  transform: translateX(9%) rotate(0deg);
  animation: spin var(--dur-spin) linear infinite;
  display: grid; place-items: center;
}
.hero-stack .vinyl-hero::after {
  content: ""; position: absolute; inset: 4%; border-radius: 50%;
  border: 1px solid rgba(251,246,238,0.1);
}
.hero-stack .vinyl-hero .label {
  width: 38%; aspect-ratio: 1; border-radius: 50%;
  background: var(--primary);
  display: grid; place-items: center;
  position: relative;
}
.hero-stack .vinyl-hero .label::before {
  content: "DEMETRIA · HAPPY MOTHER'S DAY! WE LOVE YOU!!!";
  position: absolute; top: 18%;
  font-family: var(--font-mono); font-size: 6px; letter-spacing: 0.25em; color: var(--bone); opacity: 0.75;
}
.hero-stack .vinyl-hero .label::after {
  content: ""; width: 16%; aspect-ratio: 1; background: var(--bone); border-radius: 50%;
}

.welcome-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.app.dark .welcome-meta { color: rgba(251,246,238,0.55); }

.welcome-credits {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  line-height: 1.7;
}
.app.dark .welcome-credits { color: rgba(251,246,238,0.5); }
.welcome-credits .lbl { letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }

/* ───────── Inline tweaks on welcome ───────── */
.welcome-tweaks {
  width: min(420px, 92%);
  margin: 8px auto 0;
  padding: clamp(8px, 1.4vh, 14px) 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: clamp(6px, 1vh, 10px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.app.dark .welcome-tweaks {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}
.wt-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.wt-label { opacity: 0.65; }
.wt-swatches { display: flex; gap: 8px; }
.wt-swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  padding: 0; cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}
.wt-swatch:hover { transform: scale(1.08); }
.wt-swatch.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--bone), 0 0 0 4px var(--ink);
}
.app.dark .wt-swatch { border-color: rgba(255,255,255,0.2); }
.app.dark .wt-swatch.active { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--bone); }

.wt-toggle {
  position: relative;
  width: 38px; height: 22px; border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: none; padding: 0; cursor: pointer;
  transition: background 160ms ease;
}
.wt-toggle.on { background: var(--primary); }
.wt-knob {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bone);
  transition: transform 160ms ease;
}
.wt-toggle.on .wt-knob { transform: translateX(16px); }

.wt-slider { display: flex; align-items: center; gap: 10px; }
.wt-slider input[type="range"] {
  width: clamp(96px, 30vw, 140px); accent-color: var(--primary);
}
.wt-val { font-variant-numeric: tabular-nums; opacity: 0.7; min-width: 44px; text-align: right; }

@keyframes spin { to { transform: translateX(9%) rotate(360deg); } }

/* ───────────────────────────── Crate / Sleeves ───────────────────────────── */

.crate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.crate-head h2 { font-size: 32px; }

.progress-track {
  margin: 16px 0 8px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.app.dark .progress-track { background: rgba(251,246,238,0.1); }
.progress-track .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 480ms var(--ease);
}

.crate-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.side-divider {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  margin: 12px 0 2px;
}
.app.dark .side-divider { color: rgba(251,246,238,0.5); }
.side-divider::before, .side-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.app.dark .side-divider::before, .app.dark .side-divider::after { background: rgba(251,246,238,0.12); }

.sleeve {
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sleeve);
  padding: 12px;
  box-shadow: var(--shadow-sleeve);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
  color: inherit;
  transition: transform 180ms var(--ease), opacity 240ms var(--ease);
}
.app.dark .sleeve {
  background: rgba(251,246,238,0.04);
  border-color: rgba(251,246,238,0.12);
}
.sleeve:active { transform: scale(0.98); }
.sleeve:disabled { cursor: not-allowed; opacity: 0.45; }
.sleeve .art {
  width: 64px; height: 64px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.sleeve .art .ring {
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: grid; place-items: center;
}
.sleeve .art .ring .dot {
  width: 36%; aspect-ratio: 1; border-radius: 50%; background: currentColor;
}
.sleeve .meta { flex: 1; min-width: 0; }
.sleeve .lbl {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
}
.app.dark .sleeve .lbl { color: rgba(251,246,238,0.55); }
.sleeve .ttl {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.01em; line-height: 1.2;
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app.dark .sleeve .ttl { color: var(--bone); }
.sleeve .right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex: 0 0 auto;
}
.sleeve .dur {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute);
}
.app.dark .sleeve .dur { color: rgba(251,246,238,0.55); }
.sleeve .check {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--accent);
  display: flex; align-items: center; gap: 5px;
  text-transform: uppercase;
}
.sleeve .check svg { display: block; flex-shrink: 0; }

/* Played trivia sleeves stay tappable but read as "done": dimmer art, faded
   meta, and a corner check on the cover so it's obvious at a glance. */
.sleeve.played { opacity: 0.78; }
.sleeve.played .art { filter: grayscale(0.45) brightness(0.95); }
.sleeve.played .ttl {
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.18);
  text-decoration-thickness: 1px;
}
.app.dark .sleeve.played .ttl { text-decoration-color: rgba(251,246,238,0.28); }
.sleeve .played-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bone);
  display: grid; place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  pointer-events: none;
}
.app.dark .sleeve .played-badge { color: var(--ink); }

/* ───────────────────────────── Now-Playing turntable ───────────────────────────── */

.turntable-screen {
  /* Background and color inherit from .app — flips with dark mode. */
  padding-top: clamp(8px, 1.6vh, 16px);
  padding-bottom: clamp(8px, 1.6vh, 24px);
}

.turntable-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(6px, 1.4vh, 20px);
  padding: clamp(6px, 1.4vh, 24px) 0;
  min-height: 0;
}

.turntable {
  position: relative;
  /* Constrained by both viewport width and height so it never pushes content off-screen. */
  width: min(240px, 56vw, 32vh);
  aspect-ratio: 1;
  flex: 0 0 auto;
}
.platter {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #2B2A2E 0%, #1C1B1F 70%, #0E0D10 100%);
  box-shadow: var(--shadow-vinyl), inset 0 2px 0 rgba(251,246,238,0.05);
}
.platter::after {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle, #1C1B1F 0%, #0E0D10 100%);
}
.disc {
  position: absolute; inset: 8%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(251,246,238,0.025) 0 1px, transparent 1px 4px),
    radial-gradient(circle, #1C1B1F 0%, #0E0D10 100%);
  display: grid; place-items: center;
  animation: spin-tt var(--dur-spin) linear infinite;
}
.disc.paused { animation-play-state: paused; }
.disc.removable { cursor: grab; touch-action: none; }
.disc.removable:active { cursor: grabbing; }
@keyframes spin-tt { to { transform: rotate(360deg); } }

.disc-label {
  width: 46%; aspect-ratio: 1; border-radius: 50%;
  background: var(--primary);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset;
}
.disc-label-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.disc-label-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.75) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 100%);
}
.disc-label-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--bone);
  padding: 14% 12%;
  gap: 4px;
}
.disc-label-text .dl-track {
  font-family: var(--font-mono);
  font-size: 6px; letter-spacing: 0.25em; text-transform: uppercase;
  opacity: 0.85;
}
.disc-label-text .dl-title {
  font-family: var(--font-display, serif);
  font-style: italic;
  font-size: 11px; line-height: 1.15;
  text-wrap: balance;
}
.disc-label-hole {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 12%; aspect-ratio: 1;
  background: var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

/* tonearm */
.tonearm {
  position: absolute;
  top: -4%; right: 4%;
  width: 46%; aspect-ratio: 0.7;
  transform-origin: 100% 14%;
  pointer-events: none;
}
.tonearm.playing { transform: rotate(-6deg); }
.tonearm .pivot {
  /* Sits exactly on the rotation origin (right: 0, top: 14%) — purely decorative */
  position: absolute; top: 14%; right: 0;
  transform: translate(50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0ebe2, #b9b4ac 60%, #5a5752);
  box-shadow:
    inset 0 0 0 4px var(--ink),
    inset 0 0 0 5px #C9C5BF,
    0 2px 6px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 2;
}
.tonearm .arm {
  /* Starts at the same anchor as the pivot so the arm appears to grow from it */
  position: absolute; top: 14%; right: 0;
  width: 4px; height: 74%;
  background: linear-gradient(to bottom, #ddd9d2, #B7B3AD);
  border-radius: 2px;
  transform-origin: top center;
  transform: translateX(2px) rotate(18deg);
}
.tonearm .head {
  /* The cartridge / needle head — this is the interactive grab handle */
  position: absolute; bottom: -6px; left: -8px;
  width: 22px; height: 16px;
  background: linear-gradient(180deg, #2c2a28, #0e0d0c);
  border-radius: 3px;
  border: 1px solid #555;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.tonearm.dragging .head { cursor: grabbing; }
.tonearm .head::after {
  content: ""; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 1.5px; height: 6px; background: var(--primary);
}
/* Pulsing ring around the head — only when ready (loaded, not playing, not dragging) */
.tonearm .head::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 6px;
  border: 2px solid var(--rose-soft, #d97757);
  opacity: 0;
  pointer-events: none;
}
.tonearm.ready .head::before {
  animation: head-pulse 1.6s ease-out infinite;
}
.tonearm.dragging .head::before,
.tonearm.playing .head::before { animation: none; opacity: 0; }
@keyframes head-pulse {
  0%   { transform: scale(0.9); opacity: 0.75; }
  70%  { transform: scale(1.5); opacity: 0;    }
  100% { transform: scale(1.5); opacity: 0;    }
}

/* track meta */
.track-meta {
  text-align: center;
}
.track-meta .num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg-mute);
}
.track-meta .ttl {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(18px, 3vh, 26px); letter-spacing: -0.01em;
  color: var(--fg);
  margin-top: 4px;
}
.track-meta .voiced {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--fg-mute);
  margin-top: 6px;
}

/* waveform */
.waveform {
  display: flex; gap: 3px; align-items: center;
  height: clamp(20px, 4vh, 36px);
  justify-content: center;
}
.waveform span {
  display: block; width: 3px; background: var(--rose-soft); border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
  opacity: 0.95;
}
.waveform.idle span { animation: none; height: 6px !important; opacity: 0.3; }
@keyframes wave {
  0%, 100% { height: 6px; }
  50% { height: var(--h, 20px); }
}

.tt-cta {
  margin-top: 8px;
  display: flex; gap: 12px;
}

/* ───────────────────────────── Question screen ───────────────────────────── */

.qscreen-head {
  margin-bottom: 16px;
}
.qscreen-head h2 { font-size: 26px; margin-top: 4px; }

.qcard {
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sleeve);
  padding: 22px;
  margin-top: 18px;
}
.app.dark .qcard {
  background: rgba(251,246,238,0.05);
  border-color: rgba(251,246,238,0.12);
}
.qcard .q {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.app.dark .qcard .q { color: var(--bone); }
.qcard .qmeta {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 10px;
}
.qcard .qmeta .voiced {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary);
}
.app.dark .qcard .qmeta .voiced { color: var(--rose-soft); }

.answers {
  display: grid; gap: 8px; margin-top: 18px;
}
.ans {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body); font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer; text-align: left; width: 100%;
  transition: all 200ms var(--ease);
}
.app.dark .ans {
  background: rgba(251,246,238,0.04);
  border-color: rgba(251,246,238,0.14);
  color: var(--bone);
}
.ans:hover:not(:disabled) { border-color: var(--border-strong); transform: translateX(2px); }
.app.dark .ans:hover:not(:disabled) { border-color: rgba(251,246,238,0.3); }
.ans:active { transform: scale(0.99); }
.ans .key {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink-mute);
  width: 16px; flex: 0 0 auto;
}
.app.dark .ans .key { color: rgba(251,246,238,0.5); }

.ans.correct {
  background: var(--sage-tint);
  border-color: var(--sage);
  color: var(--sage-deep);
}
.app.dark .ans.correct {
  background: rgba(79,122,82,0.22);
  border-color: var(--sage);
  color: var(--moss-tint);
}
.ans.wrong {
  background: var(--rose-tint);
  border-color: var(--primary);
  color: var(--rose-deep);
}
.app.dark .ans.wrong {
  background: rgba(31,111,115,0.22);
  border-color: var(--rose-soft);
  color: var(--rose-soft);
}
.ans.dim { opacity: 0.4; }
.ans.correct .key, .ans.wrong .key { color: inherit; }

/* reveal note */
.reveal {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: var(--bone-deep);
  border: 1.5px solid var(--border);
  animation: reveal-in 360ms var(--ease);
}
.app.dark .reveal {
  background: rgba(251,246,238,0.06);
  border-color: rgba(251,246,238,0.12);
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px; margin-bottom: 10px;
}
.reveal .tag.right {
  background: var(--sage); color: var(--bone);
}
.reveal .tag.wrong {
  background: var(--primary); color: var(--bone);
}
.reveal .note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink);
}
.app.dark .reveal .note { color: var(--bone); }
.reveal .award {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.app.dark .reveal .award { color: rgba(251,246,238,0.7); }
.reveal .award .glyph {
  font-family: var(--font-display); font-style: italic; color: var(--primary);
  font-size: 16px; line-height: 1;
}
.app.dark .reveal .award .glyph { color: var(--rose-soft); }

.qscreen-cta {
  margin-top: 18px;
  display: flex; justify-content: flex-end;
}

/* ───────────────────────────── Shop ───────────────────────────── */

.shop-head {
  margin-bottom: 18px;
}
.shop-head h2 { font-size: 32px; }

.shop-balance {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin: 14px 0 18px;
  box-shadow: var(--shadow-sleeve);
}
.app.dark .shop-balance {
  background: rgba(251,246,238,0.05);
  border-color: rgba(251,246,238,0.14);
}
.shop-balance .bal-num {
  font-family: var(--font-display); font-style: italic;
  font-size: 32px;
  color: var(--primary);
  font-weight: 500;
  line-height: 1;
}
.app.dark .shop-balance .bal-num { color: var(--rose-soft); }
.shop-balance .bal-lbl {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}
.app.dark .shop-balance .bal-lbl { color: rgba(251,246,238,0.55); }
.shop-balance .right {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-mute);
  max-width: 60%;
  line-height: 1.4;
}
.app.dark .shop-balance .right { color: rgba(251,246,238,0.6); }

.shop-list {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}

.cert {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sleeve);
  box-shadow: var(--shadow-sleeve);
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.app.dark .cert {
  background: rgba(251,246,238,0.04);
  border-color: rgba(251,246,238,0.12);
}
.cert:hover:not(.locked):not(.purchased) { transform: translateY(-1px); }
.cert:active:not(.locked):not(.purchased) { transform: scale(0.99); }
.cert.locked { opacity: 0.55; cursor: not-allowed; }
.cert.purchased { background: var(--sage-tint); border-color: var(--sage); }
.app.dark .cert.purchased {
  background: rgba(79,122,82,0.18);
  border-color: var(--sage);
}

.cert .stamp {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  position: relative;
  background: var(--bone-deep);
  border: 1.5px solid var(--border);
}
.cert .stamp.rose   { background: var(--rose-tint); color: var(--primary); border-color: var(--primary); }
.cert .stamp.sage   { background: var(--sage-tint); color: var(--sage-deep); border-color: var(--sage); }
.cert .stamp.indigo { background: #D6DEE8; color: var(--indigo); border-color: var(--indigo); }
.app.dark .cert .stamp.rose   { background: rgba(31,111,115,0.2); color: var(--rose-soft); border-color: var(--rose-soft); }
.app.dark .cert .stamp.sage   { background: rgba(79,122,82,0.25); color: var(--moss-tint); border-color: var(--sage); }
.app.dark .cert .stamp.indigo { background: rgba(143,168,192,0.18); color: var(--indigo-soft); border-color: var(--indigo-soft); }
.cert .stamp::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 1px dashed currentColor;
  opacity: 0.5;
}

.cert .body .sm-eyebrow {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
}
.app.dark .cert .body .sm-eyebrow { color: rgba(251,246,238,0.55); }
.cert .body .ttl {
  font-family: var(--font-display); font-style: italic;
  font-weight: 500; font-size: 19px;
  letter-spacing: -0.01em; line-height: 1.2;
  margin-top: 2px;
  color: var(--ink);
}
.app.dark .cert .body .ttl { color: var(--bone); }
.cert .body .blurb {
  font-size: 13px; color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.4;
  text-wrap: pretty;
}
.app.dark .cert .body .blurb { color: rgba(251,246,238,0.7); }

.cert .price {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.app.dark .cert .price { color: var(--bone); }
.cert .price .num {
  font-family: var(--font-display); font-style: italic;
  font-size: 28px; line-height: 1;
  color: var(--primary);
  font-weight: 500;
}
.app.dark .cert .price .num { color: var(--rose-soft); }
.cert .price .unit {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
}
.app.dark .cert .price .unit { color: rgba(251,246,238,0.55); }
.cert.purchased .price {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage-deep);
}
.app.dark .cert.purchased .price { color: var(--moss-tint); }

.cert.redeemed {
  background: var(--sage-tint);
  border-color: var(--sage);
  opacity: 0.78;
}
.app.dark .cert.redeemed {
  background: rgba(79,122,82,0.18);
  border-color: var(--sage);
}
.cert.redeemed .stamp { filter: grayscale(0.35) brightness(0.95); }
.cert.redeemed .body .ttl { text-decoration: line-through; text-decoration-color: rgba(0,0,0,0.25); }
.app.dark .cert.redeemed .body .ttl { text-decoration-color: rgba(251,246,238,0.35); }
.cert.redeemed .price {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sage-deep);
}
.app.dark .cert.redeemed .price { color: var(--moss-tint); }

.shop-foot {
  text-align: center;
  padding: 18px 0 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  line-height: 1.7;
}
.app.dark .shop-foot { color: rgba(251,246,238,0.5); }
.shop-foot .lbl { letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.75; }

/* purchase confirm overlay */
.confirm {
  position: absolute; inset: 0;
  background: rgba(14,13,16,0.62);
  backdrop-filter: blur(8px) saturate(140%);
  display: grid; place-items: center;
  padding: 24px;
  z-index: 50;
  animation: fade-in 240ms var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Album cover lightbox — clicking the small sleeve enlarges it. */
.cover-lightbox {
  position: relative;
  width: min(92vw, 92vh, 520px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--primary);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  animation: card-in 360ms var(--ease);
}
.app.dark .cover-lightbox { border-color: var(--rose-soft); }
.cover-lightbox .cover-lightbox-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cover-lightbox-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%);
  color: var(--bone);
  text-align: left;
}
.cover-lightbox-caption .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251,246,238,0.7);
}
.cover-lightbox-caption .ttl {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 4vh, 28px);
  letter-spacing: -0.01em;
  margin-top: 4px;
  color: var(--bone);
}
.cover-lightbox-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(14,13,16,0.55);
  color: var(--bone);
  border: 1px solid rgba(251,246,238,0.22);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 14px;
  font-family: var(--font-body);
  padding: 0;
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}
.cover-lightbox-close:hover { background: rgba(14,13,16,0.78); }
.cover-lightbox-close:active { transform: scale(0.92); }

.confirm-card {
  width: 100%;
  max-width: 360px;
  background: var(--bone);
  color: var(--ink);
  border-radius: 16px;
  padding: 28px 24px 22px;
  text-align: center;
  border: 1.5px solid var(--border);
  position: relative;
  animation: card-in 360ms var(--ease);
}
.app.dark .confirm-card {
  background: #1F1E22;
  color: var(--bone);
  border-color: rgba(251,246,238,0.14);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.app.dark .confirm-card .h-display em { color: var(--rose-soft); }
.app.dark .confirm-card .body-lead,
.app.dark .confirm-card .caption,
.app.dark .confirm-card .eyebrow { color: rgba(251,246,238,0.72); }
@keyframes card-in {
  from { transform: translateY(16px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.confirm-card .stamp-big {
  width: 100px; height: 100px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 44px;
  background: var(--rose-tint);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  position: relative;
}
.app.dark .confirm-card .stamp-big {
  background: rgba(31,111,115,0.2);
  color: var(--rose-soft);
  border-color: var(--rose-soft);
}
.confirm-card .stamp-big::before {
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  border: 1px dashed currentColor; opacity: 0.4;
}

/* ── Buy confirmation cost block ── */
.buy-confirm-cost {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--rose-tint);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.app.dark .buy-confirm-cost {
  background: rgba(31,111,115,0.16);
  border-color: rgba(251,246,238,0.14);
}
.buy-confirm-cost .bcc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
}
.buy-confirm-cost .bcc-lbl {
  font-family: var(--font-mono);
  font-size: var(--t-caption);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.buy-confirm-cost .bcc-val {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--primary);
  font-feature-settings: "tnum";
}
.app.dark .buy-confirm-cost .bcc-val { color: var(--rose-soft); }

/* ───────────────────────────── Big confetti / award ───────────────────────────── */

.note-fly {
  position: fixed;
  font-family: var(--font-display); font-style: italic;
  font-size: 22px; color: var(--primary);
  pointer-events: none;
  z-index: 100;
  animation: note-fly 1100ms var(--ease) forwards;
}
@keyframes note-fly {
  0%   { opacity: 0; transform: translate(0,0) scale(0.6); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx,40px), var(--dy,-160px)) scale(1.2); }
}

/* ───────────────────────────── End-of-side card ───────────────────────────── */

.endside-card {
  margin-top: 18px;
  padding: 24px;
  border-radius: var(--r-sleeve);
  background: var(--paper);
  border: 1.5px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow-sleeve);
}
.app.dark .endside-card {
  background: rgba(251,246,238,0.04);
  border-color: rgba(251,246,238,0.14);
}
.endside-card .ribbon {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.app.dark .endside-card .ribbon { color: var(--rose-soft); }
.endside-card h3 {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 28px; line-height: 1.15;
  margin: 0 0 8px;
}
.endside-card p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.app.dark .endside-card h3 { color: var(--bone); }
.app.dark .endside-card p { color: rgba(251,246,238,0.7); }
.endside-card .actions {
  display: flex; gap: 10px; justify-content: center; margin-top: 16px;
  flex-wrap: wrap;
}

/* ───────────────────────────── Tactile Now-Playing stage ───────────────────────────── */

.tactile-stage {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden !important;
  overscroll-behavior: contain;
}

.stage-area {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 20px);
  padding: clamp(6px, 1.5vh, 12px) 8px;
  min-height: clamp(160px, 30vh, 240px);
}

/* Sleeve sitting on the stage */
.sleeve-on-stage {
  position: relative;
  flex: 0 0 auto;
  width: clamp(78px, 16vh, 110px);
  height: clamp(106px, 22vh, 150px);
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sleeve);
  padding: clamp(6px, 1vh, 10px);
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1vh, 8px);
  transform: rotate(-4deg) translateX(-6px);
}
.app.dark .sleeve-on-stage {
  background: rgba(251,246,238,0.08);
  border-color: rgba(251,246,238,0.18);
}
.sleeve-on-stage .sleeve-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
.sleeve-on-stage .sleeve-art {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: grid; place-items: center;
  position: relative;
  z-index: 3;             /* covers the vinyl sibling behind */
  overflow: hidden;
}
.sleeve-on-stage .sleeve-art image-slot,
.sleeve-on-stage .sleeve-art .sleeve-art-img {
  position: absolute; inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sleeve-on-stage .sleeve-art.clickable {
  cursor: zoom-in;
  transition: transform 200ms var(--ease);
}
.sleeve-on-stage .sleeve-art.clickable:hover { transform: scale(1.03); }
.sleeve-on-stage .sleeve-art.clickable:active { transform: scale(0.98); }
.sleeve-on-stage .sleeve-art.clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.sleeve.locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.sleeve.locked .art { filter: grayscale(0.6) brightness(0.85); }
.sleeve .lock-badge {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-size: 22px;
  background: rgba(0,0,0,0.35);
  color: var(--bone);
  border-radius: inherit;
}
.sleeve .lock-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}
.app.dark .sleeve .lock-hint { color: rgba(251,246,238,0.55); }
.sleeve .art .art-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.sleeve-on-stage .sleeve-art .ring {
  width: 60%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid currentColor;
  display: grid; place-items: center;
}
.sleeve-on-stage .sleeve-art .dot {
  width: 30%; aspect-ratio: 1; border-radius: 50%; background: currentColor;
}
.sleeve-on-stage .sleeve-spine {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.3;
}
.app.dark .sleeve-on-stage .sleeve-spine { color: rgba(251,246,238,0.6); }
.sleeve-on-stage .spine-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Vinyl peeking out of sleeve — in-sleeve uses the existing top-right poke; floating uses absolute coords on the stage */
.sleeve-on-stage { position: relative; z-index: 1; }
.sleeve-on-stage .sleeve-art { position: relative; z-index: 3; }
.sleeve-on-stage .sleeve-spine { position: relative; z-index: 3; }
.vinyl-grab {
  width: 86px; height: 86px;
  cursor: grab;
  z-index: 5;
  touch-action: none;
}
.vinyl-grab.in-sleeve {
  position: absolute;
  /* Sibling of sleeve-art, sits BEHIND it; only the right ~30% peeks past the cover */
  width: 88%; height: 88%;
  top: 6%; right: -36%;
  z-index: 1;            /* behind sleeve-art (z:3) */
  transform: rotate(0deg);
  transition: right 260ms var(--ease), transform 240ms var(--ease);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
}
.vinyl-grab.in-sleeve:hover {
  right: -44%;
  transform: rotate(-2deg);
}
/* "Ready" pulse for the peeking vinyl. Animates the inner .mini-vinyl so the
   transform stays out of the wrapper (which owns the hover position/rotation).
   The visible peek nudges further out and back — the parts behind the sleeve
   stay covered by sleeve-art (z:3), so only the peeking sliver appears to move,
   reinforcing the illusion that the record is tucked inside. */
.vinyl-grab.in-sleeve.ready .mini-vinyl {
  animation: vinyl-peek-pulse 1.8s ease-in-out infinite;
}
.vinyl-grab.in-sleeve.ready:hover .mini-vinyl { animation: none; }
@keyframes vinyl-peek-pulse {
  0%, 100% { transform: translateX(0)   scale(1);    }
  50%      { transform: translateX(7px) scale(1.02); }
}
.vinyl-grab.floating {
  position: absolute;
  width: 96px; height: 96px;
  transform: translate(-50%, -50%) rotate(8deg);
  cursor: grabbing;
  z-index: 30;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,0.35));
}
.vinyl-grab .mini-vinyl {
  width: 100%; height: 100%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, rgba(251,246,238,0.05) 0 1px, transparent 1px 3px),
    radial-gradient(circle, var(--vinyl-sheen) 0%, var(--vinyl) 100%);
  box-shadow: var(--shadow-vinyl);
  display: grid; place-items: center;
  position: relative;
}
.vinyl-grab .mv-label {
  width: 38%; aspect-ratio: 1; border-radius: 50%;
  background: var(--primary);
  position: relative;
  display: grid; place-items: center;
}
.vinyl-grab .mv-label::after {
  content: ""; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--bone);
}

/* Empty platter when vinyl is still in the sleeve (sits beneath any loaded disc) */
.platter-empty {
  position: absolute; inset: 8%; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(251,246,238,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}
.disc { z-index: 2; }
.platter-empty .spindle {
  position: absolute; top: 50%; left: 50%;
  width: 4%; aspect-ratio: 1; border-radius: 50%;
  background: #555; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(251,246,238,0.04);
}
.platter-empty .drop-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(251,246,238,0.4);
  text-align: center;
  position: absolute; bottom: 22%;
  line-height: 1.5;
}
.platter-empty .drop-hint em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(251,246,238,0.7);
  display: block;
}

/* Tonearm — only the head (needle) is draggable */
.tonearm { z-index: 5; }
.tonearm.dragging { z-index: 6; }
.tonearm .arm { pointer-events: none; }

/* Audio progress wrap — elapsed time | bar | remaining time */
.audio-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(320px, 80vw, 65vh);
  margin-top: 4px;
}
.audio-progress-wrap .ap-time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  flex-shrink: 0;
}
.audio-progress-wrap .ap-elapsed   { text-align: right; }
.audio-progress-wrap .ap-remaining { text-align: left;  }
.audio-progress-wrap.is-empty .ap-time { opacity: 0.5; }

/* Audio progress bar — seekable scrubber */
.audio-progress {
  position: relative;
  flex: 1;
  min-width: 0;
  height: clamp(18px, 3vh, 24px); /* generous hit target */
  margin-top: 4px;
  cursor: pointer;
  touch-action: none;
  display: flex;
  align-items: center;
}
.audio-progress::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}
.app.dark .audio-progress::before { background: rgba(251,246,238,0.12); }
.audio-progress-wrap.is-empty .audio-progress { cursor: default; }
.audio-progress-wrap.is-empty .audio-progress::before { opacity: 0.6; }
.audio-progress .ap-fill {
  position: absolute;
  left: 0;
  height: 3px;
  background: var(--rose-soft);
  border-radius: 2px;
  transition: width 120ms linear;
  pointer-events: none;
}
.audio-progress .ap-thumb {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--rose-soft);
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
  transition: left 120ms linear, transform 150ms ease;
  pointer-events: none;
}
.audio-progress:active .ap-thumb {
  transform: translateX(-50%) scale(1.25);
}

.tt-status {
  /* color inherits from .caption — flips with dark mode */
  text-align: center;
  min-height: 1.5em;
}
.tt-status.pulse {
  animation: tt-status-pulse 1.6s ease-in-out infinite;
  color: var(--primary);
}
.app.dark .tt-status.pulse { color: var(--rose-soft); }
@keyframes tt-status-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1);    }
  50%      { opacity: 1;    transform: scale(1.04); }
}

.tonearm-row {
  position: relative;
  height: 4px;
  background: var(--border);
  margin: 0 24px 4px;
  border-radius: 2px;
}
.tonearm-row .head {
  position: absolute;
  top: -3px; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(0);
  transition: transform 600ms var(--ease);
}

/* ───────────────────────────── Utility ───────────────────────────── */

.spacer-1 { height: 8px; }
.spacer-2 { height: 16px; }
.spacer-3 { height: 24px; }
.spacer-4 { height: 32px; }

.dim { opacity: 0.5; }
