/* Meow Music – gleiche Designsprache wie Melloo Mail:
   flache Panels, dünne Linien, ein Akzent, Themes + Akzentfarbe + Dichte (Auswahl: Palette oben rechts). */

/* ---------- Design-Tokens ---------- */
:root {
  --accent: #06b6d4;
  --accent-hover: color-mix(in srgb, var(--accent) 82%, #fff);
  --accent-text: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --selected: color-mix(in srgb, var(--accent) 14%, var(--panel));
  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --row-pad: 9px;
  --player-h: 84px;
  /* Standard: Dunkel */
  color-scheme: dark;
  --bg: #0e0f11; --panel: #15161a; --panel-2: #1b1c21; --raised: #202127; --hover: #22242a;
  --border: #25272d; --border-strong: #33363d;
  --text: #ececef; --muted: #8d919b; --faint: #5b5f68;
  --shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.05);
  --backdrop: rgba(5,5,8,.6);
}
[data-theme="midnight"] {
  --bg: #0b1020; --panel: #111830; --panel-2: #172040; --raised: #1a2446; --hover: #1d2850;
  --border: #212c52; --border-strong: #2d3a66;
  --text: #e6e9f5; --muted: #8f99bd; --faint: #5c6690;
  --shadow: 0 24px 80px rgba(0,0,10,.6), 0 0 0 1px rgba(255,255,255,.05);
  --backdrop: rgba(3,5,15,.6);
}
[data-theme="oled"] {
  --bg: #000; --panel: #050505; --panel-2: #0d0d0d; --raised: #141414; --hover: #161616;
  --border: #1c1c1c; --border-strong: #2a2a2a;
  --text: #ededed; --muted: #8a8a8a; --faint: #555;
  --shadow: 0 24px 80px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.07);
  --backdrop: rgba(0,0,0,.7);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f6; --panel: #fff; --panel-2: #f7f7f9; --raised: #fff; --hover: #f1f1f4;
  --border: #e7e7ec; --border-strong: #d7d7de;
  --text: #18191c; --muted: #676b74; --faint: #a2a5ad;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --selected: color-mix(in srgb, var(--accent) 10%, var(--panel));
  --shadow: 0 24px 80px rgba(20,20,40,.18), 0 0 0 1px rgba(0,0,0,.05);
  --backdrop: rgba(30,30,40,.35);
}
[data-theme="paper"] {
  color-scheme: light;
  --bg: #efe9df; --panel: #faf6ef; --panel-2: #f3ede3; --raised: #fffdf8; --hover: #ece5d8;
  --border: #e2d9c9; --border-strong: #d3c7b3;
  --text: #2b2620; --muted: #74695b; --faint: #a69a88;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --selected: color-mix(in srgb, var(--accent) 10%, var(--panel));
  --shadow: 0 24px 80px rgba(60,40,10,.16), 0 0 0 1px rgba(60,40,10,.06);
  --backdrop: rgba(60,45,25,.3);
}
[data-density="compact"] { --row-pad: 5px; }

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
small, .muted { color: var(--muted); }
.i { width: 18px; height: 18px; flex: none; display: block; fill: currentColor; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Buttons & Felder ---------- */
button.primary, button.quiet, button.nav, #pick, .live-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600;
  transition: background .15s, color .15s, opacity .15s, transform .05s;
}
button:active { transform: translateY(1px); }
.primary { background: var(--accent); color: var(--accent-text); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.quiet { color: var(--muted); font-weight: 500; }
.quiet:hover { background: var(--hover); color: var(--text); }
#pick { background: var(--raised); border: 1px solid var(--border-strong); }
#pick:hover { background: var(--hover); }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input, select {
  height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--panel-2); color: var(--text); outline: 0; min-width: 0; transition: border-color .15s, background .15s;
}
input { width: 100%; }
input:focus, select:focus { border-color: var(--accent); }
select { cursor: pointer; width: auto; height: 36px; font-weight: 500; }
select option { background: var(--panel); }
.error { color: var(--danger); min-height: 1.3em; margin-top: 8px; font-size: 13px; }
kbd { font: 11px/1 var(--font); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--border-strong); color: var(--muted); background: var(--panel-2); }

