:root {
  --bg: #0e0d0b;
  --bg2: #15130f;
  --panel: #1c1914;
  --panel2: #262219;
  --line: #322c21;
  --text: #f3ede0;
  --muted: #a39a87;
  --faint: #6f6757;
  --gold: #e3b54a;
  --gold2: #f5d27a;
  --gold-ink: #1a1305;
  --danger: #e66a5a;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --radius: 12px;
  --player-h: 80px;
  --side-w: 236px;
  --np-accent: var(--gold);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faf7f0; --bg2: #f3eee2; --panel: #ffffff; --panel2: #f1ebdc; --line: #e4dccb;
    --text: #221d12; --muted: #6d6452; --faint: #a39a87; --gold: #b5851c; --gold2: #8f6610;
    --gold-ink: #fffaf0; --shadow: 0 10px 30px rgba(60, 45, 10, .15); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #faf7f0; --bg2: #f3eee2; --panel: #ffffff; --panel2: #f1ebdc; --line: #e4dccb;
  --text: #221d12; --muted: #6d6452; --faint: #a39a87; --gold: #b5851c; --gold2: #8f6610;
  --gold-ink: #fffaf0; --shadow: 0 10px 30px rgba(60, 45, 10, .15); color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Tamil", sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.fill { fill: currentColor; stroke: none; }
.ic.inline { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--gold) 40%, transparent); }

/* ------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100dvh; padding-bottom: var(--player-h); }
.side {
  background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 12px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand .logo { width: 32px; height: 32px; }
.brand b { color: var(--gold); font-weight: 800; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 550;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.on { background: var(--panel2); color: var(--gold); }
.side h4 { margin: 16px 12px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.side .lang a { padding: 6px 12px; font-size: 14px; }
.side .lang a span { margin-left: auto; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; padding-top: 12px; }

main { overflow-y: auto; overflow-x: hidden; min-width: 0; scrollbar-width: thin; }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.search {
  flex: 1; min-width: 0; max-width: 560px; display: flex; align-items: center; gap: 10px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; height: 42px; transition: border-color .15s;
}
.search:focus-within { border-color: var(--gold); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%; }
.search .ic { color: var(--muted); }
.top > .iconbtn:last-child { margin-left: auto; }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); position: relative; flex: none; transition: color .15s, background .15s; }
.iconbtn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.iconbtn.on { color: var(--gold); }
.iconbtn.sm { width: 32px; height: 32px; }
.iconbtn.sm .ic { width: 17px; height: 17px; }
.iconbtn.big { width: 46px; height: 46px; }
.iconbtn.big .ic { width: 24px; height: 24px; }
.iconbtn[data-one="1"]::after { content: "1"; position: absolute; right: 5px; top: 4px; font-size: 9px; font-weight: 800; }
.badge-btn[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge); position: absolute; right: -2px; top: 2px; font-size: 9px; font-weight: 800; background: var(--gold);
  color: var(--gold-ink); border-radius: 999px; padding: 1px 4px; line-height: 1.2;
}
.top .mlogo { display: none; }
.top .mlogo svg { width: 30px; height: 30px; }
.view { padding: 8px 28px 48px; max-width: 1600px; }

/* ------------------------------------------------------------ content */
h1.title { font-size: 30px; letter-spacing: -.02em; margin: 14px 0 6px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.section { margin: 30px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 21px; letter-spacing: -.015em; }
.section-head a { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.section-head a:hover { color: var(--gold); }

.hero {
  border-radius: 20px; padding: 26px 28px; margin-top: 12px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--gold) 30%, transparent), transparent 60%), var(--panel);
  border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.hero h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -.025em; }
