/* ---------- Tokens ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-wide: 1200px;

  --font-display: 'Gambetta', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;
}

/* ---------- Dark theme (default) ---------- */
/* record store at night: deep indigo-black background, warm ochre + rust flashes
   from the walls of covers, glass-blue midtones */
:root,
[data-theme='dark'] {
  color-scheme: dark;

  --color-bg: #0f0d14;
  --color-bg-deep: #08060c;
  --color-surface: #1a1723;
  --color-surface-2: #211c2c;
  --color-surface-offset: #2a2436;
  --color-surface-dynamic: #383043;
  --color-border: oklch(from #e8e0d0 l c h / 0.14);
  --color-divider: oklch(from #e8e0d0 l c h / 0.08);

  --color-text: #ece3d0;
  --color-text-muted: #a89f8c;
  --color-text-faint: #6c6478;

  /* atmospheric wash colors used by the background gradients */
  --tone-rust: #b3402a;
  --tone-ochre: #c88a2f;
  --tone-lapis: #2c4a78;
  --tone-plum: #4a1f3a;
  --tone-cream: #e8dcc0;

  --accent-alt: #ed8267;
  --accent-classic: #e0ac4c;
  --accent-country: #7fa7cc;
  --accent-indie: #a9c78a;
  --accent-pop: #eb8ec0;

  --accent: var(--accent-alt);
  --accent-ink: #0f0d14;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4), 0 3px 10px oklch(0 0 0 / 0.32);
  --shadow-md: 0 2px 6px oklch(0 0 0 / 0.45), 0 14px 34px oklch(0 0 0 / 0.38);
  --shadow-lg: 0 30px 60px -20px oklch(0 0 0 / 0.7);
}

/* ---------- Light theme ---------- */
/* warm bin card cream, deeper for more presence */
[data-theme='light'] {
  color-scheme: light;

  --color-bg: #efe6d3;
  --color-bg-deep: #e3d7bd;
  --color-surface: #f8f1df;
  --color-surface-2: #fbf6e9;
  --color-surface-offset: #e6dcc4;
  --color-surface-dynamic: #d8ccb0;
  --color-border: oklch(from #241f16 l c h / 0.18);
  --color-divider: oklch(from #241f16 l c h / 0.1);

  --color-text: #221a12;
  --color-text-muted: #6d5f47;
  --color-text-faint: #a0906f;

  --tone-rust: #b3402a;
  --tone-ochre: #b2782a;
  --tone-lapis: #2c4a78;
  --tone-plum: #6b1f47;
  --tone-cream: #efe6d3;

  --accent-alt: #a83420;
  --accent-classic: #8a5c08;
  --accent-country: #27547a;
  --accent-indie: #445f2f;
  --accent-pop: #932258;

  --accent: var(--accent-alt);
  --accent-ink: #fdfaf1;

  --shadow-sm: 0 1px 2px oklch(0.25 0.02 80 / 0.08), 0 3px 10px oklch(0.25 0.02 80 / 0.06);
  --shadow-md: 0 2px 6px oklch(0.25 0.02 80 / 0.1), 0 12px 30px oklch(0.25 0.02 80 / 0.1);
  --shadow-lg: 0 30px 60px -20px oklch(0.2 0.02 80 / 0.28);
}

/* ---------- Global ---------- */
html, body {
  background: var(--color-bg-deep);
}

body {
  color: var(--color-text);
  background:
    /* soft warm ochre haze top-right */
    radial-gradient(60% 55% at 85% 0%, oklch(from var(--tone-ochre) l c h / 0.22), transparent 70%),
    /* rust haze top-left, echoes the red wall of covers */
    radial-gradient(70% 60% at 0% 8%, oklch(from var(--tone-rust) l c h / 0.18), transparent 70%),
    /* lapis wash mid-left */
    radial-gradient(60% 60% at 5% 55%, oklch(from var(--tone-lapis) l c h / 0.22), transparent 75%),
    /* plum wash bottom-right */
    radial-gradient(70% 55% at 100% 95%, oklch(from var(--tone-plum) l c h / 0.2), transparent 70%),
    /* faint grooved-vinyl rings across the whole page */
    repeating-radial-gradient(circle at 50% 30%, transparent 0 34px, oklch(from var(--tone-cream) l c h / 0.025) 34px 35px),
    var(--color-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.55;
}

/* subtle film grain over the whole thing to feel photographic rather than flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, header, footer { position: relative; z-index: 1; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -4rem;
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: oklch(from var(--color-bg-deep) l c h / 0.7);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--color-divider);
}
.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.brand-mark {
  color: var(--color-text);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 10px oklch(0 0 0 / 0.4));
}
.disc { animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: 0.01em;
}
.brand-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.week-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: oklch(from var(--color-surface) l c h / 0.6);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

/* ---------- Station rail ---------- */
.stations {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: clamp(var(--space-6), 4vw, var(--space-10)) var(--space-4) 0;
}
.station-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
}
.station-card {
  --sc: var(--accent-alt);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-4) var(--space-3);
  background:
    linear-gradient(180deg, oklch(from var(--sc) l c h / 0.06), oklch(from var(--sc) l c h / 0.0) 55%),
    var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: left;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}
.station-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--sc);
  opacity: 0.5;
  transition: opacity var(--transition-interactive);
}
.station-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: oklch(from var(--sc) l c h / 0.4);
}
.station-card[aria-selected='true'] {
  background:
    linear-gradient(180deg, oklch(from var(--sc) l c h / 0.16), oklch(from var(--sc) l c h / 0.02) 60%),
    var(--color-surface-2);
  border-color: oklch(from var(--sc) l c h / 0.6);
}
.station-card[aria-selected='true']::before { opacity: 1; }
.station-genre {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  line-height: 1.2;
  color: var(--color-text);
}
.station-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Week head ---------- */
.week {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: clamp(var(--space-8), 5vw, var(--space-12)) var(--space-4) var(--space-20);
}
.week-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.week-title h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.week-desc {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
  max-width: 44ch;
}
.week-desc-line {
  display: block;
}
.week-desc-format {
  white-space: nowrap;
}
.day-rail {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: oklch(from var(--color-surface-offset) l c h / 0.6);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-full);
  backdrop-filter: blur(6px);
}
.day-pill {
  padding: var(--space-2) var(--space-3);
  min-width: 2.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.day-pill:hover { color: var(--color-text); }
.day-pill[aria-selected='true'] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 14px oklch(from var(--accent) l c h / 0.35);
}

