:root {
  color-scheme: light dark;
  --bg: #fafaf7;
  --fg: #161616;
  --muted: #6b6b66;
  --line: #e4e3dc;
  --card: #ffffff;
  --accent: #d9460f;
  --wave: #cfcec6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0e;
    --fg: #f1f0ea;
    --muted: #9a9990;
    --line: #262624;
    --card: #171716;
    --accent: #ff7a45;
    --wave: #3a3a37;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.has-player main { padding-bottom: 220px; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top, main, .player-inner { max-width: 720px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.top { padding-top: 56px; padding-bottom: 8px; }
h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.02; letter-spacing: -0.035em; }
.tagline { margin: 0.6rem 0 0; color: var(--muted); }
.tagline:empty { display: none; }
.status { color: var(--muted); margin: 24px 0; }

.sets { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.set {
  display: grid;
  grid-template-columns: auto 64px 1fr;
  align-items: center;
  gap: 0 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 14px;
}
.set.active { border-left-color: var(--accent); }
.thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--line); display: block; }
.meta { min-width: 0; }
.set-title { margin: 0; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 0.875rem; }

.details { grid-column: 1 / -1; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.925rem; }
.details summary { cursor: pointer; color: var(--muted); }
.desc { white-space: pre-line; margin: 10px 0 0; overflow-wrap: anywhere; }
.tracks { margin: 10px 0 0; padding-left: 1.6em; color: var(--muted); }
.tracks li { padding: 1px 0; overflow-wrap: anywhere; }
.dl { display: inline-block; margin-top: 10px; font-size: 0.875rem; }

.play-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fg); color: var(--bg);
}
.play-btn.big { width: 52px; height: 52px; background: var(--accent); color: #fff; }
.icon { width: 24px; height: 24px; fill: currentColor; }
.icon-pause { display: none; }
[data-state="playing"] > .icon-pause { display: block; }
[data-state="playing"] > .icon-play { display: none; }

.player {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}
.player-inner { padding-top: 12px; padding-bottom: 12px; display: grid; gap: 8px; }
.now { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.p-cover { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.now-text { min-width: 0; }
.p-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-time { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.wave {
  width: 100%; height: 64px; display: block;
  cursor: pointer; touch-action: pan-y; border-radius: 6px;
}
.controls { display: flex; justify-content: center; align-items: center; gap: 20px; }
.skip { min-width: 52px; height: 44px; border-radius: 22px; border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 480px) {
  .top { padding-top: 36px; }
  .set { grid-template-columns: auto 56px 1fr; gap: 0 10px; }
  .thumb { width: 56px; height: 56px; }
}
