/* Meine Musik – Oberfläche im iOS-/Apple-Music-Stil */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Roboto, "Segoe UI", system-ui, sans-serif;
  --accent: #fa2d48;
  --accent-soft: rgba(250, 45, 72, 0.12);
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;
  --card: #ffffff;
  --fill: rgba(120, 120, 128, 0.14);
  --fill-2: rgba(120, 120, 128, 0.22);
  --text: #000000;
  --text-2: rgba(60, 60, 67, 0.6);
  --text-3: rgba(60, 60, 67, 0.3);
  --sep: rgba(60, 60, 67, 0.2);
  --bar: rgba(249, 249, 249, 0.86);
  --bar-border: rgba(0, 0, 0, 0.12);
  --placeholder: linear-gradient(135deg, #d8d8de, #c0c0c8);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  --btn-border: #c7c7cc; /* Knopf-Rand, Werte wie in core/web/tokens.css */
  --tab-h: 50px;
  --mini-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --gutter: 16px;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --bg-grouped: #000000;
    --card: #1c1c1e;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.36);
    --text: #ffffff;
    --text-2: rgba(235, 235, 245, 0.6);
    --text-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.6);
    --bar: rgba(22, 22, 24, 0.86);
    --bar-border: rgba(255, 255, 255, 0.14);
    --placeholder: linear-gradient(135deg, #3a3a3f, #232326);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
    --btn-border: #4f4f4f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-grouped: #000000;
  --card: #1c1c1e;
  --fill: rgba(120, 120, 128, 0.24);
  --fill-2: rgba(120, 120, 128, 0.36);
  --text: #ffffff;
  --text-2: rgba(235, 235, 245, 0.6);
  --text-3: rgba(235, 235, 245, 0.3);
  --sep: rgba(84, 84, 88, 0.6);
  --bar: rgba(22, 22, 24, 0.86);
  --bar-border: rgba(255, 255, 255, 0.14);
  --placeholder: linear-gradient(135deg, #3a3a3f, #232326);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  --btn-border: #4f4f4f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.3;
  color: var(--text);
  background: var(--bg);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, [tabindex]:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { display: block; }
[hidden] { display: none !important; }
audio { display: none; }
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---------- Grundlayout ---------- */
.app { position: fixed; inset: 0; container: app / size; }
.view {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  scroll-padding: calc(44px + var(--safe-t)) 0 calc(var(--tab-h) + var(--safe-b) + 16px); /* Fokus (W/S) bleibt frei von Kopf- und Fußleiste */
  outline: none;
}
body.has-mini .view { padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 16px); scroll-padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 16px); }
.view.loading { opacity: 0.6; transition: opacity 0.15s; }
.page { padding: 0 var(--gutter); }

/* ---------- Navigationsleiste ---------- */
.navbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: calc(44px + var(--safe-t)); padding: var(--safe-t) 8px 0;
  background: transparent; transition: background 0.2s;
}
.navbar.scrolled, .navbar:not(.has-large) {
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0.5px 0 var(--bar-border);
}
.navbar:not(.has-large) { background: var(--bar); }
.nav-title {
  font-size: 17px; font-weight: 600; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60cqw;
  opacity: 0; transition: opacity 0.2s;
}
.navbar.scrolled .nav-title, .navbar:not(.has-large) .nav-title { opacity: 1; }
.nav-left { justify-self: start; }
.nav-right { justify-self: end; display: flex; gap: 2px; }
.nav-back { display: inline-flex; align-items: center; color: var(--accent); font-size: 17px; height: 44px; padding-right: 8px; }
.nav-back span { margin-left: -4px; }
.nav-btn { color: var(--accent); width: 40px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.large-title {
  font-size: 34px; font-weight: 700; letter-spacing: 0.37px; line-height: 1.2;
  margin: 2px var(--gutter) 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Abschnitte ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: 0.2px; display: inline-flex; align-items: center; gap: 2px; }
.section-title.link .icon { color: var(--text-3); }
.group-head {
  position: sticky; top: calc(44px + var(--safe-t)); z-index: 5;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 6px 0 4px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter);
  background: var(--bg);
}
.list-footer { color: var(--text-2); font-size: 14px; padding: 12px 0 8px; }
.empty { text-align: center; color: var(--text-2); padding: 48px 24px; }
.empty .icon { color: var(--text-3); margin-bottom: 10px; }
.empty-title { font-size: 20px; font-weight: 700; color: var(--text); }
.empty-text { font-size: 15px; margin-top: 6px; }
.empty.compact { padding: 20px 16px 8px; }

