:root {
  --bg: #121214;
  --panel: #1b1b1f;
  --line: #2b2b31;
  --text: #f1f1f4;
  --dim: #9b9ba6;
  --accent: #7a70ff;
  --bar: 76px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f8; --panel: #ffffff; --line: #deDEe4; --text: #17171b; --dim: #6a6a76; --accent: #5a4fff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.has-player { padding-bottom: calc(var(--bar) + 12px); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 1em; height: 1em; fill: currentColor; display: block; }

.top { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.brand span { font-weight: 400; color: var(--dim); margin-left: .35em; }

#page { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.lead { color: var(--dim); margin: 0 0 24px; }
.foot { max-width: 980px; margin: 0 auto; padding: 16px; color: var(--dim); font-size: 14px; }
.foot a { text-decoration: underline; }

/* ── feed ─────────────────────────────────────────────────────────────── */
.album { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); }
.album:first-child { border-top: 0; }
.cv { display: block; width: 200px; height: 200px; border-radius: 6px; overflow: hidden; background: var(--panel); }
.cv img, .acv img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nocover { display: block; background: var(--panel); }
.hd { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.play-album {
  flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-size: 26px;
}
.play-album:hover { background: var(--accent); color: #fff; }
.play-album.wide { width: auto; height: 46px; border-radius: 23px; padding: 0 22px 0 14px; display: inline-flex; gap: 8px; font-size: 22px; font-weight: 600; }
.play-album.wide span { font-size: 16px; }
.ti { min-width: 0; flex: 1; }
.ti small, .ai small { display: block; color: var(--dim); font-size: 14px; }
.at { font-weight: 700; font-size: 18px; }
.meta { color: var(--dim); }
.tag { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; color: var(--dim); }

/* ── track list ───────────────────────────────────────────────────────── */
.tracks { list-style: none; margin: 0; padding: 0; }
.track { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.track:last-child { border-bottom: 0; }
.tp { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px; background: none; border: 0; text-align: left; }
.tp .n { width: 1.6em; text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }
.tp .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tp:hover .t { color: var(--accent); }
.track .d { color: var(--dim); font-size: 14px; font-variant-numeric: tabular-nums; }
.dl { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: var(--dim); font-size: 20px; }
.dl:hover { background: var(--panel); color: var(--text); }
.track.playing .t { color: var(--accent); }
.track.playing .n { color: var(--accent); }
.eq { display: none; gap: 2px; align-items: flex-end; width: 1.6em; height: 14px; justify-content: flex-end; }
.eq i { width: 3px; background: var(--accent); animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.track.active .n { display: none; }
.track.active .eq { display: flex; }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; height: 10px; } }
.tracks.collapsed .track:nth-child(n+6) { display: none; }
.more { margin-top: 6px; padding: 6px 6px; background: none; border: 0; color: var(--text); font-weight: 700; }
.more:hover { color: var(--accent); }

/* ── album page ───────────────────────────────────────────────────────── */
.ah { display: flex; gap: 24px; align-items: flex-end; margin-bottom: 24px; }
.acv { flex: none; width: 300px; height: 300px; border-radius: 8px; overflow: hidden; background: var(--panel); }
.ai h1 { margin: 2px 0 6px; font-size: 34px; line-height: 1.15; }
.ai .meta { margin: 0 0 16px; }
.back { margin-top: 28px; color: var(--dim); }

/* ── bottom player ────────────────────────────────────────────────────── */
#player {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar); z-index: 10;
  display: grid; grid-template-columns: auto minmax(160px, 1fr) auto minmax(150px, 240px); align-items: center; gap: 18px;
  padding: 0 18px; background: #1d1d22; color: #f1f1f4; border-top: 1px solid #2b2b31;
}
#player[hidden] { display: none; }
#player button { background: none; border: 0; color: inherit; display: grid; place-items: center; position: relative; }
.pl-ctrl { display: flex; align-items: center; gap: 12px; }
.pl-ctrl button { width: 36px; height: 36px; font-size: 22px; opacity: .85; }
.pl-ctrl button:hover { opacity: 1; }
.pl-ctrl .big { width: 44px; height: 44px; border-radius: 50%; background: #f1f1f4; color: #121214; font-size: 26px; opacity: 1; }
.pl-ctrl [aria-pressed="true"] { color: var(--accent); opacity: 1; }
#pl-one { position: absolute; right: 2px; bottom: 2px; font: 700 10px/1 system-ui; display: none; }
.pl-ctrl .one #pl-one { display: block; }
.pl-seek { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #b0b0ba; font-variant-numeric: tabular-nums; }
.pl-seek input { flex: 1; }
.pl-vol { display: flex; align-items: center; gap: 6px; font-size: 20px; color: #b0b0ba; }
.pl-vol input { width: 90px; }
.pl-now { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pl-now img { border-radius: 4px; object-fit: cover; flex: none; }
.pl-now span { min-width: 0; display: block; }
.pl-now small { display: block; color: #9b9ba6; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-now b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#player input[type=range] { accent-color: var(--accent); }

/* ── narrow screens ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .album { grid-template-columns: 96px 1fr; gap: 14px; }
  .cv { width: 96px; height: 96px; }
  .play-album { width: 44px; height: 44px; font-size: 22px; }
  .tag { display: none; }
  .ah { flex-direction: column; align-items: flex-start; }
  .acv { width: 100%; height: auto; aspect-ratio: 1; max-width: 360px; }
  .ai h1 { font-size: 28px; }
  :root { --bar: 118px; }
  #player { grid-template-columns: 1fr auto; grid-template-areas: "now ctrl" "seek seek"; row-gap: 4px; padding: 8px 14px; }
  .pl-now { grid-area: now; } .pl-ctrl { grid-area: ctrl; } .pl-seek { grid-area: seek; }
  .pl-vol, #pl-shuffle, #pl-repeat { display: none; }
}

/* ── category bar ─────────────────────────────────────────────────────── */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.cats a { padding: 6px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.cats a small { color: var(--dim); margin-left: 4px; font-weight: 400; }
.cats a:hover { border-color: var(--accent); color: var(--text); }
.cats a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.cats a[aria-current="page"] small { color: inherit; opacity: .7; }
.types { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 0; }
.types button { background: none; border: 0; padding: 6px 0; color: var(--dim); font-weight: 600; border-bottom: 2px solid transparent; }
.types button small { margin-left: 4px; font-weight: 400; }
.types button:hover { color: var(--text); }
.types button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
.album[hidden] { display: none; }
a.tag:hover { border-color: var(--accent); color: var(--text); }
.ai .meta a { text-decoration: underline; }
.feed { margin-top: 8px; }
