:root {
  --bg: #0f0f12;
  --bg2: #1a1a20;
  --bg3: #26262e;
  --fg: #f4f4f6;
  --fg2: #a7a7b3;
  --fg3: #6e6e7a;
  --acc: #ff6a3d;
  --acc2: #ff9f5a;
  --nav-h: 58px;
  --mini-h: 60px;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
  --hdr: #3a3a46;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-user-select: none;
  user-select: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
img { display: block; }
svg { width: 24px; height: 24px; fill: currentColor; display: block; }
[hidden] { display: none !important; }

#view {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + var(--sb) + 24px);
}
body.has-mini #view { padding-bottom: calc(var(--nav-h) + var(--mini-h) + var(--sb) + 24px); }

/* ---------- Buttons ---------- */
.ib { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--fg2); flex: none; }
.ib:active { transform: scale(.92); }
.ib.on { color: var(--acc); }
.ib.big svg { width: 36px; height: 36px; }
.play-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #111; flex: none;
  box-shadow: 0 6px 18px rgba(255, 106, 61, .3);
}
.play-btn svg { width: 30px; height: 30px; }
.play-btn:active { transform: scale(.95); }
.pill {
  padding: 7px 14px; border-radius: 99px; background: var(--bg3); color: var(--fg); font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.pill.on { background: var(--acc); color: #111; }

/* ---------- Kopfbereiche ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  padding: calc(var(--st) + 12px) 16px 10px;
  background: linear-gradient(var(--bg) 70%, rgba(15, 15, 18, 0));
  display: flex; align-items: center; gap: 10px;
}
.top h1 { font-size: 24px; margin: 0; flex: 1; letter-spacing: -.3px; }
.top .ib { color: var(--fg); }

.backbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 6; height: calc(var(--st) + 52px);
  padding: var(--st) 8px 0; display: flex; align-items: center; gap: 6px;
  transition: background .2s;
}
.backbar .ib { color: var(--fg); background: rgba(0, 0, 0, .35); }
.backbar .bt { font-weight: 700; opacity: 0; transition: opacity .2s; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.backbar.solid { background: var(--hdr); }
.backbar.solid .bt { opacity: 1; }
.backbar.solid .ib { background: none; }

.hero {
  padding: calc(var(--st) + 60px) 16px 16px;
  background: linear-gradient(var(--hdr), var(--bg));
  display: flex; flex-direction: column; align-items: center;
}
.hero-cover { width: min(62vw, 260px); aspect-ratio: 1; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .55); object-fit: cover; background: var(--bg3); }
.hero-cover.round { border-radius: 50%; }
.hero-text { align-self: stretch; margin-top: 18px; }
.hero-text h2 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.3px; }
.hero-text .sub { color: var(--fg2); font-size: 13px; margin-top: 6px; }
.hero-text .sub a { color: var(--fg); font-weight: 600; }
.hero-actions { align-self: stretch; display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.hero-actions .spacer { flex: 1; }

/* ---------- Abschnitte ---------- */
.sec { margin-top: 26px; }
.sec h3 { margin: 0 16px 12px; font-size: 20px; letter-spacing: -.2px; }
.hscroll { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.card { width: 140px; flex: none; scroll-snap-align: start; }
.card img { width: 140px; height: 140px; border-radius: 6px; object-fit: cover; background: var(--bg3); }
.card.round img { border-radius: 50%; }
.card .t1 { margin-top: 8px; font-size: 13px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .t2 { font-size: 12px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.round .t1, .card.round .t2 { text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; padding: 0 16px; }
.grid .card { width: auto; }
.grid .card img { width: 100%; height: auto; aspect-ratio: 1; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px; }
.quick a {
  display: flex; align-items: center; gap: 10px; background: var(--bg3); border-radius: 6px; overflow: hidden; height: 56px;
  font-size: 13px; font-weight: 700;
}
.quick a img, .quick a .tile { width: 56px; height: 56px; object-fit: cover; flex: none; }
.quick a span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding-right: 8px; }
.tile { display: grid; place-items: center; background: linear-gradient(135deg, #5b3df5, #c9b8ff); color: #fff; }
.tile.liked { background: linear-gradient(135deg, #5b3df5, #a990ff); }

/* ---------- Listen ---------- */
.list { padding: 4px 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 16px; min-height: 60px; cursor: pointer; }
.row:active { background: rgba(255, 255, 255, .05); }
.row .thumb { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex: none; background: var(--bg3); }
.row .thumb.round { border-radius: 50%; }
.row .tile.thumb { display: grid; }
.row .num { width: 24px; text-align: center; color: var(--fg2); font-size: 14px; flex: none; font-variant-numeric: tabular-nums; }
.row .meta { flex: 1; min-width: 0; }
.t1, .t2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t1 { font-size: 15px; }
.row .t2 { font-size: 13px; color: var(--fg2); display: flex; align-items: center; gap: 4px; }
.row .t2 svg { width: 14px; height: 14px; color: var(--acc); flex: none; }
.row .t2 span { overflow: hidden; text-overflow: ellipsis; }
.row.playing .t1, .row.playing .num { color: var(--acc); }
.row .ib { color: var(--fg3); }

.chips { display: flex; gap: 8px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.empty { text-align: center; color: var(--fg2); padding: 60px 30px; }
.empty h3 { color: var(--fg); margin: 0 0 8px; }
.empty code { background: var(--bg3); padding: 2px 6px; border-radius: 4px; word-break: break-all; font-size: 12px; }
.banner { margin: 0 16px 10px; padding: 10px 14px; background: var(--bg3); border-radius: 8px; font-size: 13px; color: var(--fg2); display: flex; gap: 10px; align-items: center; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--fg3); border-top-color: var(--acc); border-radius: 50%; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Suche ---------- */
.searchbox {
  flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; color: #111; border-radius: 6px; padding: 0 12px; height: 44px;
}
.searchbox svg { color: #333; flex: none; }
.searchbox input { flex: 1; border: 0; outline: 0; background: none; color: #111; font-size: 16px; min-width: 0; }
.chips.sf { padding-top: 4px; }
.chips.sf small { opacity: .7; font-weight: 500; }
.tophit {
  display: block; margin: 0 16px; padding: 16px; border-radius: 8px; background: var(--bg3); cursor: pointer;
}
.tophit img { width: 92px; height: 92px; border-radius: 6px; object-fit: cover; background: var(--bg2); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.tophit img.round { border-radius: 50%; }
.tophit .t1 { margin-top: 14px; font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.tophit .t2 { margin-top: 4px; font-size: 13px; color: var(--fg2); }
.tophit:active { opacity: .85; }
.genres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.genre { height: 92px; border-radius: 8px; padding: 12px; font-weight: 800; font-size: 16px; overflow: hidden; position: relative; }

/* ---------- Mini-Player ---------- */
#mini {
  position: fixed; left: 8px; right: 8px; z-index: 20;
  bottom: calc(var(--nav-h) + var(--sb) + 4px);
  height: var(--mini-h); border-radius: 8px; overflow: hidden;
  background: var(--mini-bg, #3b3b46);
  transition: background .4s;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .5);
}
.mini-in { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 4px 0 8px; cursor: pointer; }
.mini-cover { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; flex: none; background: var(--bg3); }
.mini-meta { flex: 1; min-width: 0; }
.mini-meta .t1 { font-size: 14px; font-weight: 600; }
.mini-meta .t2 { font-size: 13px; color: rgba(255, 255, 255, .7); }
#mini .ib { color: var(--fg); }
.mini-like.on { color: var(--acc); }
.mini-progress { position: absolute; left: 8px; right: 8px; bottom: 2px; height: 2px; background: rgba(255, 255, 255, .2); border-radius: 2px; }
.mini-progress div { height: 100%; width: 0; background: #fff; border-radius: 2px; }

/* ---------- Tabs ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 19;
  height: calc(var(--nav-h) + var(--sb)); padding-bottom: var(--sb);
  display: flex; background: linear-gradient(rgba(15, 15, 18, .75), rgba(15, 15, 18, .98) 40%);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--fg3); }
#tabs a.on { color: var(--fg); }
#tabs .ico svg { width: 26px; height: 26px; }

/* ---------- Vollbild-Player ---------- */
#np {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  background: var(--bg); overflow: hidden;
}
#np.open { transform: none; }
.np-bg { position: absolute; inset: 0; background: linear-gradient(var(--np-color, #444) 0%, #121216 85%); transition: background .6s; z-index: -1; }
.np-head { display: flex; align-items: center; padding: calc(var(--st) + 8px) 8px 0; }
.np-head .ib { color: var(--fg); }
.np-head .ib svg { width: 30px; height: 30px; }
.np-ctx { flex: 1; text-align: center; min-width: 0; }
.np-ctx small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, .7); }
.np-ctx b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-body { flex: 1; display: flex; flex-direction: column; padding: 0 24px calc(var(--sb) + 16px); min-height: 0; }
.np-art { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 20px 0; }
.np-art img { width: 100%; max-width: min(100%, 52vh); aspect-ratio: 1; object-fit: cover; border-radius: 8px; box-shadow: 0 16px 50px rgba(0, 0, 0, .55); background: var(--bg3); transition: transform .3s; }
#np.paused .np-art img { transform: scale(.94); }
.np-queue { flex: 1; overflow-y: auto; margin: 10px -24px; min-height: 0; }
.np-queue h4 { margin: 14px 16px 6px; font-size: 15px; }
.np-queue .row { min-height: 54px; }
.np-queue .row .thumb { width: 42px; height: 42px; }
.np-info { display: flex; align-items: center; gap: 12px; }
.np-titles { flex: 1; min-width: 0; }
.np-title { font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.3px; }
.np-artist { font-size: 16px; color: rgba(255, 255, 255, .72); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-like { color: var(--fg); }
.np-like.on { color: var(--acc); }
.np-like svg { width: 28px; height: 28px; }
.np-seek { margin-top: 16px; }
.np-seek input { width: 100%; -webkit-appearance: none; appearance: none; height: 20px; background: transparent; margin: 0; }
.np-seek input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #fff var(--p, 0%), rgba(255, 255, 255, .25) var(--p, 0%)); }
.np-seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin-top: -5px; }
.np-seek input::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.np-seek input::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.np-seek input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .65); font-variant-numeric: tabular-nums; }
.np-ctrl { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.np-ctrl .ib { color: var(--fg); }
.np-ctrl .ib.on { color: var(--acc); }
.np-ctrl .ib.on::after { content: ""; position: absolute; }
.np-play { width: 68px; height: 68px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; }
.np-play svg { width: 36px; height: 36px; }
.np-play:active { transform: scale(.95); }
.np-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.np-foot .ib { color: var(--fg); }
.np-foot .ib.on { color: var(--acc); }

/* ---------- Sheets / Dialoge ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }
.backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: #22222a; border-radius: 14px 14px 0 0;
  padding: 8px 0 calc(var(--sb) + 12px); max-height: 85vh; overflow-y: auto;
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.sheet.show { transform: none; }
.sheet .grip { width: 38px; height: 4px; border-radius: 2px; background: var(--fg3); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 4px 16px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 6px; }
.sheet-head img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; }
.sheet-head .t1 { font-weight: 700; }
.sheet-head .t2 { color: var(--fg2); font-size: 13px; }
.sheet-item { display: flex; align-items: center; gap: 16px; width: 100%; padding: 13px 20px; text-align: left; font-size: 16px; }
.sheet-item:active { background: rgba(255, 255, 255, .06); }
.sheet-item svg { color: var(--fg2); }
.sheet-item.danger, .sheet-item.danger svg { color: #ff6b6b; }

.dialog {
  position: fixed; left: 50%; top: 40%; z-index: 61; transform: translate(-50%, -50%) scale(.95); opacity: 0;
  width: min(88vw, 360px); background: #2a2a33; border-radius: 14px; padding: 22px 20px 16px; transition: .2s;
}
.dialog.show { opacity: 1; transform: translate(-50%, -50%); }
.dialog h3 { margin: 0 0 14px; text-align: center; }
.dialog input { width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--fg3); padding: 8px 2px; font-size: 20px; outline: 0; text-align: center; }
.dialog input:focus { border-color: var(--acc); }
.dialog .btns { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.dialog .btns button { padding: 10px 22px; border-radius: 99px; font-weight: 700; }
.dialog .btns .ok { background: var(--acc); color: #111; }
.dialog .btns .cancel { border: 1px solid var(--fg3); }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--mini-h) + var(--sb) + 20px); z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; transition: .25s; pointer-events: none;
  background: #fff; color: #111; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.settings { padding: 0 16px; }
.settings .item { background: var(--bg2); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.settings .item b { display: block; margin-bottom: 4px; }
.settings .item small { color: var(--fg2); word-break: break-all; }
.settings .item button { margin-top: 10px; }

@media (min-width: 700px) {
  #view, #tabs, #mini { max-width: 700px; margin-left: auto; margin-right: auto; }
  #mini { left: 50%; transform: translateX(-50%); width: calc(min(700px, 100vw) - 16px); }
}

/* ---------- Anmeldung ---------- */
body.auth #tabs, body.auth #mini { display: none !important; }
body.auth #view { padding-bottom: 0; }
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--st) + 24px) 28px calc(var(--sb) + 24px); text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 106, 61, .25), transparent 60%), var(--bg);
}
.auth-logo { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.auth-page h1 { margin: 18px 0 6px; font-size: 30px; letter-spacing: -.5px; }
.auth-page p { color: var(--fg2); max-width: 340px; margin: 0 0 22px; }
.auth-form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  height: 50px; border-radius: 8px; border: 1px solid var(--bg3); background: var(--bg2); padding: 0 16px; font-size: 16px; outline: 0;
}
.auth-form input:focus { border-color: var(--acc); }
.auth-err { color: #ff6b6b; font-size: 14px; min-height: 18px; }
.auth-btn {
  height: 50px; border-radius: 99px; font-weight: 800; font-size: 16px; color: #111;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
}
.auth-btn:disabled { opacity: .6; }
.auth-hint { margin-top: 22px !important; font-size: 13px; }

/* ---------- Formulare / Ordnerauswahl ---------- */
.dialog input + input, .dialog input + .chk, .dialog .chk + input { margin-top: 14px; }
.dialog input { font-size: 17px; }
.chk { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; color: var(--fg2); text-align: left; }
.chk input { width: 20px; height: 20px; accent-color: var(--acc); flex: none; }
.fb-h { margin: 18px 0 4px; font-size: 15px; color: var(--fg2); }
.fb-list { margin: 0 -16px; }
.fb-list .row { min-height: 52px; }
.fb-list .thumb { width: 40px; height: 40px; }
.settings .pill { margin-right: 6px; }

/* ---------- Ordnerliste in den Einstellungen ---------- */
.dirlist { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.dir { display: flex; align-items: center; gap: 10px; background: var(--bg3); border-radius: 8px; padding: 8px 4px 8px 12px; }
.dir .ico svg { width: 22px; height: 22px; color: var(--acc); }
.dir .meta { flex: 1; min-width: 0; }
.dir .t1 { font-size: 13px; font-weight: 600; white-space: normal; word-break: break-all; }
.dir .t2 { font-size: 12px; color: var(--fg2); }
.dir .ib { color: var(--fg2); }

/* Einladung per QR-Code */
.invite { padding: 4px 20px 12px; text-align: center; }
.invite .t1 { font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.invite .qr { background: #fff; border-radius: 14px; padding: 12px; width: min(260px, 70vw); margin: 0 auto 12px; }
.invite .qr svg { display: block; width: 100%; height: auto; }
.invite .url { font-weight: 600; word-break: break-all; margin-bottom: 8px; }
.invite small { color: var(--fg2); display: block; line-height: 1.45; }
.settings .item.warn { border: 1px solid #ff6b6b; border-radius: 12px; padding: 12px; }

/* Offline-Downloads */
.row .dlmark { display: none; flex: none; color: #2ecc8f; }
.row .dlmark svg { width: 16px; height: 16px; display: block; }
.row.dl .dlmark { display: block; }
.row.na { opacity: .35; }
.dl-btn.on { color: #2ecc8f; }
.tile.dltile { background: linear-gradient(135deg, #1f6f5c, #2ecc8f); color: #fff; }
#dlpill { position: fixed; right: 12px; bottom: calc(var(--nav-h) + var(--sb) + var(--mini-h) + 14px); z-index: 40;
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #1f6f5c; color: #fff;
  font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.4); pointer-events: none; }
#dlpill svg { width: 16px; height: 16px; }
body.offline::before { content: 'Offline – nur heruntergeladene Songs'; position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--st) + 8px); z-index: 30;
  background: #3a3a46; color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.4); }

/* Player-Fuß: Schlaf-Timer, Liedtext, Warteschlange */
.np-foot { justify-content: space-between; }
.np-sleep { position: relative; }
.np-sleep small { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font-size: 10px; white-space: nowrap; color: var(--acc); }

/* Liedtext */
.np-lyrics { flex: 1; min-height: 0; overflow-y: auto; margin: 10px -24px; padding: 0 24px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.np-lyrics::-webkit-scrollbar { display: none; }
.lyr { padding: 30% 0; }
.lyr p { font-size: 22px; font-weight: 700; line-height: 1.35; margin: 0 0 14px; color: rgba(255,255,255,.45); transition: color .25s, transform .25s; }
.lyr.synced p { cursor: pointer; }
.lyr.synced p.on { color: #fff; }
.lyr:not(.synced) p { color: #fff; font-size: 18px; font-weight: 600; }
.lyr-msg { height: 100%; display: grid; place-items: center; text-align: center; color: var(--fg2); padding: 40px 0; }
.lyr-src { font-size: 11px; color: var(--fg3); padding-bottom: 30%; }

/* Mix-Kacheln */
.mixcov { width: 140px; height: 140px; border-radius: 6px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--mix, #333); position: relative; }
.mixcov img, .card .mixcov img { width: 100%; height: 100%; border-radius: 0; aspect-ratio: 1; }
.mixcard .mixcov::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 40%, var(--mix)); opacity: .85; }
.mixcov.hero-cover { width: min(62vw, 260px); height: auto; aspect-ratio: 1; }

/* Einstellungen: Wiedergabe */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 4px; font-size: 14px; }
.set-row small { display: inline; color: var(--fg2); }
.set-row b { color: var(--acc); font-size: 14px; }
.set-range { width: 100%; accent-color: var(--acc); }
.set-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--acc); flex: none; }

/* Wischen & Ziehen */
#view .row[data-id] { touch-action: pan-y; position: relative; }
.row.swipe-ok { background: rgba(46, 204, 143, .14); }
#view .row[data-id]::before { content: '+ Warteschlange'; position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
  padding-right: 14px; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--fg2); pointer-events: none; }
#view .row.swipe-ok::before { color: #2ecc8f; }
.np-art { transition: transform .2s, opacity .2s; }
.mini-meta { transition: transform .2s, opacity .2s; }
.drag { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 44px; color: var(--fg2);
  touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.drag svg { width: 22px; height: 22px; }
.row.shift { transition: transform .15s ease; }
.row.dragging { z-index: 5; background: var(--bg3); box-shadow: 0 8px 24px rgba(0, 0, 0, .55); transition: none; border-radius: 6px; }

/* Suchverlauf */
.tile.hist { background: var(--bg3); color: var(--fg2); }
.tile.hist svg { width: 22px; height: 22px; }

/* Bibliothek: Filter & Sortierung */
.libtools { display: flex; gap: 8px; align-items: center; padding: 0 16px 12px; }
.libfilter { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--bg3); border-radius: 8px; padding: 0 10px; height: 36px; }
.libfilter svg { width: 18px; height: 18px; color: var(--fg2); flex: none; }
.libfilter input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; font-size: 14px; }
.libsort { display: flex; align-items: center; gap: 6px; flex: none; max-width: 48%; }
.libsort svg { width: 16px; height: 16px; flex: none; }
.libsort span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Geteilte Playlists */
.row .t2 svg[viewBox] + span { min-width: 0; }

/* Formular mit Beschriftung */
.dialog .fl { display: block; margin-bottom: 8px; }
.dialog .fl span { display: block; font-size: 12px; color: var(--fg2); margin: 0 0 3px 2px; }
.dialog .fl input { margin: 0; }
.dialog { max-height: 86vh; overflow-y: auto; }

/* Jahresrückblick */
.recap .chips { padding-top: 4px; }
.recap-hero { margin: 8px 16px 6px; padding: 22px 20px; border-radius: 14px; background: linear-gradient(140deg, #ff6a3d, #7c3aed 85%); color: #fff; }
.recap-hero small { font-size: 13px; opacity: .9; }
.recap-hero .big { font-size: 54px; font-weight: 800; line-height: 1.05; margin-top: 6px; letter-spacing: -1px; }
.recap-hero .big-sub { font-size: 15px; opacity: .95; }
.recap-stats { display: flex; gap: 10px; margin-top: 18px; }
.recap-stats div { flex: 1; background: rgba(0,0,0,.18); border-radius: 10px; padding: 10px 8px; text-align: center; }
.recap-stats b { display: block; font-size: 20px; }
.recap-stats span { font-size: 11px; opacity: .9; }
.recap-fact { margin: 16px 0 0; font-size: 14px; line-height: 1.45; }
.recap-top .num { color: var(--fg); font-weight: 700; }
.recap-top .cnt { color: var(--fg2); font-size: 13px; flex: none; padding-right: 10px; font-variant-numeric: tabular-nums; }
.recap-note { color: var(--fg3); font-size: 12px; padding: 0 16px 30px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding: 18px 16px 0; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; outline: none; }
.bar .fill { width: 100%; max-width: 22px; background: var(--acc); border-radius: 4px 4px 0 0; }
.bar span { font-size: 11px; color: var(--fg3); margin-top: 4px; }
.bar em { font-style: normal; font-size: 11px; color: var(--fg2); position: absolute; top: -16px; white-space: nowrap; }
.bar:hover::after, .bar:focus::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -18px); z-index: 2;
  background: var(--bg3); color: var(--fg); font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.bar:hover .fill, .bar:focus .fill { filter: brightness(1.25); }
.recap-card { display: flex; gap: 14px; align-items: center; margin: 4px 16px 18px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(120deg, #3b1f6e, #7c2d12); }
.recap-card > div:first-child { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.15); display: grid; place-items: center; flex: none; }
.recap-card svg { width: 26px; height: 26px; }
.recap-card b { display: block; font-size: 15px; }
.recap-card small { color: rgba(255,255,255,.8); font-size: 12px; }

/* Cover ändern */
.cover-cur { display: flex; gap: 14px; align-items: center; }
.cover-cur .cc-img { width: 84px; height: 84px; border-radius: 6px; object-fit: cover; flex: none; }
.file-pill { display: inline-flex; cursor: pointer; }
.cv-search input { width: 100%; margin: 10px 0; padding: 9px 12px; border-radius: 8px; border: 0; background: var(--bg3); color: var(--fg); font: inherit; }
.cv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cv { padding: 0; border: 0; background: none; color: var(--fg2); text-align: left; cursor: pointer; }
.cv img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--bg3); display: block; }
.cv small { font-size: 11px; }
.cv.busy { opacity: .4; }

/* Aufräumen */
.dupgrp .duprow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.06); margin-top: 6px; }
.duprow .meta { flex: 1; min-width: 0; }
.duprow .t1 { font-size: 13px; }
.duprow .t2 { font-size: 11px; color: var(--fg3); word-break: break-all; }
.duprow .best { color: #2ecc8f; font-weight: 600; }

/* Hochladen */
#uppill { position: fixed; left: 12px; bottom: calc(var(--nav-h) + var(--sb) + var(--mini-h) + 14px); z-index: 40; display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: var(--acc); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
#uppill svg { width: 16px; height: 16px; }

/* Sicherung */
.bkrow { cursor: default; }
.bkrow a.ib { color: var(--fg); }

/* Einstellungen: Auswahl */
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }

/* Abspielen auf anderen Geräten */
.np-dev.on { color: #2ecc8f; }
.np-remote { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 24px; padding: 8px 12px; border-radius: 999px;
  background: rgba(46, 204, 143, .18); color: #2ecc8f; font-size: 13px; cursor: pointer; }
.np-remote[hidden] { display: none; }
.np-remote svg { width: 18px; height: 18px; }
body.remote .mini-meta .t2 { color: #2ecc8f; }
#unlock { position: fixed; left: 50%; top: calc(var(--st) + 12px); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 16px; background: var(--acc); color: #fff; font: inherit; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.5); cursor: pointer; }
#unlock svg { width: 20px; height: 20px; }
.dialog .fl input { font-size: 16px; text-align: left; padding: 6px 2px; }
.np-head .np-dev svg { width: 24px; height: 24px; }

/* ===================== Helles Design ===================== */
:root[data-theme="light"] { --bg: #f6f6f8; --bg2: #ffffff; --bg3: #e7e7ec; --fg: #16161a; --fg2: #5c5c68; --fg3: #8d8d99; --hdr: #c9c9d3; color-scheme: light; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --bg: #f6f6f8; --bg2: #ffffff; --bg3: #e7e7ec; --fg: #16161a; --fg2: #5c5c68; --fg3: #8d8d99; --hdr: #c9c9d3; color-scheme: light; }
}
/* Player, Mini-Player, Auto-Modus und Wecker bleiben dunkel (farbiges Cover als Hintergrund) */
#np, #mini, .car, .alarm { --bg: #0f0f12; --bg2: #1a1a20; --bg3: #26262e; --fg: #f4f4f6; --fg2: #a7a7b3; --fg3: #6e6e7a; color: var(--fg); }
:root[data-theme="light"] #tabs { background: linear-gradient(rgba(246, 246, 248, .8), rgba(246, 246, 248, .98) 40%); }
:root[data-theme="light"] .top { background: linear-gradient(var(--bg) 70%, rgba(246, 246, 248, 0)); }
:root[data-theme="light"] .sheet, :root[data-theme="light"] .dialog { background: var(--bg2); color: var(--fg); }
:root[data-theme="light"] .row:active { background: rgba(0, 0, 0, .05); }
:root[data-theme="light"] .dupgrp .duprow { border-top-color: rgba(0, 0, 0, .08); }
:root[data-theme="light"] #toast { background: #16161a; color: #fff; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) #tabs { background: linear-gradient(rgba(246, 246, 248, .8), rgba(246, 246, 248, .98) 40%); }
  :root:not([data-theme]) .top { background: linear-gradient(var(--bg) 70%, rgba(246, 246, 248, 0)); }
  :root:not([data-theme]) .sheet, :root:not([data-theme]) .dialog { background: var(--bg2); color: var(--fg); }
  :root:not([data-theme]) .row:active { background: rgba(0, 0, 0, .05); }
  :root:not([data-theme]) #toast { background: #16161a; color: #fff; }
}

/* ===================== Hörbücher & Sterne ===================== */
.np-book { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 4px; }
.np-book[hidden] { display: none; }
.np-book .ib { position: relative; color: var(--fg); }
.np-book .ib svg { width: 30px; height: 30px; }
.np-book .ib small { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 8px; font-weight: 700; }
.np-speed { min-width: 64px; font-weight: 700; }
.np-stars { display: flex; margin: 2px 0 0 -8px; }
.np-stars .star { width: 30px; height: 30px; color: rgba(255, 255, 255, .45); }
.np-stars .star svg { width: 18px; height: 18px; }
.np-stars .star.on { color: #ffc23d; }
.resume-bar { height: 3px; background: var(--bg3); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.resume-bar div { height: 100%; background: var(--acc); }

/* ===================== Equalizer ===================== */
.eq-sliders { display: flex; justify-content: space-between; gap: 6px; height: 150px; margin: 10px 0; }
.eq-sliders label { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.eq-sliders input { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 120px; accent-color: var(--acc); }
.eq-sliders span { font-size: 11px; color: var(--fg2); }

/* ===================== Auto-Modus & Wecker ===================== */
body.carmode #tabs, body.carmode #mini, body.alarmmode #tabs, body.alarmmode #mini { display: none; }
.car, .alarm { position: fixed; inset: 0; z-index: 30; background: #050507; display: flex; flex-direction: column; padding: calc(var(--st) + 8px) 18px calc(var(--sb) + 16px); }
.car-top { display: flex; align-items: center; justify-content: space-between; color: var(--fg2); font-size: 15px; }
.car-top .ib svg { width: 30px; height: 30px; }
.car-clock { font-size: 18px; font-weight: 700; color: var(--fg); }
.car-now { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; text-align: center; }
.car-cover { width: min(58vw, 34vh); aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: #222; }
.car-title { font-size: 28px; font-weight: 800; margin-top: 18px; line-height: 1.15; }
.car-artist { font-size: 20px; color: var(--fg2); margin-top: 4px; }
.car-bar { width: 100%; height: 6px; background: #222; border-radius: 3px; margin-top: 18px; overflow: hidden; }
.car-bar div { height: 100%; background: var(--acc); width: 0; }
.car-ctrl { display: flex; justify-content: space-around; align-items: center; margin: 18px 0; }
.car-ctrl button { width: 92px; height: 92px; border: 0; border-radius: 50%; background: #1d1d24; color: #fff; display: grid; place-items: center; }
.car-ctrl button svg { width: 52px; height: 52px; }
.car-ctrl .car-play { width: 124px; height: 124px; background: var(--acc); }
.car-ctrl .car-play svg { width: 70px; height: 70px; }
.car-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.car-quick button { border: 0; border-radius: 14px; background: #16161c; color: #fff; padding: 16px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: 14px; }
.car-quick svg { width: 30px; height: 30px; }
.alarm-clock { font-size: 92px; font-weight: 200; text-align: center; margin-top: 8vh; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.alarm-next { text-align: center; color: var(--fg2); margin-bottom: 4vh; }
.alarm-form { background: #121218; border-radius: 14px; padding: 6px 16px 14px; overflow-y: auto; }
.alarm-form select, .alarm-form input[type=time], .smart select, .smart .txt { background: var(--bg3); color: var(--fg); border: 0; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; max-width: 60%; }
.alarm-form small { display: block; color: var(--fg2); margin-top: 10px; }

/* ===================== Intelligente Playlists & Ordner ===================== */
.smart .txt { max-width: 100%; width: 100%; margin-top: 8px; }
.smart select { max-width: 100%; margin: 8px 6px 0 0; }
.sm-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0; border-bottom: 1px solid rgba(127, 127, 127, .15); }
.sm-rule select, .sm-rule .txt { margin: 0; flex: 1 1 40%; width: auto; }
.sm-rule .ib { flex: none; }
.sm-count { font-size: 16px; }
.fold-path { display: block; color: var(--fg3); font-size: 12px; margin-bottom: 8px; word-break: break-all; }
.libchips { padding-bottom: 4px; }

/* ===================== Künstler-Infos ===================== */
.about-box { margin: 0 16px; padding: 14px 16px; background: var(--bg2); border-radius: 12px; }
.about-box b { display: block; font-size: 13px; color: var(--fg2); font-weight: 600; margin-bottom: 6px; }
.about-box p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.about-box a { color: var(--acc); font-size: 13px; font-weight: 600; }

/* ===================== Gemeinsam: Aktivität, Party ===================== */
.tile.avatar { border-radius: 50%; font-weight: 800; font-size: 20px; color: #fff; }
.party-host .seg { margin: 4px 0 14px; }
.ok-btn { color: #2ecc8f; }
.req-st { color: var(--fg2); font-size: 12px; flex: none; padding-right: 8px; }
.req-st.st-accepted, .req-st.st-played { color: #2ecc8f; }
.req-st.st-declined { color: #ff6b6b; }
body.guest #tabs, body.guest #mini { display: none; }
.guest-page { padding: calc(var(--st) + 20px) 16px 40px; }
.guest-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.guest-head img { width: 56px; height: 56px; border-radius: 14px; }
.guest-head h1 { margin: 0; font-size: 26px; }
.guest-head small { color: var(--fg2); }
.guest-page .searchbox { margin: 10px 0 6px; }
.guest-page .row { padding-left: 0; padding-right: 0; }
.guest-page .row.now { background: var(--bg2); border-radius: 12px; padding: 8px 12px; }
.guest-h { margin: 22px 0 4px; }
.guest-hint { color: var(--fg2); font-size: 14px; }

/* ===================== Server-Status ===================== */
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-grid div { background: var(--bg3); border-radius: 10px; padding: 12px; }
.st-grid b { display: block; font-size: 18px; }
.st-grid span { font-size: 12px; color: var(--fg2); }
.st-disk { margin-top: 10px; }
.st-disk .t1 { font-size: 13px; word-break: break-all; }
.st-bar { height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; margin: 5px 0 3px; }
.st-bar div { height: 100%; background: #2ecc8f; }
.st-bar.low div { background: #ff6b6b; }
