/* MusicServer Webplayer – hell/dunkel automatisch nach Geräteeinstellung, Akzent Blau. */
:root {
  --bg: #f4f5f8; --panel: #ffffff; --panel-2: #eceef3; --fg: #15161a; --muted: #6a6d78;
  --line: #e2e4ea; --hover: rgb(20 30 60 / .06); --active: rgb(47 111 222 / .12);
  --accent: #2f6fde; --accent-hover: #255fc4; --accent-fg: #fff;
  --error: #c62828; --shadow: 0 10px 30px rgb(15 20 40 / .12);
  --radius: 10px; --sidebar: 248px; --player-h: 88px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1013; --panel: #17181d; --panel-2: #1f2127; --fg: #eceef3; --muted: #9a9daa;
    --line: #262830; --hover: rgb(255 255 255 / .06); --active: rgb(122 167 255 / .14);
    --accent: #6f9dff; --accent-hover: #8bb1ff; --accent-fg: #0b1220;
    --error: #ff8a80; --shadow: 0 10px 30px rgb(0 0 0 / .45);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
svg { display: block; fill: currentColor; }
[data-icon] { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; }
[data-icon] svg { width: 100%; height: 100%; }

button, a.button {
  padding: 8px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: inherit;
  transition: background .15s, transform .1s;
}
button:hover, a.button:hover { background: var(--hover); }
button:active { transform: scale(.97); }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; font-weight: 600; }
button.primary:hover { background: var(--accent-hover); }
button.icon, .button-like {
  padding: 8px; border: none; background: none; color: var(--muted); border-radius: 999px;
  display: inline-grid; place-items: center; text-decoration: none;
}
button.icon:hover, .button-like:hover { color: var(--fg); background: var(--hover); }
input:not([type=range]), select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=range] { accent-color: var(--accent); cursor: pointer; }
.error { color: var(--error); min-height: 1.4em; margin: 0; }
.muted { color: var(--muted); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.card label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }

/* ------------------------------------------------------------ Anmeldung */
#login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% -10%, var(--active), transparent), var(--bg); }
#login form { width: 100%; max-width: 360px; box-shadow: var(--shadow); padding: 28px; }
#login h1 { margin: 0; font-size: 24px; }
.login-logo { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.login-logo svg { width: 30px; height: 30px; }

/* ------------------------------------------------------------ Grundgerüst */
#app {
  display: grid; height: 100vh; height: 100dvh;
  grid-template-columns: var(--sidebar) 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas: "side content" "player player";
}
#sidebar {
  grid-area: side; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 10px; overflow-y: auto; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; padding: 4px 10px 14px; }
.brand-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); padding: 6px; }
#sidebar nav { display: flex; flex-direction: column; gap: 2px; }
#sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#sidebar nav a:hover { color: var(--fg); background: var(--hover); }
#sidebar nav a.active { color: var(--fg); background: var(--active); }
#sidebar nav a.active [data-icon] { color: var(--accent); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 4px 12px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.side-head button.icon { padding: 4px; }
#side-playlists { flex: 1; }
#side-playlists a { padding: 7px 12px; font-size: 14px; }
#side-playlists .pl-dot { width: 26px; height: 26px; border-radius: 6px; background: var(--panel-2); display: grid; place-items: center; flex: none; }
#side-playlists .pl-dot [data-icon] { width: 16px; height: 16px; }
#nav-bottom { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
#backdrop { display: none; }

#content { grid-area: content; overflow-y: auto; min-width: 0; position: relative; }
#topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
#menu-btn { display: none; }
.searchbox {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
}
.searchbox:focus-within { border-color: var(--accent); }
.searchbox input { border: none !important; background: none !important; flex: 1; min-width: 0; padding: 10px 0 !important; color: var(--fg); outline: none; }
.avatar {
  margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg); text-decoration: none; font-weight: 700; text-transform: uppercase;
}
main { padding: 4px 28px 40px; max-width: 1400px; }
h1.page { font-size: 30px; margin: 8px 0 20px; letter-spacing: -.01em; }
h2 { font-size: 21px; margin: 28px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 13px; margin: 20px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; }
.page-head h1 { margin: 0; flex: 1; font-size: 30px; letter-spacing: -.01em; }