.hero p { margin: 0; color: var(--muted); }
.stats { display: flex; gap: 24px; }
.stats div { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stats b { display: block; font-size: 22px; color: var(--text); letter-spacing: -.01em; text-transform: none; font-variant-numeric: tabular-nums; }
.scanning { width: 100%; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gold); }
.scanning .ic { animation: spin 1.2s linear infinite; width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: .15s;
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--panel2); font-weight: 650; border: 1px solid var(--line); white-space: nowrap; transition: .15s;
}
.btn:hover { border-color: var(--faint); }
.btn.gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.btn.gold:hover { background: var(--gold2); border-color: var(--gold2); }
.btn .ic { width: 18px; height: 18px; }
.btn:disabled { opacity: .55; cursor: default; }
.link { color: var(--muted); font-size: 12px; font-weight: 650; text-transform: none; letter-spacing: 0; }
.link:hover { color: var(--gold); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions .iconbtn { border: 1px solid var(--line); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 18px; margin-bottom: 22px; }
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 18px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
}
.row-scroll > * { scroll-snap-align: start; }
.card { min-width: 0; position: relative; display: block; container-type: inline-size; }
.card .art { position: relative; display: block; }
/* Sits on the cover's bottom-right corner; the cover is as tall as the card is wide. */
.card .play {
  position: absolute; right: 8px; top: calc(100cqw - 52px); width: 44px; height: 44px; border-radius: 50%; background: var(--gold);
  color: var(--gold-ink); display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; transform: translateY(6px);
  transition: .18s;
}
.card:hover .play, .card:focus-within .play { opacity: 1; transform: none; }
.card .t { margin-top: 9px; font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .art:hover .cover img { transform: scale(1.03); }
.person { text-align: center; }

.cover {
  aspect-ratio: 1; width: 100%; border-radius: 10px; background: var(--panel2); overflow: hidden; position: relative;
  display: grid; place-items: center; color: var(--faint);
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s, transform .3s; position: absolute; inset: 0; }
.cover img.ok { opacity: 1; }
.cover .ph { width: 38%; height: 38%; }
.cover.round { border-radius: 50%; }
.cover.gradient { background: linear-gradient(135deg, var(--gold2), var(--gold) 50%, #8a5a0c); color: var(--gold-ink); }
.collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage img { position: static; }
.mix .art, .mix-art { position: relative; display: block; }
.mix-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; font-weight: 800; font-size: 17px; line-height: 1.15; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78)); border-radius: 0 0 10px 10px; letter-spacing: -.01em;
}
.mix-art { width: 220px; flex: none; box-shadow: var(--shadow); border-radius: 10px; }
.badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px;
  background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); vertical-align: middle; line-height: 1.4;
}
.card .badge { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .65); color: var(--gold2); }

