:root {
  --bg: #0f0f12;
  --panel: #18181d;
  --line: #2a2a31;
  --text: #f1efe9;
  --muted: #9b9aa3;
  --spotify: #1ed760;
  --youtube: #ff3b3b;
  --accent: #f1efe9;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4ef; --panel: #ffffff; --line: #e4e1da;
    --text: #17171b; --muted: #6b6a72; --accent: #17171b;
    --spotify: #13a548; --youtube: #e02424;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, sans-serif;
  padding-bottom: 7rem;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
h1, h2 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -0.02em; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 14px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 1.5rem; }
.filters { display: flex; gap: 6px; }
.chip { font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chip span { opacity: .6; margin-left: 2px; }
.chip.is-on { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.pl { margin-top: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.pl[hidden] { display: none; }
.pl-head { display: flex; gap: 20px; align-items: flex-start; }
.pl-cover { width: 148px; height: 148px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line); }
.pl--youtube .pl-cover { width: 220px; height: 124px; }
.pl-meta { min-width: 0; }
.pl-meta h2 { margin: 6px 0 2px; font-size: 1.6rem; line-height: 1.15; }
.pl-sub { margin: 0; color: var(--muted); font-size: 14px; }
.pl-desc { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.pl-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pl-stale { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.pl-error { display: grid; gap: 4px; color: var(--muted); }
.pl-error strong { color: var(--text); }

.badge { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.badge--spotify { color: var(--spotify); background: color-mix(in srgb, var(--spotify) 14%, transparent); }
.badge--youtube { color: var(--youtube); background: color-mix(in srgb, var(--youtube) 14%, transparent); }

.btn { font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; border-radius: 999px; padding: 7px 16px; border: 1px solid transparent; color: #0b0b0d; }
.pl--spotify .btn:not(.btn--ghost) { background: var(--spotify); }
.pl--youtube .btn:not(.btn--ghost) { background: var(--youtube); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn:hover { filter: brightness(1.08); }

.items { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.items.is-collapsed li:nth-child(n+13) { display: none; }
.item { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 2rem auto 1fr auto; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.item:hover, .item:focus-visible { background: color-mix(in srgb, var(--text) 6%, transparent); }
.item.is-playing .t { color: var(--spotify); }
.pl--youtube .item.is-playing .t { color: var(--youtube); }
.n { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--line); display: block; }
.thumb--youtube { width: 64px; height: 36px; }
.txt { min-width: 0; display: grid; }
.t, .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s { color: var(--muted); font-size: 13px; }
.dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.more { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 10px 6px 0; cursor: pointer; }
.more:hover { color: var(--text); }
.empty { margin-top: 3rem; color: var(--muted); }

.player { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 50px rgb(0 0 0 / .35); overflow: hidden; z-index: 10; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 13px; color: var(--muted); }
.player-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-close { all: unset; cursor: pointer; padding: 2px 6px; }
.player-frame iframe { display: block; width: 100%; border: 0; }
.player-frame .yt { aspect-ratio: 16 / 9; height: auto; }

@media (max-width: 600px) {
  .pl { padding: 16px; }
  .pl-head { flex-direction: column; }
  .pl-cover, .pl--youtube .pl-cover { width: 100%; height: auto; aspect-ratio: 1; }
  .pl--youtube .pl-cover { aspect-ratio: 16 / 9; }
  .item { grid-template-columns: auto 1fr auto; }
  .n { display: none; }
}