/* ------------------------------------------------------------ Kacheln & Raster */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 18px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shelf > * { scroll-snap-align: start; }
.shelf { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.shelf:hover { scrollbar-color: var(--line) transparent; }
.shelf::-webkit-scrollbar { height: 6px; }
.shelf::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.shelf:hover::-webkit-scrollbar-thumb { background: var(--line); }
.tile { text-decoration: none; display: block; min-width: 0; padding: 10px; margin: -10px; border-radius: 12px; transition: background .15s; position: relative; }
.tile:hover { background: var(--hover); }
.tile .title { font-weight: 600; margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .cover-wrap { position: relative; }
.tile .hover-play {
  position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; box-shadow: 0 6px 16px rgb(0 0 0 / .3);
  opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s;
}
.tile:hover .hover-play, .tile:focus-within .hover-play { opacity: 1; transform: none; }
.tile .hover-play:hover { background: var(--accent-hover); }
.cover {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--panel-2);
  display: grid; place-items: center; color: var(--muted); box-shadow: 0 4px 14px rgb(0 0 0 / .12);
}
div.cover [data-icon] { width: 38%; height: 38%; opacity: .6; }
.cover.round { border-radius: 50%; }
.cover.playlist { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 35%, #8a5cf6)); color: #fff; }

.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.quick a {
  display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; text-decoration: none; font-weight: 600; height: 60px; padding-right: 12px; transition: background .15s;
}
.quick a:hover { background: var(--panel-2); }
.quick .cover { width: 60px; height: 60px; border-radius: 0; box-shadow: none; flex: none; }
.quick span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ Kopfbereich Album/Playlist */
.hero {
  --tint: 90 110 160;
  margin: -64px -28px 0; padding: 88px 28px 24px;
  background: linear-gradient(180deg, rgb(var(--tint) / .55), rgb(var(--tint) / .12) 75%, transparent);
  display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap;
}
.hero .cover { width: 232px; flex: none; box-shadow: 0 16px 40px rgb(0 0 0 / .35); }
.hero .kind { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.hero h1 { font-size: clamp(28px, 5vw, 56px); line-height: 1.05; margin: 6px 0 12px; letter-spacing: -.02em; word-break: break-word; }
.hero .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hero .meta a { font-weight: 700; text-decoration: none; }
.hero .meta a:hover { text-decoration: underline; }
.hero-info { flex: 1; min-width: 240px; }
.actions { display: flex; align-items: center; gap: 14px; padding: 20px 0 8px; flex-wrap: wrap; }
.big-play {
  width: 56px; height: 56px; padding: 0; border: none; border-radius: 50%; background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; box-shadow: 0 8px 20px rgb(47 111 222 / .35);
}
.big-play:hover { background: var(--accent-hover); transform: scale(1.04); }
.big-play [data-icon] { width: 30px; height: 30px; }

/* ------------------------------------------------------------ Titellisten */
.tracks { width: 100%; border-collapse: separate; border-spacing: 0; }
.tracks td { padding: 8px 10px; vertical-align: middle; }
.tracks tr { cursor: pointer; }
.tracks tr td:first-child { border-radius: 8px 0 0 8px; }
.tracks tr td:last-child { border-radius: 0 8px 8px 0; }
.tracks tr:hover td { background: var(--hover); }
.tracks tr.playing .ttl { color: var(--accent); }
.tracks .num { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; width: 36px; text-align: right; }
.tracks tr.playing .num { color: var(--accent); }
.tracks .dur { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; }
.tracks .act { width: 1%; white-space: nowrap; }
.tracks .act button.icon { opacity: 0; }
.tracks tr:hover .act button.icon, .tracks .act button.icon:focus-visible { opacity: 1; }
.tracks .ttl { font-weight: 500; }
.tracks .sub { display: block; color: var(--muted); font-size: 13px; font-weight: normal; }
.tracks .thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; display: block; background: var(--panel-2); }
.tracks td.th { width: 52px; padding-right: 0; }
.fallback { font-style: italic; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 8px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.list li a { flex: 1; text-decoration: none; }
.artist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.artist-list .tile { text-align: center; }

/* Menü an Titeln */
.menu {
  position: absolute; z-index: 40; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 220px; padding: 4px;
}
.menu button { border: none; border-radius: 6px; text-align: left; background: none; padding: 9px 12px; }
.menu button:hover { background: var(--hover); }

dialog { border: none; padding: 0; background: none; width: min(420px, calc(100vw - 32px)); color: var(--fg); }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog h2 { margin: 0; }
dialog menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 0; flex-wrap: wrap; }
#pl-dialog-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; }
#pl-dialog-list button { border-radius: 8px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--player-h) + 20px); z-index: 60;
  background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 500;
}

/* ------------------------------------------------------------ Player-Leiste */
#player {
  grid-area: player; z-index: 20; background: var(--panel); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); min-height: var(--player-h);
}
.pl-left { display: flex; align-items: center; gap: 12px; min-width: 0; cursor: pointer; border-radius: 8px; padding: 4px; margin: -4px; }
.pl-left:hover .np-title { text-decoration: underline; }
.np-cover { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; flex: none; background: var(--panel-2); color: var(--muted); padding: 0; }
.np-empty { padding: 16px; }
.np-text { min-width: 0; }
.np-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.controls { display: flex; align-items: center; gap: 14px; }
.play-btn {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; border: none; background: var(--fg); color: var(--bg);
  display: grid; place-items: center;
}
.play-btn:hover { background: var(--fg); transform: scale(1.06); }
.play-btn .i-pause { display: none; }
body.playing .play-btn .i-play { display: none; }
body.playing .play-btn .i-pause { display: grid; }
.progress { display: flex; gap: 10px; align-items: center; width: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress .seek { flex: 1; }
.pl-right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.volume-box { display: flex; align-items: center; gap: 2px; }
.volume { width: 110px; }

/* ------------------------------------------------------------ Läuft gerade */
#now { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow: hidden; animation: slide-up .22s ease-out; }
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.now-bg { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(70px) saturate(1.5); opacity: .45; }
.now-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: 12px 28px calc(20px + env(safe-area-inset-bottom)); }
.now-head { display: flex; align-items: center; justify-content: space-between; }
.now-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.now-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; max-width: 1200px; width: 100%; margin: 0 auto; }
.now-main { display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.now-cover { width: min(52vh, 440px); aspect-ratio: 1; border-radius: 12px; object-fit: cover; box-shadow: 0 24px 60px rgb(0 0 0 / .4); background: var(--panel-2); color: var(--muted); }
.now-empty { padding: 18%; }
.now-meta { text-align: center; width: min(52vh, 440px); max-width: 100%; }
.now-title { font-size: 26px; font-weight: 800; white-space: normal; }
.now-artist { color: var(--muted); font-size: 16px; }
.now-artist a { text-decoration: none; }
.now-artist a:hover { text-decoration: underline; color: var(--fg); }
.progress.big { flex-direction: column; gap: 2px; width: min(52vh, 440px); max-width: 100%; }
.progress.big .seek { width: 100%; }
.progress .times { display: flex; justify-content: space-between; width: 100%; }
.controls.big { gap: 28px; }
.controls.big .play-btn { width: 68px; height: 68px; }
.controls.big .play-btn [data-icon] { width: 34px; height: 34px; }
.controls.big .ctl [data-icon] { width: 34px; height: 34px; }
.now-queue { align-self: stretch; min-height: 0; overflow-y: auto; background: color-mix(in srgb, var(--panel) 70%, transparent); border-radius: 14px; padding: 6px 12px 12px; }
.now-queue h3 { margin: 12px 4px 8px; }
.q-item { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 8px; cursor: pointer; }
.q-item:hover { background: var(--hover); }
.q-item img, .q-item .ph { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; background: var(--panel-2); flex: none; }
.q-item .t { min-width: 0; }
.q-item .t div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item .t .s { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ Schmale Fenster / Handy */
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; grid-template-areas: "content" "player"; }
  #sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(300px, 84vw);
    transform: translateX(-102%); transition: transform .2s ease-out; box-shadow: var(--shadow);
  }
  body.nav-open #sidebar { transform: none; }
  body.nav-open #backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgb(0 0 0 / .45); }
  #menu-btn { display: inline-grid; }
  #topbar { padding: 10px 16px; }
  main { padding: 4px 16px 32px; }
  .hero { margin: -60px -16px 0; padding: 76px 16px 18px; gap: 18px; }
  .hero .cover { width: 160px; }
  .now-body { grid-template-columns: 1fr; gap: 24px; overflow-y: auto; align-items: start; padding-top: 8px; }
  .now-queue { overflow: visible; }
}
@media (max-width: 640px) {
  :root { --player-h: 72px; }
  #player { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); position: relative; }
  .pl-center { flex-direction: row; }
  .pl-center .ctl[data-act=prev], .pl-center .ctl.mode { display: none; }
  .pl-center .progress { position: absolute; left: 0; right: 0; top: -9px; padding: 0; }
  .pl-center .progress .t-cur, .pl-center .progress .t-dur { display: none; }
  .pl-right { display: none; }
  .np-cover { width: 48px; height: 48px; }
  .np-empty { padding: 13px; }
  /* Am Handy regeln die Lautstärketasten; iPhones erlauben ohnehin keine Lautstärke per Webseite. */
  .now-volume { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
  .shelf { grid-auto-columns: 140px; }
  .quick { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick a { height: 52px; font-size: 13px; }
  .quick .cover { width: 52px; height: 52px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero .cover { width: min(220px, 60vw); align-self: center; }
  .tracks td.th { display: none; }
  .tracks .act button.icon { opacity: 1; }
  .now-inner { padding: 8px 18px calc(16px + env(safe-area-inset-bottom)); }
  .now-cover, .now-meta, .progress.big { width: min(78vw, 400px); }
  .now-title { font-size: 22px; }
  .hide-sm { display: none; }
}

/* ---------------------------------------------------------------- Hochladen */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 40px 20px; border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--panel); cursor: pointer; max-width: 720px; transition: border-color .15s, background .15s;
}
.dropzone [data-icon] { width: 44px; height: 44px; color: var(--accent); }
.dropzone:hover, .dropzone:focus-visible, body.dragging .dropzone { border-color: var(--accent); background: var(--active); outline: none; }
body.dragging #view { outline: 2px dashed var(--accent); outline-offset: -8px; border-radius: var(--radius); }
.up-list { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
.up-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: var(--panel); }
.up-item > [data-icon] { color: var(--muted); }
.up-gespeichert > [data-icon] { color: var(--accent); }
.up-fehler > [data-icon], .up-fehler .up-state { color: var(--error); }
.up-text { flex: 1; min-width: 0; }
.up-text > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-text .muted { font-size: 13px; }
.up-state { font-size: 13px; color: var(--muted); flex: none; }
.up-bar { height: 4px; border-radius: 2px; background: var(--panel-2); margin-top: 6px; overflow: hidden; }
.up-bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }

