:root {
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --site-bg-rgb: 16 16 16;
  --site-bg-soft-rgb: 24 24 24;
  --panel-rgb: 15 15 15;
  --accent-rgb: 215 199 165;
  --bg: rgb(var(--site-bg-rgb));
  --bg-soft: rgb(var(--site-bg-soft-rgb));
  --ink: #f1eee8;
  --muted: #aaa49a;
  --faint: #77716a;
  --line: rgba(255, 255, 255, 0.09);
  --panel: rgb(var(--panel-rgb) / 0.94);
  --accent: rgb(var(--accent-rgb));
  --on-accent: #111111;
  --live: #7ed9a6;
  --shadow: rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: rgb(var(--site-bg-rgb));
  overflow-x: hidden;
  transition:
    background-color 900ms ease,
    color 900ms ease;
}

.shell {
  width: min(640px, 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(0.72rem, 2vw, 1.05rem);
  margin: 0 auto;
  padding: clamp(2rem, 7vh, 4rem) clamp(1.25rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem);
}

.label,
.status,
.track,
.about p,
.how-it-works p {
  letter-spacing: 0;
}

.topline {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.about {
  width: min(520px, 100%);
  margin: 0;
  color: var(--muted);
  display: grid;
  gap: 0.72rem;
  font-size: clamp(0.98rem, 1.8vw, 1.08rem);
  font-weight: 400;
  line-height: 1.62;
}

.about p {
  margin: 0;
}

.about p:not(.topline) {
  max-width: 42rem;
}

.player + .about {
  margin-top: 1rem;
}

.player {
  --record-size: clamp(144px, 39vw, 176px);
  position: relative;
  width: min(520px, 100%);
  margin: clamp(5.2rem, 16vw, 6.1rem) 0 0;
  padding: clamp(6rem, 20.5vw, 6.85rem) 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  transition:
    background-color 900ms ease,
    border-color 900ms ease,
    box-shadow 900ms ease;
}

.player-copy {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 0.74rem;
  width: 100%;
  min-width: 0;
  text-align: center;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8.4vw, 3.35rem);
  font-weight: 700;
  line-height: 0.92;
}

.now-playing {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 0.82rem;
  width: 100%;
  min-height: 74px;
  padding: 0.66rem 0.78rem;
  border: 1px solid rgb(var(--accent-rgb) / 0.14);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.055);
  text-align: left;
  transition:
    background-color 900ms ease,
    border-color 900ms ease;
}

.now-playing::after {
  display: none;
}

.now-playing-copy {
  min-width: 0;
}

.now-playing-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  min-height: 1.1rem;
}

.pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(126, 217, 166, 0.42);
  animation: pulse 1.9s infinite;
}

.label,
.track,
.status {
  margin: 0;
}

.label {
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.track {
  margin-top: 0.24rem;
  color: var(--ink);
  font-size: clamp(1rem, 2.9vw, 1.16rem);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.play-button {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 900ms ease,
    color 900ms ease;
}

.now-playing-button {
  align-self: center;
}

.play-button:hover {
  transform: translateY(-1px);
  border-color: rgb(var(--accent-rgb) / 0.5);
}

.play-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.button-icon {
  position: relative;
  width: 18px;
  height: 22px;
  display: block;
}

.button-icon::before {
  content: "";
  position: absolute;
  inset: 2px auto auto 4px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 13px solid currentColor;
}

.play-button[data-state="playing"] .button-icon::before,
.play-button[data-state="playing"] .button-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 5px;
  height: 18px;
  border: 0;
  border-radius: 1px;
  background: currentColor;
}

.play-button[data-state="playing"] .button-icon::before {
  left: 3px;
}

.play-button[data-state="playing"] .button-icon::after {
  right: 3px;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.2;
  min-height: 1.1rem;
  overflow-wrap: anywhere;
}

.vinyl-deck {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: var(--record-size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -51%);
}

.vinyl-deck::before {
  content: "";
  position: absolute;
  bottom: -8%;
  width: 82%;
  height: 34%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(14px);
}

.vinyl-record {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #0b0b0b;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 8%, rgba(255, 255, 255, 0.05) 8.5% 9%, transparent 9.5%),
    repeating-radial-gradient(circle, #0f0f0f 0 3px, #1b1b1b 4px 6px, #090909 7px 10px);
  box-shadow:
    0 0 0 4px rgb(var(--accent-rgb) / 0.035),
    0 0 20px rgba(0, 0, 0, 0.28),
    0 22px 38px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: recordSpin 18s linear infinite;
  animation-play-state: paused;
}

.vinyl-record::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 50%;
  pointer-events: none;
  background:
    linear-gradient(-45deg, transparent 32%, rgba(255, 255, 255, 0.09), transparent 66%),
    radial-gradient(circle at 80% 84%, rgba(0, 0, 0, 0.42), transparent 34%);
  opacity: 0.58;
}

.vinyl-record.is-playing {
  animation-duration: 8s;
  animation-play-state: running;
}

.record-label-art {
  position: absolute;
  inset: 29%;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(241, 238, 232, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(rgba(16, 16, 16, 0.08), rgba(16, 16, 16, 0.08)),
    radial-gradient(circle at 32% 28%, rgba(241, 238, 232, 0.3), transparent 28%),
    linear-gradient(145deg, #27241f, #141414);
  background-position: center;
  background-size: cover;
  color: rgba(241, 238, 232, 0.72);
  font-size: clamp(0.82rem, 2.6vw, 1rem);
  font-weight: 700;
  transition:
    filter 220ms ease,
    opacity 220ms ease;
}

.record-label-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 0 12%, rgba(0, 0, 0, 0.1) 13%, transparent 20%);
}

.record-label-art span {
  position: relative;
  z-index: 1;
}

.vinyl-record.has-cover .record-label-art span {
  opacity: 0;
}

.vinyl-record.is-loading .record-label-art {
  filter: saturate(0.6) brightness(0.85);
  opacity: 0.76;
}

.record-hole {
  position: absolute;
  z-index: 5;
  width: 12px;
  height: 12px;
  inset: 50% auto auto 50%;
  border-radius: 50%;
  background: #101010;
  box-shadow:
    0 0 0 2px rgba(241, 238, 232, 0.12),
    inset 0 0 5px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%);
}

