/* ==========================================================================
   musikkeren — gaya
   Token di :root diubah langsung oleh panel Pengaturan (settings.js).
   ========================================================================== */

:root {
  --bg: 13 11 10;
  --ink: 244 237 229;
  --ink-2: rgb(244 237 229 / .66);
  --ink-3: rgb(244 237 229 / .42);
  --line: rgb(255 255 255 / .08);
  --line-2: rgb(255 255 255 / .14);
  --accent: 232 181 140;
  --accent-ink: 22 16 12;
  --deep: 40 26 18;

  --glass-blur: 28px;
  --glass-alpha: .07;
  --glass-sat: 160%;
  --glass-shine: .14;
  --glass-tint: 255 255 255;
  --radius: 22px;
  --grain: .07;
  --ambient: .6;

  --side-w: 248px;
  --bar-h: 84px;
  --gap: 12px;

  --font-display: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, monospace;

  --spring: cubic-bezier(.32, 1.18, .48, 1);
  --ease: cubic-bezier(.22, .8, .24, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: rgb(var(--bg));
  color: rgb(var(--ink));
  font: 400 14px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  font-feature-settings: 'ss01', 'cv11';
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgb(var(--accent) / .35); }
kbd {
  font: 500 11px var(--font-mono);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgb(255 255 255 / .08);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
code { font: 12.5px var(--font-mono); background: rgb(255 255 255 / .08); padding: 1px 6px; border-radius: 6px; }

.eyebrow {
  display: inline-block;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow.accent { color: rgb(var(--accent)); }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.pad { padding: 24px 4px; }
.row-gap { display: flex; gap: 10px; align-items: center; }
.row-gap.wrap { flex-wrap: wrap; }
.ok-text { color: #9fe0b4; font-weight: 500; }

/* ---------------------------------------------------------------- ambient & grain */

.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: rgb(var(--bg)); }
.amb-base {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 700px at 12% -12%, rgb(var(--deep) / .95), transparent 70%),
    radial-gradient(900px 640px at 105% 115%, rgb(var(--deep) / .75), transparent 70%);
}
.amb-layer {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.amb-layer.on { opacity: var(--ambient); }
.amb-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, transparent 35%, rgb(var(--bg) / .78) 100%),
    linear-gradient(180deg, rgb(var(--bg) / .15), rgb(var(--bg) / .5));
}
.grain {
  position: fixed; inset: -50%; z-index: 300; pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- kaca */

.glass {
  position: relative;
  background: linear-gradient(160deg,
    rgb(var(--glass-tint) / calc(var(--glass-alpha) + .04)),
    rgb(var(--glass-tint) / var(--glass-alpha)) 55%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid rgb(255 255 255 / calc(var(--glass-shine) * .55));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / var(--glass-shine)),
    0 28px 60px -28px rgb(0 0 0 / .6);
}
html[data-tint=dark] .glass { border-color: rgb(255 255 255 / calc(var(--glass-shine) * .45)); }
html[data-rim=on] .glass::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgb(255 255 255 / calc(var(--glass-shine) * 2.6)) 0%,
    transparent 28%, transparent 66%,
    rgb(var(--accent) / .42) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* ---------------------------------------------------------------- tata letak aplikasi */

.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr);
  height: 100dvh;
  padding: var(--gap);
  column-gap: var(--gap);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
body.ready .app { opacity: 1; }

/* Sidebar: satu kotak utuh dari atas sampai bawah, sudut melengkung dan garis tepi halus.
   Warnanya rata (gradien vertikal, tanpa blur) supaya tidak muncul pita/garis di dalamnya. */
.sidebar {
  grid-row: 1 / 3;
  position: relative;
  padding: 22px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(180deg,
      rgb(var(--glass-tint) / calc(var(--glass-alpha) + .035)),
      rgb(var(--glass-tint) / var(--glass-alpha)) 40%,
      rgb(var(--glass-tint) / calc(var(--glass-alpha) * .7))),
    rgb(var(--bg) / .55);
  border: 1px solid rgb(255 255 255 / .085);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .09),
    0 30px 70px -30px rgb(0 0 0 / .7);
}
.brand { display: inline-flex; align-items: baseline; gap: 1px; padding: 0 12px; line-height: 1; }
.brand-a { font: 600 19px var(--font-ui); letter-spacing: -.03em; }
.brand-b { font: italic 400 25px var(--font-display); color: rgb(var(--accent)); letter-spacing: -.01em; }
.brand-b::after { content: '.'; color: rgb(var(--ink)); font-style: normal; }

.side-nav { display: grid; gap: 2px; }
.side-link {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background .2s, color .2s;
}
.side-link:hover { color: rgb(var(--ink)); background: rgb(255 255 255 / .04); }
.side-link.active { color: rgb(var(--ink)); background: rgb(255 255 255 / .08); }
.side-link.active .ic { color: rgb(var(--accent)); }
.side-link em { font: 500 11px var(--font-mono); font-style: normal; color: var(--ink-3); }

.side-section { display: flex; flex-direction: column; min-height: 0; flex: 1; gap: 8px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 12px; }
.side-lists { overflow-y: auto; display: grid; gap: 2px; align-content: start; scrollbar-width: none; }
.side-pl {
  display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: center;
  padding: 6px; border-radius: 12px;
  transition: background .2s;
}
.side-pl:hover { background: rgb(255 255 255 / .04); }
.side-pl.active { background: rgb(255 255 255 / .08); }
.side-pl img, .side-pl-ph { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.side-pl-ph { display: grid; place-items: center; background: rgb(255 255 255 / .06); color: var(--ink-3); }
.side-pl-text { min-width: 0; display: grid; }
.side-pl-text b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-pl-text small { color: var(--ink-3); font-size: 12px; }
.side-empty { color: var(--ink-3); font-size: 12.5px; padding: 4px 12px; line-height: 1.5; }

.side-foot { display: grid; gap: 10px; padding: 0 6px; }
.storage { display: grid; gap: 7px; padding: 12px; border-radius: 14px; background: rgb(0 0 0 / .18); border: 1px solid var(--line); }
.storage-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.storage-row b { font: 500 12px var(--font-mono); color: rgb(var(--ink)); }
.storage small { font-size: 11.5px; color: var(--ink-3); }
.meter { height: 3px; border-radius: 3px; background: rgb(255 255 255 / .1); overflow: hidden; }
.meter i { display: block; height: 100%; background: rgb(var(--accent)); border-radius: inherit; transition: width .8s var(--ease); }
.storage.big { padding: 14px; }
.storage.big .meter { height: 5px; }

.server-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-3);
  padding: 4px 6px; border-radius: 8px; text-align: left;
}
.server-badge:hover { color: var(--ink-2); }
.server-badge i { width: 7px; height: 7px; border-radius: 50%; background: #777; flex: none; }
.server-badge.ok i { background: #8fdcaa; box-shadow: 0 0 10px #8fdcaa; }
.server-badge.half i { background: #e9c26c; }

.topbar {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  min-width: 0;
}
.top-nav, .top-right { display: flex; align-items: center; gap: 8px; }
.top-right { min-width: 0; }
.mobile-only { display: none !important; }

.search {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 12px 0 14px;
  border-radius: 999px;
  width: 300px;
  color: var(--ink-3);
}
.search:focus-within { color: rgb(var(--ink)); }
.search-input { flex: 1; min-width: 0; background: none; border: 0; outline: none; height: 100%; color: rgb(var(--ink)); }
.search-input::placeholder { color: var(--ink-3); }
.search-input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.search:focus-within kbd { display: none; }

.view {
  grid-column: 2;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 22px calc(var(--bar-h) + 56px);
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / .14) transparent;
  outline: none;
}
.page { max-width: 1320px; margin: 0 auto; }
/* hanya saat pindah halaman; pembaruan isi (like, ganti lagu) tidak memutar ulang animasi */
.view.entering .page { animation: pageIn .45s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- tombol & kontrol */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: 999px;
  background: rgb(255 255 255 / .08);
  border: 1px solid rgb(255 255 255 / .08);
  font-weight: 600; font-size: 14px; letter-spacing: -.005em;
  white-space: nowrap;
  transition: background .2s, transform .15s, filter .2s, border-color .2s;
}
.btn:hover:not(:disabled) { background: rgb(255 255 255 / .13); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: rgb(var(--accent)); color: rgb(var(--accent-ink)); border-color: transparent; }
.btn.primary:hover:not(:disabled) { background: rgb(var(--accent)); filter: brightness(1.07); }
.btn.lg { height: 50px; padding: 0 28px; font-size: 15px; }
.btn.small { height: 32px; padding: 0 13px; font-size: 13px; font-weight: 500; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: rgb(var(--ink)); }
.btn.danger { color: #ffb3a8; background: rgb(255 90 70 / .1); border-color: rgb(255 90 70 / .18); }
.btn.danger:hover:not(:disabled) { background: rgb(255 90 70 / .18); }

.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
  transition: color .2s, background .2s, transform .15s;
}
.icon-btn:hover:not(:disabled) { color: rgb(var(--ink)); background: rgb(255 255 255 / .07); }
.icon-btn:active:not(:disabled) { transform: scale(.92); }
.icon-btn.on { color: rgb(var(--accent)); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.lg { width: 52px; height: 52px; color: rgb(var(--ink)); }
.glass-btn {
  background: rgb(255 255 255 / .06);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.circle-btn {
  width: 50px; height: 50px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / .18);
  color: rgb(var(--ink));
  transition: background .2s, border-color .2s, transform .15s;
}
.circle-btn:hover:not(:disabled) { background: rgb(255 255 255 / .07); border-color: rgb(255 255 255 / .3); }
.circle-btn.on { color: rgb(var(--accent)); border-color: rgb(var(--accent) / .5); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  border-radius: 999px;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgb(255 255 255 / .07);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.online::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #e9c26c; }
.chip.ghost { background: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  height: 32px; padding: 0 14px; white-space: nowrap; flex: none;
  border-radius: 999px;
  background: rgb(255 255 255 / .06);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  transition: background .2s, color .2s;
}
.chip-btn:hover { color: rgb(var(--ink)); background: rgb(255 255 255 / .1); }
.chip-btn.on { background: rgb(var(--ink)); color: rgb(var(--bg)); border-color: transparent; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgb(0 0 0 / .25); border: 1px solid var(--line); }
.seg.full { display: flex; }
.seg.full .seg-btn { flex: 1; }
.seg-btn { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; white-space: nowrap; }
.seg-btn:hover { color: rgb(var(--ink)); }
.seg-btn.on { background: rgb(255 255 255 / .14); color: rgb(var(--ink)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); }

.field {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgb(0 0 0 / .28);
  border: 1px solid var(--line-2);
  outline: none;
  transition: border-color .2s, background .2s;
}
.field.sm { height: 36px; font-size: 13px; }
textarea.field { height: auto; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.field:focus { border-color: rgb(var(--accent) / .7); background: rgb(0 0 0 / .38); }
.field::placeholder { color: var(--ink-3); }
.field-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.form, .form-row { display: grid; gap: 8px; }
.form { gap: 16px; }
.field-wrap { position: relative; display: flex; align-items: center; }
.field-wrap > span { position: absolute; left: 14px; color: var(--ink-3); display: grid; }
.field-wrap .field { padding-left: 42px; height: 50px; font-size: 15px; }

.select {
  height: 34px; padding: 0 30px 0 12px;
  border-radius: 10px;
  background: rgb(255 255 255 / .06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line);
  -webkit-appearance: none; appearance: none;
  font-size: 13px;
  color: rgb(var(--ink));
}
.select option { background: #1b1816; }

.range {
  --p: .5;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, rgb(var(--accent)) calc(var(--p) * 100%), rgb(255 255 255 / .14) 0);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / .45);
  transition: transform .15s;
}
.range:active::-webkit-slider-thumb { transform: scale(1.2); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: rgb(255 255 255 / .14); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: rgb(var(--accent)); }
.range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }

.range-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; font-size: 13px; color: var(--ink-2); }
.range-row output { font: 500 12px var(--font-mono); color: rgb(var(--ink)); }
.range-row .range { grid-column: 1 / -1; }

.switch {
  -webkit-appearance: none; appearance: none;
  width: 42px; height: 25px; flex: none;
  border-radius: 999px;
  background: rgb(255 255 255 / .16);
  position: relative; cursor: pointer;
  transition: background .25s;
}
.switch::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / .35);
  transition: transform .3s var(--spring);
}
.switch:checked { background: rgb(var(--accent)); }
.switch:checked::before { transform: translateX(17px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13.5px; padding: 6px 0; cursor: pointer; }
.toggle-row small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }

