/* 598 Music – angelehnt an Apple Music */
:root {
  --accent: #fa2d48;
  --accent-soft: rgba(250, 45, 72, .12);
  --bg: #ffffff;
  --bg-elev: #f5f5f7;
  --bg-side: rgba(246, 246, 248, .92);
  --bg-hover: rgba(0, 0, 0, .05);
  --bg-glass: rgba(250, 250, 252, .82);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #a1a1a6;
  --line: rgba(0, 0, 0, .1);
  --shadow: 0 12px 40px rgba(0, 0, 0, .14);
  --radius: 10px;
  --side-w: 250px;
  --player-h: 64px;
  --tab-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #fa586a;
    --accent-soft: rgba(250, 88, 106, .16);
    --bg: #000000;
    --bg-elev: #1c1c1e;
    --bg-side: rgba(28, 28, 30, .92);
    --bg-hover: rgba(255, 255, 255, .07);
    --bg-glass: rgba(30, 30, 32, .8);
    --text: #f5f5f7;
    --text-2: #98989d;
    --text-3: #636366;
    --line: rgba(255, 255, 255, .12);
    --shadow: 0 12px 40px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
svg { width: 1em; height: 1em; display: block; flex: none; }
[hidden] { display: none !important; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Layout ---------- */
#app { display: flex; height: 100%; }
#sidebar {
  width: var(--side-w); flex: none; height: 100%;
  background: var(--bg-side); border-right: 1px solid var(--line);
  padding: 18px 12px calc(var(--player-h) + 20px); overflow-y: auto;
}
#main {
  flex: 1; min-width: 0; height: 100%; overflow-y: auto; outline: none;
  padding: 28px 40px calc(var(--player-h) + 48px);
  -webkit-overflow-scrolling: touch;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; padding: 0 8px 14px; }