/* ---------- Marke ---------- */
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1.15 var(--font-display); letter-spacing: -.03em; }
.brand-tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.login h1 { font: 800 30px/1.1 var(--font-display); letter-spacing: -.035em; margin: 26px 0 8px; }
.login .muted { margin-bottom: 8px; }
.login .primary { width: 100%; height: 40px; margin-top: 18px; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: calc(100dvh - var(--player-h)); }
aside { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 18px 12px 12px; gap: 6px; }
aside .brand { padding: 2px 8px 14px; }
button.nav { width: 100%; height: 34px; justify-content: flex-start; gap: 11px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
button.nav:hover { background: var(--hover); color: var(--text); }
.nav.active { background: var(--accent-soft); color: var(--text); }
.nav.active .i { color: var(--accent); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 2px; padding: 0 4px 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sidebar-heading .icon-btn { width: 24px; height: 24px; }
#playlistNav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.pl-nav { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 8px; border-radius: 8px; text-align: left; color: var(--muted); border: 1px solid transparent; transition: background .12s, color .12s; }
.pl-nav:hover { background: var(--hover); color: var(--text); }
.pl-nav.active { background: var(--accent-soft); color: var(--text); }
.pl-nav.target { border-color: var(--accent); background: var(--accent-soft); }
.pl-nav .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; line-height: 1.25; }
.pl-nav small { display: block; font-size: 12px; font-weight: 400; color: var(--faint); }
.mini { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--accent); }
.mini .i { width: 14px; height: 14px; }
.pl-nav.active .mini { background: var(--accent-soft); border-color: transparent; }
.sidebar-foot { padding: 12px 10px 4px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.foot-tag { display: block; font-weight: 600; color: var(--text); }
.sidebar-foot small { display: block; color: var(--faint); }

.content { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--border); }
.topbar { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: 8px; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--border); }
.search-box { position: relative; flex: 1; max-width: 440px; margin: 0; display: block; }
.search-box .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; width: 15px; height: 15px; }
.search { padding-left: 34px; background: var(--panel-2); }
.search:focus { background: var(--panel); }
.topbar #addMusic { margin-left: auto; }
.mobile-home { display: none; }

/* Kopfbereich der Ansicht (wie die Listen-Überschrift im Webmail) */
.hero { display: flex; align-items: center; gap: 18px; padding: 26px 28px 10px; }
.hero-art { display: grid; place-items: center; width: 68px; height: 68px; flex: none; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.hero-art .i { width: 28px; height: 28px; }
.hero-text { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font: 800 30px/1.15 var(--font-display); letter-spacing: -.03em; margin: 2px 0 4px; overflow-wrap: anywhere; }
.hero p { color: var(--muted); font-size: 13.5px; max-width: 560px; }
.hero-meta { margin-top: 6px; font-size: 12.5px; color: var(--faint); }
.hero-meta:empty { display: none; }

.body { padding: 8px 18px 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 10px 8px; }
.section-head h2, .section-head small { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }

/* Playlist-Karten */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; padding: 4px 10px 18px; }
.card { display: block; text-align: left; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); min-width: 0; transition: background .12s, border-color .12s; }
.card:hover { background: var(--hover); border-color: var(--border-strong); }
.card-art { display: grid; place-items: center; aspect-ratio: 1.7; border-radius: 8px; margin-bottom: 10px; background: var(--accent-soft); color: var(--accent); }
.card-art .i { width: 26px; height: 26px; }
#firstPlaylist .card-art { background: none; border: 1px dashed var(--border-strong); color: var(--muted); }
.card strong { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card small { font-size: 12px; color: var(--muted); }

/* Bedienleiste über der Liste */
.controls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 2px 10px 12px; }
.play-large { width: 40px; height: 40px; padding: 0; border-radius: 50%; margin-right: 6px; }
.play-large .i { width: 16px; height: 16px; margin-left: 2px; }
.controls select { margin-left: auto; background: var(--raised); }