/* slider pemutar (custom) */
.slider { --v: 0; position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.slider-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .16); overflow: hidden; }
.slider-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: rgb(var(--ink)); border-radius: inherit; }
.slider:hover .slider-fill, .slider.dragging .slider-fill, .slider:focus-visible .slider-fill { background: rgb(var(--accent)); }
.slider-knob {
  position: absolute; left: calc(var(--v) * 100%); top: 50%;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .2s var(--spring);
  box-shadow: 0 2px 8px rgb(0 0 0 / .5);
}
.slider:hover .slider-knob, .slider.dragging .slider-knob, .slider:focus-visible .slider-knob { transform: translate(-50%, -50%) scale(1); }

/* ---------------------------------------------------------------- Dynamic Island */

.island {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  --iw: 120px; --ih: 35px; --ir: 18px;
}
.island[data-mode=compact] { --iw: 212px; --ih: 37px; --ir: 19px; }
.island[data-mode=compact][data-show=title] { --iw: 300px; }
.island[data-mode=compact][data-show=time] { --iw: 236px; }
.island[data-mode=lyric] { --iw: 440px; --ih: 44px; --ir: 22px; }
.island[data-mode=expanded][data-haslyric=yes] { --ih: 240px; }
.island[data-mode=peek] { --iw: 372px; --ih: 66px; --ir: 33px; }
.island[data-mode=activity] { --iw: 372px; --ih: 54px; --ir: 27px; }
.island[data-mode=expanded] { --iw: 404px; --ih: 196px; --ir: 44px; }
.island[data-mode=expanded][data-empty=yes] { --ih: 112px; --ir: 36px; }

.isl-shell {
  position: relative;
  width: min(var(--iw), calc(100vw - 20px));
  height: var(--ih);
  border-radius: var(--ir);
  background: #000;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
  transition:
    width .62s var(--spring),
    height .62s var(--spring),
    border-radius .62s var(--spring),
    box-shadow .4s;
  box-shadow: 0 12px 34px -12px rgb(0 0 0 / .8), inset 0 0 0 1px rgb(255 255 255 / .04);
}
.island[data-mode=expanded] .isl-shell { cursor: default; box-shadow: 0 30px 70px -20px rgb(0 0 0 / .85), inset 0 0 0 1px rgb(255 255 255 / .06); }
html[data-island=glass] .isl-shell {
  background: linear-gradient(160deg, rgb(30 27 25 / .62), rgb(12 11 10 / .5));
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 0 0 1px rgb(255 255 255 / .09), 0 16px 40px -14px rgb(0 0 0 / .65);
}

.isl-layer {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0;
  filter: blur(8px);
  transform: scale(.92);
  pointer-events: none;
  transition: opacity .2s, filter .25s, transform .45s var(--spring);
}
.island[data-mode=idle] .isl-idle,
.island[data-mode=compact] .isl-compact,
.island[data-mode=peek] .isl-peek,
.island[data-mode=activity] .isl-activity,
.island[data-mode=lyric] .isl-lyric,
.island[data-mode=expanded] .isl-expanded {
  opacity: 1; filter: none; transform: none; pointer-events: auto;
  transition-delay: .12s;
}
.isl-idle { justify-content: flex-end; padding-right: 15px; }
.isl-dot { width: 7px; height: 7px; border-radius: 50%; background: #1e1e1e; box-shadow: inset 0 0 0 1.5px #2d2d2d; }

.isl-cover { width: 25px; height: 25px; border-radius: 7px; object-fit: cover; background: #222; flex: none; }
.isl-compact { justify-content: space-between; gap: 10px; padding: 0 14px 0 6px; }
.isl-label { flex: 1; min-width: 0; text-align: center; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgb(255 255 255 / .88); }
.island[data-show=time] .isl-label { font: 500 12px var(--font-mono); color: rgb(var(--accent)); }
.island[data-show=viz] .isl-label, .island[data-show=lyrics] .isl-label { display: none; }
.isl-lyric { gap: 12px; padding: 0 16px 0 8px; }
.isl-lyric .isl-cover { width: 28px; height: 28px; border-radius: 8px; }
.isl-lyric-text { position: relative; flex: 1; min-width: 0; height: 22px; overflow: hidden; }
.isl-lyric-text span {
  position: absolute; inset: 0;
  text-align: center;
  font-size: 13.5px; font-weight: 600; line-height: 22px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #fff;
  animation: lyricIn .38s var(--spring) both;
}
.isl-lyric-text span.out { animation: lyricOut .3s ease forwards; }
@keyframes lyricIn { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } }
@keyframes lyricOut { to { opacity: 0; transform: translateY(-12px); filter: blur(3px); } }
.isx-lyric { display: none; text-align: center; min-height: 40px; align-content: center; gap: 2px; }
.island[data-haslyric=yes] .isx-lyric { display: grid; }
.isx-lyric .prev { font-size: 12px; color: rgb(255 255 255 / .38); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.isx-lyric .cur { font-size: 15px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island[data-empty=yes] .isx-lyric { display: none; }
.isl-bars { display: flex; align-items: center; gap: 2.5px; height: 16px; }
.isl-bars i { display: block; width: 3px; height: 100%; border-radius: 2px; background: rgb(var(--accent)); transform-origin: center; transform: scaleY(.18); }

.isl-peek { gap: 12px; padding: 0 22px 0 11px; }
.isl-peek .isl-cover { width: 44px; height: 44px; border-radius: 12px; }
.isl-meta { min-width: 0; flex: 1; display: grid; gap: 1px; }
.isl-meta b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.isl-meta span { font-size: 12.5px; color: rgb(255 255 255 / .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.isl-peek .isl-bars { height: 20px; }

.isl-activity { gap: 12px; padding: 0 20px 0 14px; }
.isl-act-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--accent) / .16); color: rgb(var(--accent)); flex: none; }
.isl-activity[data-tone=warn] .isl-act-icon { background: rgb(255 170 90 / .16); color: #ffb86b; }
.isl-act-val { font: 500 12px var(--font-mono); color: rgb(255 255 255 / .6); white-space: nowrap; }
.isl-activity .isl-meta b { font-size: 13.5px; }

.isl-expanded { flex-direction: column; align-items: stretch; padding: 18px 20px 14px; gap: 10px; }
.isx-top { display: flex; align-items: center; gap: 14px; }
.isx-art { flex: none; border-radius: 14px; overflow: hidden; }
.isx-art .isl-cover { width: 60px; height: 60px; border-radius: 14px; }
.isx-top .isl-meta b { font-size: 15.5px; }
.isx-top .isl-meta span { font-size: 13.5px; }
.isx-viz { width: 66px; height: 28px; flex: none; }
.isx-progress { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; font: 500 11px var(--font-mono); color: rgb(255 255 255 / .5); }
.isx-progress .t1 { text-align: right; }
.isx-bar { height: 5px; border-radius: 5px; background: rgb(255 255 255 / .18); overflow: hidden; cursor: pointer; }
.isx-bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); border-radius: inherit; }
.isx-ctrl { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.isx-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: background .2s, transform .15s; }
.isx-btn:hover { background: rgb(255 255 255 / .1); }
.isx-btn:active { transform: scale(.9); }
.isx-btn.sm { color: rgb(255 255 255 / .6); }
.isx-btn.on { color: rgb(var(--accent)); }
.isx-btn.play { width: 52px; height: 52px; }
.isx-empty { display: none; text-align: center; gap: 6px; padding: 10px 16px; }
.isx-empty b { font-size: 14.5px; }
.isx-empty span { font-size: 12.5px; color: rgb(255 255 255 / .55); }
.island[data-empty=yes] .isx-top, .island[data-empty=yes] .isx-progress, .island[data-empty=yes] .isx-ctrl { display: none; }
.island[data-empty=yes] .isx-empty { display: grid; }
.isl-ring { display: block; }

/* island disembunyikan (HP sudah punya Dynamic Island bawaan / dimatikan):
   hanya pemberitahuan yang muncul, sebagai pil kecil di atas player bar */
.island[data-mode=off] { display: none; }
html[data-island-hidden=yes] .island { top: auto; bottom: calc(var(--bar-h) + var(--gap) * 2 + 12px); }
@media (max-width: 860px) {
  html[data-island-hidden=yes] .island { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 64px + var(--bar-h) + 18px); }
  html[data-island-hidden=yes] .app { padding-top: calc(env(safe-area-inset-top) + 4px); }
  html[data-island-hidden=yes] .np-head { padding-top: calc(env(safe-area-inset-top) + 12px); }
}

/* ---------------------------------------------------------------- player bar */

