:root {
  color-scheme: dark;
  --background: #0b0b0c;
  --border: #2a2a2e;
  --text: #f3f3f4;
  --muted: #97979f;
  --accent: #e5484d;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, #242226 0, transparent 38rem),
    var(--background);
  color: var(--text);
  font-family:
    Chillax, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
audio {
  font: inherit;
}

.shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 5rem 0;
}

.page-header {
  margin-bottom: 3rem;
}

.label {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.heading-artist,
.heading-title {
  display: block;
}

.heading-artist {
  font-size: clamp(2.5rem, 7vw, 3.625rem);
  font-weight: 200;
}

.heading-title {
  margin-top: 0.18em;
  font-size: clamp(2.75rem, 7.5vw, 3.875rem);
  font-weight: 500;
}

#now-playing-artist,
.status {
  color: var(--muted);
}

#now-playing-artist:empty,
.status:empty {
  display: none;
}

.player-panel {
  padding: 1.75rem 0 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.now-playing {
  min-height: 4.5rem;
}

.now-playing h2 {
  margin-bottom: 0.3rem;
  font-size: 1.35rem;
}

#player {
  display: block;
  width: 100%;
  margin-top: 1rem;
}

.status {
  margin: 0.8rem 0 0;
  font-size: 0.85rem;
}

.track-section {
  margin-top: 0;
}

.track-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.track {
  border-bottom: 1px solid var(--border);
}

.track:last-child {
  border-bottom: 0;
}

.track-button {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 1.1rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.track-button:hover,
.track-button[aria-current="true"] {
  color: var(--accent);
}

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

.track-number,
.track-duration {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.track-button[aria-current="true"] .track-number {
  color: var(--accent);
}

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

.track-duration {
  font-size: 0.82rem;
}

.empty-message {
  margin: 0;
  padding: 2rem 0;
  color: var(--muted);
}

@media (max-width: 520px) {
  .shell {
    padding: 3rem 0;
  }

  .track-button {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
  }
}