/* track list */
.trow {
  display: grid; grid-template-columns: 34px 44px minmax(0, 1fr) minmax(0, .8fr) 104px 34px 52px 34px; gap: 10px; align-items: center;
  padding: 5px 8px; border-radius: 9px; min-height: 56px; cursor: default; user-select: none;
}
.trow:hover { background: var(--panel); }
.trow.now { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.trow.now .tt { color: var(--gold); }
.trow.dragging { opacity: .6; background: var(--panel2); }
.trow .n { color: var(--faint); font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; display: flex; justify-content: flex-end; }
.trow .grip { cursor: grab; touch-action: none; color: var(--faint); display: grid; place-items: center; width: 28px; height: 36px; }
.trow .cover { width: 44px; border-radius: 6px; }
.trow .tm { min-width: 0; }
.trow .tt { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .ta, .trow .al { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .al a:hover { color: var(--text); text-decoration: underline; }
.trow .q { font-size: 11px; color: var(--faint); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .d { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; display: flex; justify-content: flex-end; }
.trow .more, .trow .fav { opacity: 0; }
.trow .fav.on { opacity: 1; color: var(--gold); }
.trow:hover .more, .trow:hover .fav, .trow .more:focus, .trow .fav:focus { opacity: 1; }
.thead { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; min-height: 34px; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 4px; }
.thead:hover { background: none; }
.thead .ic { width: 15px; height: 15px; }
.trow .n .eq { display: none; }
.trow.now.playing .n > span:first-child { display: none; }
.trow.now.playing .n .eq { display: inline-flex; }
.eq { gap: 2px; height: 14px; align-items: flex-end; justify-content: flex-end; }
.eq i { width: 3px; background: var(--gold); border-radius: 1px; animation: eq 0.9s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.disc { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 22px 8px 6px; }
.disc .ic { width: 16px; height: 16px; }

.page-head { display: flex; gap: 28px; align-items: flex-end; margin: 18px 0 26px; flex-wrap: wrap; }
.page-head > .cover, .page-head > .collage { width: 220px; box-shadow: var(--shadow); flex: none; }
.page-head .meta { flex: 1; min-width: 240px; }
.page-head .kind { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.page-head h1 { font-size: clamp(26px, 4vw, 46px); line-height: 1.06; margin: 6px 0 10px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.page-head .by { color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.page-head .by a { color: var(--text); font-weight: 650; }
.page-head .by a:hover { color: var(--gold); }

.artist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; margin-bottom: 22px; }

.search-top { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 24px; margin-top: 10px; }
.search-top h2 { font-size: 21px; margin: 0 0 12px; }
.top-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.top-card .cover { width: 120px; box-shadow: var(--shadow); }
.top-card .t { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.top-card .s { color: var(--muted); margin: 4px 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tile { border-radius: 12px; padding: 16px; min-height: 92px; font-weight: 800; font-size: 18px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; letter-spacing: -.01em; }
.tile small { font-weight: 600; font-size: 12px; opacity: .8; }
.tile:hover { filter: brightness(1.1); }
.t0 { background: linear-gradient(135deg, #b5851c, #6f4b07); } .t1 { background: linear-gradient(135deg, #2e7d6b, #12453a); }
.t2 { background: linear-gradient(135deg, #8b3a62, #4a1733); } .t3 { background: linear-gradient(135deg, #3c5aa6, #1c2c5a); }
.t4 { background: linear-gradient(135deg, #b4532a, #5e2510); } .t5 { background: linear-gradient(135deg, #5c6b2e, #2c3512); }
.t6 { background: linear-gradient(135deg, #6a3fa0, #331a55); } .t7 { background: linear-gradient(135deg, #2a7fa6, #0f3d55); }
.lib-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.lib-links a, .lib-links button { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 650; text-align: left; }
.lib-links .ic { color: var(--gold); }

/* folders */
.drives { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.drive { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); position: relative; transition: border-color .15s; }
a.drive:hover { border-color: var(--gold); }
.drive.off { opacity: .5; }
.drive-ic { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.drive-ic .ic { width: 24px; height: 24px; }
.drive-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.drive-txt b { font-size: 16px; }
.drive-txt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drive .badge { position: absolute; top: 10px; right: 10px; }
.off-note { color: var(--faint) !important; font-style: italic; }
.usage { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; margin-top: 4px; }
.usage i { display: block; height: 100%; background: var(--gold); }
.page-crumbs { margin: 14px 0 0; font-size: 13px; gap: 4px; }
.page-crumbs a { color: var(--muted); padding: 2px 4px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.page-crumbs a:hover { color: var(--text); background: var(--panel); }
.page-crumbs a:last-child { color: var(--text); font-weight: 650; }
.folder-head { display: flex; gap: 24px; align-items: flex-end; margin: 14px 0 10px; flex-wrap: wrap; }
.folder-head > .cover { width: 160px; flex: none; box-shadow: var(--shadow); }
.folder-head .meta { flex: 1; min-width: 240px; }
.folder-head .kind { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.folder-head h1 { font-size: clamp(24px, 3.4vw, 40px); margin: 4px 0 6px; letter-spacing: -.025em; overflow-wrap: anywhere; line-height: 1.1; }
.folder-head .by { color: var(--muted); margin-bottom: 14px; }
.frows { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.frow { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); min-width: 0; font-weight: 600; font-size: 14px; }
.frow:hover { border-color: var(--gold); }
.frow .ic { color: var(--gold); }
.frow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-loading { text-align: center; padding-top: 40px; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; line-height: 1.6; }
.empty.small { padding: 18px; font-size: 14px; }
.empty small { color: var(--faint); }
.more-btn { display: flex; justify-content: center; margin: 22px 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 50px auto; }
.spinner.small { width: 20px; height: 20px; border-width: 2px; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 6px 0 18px; }
select.sel { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; height: 38px; padding: 0 12px; max-width: 100%; }
input.filter { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; height: 38px; padding: 0 16px; outline: 0; min-width: 220px; }
input.filter:focus { border-color: var(--gold); }

/* ------------------------------------------------------------ settings */
.settings { display: grid; gap: 18px; max-width: 780px; margin-top: 10px; }
.set-nav { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 70px; z-index: 3; padding: 6px 0; background: var(--bg); }
.set-nav a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--muted); border: 1px solid var(--line); }
.set-nav a:hover { color: var(--text); }
.set-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; scroll-margin-top: 120px; }
.set-card h2 { margin: 0 0 18px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.set-card h2 .ic { color: var(--gold); }
.field { display: block; margin-bottom: 18px; }
.field > span { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 650; }
.field > span b { color: var(--gold); }
.field select, .field > input:not([type=range]) { width: 100%; }
.field > input:not([type=range]), .dialog input { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 0 12px; outline: 0; }
.field > input:focus, .dialog input:focus { border-color: var(--gold); }
.field small { display: block; color: var(--faint); font-size: 12px; margin-top: 7px; line-height: 1.5; }
.field input[type=range] { width: 100%; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 4px 0 14px; cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.row-toggle span:first-child { display: flex; flex-direction: column; gap: 2px; }
.row-toggle small { color: var(--faint); font-size: 12px; line-height: 1.45; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + i { background: var(--gold); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold2); outline-offset: 2px; }
#eq-box.disabled { opacity: .45; pointer-events: none; }
.eq-box { margin-top: 6px; }
.set-card .eq { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 6px 0 14px; height: auto; align-items: stretch; }
.set-card .eq label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.set-card .eq output { font-size: 11px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; min-height: 15px; }
.set-card .eq input[type=range] { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 140px; flex: none; background: none; }
.set-card .eq input[type=range]::-webkit-slider-runnable-track { width: 4px; background: var(--line); border-radius: 4px; }
.set-card .eq input[type=range]::-webkit-slider-thumb { margin-left: -6px; }
.root { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--bg); }
.root > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.root code { font-size: 13px; overflow-wrap: anywhere; }
.root .ic { color: var(--gold); }
.scan-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.scan-box > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.scan-box small { color: var(--faint); font-size: 12px; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--gold); transition: width .4s; }
.form-msg { font-size: 14px; margin-bottom: 12px; }
.form-msg:empty { display: none; }
.form-msg.err { color: var(--danger); }
.form-msg.ok { color: var(--gold); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 13px; margin-bottom: 8px; color: var(--muted); }
.crumbs button { padding: 4px 6px; border-radius: 6px; }
.crumbs button:hover { background: var(--panel2); color: var(--text); }
.fp-info { font-size: 12px; margin-top: 8px; overflow-wrap: anywhere; }
.dialog .list.fp button { display: flex; align-items: center; gap: 10px; }
.dialog .list.fp .ic { color: var(--gold); width: 18px; height: 18px; }

/* ------------------------------------------------------------ range inputs */
input[type=range] {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; outline: 0; cursor: pointer;
  background: linear-gradient(to right, var(--gold) var(--p, 0%), var(--line) var(--p, 0%));
}
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; transition: transform .1s; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.2); }
.set-card .eq input[type=range] { background: none; }

/* ------------------------------------------------------------ player bar */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--player-h); z-index: 20; background: var(--bg2);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.4fr) minmax(200px, 1fr);
  align-items: center; gap: 16px; padding: 0 18px;
}
.player.idle .pc, .player.idle .pr > :not(.vol):not(#mute) { opacity: .4; pointer-events: none; }
.pl { display: flex; align-items: center; gap: 12px; min-width: 0; transition: transform .2s; }
.pcover { width: 56px; flex: none; cursor: pointer; }
.pcover .cover { border-radius: 8px; }
.pl .txt { min-width: 0; cursor: pointer; }
.pl .tt { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .ta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav.on { color: var(--gold); }
.pc { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ctrls { display: flex; align-items: center; gap: 10px; }
.ctrls .iconbtn { width: 36px; height: 36px; }
.ctrls .main {
  width: 42px; height: 42px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; transition: transform .1s;
}
.ctrls .main:hover { transform: scale(1.06); }
.ctrls .main:active { transform: scale(.96); }
.seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 600px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seek span { width: 44px; text-align: center; flex: none; }
.seek input { flex: 1; }
.pr { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.qual { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--gold); padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); border-radius: 5px; white-space: nowrap; margin-right: 4px; cursor: default; }
.vol { width: 100px; }
#p-lyrics-btn.has { color: var(--text); }
.loading .ctrls .main { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.mini-bar { display: none; }

/* ------------------------------------------------------------ now playing */
.np {
  --text: #f6f1e6; --muted: rgba(246, 241, 230, .66); --faint: rgba(246, 241, 230, .4); --line: rgba(255, 255, 255, .12);
  --panel: rgba(255, 255, 255, .06); --panel2: rgba(255, 255, 255, .1); --bg: #0b0a09; --gold: var(--np-accent);
  --np-tint: #2a2112;
  position: fixed; inset: 0; z-index: 40; display: none; background: #0b0a09; color: var(--text); overflow: hidden; color-scheme: dark;
}
.np.open { display: block; animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.np-bg { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(70px) saturate(1.4); opacity: .5; transition: background-image .6s; }
.np-shade { position: absolute; inset: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--np-tint) 75%, transparent), rgba(8, 7, 6, .82) 70%); }
.np-head { position: relative; z-index: 2; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; gap: 12px; }
.np-context { text-align: center; min-width: 0; display: flex; flex-direction: column; font-size: 13px; font-weight: 650; }
.np-context small { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.np-context span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-context a:hover { text-decoration: underline; }
.np-body { position: relative; z-index: 1; height: calc(100% - 64px); display: grid; grid-template-columns: 1fr minmax(320px, 420px); }
.np-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 32px 32px; gap: 14px; min-height: 0; --w: min(50vh, 460px, 80vw); }
.np-art { width: var(--w); flex: none; transition: transform .25s; }
.np-art .cover { box-shadow: 0 30px 80px rgba(0, 0, 0, .55); border-radius: 14px; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.np.paused .np-art .cover { transform: scale(.94); }
.np-viz { width: var(--w); height: 54px; display: none; margin-top: -8px; }
.np.viz .np-viz { display: block; }
.np-info { width: var(--w); display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.np-text { flex: 1; min-width: 0; }
.np-info .tt { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-info .ta { color: var(--text); opacity: .85; margin-top: 3px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-info .tb { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-info a:hover { text-decoration: underline; }
.np-lyric-line { display: none; }
.np .seek { width: var(--w); max-width: none; font-size: 12px; }
.np .seek span:first-child { text-align: left; width: 40px; }
.np .seek span:last-child { text-align: right; width: 40px; }
.np .ctrls { gap: 22px; }
.np .ctrls .main { width: 66px; height: 66px; background: #fff; color: #111; }
.np .ctrls .main .ic { width: 26px; height: 26px; }
.np .ctrls .iconbtn { width: 46px; height: 46px; color: var(--text); }
.np .ctrls .iconbtn .ic { width: 24px; height: 24px; }
.np .ctrls .iconbtn[data-act="shuffle"]:not(.on), .np .ctrls .iconbtn[data-act="repeat"]:not(.on) { color: var(--muted); }
.np-tools { display: flex; align-items: center; gap: 6px; }
.np-tools .qual { border-color: var(--line); color: var(--text); }
.np-qual-full { font-size: 11px; color: var(--faint); letter-spacing: .04em; }
.np-tools [data-tab] { display: none; }

.np-side { display: flex; flex-direction: column; min-height: 0; background: rgba(0, 0, 0, .28); border-left: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.sheet-grab { display: none; }
.np-tabs { display: flex; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.np-tabs button { flex: 1; padding: 9px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.np-tabs button.on { background: var(--panel2); color: var(--text); }
.np-pane { flex: 1; overflow-y: auto; padding: 8px 10px 30px; scrollbar-width: thin; overscroll-behavior: contain; }
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 8px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.qhead span { display: flex; gap: 12px; }
.qitem { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto 28px; gap: 10px; align-items: center; padding: 6px 6px; border-radius: 9px; cursor: pointer; }
.qitem:hover { background: var(--panel); }
.qitem.now { background: color-mix(in srgb, var(--np-accent) 18%, transparent); cursor: default; }
.qitem.now .tt { color: var(--np-accent); }
.qitem.auto .tt { opacity: .85; }
.qitem.dragging { opacity: .7; background: var(--panel2); }
.qitem .cover { width: 40px; border-radius: 5px; }
.qitem .grip { color: var(--faint); cursor: grab; touch-action: none; display: grid; place-items: center; height: 36px; }
.qitem .grip .ic { width: 16px; height: 16px; }
.qitem .qt { min-width: 0; }
.qitem .tt { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .ta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .qd { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.qitem .iconbtn { opacity: .5; }
.qitem:hover .iconbtn { opacity: 1; }

.lyr { padding: 20px 14px 40vh; }
.lyr.synced p {
  margin: 0; padding: 7px 0; font-size: 24px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: rgba(255, 255, 255, .3);
  cursor: pointer; transition: color .3s, transform .3s; transform-origin: left center;
}
.lyr.synced p:hover { color: rgba(255, 255, 255, .6); }
.lyr.synced p.on { color: #fff; transform: scale(1.02); }
.lyr.plain { font-size: 17px; line-height: 1.8; font-weight: 600; color: rgba(255, 255, 255, .85); padding-bottom: 60px; }
.lyr-src { font-size: 11px; color: var(--faint); padding: 0 14px 20px; margin-top: -38vh; }
.lyr.plain + .lyr-src { margin-top: 0; }

table.info { width: 100%; border-collapse: collapse; font-size: 14px; }
table.info th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 12px 8px 0; vertical-align: top; white-space: nowrap; width: 1%; }
table.info td { padding: 8px 0; overflow-wrap: anywhere; }
table.info tr + tr { border-top: 1px solid var(--line); }
table.info a:hover { color: var(--gold); text-decoration: underline; }
table.info .path { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
#about { padding: 8px 6px; }
kbd { font: 12px ui-monospace, monospace; padding: 2px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--panel2); }

/* ------------------------------------------------------------ menus, toasts, dialogs */
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.menu {
  position: fixed; z-index: 60; min-width: 230px; max-width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: none; max-height: 80vh; overflow-y: auto;
}
.np ~ .menu { color-scheme: dark; }
.menu.open { display: block; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head .cover { width: 44px; flex: none; border-radius: 6px; }
.menu-head div:last-child { display: flex; flex-direction: column; min-width: 0; }
.menu-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-head span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; text-align: left; font-size: 14px; }
.menu button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu button:hover { background: var(--panel2); }
.menu button.on { color: var(--gold); }
.menu button small { color: var(--faint); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menu .ic { width: 18px; height: 18px; color: var(--muted); }
.menu button.on .ic { color: var(--gold); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 18px); transform: translate(-50%, 20px); z-index: 70; opacity: 0;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: .2s; pointer-events: none; max-width: calc(100vw - 32px); display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: var(--gold); font-weight: 800; filter: brightness(.8); }
.dialog { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .55); display: none; place-items: center; padding: 16px; }
.dialog.open { display: grid; }
.dialog .box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: 100%; max-width: 440px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); }
.dialog h3 { margin: 0 0 14px; }
.dialog input { width: 100%; }
.dialog .actions { justify-content: flex-end; margin-top: 18px; }
.dialog .list { max-height: 46vh; overflow-y: auto; margin: 0 -6px; }
.dialog .list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; }
.dialog .list button:hover { background: var(--panel2); }
.dialog .list .ic { display: inline-block; vertical-align: -4px; margin-right: 6px; }
.keys th { width: 40%; }

.tabs { display: none; }

/* ------------------------------------------------------------ tablets */
@media (max-width: 1180px) {
  .trow { grid-template-columns: 34px 44px minmax(0, 1fr) minmax(0, .7fr) 34px 52px 34px; }
  .trow .q { display: none; }
  .np-body { grid-template-columns: 1fr minmax(300px, 360px); }
  .vol { width: 70px; }
  .search-top { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ phones */
@media (max-width: 860px) {
  :root { --player-h: 66px; }
  .app { grid-template-columns: 1fr; padding-bottom: calc(var(--player-h) + 64px + env(safe-area-inset-bottom)); }
  .side { display: none; }
  .top { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .top .mlogo { display: block; flex: none; }
  .top #back:not([hidden]) + .mlogo { display: none; }
  .folder-head > .cover { width: 120px; }
  body[data-page="album"] .top .mlogo, body[data-page="artist"] .top .mlogo, body[data-page="composer"] .top .mlogo,
  body[data-page="playlist"] .top .mlogo, body[data-page="mix"] .top .mlogo, body[data-page="lang"] .top .mlogo, body[data-page="decade"] .top .mlogo { display: none; }
  .search { height: 40px; }
  .view { padding: 4px 16px 30px; }
  .hero { padding: 20px; border-radius: 16px; }
  .hero h1 { font-size: 24px; }
  .stats { gap: 16px; }
  .stats b { font-size: 18px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 12px; }
  .row-scroll { grid-auto-columns: 142px; gap: 12px; margin: 0 -16px; padding: 0 16px 8px; scroll-padding: 16px; }
  .artist-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 12px; }
  .card .play { opacity: 1; transform: none; width: 38px; height: 38px; top: calc(100cqw - 46px); }
  .section { margin-top: 26px; }
  .section-head h2 { font-size: 19px; }
  .trow { grid-template-columns: 44px minmax(0, 1fr) 36px; gap: 12px; padding: 5px 2px; min-height: 58px; }
  .trow .n, .trow .al, .trow .q, .trow .d, .trow .fav { display: none; }
  .trow .more { opacity: 1; }
  .trow:has(.grip) { grid-template-columns: 30px 44px minmax(0, 1fr) 36px; }
  .trow:has(.grip) .n { display: flex; }
  .trow:has(.grip) .n .eq { display: none; }
  .thead { display: none; }
  .page-head { gap: 18px; flex-direction: column; align-items: center; text-align: center; margin-top: 8px; }
  .page-head > .cover, .page-head > .collage, .mix-art { width: min(62vw, 240px); }
  .page-head .meta { min-width: 0; width: 100%; }
  .page-head .actions { justify-content: center; }
  h1.title { font-size: 26px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .toolbar .actions { justify-content: space-between; }
  input.filter { min-width: 0; width: 100%; }
  .set-nav { top: 60px; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 6px 16px; scrollbar-width: none; }
  .set-card { padding: 18px; }
  .set-card .eq input[type=range] { height: 120px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }

  .player {
    bottom: calc(64px + env(safe-area-inset-bottom)); left: 8px; right: 8px; border-radius: 14px; border: 1px solid var(--line);
    grid-template-columns: 1fr auto; padding: 0 6px 0 8px; gap: 4px; box-shadow: var(--shadow);
    background: color-mix(in srgb, var(--bg2) 92%, var(--np-accent));
  }
  .player .pr, .player .seek, .player .ctrls .opt, .player .ctrls .prev, .player .pl .fav { display: none; }
  .player .pcover { width: 46px; }
  .player .ctrls { gap: 2px; }
  .player .ctrls .main { width: 42px; height: 42px; background: none; color: var(--text); }
  .player .ctrls .main .ic { width: 24px; height: 24px; }
  .player .mini-bar { display: block; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
  .player .mini-bar i { display: block; height: 100%; background: var(--np-accent); width: 0; }
  .tabs {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 19;
    height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg2) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 650; }
  .tabs a.on { color: var(--gold); }
  .tabs .ic { width: 22px; height: 22px; }

  .np-head { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .np-body { grid-template-columns: 1fr; height: calc(100% - 60px - env(safe-area-inset-top)); }
  .np-main { padding: 0 24px calc(20px + env(safe-area-inset-bottom)); justify-content: space-evenly; gap: 10px; --w: min(86vw, 46vh); }
  .np-info .tt { font-size: 22px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .np-lyric-line {
    display: block; width: var(--w); min-height: 1.4em; font-size: 15px; font-weight: 700; color: var(--np-accent); text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  }
  .np .ctrls { gap: 14px; width: var(--w); justify-content: space-between; }
  .np-tools { width: var(--w); justify-content: space-between; }
  .np-tools [data-tab] { display: grid; }
  .np-qual-full { display: none; }
  .np-side {
    position: fixed; left: 0; right: 0; bottom: 0; height: 84dvh; z-index: 5; border-left: 0; border-radius: 20px 20px 0 0;
    background: rgba(20, 18, 14, .96); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 -20px 50px rgba(0, 0, 0, .5); padding-bottom: env(safe-area-inset-bottom);
  }
  .np.sheet-open .np-side { transform: none; }
  .sheet-grab { display: flex; justify-content: center; padding: 8px 0 0; }
  .sheet-grab button { width: 80px; height: 22px; display: grid; place-items: center; }
  .sheet-grab i { width: 40px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .3); }
  .lyr.synced p { font-size: 22px; }

  .menu.sheet {
    left: 0 !important; right: 0; bottom: 0; top: auto !important; max-width: none; border-radius: 18px 18px 0 0; padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
    animation: sheet .22s cubic-bezier(.2, .8, .2, 1); max-height: 75vh;
  }
  .menu.sheet button { padding: 13px 14px; font-size: 15px; }
  @keyframes sheet { from { transform: translateY(100%); } }
  .toast { bottom: calc(var(--player-h) + 80px + env(safe-area-inset-bottom)); }
  .dialog { align-items: end; padding: 0; }
  .dialog .box { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) and (max-height: 640px) {
  .np-main { --w: min(70vw, 34vh); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
