:root {
  --bg: #0e0f12;
  --bg-2: #15171b;
  --surface: #1c1f25;
  --surface-2: #252931;
  --line: #2b2f37;
  --text: #eceef2;
  --muted: #9aa1ad;
  --dim: #6b7280;
  --accent: #f0a830;
  --accent-ink: #1a1203;
  --danger: #ef5b5b;
  --radius: 8px;
  --side: 232px;
  --bar: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
body.has-music { --bar: 76px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
#app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side); padding: 20px 12px calc(16px + var(--bar));
  background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; padding: 0 10px 22px; }
.brand-logo { height: 30px; width: auto; display: block; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.sidebar nav a:hover { background: var(--surface); color: var(--text); }
.sidebar nav a.active { background: var(--surface-2); color: var(--text); }
.sidebar nav a.active svg { stroke: var(--accent); }
.nav-settings { margin-top: auto; }
.scan-status { margin: 12px 4px 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); font-size: 12px; color: var(--muted); }
.scan-status .bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.scan-status .bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

.main { flex: 1; margin-left: var(--side); min-width: 0; padding-bottom: var(--bar); }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 16px; padding: 14px 32px; background: linear-gradient(var(--bg) 60%, transparent); }
.search { display: flex; align-items: center; gap: 10px; width: min(420px, 100%); height: 40px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search svg { width: 18px; height: 18px; }
#view { padding: 4px 32px 48px; outline: none; }

/* ---------- rows & grids ---------- */
.section { margin: 18px 0 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.section-head a { color: var(--muted); font-size: 13px; font-weight: 500; }
.section-head a:hover { color: var(--accent); }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w, 160px); gap: 18px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.row.wide { --card-w: 280px; }
.row > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w, 160px), 1fr)); gap: 26px 18px; }

.card { display: block; min-width: 0; }
.card .art { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.card.square .art { aspect-ratio: 1; }
.card.landscape .art { aspect-ratio: 16 / 9; }
.card.round .art { border-radius: 50%; aspect-ratio: 1; }
.card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s, transform .3s var(--ease); }
.card .art img.loaded { opacity: 1; }
.card .art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s; }
.card:hover .art::after, .card:focus-visible .art::after { box-shadow: inset 0 0 0 2px var(--accent); }
.card:hover .art img { transform: scale(1.03); }
.card .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; color: var(--dim); font-weight: 600; background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.card .ph svg { width: 34px; height: 34px; stroke-width: 1.5; }
.card .hover-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .15s; }
.card .hover-play span { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); }
.card .hover-play svg { fill: currentColor; stroke: none; margin-left: 3px; }
.card:hover .hover-play { opacity: 1; }
.card .t { margin-top: 8px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .s { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .progress, .ep .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.6); }
.card .progress i, .ep .progress i { display: block; height: 100%; background: var(--accent); }
.flag { position: absolute; top: 6px; right: 6px; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.flag.seen { background: rgba(0,0,0,.65); color: var(--accent); padding: 0; width: 24px; }
.flag.seen svg { width: 14px; height: 14px; stroke-width: 3; }

/* ---------- library toolbar ---------- */
.lib-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 10px 0 22px; }
.lib-head h1 { margin: 0 12px 0 0; font-size: 26px; letter-spacing: -.02em; }
.lib-head .count { color: var(--muted); }
.lib-head .spacer { flex: 1; }

