/* ---------- Tokens ---------- */

:root {
  --bg: #0a0b0d;
  --surface: #121418;
  --surface-2: #1a1d22;
  --surface-3: #252930;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f7fa;
  --muted: #a3abb6;
  --faint: #6f7782;
  --green: #1ed760;
  --green-hover: #3be477;
  --green-ink: #04220f;
  --green-soft: rgba(30, 215, 96, 0.14);
  --amber: #ffc857;
  --amber-soft: rgba(255, 200, 87, 0.14);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

svg {
  flex-shrink: 0;
}

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

::selection {
  background: var(--green);
  color: var(--green-ink);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 5% -10%, rgba(30, 215, 96, 0.16), transparent 65%),
    radial-gradient(50vw 50vh at 100% 0%, rgba(124, 92, 255, 0.13), transparent 65%),
    radial-gradient(80vw 50vh at 50% 115%, rgba(30, 215, 96, 0.07), transparent 65%);
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.noscript {
  padding: 2rem;
  text-align: center;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  color: var(--muted);
  margin-top: 0.5rem;
  max-width: 52ch;
}

.fineprint {
  color: var(--faint);
  font-size: 0.85rem;
  max-width: 46ch;
  margin-inline: auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  transition:
    transform 0.15s var(--ease),
    background-color 0.15s,
    box-shadow 0.15s,
    opacity 0.15s;
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--green);
  color: var(--green-ink);
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-hover);
}

.btn-ghost {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-ghost:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--text);
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.15s var(--ease),
    background-color 0.15s;
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.btn-icon:hover {
  background: #313640;
}

.btn-icon:active {
  transform: scale(0.94);
}

.btn-icon-lg {
  width: 60px;
  height: 60px;
  background: var(--text);
  color: #000;
}

.btn-icon-lg svg {
  width: 26px;
  height: 26px;
}

.btn-icon-lg:hover {
  background: #fff;
  transform: scale(1.04);
}

.chip {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.notice {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: var(--red-soft);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffd6d6;
  font-size: 0.95rem;
  text-align: left;
}

.notice-block {
  display: grid;
  gap: 1rem;
  justify-items: start;
  max-width: 640px;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(10, 11, 13, 0.72);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 30px;
  height: 30px;
}

.account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  font-weight: 800;
  font-size: 0.9rem;
}

.user-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Vinyl record ---------- */

.record {
  position: relative;
  aspect-ratio: 1;
}

.record-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(255, 255, 255, 0.07) 31.5%, transparent 32.5%),
    radial-gradient(circle, transparent 0 66%, rgba(255, 255, 255, 0.05) 66.5%, transparent 67.5%),
    repeating-radial-gradient(circle, #111 0 1.5px, #1a1a1a 2px 3.5px);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: spin 2.4s linear infinite paused;
}

.record.is-spinning .record-disc,
.stage.is-playing .record-disc {
  animation-play-state: running;
}

.record-label {
  position: absolute;
  inset: 32%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5af192, var(--green) 45%, #12a64b);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
}

.record-mystery {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  color: var(--green-ink);
}

.record-label img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s;
}

.record-hero .record-label::after,
.stage.is-revealed .record-label::after {
  content: "";
  position: absolute;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg);
}

.record-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(
    from 200deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.09) 25deg,
    transparent 50deg 180deg,
    rgba(255, 255, 255, 0.06) 205deg,
    transparent 230deg
  );
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Login ---------- */

.hero {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
}