.tonearm {
  --arm-angle: 0deg;
  position: absolute;
  z-index: 5;
  width: 12px;
  height: 78px;
  top: 6%;
  right: -15%;
  background: transparent;
  box-shadow: none;
  transform: rotate(var(--arm-angle));
  transform-origin: 50% 8px;
  transition:
    transform 760ms cubic-bezier(0.24, 0.74, 0.26, 1),
    filter 240ms ease;
  will-change: transform;
}

.vinyl-deck.is-cueing .tonearm,
.vinyl-deck.is-playing .tonearm {
  --arm-angle: 38deg;
}

.tonearm::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 16px;
  height: 16px;
  background: rgb(var(--accent-rgb) / 0.42);
  transform: translateX(-50%);
}

.tonearm::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 3px;
  height: 64px;
  background: rgb(var(--accent-rgb) / 0.82);
  transform: translateX(-50%);
}

.stylus {
  position: absolute;
  left: 50%;
  top: 68px;
  width: 6px;
  height: 12px;
  background: var(--accent);
  box-shadow:
    0 0 0 0 rgb(var(--accent-rgb) / 0),
    0 6px 10px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  transition:
    background-color 900ms ease,
    box-shadow 240ms ease;
}

.stylus::before {
  display: none;
}

.stylus::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 2px;
  height: 8px;
  background: var(--ink);
  transform: translateX(-50%);
}

.vinyl-deck.is-cueing .stylus,
.vinyl-deck.is-playing .stylus {
  box-shadow:
    0 0 0 3px rgb(var(--accent-rgb) / 0.12),
    0 0 18px rgb(var(--accent-rgb) / 0.26),
    0 8px 12px rgba(0, 0, 0, 0.28);
}

.how-it-works {
  width: min(520px, 100%);
  margin: 0;
  border-top: 0;
  padding-top: 0.4rem;
}

.how-it-works summary {
  width: fit-content;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  list-style: none;
}

.how-it-works summary::-webkit-details-marker {
  display: none;
}

.how-it-works summary::after {
  content: "+";
  display: inline-block;
  margin-left: 0.55rem;
  color: var(--accent);
}

.how-it-works[open] summary::after {
  content: "-";
}

.how-it-works p {
  margin: 0.72rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.68;
}

.text-link {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-color: rgb(255 255 255 / 0.28);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease;
}

.text-link:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.text-link:focus-visible {
  outline: 1px solid rgb(var(--accent-rgb) / 0.45);
  outline-offset: 3px;
}

.site-note {
  width: min(520px, 100%);
  margin: 1.2rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-note p {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
  line-height: 1.6;
}

.site-credit {
  width: fit-content;
  margin-top: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.site-credit:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.site-credit:focus-visible {
  outline: 1px solid rgb(var(--accent-rgb) / 0.45);
  outline-offset: 4px;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(126, 217, 166, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 217, 166, 0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .pulse,
  .vinyl-record {
    animation: none;
  }
}

@media (max-width: 620px) {
  .shell {
    justify-content: flex-start;
    gap: 0.82rem;
    padding: 1.2rem 1rem 1.6rem;
  }

  .topline,
  .about,
  .player {
    width: 100%;
  }

  .topline {
    font-size: 0.66rem;
  }

  .about {
    gap: 0.58rem;
    font-size: 0.94rem;
    line-height: 1.58;
  }

  .player {
    --record-size: clamp(128px, 41vw, 154px);
    margin-top: 4.7rem;
    padding-top: 5.45rem;
    width: 100%;
  }

  .player-copy {
    gap: 0.72rem;
  }

  .now-playing {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.66rem;
    min-height: 66px;
    padding: 0.58rem 0.64rem;
  }

  .now-playing-button {
    width: 42px;
    height: 42px;
  }

  .button-icon {
    transform: scale(0.9);
  }

  .label {
    font-size: 0.6rem;
  }

  .track {
    font-size: 0.98rem;
    line-height: 1.32;
  }

  .status {
    font-size: 0.86rem;
  }

  .how-it-works summary {
    font-size: 0.84rem;
  }

  .how-it-works p {
    font-size: 0.86rem;
    line-height: 1.58;
  }

  .site-note p,
  .site-credit {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .shell {
    padding-inline: 0.86rem;
  }

  .about {
    font-size: 0.9rem;
  }

  .player {
    --record-size: 122px;
    margin-top: 4.25rem;
    padding-top: 5rem;
  }

  .now-playing {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .now-playing-button {
    width: 40px;
    height: 40px;
  }

  .track {
    font-size: 0.94rem;
  }
}