/* ---------- detail page ---------- */
.detail { position: relative; isolation: isolate; margin: -70px -32px 0; padding: 96px 32px 24px; min-height: 420px; }
.backdrop { position: absolute; inset: 0 0 auto; height: 560px; overflow: hidden; z-index: -1; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: saturate(1.1); }
.backdrop.blur img { filter: blur(28px) saturate(1.3); transform: scale(1.15); opacity: .45; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(14,15,18,.7) 45%, rgba(14,15,18,.3) 100%), linear-gradient(transparent 40%, var(--bg)); }
.detail-body { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }
.detail-body.music { grid-template-columns: 260px 1fr; }
.detail-poster { border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.6); background: var(--surface); aspect-ratio: 2 / 3; }
.detail-poster.square { aspect-ratio: 1; }
.detail-poster.round { border-radius: 50%; aspect-ratio: 1; }
.detail-poster.landscape { aspect-ratio: 16 / 9; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.crumbs a:hover { color: var(--accent); }
.detail h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.02em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); margin-bottom: 18px; }
.meta .rating { color: var(--text); display: inline-flex; align-items: center; gap: 4px; }
.meta .rating svg { width: 15px; height: 15px; fill: var(--accent); stroke: none; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 21px; font-weight: 600; background: var(--surface-2); transition: background .15s, transform .1s; }
.btn:hover { background: #31363f; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #f6b84c; }
.btn.primary svg { fill: currentColor; stroke: none; }
.btn.round { width: 42px; padding: 0; justify-content: center; }
.btn.on svg { stroke: var(--accent); }
.overview { max-width: 760px; color: #cfd3da; font-size: 15px; line-height: 1.65; margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; font-size: 13px; color: var(--muted); max-width: 760px; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; color: var(--muted); word-break: break-word; }

/* seasons & episodes */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 26px 0 16px; padding-bottom: 4px; }
.tabs button { padding: 8px 16px; border-radius: 18px; background: var(--surface); color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button.on { background: var(--text); color: var(--bg); }
.episodes { display: flex; flex-direction: column; gap: 4px; }
.ep { display: grid; grid-template-columns: 220px 1fr auto; gap: 18px; align-items: center; padding: 10px; border-radius: var(--radius); transition: background .15s; cursor: pointer; }
.ep:hover { background: var(--surface); }
.ep .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.ep .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep .thumb .hover-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .15s; }
.ep:hover .hover-play { opacity: 1; }
.ep .hover-play svg { width: 34px; height: 34px; fill: #fff; stroke: none; }
.ep h3 { margin: 0 0 3px; font-size: 15px; font-weight: 600; }
.ep h3 small { color: var(--muted); font-weight: 500; margin-right: 6px; }
.ep p { margin: 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep .side { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.ep .seen-mark svg { stroke: var(--accent); stroke-width: 3; width: 18px; height: 18px; }

/* tracklist */
.tracks { width: 100%; border-collapse: collapse; margin-top: 8px; }
.tracks td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tracks tr { cursor: pointer; transition: background .12s; }
.tracks tr:hover td { background: var(--surface); }
.tracks td.n { width: 44px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.tracks td.d { width: 70px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.tracks tr.playing td { color: var(--accent); }
.tracks .disc td { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; cursor: default; background: none !important; padding-top: 18px; }

/* ---------- search & empty ---------- */
.empty { max-width: 520px; margin: 12vh auto; text-align: center; color: var(--muted); }
.empty svg { width: 48px; height: 48px; stroke-width: 1.5; color: var(--dim); margin-bottom: 14px; }
.empty h2 { color: var(--text); font-size: 20px; margin: 0 0 8px; }
.empty p { margin: 0 0 18px; }
.empty code { background: var(--surface); padding: 2px 6px; border-radius: 4px; color: var(--text); font-size: 12.5px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- settings ---------- */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; max-width: 760px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 4px; font-size: 16px; }
.panel p.hint { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.ok { color: #5fcf8a; } .no { color: var(--dim); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(360px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login h1 { margin: 0 0 18px; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.login-logo { height: 40px; width: auto; display: block; margin: 0 auto 6px; }
.login h1 { justify-content: center; }
.login label { display: block; font-weight: 500; margin-bottom: 6px; }
.login input { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; margin-bottom: 8px; }
.login input:focus { outline: none; border-color: var(--accent); }
.login .err { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.login .btn { width: 100%; justify-content: center; }

/* ---------- video player ---------- */
.player { position: fixed; inset: 0; z-index: 100; background: #000; cursor: none; }
.player.ui-on { cursor: default; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; transition: opacity .25s; pointer-events: none; }
.player.ui-on .player-ui, .player.paused .player-ui { opacity: 1; pointer-events: auto; }
.player-top { display: flex; align-items: center; gap: 14px; padding: 18px 22px 60px; background: linear-gradient(rgba(0,0,0,.75), transparent); }
.player-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.player-title strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-title span { color: #c3c7cf; font-size: 13px; }
.player-top .badge { color: #c3c7cf; border-color: rgba(255,255,255,.25); }
.player-bottom { padding: 0; }
.player-top .spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; transition: background .15s; }
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn svg { width: 22px; height: 22px; }
.i-pause { display: none; }
.playing .i-play { display: none; } .playing .i-pause { display: block; }
#pPlay svg, #mPlay svg { fill: currentColor; stroke: none; }
.seek { position: relative; height: 18px; cursor: pointer; display: flex; align-items: center; margin-bottom: 6px; }
.seek::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); transition: height .12s; }
.seek:hover::before, .seek:hover .seek-fill, .seek:hover .seek-buffer { height: 6px; }
.seek-buffer, .seek-fill { position: absolute; left: 0; height: 4px; border-radius: 2px; transition: height .12s; }
.seek-buffer { background: rgba(255,255,255,.35); }
.seek-fill { background: var(--accent); }
.seek-fill::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .12s; }
.seek:hover .seek-fill::after { transform: scale(1); }
.seek-hover { position: absolute; bottom: 22px; padding: 3px 8px; background: rgba(0,0,0,.85); border-radius: 4px; font-size: 12px; font-variant-numeric: tabular-nums; transform: translateX(-50%); opacity: 0; pointer-events: none; }
.seek:hover .seek-hover { opacity: 1; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.player-controls .time { font-variant-numeric: tabular-nums; font-size: 13.5px; color: #dfe2e7; margin-left: 8px; white-space: nowrap; }
.player-controls .spacer { flex: 1; }
.volume { display: flex; align-items: center; }
.muted .waves { display: none; }
.btn-next { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(255,255,255,.14); font-weight: 600; font-size: 13px; margin-right: 6px; }
.btn-next:hover { background: rgba(255,255,255,.22); }
.btn-next svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; bottom: 48px; width: 280px; max-height: 60vh; overflow-y: auto; background: rgba(22,24,29,.97); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.menu h4 { margin: 8px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; text-align: left; font-size: 13.5px; }
.menu button:hover { background: var(--surface-2); }
.menu button.on { color: var(--accent); }
.menu button.on::after { content: "✓"; }
.subtitle-layer { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); width: min(90%, 1100px); text-align: center; pointer-events: none; transition: bottom .25s; }
.player.ui-on .subtitle-layer, .player.paused .subtitle-layer { bottom: 19%; }
.subtitle-layer span { display: inline; padding: 2px 8px; background: rgba(0,0,0,.72); border-radius: 4px; font-size: clamp(16px, 2.4vw, 30px); line-height: 1.5; font-weight: 500; white-space: pre-line; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.player-spinner { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; }
.player.loading .player-spinner { display: grid; }
.player-spinner span { width: 54px; height: 54px; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- music bar: siehe „Player-Dock“ ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--bar)); transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: var(--radius); z-index: 200; box-shadow: 0 6px 20px rgba(0,0,0,.4); }


/* ---------- IMDb ---------- */
.imdb { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px 0 0; border-radius: 4px; background: rgba(245,197,24,.12); color: var(--text); font-size: 13px; font-weight: 600; overflow: hidden; }
.imdb b { background: #f5c518; color: #000; font-weight: 800; padding: 0 6px; height: 100%; display: inline-flex; align-items: center; font-size: 12px; letter-spacing: -.02em; }
.imdb:hover { background: rgba(245,197,24,.22); }
.imdb:not(:has(span)) { padding-right: 0; }

/* ---------- Daten korrigieren ---------- */
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface); }
.btn.ghost svg { width: 18px; height: 18px; }
.dlg.wide { max-width: 760px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.fm-head { display: flex; align-items: center; justify-content: space-between; }
.fm-head h3 { margin: 0; }
.fm-tabs { margin: 14px 0 16px; align-self: flex-start; }
#fmSearch { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.fm-row { display: flex; gap: 10px; align-items: flex-end; }
.fm-q { flex: 1; min-width: 0; } .fm-y { width: 110px; }
.fm-row .btn { height: 44px; }
.fm-res { margin-top: 14px; overflow-y: auto; min-height: 120px; max-height: 56vh; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.fm-hit { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 10px; border: 1px solid transparent; }
.fm-hit:hover { background: var(--surface); }
.fm-hit.cur { border-color: var(--line); background: var(--surface); }
.fm-pos { width: 56px; height: 84px; border-radius: 6px; overflow: hidden; background: var(--surface-2); flex: none; }
.fm-pos img { width: 100%; height: 100%; object-fit: cover; }
.fm-txt { flex: 1; min-width: 0; }
.fm-txt b { font-weight: 600; }
.fm-yr { color: var(--muted); }
.fm-txt small { display: block; color: var(--dim); font-size: 12.5px; }
.fm-txt p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dlg textarea { width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.dlg textarea:focus { outline: none; border-color: var(--accent); }
.dlg code { color: var(--text); font-size: 12.5px; word-break: break-all; }
#fmEdit label { display: block; }
@media (max-width: 860px) { .fm-row { flex-wrap: wrap; } .fm-q { flex-basis: 100%; } .fm-hit .btn { padding: 0 10px; } }

/* Bild ändern */
#fmImg { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.fm-kind { align-self: flex-start; margin-bottom: 12px; }
.fm-cur { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.fm-cur img { width: 64px; height: 96px; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: none; }
.fm-cur img.backdrop { width: 140px; height: 79px; }
.fm-upl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fm-upl label.btn { cursor: pointer; height: 42px; display: inline-flex; align-items: center; gap: 8px; }
.fm-upl label.btn svg { width: 18px; height: 18px; }
.fm-upl input { flex: 1; min-width: 200px; height: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.fm-upl input:focus { outline: none; border-color: var(--accent); }
.fm-gal { overflow-y: auto; max-height: 46vh; margin-top: 4px; }
.fm-sub { color: var(--dim); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 8px; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.fm-gal.backdrop .fm-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.fm-tile { position: relative; border-radius: 6px; overflow: hidden; background: var(--surface-2); aspect-ratio: 2 / 3; padding: 0; outline: 2px solid transparent; transition: outline-color .12s, transform .12s; }
.fm-gal.backdrop .fm-tile { aspect-ratio: 16 / 9; }
.fm-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-tile span { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.7); font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.fm-tile:hover { outline-color: var(--accent); transform: scale(1.03); }
.fm-tile.busy { opacity: .5; }

/* ---------- Scan-Steuerung ---------- */
.btn.danger-outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--danger); }
.btn.danger-outline:hover { background: rgba(239,91,91,.12); }
.btn[disabled] { opacity: .6; cursor: default; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; gap: 2px; }
.switch-row small { color: var(--muted); font-size: 13px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 26px; border-radius: 13px; background: var(--surface-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.scan-stop { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--danger); padding: 4px 0; }
.scan-stop:hover { text-decoration: underline; }

/* ---------- Play-Knopf auf Covern ---------- */
.qplay { position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #ffb01f 0%, #ff5a1f 45%, #ff1f6b 100%); box-shadow: 0 8px 22px rgba(255, 50, 90, .5), 0 2px 6px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(10px); transition: opacity .2s var(--ease), transform .2s var(--ease), box-shadow .2s; }
.qplay svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.qplay .qi-play { margin-left: 2px; }
.qplay .qi-pause, .qplay.on .qi-play { display: none; }
.qplay.on .qi-pause { display: block; }
.card:hover .qplay, .card:focus-within .qplay, .qplay.cur { opacity: 1; transform: none; }
.qplay:hover { transform: scale(1.08) !important; box-shadow: 0 10px 28px rgba(255, 50, 90, .7), 0 2px 6px rgba(0,0,0,.4); }
.qplay:active { transform: scale(.95) !important; }
.qplay.busy { animation: qpulse .8s ease-in-out infinite; }
@keyframes qpulse { 50% { box-shadow: 0 0 0 8px rgba(255, 50, 90, .25), 0 8px 22px rgba(255, 50, 90, .5); } }
.card.round .qplay { right: 12%; bottom: 12%; }
@media (hover: none) { .qplay { opacity: 1; transform: none; width: 40px; height: 40px; right: 6px; bottom: 6px; } .qplay svg { width: 22px; height: 22px; } }

/* ---------- playlists ---------- */
.sidebar nav { min-height: 0; }
.side-pl { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-pl-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px 12px; color: var(--dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.side-pl-head .icon-btn { color: var(--muted); }
.side-pl-head .icon-btn:hover { color: var(--text); }
.side-pl-list { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.sidebar nav a.side-pl-item { gap: 10px; padding: 6px 8px; }
.side-pl-item .pl-cover { width: 40px; height: 40px; border-radius: 4px; flex: none; }
.side-pl-item span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-pl-item b { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.side-pl-item small { color: var(--dim); font-size: 12px; }
.sidebar nav a.side-pl-item.active { background: var(--surface-2); }
.sidebar nav a.side-pl-item.active b { color: var(--accent); }
body.dragging .side-pl-item { outline: 1px dashed transparent; }
body.dragging .side-pl-list { background: rgba(240,168,48,.04); border-radius: var(--radius); }
.side-pl-item.drop-on { background: rgba(240,168,48,.18) !important; box-shadow: inset 0 0 0 2px var(--accent); }

.pl-cover { position: relative; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; width: 100%; height: 100%; color: var(--dim); }
.pl-cover > img { width: 100%; height: 100%; object-fit: cover; }
.pl-cover.mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pl-cover.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.pl-cover.likes { background: linear-gradient(135deg, #f0a830 0%, #c2410c 100%); color: #fff; }
.pl-cover.likes svg { width: 42%; height: 42%; fill: #fff; stroke: none; }
.pl-cover.pl-none svg { width: 38%; height: 38%; }
.side-pl-item .pl-cover.likes svg, .pl-menu .pl-cover.likes svg { width: 50%; height: 50%; }
.card .art .pl-cover { position: absolute; inset: 0; }
.card .art .pl-cover img { position: static; opacity: 1; }
.grid.pl-grid { --card-w: 180px; }
.card:hover .art .pl-cover img { transform: none; }

.pl-detail .pl-poster { aspect-ratio: 1; }
.pl-detail .pl-poster .pl-cover.likes svg { width: 36%; height: 36%; }
.pl-title { font: inherit; letter-spacing: inherit; text-align: left; padding: 0; border-radius: 6px; }
.pl-title:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.pl-desc { color: var(--muted); margin: -4px 0 12px; max-width: 640px; }
.pl-detail .actions { align-items: center; }
.pl-detail .actions .icon-btn svg { width: 24px; height: 24px; }
.pl-detail .actions button[disabled] { opacity: .45; cursor: default; }
.pl-detail .tracks, .pl-detail .pl-reco { margin-top: 28px; }

.tracks th { text-align: left; font-weight: 500; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; padding: 0 12px 8px; border-bottom: 1px solid var(--line); }
.tracks th.n, .tracks th.d { text-align: right; }
.tracks .tt { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tracks .tt img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--surface-2); flex: none; }
.tracks .tt > span { display: flex; flex-direction: column; min-width: 0; }
.tracks .tt b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracks .sub { color: var(--muted); font-size: 13px; }
.tracks a.sub:hover { color: var(--text); text-decoration: underline; }
.tracks td.act { width: 40px; padding: 0 2px; }
.tracks td.act .icon-btn { color: var(--muted); opacity: 0; transition: opacity .12s, color .12s; }
.tracks tr:hover td.act .icon-btn, .tracks tr:focus-within td.act .icon-btn, .tracks td.act .heart.on { opacity: 1; }
.tracks td.act .icon-btn:hover { color: var(--text); }
.heart.on { color: var(--accent) !important; }
.heart.on svg { fill: var(--accent); }
.tracks tr.gone { opacity: .4; }
.pl-tracks td.n { position: relative; }
.pl-tracks .grip { display: none; position: absolute; left: 4px; top: 50%; transform: translateY(-50%); color: var(--dim); cursor: grab; }
.pl-tracks tr:hover .grip { display: block; }
.pl-tracks tr.drag-src { opacity: .4; }
.pl-tracks tr.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
.pl-tracks tr.drop-after td { box-shadow: inset 0 -2px 0 var(--accent); }
.btn.sm-btn { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #f27171; }

.pl-menu { position: fixed; z-index: 300; width: 270px; max-height: min(420px, 70vh); overflow-y: auto; background: #1d2026; border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.pl-menu h4 { margin: 8px 10px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.pl-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.pl-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; text-align: left; font-size: 13.5px; min-height: 36px; }
.pl-menu button:hover, .pl-menu button:focus-visible { background: var(--surface-2); }
.pl-menu button svg { width: 18px; height: 18px; color: var(--muted); }
.pl-menu button span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-menu button.on::after { content: ""; width: 14px; height: 8px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-2px); flex: none; }
.pl-menu button.danger, .pl-menu button.danger svg { color: var(--danger); }
.pl-menu .pl-cover { width: 28px; height: 28px; border-radius: 3px; flex: none; }

.dlg-wrap { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; }
.dlg { width: 100%; max-width: 420px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.dlg h3 { margin: 0 0 14px; font-size: 18px; }
.dlg p { color: var(--muted); margin: 0 0 14px; }
.dlg label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.dlg input { width: 100%; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.dlg input:focus { outline: none; border-color: var(--accent); }
.dlg .dlg-err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin: 6px 0 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }



@media (max-width: 860px) {
  .side-pl { display: none; }
  .grid.pl-grid { --card-w: 140px; }
  .hide-m { display: none; }
  .tracks td.act .icon-btn { opacity: 1; }
  .pl-tracks th { display: none; }
  .pl-tracks .grip { display: none !important; }
  .pl-menu { width: min(300px, calc(100vw - 16px)); }
}
@media (hover: none) { .tracks td.act .icon-btn { opacity: 1; } }


/* ---------- Player-Dock (Musik & Video) ---------- */
.dock { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; }
.dock-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dock-art { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: var(--surface-2); flex: none; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.dock-art.poster { width: 48px; height: 72px; }
.dock-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.dock-info strong { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-info span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-info small { color: var(--dim); font-size: 12.5px; font-variant-numeric: tabular-nums; margin-top: 1px; }
.dock-center { display: flex; align-items: center; gap: 6px; }
.dock-center .icon-btn { color: #d5d9e0; }
.dock-center .icon-btn:hover { color: #fff; }
.dock-center svg.fill, .dock-right svg.fill { fill: currentColor; stroke: none; }
.dock-play { width: 46px; height: 46px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); margin: 0 4px; }
.dock-play:hover { background: rgba(255,255,255,.18); }
.dock-play svg { width: 22px; height: 22px; fill: #fff; stroke: none; }
.dock-play .i-play { margin-left: 2px; }
.dock-stop svg { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.dock-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; min-width: 0; }
.dock-right .icon-btn { color: var(--muted); width: 38px; height: 38px; position: relative; }
.dock-right .icon-btn:hover { color: var(--text); }
.dock-right .icon-btn svg { width: 19px; height: 19px; }
.dock-right .icon-btn.on { color: var(--accent); }
.dock-right .icon-btn.on::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.rep1 { display: none; position: absolute; top: 7px; right: 6px; font-size: 9px; font-weight: 800; line-height: 1; background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 1px 3px; }
#mRepeat.one .rep1 { display: block; }
.ico-num { font: 700 7.5px Inter, sans-serif; fill: currentColor; stroke: none; }
.muted .waves { display: none; }

/* Lautstärke: schmaler Regler mit Akzentfarbe */
.dock-right .volume { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.dock-right .volume input, .player .volume input { -webkit-appearance: none; appearance: none; width: 96px; height: 4px; border-radius: 2px; opacity: 1; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) var(--v, 100%), rgba(255,255,255,.18) var(--v, 100%)); }
.dock-right .volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.dock-right .volume input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }

/* Musikleiste */
.musicbar { position: fixed; left: 0; right: 0; bottom: 0; height: 88px; z-index: 50; padding: 0 20px; background: rgba(24,26,31,.98); border-top: 1px solid #000; backdrop-filter: blur(12px); }
body.has-music { --bar: 88px; }
.musicbar .dock-left .heart { width: 34px; height: 34px; color: var(--muted); flex: none; }
.musicbar .dock-left .heart:hover { color: var(--text); }
.musicbar .dock-info strong { cursor: pointer; }
.musicbar .dock-info strong:hover, .musicbar .dock-info span:hover { text-decoration: underline; cursor: pointer; }
.mb-seek { position: absolute; left: 0; right: 0; top: -7px; height: 14px; cursor: pointer; touch-action: none; z-index: 2; }
.mb-seek::before, .mb-buf, .mb-fill { content: ""; position: absolute; left: 0; top: 5px; height: 3px; transition: height .12s, top .12s; }
.mb-seek::before { right: 0; background: rgba(255,255,255,.1); }
.mb-buf { width: 0; background: rgba(255,255,255,.18); }
.mb-fill { width: 0; background: var(--accent); }
.mb-fill::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.6); transform: scale(0); transition: transform .12s; }
.mb-seek:hover::before, .mb-seek:hover .mb-buf, .mb-seek:hover .mb-fill, .mb-seek.drag::before, .mb-seek.drag .mb-buf, .mb-seek.drag .mb-fill { top: 4px; height: 5px; }
.mb-seek:hover .mb-fill::after, .mb-seek.drag .mb-fill::after { transform: scale(1); }
.mb-seek .seek-hover { bottom: 16px; }
.mb-seek:hover .seek-hover { opacity: 1; }
.mb-queue { position: absolute; right: 16px; bottom: calc(100% + 10px); width: 380px; max-height: min(520px, 65vh); overflow-y: auto; background: #1d2026; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.q-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 4px; }
.q-head h4 { margin: 0; font-size: 15px; }
.q-clear { color: var(--accent); font-weight: 600; font-size: 13px; }
.q-sub { padding: 10px 8px 4px; color: var(--dim); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.q-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.q-row:hover { background: var(--surface-2); }
.q-row img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--surface-2); flex: none; }
.q-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.q-row b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row em { font-style: normal; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.q-row.now b { color: var(--accent); }
.q-row.now em { margin-right: 32px; }
.q-row .q-rm { color: var(--dim); opacity: 0; }
.q-row:hover .q-rm { opacity: 1; }
.q-empty { color: var(--muted); padding: 8px; margin: 0; font-size: 13px; }

/* Video: gleiches Dock unten im Player */
.player-bottom .seek { margin: 0 22px; }
.player-bottom .dock { padding: 10px 22px 18px; }
.player-bottom { background: linear-gradient(transparent, rgba(0,0,0,.6) 40%, rgba(0,0,0,.88)); padding-top: 70px; }
.player .dock-info span { color: #c3c7cf; }
.player .dock-info small { color: #aab0ba; }
.player .dock-right .icon-btn { color: #d5d9e0; }
.player .volume input { width: 96px; }
.player .menu { bottom: 52px; }

@media (max-width: 860px) {
  .musicbar { bottom: calc(60px + env(safe-area-inset-bottom)); height: 68px; padding: 0 10px; }
  body.has-music { --bar: 68px; }
  .musicbar.dock { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .musicbar .dock-art { width: 48px; height: 48px; }
  .musicbar .dock-right, #mPrev, #mStop, .musicbar .dock-info small { display: none; }
  .musicbar .dock-play { width: 42px; height: 42px; }
  .player .dock { grid-template-columns: 1fr; gap: 6px; padding: 8px 12px 12px; }
  .player .dock-left { display: none; }
  .player .dock-center { justify-content: center; }
  .player .dock-right { justify-content: center; }
  .player .volume { display: none; }
  .player-bottom .seek { margin: 0 12px; }
  .mb-queue { left: 8px; right: 8px; width: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  :root { --side: 0px; }
  body { --nav: 60px; }
  body.has-music { --bar: 64px; }
  .sidebar { inset: auto 0 0 0; width: auto; height: calc(60px + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); flex-direction: row; border-right: 0; border-top: 1px solid var(--line); }
  .brand, .scan-status { display: none; }
  .sidebar nav { flex-direction: row; justify-content: space-around; }
  .sidebar nav a { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 11px; flex: 1; justify-content: center; }
  .sidebar nav a.active { background: none; color: var(--accent); }
  .nav-settings { margin-top: 0; }
  .main { padding-bottom: calc(60px + var(--bar) + env(safe-area-inset-bottom)); }
  .topbar { padding: 12px 16px; }
  #view { padding: 4px 16px 32px; }
  .row { --card-w: 120px; gap: 12px; }
  .row.wide { --card-w: 220px; }
  .grid { --card-w: 108px; gap: 18px 12px; }
  .detail { margin: -64px -16px 0; padding: 84px 16px 16px; }
  .detail-body, .detail-body.music { grid-template-columns: 1fr; gap: 18px; }
  .detail-poster { width: 150px; }
  .ep { grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; }
  .ep .side { display: none; }
  .player-top { padding: 12px 10px 40px; }
  .player-bottom { padding: 40px 10px 12px; }
  .lib-head h1 { font-size: 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Musik-Übersicht: Reihen-Editor */
.sec-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); }
.sec-row:hover { background: var(--surface); }
.sec-row label { flex: 1; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.sec-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.sec-row.off span:not(.sec-kind) { color: var(--dim); }
.sec-kind { color: var(--dim); font-size: 12px; width: 80px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.lib-head .btn { white-space: nowrap; }

/* iPhone: sichere Bereiche (Notch/Dynamic Island, Home-Leiste) */
@supports (padding: env(safe-area-inset-top)) {
  .topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
  .player-top { padding-top: calc(18px + env(safe-area-inset-top)); padding-left: calc(22px + env(safe-area-inset-left)); padding-right: calc(22px + env(safe-area-inset-right)); }
  .player-bottom { padding-bottom: calc(18px + env(safe-area-inset-bottom)); padding-left: calc(22px + env(safe-area-inset-left)); padding-right: calc(22px + env(safe-area-inset-right)); }
  .toast { bottom: calc(24px + var(--bar) + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) {
  @supports (padding: env(safe-area-inset-top)) {
    .topbar { padding-top: calc(12px + env(safe-area-inset-top)); }
    #view { padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
    .player-top { padding-top: calc(12px + env(safe-area-inset-top)); }
    .player-bottom { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  }
  .toast { bottom: calc(76px + var(--bar) + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); }
}
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .card:hover .art img { transform: none; } .card .hover-play { display: none; } }

/* Hinweis: Zum Home-Bildschirm (iPhone/Safari) */
.home-hint { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 300; display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 14px; background: rgba(32,34,40,.97); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; line-height: 1.4; color: #eceef2; animation: hhIn .3s ease-out; }
.home-hint > div { flex: 1; }
.home-hint b { font-weight: 700; }
.home-hint span { display: block; color: #b9bec8; margin-top: 2px; }
.home-hint span b { color: #eceef2; font-weight: 600; }
.home-hint svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-hint button { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); color: #eceef2; font-size: 14px; flex: none; border: 0; }
@keyframes hhIn { from { transform: translateY(-20px); opacity: 0; } }

/* Sampler: Interpret pro Titel */
.tracks .t-artist { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Duplikate */
.dup-sum { margin: -6px 0 14px; }
.dup-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.dup-tabs .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; }
.dup-tabs .chip.active { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.dup-tabs .chip .n { opacity: .7; font-variant-numeric: tabular-nums; }
.dup-group header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dup-group h2 { margin: 0 0 2px; }
.dup-group ul { list-style: none; margin: 12px 0 0; padding: 0; }
.dup-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.dup-main { flex: 1; min-width: 0; }
.dup-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.dup-line a { color: var(--text); font-weight: 600; text-decoration: none; }
.dup-line a:hover { text-decoration: underline; }
.dup-meta { color: var(--muted); font-size: 13px; }
.dup-best { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #111; background: var(--accent); border-radius: 4px; padding: 2px 6px; }
.dup-path { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; white-space: normal; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 600px) { .dup-group header { flex-direction: column; } }

/* Löschen / Papierkorb */
body:not(.del-on) .del-btn { display: none !important; }
.dup-item .del-btn:hover { color: var(--danger); }
.dlg-path { display: inline-block; margin: 4px 0; font-size: 12.5px; overflow-wrap: anywhere; color: var(--text); }
.trash-list { list-style: none; margin: 14px 0 0; padding: 0; }
.trash-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.trash-list li > div { flex: 1; min-width: 0; }
.trash-list small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.trash-list code { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }
.login-note { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }

/* Fernzugriff */
.remote-steps { margin: 4px 0 14px; padding-left: 20px; }
.remote-code, .text-in { width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.remote-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; resize: vertical; }
.text-in { flex: 1; min-width: 220px; height: 42px; }
.err-text { color: var(--danger); min-height: 18px; margin: 6px 0 0; }
.remote-status { display: flex; align-items: center; gap: 18px; margin: 4px 0 16px; }
.remote-status .globe { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.remote-status .globe svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.remote-status h3 { margin: 0 0 4px; font-size: 18px; }
.remote-status p { margin: 0; color: var(--muted); font-size: 14px; }
.remote-status.ok h3 { color: #3ecf8e; } .remote-status.ok .globe { color: #3ecf8e; background: rgba(62,207,142,.12); }
.remote-status.bad h3 { color: #ef5b5b; } .remote-status.bad .globe { color: #ef5b5b; background: rgba(239,91,91,.1); }
.remote-chain { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.remote-chain span { display: flex; flex-direction: column; min-width: 0; }
.remote-chain small { color: var(--muted); font-size: 12px; }
.remote-chain b { font-weight: 600; overflow-wrap: anywhere; }
.remote-chain b a { color: var(--text); }
.remote-chain i { font-style: normal; font-weight: 700; font-size: 18px; }
.remote-chain i.ok { color: #3ecf8e; } .remote-chain i.bad { color: #ef5b5b; } .remote-chain i.idle { color: var(--muted); }
.remote-warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(240,168,48,.12); color: var(--accent); font-size: 14px; }
.remote-pw { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.remote-log { margin-top: 14px; } .remote-log summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.remote-log pre { white-space: pre-wrap; font-size: 11.5px; color: var(--muted); max-height: 220px; overflow: auto; background: var(--surface); padding: 10px; border-radius: 8px; }

/* Benutzer & Profile */
body:not(.is-admin) .admin-only { display: none !important; }
.avatar { --av: #f0a830; width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: var(--av); color: #111; font-weight: 700; font-size: 15px; line-height: 1; }
.avatar.lg { width: 44px; height: 44px; font-size: 19px; }
.avatar.xl { width: 96px; height: 96px; font-size: 40px; border-radius: 22px; }
.me-wrap { margin-left: auto; position: relative; }
.me-btn { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.me-btn:hover { border-color: var(--muted); }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 50; }
.me-menu a, .me-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.me-menu a:hover, .me-menu button:hover { background: var(--surface); }
.me-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.me-head small { display: block; color: var(--muted); font-size: 12.5px; }
.me-head.big { border: 0; padding: 0; margin: 0; gap: 18px; }
@media (max-width: 600px) { .me-name { display: none; } .me-btn { padding: 3px; } }
.login.profiles { background: radial-gradient(circle at 50% 0%, #1d1f26, var(--bg) 70%); }
.pf-box { width: min(760px, 100%); text-align: center; }
.pf-box h1 { font-size: clamp(24px, 4vw, 34px); margin: 18px 0 30px; }
.pf-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.pf { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border-radius: 16px; width: 140px; transition: opacity .2s, transform .15s; }
.pf .avatar { transition: box-shadow .15s, transform .15s; }
.pf:hover .avatar, .pf:focus-visible .avatar { box-shadow: 0 0 0 3px var(--text); transform: translateY(-2px); }
.pf b { font-size: 16px; } .pf small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.pf small svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.pf.dim { opacity: .35; }
.pin { margin: 26px auto 0; width: min(300px, 100%); }
.pin p { color: var(--muted); margin: 0 0 12px; }
.pin input { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; margin-bottom: 8px; }
.pin .btn { width: 100%; justify-content: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 4px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); transition: background .1s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.pin .err { color: var(--danger); min-height: 20px; font-size: 13px; margin: 6px 0; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-pad button { height: 56px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 20px/1 inherit; font-family: inherit; cursor: pointer; }
.pin-pad button:active { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .pin-dots.shake { animation: none; } .pf, .pf .avatar { transition: none; } }
.user-list { list-style: none; margin: 6px 0 0; padding: 0; }
.user-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.user-list li:first-child { border-top: 0; }
.ul-main { flex: 1; min-width: 0; }
.ul-main small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ul-me { font-size: 11px; font-weight: 700; color: #111; background: var(--accent); border-radius: 4px; padding: 1px 6px; vertical-align: middle; }
.ul-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--text); }
.tag svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.tag.ok { color: #3ecf8e; } .tag.muted { color: var(--muted); }
.dlg.wide .ud-body { overflow: auto; padding-right: 4px; }
.ud-libs { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.dlg label.chk, label.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); margin: 0; cursor: pointer; }
label.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.ud-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ud-row > input { flex: 1; min-width: 160px; }
.ud-row .pin-del { flex: none; height: 44px; border-radius: 8px; padding: 0 18px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: background-color .16s, color .16s, border-color .16s; }
.ud-row .pin-del:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.ud-row .pin-del[aria-pressed="true"] { color: #ff6b6b; border-color: rgba(255,107,107,.55); background: rgba(255,107,107,.08); }
.ud-row .pin-del:active { transform: none; }
.ud-row > input:disabled { opacity: .55; }
.ud-remote { margin-top: 18px !important; }
#udPwBox { margin-top: 10px; }

/* Läuft gerade auf anderen Geräten */
.now-wrap { margin-left: auto; position: relative; }
.now-wrap:not([hidden]) + .me-wrap { margin-left: 0; }
.now-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(62,207,142,.35); background: rgba(62,207,142,.1); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; max-width: 340px; }
.now-btn:hover { background: rgba(62,207,142,.18); }
.now-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-txt em { font-style: normal; color: var(--muted); }
.now-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.now-eq i { width: 3px; background: #3ecf8e; border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.now-eq i:nth-child(2) { animation-delay: -.4s; } .now-eq i:nth-child(3) { animation-delay: -.7s; }
.now-eq.paused i { animation: none; height: 5px; background: var(--muted); }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .now-eq i { animation: none; height: 10px; } }
.now-menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(440px, calc(100vw - 32px)); background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 50; }
.now-menu h4 { margin: 2px 4px 10px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.now-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); }
.now-row:first-of-type { border-top: 0; }
.now-row img { flex: none; border-radius: 6px; object-fit: cover; background: var(--surface); }
.now-row img.sq { width: 56px; height: 56px; } .now-row img.wide { width: 88px; height: 50px; }
.now-main { flex: 1; min-width: 0; }
.now-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-main span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-main small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.now-bar { height: 3px; background: var(--surface-2); border-radius: 2px; margin: 6px 0 3px; overflow: hidden; }
.now-bar i { display: block; height: 100%; background: var(--accent); }
.avatar.xs { width: 16px; height: 16px; font-size: 9px; }
@media (max-width: 600px) { .now-txt { display: none; } .now-btn { padding: 0 12px; } }

/* „Läuft gerade“ schlicht, einfarbig */
.dev-ic { display: inline-flex; width: 14px; height: 14px; margin-right: 2px; color: var(--muted); }
.dev-ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.now-btn { border-color: var(--line); background: var(--surface); }
.now-btn:hover { background: var(--surface-2); }
.now-eq i { background: var(--text); }

/* Versionen & Geräte */
.ver-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.ver-tbl th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 12px 8px 0; white-space: nowrap; width: 1%; }
.ver-tbl td { padding: 8px 12px 8px 0; border-top: 1px solid var(--line); }
.ver-tbl tr:first-child td, .ver-tbl tr:first-child th { border-top: 0; }
.ver-tbl th { border-top: 1px solid var(--line); }
.ver-tbl .muted { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.dev-list { list-style: none; margin: 0; padding: 0; }
.dev-list li { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.dev-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface); display: grid; place-items: center; color: var(--muted); }
.dev-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dl-main { flex: 1; min-width: 0; }
.dl-main small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ver-tag { flex: none; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.ver-tag.old { background: rgba(240,168,48,.15); color: var(--accent); }
@media (max-width: 600px) { .ver-tbl .muted { display: none; } }

.lib-more { min-height: 60px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

/* Cover-Vorschläge */
.fm-cq { margin: 4px 0 12px; }
.fm-grid.sq .fm-tile { aspect-ratio: 1; }
.fm-tile.cv { position: relative; }
.fm-tile.cv span { position: absolute; left: 6px; top: 6px; bottom: auto; right: auto; font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.72); color: #fff; padding: 2px 6px; border-radius: 4px; }
.fm-tile.cv small { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 10.5px; line-height: 1.25; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.85)); overflow: hidden; max-height: 48%; }
.cov-keys { margin: 8px 0 12px; } .cov-keys label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.fm-cq { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.fm-cq .fm-q { flex: 1 1 180px; }
.fm-cq .btn { flex: none; }

/* Überlagerung auf Film-/Serienkarten */
.card .ov { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; opacity: 0; transition: opacity .16s;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.85)); }
.card:hover .ov, .card:focus-within .ov { opacity: 1; }
.card .ov-play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.9); width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink, #111); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.45); transition: transform .15s; }
.card .ov-play:hover { transform: translate(-50%, -50%) scale(1); }
.card .ov-play svg { width: 22px; height: 22px; fill: currentColor; stroke: none; margin-left: 3px; }
.card .ov-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px; }
.card .ov-left { font-size: 11.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); white-space: nowrap; }
.card .ov-acts { display: flex; gap: 2px; background: rgba(15,16,20,.72); border-radius: 999px; padding: 2px; }
.card .ov-btn { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: #e9eaee; display: grid; place-items: center; cursor: pointer; }
.card .ov-btn:hover { background: rgba(255,255,255,.14); }
.card .ov-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .ov-btn[data-ov="more"] svg { fill: currentColor; stroke: none; }
.card .ov-btn.on { color: var(--accent); }
.card .ov-btn[data-ov="save"].on svg { fill: currentColor; }
.ov-menu { position: fixed; z-index: 300; min-width: 200px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 14px 34px rgba(0,0,0,.55); }
.ov-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.ov-menu button:hover { background: var(--surface); }
.ov-menu button.danger { color: var(--danger); }
@media (hover: none) { .card .ov { display: none; } }
@media (prefers-reduced-motion: reduce) { .card .ov, .card .ov-play { transition: none; } }

/* ---------- Bedienleisten: Umschalter (seg) und Auswahlfelder (sel) – einheitlich, ohne Springen ---------- */
.lib-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lib-tabs { margin: -8px 0 22px; }
.seg { --h: 38px; display: inline-flex; align-items: stretch; height: var(--h); padding: 3px; gap: 2px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; vertical-align: middle; }
.seg button { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 100%; box-sizing: border-box;
  padding: 0 14px; margin: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: 0; white-space: nowrap; cursor: pointer;
  transform: none !important; transition: background-color .16s ease, color .16s ease, box-shadow .16s ease; -webkit-tap-highlight-color: transparent; }
.seg button:hover:not(.on) { color: var(--text); background: rgba(255,255,255,.05); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06); }
.seg button.on::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 14px; height: 2px; margin-left: -7px; border-radius: 2px; background: var(--accent); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg button:active { transform: none !important; }
.seg-role { --h: 42px; }
.seg-role button { padding: 0 18px; }
.seg-tabs { --h: 40px; }
.seg-tabs button { padding: 0 16px; font-size: 13.5px; }

select.sel { height: 38px; box-sizing: border-box; min-width: 150px; padding: 0 36px 0 14px; margin: 0;
  border-radius: 12px; border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1ad' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 15px;
  appearance: none; -webkit-appearance: none; cursor: pointer; transform: none !important;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
select.sel:hover { border-color: rgba(255,255,255,.22); background-color: var(--surface-2); }
select.sel:focus { outline: none; }
select.sel:focus-visible, select.sel:active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,169,46,.18); }
select.sel option { background: #1b1e24; color: var(--text); font-weight: 500; }
.btn.sm { height: 38px; padding: 0 16px; font-size: 13px; border-radius: 12px; }
.lib-head .btn.sm:active, .seg *:active { transform: none; }
.lib-head .count { min-width: 80px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .lib-ctl { width: 100%; }
  .lib-tabs { overflow-x: auto; scrollbar-width: none; }
  select.sel { min-width: 0; flex: 1; }
}

/* ---------- Einstellungen: Rubriken-Menü ---------- */
.set-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1060px; }
.set-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; }
.set-nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  font: inherit; text-align: left; cursor: pointer; transform: none !important; transition: background-color .16s ease, color .16s ease; }
.set-nav button svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.set-nav button span { display: flex; flex-direction: column; min-width: 0; }
.set-nav button b { font-size: 14px; font-weight: 600; color: inherit; }
.set-nav button small { font-size: 12px; color: var(--muted); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-nav button:hover:not(.on) { background: rgba(255,255,255,.04); color: var(--text); }
.set-nav button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.set-nav button.on svg { stroke: var(--accent); }
.set-body { min-width: 0; }
.set-body .panel { max-width: none; padding: 18px 22px; margin-bottom: 14px; }
.set-body .panel h2 { font-size: 15px; }
@media (max-width: 900px) {
  .set-layout { grid-template-columns: 1fr; gap: 14px; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 4px; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-nav button { width: auto; flex: none; padding: 8px 12px; }
  .set-nav button small { display: none; }
  .set-nav button.on { box-shadow: inset 0 -2px 0 var(--accent); }
}

/* ---------- Bibliotheken verwalten ---------- */
.lib-list { display: flex; flex-direction: column; margin: 14px 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lib-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.lib-row + .lib-row { border-top: 1px solid var(--line); }
.lib-ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); }
.lib-ic svg, .ld-icons svg, .ld-path svg, .ld-dir svg, .lib-menu svg, .lib-add svg, #ldAdd svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lib-ic svg { stroke: var(--accent); }
.lib-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lib-txt b { font-size: 14px; }
.lib-txt small { color: var(--muted); font-size: 12.5px; }
.lib-path { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.lib-acts .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.lib-acts .icon-btn:hover { background: rgba(239,91,91,.12); color: var(--danger); }
.lib-add { margin-bottom: 18px; }
.ld-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-icons button { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background-color .15s; }
.ld-icons button:hover { color: var(--text); }
.ld-icons button.on { border-color: var(--accent); color: var(--accent); background: rgba(240,168,48,.08); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.seg button.on:disabled { opacity: 1; }
.ld-paths { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ld-path { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.ld-path svg { color: var(--accent); flex: none; }
.ld-path code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ld-path .icon-btn.sm { width: 30px; height: 30px; color: var(--muted); }
.ld-browser { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 8px; background: var(--surface); }
.ld-bhead { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); min-height: 44px; box-sizing: border-box; }
.ld-bhead code { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-up { flex: none; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 12.5px; border: 0; cursor: pointer; }
.ld-blist { max-height: 260px; overflow: auto; padding: 4px; }
.ld-dir { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ld-dir:hover { background: rgba(255,255,255,.05); }
.ld-dir svg { color: var(--muted); flex: none; }
.ld-dir span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-dir i { color: var(--muted); font-style: normal; }
.ld-bfoot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ld-bfoot > span { flex: 1; }
/* ⋯ an Bibliotheken in der Seitenleiste */
.sidebar nav a.lib-link { position: relative; }
.nav-more { margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s, background-color .15s; }
.nav-more svg { width: 18px; height: 18px; fill: currentColor; stroke: none !important; }
.sidebar nav a.lib-link:hover .nav-more, .nav-more:focus-visible { opacity: 1; }
.nav-more:hover { background: rgba(255,255,255,.08); color: var(--text); }
.lib-menu { position: fixed; z-index: 400; min-width: 230px; padding: 6px; background: #1b1e24; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.lib-menu-head { padding: 6px 10px 8px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.lib-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.lib-menu button:hover { background: rgba(255,255,255,.06); }
.lib-menu button svg { color: var(--muted); }
.lib-menu button.danger { color: var(--danger); }
.lib-menu button.danger svg { color: var(--danger); }
@media (max-width: 860px) {
  .nav-more { display: none; }
  .sidebar nav { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a { flex: 1 0 62px; min-width: 62px; }
  .sidebar nav a span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 640px) {
  .lib-row { flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; }
  .lib-txt { flex: 1 1 calc(100% - 54px); }
  .lib-acts { flex: 1 1 100%; padding-left: 52px; }
  .lib-acts .btn.sm { flex: 1; justify-content: center; }
}
@media (hover: none) { .nav-more { opacity: 1; } }

/* Intro/Abspann überspringen */
.skip-btn { position: absolute; right: 32px; bottom: 132px; z-index: 6; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.35); background: rgba(16,17,21,.78); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0,0,0,.4); transition: background-color .15s, border-color .15s; animation: skipIn .25s ease; }
.skip-btn:hover { background: #fff; color: #111; border-color: #fff; }
.skip-btn svg { width: 16px; height: 16px; fill: currentColor; }
@keyframes skipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .skip-btn { right: 16px; bottom: 110px; height: 42px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .skip-btn { animation: none; } }

/* FSK-Kennzeichen (Farben wie auf DVD/Blu-ray) */
.fsk { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: #111; background: #ddd; }
.fsk-0 { background: #fff; } .fsk-6 { background: #ffd700; } .fsk-12 { background: #2fa84f; color: #fff; } .fsk-16 { background: #2b7de9; color: #fff; } .fsk-18 { background: #e5352b; color: #fff; }

/* Update-Upload */
.upd-drop { display: flex; align-items: center; gap: 14px; margin: 12px 0 0; padding: 18px; border: 1.5px dashed rgba(255,255,255,.18); border-radius: 12px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.upd-drop:hover, .upd-drop.over { border-color: var(--accent); background: rgba(240,168,48,.06); }
.upd-drop.busy { pointer-events: none; opacity: .6; }
.upd-drop svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.upd-drop span { display: flex; flex-direction: column; gap: 2px; }
.upd-drop small { color: var(--muted); font-size: 12.5px; }
.upd-prog { height: 6px; margin-top: 10px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.upd-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* ---------- Statistik ---------- */
.st-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 16px; }
.st-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.st-kpis > div { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.st-kpis small { color: var(--muted); font-size: 12px; font-weight: 600; }
.st-kpis b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.st-kpis span { color: var(--muted); font-size: 12.5px; }
.st-h { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; }
.st-days { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; align-items: end; height: 120px; padding: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.st-day { height: 100%; display: flex; flex-direction: column-reverse; border-radius: 3px; overflow: hidden; }
.st-day:hover { background: rgba(255,255,255,.05); }
.st-day i { display: block; width: 100%; min-height: 0; }
.st-day i.v, .st-legend i.v, .st-bar i.v { background: var(--accent); }
.st-day i.a, .st-legend i.a, .st-bar i.a { background: #5b8def; }
.st-legend { display: flex; gap: 16px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
.st-user { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.st-user > div { flex: 1; min-width: 0; }
.st-user b { font-size: 14px; }
.st-user small { color: var(--muted); font-size: 12px; }
.st-bar { display: flex; height: 6px; margin: 5px 0 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.st-bar i { display: block; height: 100%; }
.st-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 70px; }
.st-hours i { display: block; border-radius: 2px 2px 0 0; background: var(--accent); opacity: .8; }
.st-hlab { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.st-list { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.st-list li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; counter-increment: st; }
.st-list li::before { content: counter(st); width: 18px; flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.st-list li > a, .st-list li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.st-list li > a:hover { color: var(--accent); }
.st-list small { color: var(--muted); }
.st-list em { font-style: normal; color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-recent { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.st-rec { display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: var(--text); }
.st-rec + .st-rec { border-top: 1px solid var(--line); }
.st-rec:hover { background: rgba(255,255,255,.03); }
.st-rtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-rec .avatar, .st-user .avatar { flex: none; }
.st-rec b, .st-rec small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-rec b { font-size: 14px; }
.st-rec small { color: var(--muted); font-size: 12px; }
.st-rmeta { display: flex; flex-direction: column; align-items: flex-end; font-size: 12.5px; color: var(--text); text-align: right; flex: none; }
.st-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.st-lib > div { padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.st-lib b { font-size: 13px; color: var(--muted); font-weight: 600; }
.st-lib span { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-lib small { color: var(--muted); font-size: 12px; }
.st-disk { margin-top: 10px; }
.st-dlab { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.st-dlab span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-dbar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.st-dbar i { display: block; height: 100%; background: var(--accent); }
.st-dbar.full i { background: var(--danger); }
@media (max-width: 760px) { .st-grid { grid-template-columns: 1fr; } .st-kpis { grid-template-columns: 1fr 1fr; } .st-rmeta { display: none; } }

/* Pfeile an querlaufenden Reihen (nur mit Maus) */
.hs { position: relative; }
.hs-on .row { scrollbar-width: none; }
.hs-on .row::-webkit-scrollbar { display: none; }
.hs-btn { position: absolute; top: var(--hs-y, 40%); z-index: 4; width: 42px; height: 42px; margin-top: -21px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center;
  background: rgba(24,26,31,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--text); box-shadow: 0 6px 22px rgba(0,0,0,.6); cursor: pointer;
  opacity: 0; pointer-events: none; transform: scale(.85); transition: opacity .18s, transform .18s, background-color .15s; }
.hs-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hs-btn:hover { background: rgba(44,47,55,.97); color: var(--accent); }
.hs-btn.l { left: -8px; } .hs-btn.r { right: -8px; }
.hs:hover.can-l .hs-btn.l, .hs:hover.can-r .hs-btn.r, .hs-btn:focus-visible { opacity: 1; pointer-events: auto; transform: scale(1); }
.hs.can-r > .row { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 70px), transparent); }
.hs.can-l.can-r > .row { -webkit-mask-image: linear-gradient(to right, transparent, #000 70px, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(to right, transparent, #000 70px, #000 calc(100% - 70px), transparent); }
.hs.can-l:not(.can-r) > .row { -webkit-mask-image: linear-gradient(to right, transparent, #000 70px); mask-image: linear-gradient(to right, transparent, #000 70px); }
.st-disk { padding: 14px 16px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); margin-top: 12px; }
.st-dlab b { color: var(--text); font-weight: 600; }
.st-stack { display: flex; gap: 2px; height: 10px; border-radius: 5px; }
.st-stack i { flex: none; min-width: 3px; }
.st-stack i:first-child { border-radius: 5px 0 0 5px; }
.st-dbar.st-stack.full { box-shadow: 0 0 0 1px var(--danger); }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.st-legend i.free { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.st-legend em { font-style: normal; color: var(--text); font-weight: 500; }
.st-dpath { display: block; margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.scan-status .bar.busy i { animation: scanBusy 1.2s ease-in-out infinite; }
@keyframes scanBusy { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .scan-status .bar.busy i { animation: none; } }

/* Hinweis im Player, wenn das Umwandeln zu langsam ist */
.p-hint { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); z-index: 6; width: min(460px, calc(100% - 32px)); padding: 16px 18px; border-radius: 14px;
  background: rgba(24,26,31,.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 18px 50px rgba(0,0,0,.6); color: var(--text); font-size: 13.5px; }
.p-hint b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.p-hint span { display: block; color: var(--muted); }
.p-hint div { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- Radio (Einstellungen) ---------- */
.rd-list { display: flex; flex-direction: column; margin: 14px 0 6px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rd-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; }
.rd-row + .rd-row, .rd-edit + .rd-row, .rd-row + .rd-edit { border-top: 1px solid var(--line); }
.rd-logo { position: relative; width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.rd-logo svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rd-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
.rd-txt { flex: 1; min-width: 0; }
.rd-txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-txt small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.rd-acts .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.rd-h { margin: 22px 0 8px; font-size: 14px; font-weight: 600; }
.rd-search { display: flex; gap: 8px; }
.rd-search .input, .rd-form .input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; outline: none; }
.rd-search .input:focus, .rd-form .input:focus { border-color: var(--accent); }
.rd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: color .12s, border-color .12s; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.rd-res { max-height: 460px; overflow-y: auto; }
.rd-own { margin-top: 18px; }
.rd-own summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.rd-own summary:hover { color: var(--text); }
.rd-form { display: grid; gap: 10px; padding: 12px 0 4px; }
.rd-edit { padding: 12px 14px 14px; background: var(--bg-2); }
.rd-form .rd-lab, .rd-form > label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.rd-form .sel { height: 42px; }
.rd-form > .rd-kid { display: flex; align-items: center; gap: 8px; color: var(--text); }
.rd-form .rd-kid input { width: 18px; height: 18px; accent-color: var(--accent); }
.rd-form .actions { margin: 4px 0 0; }
.rd-logo-up { display: flex; align-items: center; gap: 8px; }
.rd-logo-up > span { color: var(--dim); font-size: 12.5px; }
.rd-logo-up .btn { display: inline-flex; align-items: center; cursor: pointer; }
@media (max-width: 640px) { .rd-acts .btn.sm { padding: 0 10px; } .rd-row { flex-wrap: wrap; } .rd-acts { width: 100%; justify-content: flex-end; } }

/* Datensicherung */
.bak-state { padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.bak-state b { color: var(--text); }
.bak-state.warn { border-color: rgba(240,168,48,.5); }
.bak-grid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; margin-top: 12px; }
.bak-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.bak-grid label small { color: var(--dim); }
.bak-grid .sel { height: 40px; }
.bak-ex { display: flex; gap: 8px; }
.bak-ex .input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; outline: none; }
.bak-ex .input:focus { border-color: var(--accent); }
.bak-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 380px; overflow-y: auto; }
.bak-row { display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.bak-row + .bak-row { border-top: 1px solid var(--line); }
.bak-txt { flex: 1; min-width: 0; }
.bak-txt b { display: block; font-weight: 600; font-size: 14px; }
.bak-txt small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) { .bak-grid { grid-template-columns: 1fr; } .bak-row { flex-wrap: wrap; } .bak-txt { flex-basis: 100%; } }

/* Filmreihen */
.coll-btn { display: inline-flex; align-items: center; gap: 7px; }
.coll-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.coll-card { position: relative; min-width: 0; }
.coll-n { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--dim); margin: 0 0 6px 2px; text-transform: uppercase; }
.coll-card.cur .coll-n { color: var(--accent); }
.coll-card.cur .card .art { box-shadow: 0 0 0 2px var(--accent), 0 2px 8px rgba(0,0,0,.35); }
.coll-badge { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.72); color: #fff; font-size: 11.5px; font-weight: 600; }

/* Systemprüfung */
.sys-run { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 10px 0; }
.sys-run .spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: sysspin .8s linear infinite; }
@keyframes sysspin { to { transform: rotate(360deg); } }
.sys-sum { font-weight: 700; font-size: 15px; margin: 4px 0 12px; }
.sys-list { display: grid; gap: 2px; }
.sys-row { display: grid; grid-template-columns: 22px 170px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 14px; }
.sys-row > span:last-child { color: var(--muted); }
.sys-i { font-weight: 800; text-align: center; }
.sys-i.ok, .sys-t .ok { color: #3ddc84; } .sys-i.mid, .sys-t .mid { color: #f0a830; } .sys-i.no, .sys-t .no { color: #ff6b6b; }
.sys-det { margin-top: 12px; } .sys-det summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.sys-t { border-collapse: collapse; margin-top: 8px; font-size: 13.5px; } .sys-t th, .sys-t td { text-align: left; padding: 4px 18px 4px 0; } .sys-t th { color: var(--muted); font-weight: 600; }
.sys-tips { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(240,168,48,.1); font-size: 14px; } .sys-tips.ok { background: rgba(61,220,132,.1); }
.sys-tips ul { margin: 6px 0 0; padding-left: 18px; } .sys-tips li { margin: 3px 0; }
@media (max-width: 640px) { .sys-row { grid-template-columns: 22px 1fr; } .sys-row > span:last-child { grid-column: 2; } }
.sys-cmd { background: rgba(0,0,0,.35); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; user-select: all; }

/* Synology-App */
.spk-card { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); margin-bottom: 12px; }
.spk-card img { border-radius: 12px; flex: none; }
.spk-card b { display: block; font-size: 15px; } .spk-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.spk-cl { display: block; font-size: 13.5px; color: var(--muted); } .spk-cl textarea { display: block; width: 100%; margin-top: 6px; resize: vertical; font: inherit; }
.spk-src { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 14px; }
.spk-src ol { margin: 8px 0; padding-left: 20px; } .spk-src li { margin: 5px 0; }
.spk-src code.sel-all { user-select: all; }
.spk-card small b { display: inline; font-size: inherit; color: var(--text); }

/* Ergebnis des letzten Scans */
.scan-res { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(61,220,132,.08); font-size: 14px; }
.scan-res.warn { background: rgba(240,168,48,.1); }
.scan-res > small { display: block; color: var(--muted); margin-top: 3px; }
.scan-prob { margin-top: 8px; } .scan-prob ul { margin: 6px 0; padding-left: 18px; } .scan-prob li { margin: 2px 0; font-size: 13px; }
.scan-prob small { display: block; color: var(--muted); font-size: 12.5px; }