.brand img { border-radius: 7px; }
.search-field {
  display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 34px;
  background: var(--bg-hover); border-radius: 9px; color: var(--text-2); margin-bottom: 16px;
}
.search-field input { border: 0; background: none; outline: none; flex: 1; min-width: 0; color: var(--text); }
.search-field.big { height: 42px; font-size: 17px; margin: 4px 0 20px; }
.nav-head { font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; padding: 14px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-link svg { color: var(--accent); font-size: 18px; }
.nav-link:hover { background: var(--bg-hover); }
button.nav-link { width: 100%; text-align: left; }
.nav-link.active { background: var(--accent-soft); }
.nav-link span { overflow: hidden; text-overflow: ellipsis; }

#tabbar { display: none; }

/* ---------- Typo & Bausteine ---------- */
h1.page { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 22px; }
h2.sec { font-size: 21px; font-weight: 700; margin: 34px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2.sec a { font-size: 15px; font-weight: 400; }
.muted { color: var(--text-2); }
.empty { color: var(--text-2); text-align: center; padding: 60px 20px; }
.empty svg { font-size: 48px; margin: 0 auto 14px; color: var(--text-3); }
.empty h3 { color: var(--text); margin: 0 0 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 18px; border-radius: 9px; font-weight: 600; font-size: 14px;
  background: var(--bg-elev); color: var(--accent); white-space: nowrap;
}
.btn svg { font-size: 16px; }
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger { color: #ff3b30; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; color: var(--text); }
.icon-btn:hover { background: var(--bg-hover); }
.icon-btn.accent { color: var(--accent); }

/* Cover */
.art {
  position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; flex: none;
  background: linear-gradient(145deg, hsl(var(--h, 350) 70% 62%), hsl(calc(var(--h, 350) + 30) 65% 42%));
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1);
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.art.mosaic { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-elev); }
.art.mosaic img { position: static; }
.art > svg { position: absolute; inset: 0; margin: auto; width: 42%; height: 42%; color: rgba(255, 255, 255, .85); }

/* Album-Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px 20px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 190px); gap: 20px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.card { display: block; color: var(--text); scroll-snap-align: start; min-width: 0; }
.card .art { width: 100%; box-shadow: 0 4px 14px rgba(0, 0, 0, .14); transition: transform .2s; }
.card:hover .art { transform: scale(1.02); }
.card-title { font-size: 14px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Songliste */
.songs { list-style: none; margin: 0; padding: 0; }
.song {
  display: grid; grid-template-columns: 44px 1fr auto auto auto; align-items: center; gap: 12px;
  padding: 6px 8px; border-radius: 8px; cursor: default; user-select: none; -webkit-user-select: none;
}
.song:hover { background: var(--bg-hover); }
.song + .song { box-shadow: 0 -1px 0 var(--line); }
.song:hover, .song:hover + .song { box-shadow: none; }
.song .art { width: 44px; border-radius: 5px; }
.song .num { width: 44px; text-align: center; color: var(--text-2); font-variant-numeric: tabular-nums; }
.song-main { min-width: 0; }
.song-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-dur { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.song-flags { display: flex; gap: 6px; color: var(--text-3); font-size: 15px; }
.song-flags .fav { color: var(--accent); }
.song.playing .song-title { color: var(--accent); font-weight: 600; }
.song.unavailable { opacity: .4; }
.song.static { cursor: pointer; }
.menu-head .song-main { min-width: 0; font-size: 14px; }
.song .more { opacity: .7; }
.song .dl-progress { font-size: 11px; color: var(--accent); font-variant-numeric: tabular-nums; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.eq.paused i { animation: none; height: 4px; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.art .eq-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; }
.art .eq-overlay .eq i { background: #fff; }

/* Album/Playlist-Kopf */
.hero { display: flex; gap: 32px; align-items: flex-end; margin: 8px 0 26px; }
.hero .art { width: 260px; border-radius: 10px; box-shadow: var(--shadow); }
.hero-text { min-width: 0; flex: 1; }
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; line-height: 1.15; }
.hero .hero-artist { font-size: 20px; color: var(--accent); margin-bottom: 4px; }
.hero .hero-meta { color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 14px; }
.hero .hero-desc { color: var(--text-2); font-size: 14px; margin: 0 0 16px; white-space: pre-line; max-width: 60ch; }
.foot-note { color: var(--text-2); font-size: 13px; margin-top: 18px; padding-left: 8px; }

/* Bibliothek-Liste (mobil) */
.lib-links { list-style: none; padding: 0; margin: 0 0 10px; }
.lib-links a { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 19px; }
.lib-links a svg:first-child { color: var(--accent); font-size: 22px; }
.lib-links a .chev { margin-left: auto; color: var(--text-3); font-size: 16px; }

/* Segment-Control */
.segmented { display: inline-flex; background: var(--bg-hover); border-radius: 9px; padding: 2px; margin-bottom: 14px; }
.segmented button { padding: 5px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.segmented button.on { background: var(--bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }

/* ---------- Mini-Player ---------- */
#player {
  position: fixed; z-index: 20; left: var(--side-w); right: 0; bottom: 0; height: var(--player-h);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: var(--bg-glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.mp-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; height: 100%; }
.mp-art { width: 44px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.mp-text { display: flex; flex-direction: column; min-width: 0; }
.mp-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-controls { display: flex; align-items: center; gap: 6px; }
.mp-controls .icon-btn { width: 40px; height: 40px; font-size: 22px; }
.mp-controls .mp-play { font-size: 26px; }
.mp-progress { position: absolute; left: 0; right: 0; top: -1px; height: 2px; }
#mp-bar { height: 100%; width: 0; background: var(--accent); }

/* ---------- Now Playing (Vollbild) ---------- */
#np {
  position: fixed; inset: 0; z-index: 50; color: #fff; overflow: hidden;
  transform: translateY(100%); transition: transform .42s cubic-bezier(.2, .9, .25, 1); visibility: hidden;
  background: #222;
}
#np.open { transform: none; visibility: visible; }
.np-bg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(60px) saturate(1.6) brightness(.75); transform: scale(1.2); transition: background-image .6s; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .28); }
.np-inner {
  position: relative; height: 100%; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; column-gap: 56px;
  padding: calc(var(--safe-t) + 10px) 48px calc(var(--safe-b) + 30px);
}
.np-top { grid-column: 1 / -1; display: flex; justify-content: center; height: 30px; }
.np-grab { width: 80px; height: 30px; display: flex; align-items: center; justify-content: center; }
.np-grab span { width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .45); }
.np-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.np-art-wrap { width: 100%; max-width: 460px; transition: opacity .25s; }
.np-art { width: 100%; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
#np.paused .np-art { transform: scale(.82); }
.np-panel { display: none; }
.np-controls-area { display: flex; flex-direction: column; justify-content: center; gap: 18px; min-width: 0; }
.np-meta { display: flex; align-items: center; gap: 8px; }
.np-text { flex: 1; min-width: 0; }
.np-title { font-size: 22px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 19px; color: rgba(255, 255, 255, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#np .icon-btn { color: #fff; }
#np .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.np-fav, .np-more { background: rgba(255, 255, 255, .14); }
.np-fav.on { color: var(--accent) !important; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .6); margin-top: 6px; font-variant-numeric: tabular-nums; }
.np-buttons { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.np-buttons .np-big { width: 64px; height: 64px; font-size: 38px; }
.np-buttons .np-playbtn { font-size: 50px; width: 76px; height: 76px; }
.np-shuffle, .np-repeat { font-size: 20px; opacity: .55; border-radius: 8px !important; }
.np-shuffle.on, .np-repeat.on { opacity: 1; background: rgba(255, 255, 255, .22) !important; }
.np-volume { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .6); font-size: 16px; }
.np-volume input { flex: 1; }
.np-tabs { display: flex; justify-content: space-around; }
.np-tabs .icon-btn { font-size: 22px; opacity: .7; border-radius: 8px; width: 44px; }
.np-tabs .icon-btn.on { opacity: 1; background: rgba(255, 255, 255, .22) !important; }

.ios .np-volume { display: none; } /* iOS erlaubt keine Lautstärke per JavaScript */

/* Panel: Songtext / Warteliste */
#np.with-panel .np-art-wrap { display: none; }
#np.with-panel .np-panel { display: block; position: absolute; inset: 0; overflow-y: auto; padding: 10px 4px 40px; -webkit-mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - 40px), transparent); }
.lyrics { font-size: 26px; font-weight: 700; line-height: 1.45; white-space: pre-line; color: rgba(255, 255, 255, .9); padding: 20px 0; }
.lyrics.none { font-size: 17px; font-weight: 500; color: rgba(255, 255, 255, .6); text-align: center; padding-top: 30%; }
.q-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 17px; margin: 14px 0 6px; }
.q-head small { font-weight: 400; color: rgba(255, 255, 255, .6); font-size: 13px; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-item { display: flex; align-items: center; gap: 12px; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
.q-item:hover { background: rgba(255, 255, 255, .1); }
.q-item .art { width: 42px; border-radius: 5px; }
.q-item .song-main { flex: 1; }
.q-item .song-sub { color: rgba(255, 255, 255, .6); }
.q-item.current { background: rgba(255, 255, 255, .14); }
.q-item .icon-btn { font-size: 16px; opacity: .7; }

/* Range-Slider */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; cursor: pointer; margin: 0; --p: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, rgba(255, 255, 255, .85) var(--p), rgba(255, 255, 255, .25) var(--p)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, rgba(255, 255, 255, .85) var(--p), rgba(255, 255, 255, .25) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -4px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { opacity: 1; }
input[type=range]:hover::-moz-range-thumb { opacity: 1; }

/* ---------- Menü, Dialog, Toast ---------- */
#layer:empty { display: none; }
.backdrop { position: fixed; inset: 0; z-index: 80; }
.backdrop.dim { background: rgba(0, 0, 0, .4); animation: fade .2s; }
.menu {
  position: fixed; z-index: 81; min-width: 240px; max-width: 320px; max-height: 70vh; overflow-y: auto;
  background: var(--bg-glass); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 5px; animation: pop .14s ease-out;
}
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head .art { width: 40px; border-radius: 5px; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 8px 10px; border-radius: 7px; font-size: 14px; text-align: left; }
.menu-item:hover { background: var(--bg-hover); }
.menu-item svg { font-size: 17px; color: var(--text-2); }
.menu-item.danger, .menu-item.danger svg { color: #ff3b30; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }

.dialog {
  position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; animation: pop .18s ease-out;
}
.dialog h3 { margin: 0 0 16px; font-size: 19px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
.field input:not([type=checkbox]), .field select, .field textarea {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-elev); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.dialog-actions .left { margin-right: auto; }
.cover-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.cover-edit .art { width: 96px; }
.pick-list { list-style: none; margin: 0 0 6px; padding: 0; max-height: 50vh; overflow-y: auto; }
.pick-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 8px; text-align: left; }
.pick-list button:hover { background: var(--bg-hover); }
.pick-list .art { width: 40px; border-radius: 5px; }

#toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(var(--player-h) + var(--tab-h) + var(--safe-b) + 18px); transform: translate(-50%, 20px);
  background: rgba(40, 40, 42, .95); color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 40px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.dialog { animation-name: pop-center; }
@keyframes pop-center { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Verwalten ---------- */
.panel { background: var(--bg-elev); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.panel h3 { margin: 0 0 12px; }
.dropzone {
  border: 2px dashed var(--line); border-radius: 12px; padding: 34px 20px; text-align: center; color: var(--text-2);
  cursor: pointer; transition: .15s; margin-top: 12px;
}
.dropzone svg { font-size: 40px; margin: 0 auto 8px; color: var(--accent); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.uploads { list-style: none; margin: 14px 0 0; padding: 0; }
.uploads li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.uploads .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.uploads .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.uploads .err { color: #ff3b30; }
.notice { background: rgba(255, 159, 10, .15); color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 20px; }
.storage { font-size: 14px; color: var(--text-2); }
.storage-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 8px 0; }
.storage-bar i { display: block; height: 100%; background: var(--accent); }
.account { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; color: var(--text-2); font-size: 14px; }
.offline-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #fff; background: #8e8e93; padding: 3px 10px; border-radius: 12px; margin-left: 10px; vertical-align: middle; }

/* ---------- Login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; overflow: auto; padding: 20px; background: radial-gradient(circle at 30% 0%, var(--accent-soft), transparent 60%), var(--bg); }
.login { width: min(360px, 100%); text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.login img { border-radius: 22px; box-shadow: var(--shadow); }
.login h1 { margin: 8px 0 0; font-size: 28px; }
.login p { margin: 0 0 8px; color: var(--text-2); }
.login input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev); padding: 0 14px; font-size: 16px; outline: none; }
.login input:focus { border-color: var(--accent); }
.login .btn { width: 100%; height: 46px; font-size: 16px; }
.login-error { color: #ff3b30; font-size: 14px; }

/* ---------- Mobil ---------- */
.mobile-only { display: none !important; }
@media (max-width: 820px) {
  :root { --tab-h: 54px; --player-h: 60px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: revert !important; }
  #sidebar { display: none; }
  #main { padding: calc(var(--safe-t) + 14px) 16px calc(var(--tab-h) + var(--player-h) + var(--safe-b) + 36px); }
  h1.page { font-size: 30px; margin: 10px 0 16px; }
  #tabbar {
    display: flex; position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b));
    padding-bottom: var(--safe-b); background: var(--bg-glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
  }
  #tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 500; color: var(--text-3); }
  #tabbar a svg { font-size: 24px; }
  #tabbar a.active { color: var(--accent); }
  #player {
    left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 6px); height: var(--player-h);
    border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 0 8px 0 8px; overflow: hidden;
  }
  .mp-progress { top: auto; bottom: 0; left: 0; right: 0; }
  .mp-art { width: 44px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .shelf { grid-auto-columns: 44%; gap: 14px; margin: 0 -16px; padding: 0 16px 6px; scroll-padding: 0 16px; }
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  .hero .art { width: min(270px, 72vw); }
  .hero .btn-row { justify-content: center; }
  .hero .btn-row .btn { flex: 1; max-width: 170px; }
  .song { grid-template-columns: 44px 1fr auto auto; gap: 10px; padding: 6px 2px; }
  .song .song-dur { display: none; }
  .np-inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding: calc(var(--safe-t) + 6px) 26px calc(var(--safe-b) + 18px); }
  .np-art-wrap { max-width: min(420px, 100%); }
  .np-controls-area { gap: 12px; }
  .np-volume { display: none; }
  .menu {
    left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + var(--safe-b)); max-width: none; min-width: 0;
    border-radius: 16px; animation: sheet .22s ease-out; font-size: 16px;
  }
  .menu-item { padding: 12px 12px; font-size: 16px; }
  .dialog { top: auto; bottom: 0; transform: translateX(-50%); width: 100%; border-radius: 16px 16px 0 0; padding-bottom: calc(22px + var(--safe-b)); animation-name: sheet-dialog; max-height: calc(100vh - 40px - var(--safe-t)); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 820px) and (max-height: 640px) { .np-tabs { display: none; } }
@keyframes sheet { from { transform: translateY(30px); opacity: 0; } }
@keyframes sheet-dialog { from { transform: translate(-50%, 40px); opacity: 0; } }
@media (min-width: 821px) and (max-width: 1100px) { #main { padding-left: 26px; padding-right: 26px; } .hero .art { width: 210px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