/* ---------- Songliste ---------- */
.table-head, .track { display: grid; grid-template-columns: 34px minmax(120px, 1fr) 52px 184px; align-items: center; gap: 12px; }
.table-head { position: sticky; top: 63px; z-index: 5; padding: 8px 14px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); background: var(--panel); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
#tracks { padding: 0; }
.track { position: relative; padding: var(--row-pad) 14px; margin: 0 0 1px; border-radius: 10px; transition: background .1s; }
.track:hover { background: var(--hover); }
.track.playing { background: var(--selected); }
.track.playing::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.track.over { box-shadow: inset 0 2px 0 var(--accent); }
.track.dragging { opacity: .4; }
.number { width: 28px; height: 28px; display: grid; place-items: center; color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; border-radius: 6px; }
.number:hover { color: var(--accent); }
.number .play-ico { display: none; width: 15px; height: 15px; }
.track:hover .number .n { display: none; }
.track:hover .number .play-ico { display: block; }
.playing .title { color: var(--accent); }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; border-radius: 2px; 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; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.track:hover .eq { display: none; }
.track-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* Cover: Farbton pro Song (wie die Avatare im Webmail) */
.cover { --h: 190; position: relative; width: 40px; height: 40px; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  color: hsl(var(--h) 80% 82%); background: hsl(var(--h) 45% 26%); }
[data-theme="light"] .cover, [data-theme="paper"] .cover { color: hsl(var(--h) 55% 30%); background: hsl(var(--h) 70% 90%); }
.cover .i { width: 16px; height: 16px; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.text { min-width: 0; }
.title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duration { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; text-align: right; }
.actions { display: flex; gap: 0; justify-content: flex-end; opacity: 0; transition: opacity .12s; }
.track:hover .actions, .track:focus-within .actions { opacity: 1; }
.actions button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); }
.actions button:hover { background: var(--raised); color: var(--text); }
.actions button[data-action=delete]:hover { color: var(--danger); }
.actions .i { width: 14px; height: 14px; }
.copy-text { display: block; max-width: 100%; text-align: left; cursor: copy; font-weight: inherit; color: inherit; }
.copy-text:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 56px 20px; color: var(--faint); text-align: center; }
.empty strong { display: block; color: var(--muted); font: 650 17px/1.3 var(--font-display); margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--faint); padding: 12px 14px 0; }

/* ---------- Player ---------- */
.player { position: fixed; left: 0; right: 0; bottom: 0; height: var(--player-h); z-index: 10; padding: 0 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: center;
  background: var(--panel); border-top: 1px solid var(--border); }
