:root {
  --paper: #f4f0e7;
  --paper-2: #e8e1d4;
  --ink: #1b1714;
  --muted: #5f584e;
  --line: #ddd4c4;
  --clay: #8a3d34;
  --player: #171410;
  --player-text: #f4f0e7;
  --player-muted: #c9bfb0;
  color-scheme: light;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
}
body.player-open { padding-bottom: 8.5rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  z-index: 30;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  padding: 1.1rem 0 0.4rem;
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.brand {
  text-decoration: none;
  font-family: Fraunces, Georgia, serif;
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); }

.search {
  display: flex;
  width: min(100%, 280px);
  border-bottom: 1px solid var(--ink);
}
.search input {
  width: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.45rem 0;
  outline: none;
}
.search input::placeholder { color: var(--muted); }
.search button {
  border: 0;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  padding-inline: 0.2rem;
}

.hero { padding: 2.2rem 0 1.2rem; }
.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.4rem);
}
.lede {
  max-width: 38rem;
  margin: 0.8rem 0 0;
  font-size: 1.25rem;
  color: var(--muted);
}
.home-search {
  width: min(100%, 640px);
  margin-top: 1.4rem;
  border-bottom-width: 2px;
}
.home-search input { font-size: 1.35rem; padding: 0.55rem 0; }
.note {
  max-width: 40rem;
  color: var(--muted);
  margin: 1rem 0 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 1.6rem 0 1rem;
  padding: 0;
}
.filters button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.25rem 0;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--clay);
}

.albums {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 0.9rem;
}
@media (min-width: 720px) {
  .albums { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.8rem 1.1rem; }
}
.album-card { min-width: 0; }
.cover { position: relative; }
.album-link { text-decoration: none; display: block; }
.album-link img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
}
.album-link:hover img, .album-link:focus-visible img { outline: 2px solid var(--ink); outline-offset: 3px; }
.album-title {
  display: block;
  margin-top: 0.55rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.album-meta { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 0.15rem; }
.card-play {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
}
.card-play .play {
  background: rgba(27, 23, 20, 0.92);
  box-shadow: 0 0 0 2px rgba(244, 240, 231, 0.92), 0 1px 6px rgba(0, 0, 0, 0.35);
}

.page { padding: 1.6rem 0 3rem; }
.back { color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--ink); }

.album-hero, .song-hero {
  display: grid;
  gap: 1.1rem;
  margin: 1rem 0 1.4rem;
}
@media (min-width: 720px) {
  .album-hero, .song-hero {
    grid-template-columns: 240px 1fr;
    align-items: end;
    gap: 1.6rem;
  }
}
.album-hero img, .song-hero img {
  width: min(100%, 280px);
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
}
.kicker {
  margin: 0 0 0.35rem;
  color: var(--clay);
  font-weight: 700;
  text-decoration: none;
}
.page h1 { margin: 0 0 0.4rem; font-size: clamp(2.1rem, 5vw, 3.6rem); }
.meta { margin: 0; color: var(--muted); }
.big-play { margin-top: 0.9rem; }

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
}
.stores a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 0.28rem 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.stores a:hover { background: var(--ink); color: var(--paper); }

.tracks {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 2rem;
}
.track {
  display: grid;
  grid-template-columns: 2.2rem 2.4rem minmax(0, 1fr) auto;
  gap: 0.35rem 0.7rem;
  align-items: center;
  padding: 0.45rem 0.1rem;
  border-top: 1px solid var(--line);
}
.track:last-child { border-bottom: 1px solid var(--line); }
.track-no, .track-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.track-title { text-decoration: none; font-weight: 650; }
.track-title:hover { text-decoration: underline; }
.track-album { display: block; color: var(--muted); font-weight: 500; font-size: 0.92rem; text-decoration: none; }
.track.is-current { background: color-mix(in srgb, var(--clay) 8%, transparent); }
.tracks.results .track { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
.section-title { margin: 1.6rem 0 0.6rem; font-size: 1.7rem; }

.play {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.play:hover { background: var(--clay); }
.play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}
.play.is-playing .play-icon {
  width: 9px;
  height: 10px;
  margin-left: 0;
  border: 0;
  border-left: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  box-sizing: border-box;
}
.play-label {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  gap: 0.55rem;
  font-weight: 700;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin: 1rem 0;
}
.letters a { font-weight: 700; text-decoration: none; color: var(--muted); }
.letters a:hover { color: var(--ink); }
.letter-block { margin: 0 0 1.2rem; }
.letter-block h2 { margin: 0 0 0.3rem; font-size: 1.4rem; }
.song-index { list-style: none; padding: 0; margin: 0; }
.song-index a { text-decoration: none; }
.song-index a:hover { text-decoration: underline; }
.song-index li { padding: 0.18rem 0; }
.by { color: var(--muted); }

.empty { color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 1.6rem;
  color: var(--muted);
}
.site-footer p { margin: 0.2rem 0; }
.site-footer a { color: var(--ink); }

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--player);
  color: var(--player-text);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-areas:
    "art copy controls"
    "art bar bar"
    "art meta meta";
  gap: 0.25rem 0.8rem;
  align-items: center;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}
.player[hidden] { display: none; }
.player img {
  grid-area: art;
  width: 56px;
  height: 56px;
  object-fit: cover;
}
.player-copy { grid-area: copy; min-width: 0; }
.player-title, .player-album {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.player-title { font-weight: 700; }
.player-album, .player-kind, .player-status { color: var(--player-muted); font-size: 0.92rem; }
.player-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; align-items: baseline; }
.player-meta p { margin: 0; }
.player-status:empty { display: none; }
.player-bar {
  grid-area: bar;
  width: 100%;
  accent-color: var(--paper);
}
.player-controls {
  grid-area: controls;
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.player-controls button {
  background: transparent;
  color: var(--player-text);
  border: 1px solid transparent;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  cursor: pointer;
}
.player-controls button:hover { border-color: var(--player-muted); }
.icon-pause { display: none; }
.player-controls [data-state="pause"] .icon-play { display: none; }
.player-controls [data-state="pause"] .icon-pause { display: inline; }

@media (max-width: 640px) {
  .search { width: 100%; order: 3; }
  .player {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "art copy"
      "controls controls"
      "bar bar"
      "meta meta";
  }
  .player img { width: 48px; height: 48px; }
  body.player-open { padding-bottom: 11rem; }
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
