/* The catalog as pages: /pieces and /category/<tag> (routes/browse.ts).
   landing.css brings the palette, the chips and the song cards; learn.css
   the page's furniture. This is what is these pages' own. */

.browse .page-head { margin-bottom: 18px; }
.browse .page-head p { color: var(--muted); line-height: 1.9; }

/* The chips here are links to pages, and one of them is this page. */
.browse-chips { justify-content: flex-start; max-width: none; margin: 0 0 26px; padding: 0; }
.browse-chips a[aria-current="page"] { color: var(--text); border-color: var(--blue); }

.browse h2 { margin: 0 0 14px; font-size: 1.25rem; font-weight: 800; }
.browse h2 .count { margin-inline-start: 8px; color: var(--muted); font-size: 0.85rem; font-weight: 400; }

/* The songs are the front page's cards. learn.css calls a padded panel .card
   too, and it is loaded later; here a card is a song again. */
body.learn .browse-songs .card { display: flex; padding: 0; overflow: hidden; transition: transform 0.15s ease, border-color 0.15s ease; }
body.learn .browse-songs .card:hover { transform: translateY(-3px); border-color: var(--blue); }

.browse-more { margin: 30px 0 50px; }
.browse-more a, .browse-books a { color: var(--blue); }
.browse-more a:hover, .browse-books a:hover { text-decoration: underline; text-underline-offset: 4px; }

.browse-books { margin: 0 0 34px; }
.browse-books ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.browse-books li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raise);
}
.browse-books span { color: var(--muted); font-size: 0.82rem; }

/* ---- /pieces: a list to read ---- */

.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 30px; }
.letters a {
  min-width: 36px; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); text-align: center; font-weight: 700;
}
.letters a:hover { color: var(--text); border-color: var(--blue); }

.pieces { margin: 0 0 30px; scroll-margin-top: 16px; }
.pieces h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--accent, var(--blue)); }
.pieces ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 28px;
}
.pieces li {
  display: flex; align-items: baseline; gap: 10px;
  min-width: 0; padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pieces a { font-weight: 700; min-width: 0; }
.pieces a:hover { color: var(--blue); }
.piece-artist { flex: 1; min-width: 0; color: var(--muted); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pieces .level { flex: none; margin-inline-start: auto; font-size: 0.75rem; }

@media (max-width: 560px) {
  .pieces ul { grid-template-columns: 1fr; }
  .letters a { min-width: 32px; padding: 4px 6px; }
}