/* ---------- Playlist panel ---------- */
.playlist-panel {
  background:
    linear-gradient(180deg, oklch(from var(--accent) l c h / 0.08), transparent 30%),
    var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.playlist-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
}
.playlist-eyebrow {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.playlist-title h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  color: var(--color-text);
}
.playlist-stats {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: clamp(var(--space-3), 1.6vw, var(--space-5));
  flex-wrap: wrap;
}
.stat dt {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.stat dd {
  font-size: var(--text-lg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

/* ---------- Track list ---------- */
.track-list {
  border-top: 1px solid var(--color-divider);
}
.track-list li { max-width: none; }
.track {
  border-bottom: 1px solid var(--color-divider);
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}
.track:last-child { border-bottom: none; }
.track:nth-child(even) {
  background: oklch(from var(--color-surface-offset) l c h / 0.28);
}
.track-row {
  display: grid;
  grid-template-columns: 2rem 3rem minmax(0, 1.25fr) minmax(0, 0.75fr) 3.2rem 3.5rem 2.8rem 9rem 2.75rem;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-6);
  transition: background var(--transition-interactive);
}
.track:hover .track-row { background: oklch(from var(--accent) l c h / 0.06); }

/* ----- cover-as-play button (left, next to song) ----- */
.play-btn {
  position: relative;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-surface-offset);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.35), 0 6px 14px -8px oklch(0 0 0 / 0.55);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.play-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px oklch(0 0 0 / 0.4), 0 12px 22px -10px oklch(0 0 0 / 0.6); }
.play-btn:active { transform: translateY(0) scale(0.97); }
.play-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--color-surface-offset);
}
.art-fallback {
  display: grid;
  place-items: center;
  color: var(--color-text-faint);
}
.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: var(--radius-full);
  background: oklch(0 0 0 / 0.68);
  color: #fff;
  opacity: 0.92;
  box-shadow: 0 2px 8px oklch(0 0 0 / 0.45);
  transition:
    opacity var(--transition-interactive),
    transform var(--transition-interactive),
    background var(--transition-interactive);
}
.play-icon {
  width: 48%;
  height: 48%;
  filter: drop-shadow(0 1px 2px oklch(0 0 0 / 0.45));
}
.play-btn:hover .play-overlay,
.play-btn:focus-visible .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
  background: oklch(0 0 0 / 0.78);
}
.play-btn[aria-expanded='true'] .play-overlay { opacity: 1; }
.play-btn[aria-expanded='true'] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.track-embed {
  padding: var(--space-1) var(--space-6) var(--space-4);
}
.track-embed iframe {
  display: block;
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
}