.playerbar {
  position: fixed;
  left: calc(var(--side-w) + var(--gap) * 2);
  right: var(--gap);
  bottom: var(--gap);
  height: var(--bar-h);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(340px, 1.35fr) minmax(200px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 0 18px 0 14px;
  z-index: 50;
}
.pb-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.pb-art {
  width: 56px; height: 56px; flex: none;
  border-radius: 11px; overflow: hidden;
  background: rgb(255 255 255 / .06);
  display: grid; place-items: center; color: var(--ink-3);
  position: relative;
  box-shadow: 0 8px 20px -8px rgb(0 0 0 / .6);
}
.pb-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pb-meta { min-width: 0; display: grid; cursor: pointer; }
.pb-meta b { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-meta span { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-center { display: grid; gap: 4px; }
.pb-ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pb-play {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(var(--accent)); color: rgb(var(--accent-ink));
  transition: transform .15s, filter .2s;
  box-shadow: 0 6px 20px -6px rgb(var(--accent) / .7);
}
.pb-play:hover { filter: brightness(1.08); transform: scale(1.05); }
.pb-play:active { transform: scale(.95); }
.pb-mode { position: relative; }
.pb-mode.on::after { content: ''; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgb(var(--accent)); }
.pb-progress { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px; font: 500 11.5px var(--font-mono); color: var(--ink-3); }
.pb-t1 { text-align: right; }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.pb-vol { width: 110px; margin-left: 4px; }
.pb-mini-progress { display: none; }
.pb-like.on { color: rgb(var(--accent)); }

/* ---------------------------------------------------------------- tab bar (HP) */

.tabbar { display: none; }

/* ---------------------------------------------------------------- vinyl */

.vinyl {
  position: absolute;
  top: 5%; left: 5%; width: 90%; height: 90%;
  border-radius: 50%;
  z-index: 1;
  background:
    radial-gradient(circle, transparent 31%, rgb(255 255 255 / .03) 31.5%, transparent 32.5%),
    repeating-radial-gradient(circle, #0c0c0c 0 1.2px, #191919 1.6px 2.8px);
  box-shadow: 0 24px 60px -18px rgb(0 0 0 / .85), inset 0 0 0 1px rgb(255 255 255 / .05);
  transition: transform 1s var(--spring);
}
.vinyl::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg, transparent 0 8%, rgb(255 255 255 / .09) 13%, transparent 20% 52%, rgb(255 255 255 / .06) 58%, transparent 66%);
}
.vinyl-label {
  position: absolute; inset: 33%;
  border-radius: 50%;
  background: #2a2420 center/cover;
  animation: spin 5.5s linear infinite;
  animation-play-state: paused;
  box-shadow: 0 0 0 3px #0b0b0b;
}
.vinyl-label::after { content: ''; position: absolute; inset: 44%; border-radius: 50%; background: rgb(var(--bg)); box-shadow: inset 0 1px 2px rgb(0 0 0 / .8); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- beranda */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 30px 6px 40px;
}
.hero-art { --art: clamp(220px, 24vw, 310px); position: relative; width: var(--art); aspect-ratio: 1; flex: none; margin-right: calc(var(--art) * .3); }
.hero.playing .vinyl { transform: translateX(44%); }
.hero.playing .vinyl-label, .np.playing .vinyl-label { animation-play-state: running; }
.hero-cover {
  position: absolute; inset: 0; z-index: 2;
  border-radius: 18px; overflow: hidden;
  background: #1a1715;
  box-shadow: 0 34px 80px -24px rgb(0 0 0 / .85), 0 0 0 1px rgb(255 255 255 / .07);
  transition: transform .5s var(--spring);
}
.hero-cover:hover { transform: scale(1.015) rotate(-.4deg); }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-video { position: absolute; inset: 0; display: none; background: #000; }
.hero.is-video .hero-video { display: block; }
.hero.is-video .vinyl { display: none; }
.hero-video .media-el, .np-video .media-el { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-info { display: grid; gap: 14px; min-width: 0; padding-right: 220px; }
.hero-title {
  font: 400 clamp(56px, 7.4vw, 104px)/.9 var(--font-display);
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  margin-top: 4px;
}
.hero-title.long { font-size: clamp(46px, 5.6vw, 80px); }
.hero-title.xlong { font-size: clamp(36px, 4vw, 58px); line-height: .98; }
.hero-artist { font: italic 400 clamp(22px, 2.3vw, 32px)/1.1 var(--font-display); color: var(--ink-2); margin-top: -4px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font: 500 12px var(--font-mono); color: var(--ink-3); }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.hero-viz { position: absolute; right: 10px; bottom: 44px; width: 260px; height: 60px; pointer-events: none; }

.shelf { margin-top: 34px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 0 2px; }
.shelf-head h2 { font: 400 32px/1 var(--font-display); letter-spacing: -.01em; }
.see-all { font: 500 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); transition: color .2s; }
.see-all:hover { color: rgb(var(--accent)); }

.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 176px;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}
.scroller > * { scroll-snap-align: start; }

.tcard, .plcard { display: grid; gap: 4px; min-width: 0; text-align: left; cursor: pointer; }
.tcard b, .plcard b { font-weight: 600; font-size: 14px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard > span, .plcard > span { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-art { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #1a1715; box-shadow: 0 16px 34px -16px rgb(0 0 0 / .7); transition: transform .4s var(--spring); }
.tcard-art .cover { width: 100%; height: 100%; }
.tcard:hover .tcard-art { transform: translateY(-4px); }
.tcard-play {
  position: absolute; right: 10px; bottom: 10px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(var(--accent)); color: rgb(var(--accent-ink));
  box-shadow: 0 10px 24px -6px rgb(0 0 0 / .6);
  opacity: 0; transform: translateY(8px) scale(.9);
  transition: opacity .25s, transform .35s var(--spring);
}
.tcard:hover .tcard-play, .tcard.current .tcard-play, .tcard-play:focus-visible { opacity: 1; transform: none; }
.tcard.current b { color: rgb(var(--accent)); }
.tcard-badge { position: absolute; left: 8px; top: 8px; font: 500 9.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: rgb(0 0 0 / .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.cover { object-fit: cover; background: #1d1a17; }
.cover.ph { display: grid; place-items: center; color: var(--ink-3); }
.cover.sm { width: 44px; height: 44px; border-radius: 8px; flex: none; }
.cover.xs { width: 40px; height: 40px; border-radius: 8px; flex: none; }

.pl-art { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #1a1715; box-shadow: 0 16px 34px -16px rgb(0 0 0 / .7); transition: transform .4s var(--spring); }
.pl-art img { width: 100%; height: 100%; object-fit: cover; }
.pl-art.grid { display: grid; grid-template-columns: 1fr 1fr; }
.pl-art.empty { display: grid; place-items: center; color: var(--ink-3); background: rgb(255 255 255 / .04); border: 1px dashed rgb(255 255 255 / .16); box-shadow: none; }
.pl-art.liked { display: grid; place-items: center; color: rgb(var(--accent-ink)); background: radial-gradient(circle at 30% 20%, rgb(255 255 255 / .35), transparent 55%), linear-gradient(140deg, rgb(var(--accent)), rgb(var(--deep))); }
.plcard:hover .pl-art { transform: translateY(-4px); }
.plcard.new:hover .pl-art { border-color: rgb(var(--accent) / .6); color: rgb(var(--accent)); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rank-row {
  display: grid; grid-template-columns: 30px 44px minmax(0, 1fr) auto 36px;
  align-items: center; gap: 14px;
  padding: 8px 10px; border-radius: 12px; cursor: pointer;
  transition: background .2s;
}
.rank-row:hover { background: rgb(255 255 255 / .05); }
.rank-row.current .rank-text b { color: rgb(var(--accent)); }
.rank-n { font: 500 12px var(--font-mono); color: var(--ink-3); }
.rank-text { min-width: 0; display: grid; }
.rank-text b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-text span { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-dur { font: 500 12px var(--font-mono); color: var(--ink-3); }

.stage-teaser {
  margin-top: 34px;
  border-radius: var(--radius);
  padding: 24px;
  display: grid; gap: 22px;
  overflow: hidden;
  transition: transform .4s var(--spring);
}
.stage-teaser:hover { transform: translateY(-3px); }
.st-fan { position: relative; height: 150px; }
.st-fan img {
  position: absolute; left: 50%; top: 50%;
  width: 104px; height: 104px; border-radius: 14px; object-fit: cover;
  transform: translate(-50%, -50%) translateX(calc(var(--i) * 62px)) rotate(calc(var(--i) * 7deg)) scale(calc(1 - var(--a) * .12));
  z-index: calc(10 - var(--a) * 2);
  box-shadow: 0 16px 34px -12px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .1);
  transition: transform .6s var(--spring);
}
.stage-teaser:hover .st-fan img { transform: translate(-50%, -50%) translateX(calc(var(--i) * 74px)) rotate(calc(var(--i) * 10deg)) translateY(calc(var(--i) * var(--i) * 4px)); }
.st-copy { display: grid; gap: 8px; }
.st-copy h3 { font: 400 28px/1.05 var(--font-display); }
.st-copy p { color: var(--ink-2); font-size: 13.5px; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: rgb(var(--accent)); margin-top: 4px; }

/* onboarding */
.onboard { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 48px; align-items: center; min-height: calc(100dvh - 240px); padding: 20px 6px; }
.onboard-copy { display: grid; gap: 20px; }
.onboard h1 { font: 400 clamp(52px, 6.6vw, 96px)/.92 var(--font-display); letter-spacing: -.025em; }
.onboard h1 em { color: rgb(var(--accent)); }
.onboard p { font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 520px; }
.onboard-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.onboard-drop {
  aspect-ratio: 1; border-radius: 28px;
  border: 1.5px dashed rgb(255 255 255 / .2);
  background: rgb(255 255 255 / .025);
  display: grid; place-content: center; justify-items: center; gap: 10px;
  text-align: center;
  transition: border-color .3s, background .3s;
}
.onboard-drop:hover { border-color: rgb(var(--accent) / .6); background: rgb(var(--accent) / .04); }
.onboard-drop b { font: 400 28px var(--font-display); }
.onboard-drop small { font: 500 11px var(--font-mono); letter-spacing: .1em; color: var(--ink-3); }
.drop-stack { position: relative; width: 130px; height: 130px; margin-bottom: 14px; }
.drop-card {
  position: absolute; inset: 10px;
  border-radius: 16px;
  background: linear-gradient(150deg, #2b2420, #15110f);
  box-shadow: 0 16px 34px -12px rgb(0 0 0 / .8), inset 0 0 0 1px rgb(255 255 255 / .08);
  transition: transform .6s var(--spring);
}
.drop-card.c1 { transform: rotate(-12deg) translateX(-18px); background: linear-gradient(150deg, rgb(var(--accent) / .5), #1a1412); }
.drop-card.c2 { transform: rotate(8deg) translateX(16px); }
.drop-card.c3 { display: grid; place-items: center; color: rgb(var(--accent)); background: linear-gradient(150deg, #332b26, #1a1513); }
.onboard-drop:hover .c1, .dropzone.in .c1 { transform: rotate(-18deg) translate(-30px, -6px); }
.onboard-drop:hover .c2, .dropzone.in .c2 { transform: rotate(14deg) translate(28px, -4px); }
.onboard-drop:hover .c3, .dropzone.in .c3 { transform: translateY(-8px); }

/* ---------------------------------------------------------------- halaman & daftar lagu */

.page-head { display: grid; gap: 10px; padding: 26px 4px 22px; }
.page-head h1 { font: 400 clamp(46px, 5.4vw, 76px)/.95 var(--font-display); letter-spacing: -.02em; }
.page-head h1 em { color: rgb(var(--accent)); }
.page-sub { font: 500 12px var(--font-mono); color: var(--ink-3); letter-spacing: .02em; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-left .chips { margin-left: 8px; }
.toolbar-right { color: var(--ink-3); }
.toolbar .circle-btn { width: 40px; height: 40px; }

.thead, .trow {
  display: grid;
  grid-template-columns: 40px minmax(0, 2.4fr) minmax(0, 1.2fr) 112px 36px 56px 36px;
  align-items: center;
  gap: 12px;
}
.thead {
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  font: 500 10.5px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.thead .th-dur { text-align: right; }
.tlist { display: grid; gap: 2px; }
.trow { height: 62px; padding: 0 12px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.trow:hover, .trow:focus-visible { background: rgb(255 255 255 / .055); outline: none; }
.trow.unavailable { opacity: .45; }
.trow-num { position: relative; display: grid; place-items: center; width: 28px; height: 28px; color: var(--ink-3); font: 500 12px var(--font-mono); }
.trow-num > * { grid-area: 1 / 1; }
.trow-num .p, .trow-num .now-bars { opacity: 0; }
.trow:hover .trow-num .n { opacity: 0; }
.trow:hover .trow-num .p { opacity: 1; color: rgb(var(--ink)); }
.trow.current .trow-num .n { opacity: 0; }
.trow.current .trow-num .now-bars { opacity: 1; }
.trow.current:hover .trow-num .now-bars { opacity: 0; }
.trow-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.trow-text { display: grid; min-width: 0; }
.trow-text b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-text span { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow.current .trow-text b { color: rgb(var(--accent)); }
.trow-album { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-dur { font: 500 12px var(--font-mono); color: var(--ink-3); text-align: right; }
.trow-like { opacity: 0; }
.trow-like.on, .trow:hover .trow-like { opacity: 1; }
.trow-more { opacity: 0; }
.trow:hover .trow-more, .trow-more:focus-visible { opacity: 1; }
.tlist.sortable .trow { grid-template-columns: 20px 40px minmax(0, 2.4fr) minmax(0, 1.2fr) 112px 36px 56px 36px; padding-left: 6px; }
.trow-grip { color: var(--ink-3); cursor: grab; opacity: 0; display: grid; }
.trow:hover .trow-grip { opacity: 1; }
.trow.dragging { opacity: .4; background: rgb(var(--accent) / .08); }

.now-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.now-bars i { width: 3px; height: 100%; border-radius: 1px; background: rgb(var(--accent)); transform-origin: bottom; transform: scaleY(.3); }
body.is-playing .now-bars i { animation: eq .9s ease-in-out infinite alternate; }
body.is-playing .now-bars i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
body.is-playing .now-bars i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }
@keyframes eq { 0% { transform: scaleY(.25); } 100% { transform: scaleY(1); } }

/* ---------------------------------------------------------------- playlist */

.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px 20px; }
.pl-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: end; padding: 28px 4px 34px; }
.pl-art.xl { width: clamp(180px, 20vw, 248px); }
.pl-head-info { display: grid; gap: 12px; min-width: 0; }
.pl-head h1 { font: 400 clamp(48px, 6vw, 92px)/.92 var(--font-display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.pl-head h1.long { font-size: clamp(38px, 4.4vw, 64px); }
.pl-desc { color: var(--ink-2); max-width: 640px; }

/* ---------------------------------------------------------------- kosong */

.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 64px 20px; }
.empty-disc { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); background: repeating-radial-gradient(circle, rgb(255 255 255 / .04) 0 1px, transparent 1.5px 4px); border: 1px solid var(--line); margin-bottom: 6px; }
.empty h3 { font: 400 30px var(--font-display); }
.empty p { color: var(--ink-2); max-width: 420px; }
.empty-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------------- layar Sedang diputar */

.np {
  position: fixed; inset: 0; z-index: 100;
  background: rgb(var(--bg));
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  transform: translateY(102%);
  transition: transform .55s var(--spring);
  overflow: hidden;
}
.np.in { transform: none; }
.np-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.np-bg-img { position: absolute; inset: 0; opacity: .9; transition: background 1s; }
.np-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, transparent, rgb(var(--bg) / .7) 85%); }
.np-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 18px 24px 0; padding-top: max(18px, env(safe-area-inset-top)); }
.np-context { display: grid; gap: 4px; flex: 1; min-width: 0; max-width: calc(50vw - 230px); }
.np-context b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-tabs { display: none; }
.np-body {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 340px;
  gap: 44px;
  padding: 24px 32px 32px 48px;
  min-height: 0;
  align-items: center;
}
.np-stage { display: grid; place-items: center start; }
.np-art { position: relative; width: min(46vh, 27vw); aspect-ratio: 1; }
.np.playing .vinyl { transform: translateX(27%); }
.np-cover { position: absolute; inset: 0; z-index: 2; border-radius: 20px; overflow: hidden; background: #111; box-shadow: 0 50px 100px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .08); }
.np-cover img { width: 100%; height: 100%; object-fit: cover; }
.np-video { position: absolute; inset: 0; display: none; background: #000; }
.np.is-video .np-art { width: min(64vh, 40vw); aspect-ratio: 16 / 10; }
.np.is-video .np-video { display: block; }
.np.is-video .np-video .media-el { object-fit: contain; }
.np.is-video .vinyl { display: none; }
.np-info { display: grid; gap: 16px; min-width: 0; align-content: center; }
.np-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.np-title { font: 400 clamp(48px, 5.4vw, 88px)/.92 var(--font-display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.np-title.long { font-size: clamp(36px, 3.8vw, 60px); }
.np-artist { font: italic 400 clamp(22px, 2vw, 30px) var(--font-display); color: var(--ink-2); margin-top: -6px; }
.np-progress { margin-top: 14px; }
.np-times { display: flex; justify-content: space-between; font: 500 12px var(--font-mono); color: var(--ink-3); margin-top: 4px; }
.np-ctrl { display: flex; align-items: center; justify-content: space-between; max-width: 420px; }
.np-play { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--accent)); color: rgb(var(--accent-ink)); box-shadow: 0 16px 40px -10px rgb(var(--accent) / .7); transition: transform .2s var(--spring); }
.np-play:hover { transform: scale(1.05); }
.np-play:active { transform: scale(.94); }
.np-foot { display: flex; align-items: center; gap: 14px; max-width: 420px; }
.np-foot .icon-btn.on { color: rgb(var(--accent)); }
.np-vol { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.np-vol .slider { flex: 1; }
.np-viz { width: 100%; max-width: 420px; height: 40px; opacity: .8; }
.np-queue { align-self: stretch; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); padding-left: 24px; }
.np-side-tabs { align-self: flex-start; margin: 4px 0 14px; }
.np-pane { display: none; flex-direction: column; min-height: 0; flex: 1; }
.np:not([data-pane=lyrics]) .np-pane-queue, .np[data-pane=lyrics] .np-pane-lyrics { display: flex; }
.np-ly { overflow-y: auto; flex: 1; padding: 8px 4px 40vh; scrollbar-width: none; mask-image: linear-gradient(transparent, #000 10%, #000 78%, transparent); }
.ly-line {
  font: 400 26px/1.25 var(--font-display);
  color: rgb(var(--ink) / .32);
  padding: 6px 8px; margin: 0 0 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: color .35s, transform .45s var(--spring), background .2s;
  transform-origin: left center;
}
.ly-line:hover { background: rgb(255 255 255 / .05); color: rgb(var(--ink) / .6); }
.ly-line.past { color: rgb(var(--ink) / .5); }
.ly-line.on { color: rgb(var(--ink)); transform: scale(1.04); }
.ly-line.gap { font-family: var(--font-ui); font-size: 18px; }
.ly-line.static { cursor: default; color: rgb(var(--ink) / .8); font-size: 22px; }
.ly-line.static:hover { background: none; }
.ly-note { display: flex; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: rgb(var(--accent) / .08); font-size: 13px; color: var(--ink-2); }
.ly-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 4px 0; }
.ly-foot small { font: 500 11px var(--font-mono); color: var(--ink-3); }
.ly-empty { display: grid; justify-items: start; gap: 10px; padding: 26px 8px; }
.ly-empty-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: rgb(var(--accent)); background: rgb(var(--accent) / .1); }
.ly-empty b { font: 400 26px var(--font-display); }
.ly-empty p { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.np-q-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 6px 12px; }
.np-q-head small { font: 500 11px var(--font-mono); color: var(--ink-3); }
.np-q-list { overflow-y: auto; display: grid; gap: 2px; align-content: start; scrollbar-width: thin; }
.qrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.qrow:hover { background: rgb(255 255 255 / .06); }
.qrow.current { background: rgb(var(--accent) / .1); cursor: default; }
.qrow.current b { color: rgb(var(--accent)); }
.qrow-text { display: grid; min-width: 0; }
.qrow-text b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow-text span { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow-dur { font: 500 11.5px var(--font-mono); color: var(--ink-3); }
.q-empty { padding: 10px 8px; }

.media-host { position: fixed; width: 2px; height: 2px; left: -10px; top: -10px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- laci pengaturan */

.drawer {
  position: fixed;
  top: var(--gap); right: var(--gap); bottom: var(--gap);
  width: min(420px, calc(100vw - var(--gap) * 2));
  border-radius: var(--radius);
  z-index: 95;
  display: flex; flex-direction: column;
  transform: translateX(calc(100% + 30px));
  transition: transform .5s var(--spring);
  background-color: rgb(20 18 16 / .55);
}
.drawer.in { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 400 30px/1.1 var(--font-display); margin-top: 6px; }
.drawer-body { overflow-y: auto; padding: 8px 22px 22px; scrollbar-width: thin; }
.dsec { display: grid; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.dsec:last-of-type { border-bottom: 0; }
.drawer-foot { padding-top: 6px; }

.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px; border-radius: 12px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); font-size: 13px; font-weight: 500; text-align: left; transition: border-color .2s, background .2s; }
.preset:hover { background: rgb(255 255 255 / .08); }
.preset.on { border-color: rgb(var(--accent) / .7); background: rgb(var(--accent) / .1); }
.preset-dot { width: 16px; height: 16px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff8, transparent 60%), var(--c); }
.preset-dot.auto { background: conic-gradient(#e8b58c, #aaa5f6, #9fd8dd, #f2b53c, #e8b58c); }

.glass-preview { position: relative; height: 120px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: #0f0d0c; margin-bottom: 6px; }
.gp-blobs i { position: absolute; border-radius: 50%; filter: blur(2px); }
.gp-blobs i:nth-child(1) { width: 110px; height: 110px; left: 12%; top: -20%; background: rgb(var(--accent)); }
.gp-blobs i:nth-child(2) { width: 90px; height: 90px; right: 14%; bottom: -26%; background: #6b7fd6; }
.gp-blobs i:nth-child(3) { width: 50px; height: 50px; left: 46%; top: 40%; background: #e5e0d8; }
.gp-card { width: 72%; padding: 16px 18px; border-radius: var(--radius); display: grid; gap: 2px; }
.gp-card b { font-size: 14px; }
.gp-card span { font-size: 12px; color: var(--ink-2); }

.accent-row { display: flex; gap: 10px; align-items: center; }
.accent-row .seg { flex: 1; }

.conn { display: grid; gap: 12px; }
.conn-row { display: grid; grid-template-columns: 10px 1fr; gap: 12px; align-items: start; }
.conn-row i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: #777; }
.conn-row.ok i { background: #8fdcaa; box-shadow: 0 0 10px #8fdcaa; }
.conn-row.half i { background: #e9c26c; }
.conn-row.off i { background: #ef8a76; }
.conn-row div { display: grid; gap: 2px; }
.conn-row b { font-weight: 500; font-size: 13.5px; }
.conn-row span { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.conn .btn { justify-self: start; }

.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 13px; }
.keys dt { text-align: right; }
.keys dd { margin: 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- modal & menu */

.modal-wrap {
  position: fixed; inset: 0; z-index: 110;
  display: grid; place-items: center;
  padding: 16px;
  background: rgb(0 0 0 / .45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadeIn .2s;
}
.modal-wrap.out { animation: fadeOut .2s forwards; }
.modal {
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column;
  border-radius: calc(var(--radius) + 4px);
  background-color: rgb(24 21 19 / .72);
  animation: popIn .4s var(--spring);
  overflow: hidden;
}
.modal.wide { width: min(600px, 100%); }
.modal-wrap.out .modal { animation: popOut .2s forwards; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 6px 24px; }
.modal-head h2 { font: 400 28px var(--font-display); }
.modal-body { padding: 10px 24px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 20px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }
@keyframes popOut { to { opacity: 0; transform: scale(.97); } }

.menu {
  position: fixed; z-index: 115;
  min-width: 230px;
  padding: 6px;
  border-radius: 16px;
  background-color: rgb(28 25 22 / .78);
  display: grid; gap: 1px;
  animation: popIn .25s var(--spring);
  transform-origin: top right;
}
.menu-item {
  position: relative;
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 11px; align-items: center;
  height: 38px; padding: 0 10px; border-radius: 10px;
  min-width: 0;
  text-align: left; font-size: 13.5px;
  color: rgb(var(--ink));
}
.menu-item .ic { color: var(--ink-2); }
.menu-item:hover:not(:disabled), .menu-sub-holder.open > .menu-item { background: rgb(255 255 255 / .08); }
.menu-item.danger { color: #ffb3a8; }
.menu-item.danger .ic { color: #ffb3a8; }
.menu-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-gap { width: 17px; }
.menu-chev { color: var(--ink-3); transition: transform .2s; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 8px; }

/* submenu: sisi kanan, pindah ke kiri kalau mentok (.left), atau terbuka di dalam menu di layar sempit (.inline) */
.menu-sub-holder { position: relative; display: grid; }
.menu.sub {
  position: absolute; left: calc(100% + 6px); top: -6px;
  display: none;
  min-width: 200px; max-width: 280px;
  max-height: min(320px, calc(100dvh - 24px));
  overflow-x: hidden; overflow-y: auto;
  animation: popIn .2s var(--spring);
  transform-origin: top left;
}
.menu.sub.left { left: auto; right: calc(100% + 6px); transform-origin: top right; }
/* garis kilau tepi tetap di dalam kotak, supaya tidak memicu scrollbar */
.menu::after { inset: 0 !important; }
.menu.sub { scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .2) transparent; }
.menu-sub-holder.open > .menu.sub { display: grid; }
.menu-sub-holder.open > .menu-item .menu-chev { transform: translateX(2px); }
.menu.sub.inline {
  position: static;
  min-width: 0; max-width: none;
  margin: 2px 0 4px 22px;
  padding: 4px;
  border-radius: 12px;
  background: rgb(255 255 255 / .04);
  box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  animation: none;
}
.menu.sub.inline::after { display: none; }
.menu-sub-holder.open > .menu.sub.inline + * { margin-top: 2px; }
.menu-sub-holder.open:has(> .menu.sub.inline) > .menu-item .menu-chev { transform: rotate(90deg); }

/* modal link */
.link-modal { display: grid; gap: 14px; }
.link-preview:empty { display: none; }
.lp-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px; border-radius: 16px; background: rgb(0 0 0 / .25); border: 1px solid var(--line); }
.lp-thumb { width: 96px; aspect-ratio: 1; border-radius: 11px; object-fit: cover; background: rgb(255 255 255 / .06); }
.lp-meta { display: grid; gap: 4px; min-width: 0; }
.lp-input {
  width: 100%; min-width: 0;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  padding: 2px 6px; margin-left: -7px;
  outline: none; transition: border-color .2s, background .2s;
}
.lp-input:hover { border-color: var(--line-2); }
.lp-input:focus { border-color: rgb(var(--accent) / .6); background: rgb(0 0 0 / .25); }
.lp-input.title { font: 400 24px/1.15 var(--font-display); }
.lp-input.artist { font-size: 13.5px; color: var(--ink-2); }
.lp-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.link-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-actions.end { justify-content: flex-end; }
.lp-meta b { font: 400 24px/1.1 var(--font-display); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-meta > span:last-child { color: var(--ink-2); font-size: 13px; }
.lp-empty { padding: 14px; border-radius: 14px; background: rgb(255 255 255 / .04); color: var(--ink-2); font-size: 13px; }
.shimmer, .shimmer-line { background: linear-gradient(90deg, rgb(255 255 255 / .05), rgb(255 255 255 / .12), rgb(255 255 255 / .05)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.shimmer-line { display: block; height: 14px; border-radius: 6px; width: 70%; }
.shimmer-line.short { width: 40%; height: 11px; margin-top: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.link-choices { display: grid; gap: 12px; }
.link-choices:empty { display: none; }
.link-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; display: grid; gap: 10px; }
.link-note:empty { display: none; }
.info-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgb(var(--accent) / .08); border: 1px solid rgb(var(--accent) / .22); color: rgb(var(--ink)); }
.info-box .ic { flex: none; margin-top: 1px; color: rgb(var(--accent)); }
.info-box.warn { background: rgb(233 194 108 / .08); border-color: rgb(233 194 108 / .2); color: #f0dcae; }
.info-box.warn .ic { color: #f0dcae; }
.link-note a { color: rgb(var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
.warn-box { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: rgb(233 194 108 / .08); border: 1px solid rgb(233 194 108 / .2); color: #f0dcae; }
.warn-box .ic { flex: none; margin-top: 1px; }

/* edit info */
.edit-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: start; }
.edit-cover-box { position: relative; width: 150px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: block; }
.edit-cover { width: 100%; height: 100%; border-radius: 14px; }
.edit-cover-hint { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; background: rgb(0 0 0 / .5); opacity: 0; transition: opacity .2s; }
.edit-cover-box:hover .edit-cover-hint { opacity: 1; }
.edit-fields { display: grid; gap: 12px; }

/* ---------------------------------------------------------------- dropzone */

.dropzone {
  position: fixed; inset: 0; z-index: 130;
  display: grid; place-items: center;
  background: rgb(var(--bg) / .55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.dropzone.in { opacity: 1; }
.dropzone::before { content: ''; position: absolute; inset: 18px; border-radius: 28px; border: 2px dashed rgb(var(--accent) / .55); }
.dz-card { display: grid; justify-items: center; gap: 8px; text-align: center; }
.dz-card b { font: 400 40px var(--font-display); }
.dz-card small { font: 500 12px var(--font-mono); color: var(--ink-2); letter-spacing: .06em; }

/* ---------------------------------------------------------------- dok streaming */

.dock {
  position: fixed;
  right: calc(var(--gap) * 2);
  bottom: calc(var(--bar-h) + var(--gap) * 2 + 4px);
  width: 360px;
  border-radius: 18px;
  z-index: 60;
  overflow: hidden;
  animation: popIn .4s var(--spring);
  background-color: rgb(20 18 16 / .72);
  box-shadow: 0 30px 70px -20px rgb(0 0 0 / .75), inset 0 1px 0 rgb(255 255 255 / .1);
  transition: width .35s var(--spring), box-shadow .2s;
}
.dock[data-size=lg] { width: min(560px, calc(100vw - 32px)); }
.dock.dragging { transition: none; box-shadow: 0 40px 90px -20px rgb(0 0 0 / .85), 0 0 0 1px rgb(var(--accent) / .45); }
.dock-head {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 6px 0 14px;
  cursor: grab; user-select: none; touch-action: none;
}
.dock.dragging .dock-head { cursor: grabbing; }
.dock-src { display: inline-flex; gap: 6px; align-items: center; font: 600 12px var(--font-ui); flex: none; color: var(--ink-2); }
.dock-src .ic { color: rgb(var(--accent)); }
.dock-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-actions { display: flex; gap: 2px; flex: none; }
.dock-btn { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; }
.dock-btn:hover { background: rgb(255 255 255 / .1); color: rgb(var(--ink)); }
.dock-btn.dock-close:hover { background: rgb(255 90 70 / .18); color: #ffb3a8; }
.dock-btn.dock-save { color: rgb(var(--accent)); }
.dock-yt { display: none; aspect-ratio: 16 / 9; background: #000; }
.dock-yt iframe, .dock-yt > div { width: 100%; height: 100%; display: block; border: 0; }
.dock-sp { display: none; padding: 0 8px 8px; }
.dock-sp iframe { border-radius: 12px; display: block; }
.dock[data-kind=youtube] .dock-yt { display: block; }
.dock[data-kind=spotify] .dock-sp { display: block; }
.dock-btn.dock-collapse { color: rgb(var(--ink)); }

/* diciutkan: video mungil di kiri, judul + tombol di kanan */
.dock[data-collapsed] { width: 360px; }
.dock[data-collapsed] .dock-size { display: none; }
.dock[data-collapsed][data-kind=youtube] .dock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name actions" "src actions";
  align-content: center;
  column-gap: 8px; row-gap: 2px;
  height: 62px;
  padding: 0 6px 0 104px;
}
.dock[data-collapsed][data-kind=youtube] .dock-name { grid-area: name; font-size: 13px; font-weight: 600; }
.dock[data-collapsed][data-kind=youtube] .dock-src { grid-area: src; font-size: 11px; }
.dock[data-collapsed][data-kind=youtube] .dock-actions { grid-area: actions; }
.dock[data-collapsed][data-kind=youtube] .dock-body {
  position: absolute; left: 9px; top: 8px;
  width: 82px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 6px 14px -6px rgb(0 0 0 / .6);
}

/* ==========================================================================
   PANGGUNG
   ========================================================================== */

.view[data-view=panggung] { padding-bottom: calc(var(--bar-h) + 28px); }
.stage-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  height: calc(100dvh - 64px - var(--gap) * 2 - var(--bar-h) - 40px);
  min-height: 560px;
  max-width: none;
}
.stage-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.stage-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 6px 4px 14px; }
.stage-top h1 { font: 400 44px/1 var(--font-display); letter-spacing: -.02em; margin-top: 6px; }
.stage-top h1 em { color: rgb(var(--accent)); }
.stage-wrap { flex: 1; min-height: 0; display: grid; place-items: center; }
.stage-wrap:fullscreen { background: #000; }

.stage-panel { border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ptabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); flex: none; }
.ptab { display: grid; justify-items: center; gap: 4px; padding: 13px 2px 11px; font-size: 11px; font-weight: 500; color: var(--ink-3); position: relative; transition: color .2s; }
.ptab:hover { color: var(--ink-2); }
.ptab.on { color: rgb(var(--ink)); }
.ptab.on::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 2px; border-radius: 2px; background: rgb(var(--accent)); }
.pbody { overflow-y: auto; padding: 4px 18px 18px; flex: 1; scrollbar-width: thin; }
.pgroup { display: grid; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pgroup:last-child { border-bottom: 0; }

.layout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.layout-opt { display: grid; justify-items: center; gap: 8px; padding: 14px 8px 10px; border-radius: 14px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 500; transition: border-color .2s, background .2s, color .2s; }
.layout-opt svg { width: 50px; height: 46px; }
.tip-row { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 12px 14px; margin-top: 14px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }
.tip-row > span { color: rgb(var(--accent)); display: grid; margin-top: 1px; }
.tip-row b { color: rgb(var(--ink)); font-weight: 600; }
.link-btn { color: rgb(var(--accent)); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sel-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgb(var(--accent) / .08); border: 1px solid rgb(var(--accent) / .25); }
.sel-card img, .sel-card .sel-ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.arrange-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.arrange-opt { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s, border-color .2s; }
.arrange-opt:hover { background: rgb(255 255 255 / .08); color: rgb(var(--ink)); border-color: rgb(var(--accent) / .45); }
.chip-btn.danger { color: #ffb3a8; }
.chip-btn.danger:hover { background: rgb(255 90 70 / .14); }
.layout-opt:hover { background: rgb(255 255 255 / .07); color: rgb(var(--ink)); }
.layout-opt.on { border-color: rgb(var(--accent) / .75); background: rgb(var(--accent) / .09); color: rgb(var(--ink)); }
.layout-opt.on svg { color: rgb(var(--accent)); }

.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.swatch { position: relative; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 28%, var(--a), var(--b) 52%, var(--c)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); transition: transform .2s var(--spring); cursor: pointer; }
.swatch:hover { transform: scale(1.06); }
.swatch.on { outline: 2px solid rgb(var(--accent)); outline-offset: 3px; }
.swatch.custom { background: rgb(255 255 255 / .05); border: 1px dashed rgb(255 255 255 / .3); display: grid; place-items: center; color: var(--ink-2); box-shadow: none; }
.swatch.custom.sm { width: 34px; height: 34px; flex: none; background: radial-gradient(circle at 38% 28%, var(--a), var(--b) 52%, var(--c)); border-style: solid; }
.color-in { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.sel-list { display: grid; gap: 2px; }
.sel-row, .pick-row { display: grid; grid-template-columns: 16px 36px minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 10px; text-align: left; }
.pick-row { grid-template-columns: 36px minmax(0, 1fr) 26px; width: 100%; }
.pick-row:hover:not(:disabled) { background: rgb(255 255 255 / .06); }
.sel-n { font: 500 11px var(--font-mono); color: var(--ink-3); }
.sel-row img, .pick-row img, .sel-ph { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; background: rgb(255 255 255 / .06); }
.sel-text { display: grid; min-width: 0; }
.sel-text b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-text span { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--ink-2); }
.pick-row.on .pick-mark { background: rgb(var(--accent)); border-color: transparent; color: rgb(var(--accent-ink)); }
.lib-pick { display: grid; gap: 2px; max-height: 340px; overflow-y: auto; scrollbar-width: thin; }

/* ---------------------------------------------------------------- frame poster */

.stage-frame {
  --u: 1cqmin;
  position: relative;
  container-type: size;
  overflow: hidden;
  border-radius: 22px;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  color: #fff;
  box-shadow: 0 50px 110px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .07);
  font-family: var(--font-ui);
  --ink-s: #fff;
}
.stage-frame[data-ink=dark] { --ink-s: #1a1613; }
.stage-wrap:fullscreen .stage-frame { border-radius: 0; box-shadow: none; }

.sf-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(115% 70% at 50% 26%, var(--bg-light) 0%, transparent 64%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg-base) 60%, color-mix(in srgb, var(--bg-base) 62%, var(--bg-deep)) 100%);
  background-size: cover; background-position: center;
}
.sf-spot { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(46% 34% at 50% 32%, rgb(255 255 255 / calc(var(--spot) * .5)), transparent 72%); mix-blend-mode: soft-light; }
.sf-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 32%; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, transparent, rgb(0 0 0 / .2)); }
.stage-frame.shadow .sf-floor::after {
  content: ''; position: absolute; left: 50%; bottom: 1.2cqh;
  width: calc(46cqw * var(--ph-scale)); height: 5cqh;
  transform: translateX(calc(-50% + var(--ph-x) * 1cqw));
  background: radial-gradient(closest-side, rgb(0 0 0 / .5), transparent);
}
.stage-frame[data-photo=cover] .sf-floor, .stage-frame[data-layout=wall] .sf-floor { height: 55%; background: linear-gradient(to bottom, transparent, rgb(0 0 0 / .55)); }
.stage-frame[data-photo=cover] .sf-floor::after, .stage-frame[data-layout=wall] .sf-floor::after { display: none; }

.sf-photo-cover {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: calc(50% - var(--ph-x) * 1%) calc(50% - var(--ph-y) * 1%);
  transform: scale(var(--ph-scale));
  cursor: grab;
}
.stage-frame[data-layout=wall] .sf-photo-cover { filter: grayscale(.85) brightness(.55) contrast(1.1); }

/* Orang yang sudah dipisahkan dari foto latar: posisinya sama persis dengan foto,
   tapi berada di atas kartu yang "di belakang orang". */
.sf-photo-person {
  position: absolute; inset: 0; z-index: 5;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: calc(50% - var(--ph-x) * 1%) calc(50% - var(--ph-y) * 1%);
  transform: scale(var(--ph-scale));
  pointer-events: none;
}
.stage-frame[data-layout=wall] .sf-photo-person { filter: grayscale(.85) brightness(.55) contrast(1.1); }
.stage-frame.mono .sf-photo-person { filter: grayscale(1) contrast(1.06); }
/* "Orang selalu di depan kartu": semua kartu turun ke bawah lapisan orang */
.stage-frame.protect .carousel .scard { z-index: calc(4 - var(--a)); }
.stage-frame.protect .float-field .scard.mid,
.stage-frame.protect .float-field .scard.near { z-index: 4; }
.stage-frame.protect .free-layer.front { z-index: 4; }
.stage-frame.protect .sf-bar { z-index: 4; }
.stage-frame.mono .sf-photo-cover, .stage-frame.mono .sf-person:not(.ph) { filter: grayscale(1) contrast(1.06); }

.sf-person {
  position: absolute; left: 50%; bottom: 0;
  height: calc(62cqh * var(--ph-scale));
  max-width: none;
  transform: translate(calc(-50% + var(--ph-x) * 1cqw), calc(var(--ph-y) * 1cqh));
  z-index: 8;
  cursor: grab;
  filter: drop-shadow(0 2cqmin 3cqmin rgb(0 0 0 / .28));
}
.stage-frame[data-front=no] .sf-person { z-index: 3; }
.stage-frame.moving .sf-person, .stage-frame.moving .sf-photo-cover { cursor: grabbing; }
.sf-person.ph {
  width: 40cqmin; height: calc(44cqh * var(--ph-scale));
  border-radius: 20cqmin 20cqmin 0 0;
  border: 2px dashed rgb(255 255 255 / .45);
  border-bottom: 0;
  background: rgb(255 255 255 / .06);
  display: grid; place-content: center; justify-items: center; gap: 1cqmin;
  color: var(--ink-s);
  filter: none;
  cursor: pointer;
  text-align: center;
  font-size: 2.6cqmin;
}
.sf-person.ph svg { width: 8cqmin; height: 8cqmin; opacity: .8; }
.sf-person.ph b { font-weight: 600; }
.sf-person.ph small { font-size: 2cqmin; opacity: .7; }
.stage-wrap:fullscreen .sf-person.ph, .stage-wrap:fullscreen .sf-cover-hint { display: none; }
.sf-cover-hint { position: absolute; left: 50%; bottom: 14cqh; transform: translateX(-50%); z-index: 9; display: inline-flex; gap: 1.4cqmin; align-items: center; padding: 1.6cqmin 3cqmin; border-radius: 999px; background: rgb(0 0 0 / .35); border: 1px dashed rgb(255 255 255 / .45); font-size: 2.4cqmin; font-weight: 600; }

.sf-heading {
  position: absolute; left: 0; right: 0; top: 5.5cqh; z-index: 6;
  display: flex; justify-content: center; align-items: center; gap: 1.6cqmin;
  color: var(--ink-s);
  font: 400 6.2cqmin/1 var(--font-display);
  letter-spacing: -.01em;
  pointer-events: none;
}
.sf-heading::before {
  content: ''; width: 4.4cqmin; height: 4.4cqmin; border-radius: 50%; flex: none;
  background: radial-gradient(circle, currentColor 0 18%, transparent 19% 34%, currentColor 35% 38%, transparent 39% 52%, currentColor 53% 100%);
  opacity: .9;
}
.stage-frame[data-font=sans] .sf-heading { font: 700 4.8cqmin/1 var(--font-ui); letter-spacing: -.035em; }
.stage-frame[data-font=mono] .sf-heading { font: 500 3cqmin/1 var(--font-mono); letter-spacing: .24em; text-transform: uppercase; }

.sf-caption {
  position: absolute; left: 8cqw; right: 8cqw; z-index: 6;
  top: calc(12cqh + 54cqmin);
  text-align: center;
  color: var(--ink-s);
  font: 400 3.1cqmin/1.35 var(--font-ui);
  opacity: .88;
  pointer-events: none;
  text-wrap: balance;
}
.sf-footer {
  position: absolute; left: 0; right: 0; bottom: 2.6cqh; z-index: 9;
  text-align: center;
  color: var(--ink-s);
  font: 400 2cqmin/1 var(--font-ui);
  letter-spacing: .02em;
  opacity: .62;
  pointer-events: none;
}
.sf-scene { position: absolute; inset: 0; }

/* ---------------------------------------------------------------- kartu lagu */

.scard { position: absolute; color: #fff; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.scard .sc-art { overflow: hidden; background: rgb(0 0 0 / .25); flex: none; }
.scard .sc-art img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.scard .sc-text { min-width: 0; display: grid; position: relative; }
.scard .sc-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.scard .sc-text span { opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-bar { height: .8cqmin; border-radius: 1cqmin; position: relative; overflow: hidden; background: rgb(255 255 255 / .28); }
.sc-bar i { --p: 0; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); background: currentColor; border-radius: inherit; }
.sc-times { display: flex; justify-content: space-between; font: 500 1.8cqmin/1 var(--font-mono); opacity: .75; margin-top: 1cqmin; }
.sc-ctrl { display: flex; justify-content: center; align-items: center; gap: 7cqmin; }
.sc-ctrl svg { width: 3.8cqmin; height: 3.8cqmin; }
.sc-pp svg { width: 5cqmin; height: 5cqmin; }
.sc-pp, .sc-ic { display: grid; }
.scard.current { box-shadow: 0 0 0 .4cqmin rgb(255 255 255 / .55), 0 3cqmin 7cqmin -2cqmin rgb(0 0 0 / .45) !important; }
.scard.ghost { cursor: pointer; }
.scard.ghost .sc-art { display: grid; place-items: center; color: rgb(255 255 255 / .7); background: rgb(255 255 255 / .1); border: 1px dashed rgb(255 255 255 / .4); }
.scard.ghost .sc-art svg { width: 6cqmin; height: 6cqmin; }

/* gaya kartu */
.stage-frame[data-card=glass] .scard {
  background: linear-gradient(155deg, rgb(255 255 255 / .3), rgb(255 255 255 / .1) 60%, rgb(255 255 255 / .16));
  -webkit-backdrop-filter: blur(2.4cqmin) saturate(1.5);
  backdrop-filter: blur(2.4cqmin) saturate(1.5);
  border: 1px solid rgb(255 255 255 / .38);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), 0 3cqmin 7cqmin -2cqmin rgb(0 0 0 / .35);
}
.stage-frame[data-card=dark] .scard {
  background: linear-gradient(180deg, #211e1c, #0f0e0d);
  border: 1px solid rgb(255 255 255 / .07);
  box-shadow: 0 4cqmin 9cqmin -2cqmin rgb(0 0 0 / .7), inset 0 1px 0 rgb(255 255 255 / .06);
}
.stage-frame[data-card=light] .scard {
  color: #1c1814;
  background: linear-gradient(155deg, rgb(255 253 250 / .86), rgb(243 238 232 / .7));
  -webkit-backdrop-filter: blur(2.4cqmin) saturate(1.3);
  backdrop-filter: blur(2.4cqmin) saturate(1.3);
  border: 1px solid rgb(255 255 255 / .8);
  box-shadow: 0 3cqmin 7cqmin -2cqmin rgb(0 0 0 / .28);
}
.stage-frame[data-card=light] .sc-bar { background: rgb(0 0 0 / .14); }
.stage-frame[data-card=light] .scard.current { box-shadow: 0 0 0 .4cqmin rgb(0 0 0 / .35), 0 3cqmin 7cqmin -2cqmin rgb(0 0 0 / .3) !important; }
.stage-frame[data-card=tint] .scard {
  background: linear-gradient(155deg, color-mix(in srgb, rgb(var(--tc, 120 100 90)) 70%, #000 30%), color-mix(in srgb, rgb(var(--tc, 120 100 90)) 45%, #000 55%));
  border: 1px solid rgb(255 255 255 / .22);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 3cqmin 7cqmin -2cqmin rgb(0 0 0 / .45);
}

/* bentuk: tile (karusel) */
.scard.tile {
  left: 50%; top: 0;
  width: 36cqmin;
  padding: 1.8cqmin 1.8cqmin 2.4cqmin;
  border-radius: 3.4cqmin;
  display: flex; flex-direction: column; gap: 1.8cqmin;
  transform:
    translateX(-50%)
    translateX(calc(var(--off) * 25cqmin))
    translateY(calc(var(--a) * 3.6cqmin))
    perspective(90cqmin) rotateY(calc(var(--off) * -9deg))
    scale(calc(1 - var(--a) * .15));
  z-index: calc(6 - var(--a));
  filter: brightness(calc(1 - var(--a) * .1));
  transition: transform .8s var(--spring), filter .5s, opacity .4s;
}
.scard.tile.out { opacity: 0; pointer-events: none; }
.stage-frame[data-layout=carousel] .sf-person { height: calc(52cqh * var(--ph-scale)); }
.scard.tile .sc-art { aspect-ratio: 1; border-radius: 2.2cqmin; }
.scard.tile .sc-text { text-align: center; padding: 0 1cqmin; }
.scard.tile .sc-text b { font-size: 3.3cqmin; }
.scard.tile .sc-text span { font-size: 2.3cqmin; margin-top: .3cqmin; }
.carousel { position: absolute; left: 0; right: 0; top: 12cqh; height: 54cqmin; }

/* bentuk: widget (orbit & melayang) */
.scard.widget {
  width: 42cqmin;
  padding: 2.2cqmin 2.6cqmin 1.9cqmin;
  border-radius: 3.6cqmin;
  display: grid;
  grid-template-columns: 10cqmin minmax(0, 1fr);
  column-gap: 2.4cqmin;
  row-gap: 1.6cqmin;
}
.scard.widget .sc-art { width: 10cqmin; height: 10cqmin; border-radius: 1.6cqmin; }
.scard.widget .sc-text { align-self: center; padding-right: 4cqmin; }
.scard.widget .sc-text b { font-size: 3.2cqmin; }
.scard.widget .sc-text span { font-size: 2.4cqmin; }
.scard.widget .sc-note { position: absolute; right: 0; top: 0; opacity: .85; }
.scard.widget .sc-note svg { width: 3cqmin; height: 3cqmin; }
.scard.widget .sc-prog, .scard.widget .sc-ctrl { grid-column: 1 / -1; }

.orbit { position: absolute; inset: 0; transform-style: preserve-3d; z-index: 4; }
.stage-frame[data-layout=orbit] .sf-scene { perspective: 160cqmin; perspective-origin: 50% 38%; }
.orbit .scard { left: 50%; top: 47%; transition: none; will-change: transform; width: 46cqmin; }
.orbit .sf-person { transform: translate(calc(-50% + var(--ph-x) * 1cqw), calc(var(--ph-y) * 1cqh)) translateZ(0); height: calc(70cqh * var(--ph-scale)); }
.stage-frame[data-layout=orbit] .sf-caption, .stage-frame[data-layout=float] .sf-caption { top: auto; bottom: 7.5cqh; z-index: 10; text-shadow: 0 1px 12px rgb(0 0 0 / .35); }

.float-field { position: absolute; inset: 0; }
.float-field .scard {
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--d));
  animation: bob var(--bob) ease-in-out var(--delay) infinite alternate;
  transition: filter .4s, opacity .4s;
}
.float-field .scard.far { z-index: 2; filter: blur(.55cqmin); opacity: .6; }
.float-field .scard.mid { z-index: 5; }
.float-field .scard.near { z-index: 9; filter: blur(.28cqmin); }
.float-field .scard:hover { filter: none; opacity: 1; }
.float-field .sf-person { height: calc(68cqh * var(--ph-scale)); }
@keyframes bob { from { translate: 0 -1.1cqmin; } to { translate: 0 1.3cqmin; } }

/* bentuk: player (dinding) */
.wall {
  position: absolute; left: 50%; top: 54%;
  width: 96cqmin;
  display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 5cqmin 4.5cqmin;
  transform: translate(-50%, -50%) perspective(150cqmin) rotateX(9deg) rotateY(-26deg) rotateZ(4deg);
  z-index: 4;
}
.scard.player {
  position: relative;
  width: 100%;
  padding: 2.6cqmin 2.6cqmin 2.2cqmin;
  border-radius: 3.6cqmin;
  display: grid; gap: 1.8cqmin;
  translate: 0 calc(var(--col) * 14cqmin);
}
.scard.player .sc-art { aspect-ratio: 1; border-radius: 2.2cqmin; }
.scard.player .sc-text b { font-size: 3.3cqmin; }
.scard.player .sc-text span { font-size: 2.4cqmin; }
.sc-vol { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.4cqmin; opacity: .7; }
.sc-vol svg { width: 2.4cqmin; height: 2.4cqmin; }
.sc-vbar { height: .6cqmin; border-radius: 1cqmin; background: rgb(255 255 255 / .25); position: relative; overflow: hidden; }
.sc-vbar i { position: absolute; inset: 0 70% 0 0; background: currentColor; }
.stage-frame[data-layout=wall] .sf-heading { justify-content: flex-start; left: 7cqw; top: 6cqh; font-size: 9cqmin; }
.stage-frame[data-layout=wall][data-font=sans] .sf-heading { font-size: 6.4cqmin; }
.stage-frame[data-layout=wall][data-font=mono] .sf-heading { font-size: 3.4cqmin; }
.stage-frame[data-layout=wall] .sf-heading::before { display: none; }
.stage-frame[data-layout=wall] .sf-caption { top: calc(6cqh + 12cqmin); left: 7cqw; right: 30cqw; text-align: left; }
.stage-frame[data-layout=wall] .sf-heading, .stage-frame[data-layout=wall] .sf-caption { text-shadow: 0 2px 18px rgb(0 0 0 / .7), 0 1px 3px rgb(0 0 0 / .5); }
.stage-frame[data-layout=wall] .wall { top: 60%; }
.stage-frame[data-layout=wall] .sf-spot { background: radial-gradient(60% 50% at 70% 30%, rgb(255 214 170 / calc(var(--spot) * .45)), transparent 70%); mix-blend-mode: screen; }

/* bar kontrol kaca (karusel) */
.sf-bar {
  position: absolute; left: 50%; z-index: 7;
  top: calc(12cqh + 63cqmin);
  transform: translateX(-50%);
  width: min(92cqw, 140cqmin);
  height: 10cqmin;
  border-radius: 10cqmin;
  display: flex; align-items: center; gap: 1cqmin;
  padding: 0 2.6cqmin;
  color: #fff;
  background: linear-gradient(160deg, rgb(255 255 255 / .26), rgb(255 255 255 / .1));
  -webkit-backdrop-filter: blur(2.4cqmin) saturate(1.4);
  backdrop-filter: blur(2.4cqmin) saturate(1.4);
  border: 1px solid rgb(255 255 255 / .34);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 3cqmin 7cqmin -3cqmin rgb(0 0 0 / .4);
}
.stage-frame[data-card=dark] .sf-bar { background: linear-gradient(180deg, rgb(30 27 25 / .85), rgb(14 13 12 / .85)); border-color: rgb(255 255 255 / .08); }
.stage-frame[data-card=light] .sf-bar { color: #1c1814; background: rgb(255 253 250 / .75); border-color: rgb(255 255 255 / .8); }
.sfb-btn { width: 6.4cqmin; height: 6.4cqmin; display: grid; place-items: center; flex: none; border-radius: 50%; }
.sfb-btn svg { width: 3.4cqmin; height: 3.4cqmin; }
button.sfb-btn:hover { background: rgb(255 255 255 / .14); }
.sfb-btn.deco { opacity: .85; }
.sfb-now {
  flex: 1; min-width: 0; position: relative;
  display: flex; align-items: center; gap: 1.6cqmin;
  height: 7cqmin;
  padding: 0 1.6cqmin 0 1.1cqmin;
  margin: 0 1.2cqmin;
  border-radius: 2.2cqmin;
  background: rgb(0 0 0 / .22);
}
.stage-frame[data-card=light] .sfb-now { background: rgb(0 0 0 / .06); }
.sfb-now img, .sfb-ph { width: 5cqmin; height: 5cqmin; border-radius: 1.1cqmin; object-fit: cover; flex: none; background: rgb(255 255 255 / .15); }
.sfb-text { flex: 1; min-width: 0; display: grid; }
.sfb-text b { font-size: 2.4cqmin; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfb-text span { font-size: 1.9cqmin; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sfb-wave, .sfb-eq { display: grid; opacity: .8; }
.sfb-wave svg, .sfb-eq svg { width: 2.8cqmin; height: 2.8cqmin; }
.sfb-line { position: absolute; left: 1.4cqmin; right: 42%; bottom: .7cqmin; height: .35cqmin; border-radius: 1cqmin; background: rgb(255 255 255 / .2); overflow: hidden; }
.sfb-line i { display: block; height: 100%; background: currentColor; transform-origin: left; transform: scaleX(.35); }

/* mode Bebas: kartu bisa diseret, diputar, diubah ukurannya */
.free-layer { position: absolute; inset: 0; pointer-events: none; }
.free-layer.back { z-index: 2; }
.free-layer.front { z-index: 10; }
.stage-frame[data-layout=free] .sf-person { z-index: 5; height: calc(64cqh * var(--ph-scale)); }
.stage-frame[data-layout=free] .sf-caption { top: auto; bottom: 7.5cqh; text-shadow: 0 1px 12px rgb(0 0 0 / .35); }
.scard.free {
  --s: 1; --r: 0deg; --inv: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s));
  overflow: visible;
  cursor: grab;
  touch-action: none;
  transition: box-shadow .2s, outline-color .2s;
}
.scard.free.player { position: absolute; width: 43cqmin; translate: none; }
.scard.free.ghost { cursor: pointer; }
.stage-frame.moving .scard.free { cursor: grabbing; }
.scard.free.sel { outline: calc(.4cqmin * var(--inv)) solid rgb(var(--accent)); outline-offset: calc(1cqmin * var(--inv)); }
.fh {
  position: absolute; z-index: 3; display: none;
  width: calc(3.2cqmin * var(--inv)); height: calc(3.2cqmin * var(--inv));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 calc(.4cqmin * var(--inv)) rgb(var(--accent)), 0 calc(.6cqmin * var(--inv)) calc(1.6cqmin * var(--inv)) rgb(0 0 0 / .4);
}
.fh::before { content: ''; position: absolute; inset: calc(-1.8cqmin * var(--inv)); border-radius: 50%; }
.scard.free.sel .fh { display: block; }
.fh-size { right: calc(-1cqmin * var(--inv)); bottom: calc(-1cqmin * var(--inv)); transform: translate(50%, 50%); cursor: nwse-resize; }
.fh-rot { left: 50%; top: calc(-1cqmin * var(--inv)); transform: translate(-50%, calc(-100% - 3cqmin * var(--inv))); cursor: grab; }
.fh-rot::after { content: ''; position: absolute; left: 50%; top: 100%; width: calc(.35cqmin * var(--inv)); height: calc(3cqmin * var(--inv)); background: rgb(var(--accent)); transform: translateX(-50%); }
.free-guides { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.free-guides i { position: absolute; opacity: 0; transition: opacity .12s; background: rgb(var(--accent)); box-shadow: 0 0 6px rgb(var(--accent) / .6); }
.free-guides .gx { left: 50%; top: 0; bottom: 0; width: 1px; }
.free-guides .gy { top: 50%; left: 0; right: 0; height: 1px; }
.free-guides.x .gx, .free-guides.y .gy { opacity: .9; }
.stage-wrap:fullscreen .fh, .stage-wrap:fullscreen .free-guides { display: none !important; }
.stage-wrap:fullscreen .scard.free.sel { outline: none; }

/* ---------------------------------------------------------------- lapisan kartu (depan/belakang) */

.stage-wrap { position: relative; }
.card-tools {
  position: absolute; z-index: 40;
  display: flex; align-items: center; gap: 2px;
  padding: 4px;
  border-radius: 14px;
  background-color: rgb(22 20 18 / .82);
  transform: translate(-50%, -100%);
  animation: ctIn .25s var(--spring);
  white-space: nowrap;
}
.card-tools.below { transform: translate(-50%, 0); }
@keyframes ctIn { from { opacity: 0; scale: .92; } }
.ct-btn {
  height: 32px; min-width: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px;
  font-size: 12.5px; font-weight: 500;
  color: rgb(var(--ink) / .82);
  transition: background .15s, color .15s;
}
.ct-btn:hover { background: rgb(255 255 255 / .1); color: rgb(var(--ink)); }
.ct-btn.on { color: rgb(var(--accent)); }
.ct-btn[data-layer=remove]:hover { background: rgb(255 90 70 / .16); color: #ffb3a8; }
.ct-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 3px; }
.stage-wrap:fullscreen .card-tools { display: none; }
.scard.free.flash { animation: cardFlash .5s ease; }
@keyframes cardFlash { 40% { box-shadow: 0 0 0 1.2cqmin rgb(var(--accent) / .45), 0 3cqmin 7cqmin -2cqmin rgb(0 0 0 / .4); } }

.layer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.layer-btn {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px;
  border-radius: 10px;
  background: rgb(255 255 255 / .05);
  border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.layer-btn:hover { background: rgb(255 255 255 / .09); color: rgb(var(--ink)); border-color: rgb(var(--accent) / .4); }
.layer-btn .ic { color: rgb(var(--accent)); flex: none; }
.layer-side {
  display: flex; align-items: center; gap: 8px; width: 100%;
  height: 38px; padding: 0 12px; margin-top: 2px;
  border-radius: 10px;
  background: rgb(var(--accent) / .08);
  border: 1px solid rgb(var(--accent) / .25);
  font-size: 12.5px; font-weight: 500; text-align: left;
}
.layer-side:hover { background: rgb(var(--accent) / .14); }
.layer-side .ic { color: rgb(var(--accent)); }
.layer-head { display: flex; justify-content: space-between; align-items: baseline; }
.layer-head small { font-size: 11px; color: var(--ink-3); }
.layer-list { display: grid; gap: 3px; }
.layer-row {
  display: grid; grid-template-columns: 16px 30px minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
  padding: 4px 4px 4px 6px;
  border-radius: 10px;
  background: rgb(255 255 255 / .03);
  border: 1px solid transparent;
  cursor: grab;
  font-size: 12.5px;
}
.layer-row:hover { background: rgb(255 255 255 / .06); }
.layer-row.on { border-color: rgb(var(--accent) / .55); background: rgb(var(--accent) / .08); }
.layer-row.dragging { opacity: .45; }
.layer-row img, .layer-row .sel-ph { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
.layer-grip { color: var(--ink-3); display: grid; }
.layer-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-row.person { grid-template-columns: 16px 30px minmax(0, 1fr); background: rgb(var(--accent) / .1); border: 1px dashed rgb(var(--accent) / .45); font-weight: 600; }
.layer-row.person.locked { cursor: default; }
.layer-person-ic { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; color: rgb(var(--accent)); background: rgb(var(--accent) / .15); }

/* ---------------------------------------------------------------- simpan poster */

.poster-modal { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; align-items: start; }
.poster-stage {
  position: relative;
  max-height: 62vh; width: 100%;
  margin: 0 auto;
  border-radius: 14px; overflow: hidden;
  background: repeating-conic-gradient(#1b1917 0 25%, #222 0 50%) 0 0 / 18px 18px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.poster-preview { width: 100%; height: 100%; object-fit: contain; display: block; }
.poster-busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); background: rgb(0 0 0 / .45); }
.poster-spin { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid rgb(255 255 255 / .2); border-top-color: rgb(var(--accent)); animation: spin .8s linear infinite; }
.poster-side { display: grid; gap: 10px; align-content: start; }
.poster-info { font: 500 12px var(--font-mono); color: var(--ink-2); min-height: 1.4em; }
@media (max-width: 860px) {
  .poster-modal { grid-template-columns: minmax(0, 1fr); }
  .poster-stage { max-height: 52vh; }
}

/* ---------------------------------------------------------------- pisahkan orang */

.person-ok { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.person-ok > span { color: #8fdcaa; display: grid; margin-top: 2px; }
.person-ok b { color: rgb(var(--ink)); font-weight: 600; }
.mask-editor { display: grid; gap: 12px; }
.mask-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mask-tools .seg-btn { display: inline-flex; align-items: center; gap: 6px; }
.mask-size { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); min-width: 150px; flex: 1; }
.mask-size .range { flex: 1; }
.mask-stage { display: grid; place-items: center; padding: 10px; border-radius: 14px; background: repeating-conic-gradient(#1b1917 0 25%, #222 0 50%) 0 0 / 18px 18px; border: 1px solid var(--line); }
.mask-stage canvas { display: block; border-radius: 8px; cursor: none; touch-action: none; }

/* ---------------------------------------------------------------- editor lirik */

.lyrics-modal { display: grid; gap: 12px; }
.lyrics-tools { align-items: center; }
.lyrics-tools .spacer { flex: 1; }
.lyrics-tools small { font-size: 12px; }
.lyrics-input { font: 14px/1.7 var(--font-ui); min-height: 300px; resize: vertical; }
.lyrics-status { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.lyrics-status .ic { flex: none; margin-top: 2px; }
.lyrics-status[data-state=ok] .ic { color: #8fdcaa; }
.lyrics-status[data-state=plain] .ic { color: rgb(var(--accent)); }
.lyrics-status b { color: rgb(var(--ink)); font-weight: 600; }
.lyrics-sync { display: grid; gap: 12px; }
.sync-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sync-head > div { display: grid; gap: 2px; }
.sync-head small { font-size: 12px; color: var(--ink-3); }
.sync-list { max-height: 320px; overflow-y: auto; border-radius: 14px; background: rgb(0 0 0 / .25); border: 1px solid var(--line); padding: 8px; scrollbar-width: thin; }
.sync-line { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 14px; color: var(--ink-3); }
.sync-line.done { color: var(--ink-2); }
.sync-line.next { color: rgb(var(--ink)); background: rgb(var(--accent) / .14); font-weight: 600; }
.sync-t { font: 500 11.5px/1.9 var(--font-mono); color: rgb(var(--accent)); }
.sync-actions { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.sync-tap { flex: 1; min-width: 160px; }

/* ---------------------------------------------------------------- responsif */

@media (max-width: 1280px) {
  .hero-info { padding-right: 0; }
  .hero-viz { display: none; }
  .np-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding-left: 40px; }
  .np-art { width: min(44vh, 34vw); }
  .np-queue { display: none; }
  .np-tabs { display: inline-flex; }
  .np[data-tab=queue] .np-body, .np[data-tab=lyrics] .np-body { grid-template-columns: minmax(0, 1fr); }
  .np[data-tab=queue] .np-stage, .np[data-tab=queue] .np-info,
  .np[data-tab=lyrics] .np-stage, .np[data-tab=lyrics] .np-info { display: none; }
  .np[data-tab=queue] .np-queue, .np[data-tab=lyrics] .np-queue { display: flex; border: 0; padding: 0; max-width: 640px; width: 100%; justify-self: center; height: 100%; }
  .np-side-tabs { display: none; }
  .np-context { padding-right: 0; }
}

@media (max-width: 1120px) {
  :root { --side-w: 76px; }
  .sidebar { padding: 20px 10px 12px; align-items: center; }
  .sidebar .brand { padding: 0; }
  .sidebar .brand-a { display: none; }
  .sidebar .brand-b { font-size: 30px; }
  .side-link { grid-template-columns: 22px; justify-content: center; width: 52px; padding: 0; }
  .side-link span, .side-link em { display: none; }
  .side-head .eyebrow, .side-pl-text, .side-empty, .storage, .server-badge span { display: none; }
  .side-head { padding: 0; justify-content: center; }
  .side-pl { grid-template-columns: 38px; }
  .side-foot { justify-items: center; }
  .playerbar { grid-template-columns: minmax(160px, 1fr) minmax(280px, 1.4fr) auto; }
  .pb-vol { width: 80px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .stage-page { grid-template-columns: minmax(0, 1fr) 300px; }
  .search { width: 220px; }
  .trow, .thead { grid-template-columns: 40px minmax(0, 2.4fr) minmax(0, 1fr) 36px 56px 36px; }
  .tlist.sortable .trow { grid-template-columns: 20px 40px minmax(0, 2.4fr) minmax(0, 1fr) 36px 56px 36px; }
  .trow-src, .th-src { display: none; }
}

@media (max-width: 860px) {
  :root { --gap: 10px; --bar-h: 64px; --radius: 18px; }
  /* island menempati "status bar"; konten mulai di bawahnya */
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 52px minmax(0, 1fr); padding: 0; padding-top: calc(env(safe-area-inset-top) + 46px); }
  .sidebar { display: none; }
  .topbar, .view { grid-column: 1; }
  .topbar { padding: 0 14px; }
  .top-nav { display: none; }
  .mobile-only { display: inline-flex !important; }
  .topbar .brand { padding: 0; }
  .search { width: auto; flex: 1; height: 38px; }
  .search kbd { display: none; }
  .top-right { flex: 1; justify-content: flex-end; }
  .add-btn span { display: none; }
  .add-btn { width: 38px; height: 38px; padding: 0; }
  .island { top: max(8px, env(safe-area-inset-top)); }
  .island[data-mode=idle] { --iw: 96px; --ih: 30px; }
  .island[data-mode=expanded] { --iw: calc(100vw - 20px); }
  .topbar .brand { margin-right: auto; flex: none; }
  .search { min-width: 0; }
  .topbar .brand-a { display: none; }
  .topbar .brand-b { font-size: 28px; }
  .topbar:has(.search:focus-within) .brand { display: none !important; }

  .view { padding: 4px 16px calc(var(--bar-h) + 96px + env(safe-area-inset-bottom)); }

  .tabbar {
    position: fixed; left: 10px; right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    height: 64px; z-index: 55;
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-radius: 22px;
    padding: 0 6px;
  }
  .tab { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--ink-3); }
  .tab.active { color: rgb(var(--ink)); }
  .tab.active .ic { color: rgb(var(--accent)); }

  .playerbar {
    left: 10px; right: 10px;
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 64px + 8px);
    height: var(--bar-h);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 0 8px 0 8px;
    border-radius: 18px;
    overflow: hidden;
  }
  .pb-art { width: 48px; height: 48px; border-radius: 10px; }
  .pb-like { display: none; }
  .pb-center { display: contents; }
  .pb-ctrl { grid-column: 2; grid-row: 1; gap: 2px; }
  .pb-ctrl [data-act=shuffle], .pb-ctrl [data-act=repeat], .pb-ctrl [data-act=prev] { display: none; }
  .pb-play { width: 40px; height: 40px; }
  .pb-progress, .pb-right { display: none; }
  .pb-mini-progress { display: block; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: rgb(255 255 255 / .1); border-radius: 2px; overflow: hidden; }
  .pb-mini-progress i { display: block; height: 100%; background: rgb(var(--accent)); transform-origin: left; transform: scaleX(0); }
  .playerbar:not(.has-track) { display: none; }

  .dock { right: 10px; left: 10px; width: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 64px + var(--bar-h) + 16px); }

  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 18px 0 20px; justify-items: start; }
  .hero-art { width: min(64vw, 270px); }
  .hero.playing .vinyl { transform: translateX(28%); }
  .hero-info { gap: 10px; }
  .hero-title { font-size: clamp(44px, 13vw, 64px); }
  .hero-title.long { font-size: clamp(36px, 10vw, 52px); }
  .hero-title.xlong { font-size: clamp(30px, 8vw, 40px); }
  .shelf-head h2 { font-size: 26px; }
  .scroller { grid-auto-columns: 148px; gap: 14px; }

  .onboard { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; }
  .onboard-drop { aspect-ratio: auto; padding: 36px 20px; }

  .thead { display: none; }
  .trow, .tlist.sortable .trow { grid-template-columns: 30px minmax(0, 1fr) 42px 32px; padding: 0 6px; gap: 8px; }
  .trow-album, .trow-like, .trow-grip { display: none; }
  .trow-more { opacity: 1; }
  .toolbar-left .chips { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .toolbar-left { width: 100%; }

  .pl-head { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px 0 24px; }
  .pl-art.xl { width: min(56vw, 220px); }
  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }

  .np-head { padding: 14px 16px 0; padding-top: calc(env(safe-area-inset-top) + 52px); }
  .np-context { display: none; }
  .np-head { justify-content: space-between; }
  .np-body { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 12px 22px calc(28px + env(safe-area-inset-bottom)); align-content: center; overflow-y: auto; }
  .np-art { width: min(78vw, 46vh); }
  .np.is-video .np-art { width: 100%; }
  .np-title { font-size: clamp(40px, 11vw, 56px); }
  .np-ctrl, .np-foot, .np-viz { max-width: none; }
  .np-viz { display: none; }

  .drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: min(86dvh, 760px); transform: translateY(calc(100% + 30px)); }

  .stage-page { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .stage-main { height: min(72dvh, 680px); }
  .stage-top h1 { font-size: 34px; }
  .stage-panel { max-height: none; }
  .pbody { overflow: visible; }

  .edit-grid { grid-template-columns: minmax(0, 1fr); }
  .edit-cover-box { width: 120px; }
  .modal-wrap { align-items: end; padding: 8px; }
  .modal { width: 100%; }
  .presets { grid-template-columns: repeat(2, 1fr); }
}

@media (hover: none) {
  .trow-more, .trow-like.on { opacity: 1; }
  .tcard-play { opacity: 1; transform: none; width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
