/* SyncTune – Glass-Design
   Hintergrund: unscharfes Cover des aktuellen Titels (.ambient), darüber halbtransparente,
   geblurte Flächen (.glass). Layout passt sich Fenster- (Media Queries) und
   Inhaltsbreite (Container Queries auf .main) an. */

:root {
  --bg: #07070a;
  --glass: rgba(22, 22, 28, .52);
  --glass-strong: rgba(26, 26, 34, .78);
  --glass-hi: rgba(255, 255, 255, .06);
  --glass-line: rgba(255, 255, 255, .09);
  --glass-line-hi: rgba(255, 255, 255, .16);
  --blur: blur(28px) saturate(1.5);
  --elev: rgba(255, 255, 255, .07);
  --elev-2: rgba(255, 255, 255, .11);
  --hover: rgba(255, 255, 255, .14);
  --line: rgba(255, 255, 255, .1);
  --text: #fff;
  --muted: rgba(235, 235, 245, .62);
  --dim: rgba(235, 235, 245, .38);
  --accent: #22d39b;
  --accent-hi: #4cf0bc;
  --accent-glow: rgba(34, 211, 155, .35);
  --danger: #ff5f6d;
  --np-color: #1d3b4e;
  /* Rundungen: groß = Flächen/Dialoge, mittel = Karten/Menüs, klein = Zeilen/Cover */
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sidebar-w: 300px;
  --nowpanel-w: 350px;
  --player-h: 88px;
  --topbar-h: 64px;
  --tabbar-h: 0px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", "Helvetica Neue", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; }
svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
[hidden] { display: none !important; }
::selection { background: var(--accent-glow); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.28); }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }

/* ------------------------------------------------------------------ Hintergrund */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(1200px 800px at 15% 0%, #12332a 0%, transparent 60%), radial-gradient(1000px 700px at 100% 100%, #1a1f3d 0%, transparent 60%), var(--bg); }
.ambient-img { position: absolute; inset: -20%; background: center/cover no-repeat; filter: blur(90px) saturate(1.6) brightness(.75); opacity: 0; transform: scale(1.1); transition: opacity 1.2s ease; }
.ambient-img.on { opacity: .75; }
.ambient-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,7,10,.35), rgba(7,7,10,.7)); }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 50px rgba(0,0,0,.25);
}

/* ------------------------------------------------------------------ Grundlayout */
.app {
  position: relative; z-index: 1;
  height: 100vh; height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--nowpanel-w);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr) var(--player-h);
  grid-template-areas: "top top top" "side main now" "player player player";
  gap: 10px; padding: 0 10px 10px;
}
.app.sidebar-collapsed { --sidebar-w: 76px; }
.app.nowpanel-hidden { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) 0; }
.app.nowpanel-hidden .nowpanel { display: none; }
.app.nowpanel-hidden { column-gap: 10px; }
.app.nowpanel-hidden .main { margin-right: -10px; }

