:root {
  --bg: #0d0b08;
  --bg-2: #16130e;
  --card: #1c1812;
  --card-hi: #262017;
  --line: #3a3124;
  --text: #f4ede1;
  --muted: #b3a792;
  --gold: #e7b54a;
  --gold-2: #f6d37f;
  --rose: #e8a3b0;
  --focus: #f6d37f;
  --radius: 14px;
  --player-h: 76px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom) + 8px);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px 0 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--rose)); color: #1a1409;
  font-size: 26px; font-weight: 800; flex: none;
}
h1 { margin: 0; font-size: clamp(22px, 5vw, 30px); letter-spacing: -0.01em; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.links { display: flex; gap: 8px; }
.links a {
  color: var(--text); text-decoration: none; font-size: 14px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
}
.links a:hover { border-color: var(--gold); color: var(--gold-2); }

.layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .stage { position: sticky; top: 16px; max-height: calc(100vh - var(--player-h) - 40px); }
}

.tools { display: flex; gap: 8px; }
.search { flex: 1; }
.search input, .sort select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.sort select { width: auto; }
.tools { flex-wrap: wrap; align-items: center; }
.search { min-width: 200px; }
.deep {
  display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
  cursor: pointer; white-space: nowrap;
}
.deep input { accent-color: var(--gold); margin: 0; }
.deep:has(input:checked) { color: var(--text); border-color: var(--gold); }
.search input::placeholder { color: #857a67; }

.facets { display: grid; gap: 8px; margin: 12px 0 4px; }
.facet { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.facet::-webkit-scrollbar { display: none; }
.facet-label { color: var(--muted); font-size: 13px; align-self: center; flex: none; width: 52px; }
.chip {
  flex: none; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 14px; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1409; font-weight: 600; }
.chip:hover { border-color: var(--gold); }

.count { color: var(--muted); font-size: 13px; margin: 10px 0 8px; }
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.track {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; background: var(--card); border: 1px solid transparent;
  border-radius: var(--radius); padding: 8px 12px 8px 8px;
}
.track:hover { background: var(--card-hi); }
.track[aria-current="true"] { border-color: var(--gold); background: var(--card-hi); }
.thumb {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: rgba(0,0,0,.55);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-meta { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-dur { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tag { color: var(--gold-2); }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

.stage {
  background: var(--card); border-radius: 18px; padding: 16px; display: flex; flex-direction: column;
  gap: 12px; overflow: hidden;
}
@media (max-width: 899px) {
  /* Handy: Wiedergabe + Songtext als Blatt über der Liste, geöffnet über das Cover im Player. */
  .stage { display: none; }
  body.sheet-open .stage {
    display: flex; position: fixed; inset: 0 0 calc(var(--player-h) + env(safe-area-inset-bottom)) 0;
    z-index: 9; border-radius: 0; overflow-y: auto; padding: 20px 16px;
  }
  body.sheet-open .stage-cover { width: min(60vw, 260px); margin: 0 auto; }
  body.sheet-open .lyrics { max-height: none; }
}
.stage-cover { flex: none; aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
  font-size: 64px; font-weight: 800; color: rgba(0,0,0,.5); }
.stage-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage h2 { margin: 0; font-size: 22px; }
.meta { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.lyrics { list-style: none; margin: 0; padding: 4px 2px 40px; overflow-y: auto; min-height: 120px;
  max-height: 46vh; scroll-behavior: smooth; }
@media (min-width: 900px) { .lyrics { max-height: none; flex: 1; } .stage-cover { max-height: 240px; aspect-ratio: auto; } }
.lyrics li {
  padding: 5px 8px; border-radius: 8px; color: var(--muted); cursor: pointer; transition: color .2s, background .2s;
}
.lyrics li:hover { background: var(--bg-2); }
.lyrics li.now { color: var(--text); background: rgba(231,181,74,.14); font-weight: 600; }
.lyrics-none { color: var(--muted); }

.tabs { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; padding: 10px 14px; color: var(--muted); font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }

.streams { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.stream { background: var(--card); border-radius: var(--radius); padding: 12px 12px 6px; }
.stream-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 4px 8px; }
.stream-day { font-weight: 700; }
.stream-game { color: var(--gold-2); }
.stream-time { color: var(--muted); font-size: 13px; }
.plays { list-style: none; margin: 0; padding: 0; }
.play {
  display: grid; grid-template-columns: 48px 40px minmax(0, 1fr); gap: 10px; align-items: center;
  width: 100%; background: none; border: 0; border-top: 1px solid var(--line); padding: 8px 4px; text-align: left;
}
.plays li:first-child .play { border-top: 0; }
.play:hover { background: var(--card-hi); border-radius: 8px; }
.play-time { font-variant-numeric: tabular-nums; color: var(--gold-2); font-weight: 600; }
.play .thumb { width: 40px; height: 40px; border-radius: 8px; font-size: 15px; }
.live { margin: 6px 0 0; font-size: 13px; color: var(--gold-2); }

.foot { color: #857a67; font-size: 13px; padding: 28px 0 12px; text-align: center; }

.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(22,19,14,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px);
  min-height: var(--player-h);
}
.p-cover { width: 52px; height: 52px; border-radius: 10px; border: 0; padding: 0; overflow: hidden;
  display: grid; place-items: center; font-weight: 800; color: rgba(0,0,0,.55); }
.p-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-title { margin: 0 0 4px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-bar { display: flex; align-items: center; gap: 8px; }
.p-bar input { flex: 1; accent-color: var(--gold); min-width: 0; }
.p-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; width: 34px; text-align: center; }
.p-ctl { display: flex; gap: 4px; }
.icon { background: none; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; }
.icon:hover { background: var(--card-hi); }
.icon.play { background: var(--gold); color: #1a1409; width: 46px; height: 46px; font-size: 20px; }
@media (max-width: 480px) { #p-prev { display: none; } .p-time { display: none; } }