/* ---------- Listen und Zeilen ---------- */
.list { display: flex; flex-direction: column; }
.list.inset { background: var(--card); border-radius: 12px; overflow: hidden; }
.list.inset { box-shadow: 0 0 0 0.5px var(--sep); }
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 6px 0 6px 0;
  position: relative; cursor: pointer;
}
.list.inset .row { padding-left: 12px; padding-right: 8px; }
.row::after {
  content: ""; position: absolute; left: 52px; right: 0; bottom: 0;
  height: 0.5px; background: var(--sep);
}
.row.lib::after { left: 42px; }
.row:not(:has(.cover))::after { left: 0; }
.list.inset .row::after { left: 64px; }
.row:last-child::after { display: none; }
.row:active { background: var(--fill); }
.row-num { width: 22px; text-align: center; color: var(--text-2); font-size: 15px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.row:has(.row-num)::after { left: 34px; }
.row-text { flex: 1; min-width: 0; }
.row-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row-meta { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.row-fav { color: var(--accent); display: inline-flex; flex-shrink: 0; }
.row-more { width: 36px; height: 44px; margin-right: -8px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex-shrink: 0; }
.row-chevron { color: var(--text-3); display: inline-flex; }
.row.playing .row-title { color: var(--accent); }
.row.playing .row-num { color: var(--accent); }
.lib-icon { width: 30px; display: inline-flex; justify-content: center; color: var(--accent); }
.row.lib .row-title { font-size: 20px; font-weight: 500; }
.row.lib { min-height: 48px; }

/* ---------- Cover ---------- */
.cover {
  position: relative; flex-shrink: 0; overflow: hidden;
  background: var(--placeholder); border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12) inset;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.round { border-radius: 50%; }
.cover.sm { width: 44px; height: 44px; }
.cover.lg { width: min(52cqw, 200px, 40cqh); height: min(52cqw, 200px, 40cqh); border-radius: 10px; box-shadow: var(--shadow); }
.cover.card-art { width: 100%; aspect-ratio: 1; height: auto; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.cover.placeholder .icon { opacity: 0.8; }
.cover.lg.placeholder .icon { width: 44%; height: 44%; }
.cover.card-art.placeholder .icon { width: 35%; height: 35%; }

.cover.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.cover.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.index-bar { position: absolute; right: 0; top: calc(44px + var(--safe-t) + 8px); bottom: calc(var(--tab-h) + var(--safe-b) + 8px); z-index: 25; display: flex; flex-direction: column; justify-content: center; padding: 0 4px 0 10px; font-size: 10px; line-height: 1.15; font-weight: 700; color: var(--accent); touch-action: none; -webkit-user-select: none; user-select: none; }
.mm-root.has-mini .index-bar, body.has-mini .index-bar { bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 12px); }
.index-bar span { display: block; text-align: center; padding: 0 2px; }
.index-bar.active { background: var(--fill); border-radius: 8px; }
.page.has-index { padding-right: 24px; }
.row.edit-pl .remove-btn { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row.edit-pl .remove-btn .icon { width: 14px; height: 14px; }

/* ---------- Raster & Karten ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
@container app (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; } }
.card { display: block; min-width: 0; cursor: pointer; }
.card:active .card-art { transform: scale(0.97); }
.card-art { transition: transform 0.1s; }
.card-title { font-size: 13px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px;
  scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .card { flex: 0 0 124px; scroll-snap-align: start; }
@container app (min-width: 600px) { .hscroll .card { flex-basis: 150px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--fill); border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 500; }
.chip:active { background: var(--fill-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--fill); color: var(--accent);
  font-size: 15px; font-weight: 600; border-radius: 10px;
  border: 1px solid var(--btn-border);
  height: 44px; padding: 0 12px; flex: 1 1 0; min-width: 0; white-space: nowrap;
}
.btn span { overflow: hidden; text-overflow: ellipsis; }
.btn:active { background: var(--fill-2); }
.btn.accent { background: var(--accent); color: #fff; border-color: transparent; }
.btn-primary { background: var(--accent); color: #fff; border-radius: 10px; height: 44px; font-weight: 600; font-size: 16px; width: 100%; }
.play-buttons { display: flex; gap: 10px; margin: 12px 0; }

/* ---------- Detailkopf (Album, Interpret, Playlist) ---------- */
.detail-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.detail-text { width: 100%; margin-top: 12px; container-type: inline-size; }
/* Sehr schmale Textspalte: nur Icons in den Buttons */
@container (max-width: 230px) {
  .play-buttons .btn span { display: none; }
  .play-buttons .btn .icon { width: 22px; height: 22px; }
}
.detail-title { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.25; }
.detail-artist { display: block; color: var(--accent); font-size: 18px; margin-top: 2px; }
.detail-meta { color: var(--text-2); font-size: 13px; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.3px; }
.detail-head .play-buttons { margin-top: 14px; }
/* Auf kurzen/breiten Displays (z. B. 4" mit 1080×1200): Cover links, Text rechts */
@container app ((max-height: 560px) or (min-width: 560px)) {
  .detail-head { flex-direction: row; text-align: left; align-items: center; gap: 16px; }
  .detail-text { margin-top: 0; width: auto; flex: 1 1 0; min-width: 0; }
  .cover.lg { width: min(38cqw, 160px, 50cqh); height: min(38cqw, 160px, 50cqh); }
}

/* ---------- Suche ---------- */
.searchbar {
  display: flex; align-items: center; gap: 6px;
  background: var(--fill); border-radius: 10px; padding: 0 8px; height: 38px;
  color: var(--text-2); margin-bottom: 4px;
}
.search-input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--text); outline: none; min-width: 0; -webkit-user-select: text; user-select: text; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 22px; height: 22px; border-radius: 50%; background: var(--text-3); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Tab-Leiste ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; justify-content: space-around; align-items: stretch;
  background: var(--bar); box-shadow: 0 -0.5px 0 var(--bar-border);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--text-2); font-size: 10px; font-weight: 500; }
