/* Palet gereja (ungu + emas) dari skill ui-ux-pro-max, versi gelap untuk ruang multimedia yang redup.
   Emas hanya untuk satu aksi utama ibadah: Tayangkan. */
:root {
  --bg: #100d1a; --surface: #17132a; --raised: #1f1a36; --hover: #282144;
  --line: #2c2547; --text: #eeeaf8; --muted: #a39cbd; --faint: #7d76a0;
  --violet: #8b5cf6; --violet-strong: #7c3aed;
  --gold: #e0a019; --on-gold: #1a1203;
  --ok: #34d399; --warn: #fbbf24; --danger: #f87171;
  --side-w: 248px; --edit-w: 400px; --top-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 'Plus Jakarta Sans', system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: #c4b5fd; }
code, kbd, pre { font-family: ui-monospace, Menlo, monospace; }
code { font-size: .9em; color: #ddd6fe; }
kbd { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
/* scrollbar tipis dan gelap, tidak menonjol */
* { scrollbar-width: thin; scrollbar-color: #3a3260 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3a3260; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #4c4280; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.d-none { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- komponen dasar ---------- */
.btn { height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--violet); }
.btn:disabled { opacity: .45; cursor: not-allowed; border-color: var(--line); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.gold { background: var(--gold); color: var(--on-gold); border: 0; font-weight: 800; padding: 0 22px; }
.btn.gold:hover { filter: brightness(1.08); }
.btn.primary { background: var(--violet-strong); border: 0; color: #fff; }
.btn.primary:hover { background: #6d28d9; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--hover); }
.btn.danger { color: var(--danger); }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.in { height: 40px; width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 0 10px; }
.in:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(139,92,246,.25); }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--faint); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: rgba(52,211,153,.14); color: var(--ok); }
.pill.draf { background: rgba(251,191,36,.14); color: var(--warn); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: none; height: 32px; min-width: 36px; padding: 0 10px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.hint { font-size: 12px; color: var(--faint); }

/* ---------- rangka ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
/* menu disembunyikan = sidebar menyempit jadi rel 64px; burger tetap di tempat yang sama */
body.sb-hidden .shell { grid-template-columns: 64px minmax(0, 1fr); }
body.sb-hidden .side .brand, body.sb-hidden .side .nav, body.sb-hidden .side .group,
body.sb-hidden .side .recent, body.sb-hidden .side .me, body.sb-hidden .side .txt { display: none; }
body.sb-hidden .side .search, body.sb-hidden .side .newbtn { width: 40px; padding: 0; justify-content: center; margin-left: 12px; margin-right: 12px; }

.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden; z-index: 30; }
.brandrow { display: flex; align-items: center; gap: 8px; height: var(--top-h); padding: 0 12px; flex: none; }
#btnMenuIn { margin-left: auto; }
/* sidebar terbuka = ikon silang, diciutkan = burger */
#btnMenuIn .ic-burger { display: none; }
body.sb-hidden #btnMenuIn .ic-burger { display: block; }
body.sb-hidden #btnMenuIn .ic-close { display: none; }
@media (max-width: 991px) { body.sb-hidden #btnMenuIn .ic-burger { display: none; } body.sb-hidden #btnMenuIn .ic-close { display: block; } } /* burger di kanan, sejajar nama aplikasi */
.brand { font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--faint); }
.search { margin: 0 12px 12px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; color: var(--faint); text-align: left; flex: none; }
.search span.txt { flex: 1; }
.search:hover { border-color: var(--violet); color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { background: var(--raised); color: var(--text); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--warn); }
.side .newbtn { margin: 12px; justify-content: center; flex: none; }
.group { padding: 10px 20px 4px; font-size: 12px; font-weight: 700; color: var(--faint); }
.recent { overflow-y: auto; flex: 1; padding: 0 8px 8px; }
.recent a { display: flex; align-items: baseline; gap: 8px; padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
.recent a:hover { background: var(--hover); color: var(--text); }
.recent a.active { background: var(--raised); color: var(--text); }
.recent b { color: var(--text); flex: none; font-variant-numeric: tabular-nums; }
.recent .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .st { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; }
.st.ok { color: var(--ok); } .st.draf { color: var(--warn); }
.me { border-top: 1px solid var(--line); padding: 10px 12px 10px 20px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex: none; }
.me span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; flex: none; }
#btnMenu { display: none; }
.titlewrap { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
.title { font-size: 20px; font-weight: 800; letter-spacing: -.015em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 9ch; }
.top .acts { display: flex; gap: 8px; flex: none; }
body.view-other .top .acts, body.view-other #songBadge { display: none; }
#btnBack { display: none; }
body:not(.view-other) #btnBack { display: grid; }

/* ---------- tampilan edit: slide + editor ---------- */
.editview { display: grid; grid-template-columns: minmax(0, 1fr) var(--edit-w); flex: 1; min-height: 0; }
.stage { min-width: 0; padding: 14px 20px 32px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 12px; }
.ctl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.ctl .in { height: 38px; width: 92px; }
.meta { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.warn { border-radius: 10px; background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.25); padding: 8px 12px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 2px; }
.warn button { border: 0; background: none; padding: 3px 0; text-align: left; font-size: 13px; color: #fcd34d; }
.warn button.soft { color: var(--muted); }
.warn button:hover { text-decoration: underline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
/* tampilan pratinjau: List / Grid 2 / Grid 3 / 1 slide */
.seg .vbtn { min-width: 38px; padding: 0; display: grid; place-items: center; }
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
#preview.v-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#preview.v-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#preview.v-one { grid-template-columns: minmax(0, 1fr); }
#preview.v-one .slide:not(.cur) { display: none; }
#preview.v-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
#preview.v-list .slide { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 16px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
#preview.v-list .slide-mel, #preview.v-list .slide-dl, #preview.v-list .slide-play, #preview.v-list .n { display: none; }
.slide .info { display: none; }
#preview.v-list .slide .info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.slide .info b { font-size: 16px; } .slide .info code { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide .info .row { display: flex; flex-wrap: wrap; gap: 6px; }
.onenav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.bait-label { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--faint); margin-top: 6px; }
.slide { position: relative; }
.slide-btn { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 10px; }
.slide-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; outline: 1px solid var(--line); }
.slide-btn:hover .slide-thumb { outline: 2px solid var(--violet); }
/* not yang sedang berbunyi saat ▶ Melodi */
.note-hl { position: absolute; border-radius: 6px; background: rgba(224,160,25,.28); outline: 2px solid var(--gold); pointer-events: none; }
.slide .n { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700; color: var(--muted); background: rgba(0,0,0,.65); padding: 1px 7px; border-radius: 6px; pointer-events: none; }
.slide-play { position: absolute; right: 8px; bottom: 8px; height: 30px; padding: 0 12px; font-size: 12px; }
@media (hover: hover) { .slide-play { opacity: 0; } .slide:hover .slide-play, .slide-play:focus-visible { opacity: 1; } }
.slide-dl { position: absolute; right: 8px; top: 8px; height: 30px; width: 34px; padding: 0; justify-content: center; font-size: 14px; background: rgba(23,19,42,.9); }
@media (hover: hover) { .slide-dl { opacity: 0; } .slide:hover .slide-dl, .slide-dl:focus-visible { opacity: 1; } }
.dl { position: relative; }
.slide-mel { position: absolute; left: 8px; top: 8px; height: 30px; padding: 0 10px; font-size: 12px; background: rgba(23,19,42,.92); }
@media (hover: hover) { .slide-mel { opacity: 0; } .slide:hover .slide-mel, .slide-mel:focus-visible { opacity: 1; } }
.melody { display: flex; align-items: center; gap: 6px; }
.player { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px 0 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.pbtn { width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; color: var(--text); display: grid; place-items: center; flex: none; }
.pbtn:hover:not(:disabled) { background: var(--hover); }
.pbtn:disabled { color: var(--faint); opacity: .5; cursor: default; }
.pbtn.pmain { background: var(--violet-strong); color: #fff; }
.pbtn.pmain:hover { background: #6d28d9; }
.pbtn .ic-pause, .pbtn.playing .ic-play { display: none; }
.pbtn.playing .ic-pause { display: block; }
.plabel { width: 15ch; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.slide.sel .slide-thumb { outline: 3px solid var(--gold); outline-offset: 2px; }
.slide.sel .n { background: var(--gold); color: var(--on-gold); }
.vol { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--muted); font-size: 12px; font-weight: 600; }
.vol input { width: 90px; accent-color: var(--violet); }
.vol #volVal { min-width: 4ch; text-align: right; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.5); padding: 14px; display: flex; flex-direction: column; gap: 10px; z-index: 40; }
.menu .seg { width: 100%; } .menu .seg button { flex: 1; }
/* solmisasi berjalan saat melodi diputar; titik atas/bawah seperti di not */
.solfa { position: sticky; top: 0; z-index: 4; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.solfa-line { font-size: 22px; font-weight: 700; color: var(--muted); line-height: 2.1; word-spacing: 6px; }
.sf { position: relative; display: inline-block; padding: 0 4px; border-radius: 6px; }
.sf.on { background: var(--gold); color: var(--on-gold); }
.sf.up::before, .sf.down::after { content: ''; position: absolute; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; }
.sf.up::before { top: -3px; } .sf.down::after { bottom: -3px; }
.count-txt { font-size: 13px; color: var(--faint); }

.resizer { position: absolute; left: -6px; top: 0; bottom: 0; width: 12px; cursor: col-resize; z-index: 5; }
.resizer::after { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background .15s; }
.resizer:hover::after, .resizer:focus-visible::after, body.resizing .resizer::after { background: var(--violet); }
body.resizing { cursor: col-resize; user-select: none; }
.editor { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); }
.ed-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
#judul { text-transform: uppercase; }
.infosum { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.infosum .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.infosum b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.infosum span { font-size: 12px; color: var(--faint); }
.fields { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.fields .wide { grid-column: 1 / -1; }
/* tab editor: menempel di atas panel supaya selalu terlihat saat menggulir */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; position: sticky; top: -16px; z-index: 6; box-shadow: 0 8px 16px -8px rgba(0,0,0,.6); }
.tabs button { flex: 1; border: 0; background: none; height: 38px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; }
.tabs button:hover { color: var(--text); background: var(--hover); }
.tabs button.on { background: var(--violet-strong); color: #fff; }
.step { display: flex; gap: 12px; }
.step > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); font-size: 13px; }
.step > div { flex: 1; min-width: 0; }
.steph { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.codebox { margin: 0; max-height: 260px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: 12px/1.6 ui-monospace, Menlo, monospace; color: #ddd6fe; white-space: pre-wrap; }
#aiResult { min-height: 140px; }
.pane { display: flex; flex-direction: column; gap: 10px; }
.syms { display: flex; flex-wrap: wrap; gap: 6px; }
.syms button { height: 34px; min-width: 40px; padding: 0 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 7px; font: 600 13px ui-monospace, Menlo, monospace; color: var(--muted); }
.syms button:hover { color: var(--text); border-color: var(--violet); }
textarea.code { width: 100%; resize: none; overflow-y: hidden; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 12px; font: 13px/1.75 ui-monospace, Menlo, monospace; }
textarea.code:focus { border-color: var(--violet); outline: none; }
textarea.code::selection { background: rgba(139,92,246,.5); }
.lbl { font-size: 12px; font-weight: 700; color: var(--faint); }
/* kotak tumbuh mengikuti isi (lihat autosize di app.js), jadi tidak ada scroll di dalam kotak */
#not { min-height: 120px; white-space: pre; overflow-x: auto; }
#syair { min-height: 200px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row .in { width: auto; }
.guide { font-size: 14px; color: var(--muted); }
.guide h3 { font-size: 14px; color: var(--text); margin: 6px 0; }
.guide ol { padding-left: 18px; margin: 0 0 10px; }
.guide li { margin-bottom: 6px; }
.guide b { color: var(--text); }
.guide pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; overflow-x: auto; color: var(--text); }
.guide table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.guide td { border-top: 1px solid var(--line); padding: 6px 4px; vertical-align: top; }
.ed-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; flex: none; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; margin: 0; cursor: pointer; flex: none; }
.switch input::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(16px); background: #fff; }
.switch input:disabled { opacity: .5; cursor: not-allowed; }
.saved { font-size: 13px; color: var(--ok); }

/* ---------- tampilan daftar ---------- */
.listview { padding: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters .in { width: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--faint); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: var(--surface); }
.tbl a { color: var(--text); font-weight: 700; text-decoration: none; }
.tbl a:hover { color: #c4b5fd; }
.tbl .when { font-size: 13px; color: var(--faint); }
.empty { color: var(--muted); padding: 32px 0; }

/* ---------- beranda ---------- */
.home { padding: 24px; max-width: 1180px; width: 100%; margin: 0 auto; }
.homesearch { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--faint); }
.homesearch:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139,92,246,.25); }
.homesearch input { flex: 1; border: 0; background: none; outline: none; font-size: 17px; font-weight: 600; color: var(--text); min-width: 0; }
.hits { margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hit { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.hit:first-child { border-top: 0; }
.hit .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hit .t b { color: var(--text); margin-right: 8px; }
.acts-sm { display: flex; gap: 6px; flex: none; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 28px; }
.qcard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.qcard:hover { border-color: var(--violet); }
.qcard b { font-size: 16px; }
.qcard span { font-size: 13px; color: var(--faint); }
.qcard:first-child { background: var(--violet-strong); border-color: var(--violet-strong); }
.qcard:first-child span { color: #e9ddff; }
.homegrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.hhead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.hhead h3 { font-size: 15px; margin: 0; }
.hhead a { font-size: 13px; color: var(--faint); text-decoration: none; }
.hhead a:hover { color: var(--text); }
.hhead .count { color: var(--warn); margin-left: 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.scard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.scard canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.scard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.scard .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .sub { font-size: 12px; color: var(--faint); }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mini .hit .t { font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-align: left; text-decoration: none; color: inherit; }
.stat:hover { border-color: var(--violet); }
.stat b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--faint); }
.hero { max-width: 640px; margin: 6vh auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.hero h3 { margin: 0 0 8px; font-size: 24px; }
.hero p { color: var(--muted); margin: 0 0 14px; }
.steps { padding-left: 20px; margin: 0 0 20px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.steps b { color: var(--text); }
.empty-sm { padding: 14px; color: var(--faint); font-size: 14px; }
.tbl .acts-sm { justify-content: flex-end; }
@media (max-width: 991px) {
  .home { padding: 14px; }
  .quick { grid-template-columns: 1fr; }
  .homegrid { grid-template-columns: 1fr; }
  .hit .acts-sm .lbl-txt { display: none; }
}

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.login h1 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.login .err { color: var(--danger); font-size: 13px; min-height: 1em; }

/* ---------- palet cari ---------- */
.palette { position: fixed; inset: 0; background: rgba(8,6,14,.6); display: none; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; z-index: 1500; }
.palette.open { display: flex; }
.pbox { width: min(560px, 100%); background: var(--raised); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; }
.pbox input { width: 100%; height: 56px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 17px; font-weight: 600; padding: 0 18px; outline: none; }
.plist { max-height: 50vh; overflow-y: auto; padding: 6px 0; }
.pitem { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px 18px; color: var(--muted); text-align: left; }
.pitem.on { background: var(--hover); color: var(--text); }
.pitem b { color: var(--text); flex: none; min-width: 72px; }
.pitem .st { margin-left: auto; font-size: 12px; font-weight: 700; }
.pfoot { border-top: 1px solid var(--line); padding: 8px 18px; font-size: 12px; color: var(--faint); display: flex; gap: 14px; }

/* ---------- mode tayang ---------- */
#show { position: fixed; inset: 0; background: #000; z-index: 2000; display: none; align-items: center; justify-content: center; }
#show canvas { max-width: 100vw; max-height: 100vh; }
.showbox { position: relative; width: min(100vw, 177.78vh); aspect-ratio: 16 / 9; }
.showbox canvas { width: 100%; height: 100%; display: block; }
/* solmisasi saat melodi diputar di layar penuh: pita tipis di bawah, tidak menutupi not */
#showSolfa { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 20px; padding: 0 12px; background: rgba(0,0,0,.6); border-radius: 10px; line-height: 1.9; max-width: 90vw; white-space: nowrap; overflow: hidden; }
#showSolfa:empty { display: none; }
#showInfo { position: fixed; bottom: 8px; right: 12px; color: #666; font: 14px sans-serif; }

/* ---------- layar sedang: editor turun ke bawah slide ---------- */
/* layar lebar: halaman tidak bergulir; hanya kolom slide dan panel editor yang bergulir sendiri */
@media (min-width: 1280px) {
  .shell { height: 100vh; overflow: hidden; }
  .main { height: 100vh; overflow: hidden; }
  body.view-other .main { overflow-y: auto; } /* beranda, daftar, panduan: halaman bergulir biasa */
  .stage { overflow-y: auto; }
  .editor { position: relative; top: 0; height: 100%; min-height: 0; }
  .editview { overflow: hidden; }
}
@media (max-width: 1279px) {
  .editview { grid-template-columns: minmax(0, 1fr); }
  .editor { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .resizer { display: none; }
  .ed-body { overflow: visible; }
}
/* ---------- tablet/HP: sidebar jadi laci dari kiri ---------- */
.backdrop { display: none; }
@media (max-width: 991px) {
  .shell, body.sb-hidden .shell { grid-template-columns: minmax(0, 1fr); }
  .side, body.sb-hidden .side { display: flex; position: fixed; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .2s ease; }
  body.menu-open .side { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  body.menu-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(8,6,14,.55); z-index: 25; }
  #btnMenu { display: grid; }
  body.sb-hidden .side .brand, body.sb-hidden .side .nav, body.sb-hidden .side .group, body.sb-hidden .side .recent { display: block; }
  body.sb-hidden .side .me { display: flex; } body.sb-hidden .side .txt { display: inline; }
  body.sb-hidden .side .search, body.sb-hidden .side .newbtn { width: auto; padding: 0 12px; }
  .top { padding: 0 12px; gap: 8px; }
  .title { font-size: 17px; }
  #btnZip span { display: none; } .plabel { display: none; }
  .vol input { width: 60px; } .vol #volVal { display: none; }
  .stage { padding: 12px; }
  .grid, #preview.v-g2, #preview.v-g3 { grid-template-columns: minmax(0, 1fr); }
  #preview.v-list .slide { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  #songBadge { display: none; }
  .top .acts .btn.gold { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ikon Lucide */
.lucide { width: 18px; height: 18px; flex: none; }
.icon-btn .lucide { width: 20px; height: 20px; }
.homesearch .lucide { width: 20px; height: 20px; }
.qcard .lucide { width: 22px; height: 22px; margin-bottom: 4px; }

/* halaman Panduan */
.guidepage { max-width: 1240px; width: 100%; margin: 0 auto; padding: 24px 16px 64px; }
.guidepage header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.guidepage h1 { font-size: 26px; margin: 0; flex: 1; }
.guidepage > p { color: var(--muted); margin: 0 0 20px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.toc button { background: none; font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.toc button:hover { color: var(--text); border-color: var(--violet); }
/* 2 kolom kartu; judul bagian selebar penuh */
#guideList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.guidepage h2 { grid-column: 1 / -1; font-size: 19px; margin: 24px 0 0; scroll-margin-top: calc(var(--top-h) + 16px); }
.ex { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.ex h3 { font-size: 15px; margin: 0 0 4px; }
.ex p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.ex pre { margin: 0; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; word-break: break-word; font-size: 14px; color: #ddd6fe; }
.ex pre .sy { color: var(--muted); }
.ex .pic { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.ex canvas { max-width: 100%; height: auto; }
.ex .btn { align-self: center; }
@media (max-width: 900px) { #guideList { grid-template-columns: minmax(0, 1fr); } }