.now { display: flex; gap: 12px; align-items: center; min-width: 0; }
.now .cover { width: 48px; height: 48px; border-radius: 9px; }
.now .cover .i { width: 18px; height: 18px; }
.now-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.center { min-width: 0; }
.buttons { display: flex; justify-content: center; align-items: center; gap: 4px; }
.buttons button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.buttons button:hover { background: var(--hover); color: var(--text); }
.buttons button[aria-pressed=true] { color: var(--accent); background: var(--accent-soft); }
.buttons .toggle, .buttons .toggle:hover { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-text); margin: 0 4px; }
.buttons .toggle:hover { background: var(--accent-hover); }
.buttons .toggle .i { width: 16px; height: 16px; }
.timeline { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
input[type=range] { padding: 0; height: 4px; border: 0; border-radius: 4px; background: var(--border-strong); accent-color: var(--accent); cursor: pointer; }
.volume { display: flex; gap: 6px; align-items: center; justify-content: flex-end; color: var(--muted); min-width: 0; }
.volume input { max-width: 110px; }
.live-btn { height: 30px; padding: 0 12px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.live-btn:hover { background: var(--hover); color: var(--text); }
.live-btn[aria-pressed=true] { background: var(--danger); border-color: var(--danger); color: #fff; }
.live-btn[aria-pressed=true] .i { animation: live 1.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: .45; } }
.radio-info { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 4px 8px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; display: block; border-radius: 6px; }
.radio-info:hover { color: var(--text); background: var(--hover); }

/* ---------- Dialoge, Toast, Menüs ---------- */
dialog { width: min(520px, calc(100% - 30px)); max-height: 86dvh; background: var(--panel); color: var(--text); border: 0; border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.modal-head h2 { font: 700 17px/1.3 var(--font-display); }
dialog p { color: var(--muted); font-size: 13.5px; }
dialog form > .primary { width: 100%; height: 40px; margin-top: 16px; }
.drop { margin-top: 20px; padding: 26px 16px; border: 1px dashed var(--border-strong); border-radius: 12px; text-align: center; background: var(--panel-2); transition: .15s; }
.drop strong { font-size: 15px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop button { margin: 12px 0; }
.status { white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; margin-top: 12px; color: var(--muted); }
.status:empty { display: none; }
#addChoices { display: grid; gap: 2px; margin-top: 10px; }
#addChoices .pl-nav { height: 48px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 18px); transform: translateX(-50%); z-index: 60; max-width: 90vw; background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); padding: 10px 16px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow); animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } }

.account-wrap { position: relative; flex-shrink: 0; }
.account-button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 5px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 500; }
.account-button:hover { background: var(--hover); color: var(--text); }
.account-initial { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; }
.account-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 210px; background: var(--raised); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; z-index: 30; }
.account-menu strong, .account-menu small { display: block; }
.account-menu small { font-size: 12px; margin: 2px 0 10px; }
.account-menu #logout { width: 100%; height: 34px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; color: var(--danger); font-size: 13px; font-weight: 500; }

/* Design-Auswahl (Themes, Akzentfarbe, Dichte) */
.theme-menu { position: fixed; z-index: 70; width: 268px; background: var(--raised); border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.theme-menu h3 { margin: 4px 6px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.theme-menu h3:not(:first-child) { margin-top: 14px; }
.theme-opt { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 8px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.theme-opt:hover { background: var(--hover); color: var(--text); }
.theme-opt[aria-checked=true] { background: var(--accent-soft); color: var(--text); }
.swatch { display: flex; width: 34px; height: 22px; flex: none; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-strong); }
.swatch i { flex: 1; }
.accent-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 6px; }
.accent-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; outline: 0; box-shadow: inset 0 0 0 2px var(--raised); }
.accent-dot[aria-checked=true] { border-color: var(--text); }
.seg { display: flex; gap: 4px; padding: 3px; background: var(--panel-2); border-radius: 9px; margin: 0 6px; }
.seg button { flex: 1; height: 28px; border-radius: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.seg button[aria-checked=true] { background: var(--raised); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .shell { grid-template-columns: 64px minmax(0, 1fr); }
  aside { padding: 16px 8px; align-items: center; }
  aside .brand { font-size: 0; padding: 0 0 12px; }
  .nav { width: 40px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .sidebar-heading { justify-content: center; padding: 0; font-size: 0; }
  .sidebar-foot, .pl-nav .name { display: none; }
  .pl-nav { width: 44px; justify-content: center; padding: 0; }
  .hero { padding: 22px 20px 8px; }
  .topbar { padding: 12px 18px; }
}
@media (max-width: 700px) {
  :root { --player-h: 128px; }
  body { overflow: auto; }
  .shell { display: block; height: calc(100dvh - var(--player-h)); overflow: auto; }
  aside { display: none; }
  .content { overflow: visible; border-left: 0; min-height: 100%; }
  .mobile-home { display: grid; }
  .topbar { padding: 10px 12px; position: sticky; }
  .topbar #addMusic { font-size: 0; width: 36px; padding: 0; gap: 0; }
  .topbar #addMusic::before { content: "＋"; font-size: 18px; }
  .account-button > span:not(.account-initial) { display: none; }
  .hero { padding: 18px 16px 6px; gap: 14px; }
  .hero-art { width: 54px; height: 54px; border-radius: 13px; }
  .hero h1 { font-size: 24px; }
  .body { padding: 6px 8px 20px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-head { display: none; }
  .track { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 8px; }
  .duration { display: none; }
  .actions { opacity: 1; }
  .actions button { width: 28px; }
  .player { height: auto; min-height: var(--player-h); grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 14px; }
  .volume { justify-content: center; }
  .volume input, .volume .vol-ico { display: none; }
  .controls select { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Statistik-Modus ---------- */
.content.stats-mode #playlistSection, .content.stats-mode .body > .section-head, .content.stats-mode .controls,
.content.stats-mode .table-head, .content.stats-mode #tracks, .content.stats-mode #dragHint { display: none; }
#statsView { padding: 4px 10px 24px; }
.stats-head { display: flex; justify-content: flex-end; padding: 6px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.tile strong { display: block; font: 800 30px/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12.5px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px 12px; min-width: 0; }
.stat-card.wide { grid-column: 1 / -1; }
.stat-card h3, .settings h3 { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.rank { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.rank .pos { width: 20px; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.rank-main { flex: 1; min-width: 0; }
.rank-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rank-top b, .rank-main b { font-weight: 600; }
.rank small { color: var(--muted); }
.rank .bar { height: 5px; border-radius: 5px; background: var(--hover); margin-top: 6px; overflow: hidden; }
.rank .bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.rank.song .cover { width: 36px; height: 36px; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding-top: 6px; }
.chart .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.chart .col i { display: block; width: 100%; max-width: 26px; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; min-height: 0; }
.chart .col:hover i { opacity: 1; }
.chart .col small { font-size: 10.5px; color: var(--faint); height: 14px; white-space: nowrap; }
.chart.hours { height: 110px; }

/* ---------- BPM / Tonart in der Liste ---------- */
.table-head, .track { grid-template-columns: 34px minmax(120px, 1fr) 84px 52px 184px; }
.tag { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag small { margin-left: 6px; color: var(--faint); font-size: 11.5px; }
.tag.dim { color: var(--faint); }
.tag-h { white-space: nowrap; }

/* ---------- Mix-Info & Menü ---------- */
.mix-info { margin-top: 2px; text-align: center; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.mixing .mix-info { color: var(--accent); }
.mix-menu { position: fixed; z-index: 70; width: 300px; background: var(--raised); border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.mix-menu h3 { margin: 4px 6px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.btn-block { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; margin-top: 10px; padding: 0 12px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-weight: 600; }
.btn-block:hover { background: var(--hover); }
.set-note { color: var(--faint); font-size: 12px; padding: 10px 6px 0; }

/* ---------- Segmente, Schalter, Einstellungen ---------- */
.seg { display: flex; gap: 4px; padding: 3px; background: var(--panel-2); border-radius: 9px; margin: 0 6px; }
.seg button { flex: 1; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked=true] { background: var(--raised); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
.tgl { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); flex: none; transition: background .15s; }
.tgl i { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.tgl.on { background: var(--accent); }
.tgl.on i { left: 21px; }
.settings { width: min(640px, calc(100% - 24px)); }
.settings .seg.tabs { margin: 10px 0 14px; width: max-content; max-width: 100%; overflow-x: auto; }
.settings-pane { padding: 4px 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row > div:first-child { min-width: 0; }
.set-row b { display: block; font-weight: 600; }
.set-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.set-row.compact { padding: 9px 6px; }
.set-row input[type=range] { width: 140px; flex: none; }
.settings .seg { margin: 0; }
.settings h3 { margin: 18px 4px 8px; }
.stack { display: grid; gap: 4px; }
.stack label { margin: 8px 0 0; }
.stack .primary { margin-top: 12px; width: 100%; }
.inline-form { display: flex; gap: 8px; margin: 12px 0; }
.inline-form .primary { flex: none; }
.token-box { display: grid; gap: 8px; padding: 12px; margin: 10px 0; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.token-box code, .code { display: block; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.code { margin: 0; white-space: pre-wrap; }
.small { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.small.danger:hover { color: var(--danger); }
.row-actions { display: flex; gap: 4px; flex: none; }
.account-menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.account-menu button:hover { background: var(--hover); color: var(--text); }
.account-menu #logout { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; padding-top: 6px; height: 40px; color: var(--danger); }

@media (max-width: 700px) {
  .tag, .tag-h { display: none; }
  .table-head, .track { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .set-row { flex-wrap: wrap; }
  .mix-menu, .theme-menu { max-width: calc(100vw - 20px); }
}