.track-rank {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  text-align: right;
}
.track-main { min-width: 0; }
.track-name {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-artist {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-album {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-bpm {
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
  text-align: right;
  color: var(--color-text-muted);
}
.track-key {
  justify-self: center;
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: oklch(from var(--accent) l c h / 0.16);
  color: var(--accent);
  min-width: 2.6rem;
  text-align: center;
}
.track-mood {
  justify-self: center;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.track-components {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.component-value b {
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.component-sep { color: var(--color-text-faint); }
.track-link {
  justify-self: end;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid transparent;
  transition: color var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive), transform var(--transition-interactive);
}
.track-link:hover {
  color: var(--accent);
  border-color: oklch(from var(--accent) l c h / 0.5);
  background: oklch(from var(--accent) l c h / 0.1);
}
.track-link:active { transform: scale(0.94); }

/* column header row */
.track-cols {
  display: grid;
  grid-template-columns: 2rem 3rem minmax(0, 1.25fr) minmax(0, 0.75fr) 3.2rem 3.5rem 2.8rem 9rem 2.75rem;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-6);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  background: oklch(from var(--color-surface-offset) l c h / 0.4);
}
.track-cols > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-cols .col-rank { text-align: right; }
.track-cols .col-bpm { text-align: right; }
.track-cols .col-key { text-align: center; }
.col-mood,
.col-components {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  overflow: visible !important;
}
.col-mood { justify-content: center; }
.component-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.component-info-button {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}
.component-info-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  z-index: 12;
  width: 15rem;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity var(--transition-interactive), transform var(--transition-interactive), visibility var(--transition-interactive);
}
.mood-formula-tooltip {
  right: 0;
  width: 17rem;
}
.component-info-button:hover + .component-info-tooltip,
.component-info-button:focus + .component-info-tooltip,
.component-info-wrap:focus-within .component-info-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) var(--space-4) var(--space-12);
  margin-top: var(--space-12);
}
.site-footer p {
  max-width: var(--content-wide);
  margin-inline: auto;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .station-rail {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .track-row,
  .track-cols {
    grid-template-columns: 1.75rem 2.75rem minmax(0, 1fr) 3.2rem 3.4rem 2.8rem 2.5rem;
  }
  .play-btn { width: 2.75rem; height: 2.75rem; }
  .track-album,
  .track-components,
  .track-cols .col-album,
  .track-cols .col-components {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-inner { padding-inline: var(--space-3); }
  .week-label { display: none; }
  .stations,
  .week { padding-inline: var(--space-3); }
  .station-rail {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: var(--space-2);
    margin-inline: calc(var(--space-3) * -1);
    padding-inline: var(--space-3);
  }
  .station-rail::-webkit-scrollbar { display: none; }
  .station-card { flex: 0 0 auto; min-width: 9.5rem; }
  .week-head {
    align-items: stretch;
    flex-direction: column;
    gap: var(--space-4);
  }
  .week-head > * { min-width: 0; max-width: 100%; }
  .day-rail {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .day-pill {
    flex: 1 1 0;
    min-width: 2.5rem;
    padding-inline: var(--space-2);
  }
  .playlist-head { padding: var(--space-5) var(--space-4) var(--space-4); }
  .playlist-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: var(--space-4) var(--space-3);
  }
  /* On phones, keep Track + BPM visible first and let the rest of the
     song metadata scroll horizontally instead of disappearing. */
  .track-list {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .track-list > li {
    min-width: 58rem;
  }
  .track-row,
  .track-cols {
    padding-inline: var(--space-4);
    grid-template-columns: 1.5rem 2.5rem 12rem 3.5rem 3.2rem 2.8rem 9rem 12rem 2.5rem;
    gap: var(--space-2);
  }

  /* Mobile column order: identity, BPM, Mood, then the deeper metadata. */
  .track-rank, .track-cols .col-rank { grid-column: 1; }
  .play-btn, .track-cols .col-play { grid-column: 2; }
  .track-main, .track-cols .col-track { grid-column: 3; }
  .track-bpm, .track-cols .col-bpm { grid-column: 4; }
  .track-mood, .track-cols .col-mood { grid-column: 5; }
  .track-key, .track-cols .col-key { grid-column: 6; }
  .track-components, .track-cols .col-components { grid-column: 7; }
  .track-album, .track-cols .col-album { grid-column: 8; }
  .track-link, .track-cols .col-x { grid-column: 9; }

  /* Keep all reassigned mobile columns on one physical row. */
  .track-row > *,
  .track-cols > * {
    grid-row: 1;
  }

  .track-album,
  .track-bpm,
  .track-key,
  .track-components,
  .track-cols .col-album,
  .track-cols .col-bpm,
  .track-cols .col-key,
  .track-cols .col-components {
    display: initial;
  }
  .track-components { display: flex; }
  .track-cols .col-mood,
  .track-cols .col-components { display: flex; }
  .play-btn { width: 2.5rem; height: 2.5rem; }
  .track-embed { padding-inline: var(--space-4); }
}

/* ---------- Playlist action ---------- */
.playlist-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid oklch(from var(--accent) l c h / 0.55);
  border-radius: var(--radius-full);
  background: oklch(from var(--accent) l c h / 0.12);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.playlist-link[hidden] { display: none; }
.playlist-link svg { width: 0.9rem; height: 0.9rem; flex: 0 0 auto; }
.playlist-link:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.playlist-link:active { transform: translateY(0) scale(0.98); }

/* ---------- Info buttons ---------- */
.info-button {
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-text-faint);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-family: Georgia, serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
}
.info-button:hover,
.info-button:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}