.hero-inner {
  display: grid;
  justify-items: center;
  gap: 1.75rem;
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.record-hero {
  width: 176px;
}

.record-hero .record-disc {
  animation-duration: 6s;
}

.hero-title {
  font-size: clamp(2.75rem, 9vw, 4.75rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero-title span {
  color: var(--green);
}

.hero-sub {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 34ch;
  margin-inline: auto;
}

.hero-actions {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 360px);
}

.hero-actions .btn {
  white-space: normal;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  color: var(--muted);
  font-size: 0.95rem;
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

/* ---------- Playlist picker ---------- */

.home {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

.home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 1.75rem;
}

.home-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.home-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.rounds {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}

.segmented button {
  min-width: 2.75rem;
  padding: 0.4rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-checked="true"] {
  background: var(--text);
  color: #000;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--muted);
}

.search:focus-within {
  border-color: var(--line-strong);
}

.search svg {
  width: 18px;
  height: 18px;
}

.search input {
  width: 13rem;
  padding: 0.6rem 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.75rem 0.75rem 0.9rem;
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.2s var(--ease);
}

.card:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 1;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.card-art img,
.art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art {
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--muted);
}

.art svg {
  width: 56px;
  height: 56px;
}

.art-liked {
  background: linear-gradient(135deg, #4a17f5, #8a7cf0 55%, #c4efd9);
  color: #fff;
}

.art-chart {
  background:
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.25), transparent 45%),
    linear-gradient(140deg, #1ed760, #0c7a3b);
  color: var(--green-ink);
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.art-chart small {
  font-size: 0.36em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card-play {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green);
  color: var(--green-ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s,
    transform 0.2s var(--ease);
}

.card-play svg {
  width: 22px;
  height: 22px;
}

.card:hover .card-play,
.card:focus-visible .card-play,
.card.is-loading .card-play {
  opacity: 1;
  transform: none;
}

.card.is-loading .card-play svg {
  display: none;
}

.card.is-loading .card-play::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 3px solid rgba(4, 34, 15, 0.25);
  border-top-color: var(--green-ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.grid[aria-busy="true"] .card:not(.is-loading) {
  opacity: 0.55;
  pointer-events: none;
}

.card-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.75rem;
  font-weight: 700;
}

.card-title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card.is-skeleton {
  cursor: default;
}

.card.is-skeleton:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.025);
}

.card.is-skeleton .card-art,
.card.is-skeleton .card-title,
.card.is-skeleton .card-meta {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  box-shadow: none;
}

.card.is-skeleton .card-title {
  height: 1rem;
  width: 75%;
  border-radius: 6px;
}

.card.is-skeleton .card-meta {
  height: 0.8rem;
  width: 45%;
  border-radius: 6px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
}

.locked {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

.locked summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.locked summary::-webkit-details-marker {
  display: none;
}

.locked-why {
  color: var(--green);
}

.locked[open] .locked-why {
  color: var(--muted);
}

.locked p {
  margin-top: 0.75rem;
  max-width: 70ch;
}

.locked-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.locked-list li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.85rem;
}

.locked-name {
  color: var(--text);
}

.locked-owner {
  margin-left: 0.4rem;
  color: var(--faint);
}

/* ---------- Game ---------- */

.game-heading {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.game-heading strong {
  display: block;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scoreboard {
  display: flex;
  gap: 0.5rem;
}

.stat {
  display: grid;
  justify-items: center;
  min-width: 4.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  background: var(--surface-2);
  line-height: 1.15;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-value.is-bumped {
  animation: bump 0.6s var(--ease);
}

@keyframes bump {
  30% {
    transform: scale(1.4);
    color: var(--green);
  }
}

.game {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 3rem;
  align-items: start;
}

@media (min-width: 880px) {
  .game {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.75rem;
    padding-top: 2.5rem;
  }
}

.panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: rgba(18, 20, 24, 0.78);
  border: 1px solid var(--line);
}

.stage {
  position: relative;
  overflow: hidden;
}

.streak {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 800;
  animation: rise 0.4s var(--ease);
}

.turntable {
  position: relative;
  width: min(62%, 280px);
  aspect-ratio: 1;
  margin: 0.75rem auto 1.75rem;
}

.turntable .record {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: transform 0.8s var(--ease);
}

.sleeve {
  position: absolute;
  inset: 2%;
  z-index: 2;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.9);
  transition:
    transform 0.8s var(--ease),
    opacity 0.4s;
}

.sleeve img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage.is-revealed .sleeve {
  opacity: 1;
  transform: translateX(-26%) scale(0.94);
}

.stage.is-revealed .turntable .record {
  transform: translateX(26%) scale(0.94);
}

.stage.is-revealed .record-mystery {
  opacity: 0;
}

.stage.is-revealed .record-label img[src] {
  opacity: 1;
}

.stage.is-loading .turntable {
  opacity: 0.55;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 1.5rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.eq i {
  width: 3px;
  height: 25%;
  border-radius: 2px;
  background: var(--green);
  animation: eq 0.9s ease-in-out infinite paused;
}

.eq i:nth-child(2) {
  animation-delay: -0.3s;
}

.eq i:nth-child(3) {
  animation-delay: -0.6s;
}

.eq i:nth-child(4) {
  animation-delay: -0.15s;
}

.eq i:nth-child(5) {
  animation-delay: -0.45s;
}

.stage.is-playing .eq i {
  animation-play-state: running;
}

.stage.is-loading .eq {
  display: none;
}

@keyframes eq {
  0%,
  100% {
    height: 25%;
  }
  50% {
    height: 100%;
  }
}

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.25s linear;
}

.times {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.icon-pause,
.stage.is-playing .icon-play {
  display: none;
}

.stage.is-playing .icon-pause {
  display: block;
}

.stage.is-loading .controls button {
  opacity: 0.4;
  pointer-events: none;
}

.volume {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.volume svg {
  width: 20px;
  height: 20px;
}

.volume input {
  width: 88px;
  accent-color: var(--green);
}

.side {
  display: grid;
}

.panel-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.guess {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 1.1rem;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.guess-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.guess-actions .btn-primary {
  flex: 1;
}

.hint {
  color: var(--faint);
  font-size: 0.85rem;
}

.reveal {
  display: grid;
  gap: 1.1rem;
  animation: rise 0.45s var(--ease);
}

.verdict {
  justify-self: start;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.verdict.is-perfect {
  background: var(--green-soft);
  color: var(--green);
}

.verdict.is-partial {
  background: var(--amber-soft);
  color: var(--amber);
}

.verdict.is-miss {
  background: var(--red-soft);
  color: var(--red);
}

.answer-title {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.answer-artist {
  margin-top: 0.3rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.answer-album {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.checks {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--surface-2);
}

.check-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.check-icon svg {
  width: 16px;
  height: 16px;
}

.check.is-right .check-icon {
  background: var(--green);
  color: var(--green-ink);
}

.check.is-wrong .check-icon {
  background: var(--red-soft);
  color: var(--red);
}

.check-text {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.check-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.check-guess {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-guess.is-empty {
  color: var(--faint);
  font-style: italic;
}

.check-points {
  font-weight: 800;
  color: var(--faint);
}

.check.is-right .check-points {
  color: var(--green);
}

.reveal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.reveal-actions .btn-primary {
  flex: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Results ---------- */

.results {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 4vw, 2.5rem) 4rem;
  text-align: center;
}

.results-score {
  margin-top: 0.75rem;
  font-size: clamp(4.5rem, 16vw, 7.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  animation: rise 0.6s var(--ease);
}

.results-score small {
  font-size: 0.32em;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.results-verdict {
  margin-top: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.results-best {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.results-best.is-new {
  background: var(--amber-soft);
  color: var(--amber);
}

.results-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.results-stats div {
  min-width: 8.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.results-stats dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.results-stats dd {
  margin-top: 0.15rem;
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
}

.recap-heading {
  margin: 2.75rem 0 1rem;
  text-align: left;
  font-size: 1.25rem;
  font-weight: 800;
}

.recap {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.recap-item {
  display: grid;
  grid-template-columns: 1.5rem 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.recap-index {
  text-align: right;
  color: var(--faint);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.recap-art {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-3);
}

.recap-text {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.recap-text > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recap-title {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.recap-title:hover {
  text-decoration: underline;
}

.recap-artist {
  color: var(--muted);
  font-size: 0.9rem;
}

.recap-guess {
  color: var(--faint);
  font-size: 0.8rem;
}

.recap-points {
  min-width: 2.6rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.points-0 {
  background: var(--red-soft);
  color: var(--red);
}

.points-1 {
  background: var(--amber-soft);
  color: var(--amber);
}

.points-2 {
  background: var(--green-soft);
  color: var(--green);
}

/* ---------- Toasts ---------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 100;
  display: grid;
  gap: 0.5rem;
  width: min(calc(100vw - 2rem), 440px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-weight: 500;
  animation: rise 0.3s var(--ease);
  transition:
    opacity 0.35s,
    transform 0.35s;
}

.toast-error {
  border-color: rgba(255, 107, 107, 0.5);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .topbar {
    min-height: 60px;
    gap: 0.6rem;
  }

  .game-heading .eyebrow,
  .quit-text,
  .user-name {
    display: none;
  }

  .stat {
    min-width: 0;
    padding: 0.25rem 0.6rem;
  }

  .home-controls,
  .search,
  .search input {
    width: 100%;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .card {
    padding: 0.5rem 0.5rem 0.7rem;
  }

  .card-play {
    opacity: 1;
    transform: none;
    width: 40px;
    height: 40px;
  }

  /* A smaller record keeps the guess fields on the first screen. */
  .turntable {
    width: min(50%, 200px);
    margin: 0.25rem auto 1.25rem;
  }

  .game {
    padding-top: 1rem;
  }

  .recap-item {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .recap-index {
    display: none;
  }

  .recap-art {
    width: 44px;
    height: 44px;
  }
}

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