.tabbar a.active { color: var(--accent); }
.tabbar a:active { opacity: 0.6; }
.tab-icon { display: inline-flex; height: 28px; align-items: center; }

/* ---------- Mini-Player ---------- */
.mini {
  position: absolute; left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 6px); z-index: 29;
  height: var(--mini-h); padding: 0 6px 0 8px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bar); border-radius: 14px;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 0.5px var(--bar-border);
  overflow: hidden;
}
.mini-art .cover { width: 42px; height: 42px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.mini-text { flex: 1; min-width: 0; cursor: pointer; }
.mini-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-btn { width: 40px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.mini-btn:active { opacity: 0.5; }
.mini-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--fill); }
.mini-progress-bar { height: 100%; background: var(--accent); width: 0; }

/* ---------- Vollansicht (Now Playing) ---------- */
.np {
  position: absolute; inset: 0; z-index: 40;
  background: #1c1c1e; color: #fff;
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden; touch-action: pan-y;
}
.np.open { transform: translateY(0); }
.np-bg {
  position: absolute; inset: -60px; background-size: cover; background-position: center;
  filter: blur(50px) saturate(1.6) brightness(0.55); transform: scale(1.15);
}
.np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.5)); }
.np-inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 4px) 24px calc(var(--safe-b) + 12px);
}
.np-grabber { width: 100%; display: flex; justify-content: center; padding: 6px 0 4px; cursor: pointer; flex-shrink: 0; }
.np-grabber span { width: 36px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); }
.np-art-wrap { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 0; padding: 8px 0; }
.np-art { position: relative; }
.np-art-img { width: 100%; height: 100%; }
.np-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.np-fav.active { color: var(--accent); background: rgba(255, 255, 255, 0.92); }
.np-fav:active { transform: scale(0.85); }
.np.paused .np-fav { transform: scale(0.9); }
.np-fav.active { color: #ffcc00; background: rgba(0, 0, 0, 0.45); }
.np-art .cover.xl {
  width: min(86cqw, 46cqh, 420px); height: min(86cqw, 46cqh, 420px); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.35s;
}
.np.paused .np-art { position: relative; }
.np-art-img { width: 100%; height: 100%; }
.np-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.np-fav.active { color: var(--accent); background: rgba(255, 255, 255, 0.92); }
.np-fav:active { transform: scale(0.85); }
.np.paused .np-fav { transform: scale(0.9); }
.np-fav.active { color: #ffcc00; background: rgba(0, 0, 0, 0.45); }
.np-art .cover.xl { transform: scale(0.78); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.np-art .cover.placeholder .icon { width: 40%; height: 40%; }
.np-main { width: 100%; max-width: 480px; flex-shrink: 0; }
.np-titles { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.np-text { flex: 1; min-width: 0; }
.np-title { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist, .np-album { font-size: 17px; color: rgba(255, 255, 255, 0.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-album { font-size: 14px; color: rgba(255, 255, 255, 0.45); }
.np-more { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.np-scrub { margin-top: 12px; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; margin-top: -2px; }
.np-controls { display: flex; align-items: center; justify-content: center; gap: 34px; margin: 10px 0 8px; }
.np-controls button { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: transform 0.1s; border-radius: 50%; }
.np-controls button:active { transform: scale(0.85); background: rgba(255, 255, 255, 0.15); }
.np-play { width: 72px !important; height: 72px !important; }
.np.buffering .np-play { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.np-volume { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.55); margin: 4px 0 8px; }
.np-volume input { flex: 1; }
.np-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding: 0 24px; }
.np-bar button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 40px; border-radius: 10px; color: rgba(255, 255, 255, 0.6); }
.np-bar button .icon { width: 24px; height: 24px; }
.np-bar button.active { color: #fff; background: rgba(255, 255, 255, 0.2); }
.np-bar button:active { opacity: 0.6; }
.np-bar [data-action="volume"] { display: none; }
.np-badge { position: absolute; top: 2px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #1c1c1e; display: inline-flex; align-items: center; justify-content: center; }
.np-badge .icon { width: 12px !important; height: 12px !important; }
/* Kopf des Panels „Als Nächstes“ */
.np-queue-top { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.np-queue-art .cover { width: 56px; height: 56px; }
.np-queue-text { flex: 1; min-width: 0; }
.np-queue-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-queue-artist { font-size: 14px; color: rgba(255, 255, 255, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-queue-fav.active { color: var(--accent); background: rgba(255, 255, 255, 0.92); }
.q-pills { display: flex; gap: 8px; padding: 4px 16px 10px; }
.q-pills button { flex: 1; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.75); display: inline-flex; align-items: center; justify-content: center; }
.q-pills button.active { background: rgba(255, 255, 255, 0.85); color: #1c1c1e; }
.q-pills button:active { opacity: 0.7; }
.np-queue-src { color: rgba(255, 255, 255, 0.55); font-weight: 400; }
.np-queue .drag-handle { padding: 8px 0 8px 8px; }
.np-queue .row.dragging { background: rgba(50, 50, 54, 0.98); }
.np-side { color: rgba(255, 255, 255, 0.6) !important; position: relative; }
.np-side .icon { width: 24px !important; height: 24px !important; }
.np-side.active { color: #fff !important; }
.np-side.active::after { content: ""; position: absolute; bottom: 6px; left: 50%; margin-left: -2px; width: 4px; height: 4px; border-radius: 50%; background: #fff; }

/* Kompakte Vollansicht für kurze Displays (z. B. Titan 2 mit 1080×1200):
   großes Cover oben, darunter Titel, Fortschritt und eine Steuerzeile mit Shuffle/Repeat.
   Lautstärke über Hardware-Tasten, Warteschlange neben dem Herz. */
@container app (max-height: 600px) {
  .np-inner { padding: calc(var(--safe-t) + 2px) 20px calc(var(--safe-b) + 8px); }
  .np-grabber { padding: 4px 0 2px; }
  .np-grabber span { height: 4px; width: 32px; }
  .np-art-wrap { flex: 1 1 0; min-height: 0; padding: 4px 0 6px; }
  .np-art { height: 100%; max-height: 86cqw; aspect-ratio: 1; }
  .np-art { position: relative; }
.np-art-img { width: 100%; height: 100%; }
.np-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.np-fav.active { color: var(--accent); background: rgba(255, 255, 255, 0.92); }
.np-fav:active { transform: scale(0.85); }
.np.paused .np-fav { transform: scale(0.9); }
.np-fav.active { color: #ffcc00; background: rgba(0, 0, 0, 0.45); }
.np-art .cover.xl { width: 100%; height: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
  .np.paused .np-art { position: relative; }
.np-art-img { width: 100%; height: 100%; }
.np-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.np-fav.active { color: var(--accent); background: rgba(255, 255, 255, 0.92); }
.np-fav:active { transform: scale(0.85); }
.np.paused .np-fav { transform: scale(0.9); }
.np-fav.active { color: #ffcc00; background: rgba(0, 0, 0, 0.45); }
.np-art .cover.xl { transform: scale(0.88); }
  .np-titles { margin-top: 0; gap: 6px; }
  .np-title { font-size: 17px; }
  .np-artist { font-size: 14px; }
  .np-album { display: none; }
  .np-more { width: 30px; height: 30px; }
  .np-fav { width: 30px; height: 30px; top: 8px; right: 8px; }
  .np-scrub { margin-top: 6px; }
  .np-range { height: 22px; }
  .np-times { font-size: 11px; margin-top: -4px; }
  .np-controls { justify-content: space-between; gap: 0; margin: 2px 0 0; }
  .np-controls button { width: 46px; height: 46px; }
  .np-controls .icon { width: 30px; height: 30px; }
  .np-play { width: 54px !important; height: 54px !important; }
  .np-play .icon { width: 34px; height: 34px; }
  .np-side .icon { width: 22px !important; height: 22px !important; }
  .np-volume { display: none; }
  .np-bar { margin-top: 2px; }
  .np-bar button { height: 32px; font-size: 12px; padding: 0 8px; }
  .np-bar [data-action="volume"] { display: inline-flex; }
  .np-bar button { width: 52px; height: 36px; }
  .np-main { position: relative; }
  .np.show-volume .np-volume { display: flex; position: absolute; left: 0; right: 0; bottom: 100%; margin: 0; padding: 10px 14px; background: rgba(30, 30, 34, 0.92); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); z-index: 3; }
}
/* Querformat (breit und niedrig): Cover links, Bedienung rechts */
@container app ((max-height: 600px) and (min-aspect-ratio: 13/10)) {
  .np-inner { flex-direction: row; align-items: center; justify-content: center; gap: 0 20px; padding-top: calc(var(--safe-t) + 14px); }
  .np-grabber { position: absolute; left: 0; right: 0; top: var(--safe-t); padding: 6px 0; }
  .np-art-wrap { flex: 0 0 auto; height: 100%; width: auto; padding: 0; }
  .np-art { max-height: 40cqw; }
  .np-main { flex: 1 1 0; min-width: 0; max-width: 420px; }
}

/* Warteschlange und Liedtext (Panels über der Vollansicht) */
.np-panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: 18%; z-index: 2;
  background: rgba(20, 20, 22, 0.92); color: #fff;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-radius: 16px 16px 0 0; display: flex; flex-direction: column;
  animation: slideUp 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }
.np-lyrics-body { flex: 1; overflow-y: auto; padding: 4px 20px calc(var(--safe-b) + 40vh); scroll-behavior: smooth; }
.lyric-line { font-size: 22px; font-weight: 700; line-height: 1.3; color: rgba(255, 255, 255, 0.4); padding: 7px 0; cursor: pointer; transition: color 0.25s, transform 0.25s; transform-origin: left center; }
.lyric-line.active { color: #fff; }
.lyric-line.past { color: rgba(255, 255, 255, 0.55); }
.lyric-line:empty { padding: 0; height: 14px; }
.lyrics-plain { white-space: pre-wrap; font-size: 18px; font-weight: 600; line-height: 1.5; color: rgba(255, 255, 255, 0.85); }
.np-lyrics-src { color: rgba(255, 255, 255, 0.55); font-size: 13px; margin-left: 6px; }
.np-queue-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; font-size: 16px; }
.np-queue-head > div { flex: 1; }
.np-queue-sub { color: rgba(255, 255, 255, 0.55); font-size: 14px; }
.np-queue-clear { color: rgba(255, 255, 255, 0.75); font-size: 14px; background: rgba(255, 255, 255, 0.15); border-radius: 999px; padding: 4px 12px; }
.np-queue-close { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.8); }
.np-queue-list { flex: 1; overflow-y: auto; padding: 0 16px calc(var(--safe-b) + 16px); }
.np-panel .row::after { background: rgba(255, 255, 255, 0.12); }
.np-panel .row:active { background: rgba(255, 255, 255, 0.08); }
.np-panel .row-sub { color: rgba(255, 255, 255, 0.55); }
.np-panel .row-more { color: rgba(255, 255, 255, 0.6); }
.np-panel .empty { color: rgba(255, 255, 255, 0.6); }
.np-panel .empty-title { color: #fff; }
@container app (max-height: 600px) { .np-panel { top: 8%; } .lyric-line { font-size: 19px; padding: 5px 0; } }

/* ---------- Schieberegler ---------- */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer;
  --p: 0%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.9) var(--p), rgba(255, 255, 255, 0.28) var(--p));
  transition: height 0.15s;
}
input[type="range"]:active::-webkit-slider-runnable-track { height: 8px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 8px; margin-top: -2px; border-radius: 50%; background: #fff; opacity: 0; }
input[type="range"]:active::-webkit-slider-thumb { opacity: 1; margin-top: 0; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.28); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.9); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; }
.np-vol { --p: 100%; }
.np-vol::-webkit-slider-runnable-track { background: linear-gradient(to right, rgba(255, 255, 255, 0.9) var(--vp, 100%), rgba(255, 255, 255, 0.28) var(--vp, 100%)); }

/* ---------- Overlay: Action Sheet & Alert ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0); transition: background 0.2s;
  display: flex; align-items: flex-end; justify-content: center;
}
.overlay.show { background: rgba(0, 0, 0, 0.4); }
.sheet {
  width: 100%; max-width: 520px; max-height: calc(100% - 24px - var(--safe-t));
  padding: 8px 8px calc(var(--safe-b) + 8px);
  display: flex; flex-direction: column; gap: 8px;
  transform: translateY(100%); transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.overlay.show .sheet { transform: translateY(0); }
.sheet-header { background: var(--card); border-radius: 14px 14px 0 0; padding: 12px 16px; text-align: center; color: var(--text-2); font-size: 13px; }
.sheet-header + .sheet-actions { border-radius: 0 0 14px 14px; margin-top: -8px; }
.sheet-header + .sheet-actions::before { content: ""; display: block; height: 0.5px; background: var(--sep); }
.sheet-track { display: flex; align-items: center; gap: 12px; text-align: left; }
.sheet-track .cover { width: 48px; height: 48px; }
.sheet-track > div { min-width: 0; }
.sheet-title { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.sheet-actions { background: var(--card); border-radius: 14px; overflow: auto; -webkit-overflow-scrolling: touch; }
.sheet-action {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  min-height: 50px; padding: 0 16px; font-size: 17px; color: var(--text);
  box-shadow: 0 0.5px 0 var(--sep) inset;
}
.sheet-action:first-child { box-shadow: none; }
.sheet-action .icon { color: var(--text-2); }
.sheet-action .icon.check { margin-left: auto; color: var(--accent); }
.sheet-action span { flex: 1; }
.sheet-action.danger { color: var(--accent); }
.sheet-action.danger .icon { color: var(--accent); }
.sheet-action:active { background: var(--fill); }
.sheet-cancel { width: 100%; background: var(--card); border-radius: 14px; min-height: 54px; font-size: 17px; font-weight: 600; color: var(--accent); }
.sheet-cancel:active { background: var(--fill); }
.alert {
  align-self: center; width: 270px; background: var(--card); border-radius: 14px; overflow: hidden;
  transform: scale(1.1); opacity: 0; transition: transform 0.15s, opacity 0.15s;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); margin-bottom: 10cqh;
}
.overlay.show .alert { transform: scale(1); opacity: 1; }
.alert-body { padding: 18px 16px 14px; text-align: center; }
.alert-title { font-size: 17px; font-weight: 600; }
.alert-msg { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.4; }
.alert-title:empty { display: none; }
.alert-title:empty + .alert-msg { margin-top: 0; font-size: 14px; color: var(--text); }
.alert-input { width: 100%; margin-top: 12px; font: inherit; font-size: 14px; padding: 7px 8px; border-radius: 6px; border: 0.5px solid var(--sep); background: var(--bg); color: var(--text); outline: none; -webkit-user-select: text; user-select: text; }
.alert-actions { display: flex; box-shadow: 0 0.5px 0 var(--sep) inset; }
.alert-actions button { flex: 1; min-height: 44px; color: var(--accent); font-size: 17px; }
.alert-actions button + button { box-shadow: 0.5px 0 0 var(--sep) inset; }
.alert-actions .bold { font-weight: 600; }
.alert-actions .danger { color: #ff3b30; font-weight: 600; }
.alert-actions button:active { background: var(--fill); }

/* ---------- Dropdown-Menü ---------- */
.overlay.menu-mode { display: block; }
.overlay.menu-mode.show { background: rgba(0, 0, 0, 0.12); }
.menu {
  position: absolute; z-index: 1; overflow-y: auto;
  background: var(--bar); border-radius: 13px;
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 0.5px var(--bar-border);
  transform: scale(0.6); opacity: 0; transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.12s;
  -webkit-user-select: none; user-select: none;
}
.overlay.show .menu { transform: scale(1); opacity: 1; }
.menu-header { padding: 10px 14px; font-size: 13px; color: var(--text-2); box-shadow: 0 0.5px 0 var(--sep); }
.menu-header .sheet-track { gap: 10px; }
.menu-header .sheet-track .cover { width: 36px; height: 36px; }
.menu-header .sheet-title { font-size: 14px; }
.menu-header .sheet-sub { font-size: 12px; }
.menu-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 14px; font-size: 16px; color: var(--text); text-align: left;
  box-shadow: 0 0.5px 0 var(--sep) inset;
}
.menu-item:first-child, .menu-header + .menu-item, .menu-sep + .menu-item { box-shadow: none; }
.menu-sep { height: 6px; background: rgba(120, 120, 128, 0.18); box-shadow: 0 0.5px 0 var(--sep), 0 -0.5px 0 var(--sep); }
.menu-item small { display: block; font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item .icon { color: var(--text); flex-shrink: 0; }
.menu-item.danger, .menu-item.danger .icon { color: var(--accent); }
.menu-item:active { background: var(--fill); }
@media (hover: hover) { .menu-item:hover { background: var(--fill); } }

/* ---------- Toast ---------- */
.toast {
  position: absolute; left: 50%; top: calc(var(--safe-t) + 12px); z-index: 60;
  transform: translate(-50%, -20px); opacity: 0; transition: transform 0.2s, opacity 0.2s;
  background: var(--card); color: var(--text); font-size: 14px; font-weight: 500;
  padding: 10px 16px; border-radius: 999px; max-width: calc(100% - 32px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 0.5px var(--bar-border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Login ---------- */
.login { position: absolute; inset: 0; z-index: 70; background: var(--bg-grouped); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 320px; background: var(--card); border-radius: 16px; padding: 24px 20px; text-align: center; box-shadow: var(--shadow); }
.login-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.login-card h1 { font-size: 22px; margin: 0; }
.login-card p { color: var(--text-2); margin: 4px 0 16px; font-size: 14px; }
.login-card input { width: 100%; font: inherit; font-size: 17px; padding: 10px 12px; border-radius: 10px; border: 0; background: var(--fill); color: var(--text); margin-bottom: 12px; outline: none; -webkit-user-select: text; user-select: text; }
.login-error { color: var(--accent); font-size: 14px; margin-top: 10px; min-height: 18px; }
.login-back { margin-top: 6px; }

/* ---------- Bearbeiten-Modus der Musik-Liste ---------- */
.nav-text { color: var(--accent); font-size: 17px; height: 44px; padding: 0 8px; }
.library-list.editing .row { cursor: default; }
.library-list .row.edit { opacity: 0.45; }
.library-list .row.edit.on { opacity: 1; }
.edit-check { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--text-3); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.row.edit.on .edit-check { background: var(--accent); border-color: var(--accent); }
.drag-handle { color: var(--text-3); display: inline-flex; padding: 8px 0 8px 12px; cursor: grab; touch-action: none; }
.row.dragging { position: fixed; z-index: 50; background: var(--card); box-shadow: var(--shadow); border-radius: 10px; padding-left: 12px; padding-right: 12px; opacity: 0.95 !important; pointer-events: none; }
.row.placeholder { background: var(--fill); border-radius: 10px; }
.row.placeholder::after { display: none; }
.no-art .row.track .cover.sm { display: none; }
.no-art .row.track::after { left: 0; }

/* ---------- Offline ---------- */
.row-off { color: var(--text-2); display: inline-flex; flex-shrink: 0; }
.row-cloud { color: var(--text-3); display: inline-flex; flex-shrink: 0; }
.ep-meta .row-cloud .icon { width: 13px; height: 13px; }
.storage { background: var(--card); border-radius: 12px; padding: 12px 14px; box-shadow: 0 0 0 0.5px var(--sep); margin-bottom: 6px; }
.storage-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.storage-row b { font-weight: 600; }
.storage-row span { color: var(--text-2); }
.bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.bar.blue > i { background: #0a84ff; }
.progress-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 12px; padding: 10px 14px; margin: 8px 0; box-shadow: 0 0 0 0.5px var(--sep); }
.progress-card .bar { flex: 1; }
.progress-card small { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.offline-banner { display: flex; align-items: center; gap: 10px; background: var(--fill); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 6px 0 10px; color: var(--text-2); }
.offline-banner .icon { color: var(--accent); }

/* ---------- Podcasts ---------- */
.row.episode { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.row.episode .cover.sm { width: 52px; height: 52px; margin-top: 2px; }
.row.episode .row-text { display: flex; flex-direction: column; gap: 2px; }
.ep-date { font-size: 12px; text-transform: uppercase; letter-spacing: 0.2px; }
.ep-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.ep-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.ep-meta .bar { width: 64px; height: 3px; }
.row.episode.played .ep-title, .row.episode.played .cover { opacity: 0.55; }
.row.episode.playing .ep-title { color: var(--accent); }
.row.episode .row-more { align-self: center; }
.desc { font-size: 14px; color: var(--text-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 8px 0 0; cursor: pointer; }
.desc.open { -webkit-line-clamp: unset; display: block; }
.btn.small { flex: 0 0 auto; height: 30px; padding: 0 12px; font-size: 13px; border-radius: 999px; }
.btn.small:disabled { opacity: 0.5; }
.row.podcast-hit { cursor: default; }
.np .rate { font-size: 14px; font-weight: 700; letter-spacing: -0.2px; font-variant-numeric: tabular-nums; }
.np.episode .np-controls .icon { width: 30px; height: 30px; }

/* ---------- Aufgaben ---------- */
.job .bar { margin-top: 6px; }
.job.failed .row-sub { color: var(--accent); }
.job-chip { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-2); background: var(--fill); border-radius: 999px; padding: 3px 8px; flex-shrink: 0; }
.job-chip.failed { color: #fff; background: var(--accent); }
.job-chip.done { color: #fff; background: #34c759; }
.linkbtn { color: var(--accent); font-size: 13px; font-weight: 500; }

/* ---------- Pill-Schalter ---------- */
.seg-row { gap: 10px; }
.seg-row .row-text { flex: 1 1 auto; }
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; flex: 0 0 auto; }
.seg button { padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: background 0.15s, color 0.15s; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0 0 0.5px var(--sep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { background: rgba(120, 120, 128, 0.5); } }
:root[data-theme="dark"] .seg button.on, .mm-root[data-theme="dark"] .seg button.on { background: rgba(120, 120, 128, 0.5); }
/* Schalter Musik | Media oben im Musik-Tab: volle Breite, 44 px hoch wie der frühere Zufalls-Knopf */
.seg.library-mode { margin: 4px 0 6px; }
.seg.library-mode button { flex: 1; min-height: 40px; font-size: 15px; }

/* ---------- Immersive Vollansicht: Cover randlos, Bedienung darüber ---------- */
.np.immersive .np-inner { padding: 0; }
.np.immersive .np-grabber { position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding: calc(var(--safe-t) + 6px) 0 10px; background: linear-gradient(rgba(0, 0, 0, 0.35), transparent); }
.np.immersive .np-art-wrap { flex: 0 0 auto; padding: 0; width: 100%; }
.np.immersive .np-art { width: 100%; height: auto; max-height: none; aspect-ratio: 1; }
.np.immersive .np-art { position: relative; }
.np-art-img { width: 100%; height: 100%; }
.np-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.np-fav.active { color: var(--accent); background: rgba(255, 255, 255, 0.92); }
.np-fav:active { transform: scale(0.85); }
.np.paused .np-fav { transform: scale(0.9); }
.np-fav.active { color: #ffcc00; background: rgba(0, 0, 0, 0.45); }
.np-art .cover.xl { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.np.immersive.paused .np-art { position: relative; }
.np-art-img { width: 100%; height: 100%; }
.np-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.np-fav.active { color: var(--accent); background: rgba(255, 255, 255, 0.92); }
.np-fav:active { transform: scale(0.85); }
.np.paused .np-fav { transform: scale(0.9); }
.np-fav.active { color: #ffcc00; background: rgba(0, 0, 0, 0.45); }
.np-art .cover.xl { transform: none; filter: brightness(0.75); }
.np.immersive .np-main { padding: 14px 20px calc(var(--safe-b) + 12px); max-width: none; }
.np.immersive .np-titles { margin-top: 0; }
/* Wenn unter dem Cover kein Platz bleibt (Titan): Bedienung als Overlay über dem unteren Teil des Covers */
@container app (max-height: 600px) {
  .np.immersive .np-art-wrap { position: absolute; inset: 0; z-index: 0; display: block; }
  .np.immersive .np-art { position: absolute; inset: 0; width: auto; height: auto; aspect-ratio: auto; }
  .np.immersive .np-art .cover.xl img { object-fit: cover; object-position: center 30%; }
  .np.immersive .np-main { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 56px 16px calc(var(--safe-b) + 8px); background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 30%, rgba(0, 0, 0, 0.85)); }
  .np.immersive .np-title, .np.immersive .np-artist { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
  .np.immersive .np-controls { margin-top: 0; }
  .np.immersive .np-main { padding-top: 48px; }
  .np.immersive .np-panel { z-index: 4; }
}

/* ---------- Einstellungen ---------- */
.settings-label { font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; margin: 20px 0 6px 16px; }
.settings-label:first-child { margin-top: 6px; }
.settings .list.inset + .list.inset { margin-top: 10px; }
.settings-note { font-size: 13px; color: var(--text-2); margin: 6px 16px 0; }
.row.setting { min-height: 46px; padding-top: 8px; padding-bottom: 8px; }
.row.setting.static { cursor: default; }
.row.setting.static:active, .row.setting.static:hover { background: transparent; }
.row.setting .row-title { font-size: 16px; }
.row.setting .row-title.danger { color: var(--accent); }
.row.setting .row-sub { white-space: normal; line-height: 1.35; }
.info-btn { color: var(--text-3); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: -6px; }
.info-btn:active { color: var(--accent); }
.toggle { width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); position: relative; flex-shrink: 0; transition: background 0.2s; }
.toggle i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16); transition: transform 0.2s; }
.toggle.on { background: #34c759; }
.toggle.on i { transform: translateX(20px); }
.row-title .status-dot { margin-right: 8px; }
.row.setting .lib-icon { color: var(--text-2); }
.row-value { color: var(--text-2); font-size: 15px; flex-shrink: 0; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34c759; margin-right: 6px; vertical-align: 1px; }

/* ---------- Tastatur-Fokus (W/A/S/D) ---------- */
.kfocus { outline: 2px solid var(--accent) !important; outline-offset: -2px; border-radius: 8px; }
.card.kfocus { outline-offset: 2px; }
.row.kfocus { background: var(--fill); }
#tabbar a.kfocus { outline-offset: -6px; }

/* ---------- Sonstiges ---------- */
.sentinel { height: 1px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media (hover: hover) {
  .row:hover { background: var(--fill); }
  .list.inset .row:hover { background: var(--fill); }
  .btn:hover { filter: brightness(1.05); }
  .sheet-action:hover { background: var(--fill); }
}
@container app (min-width: 900px) {
  .page { max-width: 1100px; margin: 0 auto; }
  .large-title { max-width: 1100px; margin-left: auto; margin-right: auto; padding: 0 var(--gutter); }
}