/* ------------------------------------------------------------------ Topbar */
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px; min-width: 0; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.topbar-right { justify-content: flex-end; }
.topbar-center { display: flex; align-items: center; gap: 10px; flex: 0 1 580px; min-width: 0; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; transition: transform .15s, background .2s; }
.glass-btn { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); }
.round-btn:hover { background: var(--glass-strong); transform: scale(1.05); }
.round-btn svg { width: 24px; height: 24px; }
.searchbox { flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 999px; cursor: text;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); transition: border .2s, background .2s, box-shadow .2s; }
.searchbox:hover { border-color: var(--glass-line-hi); background: var(--glass-strong); }
.searchbox:focus-within { border-color: rgba(255,255,255,.55); background: var(--glass-strong); box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.searchbox svg { color: var(--muted); width: 22px; height: 22px; }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15px; }
.searchbox input::placeholder { color: var(--dim); }
.searchbox input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.searchbox-sep { width: 1px; height: 24px; background: var(--glass-line-hi); }
.searchbox a { display: grid; color: var(--muted); }
.searchbox a:hover { color: #fff; }

.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); position: relative; transition: color .15s, transform .15s, background .15s; flex: none; }
.icon-btn:hover { color: #fff; transform: scale(1.06); background: rgba(255,255,255,.06); }
.icon-btn.active { color: var(--accent); }
.icon-btn.active::after { content: ""; position: absolute; bottom: -1px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.icon-btn.big { width: 42px; height: 42px; }
.icon-btn.big svg { width: 28px; height: 28px; }
.nav-arrow { background: rgba(0,0,0,.25); }
.badge { position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #000; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 10px var(--accent-glow); }
.avatar { width: 42px; height: 42px; border-radius: 50%; padding: 4px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--glass-line); }
.avatar img { width: 32px; height: 32px; border-radius: 50%; }

/* ------------------------------------------------------------------ Sidebar */
.sidebar { grid-area: side; border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sidebar-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 8px 16px; }
.sidebar-title { flex: 1; font-weight: 700; font-size: 16px; }
.sidebar-chips { display: flex; gap: 8px; padding: 6px 14px 10px; flex-wrap: wrap; }
.sidebar-list { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; cursor: pointer; min-width: 0; transition: background .15s; }
.side-item:hover { background: var(--elev); }
.side-item.active { background: var(--elev-2); box-shadow: 0 0 0 1px var(--glass-line) inset; }
.side-item .cover { width: 48px; height: 48px; border-radius: 8px; flex: none; }
.side-item .cover.round { border-radius: 50%; }
.side-item .meta { min-width: 0; }
.side-item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.side-item.active .name { color: var(--accent); }
.side-item .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.side-item .sub svg { width: 12px; height: 12px; color: var(--accent); }
.sidebar-collapsed .sidebar-title, .sidebar-collapsed .sidebar-chips, .sidebar-collapsed .side-item .meta, .sidebar-collapsed #btn-new-playlist { display: none; }
.sidebar-collapsed .sidebar-head { flex-direction: column; padding: 14px 0 8px; }
.sidebar-collapsed .side-item { justify-content: center; padding: 6px 0; }

.chip { height: 32px; padding: 0 14px; border-radius: 999px; background: var(--elev); border: 1px solid var(--glass-line); font-size: 14px; white-space: nowrap; transition: background .15s, color .15s; display: inline-flex; align-items: center; }
.chip:hover { background: var(--hover); }
.chip.active { background: #fff; color: #000; border-color: #fff; }

/* ------------------------------------------------------------------ Hauptbereich */
.main { grid-area: main; border-radius: var(--radius); overflow: hidden; position: relative; min-width: 0; container-type: inline-size; container-name: main; }
.main-scroll { height: 100%; overflow-y: auto; overflow-x: hidden; }
#view { min-height: 100%; }
.section { padding: 8px 24px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 16px 0 12px; }
.section-head h2 { margin: 0; font: 700 24px/1.2 var(--font-display); letter-spacing: -.01em; }
.section-head a, .link { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.section-head a:hover, .link:hover { color: #fff; text-decoration: underline; }
.view-pad { padding: 24px; }
.page-title { font: 800 34px/1.15 var(--font-display); margin: 8px 0 20px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 40px 24px; text-align: center; }
.empty h3 { color: #fff; font-size: 20px; margin: 0 0 8px; }

.home-hero { padding: 18px 24px 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--np-color) 55%, transparent) 0%, transparent 300px); }
.chips-row { display: flex; gap: 8px; padding: 8px 0 16px; flex-wrap: wrap; }
/* Such-Reiter: eine Zeile, waagerecht scrollbar, rechts weich ausgeblendet */
.search-wrap .chips-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); padding-right: 40px; }
.search-wrap .chips-row::-webkit-scrollbar { display: none; }
.search-wrap .chips-row .chip { flex: none; }
@media (prefers-reduced-motion: reduce) { .menu, .modal { animation: none; } }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.quick-item { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.07); border: 1px solid var(--glass-line); border-radius: var(--radius-md); overflow: hidden; height: 60px; cursor: pointer; position: relative; transition: background .2s, transform .2s; }
.quick-item:hover { background: rgba(255,255,255,.14); }
.quick-item .cover { width: 60px; height: 60px; flex: none; border-radius: 0; }
.quick-item .name { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 56px; }
.quick-item .fab { position: absolute; right: 10px; width: 38px; height: 38px; opacity: 0; transform: scale(.9); transition: all .2s; }
.quick-item:hover .fab { opacity: 1; transform: none; }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; }
.card { padding: 12px; border-radius: var(--radius-md); cursor: pointer; transition: background .2s, transform .2s; position: relative; min-width: 0; border: 1px solid transparent; }
.card:hover { background: var(--elev); border-color: var(--glass-line); }
.card .cover-wrap { position: relative; margin-bottom: 10px; }
.card .cover { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.card .cover.round { border-radius: 50%; }
.card .fab { position: absolute; right: 8px; bottom: 8px; opacity: 0; transform: translateY(8px); transition: all .25s; }
.card:hover .fab { opacity: 1; transform: none; }
.card .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cover { background: rgba(255,255,255,.08) center/cover no-repeat; object-fit: cover; }
.cover.placeholder { display: grid; place-items: center; color: var(--dim); }
.cover.placeholder svg { width: 40%; height: 40%; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.liked-cover { background: linear-gradient(135deg, #4a2bd9, #8fd3f0); display: grid; place-items: center; color: #fff; }
.liked-cover svg { width: 40%; height: 40%; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.device-cover { background: linear-gradient(135deg, #0b6e50, #2ee6a8); display: grid; place-items: center; color: #fff; }
.device-cover svg { width: 40%; height: 40%; }

.fab { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #000; display: grid; place-items: center; box-shadow: 0 8px 22px var(--accent-glow), 0 2px 6px rgba(0,0,0,.3); transition: transform .15s, background .15s, box-shadow .2s; flex: none; }
.fab:hover { transform: scale(1.07); background: var(--accent-hi); box-shadow: 0 10px 30px var(--accent-glow); }
.fab svg { width: 22px; height: 22px; }
.fab.lg { width: 58px; height: 58px; }
.fab.lg svg { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ Header (Playlist/Album) */
.hero { --c: #2d5f8a; display: flex; align-items: flex-end; gap: 28px; padding: 72px 28px 26px; position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 85%, transparent) 0%, color-mix(in srgb, var(--c) 35%, transparent) 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--glass-line-hi), transparent); }
.hero > .cover { width: clamp(150px, 22cqi, 240px); height: clamp(150px, 22cqi, 240px); border-radius: 12px; box-shadow: 0 16px 50px rgba(0,0,0,.55); flex: none; }
.hero-meta { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-kind { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.hero-title { font: 900 clamp(30px, 7.5cqi, 96px)/1.02 var(--font-display); margin: 0 0 6px; letter-spacing: -.04em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: default; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero-title.editable { cursor: pointer; }
.hero-desc { color: rgba(255,255,255,.75); font-size: 14px; }
.hero-info { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 14px; color: rgba(255,255,255,.78); }
.hero-info strong { color: #fff; }
.hero-info img { width: 24px; height: 24px; border-radius: 50%; }
.action-bar { display: flex; align-items: center; gap: 18px; padding: 22px 28px; flex-wrap: wrap;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, #222) 22%, transparent) 0, transparent 220px); }
.action-bar .spacer { flex: 1; }
.action-bar .icon-btn { width: 42px; height: 42px; }
.action-bar .icon-btn svg { width: 28px; height: 28px; }
.action-bar .icon-btn.done { color: var(--accent); }

/* ------------------------------------------------------------------ Trackliste */
.tracklist { padding: 0 24px 32px; }
.tl-head, .tl-row { display: grid; grid-template-columns: 40px minmax(160px, 4fr) minmax(110px, 3fr) minmax(100px, 2fr) 104px; gap: 16px; align-items: center; padding: 0 14px; }
.tracklist.no-album .tl-head, .tracklist.no-album .tl-row { grid-template-columns: 40px minmax(160px, 6fr) minmax(100px, 2fr) 104px; }
.tracklist.no-added .tl-head, .tracklist.no-added .tl-row { grid-template-columns: 40px minmax(160px, 4fr) minmax(110px, 3fr) 104px; }
.tracklist.compact .tl-head, .tracklist.compact .tl-row { grid-template-columns: 40px minmax(140px, 1fr) 104px; }
.tl-head { height: 38px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 10px; position: sticky; top: 0; z-index: 2;
  background: rgba(20,20,26,.7); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 10px 10px 0 0; }
.tl-head .num, .tl-row .num { text-align: right; }
.tl-head .dur { display: flex; justify-content: flex-end; padding-right: 36px; }
.tl-head svg { width: 16px; height: 16px; }
.tl-row { height: 58px; border-radius: var(--radius-sm); color: var(--muted); cursor: default; user-select: none; transition: background .12s; }
.tl-row:hover { background: rgba(255,255,255,.07); }
.tl-row.selected { background: rgba(255,255,255,.13); }
.tl-row .num { font-variant-numeric: tabular-nums; font-size: 15px; position: relative; display: flex; justify-content: flex-end; }
.tl-row .num .play-ico { display: none; color: #fff; }
.tl-row:hover .num .n { display: none; }
.tl-row:hover .num .play-ico { display: grid; }
.tl-row.playing .num .n, .tl-row.playing .title-text { color: var(--accent); }
.tl-row.playing { background: linear-gradient(90deg, rgba(34, 211, 155, .13), rgba(34, 211, 155, .03) 60%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.tl-row.playing:hover { background: linear-gradient(90deg, rgba(34, 211, 155, .18), rgba(255, 255, 255, .06) 60%); }
.tl-row .eq { display: none; }
.tl-row.playing:not(:hover) .num .n { display: none; }
.tl-row.playing:not(:hover) .eq { display: flex; }
.tl-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tl-title .cover { width: 42px; height: 42px; border-radius: 8px; flex: none; }
.tl-title .texts { min-width: 0; }
.title-text { color: #fff; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tl-sub { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.tl-sub .artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-sub .artist a:hover { color: #fff; text-decoration: underline; }
.inds { display: contents; }
.tag { display: inline-grid; place-items: center; height: 16px; min-width: 16px; padding: 0 4px; border-radius: 4px; background: rgba(255,255,255,.55); color: #000; font-size: 9px; font-weight: 800; flex: none; }
.ind { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.ind svg { width: 16px; height: 16px; }
.ind.device { color: var(--accent); filter: drop-shadow(0 0 4px var(--accent-glow)); }
.ind.server { color: #7cc0ff; }
.src { display: inline-grid; place-items: center; height: 16px; padding: 0 5px; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: .03em; flex: none; }
.src.youtube { background: #ff3b3b; color: #fff; }
.src.spotify { background: rgba(30, 215, 96, .18); color: #7ff0b0; border: 1px solid rgba(30,215,96,.35); }
.src.soundcloud { background: #ff5500; color: #fff; }
.src.audius { background: linear-gradient(135deg, #cc0fe0, #7e1bcc); color: #fff; }
.src.bandcamp { background: #1da0c3; color: #fff; }
.src.mixcloud { background: #5000ff; color: #fff; }
.tl-album, .tl-added { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.tl-album a:hover { color: #fff; text-decoration: underline; }
.tl-dur { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-variant-numeric: tabular-nums; }
.tl-dur .icon-btn { opacity: 0; width: 26px; height: 26px; }
.tl-dur .icon-btn svg { width: 17px; height: 17px; }
.tl-row:hover .tl-dur .icon-btn, .tl-dur .icon-btn.active { opacity: 1; }
.tl-dur .icon-btn.liked { opacity: 1; color: var(--accent); }

.eq { gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; border-radius: 1px; background: var(--accent); animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.45s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

/* Inhaltsbreite statt Fensterbreite: Spalten fallen weg, wenn der Hauptbereich schmal wird */
@container main (max-width: 820px) {
  .tl-head .added, .tl-row .tl-added { display: none; }
  .tracklist:not(.compact) .tl-head, .tracklist:not(.compact) .tl-row { grid-template-columns: 40px minmax(150px, 4fr) minmax(100px, 3fr) 104px; }
  .tracklist.no-album .tl-head, .tracklist.no-album .tl-row { grid-template-columns: 40px minmax(150px, 1fr) 104px; }
}
@container main (max-width: 600px) {
  .tl-head { display: none !important; }
  .tracklist .tl-head, .tracklist .tl-row { grid-template-columns: minmax(0, 1fr) auto !important; padding: 0 8px; gap: 10px; }
  .tl-row .num, .tl-row .tl-album, .tl-row .tl-added { display: none !important; }
  .tl-dur .icon-btn { opacity: 1; }
  .tl-dur > span { display: none; }
  .tracklist, .section, .view-pad, .search-wrap { padding-left: 12px; padding-right: 12px; }
  .action-bar { padding: 16px 12px; gap: 12px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 28px 16px 18px; gap: 16px; }
  .hero > .cover { width: min(220px, 60cqi); height: min(220px, 60cqi); align-self: center; }
  .hero-title { font-size: clamp(28px, 10cqi, 48px); }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick-item { height: 52px; } .quick-item .cover { width: 52px; height: 52px; } .quick-item .name { font-size: 13px; padding-right: 8px; } .quick-item .fab { display: none; }
  .page-title { font-size: 28px; }
  .search-top { grid-template-columns: 1fr !important; }
  .kv { grid-template-columns: 1fr !important; }
}
@container main (max-width: 380px) { .quick-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Suche */
.search-wrap { padding: 16px 24px 32px; }
.search-top { display: grid; grid-template-columns: minmax(260px, 2fr) 3fr; gap: 24px; margin-bottom: 24px; }
@container main (max-width: 900px) { .search-top { grid-template-columns: 1fr; } }
.top-result { --tr-c: transparent; background: linear-gradient(135deg, color-mix(in srgb, var(--tr-c) 70%, transparent), transparent 75%), var(--elev); border: 1px solid var(--glass-line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; cursor: pointer; transition: background .2s; }
.top-result:hover { background: var(--elev-2); }
.top-result .cover { width: 120px; height: 120px; border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.top-result .t { font: 800 30px/1.15 var(--font-display); letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-result .s { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.top-result .fab { position: absolute; right: 20px; bottom: 20px; opacity: 0; transform: translateY(8px); transition: all .25s; }
.top-result:hover .fab { opacity: 1; transform: none; }
.loading { display: flex; justify-content: center; padding: 48px; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.browse-tile { aspect-ratio: 1.6; border-radius: 16px; padding: 16px; font: 800 22px/1.15 var(--font-display); position: relative; overflow: hidden; cursor: pointer; transition: transform .2s, filter .2s; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset; }
.browse-tile::after { content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -15%; bottom: -25%; border-radius: 22%; background: rgba(255,255,255,.18); transform: rotate(25deg); }
.browse-tile:hover { transform: translateY(-2px); filter: brightness(1.12); }

/* ------------------------------------------------------------------ Rechtes Panel */
.nowpanel { grid-area: now; border-radius: var(--radius); overflow-y: auto; overflow-x: hidden; min-width: 0; }
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px; position: sticky; top: 0; z-index: 2; font-weight: 700;
  background: linear-gradient(180deg, rgba(20,20,26,.85), rgba(20,20,26,0)); }
.np-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-body { padding: 0 16px 16px; }
.np-cover { width: 100%; aspect-ratio: 1; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.np-title-row { display: flex; align-items: center; gap: 12px; margin: 16px 0 2px; }
.np-title { font: 800 22px/1.2 var(--font-display); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-artist { color: var(--muted); font-size: 15px; }
.np-card { background: rgba(255,255,255,.06); border: 1px solid var(--glass-line); border-radius: 14px; padding: 16px; margin-top: 14px; }
.np-card h4 { margin: 0 0 12px; font-size: 15px; }
.np-card .row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; padding: 3px 0; }
.np-card .row b { color: #fff; font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.np-lyrics { background: color-mix(in srgb, var(--np-color) 70%, rgba(0,0,0,.2)); border-color: rgba(255,255,255,.12); cursor: pointer; position: relative; overflow: hidden; }
.np-lyrics h4 { display: flex; justify-content: space-between; align-items: center; }
.np-lyrics .lp { font: 700 20px/1.35 var(--font-display); color: rgba(255,255,255,.5); max-height: 160px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.np-lyrics .lp div { transition: color .3s; padding: 2px 0; }
.np-lyrics .lp .on { color: #fff; }
.np-lyrics .lp.plain { font-size: 16px; color: rgba(255,255,255,.85); white-space: pre-line; }

.btn { height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { transform: scale(1.03); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: #000; box-shadow: 0 6px 18px var(--accent-glow); }
.btn.primary:hover { background: var(--accent-hi); }
.btn.white { background: #fff; color: #000; }
.btn.outline { border: 1px solid rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.04); }
.btn.outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn.ghost { color: var(--muted); }
.btn.ghost:hover { color: #fff; }
.btn.danger { background: var(--danger); color: #000; }
.btn:disabled { opacity: .5; pointer-events: none; }
.queue-item { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.queue-item:hover { background: var(--elev); }
.queue-item .cover { width: 42px; height: 42px; border-radius: 8px; flex: none; }
.queue-item .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .a { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item.current .t { color: var(--accent); }
.queue-item .meta { min-width: 0; flex: 1; }

/* ------------------------------------------------------------------ Lyrics-Ansicht */
.lyrics-view { min-height: 100%; padding: 40px clamp(20px, 6cqi, 72px) 45vh; background: linear-gradient(180deg, color-mix(in srgb, var(--np-color) 75%, transparent), color-mix(in srgb, var(--np-color) 25%, transparent)); }
.lyrics-view .lv-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.lyrics-view .lv-head img { width: 56px; height: 56px; border-radius: 10px; }
.lyrics-view .lv-head .t { font-weight: 700; font-size: 16px; }
.lyrics-view .lv-head .a { color: rgba(255,255,255,.7); font-size: 14px; }
.lyric-line { font: 800 clamp(22px, 4.4cqi, 40px)/1.3 var(--font-display); color: rgba(255,255,255,.38); padding: 6px 0; cursor: pointer; letter-spacing: -.01em; transition: color .35s, transform .35s, filter .35s; transform-origin: left center; }
.lyric-line:hover { color: rgba(255,255,255,.7); }
.lyric-line.past { color: rgba(255,255,255,.62); }
.lyric-line.on { color: #fff; transform: scale(1.02); text-shadow: 0 0 30px rgba(255,255,255,.25); }
.lyric-line:empty::before { content: "♪"; }
.lyrics-plain { font: 700 clamp(18px, 3cqi, 26px)/1.55 var(--font-display); white-space: pre-line; color: rgba(255,255,255,.9); }
.lyrics-credit { margin-top: 40px; color: rgba(255,255,255,.5); font-size: 12px; }

/* ------------------------------------------------------------------ Player */
.player { grid-area: player; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 560px) minmax(max-content, 1fr); align-items: center; gap: 16px; padding: 0 14px; border-radius: var(--radius); position: relative; background: var(--glass-strong); }
.player-mini-progress { display: none; }
.player-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-cover { width: 58px; height: 58px; border-radius: 10px; background: var(--elev); object-fit: cover; flex: none; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.player-cover:not([src]), .player-cover[src=""] { visibility: hidden; }
.player-meta { min-width: 0; }
.player-title { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.player-title:hover { text-decoration: underline; }
.player-artist { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-source { color: var(--accent); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.player-controls { display: flex; align-items: center; gap: 16px; }
.player-controls .icon-btn svg { width: 18px; height: 18px; }
.play-btn { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; transition: transform .12s; box-shadow: 0 4px 14px rgba(255,255,255,.18); flex: none; }
.play-btn:hover { transform: scale(1.07); }
.play-btn svg { width: 18px; height: 18px; }
/* Laden: ruhiges Icon + drehender Ring statt Blinken */
.play-btn { position: relative; }
.play-btn.is-loading::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin .9s linear infinite; pointer-events: none; }
@keyframes pulse { 50% { opacity: .3; } }
.player-progress { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.player-progress span { min-width: 40px; text-align: center; }
.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.player-right .icon-btn svg { width: 18px; height: 18px; }

.slider { flex: 1; height: 14px; position: relative; cursor: pointer; display: flex; align-items: center; touch-action: none; min-width: 40px; }
.slider::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); }
.slider-buffer { position: absolute; left: 0; height: 4px; border-radius: 2px; background: rgba(255,255,255,.28); width: 0; }
.slider-fill { position: absolute; left: 0; height: 4px; border-radius: 2px; background: #fff; width: 0; z-index: 1; }
.slider-fill::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; box-shadow: 0 2px 6px rgba(0,0,0,.5); transition: opacity .15s; }
.slider:hover .slider-fill, .slider.drag .slider-fill { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.slider:hover .slider-fill::after, .slider.drag .slider-fill::after { opacity: 1; }
.slider.volume { flex: 0 0 96px; }

/* ------------------------------------------------------------------ Tab-Leiste (schmal) */
.tabbar { display: none; grid-area: tabs; border-radius: var(--radius); align-items: center; justify-content: space-around; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 6px 12px; border-radius: 12px; flex: 1; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: #fff; }
.tabbar a.active svg { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }

/* ------------------------------------------------------------------ Overlays */
/* Menüs: dichteres Glas mit feiner Lichtkante oben; Titel-Menüs bekommen einen Kopf,
   der in der Hauptfarbe des Covers schimmert (--menu-tint, aus dem Cover berechnet). */
.menu {
  --menu-tint: transparent;
  position: fixed; z-index: 100; min-width: 210px; max-width: 280px; padding: 5px; font-size: 13px;
  max-height: 70vh; overflow-y: auto; border-radius: var(--radius-md);
  background:
    radial-gradient(140% 120px at 0 0, color-mix(in srgb, var(--menu-tint) 42%, transparent), transparent 78%),
    rgba(24, 25, 32, .9);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 48px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  animation: menu-in .14s cubic-bezier(.2, .9, .3, 1.2);
  scrollbar-width: none;
}
@keyframes menu-in { from { opacity: 0; transform: scale(.94); } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.menu-head { display: flex; align-items: center; gap: 11px; padding: 7px 8px 9px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mh-cover { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.mh-text { min-width: 0; }
.mh-title { font: 600 14px/1.25 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 12px; min-width: 0; }
.mh-sub span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 7px 10px; border-radius: 7px; text-align: left; color: rgba(255, 255, 255, .92); font-weight: 500; white-space: nowrap; line-height: 1.25; outline: none; transition: background .1s, color .1s; }
.menu-item svg { width: 16px; height: 16px; color: var(--muted); flex: none; transition: color .1s; }
.menu-item:hover, .menu-item.open, .menu-item:focus-visible { background: rgba(255, 255, 255, .09); color: #fff; }
.menu-item:hover svg, .menu-item.open svg, .menu-item:focus-visible svg { color: #fff; }
.menu-item:focus-visible { box-shadow: inset 0 0 0 1.5px var(--accent); }
.menu-item.has-sub > svg:last-child { width: 14px; height: 14px; margin-right: -3px; }
.menu-item .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu-item.danger, .menu-item.danger svg { color: #ff8f99; }
.menu-item.danger:hover, .menu-item.danger:focus-visible { background: rgba(255, 95, 109, .14); color: #ffb3ba; }
.menu-item.danger:hover svg { color: #ffb3ba; }
.menu-item.check .chk { display: inline-flex; width: 14px; height: 14px; flex: none; }
.menu-item.check.on { color: var(--accent); }
.menu-item.check.on .chk svg { color: var(--accent); filter: drop-shadow(0 0 4px var(--accent-glow)); }
.menu-item:disabled { opacity: .5; pointer-events: none; }
/* „Zur Playlist hinzufügen“ (Spotify-Stil) */
/* feste Höhe: bleibt gleich groß, egal ob gesucht wird oder wie viele Treffer es gibt */
.menu.picker { width: 260px; max-width: calc(100vw - 16px); padding: 12px 6px 6px; display: flex; flex-direction: column; overflow: hidden; height: min(440px, 80vh); max-height: min(440px, 80vh); }
.pk-title { padding: 0 10px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pk-search { display: flex; align-items: center; gap: 8px; margin: 0 4px 6px; padding: 0 10px; height: 32px; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid transparent; transition: border .15s, background .15s; }
.pk-search:focus-within { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); }
.pk-search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.pk-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font-size: 13px; }
.pk-search input::placeholder { color: var(--muted); }
.pk-new { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 6px; font-weight: 700; font-size: 14px; color: #fff; }
.pk-new:hover { background: rgba(255,255,255,.08); }
.pk-new svg { width: 18px; height: 18px; color: #fff; }
/* Trennlinie leicht eingerückt und getrennt von der Hover-Fläche von „Neue Playlist“ */
.pk-list { flex: 1; min-height: 0; overflow-y: auto; margin: 6px 4px 0; padding-top: 2px; border-top: 1px solid var(--glass-line);
  scrollbar-width: auto; scrollbar-color: auto; /* sonst ignoriert Chromium die ::-webkit-scrollbar-Stile und zeigt Pfeile */ }
.pk-list::-webkit-scrollbar { width: 8px; }
.pk-list::-webkit-scrollbar-button { display: none; height: 0; }
.pk-list::-webkit-scrollbar-track { background: transparent; }
.pk-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.pk-list::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.4); }
.pk-sec { padding: 12px 10px 6px; font-size: 13px; font-weight: 700; color: #fff; }
.pk-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 8px; border-radius: 6px; text-align: left; }
.pk-row:hover { background: rgba(255,255,255,.08); }
.pk-cover { width: 40px; height: 40px; border-radius: 4px; flex: none; object-fit: cover; }
.pk-cover.liked-cover svg { width: 16px; height: 16px; }
.pk-texts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pk-name { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-row.on .pk-name { color: #fff; }
.pk-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pk-radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.45); display: grid; place-items: center; flex: none; transition: background .12s, border-color .12s; }
.pk-radio svg { width: 11px; height: 11px; color: #000; opacity: 0; stroke-width: 3; }
.pk-row:hover .pk-radio { border-color: #fff; }
.pk-row.on .pk-radio { background: var(--accent); border-color: var(--accent); }
.pk-row.on .pk-radio svg { opacity: 1; }
.pk-empty { padding: 16px 10px; color: var(--muted); font-size: 13px; text-align: center; }
.pk-foot { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--glass-line); margin-top: 4px; }
.pk-foot button { height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.pk-cancel { color: var(--muted); }
.pk-cancel:hover { color: #fff; transform: scale(1.03); }
.pk-done { background: #fff; color: #000; }
.pk-done:hover { transform: scale(1.04); }
.pk-done[hidden] { display: none; }
.menu-sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 4px 8px; }
.menu-label { padding: 7px 10px 3px; color: var(--dim); font-size: 12px; font-weight: 600; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { border-radius: var(--radius); padding: 26px; width: min(520px, 100%); background: rgba(34, 34, 44, .85); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line-hi); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .15s ease-out; }
.modal h2 { margin: 0 0 16px; font-size: 22px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field textarea, .field select { background: rgba(255,255,255,.07); border: 1px solid var(--glass-line); border-radius: 10px; padding: 11px 13px; outline: none; transition: border .15s, background .15s; min-width: 0; }
.field input:focus, .field textarea:focus { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.1); }
.field .hint { font-size: 12px; color: var(--dim); }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; left: 50%; bottom: calc(var(--player-h) + var(--tabbar-h) + 24px); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 200; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 11px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.4); animation: pop .2s; max-width: 100%;
  background: rgba(47, 128, 237, .85); color: #fff; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid rgba(255,255,255,.15); }
.toast.ok { background: rgba(240, 240, 246, .9); color: #000; }
.toast.err { background: rgba(255, 95, 109, .9); color: #000; }

/* ------------------------------------------------------------------ Downloads/Einstellungen */
.job { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; }
.job:hover { background: rgba(255,255,255,.05); }
.job .cover { width: 48px; height: 48px; border-radius: 8px; }
.job .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .s { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.job .s.err { color: var(--danger); }
.progress { height: 4px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress div { height: 100%; background: var(--accent); transition: width .4s; box-shadow: 0 0 8px var(--accent-glow); }
.settings-grid { display: grid; gap: 16px; max-width: 780px; }
.panel { background: rgba(255,255,255,.05); border: 1px solid var(--glass-line); border-radius: 18px; padding: 20px; min-width: 0; }
.panel h3 { margin: 0 0 14px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.panel ol { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.panel ol li { margin: 4px 0; }
.panel ol a { color: var(--accent); }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 6px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-right: 6px; }
.status-dot.on { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ------------------------------------------------------------------ Verbindungs-Bildschirm */
.connect { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, rgba(18, 70, 55, .9), rgba(0,0,0,.92) 70%); }
.connect-box { width: min(420px, 100%); text-align: center; padding: 32px 28px; border-radius: 24px; background: rgba(30,30,38,.6); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line-hi); }
.connect-box img { width: 72px; height: 72px; margin: 0 auto 16px; filter: drop-shadow(0 8px 24px var(--accent-glow)); }
.connect-box h1 { font: 800 32px/1.2 var(--font-display); margin: 0 0 8px; }
.connect-box p { color: var(--muted); margin: 0 0 24px; }
.connect-box .field { text-align: left; }
.connect-box .btn { width: 100%; height: 48px; font-size: 16px; }
.connect-err { color: var(--danger); min-height: 20px; margin-top: 12px; font-size: 13px; }

/* ------------------------------------------------------------------ Vollbild-Player */
.fullplayer { position: fixed; inset: 0; z-index: 120; background: #07070a; isolation: isolate; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 24px 32px 32px; animation: fade .2s; overflow: hidden; container-type: inline-size; }
.fullplayer::before { content: ""; position: absolute; inset: -10%; background: var(--fp-img, none) center/cover; filter: blur(80px) saturate(1.6) brightness(.6); transform: scale(1.1); z-index: -2; }
.fullplayer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.65)); z-index: -1; }
.fullplayer .fp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fullplayer .fp-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; min-height: 0; padding: 24px 0; }
.fullplayer .fp-art { display: flex; flex-direction: column; gap: 20px; justify-content: center; min-width: 0; align-items: flex-start; }
.fullplayer .fp-art img { width: min(100%, 52vh, 520px); aspect-ratio: 1; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6); object-fit: cover; }
.fullplayer .fp-text h1 { font: 900 clamp(26px, 4cqi, 56px)/1.05 var(--font-display); margin: 0 0 6px; letter-spacing: -.03em; }
.fullplayer .fp-text p { font-size: 18px; color: rgba(255,255,255,.75); margin: 0; }
.fullplayer .fp-lyrics { height: 100%; overflow-y: auto; mask-image: linear-gradient(180deg, transparent, #000 15%, #000 80%, transparent); padding: 30% 8px; scrollbar-width: none; }
.fullplayer .fp-lyrics::-webkit-scrollbar { display: none; }
.fullplayer .fp-lyrics .lyric-line { font-size: clamp(20px, 2.6cqi, 36px); }
.fullplayer .fp-bottom { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.fullplayer .fp-bottom .player-progress { max-width: 900px; }
.fullplayer .player-controls .icon-btn svg { width: 24px; height: 24px; }
.fullplayer .play-btn { width: 60px; height: 60px; }
.fullplayer .play-btn svg { width: 26px; height: 26px; }
@container (max-width: 820px) {
  .fullplayer .fp-main { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
  .fullplayer .fp-art { flex-direction: row; align-items: center; }
  .fullplayer .fp-art img { width: min(38cqi, 30vh); }
  .fullplayer .fp-lyrics { padding: 10% 4px 40%; }
}

/* ------------------------------------------------------------------ Fenstergrößen */

/* Mittel: Now-Playing-Panel wird zur schwebenden Schublade */
@media (max-width: 1180px) {
  .app, .app.nowpanel-hidden { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); grid-template-areas: "top top" "side main" "player player"; }
  .app.nowpanel-hidden .main { margin-right: 0; }
  .nowpanel { position: fixed; right: 18px; top: calc(var(--topbar-h) + 4px); bottom: calc(var(--player-h) + var(--tabbar-h) + 22px); width: min(360px, calc(100vw - 36px)); z-index: 60;
    background: var(--glass-strong); box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: slidein .2s ease-out; }
  @keyframes slidein { from { opacity: 0; transform: translateX(20px); } }
  .player { grid-template-columns: minmax(0, 1fr) minmax(200px, 440px) max-content; }
  .player-source { display: none; }
}

/* Schmaler: Sidebar nur Icons */
@media (max-width: 920px) {
  .app:not(.sidebar-open) { --sidebar-w: 76px; }
  .app:not(.sidebar-open) .sidebar-title, .app:not(.sidebar-open) .sidebar-chips, .app:not(.sidebar-open) .side-item .meta, .app:not(.sidebar-open) #btn-new-playlist { display: none; }
  .app:not(.sidebar-open) .sidebar-head { flex-direction: column; padding: 14px 0 8px; }
  .app:not(.sidebar-open) .side-item { justify-content: center; padding: 6px 0; }
  .app.sidebar-open .sidebar { position: fixed; left: 10px; top: var(--topbar-h); bottom: calc(var(--player-h) + 20px); width: 300px; z-index: 70; background: var(--glass-strong); box-shadow: 0 30px 80px rgba(0,0,0,.55); }
  .player { grid-template-columns: minmax(0, 1fr) minmax(180px, 360px) max-content; }
  .player-right .volume, #pl-mute, #pl-fullscreen { display: none; }
  .player-left #pl-like { display: none; }
  .topbar-right .avatar, .searchbox-sep, .searchbox a { display: none; }
  .topbar-left, .topbar-right { flex: 0 0 auto; }
  .topbar-center { flex: 1 1 auto; }
  .player-controls { gap: 10px; }
}

/* Handy / sehr schmales Fenster */
@media (max-width: 640px) {
  :root { --player-h: 66px; --topbar-h: 58px; --tabbar-h: 62px; --radius: 14px; }
  .app, .app.nowpanel-hidden { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--topbar-h) minmax(0, 1fr) var(--player-h) var(--tabbar-h);
    grid-template-areas: "top" "main" "player" "tabs"; gap: 8px; padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .app.sidebar-open .sidebar { display: flex; position: fixed; left: 8px; right: 8px; width: auto; top: var(--topbar-h); bottom: calc(var(--player-h) + var(--tabbar-h) + 24px); }
  .tabbar { display: flex; }
  .topbar { padding: 0; gap: 8px; }
  .nav-arrow, .topbar-right .avatar, #btn-home, .topbar-right a[href="#/downloads"] { display: none; }
  .topbar-left, .topbar-right { flex: 0 0 auto; }
  .topbar-center { flex: 1; }
  .searchbox { height: 42px; padding: 0 12px; }
  .searchbox-sep, .searchbox a { display: none; }
  .player { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 8px 0 8px; overflow: hidden; }
  .player-mini-progress { display: block; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; }
  .player-mini-progress div { height: 100%; width: 0; background: #fff; }
  .player-cover { width: 48px; height: 48px; border-radius: 8px; }
  .player-center { flex-direction: row; }
  .player-center .player-progress, #pl-shuffle, #pl-repeat, #pl-prev { display: none; }
  .player-controls { gap: 4px; }
  .player-right { display: none; }
  .player-source { display: none; }
  .nowpanel { right: 8px; left: 8px; width: auto; }
  .fullplayer { padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
}

/* Niedrige Fenster */
@media (max-height: 620px) and (min-width: 641px) {
  :root { --topbar-h: 54px; --player-h: 76px; }
  .hero { padding-top: 32px; }
  .hero > .cover { width: 140px; height: 140px; }
  .searchbox, .round-btn { height: 42px; }
  .round-btn { width: 42px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { :root { --glass: rgba(22,22,28,.94); --glass-strong: rgba(26,26,34,.97); } }

/* ------------------------------------------------------------------ Eigene Fensterleiste (Desktop-App) */
.winctl { display: flex; align-items: stretch; height: 40px; margin-left: 6px; margin-right: -6px; border-radius: 12px; overflow: hidden; }
.winctl button { width: 46px; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.winctl button svg { width: 12px; height: 12px; }
.winctl button:hover { background: rgba(255,255,255,.1); color: #fff; }
.winctl button.close:hover { background: #e81123; color: #fff; }
.tauri .topbar { padding-top: 2px; }
.tauri .topbar [data-tauri-drag-region] { -webkit-user-select: none; user-select: none; }
html.tauri:not(.maximized) body { border-radius: 10px; }

/* ------------------------------------------------------------------ Geräte-Popover */
#pl-devices.open { color: #fff; background: rgba(255,255,255,.1); }
.devpop { position: fixed; z-index: 110; max-height: min(78vh, 640px); overflow-y: auto; padding: 16px; border-radius: 18px;
  background: rgba(30, 30, 40, .86); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line-hi); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .15s ease-out; }
.devpop h4 { margin: 4px 0 12px; display: flex; align-items: center; gap: 8px; font-size: 15px; flex-wrap: wrap; }
.devpop h4 small { font-weight: 400; font-size: 12px; }
.devpop h4 svg { width: 18px; height: 18px; color: var(--accent); }
.dev { padding: 8px 10px; border-radius: 12px; margin-bottom: 4px; transition: background .15s; }
.dev:hover { background: rgba(255,255,255,.06); }
.dev.on { background: rgba(34, 211, 155, .1); box-shadow: 0 0 0 1px rgba(34,211,155,.25) inset; }
.dev.off { opacity: .55; }
.dev-main { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.dev-main input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.dev-ico { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; flex: none; }
.dev.on .dev-ico { color: var(--accent); }
.dev-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dev-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-text small { color: var(--muted); font-size: 12px; }
.dev.on .dev-text small { color: var(--accent); }
.dev .eq { display: flex; }
.dev-vol { margin: 8px 4px 2px 66px; }
.dev-latency { margin: 10px 2px 4px; font-size: 13px; }
.dev-latency label { color: var(--muted); }
.lat-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.lat-row input { flex: 1; accent-color: var(--accent); }
.lat-row span { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.toggle { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.devpop .btn { width: 100%; margin-top: 10px; }
.jam-code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.jam-code span { font: 800 28px/1 var(--font-display); letter-spacing: .12em; color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
.jam-code .btn { width: auto; margin: 0; }
.jam-guests { margin: 8px 0; }
.guest { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.guest span { display: flex; align-items: center; gap: 8px; }
.guest svg { width: 16px; height: 16px; color: var(--muted); }

/* ------------------------------------------------------------------ Jam-Ansicht */
.jam-view { min-height: 100%; }
.jam-hero { padding: 32px 28px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--np-color) 70%, transparent), transparent); }
.jam-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(34,211,155,.15); border: 1px solid rgba(34,211,155,.35); color: var(--accent); font-weight: 600; font-size: 13px; }
.jam-badge svg { width: 16px; height: 16px; }
.jam-now { display: flex; align-items: center; gap: 22px; margin: 24px 0 18px; flex-wrap: wrap; }
.jam-now .cover { width: min(200px, 40cqi); aspect-ratio: 1; height: auto; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.jam-now .t { font: 800 clamp(24px, 4cqi, 40px)/1.1 var(--font-display); letter-spacing: -.02em; }
.jam-now .a { color: var(--muted); font-size: 16px; margin: 4px 0 14px; }
.jam-ctrl { display: flex; align-items: center; gap: 14px; }
.jam-ctrl .play-btn { width: 48px; height: 48px; }
.jam-people { display: flex; gap: 6px; flex-wrap: wrap; }
.jam-search { max-width: 520px; margin-bottom: 12px; }

/* ------------------------------------------------------------------ Gast-Modus (Jam per Link) */
.app.guest .sidebar, .app.guest #btn-new-playlist, .app.guest .topbar-right a, .app.guest #pl-like, .app.guest #pl-devices,
.app.guest .tabbar a:not([data-tab="search"]), .app.guest #btn-home, .app.guest .searchbox { display: none !important; }
.app.guest { grid-template-columns: minmax(0, 1fr) var(--nowpanel-w); grid-template-areas: "top now" "main now" "player player"; }
.app.guest .topbar { grid-area: top; }
@media (max-width: 1180px) { .app.guest { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "player"; } }
.app.guest .tabbar { display: none !important; }

/* Smart Shuffle + Empfehlungen */
.icon-btn.smart { color: var(--accent); }
.icon-btn.smart::before { content: "✦"; position: absolute; top: -3px; right: -3px; font-size: 10px; color: var(--accent); text-shadow: 0 0 6px var(--accent-glow); }
.rec-badge { color: var(--accent); font-size: 12px; margin-left: 4px; text-shadow: 0 0 8px var(--accent-glow); }
.mix-head { display: flex; align-items: center; gap: 16px; margin: 0 0 12px; }
.mix-head b { display: block; font-size: 18px; }
.mix-head .muted { font-size: 13px; }
.mix-empty { padding: 8px 0 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.mix-cover { background: linear-gradient(135deg, #6a3df0, #22d39b); display: grid; place-items: center; color: #fff; }
.mix-cover svg { width: 40%; height: 40%; }
.player-progress { min-width: 0; }
.player-right { flex-wrap: nowrap; }

/* Lyrics im Panel: weich gleitend, Karaoke-Füllung */
.np-lyrics .lp:not(.plain) { position: relative; height: 172px; max-height: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 72%, transparent 100%); }
.lp-track { transition: transform .7s cubic-bezier(.22, 1, .36, 1); will-change: transform; padding-top: 34px; }
.lp-track > div { padding: 3px 0; color: rgba(255,255,255,.42); transition: color .45s ease, opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1); transform-origin: left center; cursor: pointer; }
.lp-track > div.past { color: rgba(255,255,255,.6); }
.lp-track > div:hover { color: rgba(255,255,255,.8); }
.lp-track > div.on, .lyric-line.on {
  --p: 0%;
  color: transparent;
  background: linear-gradient(90deg, #fff 0, #fff var(--p), rgba(255,255,255,.5) calc(var(--p) + 6%), rgba(255,255,255,.5) 100%);
  -webkit-background-clip: text; background-clip: text;
  transform: scale(1.03);
}
.lyric-line { transition: color .35s, transform .45s cubic-bezier(.22,1,.36,1), filter .35s; }
.lyric-line.past { filter: blur(.3px); }

/* Native App-Anmutung: kein Markieren von UI-Text, keine herausziehbaren Bilder */
body { -webkit-user-select: none; user-select: none; }
input, textarea, .lyrics-plain, .code, .kv dd, .hero-desc { -webkit-user-select: text; user-select: text; }
img, a { -webkit-user-drag: none; }
.menu-item[disabled] { opacity: .4; pointer-events: none; }

/* ------------------------------------------------------------------ Konten */
.acc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.acc-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 18px; color: #000; background: linear-gradient(135deg, var(--accent), #8fd3f0); }
.acc-avatar.sm { width: 34px; height: 34px; font-size: 14px; }
.acc-name { font-weight: 700; font-size: 16px; }
.acc-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; }
.acc-badge.admin { background: rgba(34, 211, 155, .18); color: var(--accent); border: 1px solid rgba(34, 211, 155, .35); }
.acc-badge.off { background: rgba(255, 95, 109, .15); color: var(--danger); border: 1px solid rgba(255, 95, 109, .35); }
.user-list { display: flex; flex-direction: column; gap: 2px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.user-row:hover { background: rgba(255,255,255,.05); }
.user-row.disabled { opacity: .55; }
.user-main { flex: 1; min-width: 0; }
.user-name { font-weight: 600; }
.user-sub, .user-perms { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-modal { width: min(560px, 100%); }
.user-modal .toggle small { font-size: 12px; }
.perm-list { margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.04); transition: opacity .15s; }
.perm-list.dim { opacity: .45; pointer-events: none; }
.user-modal .actions { align-items: center; }
.connect-sub { color: var(--muted); }


/* ------------------------------------------------------------------ Platzhalter-Cover */
.gen-cover { display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h1) 55% 42%), hsl(var(--h2) 60% 22%)); color: rgba(255, 255, 255, .92); overflow: hidden; }
.gen-cover { container-type: size; }
/* Buchstabe skaliert mit der Cover-Größe (Sidebar-Miniatur bis große Karte) */
.gen-cover span { font: 700 46cqmin/1 var(--font-display); text-shadow: 0 4px 18px rgba(0, 0, 0, .35); }

/* ------------------------------------------------------------------ Mix-Kachel + Song-Karten */
.mix-cover { position: relative; }
.mix-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .65)); border-radius: inherit; }
.mix-label { position: absolute; left: 12px; bottom: 10px; z-index: 1; font: 700 20px/1.1 var(--font-display); text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.track-card { cursor: pointer; }
.track-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ Wiedergabe-Panel ohne Song */
.np-idle { display: flex; flex-direction: column; gap: 2px; }
.idle-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.idle-head h3 { margin: 0; font-size: 16px; }
.idle-head .btn { height: 32px; padding: 0 14px; font-size: 13px; gap: 6px; }
.idle-head .btn svg { width: 14px; height: 14px; }
.idle-row { display: grid; grid-template-columns: 44px 1fr 18px; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 6px; border-radius: var(--radius-sm); text-align: left; transition: background .12s; }
.idle-row:hover, .idle-row:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.idle-row .cover { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.idle-row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idle-row .a { grid-column: 2; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idle-row > svg { grid-column: 3; grid-row: 1 / 3; width: 16px; height: 16px; opacity: 0; transition: opacity .12s; }
.idle-row:hover > svg { opacity: 1; }
.idle-empty { text-align: center; padding: 28px 8px; }
.idle-art { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, rgba(34, 211, 155, .35), rgba(34, 211, 155, .06)); color: var(--accent); }
.idle-art svg { width: 30px; height: 30px; }
.idle-empty h3 { margin: 0 0 6px; }
.idle-empty p { margin: 0 0 16px; font-size: 13px; }

/* ------------------------------------------------------------------ Live-Abzeichen (synchron/Jam) */
.sync-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--accent); background: rgba(34, 211, 155, .12); border: 1px solid rgba(34, 211, 155, .3); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.sync-pill:hover { background: rgba(34, 211, 155, .2); }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: sync-pulse 2s ease-out infinite; flex: none; }
@keyframes sync-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 155, .55); } 70%, 100% { box-shadow: 0 0 0 6px rgba(34, 211, 155, 0); } }

/* ------------------------------------------------------------------ Lade-Platzhalter */
.skel { background: linear-gradient(90deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .12) 40%, rgba(255, 255, 255, .06) 80%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: 6px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-rows { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.skel-row { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 16px; }
.skel-thumb { width: 40px; height: 40px; flex: none; }
.skel-text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skel-line { height: 10px; width: 60%; }
.skel-line.short { width: 32%; }
.skel-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, calc((100% - 30px) / 6), 210px); gap: 6px; overflow: hidden; padding-top: 4px; }
.skel-card { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.skel-cover { aspect-ratio: 1; border-radius: var(--radius-sm); }
.skel-card .skel-line { width: 80%; }
.skel-card .skel-line.short { width: 50%; }
@media (prefers-reduced-motion: reduce) { .skel, .sync-dot { animation: none; } }

/* Startseiten-Regale: eine Reihe, seitlich scrollbar (wie bei Spotify); die Bibliothek bleibt ein Raster */
.shelf.row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(150px, calc((100% - 30px) / 6), 210px); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 12px; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
.shelf.row::-webkit-scrollbar { display: none; }
.shelf.row > * { scroll-snap-align: start; }
@container main (max-width: 640px) { .shelf.row { grid-auto-columns: 42%; } }

/* ------------------------------------------------------------------ Übergänge
   Bewegung nur als Antwort auf eine Handlung: Seite wechseln, Song wechseln, Panel/Menü/Dialog
   öffnen und schließen, speichern. Kurz (120–280 ms), mit weichem Auslauf. */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.3, 1.5, .5, 1); }

/* Seitenwechsel: Inhalt gleitet aus der Richtung der Navigation herein */
#view.view-enter { animation: view-in .26s var(--ease-out) both; }
#view.view-enter.from-left { animation-name: view-in-back; }
@keyframes view-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes view-in-back { from { opacity: 0; transform: translateX(-14px); } }

/* Songwechsel in der Player-Leiste */
.player-left.track-swap .player-cover { animation: swap-cover .32s var(--ease-out); }
.player-left.track-swap .player-meta { animation: swap-meta .32s var(--ease-out); }
@keyframes swap-cover { from { opacity: 0; transform: scale(.86); } }
@keyframes swap-meta { from { opacity: 0; transform: translateY(6px); } }

/* Play/Pause federt */
.play-btn.morph svg { animation: morph .28s var(--ease-spring); }
@keyframes morph { from { transform: scale(.6) rotate(-12deg); opacity: .4; } }

/* Lieblingssong gespeichert */
.icon-btn.pop svg { animation: like-pop .42s var(--ease-spring); }
@keyframes like-pop { 0% { transform: scale(.6); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Menüs und Dialoge verschwinden auch weich */
.menu.closing { animation: menu-out .1s ease-in forwards; pointer-events: none; }
@keyframes menu-out { to { opacity: 0; transform: scale(.96); } }
.modal-bg.closing { animation: fade-out .14s ease-in forwards; pointer-events: none; }
.modal-bg.closing .modal { animation: modal-out .14s ease-in forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
.modal { animation: modal-in .2s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* Rechtes Panel fährt auf und zu (nur im breiten Layout; schmal ist es ein schwebendes Panel) */
@media (min-width: 1181px) {
  .app { transition: grid-template-columns .3s var(--ease-out), column-gap .3s var(--ease-out); }
  .main { transition: margin-right .3s var(--ease-out); }
  .nowpanel { transition: opacity .22s ease, transform .3s var(--ease-out), visibility 0s; }
  .app.nowpanel-hidden .nowpanel { display: block; opacity: 0; transform: translateX(24px); visibility: hidden; pointer-events: none;
    transition: opacity .16s ease, transform .3s var(--ease-out), visibility 0s .3s; }
}
@media (max-width: 1180px) {
  .nowpanel { animation: panel-float-in .24s var(--ease-out); }
  @keyframes panel-float-in { from { opacity: 0; transform: translateX(20px); } }
}

@media (prefers-reduced-motion: reduce) {
  #view.view-enter, .player-left.track-swap *, .play-btn.morph svg, .icon-btn.pop svg, .menu.closing, .modal-bg.closing, .modal-bg.closing .modal, .modal, .nowpanel { animation: none !important; }
  .app, .main, .nowpanel { transition: none !important; }
}

/* ------------------------------------------------------------------ Vollbild-Übergang
   Das Cover fliegt per JS (flyCover) aus der Player-Leiste; hier blenden die übrigen Teile
   leicht versetzt ein bzw. aus. */
.fullplayer { animation: fp-bg-in .32s ease backwards; }
.fullplayer .fp-top, .fullplayer .fp-text, .fullplayer .fp-lyrics, .fullplayer .fp-bottom { animation: fp-part-in .42s var(--ease-out) backwards; }
.fullplayer .fp-text { animation-delay: .12s; }
.fullplayer .fp-lyrics { animation-delay: .18s; }
.fullplayer .fp-bottom { animation-delay: .1s; }
@keyframes fp-bg-in { from { opacity: 0; } }
@keyframes fp-part-in { from { opacity: 0; transform: translateY(14px); } }
.fullplayer.closing { animation: fade-out .34s ease forwards; pointer-events: none; }
.fullplayer.closing .fp-top, .fullplayer.closing .fp-text, .fullplayer.closing .fp-lyrics, .fullplayer.closing .fp-bottom { animation: fp-part-out .2s ease forwards; }
@keyframes fp-part-out { to { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ Platzhalter → Inhalt
   Platzhalter erscheinen erst nach kurzer Pause (kein Aufblitzen bei schnellen Antworten);
   echte Inhalte blenden ein, die ersten Songzeilen leicht versetzt. */
.skel-rows, .skel-shelf { animation: fade .25s ease .15s backwards; }
.results > :not(.skel-rows):not(.skel-shelf),
.home-rest > :not(.skel-rows):not(.skel-shelf),
.lib-body > :not(.skel-rows):not(.skel-shelf),
.fy-body > :not(.skel-rows):not(.skel-shelf),
.section > div > .shelf { animation: content-in .32s var(--ease-out) backwards; }
@keyframes content-in { from { opacity: 0; transform: translateY(8px); } }
.tracklist > .tl-row:nth-child(-n+13) { animation: row-in .34s var(--ease-out) backwards; }
.tracklist > .tl-row:nth-child(2) { animation-delay: .02s; }
.tracklist > .tl-row:nth-child(3) { animation-delay: .04s; }
.tracklist > .tl-row:nth-child(4) { animation-delay: .06s; }
.tracklist > .tl-row:nth-child(5) { animation-delay: .08s; }
.tracklist > .tl-row:nth-child(6) { animation-delay: .1s; }
.tracklist > .tl-row:nth-child(7) { animation-delay: .12s; }
.tracklist > .tl-row:nth-child(8) { animation-delay: .14s; }
.tracklist > .tl-row:nth-child(9) { animation-delay: .16s; }
.tracklist > .tl-row:nth-child(10) { animation-delay: .18s; }
.tracklist > .tl-row:nth-child(11) { animation-delay: .2s; }
.tracklist > .tl-row:nth-child(12) { animation-delay: .22s; }
.tracklist > .tl-row:nth-child(13) { animation-delay: .24s; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }
.shelf.row > .card:nth-child(-n+7) { animation: content-in .36s var(--ease-out) backwards; }
.shelf.row > .card:nth-child(2) { animation-delay: .04s; }
.shelf.row > .card:nth-child(3) { animation-delay: .08s; }
.shelf.row > .card:nth-child(4) { animation-delay: .12s; }
.shelf.row > .card:nth-child(5) { animation-delay: .16s; }
.shelf.row > .card:nth-child(6) { animation-delay: .2s; }
.shelf.row > .card:nth-child(7) { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .fullplayer, .fullplayer *, .skel-rows, .skel-shelf, .results > *, .home-rest > *, .lib-body > *, .fy-body > *,
  .tracklist > .tl-row, .shelf.row > .card, .section > div > .shelf { animation: none !important; }
}

/* ------------------------------------------------------------------ Interpreten als Links */
.player-artist a, .np-artist a, .fullplayer .fp-text p a { color: inherit; transition: color .12s; }
.player-artist a:hover, .np-artist a:hover, .fullplayer .fp-text p a:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.np-lyrics[hidden] { display: none !important; }

/* ------------------------------------------------------------------ OLED-Schutz im Vollbild
   Gegen Einbrennen: alles wandert per --sx/--sy um wenige Pixel (Übergang 30 s → unmerklich),
   Steuerung und Mauszeiger blenden sich ohne Bewegung aus, echter Schwarz-Hintergrund. */
.fp-actions { display: flex; gap: 6px; }
.fullplayer { --sx: 0px; --sy: 0px; }
.fullplayer.oled { background: #000; }
.fullplayer.oled::before { filter: blur(90px) saturate(1.3) brightness(.32); animation: oled-drift 90s ease-in-out infinite alternate; }
@keyframes oled-drift { from { transform: scale(1.1) translate(0, 0); } to { transform: scale(1.28) translate(-4%, 3%); } }
.fullplayer.oled .fp-main, .fullplayer.oled .fp-top, .fullplayer.oled .fp-bottom { translate: var(--sx) var(--sy); transition: translate 30s linear, opacity .5s ease; }
.fullplayer.oled .fp-art img { filter: brightness(.88); }
.fullplayer.oled .fp-text { opacity: .85; }
.fullplayer.oled.idle { cursor: none; }
.fullplayer.oled.idle .fp-top, .fullplayer.oled.idle .fp-bottom { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .fullplayer.oled::before { animation: none; } }
