:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #646464;
  --paper: #f6f8f5;
  --panel: #ffffff;
  --line: #dad3c8;
  --accent: #166661;
  --accent-dark: #0d4946;
  --sun: #d9902f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

.is-filtered-out {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

a { color: inherit; }

.top-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 245, 0.94);
  position: sticky;
  top: 0;
  z-index: 5;
}

.top-nav a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero,
.album-header,
.song-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 28px;
  align-items: center;
  padding: 32px 0 18px;
}

.album-header,
.song-page {
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  align-items: start;
}

.hero h1,
.album-header h1,
.song-page h1,
.page-title h1 {
  margin: 0;
  font-size: 4.6rem;
  letter-spacing: 0;
  line-height: 0.95;
}

.lede {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.5;
  max-width: 620px;
}

.eyebrow {
  color: var(--sun);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-cover,
.album-cover,
.song-card img,
.collection-card img {
  width: 100%;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--panel);
}

.hero-cover,
.album-cover {
  aspect-ratio: 1 / 1;
}

.featured-album {
  align-self: end;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.featured-album .eyebrow,
.featured-album h2,
.featured-album p {
  margin: 0;
}

.featured-album h2 {
  font-size: 1.05rem;
  letter-spacing: 0;
}

.featured-album .hero-cover {
  width: 100%;
  max-width: 160px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--accent-dark);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.section {
  padding: 30px 0;
}

.highlighted-albums {
  margin: 12px 0 4px;
  padding: 22px;
  background: #fffdf7;
  border: 1px solid var(--sun);
  border-radius: 8px;
}

.highlighted-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.highlighted-grid .collection-card {
  max-width: none;
}

.search-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin: 12px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.album-player {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0 4px;
}

.album-player .album-now-playing {
  flex: 1 1 260px;
  margin: 0;
}

.search-tools label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-tools input,
.search-tools select {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.clear-filters-button {
  min-width: 76px;
}

.search-status {
  margin: 0 0 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section h2,
.liner-note h2,
.metadata h2,
.lyrics h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.song-grid,
.song-list,
.collection-grid {
  display: grid;
  gap: 14px;
}

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

.collection-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.song-card,
.collection-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.collection-card {
  grid-template-columns: 1fr;
  align-content: start;
  max-width: 240px;
}

.song-card img,
.collection-card img {
  aspect-ratio: 1 / 1;
}

.collection-card img {
  width: 100%;
  max-width: 150px;
  justify-self: center;
}

.song-card h3,
.collection-card h3 {
  margin: 4px 0 8px;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.song-card.is-playing {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.song-card h3 a,
.collection-card h3 a,
.text-link {
  text-decoration: none;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 800;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

audio {
  display: block;
  width: 100%;
  margin-top: 12px;
}

.liner-note,
.metadata {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.lyrics pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.55;
  font: inherit;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a {
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.tag-cloud a:hover,
.tag-cloud a:focus {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

@media (max-width: 760px) {
  .top-nav {
    overflow-x: auto;
    padding: 0 16px;
  }

  main {
    width: min(100% - 24px, 1120px);
  }

  .hero,
  .album-header,
  .song-page,
  .song-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1,
  .album-header h1,
  .song-page h1,
  .page-title h1 {
    font-size: 2.8rem;
  }

  .hero-cover {
    max-width: 128px;
  }

  .featured-album {
    width: 100%;
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: center;
  }

  .featured-album .eyebrow,
  .featured-album h2,
  .featured-album p {
    grid-column: 2;
  }

  .featured-album a {
    grid-row: 1 / span 3;
  }

  .song-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .search-tools {
    grid-template-columns: 1fr;
  }

  .clear-filters-button {
    width: 100%;
  }

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

  .collection-card {
    max-width: none;
  }

  .collection-card img {
    max-width: 128px;
  }
}
