/* ===================================================== Nada — pemutar ===
   Gelap dan tenang: fokus ke sampul dan lagu. Aksen hijau mint. */
:root {
  --bg: #0c0e14;
  --bg-2: #12151d;
  --surface: #171b25;
  --surface-2: #1f2430;
  --surface-3: #2a3040;
  --line: #262c3a;
  --text: #eef1f6;
  --muted: #98a1b5;
  --dim: #6b7489;
  --accent: #34e3a4;
  --accent-2: #1fa2ff;
  --accent-ink: #04241a;
  --danger: #ff6b7a;
  --radius: 10px;
  --side-w: 236px;
  --bar-h: 84px;
  --tabs-h: 0px;
  --queue-w: 340px;
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.45; overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dim { color: var(--muted); }
[hidden] { display: none !important; }

.i { width: 20px; height: 20px; flex: none; display: block; }
.i.big { width: 48px; height: 48px; }

/* ------------------------------------------------------------- kerangka */
.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) 0;
  grid-template-rows: minmax(0, 1fr) var(--bar-h);
  height: 100dvh;
  transition: grid-template-columns .25s ease;
}
body.queue-open .shell { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--queue-w); }

.side {
  grid-row: 1; background: #07080c; padding: 18px 12px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; border-right: 1px solid #151923;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.logo .i { width: 19px; height: 19px; stroke-width: 2.4; }
.logo.big { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 12px; }
.logo.big .i { width: 32px; height: 32px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden;
}
.nav a span { overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { color: var(--text); text-decoration: none; background: #11141b; }
.nav a.active { color: var(--text); background: var(--surface); }
.nav a.active .i { color: var(--accent); }
.nav-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; padding: 20px 12px 6px; }
.pl-nav a { padding: 7px 12px; font-weight: 500; font-size: 14px; }

.main { grid-row: 1; overflow-y: auto; overflow-x: hidden; position: relative; background: linear-gradient(180deg, #151a26 0, var(--bg) 340px); scroll-padding-top: 70px; }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; height: 60px; transition: background .2s;
}
.top.solid { background: rgba(12, 14, 20, .92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.top-title { flex: 1; font-weight: 700; font-size: 16px; opacity: 0; transition: opacity .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top.solid .top-title { opacity: 1; }
.view { padding: 0 28px 48px; max-width: 1500px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center;
  color: var(--muted); transition: color .15s, background .15s, transform .1s; flex: none;
}
.icon-btn:hover:not(:disabled) { color: var(--text); background: rgba(255,255,255,.07); }
.icon-btn:active:not(:disabled) { transform: scale(.94); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .i { width: 18px; height: 18px; }
.icon-btn.lg .i { width: 26px; height: 26px; }
.icon-btn.tgl.on { color: var(--accent); position: relative; }
.icon-btn.tgl.on::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.like.on, .r-like.on { color: var(--accent) !important; }
.like.on .i path, .r-like.on .i path { fill: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; font-weight: 700; font-size: 14px; background: var(--surface-2); border: 1px solid var(--surface-3);
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: #5cebb8; }
.btn.danger { background: var(--danger); color: #2a0409; border-color: transparent; }
.btn.ghost { background: transparent; border-color: var(--surface-3); color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.block { width: 100%; }
.btn .i { width: 18px; height: 18px; }
.link { color: var(--muted); font-size: 13px; font-weight: 600; }
.link:hover { color: var(--text); text-decoration: underline; }

/* ------------------------------------------------------------- judul */
.view > h1, .greet { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 6px; }
.greet { margin-bottom: 20px; }
.meta-line { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.sec { margin-top: 34px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-h h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.sec-more { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.disc { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin: 22px 0 6px; }
.disc .i { width: 16px; height: 16px; }

.hero { display: flex; align-items: flex-end; gap: 28px; padding: 8px 0 24px; }
.hero-art { width: clamp(150px, 20vw, 232px); flex: none; box-shadow: 0 20px 60px rgba(0,0,0,.5); border-radius: 8px; }
.hero-art .art { width: 100%; border-radius: 8px; }
.hero-art.round, .hero-art.round .art { border-radius: 50%; }
.hero-text { min-width: 0; }
.kind { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hero h1 { font-size: clamp(30px, 5.2vw, 72px); font-weight: 900; letter-spacing: -.03em; margin: 6px 0 12px; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-sub { color: var(--muted); font-size: 14px; }
.hero-sub a { color: var(--text); font-weight: 700; }
.hero-sub .desc { margin-bottom: 6px; }
.hero.liked .liked-art { background: linear-gradient(135deg, #4f37d8, #9fe6c9); color: #fff; }
.hero.liked .liked-art .i { width: 40%; height: 40%; fill: currentColor; }

.actions { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.toolbar .actions { margin: 0; }
.play-big {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(52,227,164,.25); transition: transform .12s, background .15s;
}
.play-big:hover { transform: scale(1.05); background: #5cebb8; }
.play-big .i { width: 24px; height: 24px; }
.select { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.select select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--text); }

/* -------------------------------------------------------------- sampul */
.art {
  --h: 200; position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; flex: none;
  background: linear-gradient(135deg, hsl(var(--h) 45% 32%), hsl(calc(var(--h) + 50) 50% 18%));
  display: grid; place-items: center; color: rgba(255,255,255,.55);
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art > .i { width: 34%; height: 34%; }
.art.sm { width: 42px; border-radius: 4px; }
.art.xl { width: 100%; border-radius: 10px; }
.art.collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.art.collage img { position: static; }

/* --------------------------------------------------------------- kartu */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 6px; overflow-x: auto;
  /* Kartu berpadding 12px untuk latar hover; rak digeser supaya isi kartu sejajar judul. */
  padding: 0 16px 8px; margin: 0 -28px; scroll-padding-inline: 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf > .card { margin: 0; }
.shelf::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 22px 18px; }
.card { display: block; padding: 12px; margin: -12px; border-radius: 12px; transition: background .2s; scroll-snap-align: start; cursor: pointer; min-width: 0; }
.card:hover { background: var(--surface); text-decoration: none; }
.card-art { position: relative; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); border-radius: 6px; }
.card-art .art { width: 100%; }
.card-art.round, .card-art.round .art { border-radius: 50%; }
.card-play {
  position: absolute; right: 8px; bottom: 8px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.card:hover .card-play, .card:focus-within .card-play { opacity: 1; transform: none; }
.card-t { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.quick {
  display: flex; align-items: center; gap: 14px; height: 58px; border-radius: 6px; overflow: hidden;
  background: rgba(255,255,255,.07); font-weight: 700; font-size: 14.5px; text-align: left; transition: background .2s;
}
.quick:hover { background: rgba(255,255,255,.13); text-decoration: none; }
.quick > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }
.quick .q-art { width: 58px; height: 58px; border-radius: 0; }
.q-ic { width: 58px; height: 58px; display: grid; place-items: center; flex: none; color: #fff; }
.q-ic.shuffle { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.q-ic.liked { background: linear-gradient(135deg, #4f37d8, #9fe6c9); }
.q-ic.liked .i path { fill: currentColor; }

.lib-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.lib-tile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 10px; background: var(--surface); }
.lib-tile:hover { background: var(--surface-2); text-decoration: none; }
.lib-tile small { display: block; color: var(--muted); font-size: 12.5px; }
.lt-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  --h: 200; padding: 14px 18px; border-radius: 10px; font-weight: 800; font-size: 15px; min-width: 140px; text-align: left;
  background: linear-gradient(135deg, hsl(var(--h) 55% 38%), hsl(calc(var(--h) + 40) 55% 24%)); display: flex; justify-content: space-between; gap: 12px;
}
.chip small { opacity: .7; font-weight: 600; }
.chip:hover { filter: brightness(1.15); }

/* --------------------------------------------------------- daftar lagu */
.songs { margin: 0 -8px; }
.row {
  display: grid; grid-template-columns: 40px minmax(0, 1.6fr) minmax(0, 1fr) 36px 56px 36px;
  align-items: center; gap: 12px; padding: 5px 8px; border-radius: 6px; min-height: 56px; cursor: pointer;
}
.no-album .row { grid-template-columns: 40px minmax(0, 1fr) 36px 56px 36px; }
.row.head { min-height: 36px; cursor: default; color: var(--dim); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 8px; }
.row.head .i { width: 16px; height: 16px; margin-left: auto; }
.row:not(.head):hover, .row:focus-visible { background: rgba(255,255,255,.06); }
.r-num { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; position: relative; height: 20px; display: grid; place-items: center; }
.r-num .p, .r-num .eq { display: none; }
.r-num .p .i { width: 16px; height: 16px; color: var(--text); }
.row:not(.head):hover .r-num .n { display: none; }
.row:not(.head):hover .r-num .p { display: block; }
.row.cur .r-title, .row.cur .r-num .n { color: var(--accent); }
body.is-playing .row.cur .r-num .n, body.is-playing .row.cur:hover .r-num .p { display: none; }
body.is-playing .row.cur .r-num .eq { display: flex; }
.eq { 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; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
.r-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.r-text { min-width: 0; }
.r-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub, .r-album { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub a:hover, .r-album a:hover { color: var(--text); }
.r-dur { color: var(--muted); font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }
.r-like, .r-more { opacity: 0; }
.row:hover .r-like, .row:hover .r-more, .r-like.on, .row:focus-within .r-more { opacity: 1; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .i { margin: 0 auto 14px; color: var(--dim); }
.empty h2 { color: var(--text); font-size: 20px; margin-bottom: 6px; }
.empty p { margin: 0 0 16px; }
.loading { height: 120px; display: grid; place-items: center; }
.loading::after { content: ""; width: 28px; height: 28px; border: 3px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.search-box { position: relative; max-width: 560px; margin: 4px 0 8px; }
.search-box .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input {
  width: 100%; height: 50px; border-radius: 999px; border: 1px solid transparent; background: #fff; color: #0c0e14;
  padding: 0 20px 0 48px; font-size: 16px; outline: none;
}
.search-box input:focus { box-shadow: 0 0 0 3px rgba(52,227,164,.4); }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }

/* ------------------------------------------------------ bilah pemutar */
.bar {
  grid-column: 1 / -1; grid-row: 2; background: #07080c; border-top: 1px solid #151923;
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(300px, 1.6fr) minmax(180px, 1fr);
  align-items: center; gap: 16px; padding: 0 16px; position: relative; z-index: 10;
}
.mini-progress { display: none; }
.bar-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar-art { flex: none; }
.bar-art .art.sm { width: 56px; border-radius: 6px; }
.bar-meta { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.bar-meta .t { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-meta .s { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.btns { display: flex; align-items: center; gap: 10px; }
.play-btn {
  width: 38px; height: 38px; border-radius: 50%; background: var(--text); color: var(--bg);
  display: grid; place-items: center; transition: transform .1s;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn .i { width: 18px; height: 18px; }
.play-btn.xl { width: 68px; height: 68px; }
.play-btn.xl .i { width: 28px; height: 28px; }
.seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; }
.tm { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
.bar-side { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.vol { display: flex; align-items: center; gap: 4px; width: 150px; }

.range {
  --p: 0%; -webkit-appearance: none; appearance: none; flex: 1; height: 16px; background: transparent; cursor: pointer; margin: 0; min-width: 0;
}
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--text) var(--p), #3a4152 var(--p)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--text) var(--p), #3a4152 var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4px; opacity: 0; transition: opacity .15s; }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-webkit-slider-runnable-track, .range:focus-visible::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--p), #3a4152 var(--p)); }
.range:hover::-moz-range-track { background: linear-gradient(to right, var(--accent) var(--p), #3a4152 var(--p)); }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb { opacity: 1; }

/* ------------------------------------------------------------- antrean */
.queue { grid-row: 1; grid-column: 3; background: var(--bg-2); border-left: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.q-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 20px; }
.q-head h3 { font-size: 17px; }
.q-body { overflow-y: auto; padding: 0 8px 24px; flex: 1; }
.q-sec { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 14px 12px 6px; flex-wrap: wrap; }
.q-sec a { color: var(--text); }
.q-sec .link { margin-left: auto; }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; background: var(--bg-2); position: relative; }
.q-row:hover { background: var(--surface); }
.q-row.cur .r-title { color: var(--accent); }
.q-row .r-text { flex: 1; }
.q-row .icon-btn { opacity: .0; }
.q-row:hover .icon-btn { opacity: 1; }
.q-row.dragging { z-index: 2; background: var(--surface-2); box-shadow: 0 8px 20px rgba(0,0,0,.4); transition: none; }
.q-row:not(.dragging) { transition: transform .15s; }
.grip { color: var(--dim); cursor: grab; touch-action: none; padding: 4px 0; }
.grip .i { width: 16px; height: 16px; }
.q-empty { padding: 8px 12px; font-size: 14px; }

/* ------------------------------------------------------- layar pemutar */
.np { position: fixed; inset: 0; z-index: 30; background: #05060a; overflow: hidden; animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.np-bg { position: absolute; inset: -60px; }
.np-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.4) brightness(.45); transform: scale(1.1); }
.np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,6,10,.2), rgba(5,6,10,.85)); }
.np-inner {
  position: relative; height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom)); gap: 14px;
}
.np-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.np-head .icon-btn { color: var(--text); }
.np-ctx { text-align: center; min-width: 0; }
.np-ctx small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.np-ctx a { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.np-stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.np-art { width: min(100%, 46vh, 460px); transition: transform .35s ease; }
.np-art .art { box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.np.paused .np-art { transform: scale(.9); }
.np-lyrics {
  position: relative; width: 100%; height: 100%; overflow: hidden; padding: 0 4px;
  mask-image: linear-gradient(transparent, #000 12%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 80%, transparent);
}
.np-lyrics > .loading { height: 100%; }
.np-lyrics.synced { touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; }
/* Gerak gulir: transform di layer sendiri → dikerjakan kartu grafis, bukan CPU. */
.ly-track { will-change: transform; transform: translate3d(0, 0, 0); }
.ly-track[data-mode="follow"] { transition: transform .95s cubic-bezier(.33, .1, .15, 1); }
.ly-track[data-mode="fling"] { transition: transform .8s cubic-bezier(.12, .72, .28, 1); }
.ly-track[data-mode="wheel"] { transition: transform .35s cubic-bezier(.2, .7, .3, 1); }
.ly {
  margin: 0; padding: 7px 0; font-size: clamp(20px, 3vh, 28px); font-weight: 800; line-height: 1.3; letter-spacing: -.01em;
  color: rgba(255,255,255,.4); transform-origin: 0 50%;
  transition: color .7s ease, transform .7s cubic-bezier(.33, .1, .15, 1);
}
.np-lyrics.synced .ly { cursor: pointer; }
@media (hover: hover) { .np-lyrics.synced .ly:hover { color: rgba(255,255,255,.72); } }
.ly.past { color: rgba(255,255,255,.26); }
.ly.cur { color: #fff; transform: scale(1.035); }
.ly.gap { display: flex; gap: 8px; padding: 14px 0; }
.ly.gap i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.ly.gap.cur i { animation: lyGap 1.6s ease-in-out infinite; }
.ly.gap.cur i:nth-child(2) { animation-delay: .25s; } .ly.gap.cur i:nth-child(3) { animation-delay: .5s; }
@keyframes lyGap { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.np-lyrics.plain { overflow-y: auto; scrollbar-width: none; padding-top: 12px; padding-bottom: 60px; mask-image: linear-gradient(transparent, #000 5%, #000 90%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 5%, #000 90%, transparent); }
.np-lyrics.plain::-webkit-scrollbar { display: none; }
.np-lyrics.plain .ly { color: #fff; font-size: clamp(17px, 2.4vh, 21px); font-weight: 700; padding: 3px 0; }
.ly-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; margin: 8px 0 14px; }
.ly-note .i { width: 15px; height: 15px; }
.np-info { display: flex; align-items: center; gap: 12px; }
.np-text { flex: 1; min-width: 0; }
.np-text h2 { font-size: clamp(20px, 3vh, 26px); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.np-artist a { color: #d9deea; }
.np .seek { max-width: none; flex-wrap: wrap; position: relative; }
.np .seek .range { flex-basis: 100%; order: -1; }
.np .seek .tm:last-child { margin-left: auto; }
.np .seek .tm { text-align: left; min-width: 0; }
.np-btns { display: flex; align-items: center; justify-content: space-between; }
.np-btns .icon-btn { color: var(--text); }
.np-btns .icon-btn.tgl:not(.on) { color: var(--muted); }
.np-extra { display: flex; justify-content: space-between; }
.np .range::-webkit-slider-thumb { opacity: 1; }
.np .range::-moz-range-thumb { opacity: 1; }

/* ---------------------------------------------------------- tab bawah */
.tabs { display: none; }

/* -------------------------------------------------------------- menu */
.menu {
  position: fixed; z-index: 100; min-width: 210px; padding: 4px; border-radius: 8px; background: var(--surface-2);
  box-shadow: 0 16px 40px rgba(0,0,0,.55); border: 1px solid var(--surface-3); animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.menu button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 5px; text-align: left; font-size: 14px; }
.menu button:hover:not(:disabled), .menu button:focus-visible { background: var(--surface-3); outline: none; }
.menu button.danger { color: var(--danger); }
.menu button:disabled { opacity: .7; font-size: 12.5px; color: var(--accent); }
.menu .i { width: 17px; height: 17px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--surface-3); margin: 4px 0; }

.dialog { border: 0; border-radius: 14px; background: var(--surface); color: var(--text); padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.dialog h3 { font-size: 19px; margin-bottom: 8px; }
.dialog p { color: var(--muted); margin: 0 0 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.lyrics-dialog { width: min(560px, calc(100vw - 32px)); }
.lyrics-text { white-space: pre-wrap; font: inherit; line-height: 1.7; max-height: 60vh; overflow-y: auto; margin: 0; }
.keys { width: 100%; border-collapse: collapse; }
.keys td { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
kbd { background: var(--surface-3); border-radius: 5px; padding: 2px 7px; font: 600 12.5px ui-monospace, monospace; border-bottom: 2px solid #11141b; }

.toasts { position: fixed; left: 50%; bottom: calc(var(--bar-h) + var(--tabs-h) + 16px); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #2f7cf6; color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: pop .2s; transition: opacity .3s; max-width: 90vw; }
.toast.error { background: #d9364a; }
.toast.out { opacity: 0; }

/* ------------------------------------------------------------- login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 30% 20%, #173a33, transparent 50%), radial-gradient(circle at 80% 90%, #10284a, transparent 50%), var(--bg); overflow: auto; }
.login-card { width: min(360px, 100%); text-align: center; display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.login-card p { margin: 0 0 8px; }
.login-card input { height: 48px; border-radius: 10px; border: 1px solid var(--surface-3); background: var(--surface); padding: 0 16px; font-size: 16px; outline: none; }
.login-card input:focus { border-color: var(--accent); }
.login-card .btn { height: 48px; font-size: 15px; }
.err { color: var(--danger); min-height: 1.4em; font-size: 14px; margin: 0; }

/* ============================================================ layar HP */
@media (max-width: 799px) {
  :root { --bar-h: 64px; --tabs-h: 58px; }
  .shell { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) auto auto; }
  .side { display: none; }
  .main { grid-column: 1; }
  .top { padding: 8px 12px; height: 52px; }
  .view { padding: 0 16px 32px; }
  .shelf { margin: 0 -16px; padding-inline: 4px; scroll-padding-inline: 4px; grid-auto-columns: 152px; gap: 2px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick { height: 52px; font-size: 13px; gap: 10px; }
  .quick .q-art, .q-ic { width: 52px; height: 52px; }
  .card-play { opacity: 1; transform: none; width: 40px; height: 40px; }
  .card-play .i { width: 18px; height: 18px; }
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 16px; padding-top: 0; }
  .hero-art { width: min(58vw, 240px); }
  .hero h1 { font-size: 28px; }
  .actions { flex-direction: row-reverse; justify-content: flex-start; }

  .row { grid-template-columns: minmax(0, 1fr) 36px !important; gap: 8px; padding: 6px 4px; min-height: 58px; }
  .row .r-num, .row .r-album, .row .r-dur, .row .r-like, .row.head { display: none; }
  .row .r-more { opacity: 1; }
  .row.cur .r-title { color: var(--accent); }
  .art.sm { width: 48px; }

  .bar {
    grid-column: 1; grid-row: 2; margin: 0 8px; border-radius: 10px; border: 0; height: var(--bar-h);
    background: #1d2433; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding: 0 6px 0 8px; overflow: hidden;
  }
  body:not(.has-track) .bar { display: none; }
  .mini-progress { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgba(255,255,255,.15); }
  .mini-progress i { display: block; height: 100%; width: 0; background: #fff; }
  .bar-art .art.sm { width: 46px; border-radius: 5px; }
  .bar-ctl .seek, #bShuffle, #bRepeat, #bPrev { display: none; }
  .bar-ctl { flex-direction: row; }
  .btns { gap: 2px; }
  .play-btn { background: none; color: var(--text); }
  .play-btn .i { width: 22px; height: 22px; }
  .bar-side { display: none; }
  .bar .like { display: none; }

  .tabs {
    display: flex; grid-column: 1; grid-row: 3; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: linear-gradient(transparent, #05060a 40%); justify-content: space-around; align-items: center;
  }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; flex: 1; padding-top: 6px; }
  .tabs a:hover { text-decoration: none; }
  .tabs a.active { color: var(--text); }
  .tabs .i { width: 24px; height: 24px; }

  .queue { position: fixed; inset: 0; z-index: 40; border: 0; transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); padding-top: env(safe-area-inset-top); visibility: hidden; }
  body.queue-open .queue { transform: none; visibility: visible; }
  .q-row .icon-btn { opacity: 1; }
  .np-inner { padding-inline: 22px; }
  .np-art { width: min(100%, 44vh); }
}

@media (min-width: 800px) and (max-width: 1100px) {
  :root { --side-w: 72px; }
  .side { padding: 18px 10px; align-items: center; }
  .brand-name, .nav a span, .nav-title, .pl-nav { display: none; }
  .brand { padding: 4px 0 18px; }
  .nav a { padding: 11px; justify-content: center; }
  .row { grid-template-columns: 40px minmax(0, 1fr) 36px 56px 36px; }
  .row .r-album { display: none; }
  .vol { width: 110px; }
  body.queue-open .row .r-dur { display: none; }
  body.queue-open .row { grid-template-columns: 40px minmax(0, 1fr) 36px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