/* ---------------------------------------------------------------- Lieblingssongs */
button.icon.fav.on { color: var(--accent); opacity: 1 !important; }
.tracks .act { display: table-cell; }
.np-fav { flex: none; }
.now-title-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.now-title-row .np-fav [data-icon] { width: 26px; height: 26px; }
.cover.favs {
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #3b5bdb, #8a5cf6 55%, #e64980);
}
.cover.favs [data-icon] { width: 42%; height: 42%; }
.quick .cover.favs [data-icon] { width: 55%; height: 55%; }

/* ---------------------------------------------------------------- Zufall, Wiederholen, Schlaftimer */
button.icon.mode.on, button.icon.sleep-btn.on { color: var(--accent); }
button.icon.mode.on::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--accent);
}
button.icon.mode, button.icon.sleep-btn { position: relative; }
.controls:not(.big) .ctl.mode [data-icon] { width: 20px; height: 20px; }
.controls.big .ctl.mode [data-icon] { width: 26px; height: 26px; }
.sleep-btn .badge {
  position: absolute; right: -2px; top: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.menu-title { padding: 8px 12px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.now-head .sleep-btn .badge { right: 0; top: 0; }
@media (max-width: 640px) {
  .controls.big { gap: 16px; }
}

/* ---------------------------------------------------------------- Kinderkonten */
.kid-mark { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.kid-mark [data-icon] { width: 20px; height: 20px; }
.kid-mark select { max-width: 230px; }
.child-dlg { width: min(520px, calc(100vw - 32px)); }
.child-dlg form { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 48px); overflow-y: auto; }
.child-rules { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.child-rules:disabled { opacity: .45; }
.child-rules strong { margin-top: 6px; }
.child-dlg .check, .child-dlg .radio { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.child-dlg .radio { align-items: flex-start; }
.child-dlg .radio span { display: flex; flex-direction: column; }
.child-dlg .check.big { font-weight: 600; font-size: 16px; }
.child-dlg input[type=checkbox], .child-dlg input[type=radio] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.child-dlg input[type=time] { width: auto; }
.child-dlg button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.notice {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--player-h) + 24px); transform: translateX(-50%);
  width: min(460px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
}
.notice > span { flex: 1; }
.notice [data-icon] { width: 20px; height: 20px; vertical-align: -4px; color: var(--accent); }
.child-dlg .check, .child-dlg .radio { flex-direction: row; justify-content: flex-start; text-align: left; font-weight: normal; color: var(--fg); }
.child-dlg .check input[type=time], .child-dlg .check input[type=number] { width: auto; flex: none; padding: 4px 8px; }
.child-dlg .radio small { font-size: 12px; }
.child-dlg h2 { margin-bottom: 4px; }

/* ---------------------------------------------------------------- Familien-Playlists */
.cover.playlist.family { background: linear-gradient(135deg, #0ca678, #1c7ed6); color: #fff; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; }
.share-btn [data-icon] { width: 18px; height: 18px; }
.share-btn.on { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- Mixe & Meistgehört */
.cover.mix { position: relative; overflow: hidden; display: block; background: linear-gradient(135deg, var(--mix)); color: #fff; }
.cover.mix img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; mix-blend-mode: luminosity; }
.cover.mix::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--mix)); opacity: .55; }
.cover.mix .mix-name { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1; font-weight: 800; font-size: 19px; line-height: 1.1; text-shadow: 0 1px 4px rgba(0,0,0,.35); overflow-wrap: anywhere; }
.cover.mix .mix-badge { position: absolute; top: 8px; left: 8px; z-index: 1; width: 22px; height: 22px; opacity: .9; }
.cover.mix .mix-badge [data-icon] { width: 22px; height: 22px; }
.hero .cover.mix .mix-name { font-size: 28px; left: 16px; bottom: 16px; }
.range-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chip { border-radius: 999px; padding: 6px 14px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.artist-top { text-align: center; }

/* ---------------------------------------------------------------- Tags/Cover bearbeiten */
.edit-dlg { width: min(520px, calc(100vw - 32px)); }
.edit-dlg .card { box-sizing: border-box; width: 100%; max-height: calc(100vh - 48px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.edit-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.edit-field span { font-size: 13px; color: var(--muted); }
.edit-field input { width: 100%; box-sizing: border-box; }
.edit-row { display: flex; gap: 10px; }
.edit-cover { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.edit-cover .cover { width: 110px; height: 110px; flex: none; border-radius: 6px; object-fit: cover; }
.edit-cover button { display: inline-flex; align-items: center; gap: 6px; }
.edit-dlg .small { font-size: 12px; overflow-wrap: anywhere; margin: 0; }
.edit-folder { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.edit-folder .check { display: flex; align-items: flex-start; gap: 8px; flex-direction: row; }
.edit-folder .check span { display: flex; flex-direction: column; }
.edit-folder .check.sub { padding-left: 24px; align-items: center; }
