/* AIWeb — perancang (studio). Di atas kit merek (brand.css): hanya token merek, satu aksen. Tanpa atribut style (CSP). */
body.studio { overflow: hidden; background: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--text); }
.flip { transform: rotate(180deg); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ---------- bilah atas ---------- */
.st-bar { position: relative; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--bar, 56px); padding: 0 clamp(12px, 2vw, 20px); background: var(--surface); border-bottom: 1px solid var(--line); }
.st-bar .brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.0625rem/1 var(--font-display); letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.st-bar .brand img { width: 30px; height: 30px; border-radius: 8px; }
.st-bar .sp { flex: 1; }
.st-bar .st-title { color: var(--text-3); font-size: var(--fs-sm); display: none; }
.st-save { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; display: none; }
.st-save.err { color: var(--err); }
.st-save.busy::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: st-pulse 1s ease-in-out infinite; }
@keyframes st-pulse { 50% { opacity: .25; } }
@media (min-width: 900px) { .st-bar .st-title, .st-save { display: inline; } }
.st-bar .seg { display: inline-flex; }
.is-edit #stOrderTop { background: var(--ok); color: #fff; border-color: var(--ok); }

/* ---------- kerangka dua panel ---------- */
.st-app { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); height: calc(100vh - var(--bar, 56px)); height: calc(var(--vvh, 100dvh) - var(--bar, 56px)); }
.st-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.st-tabs { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.st-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; padding: 6px 4px; background: transparent; border: 0; color: var(--text-3); font: 600 .75rem/1.2 var(--font-body); cursor: pointer; transition: color .2s, background-color .2s; -webkit-tap-highlight-color: transparent; }
.st-tab .i { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.st-tab:hover { color: var(--text); background: var(--bg-alt); }
.st-tab[aria-selected="true"] { color: var(--text); }
.st-tab[aria-selected="true"] .i { transform: translateY(-1px) scale(1.1); }
.st-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* garis aksen yang meluncur di bawah tab aktif (posisinya diatur skrip lewat --ix dan --iw) */
.st-ink { position: absolute; left: 0; bottom: -1px; height: 3px; width: var(--iw, 25%); transform: translateX(var(--ix, 0px)); background: var(--accent); border-radius: 3px 3px 0 0; transition: transform .34s var(--ease), width .34s var(--ease); pointer-events: none; }
.st-tab em { position: absolute; top: 6px; right: calc(50% - 26px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 700 .6875rem/18px var(--font-body); font-style: normal; text-align: center; }
.st-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px clamp(14px, 2vw, 22px) 40px; }
.st-panel { display: grid; gap: 16px; align-content: start; }
.st-h { font: 700 1rem/1.3 var(--font-display); letter-spacing: -.01em; margin-top: 8px; }
.st-h:first-child { margin-top: 0; }
.st-hint { font-size: var(--fs-xs); line-height: 1.55; color: var(--text-3); }
.st-fine { margin-top: 4px; }
.st-err { color: var(--err); font-weight: 500; }
.st-err:empty { display: none; }
.st-ok { color: var(--ok); font-weight: 500; }
.st-bad { padding: 10px 12px; border-radius: var(--r-sm); background: var(--err-soft); color: var(--err); font-size: var(--fs-sm); font-weight: 500; }
.st-next { margin-top: 8px; }
.st-next .btn { width: 100%; }

/* ---------- panel kanan ---------- */
.st-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-alt); }
.st-vbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.st-vbar .sp { flex: 1; }
.st-vtag { font: 700 .6875rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.st-stage { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; align-items: stretch; padding: 14px; overflow: hidden; }
.st-frame { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-md); transition: width .35s var(--ease); }
[data-dev="phone"] .st-frame { width: 390px; max-width: 100%; }
[data-dev="tablet"] .st-frame { width: 768px; max-width: 100%; }
.st-mtabs { display: none; }

/* ---------- komponen form ---------- */
.st-f { display: grid; gap: 6px; }
.st-f > label, .st-lbl { font: 600 .8125rem/1.3 var(--font-body); color: var(--text-2); }
.st-in { width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg); color: var(--text); font: 500 .9375rem/1.4 var(--font-body); }
.st-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.st-ta { min-height: 88px; resize: vertical; line-height: 1.5; }
select.st-in { appearance: auto; }
.st-chk { position: relative; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
.st-chk input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }   /* seluruh baris bisa diketuk */
.st-chk i { flex: none; width: 22px; height: 22px; margin-top: -1px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--bg); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.st-chk input:checked + i { background: var(--accent); border-color: var(--accent); }
.st-chk input:checked + i::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--on-accent); border-bottom: 2.5px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px); }
.st-chk input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }
.st-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); }
.st-seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: 600 .8125rem/1 var(--font-body); cursor: pointer; }
.st-seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.st-row2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.st-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.st-restart { margin-top: 4px; }
.icon-btn.st-mini { width: 34px; height: 34px; min-width: 34px; }
.icon-btn.st-mini .i { width: 16px; height: 16px; }
.icon-btn.st-mini[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }

/* gaya dan warna */
.st-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-style { display: grid; gap: 6px; align-content: start; text-align: left; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); color: var(--text); cursor: pointer; font-family: var(--font-body); transition: border-color .15s, background .15s; }
.st-style b { font: 700 .9375rem/1.2 var(--font-display); }
.st-style small { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.4; }
.st-style:hover { border-color: var(--text); }
.st-style[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.st-sw { display: flex; height: 34px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.st-sw i { flex: 1; }
.st-sw.big { height: 56px; }
.st-accents { display: flex; flex-wrap: wrap; gap: 10px; }
.st-acc { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; background: var(--surface); padding: 4px; cursor: pointer; }
.st-acc i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.st-acc[aria-checked="true"] { border-color: var(--text); }

/* foto */
.st-img { display: grid; gap: 8px; }
.st-img.busy, .st-gal.busy { opacity: .6; pointer-events: none; }
.st-img-row { display: flex; align-items: center; gap: 12px; }
.st-img-act { display: flex; flex-wrap: wrap; gap: 8px; }
.st-thumb { position: relative; width: 84px; height: 64px; flex: none; border-radius: var(--r-sm); background: var(--bg-alt); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; color: var(--text-3); }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-bottom: 8px; }
.st-gal-i { display: grid; gap: 6px; }
.st-gal-i .st-thumb { width: 100%; height: 84px; }
.st-gal-i .st-in { min-height: 36px; padding: 6px 8px; font-size: .8125rem; }
.st-gal-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(18, 22, 28, .75); color: #fff; display: grid; place-items: center; cursor: pointer; }
.st-gal-x .i { width: 14px; height: 14px; }

/* tombol: label + tujuan */
.st-btn { display: grid; gap: 8px; }
.st-btn-to { display: grid; gap: 8px; }

/* kartu isian (ikon, produk, ulasan, pertanyaan, sesi) */
.st-items { display: grid; gap: 10px; }
.st-item { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-alt); }
.st-item-h { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-3); }
.st-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.st-icons button { height: 40px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg); color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.st-icons button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.st-shows { display: grid; gap: 10px; }

/* daftar bagian halaman: akordeon beranimasi, pegangan seret 44 px, tombol buka/tutup lebar, ikon mata terpisah */
.st-blocks { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
.st-blk { position: relative; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); transition: border-color .2s, opacity .2s, box-shadow .2s, transform .22s var(--ease); }
.st-blk.open { border-color: var(--text); }
.st-blk.off { opacity: .6; }
.st-blk.new { animation: st-pop .38s var(--ease); }
.st-blk.out { opacity: 0; transform: scale(.96) translateY(-4px); pointer-events: none; transition: opacity .18s, transform .18s; }
.st-blk.flash { animation: st-flash 1.4s ease-out; }
.st-blocks.sorting .st-blk { transition: transform .2s var(--ease), border-color .2s; }
.st-blk.lift { z-index: 6; border-color: var(--accent); box-shadow: 0 14px 34px -12px rgba(18, 22, 28, .45); transition: box-shadow .2s, border-color .2s; }
.st-blk.settle { transition: transform .2s var(--ease), box-shadow .2s; }
.st-blk.no-anim .st-blk-w, .st-blk.no-anim .st-chev { transition: none; }
.st-blk-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; }
.st-grip { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-3); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.st-grip .i { width: 20px; height: 20px; }
.st-grip:hover, .st-grip.grab { color: var(--text); background: var(--bg-alt); }
.st-grip.grab { cursor: grabbing; }
.st-grip:focus-visible { outline: 3px solid var(--accent); outline-offset: -2px; }
.st-blk-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; background: transparent; border: 0; border-radius: var(--r-sm); color: var(--text); text-align: left; cursor: pointer; font-family: var(--font-body); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.st-blk-t:focus-visible, .st-eye:focus-visible, .st-act:focus-visible { outline: 3px solid var(--accent); outline-offset: -2px; }
.st-blk-t > .i:first-child { color: var(--accent-text); flex: none; }
.st-blk-t span { flex: 1; min-width: 0; display: grid; }
.st-blk-t b { font: 700 .875rem/1.2 var(--font-body); }
.st-blk-t small { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-chev { transition: transform .28s var(--ease); flex: none; }
.st-blk.open .st-chev { transform: rotate(180deg); }
.st-eye { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .15s, color .15s; }
.st-eye .i { width: 18px; height: 18px; }
.st-eye:hover { background: var(--bg-alt); }
.st-eye[aria-pressed="true"] { color: var(--text-3); background: var(--accent-soft); }
.st-eye[aria-pressed="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; border-radius: 1px; background: currentColor; transform: rotate(-38deg); }
/* isi bagian membuka dengan tinggi yang mengalir (0fr -> 1fr); yang tertutup tidak bisa difokus */
.st-blk-w { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.st-blk.open > .st-blk-w { grid-template-rows: 1fr; }
.st-blk-b { position: relative; min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear .3s; }   /* relative: kolom file tersembunyi (absolut) ikut terpotong, tidak memperpanjang area gulir */
.st-blk.open > .st-blk-w > .st-blk-b { visibility: visible; transition-delay: 0s; }
.st-blk-bi { display: grid; gap: 14px; margin: 0 0 0; padding: 14px 14px 16px; border-top: 1px solid var(--line); }
.st-blk.open .st-blk-bi { overflow: visible; }
/* bilah aksi di dalam bagian: tombol berlabel, "Hapus" terpisah di ujung agar tidak salah ketuk */
.st-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-acts-sp { flex: 1 1 12px; }
.st-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--text); font: 600 .8125rem/1 var(--font-body); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .15s, border-color .15s, transform .12s, opacity .15s; }
.st-act .i { width: 16px; height: 16px; flex: none; }
.st-act:hover:not([disabled]) { border-color: var(--text); background: var(--bg-alt); }
.st-act:active:not([disabled]) { transform: scale(.96); }
.st-act[disabled] { opacity: .35; cursor: not-allowed; }
.st-act-del { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.st-act-del:hover:not([disabled]) { background: var(--err-soft); border-color: var(--err); }
.st-addbtn { width: 100%; margin-top: 4px; }
.st-addgrid { display: grid; gap: 8px; }
.st-add { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); color: var(--text); cursor: pointer; font-family: var(--font-body); }
.st-add:hover:not([disabled]) { border-color: var(--text); }
.st-add[disabled] { opacity: .45; cursor: not-allowed; }
.st-add > .i { color: var(--accent-text); flex: none; width: 24px; height: 24px; }
.st-add b { display: block; font: 700 .875rem/1.2 var(--font-body); }
.st-add small { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }

/* paket dan pemesanan */
.st-pkgs { display: grid; gap: 10px; }
.st-pkg { position: relative; display: grid; gap: 6px; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); cursor: pointer; }
.st-pkg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.st-pkg.on, .st-pkg:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.st-pkg:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.st-pkg-h { display: flex; align-items: center; gap: 8px; }
.st-pkg-h b { font: 800 1.0625rem/1.2 var(--font-display); }
.st-pkg-h em { font: 700 .6875rem/1 var(--font-body); font-style: normal; padding: 4px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-transform: uppercase; letter-spacing: .04em; }
.st-pkg-p { font: 800 1.5rem/1.1 var(--font-display); letter-spacing: -.02em; }
.st-pkg small { color: var(--text-3); font-size: var(--fs-xs); }
.st-pkg ul { display: grid; gap: 3px; padding: 0; margin: 4px 0 0; list-style: none; font-size: var(--fs-xs); color: var(--text-2); }
.st-pkg li::before { content: "✓"; color: var(--accent-text); font-weight: 700; margin-right: 6px; }
.st-meters { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-alt); }
.st-meter-t { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-2); margin-bottom: 4px; }
.st-meter .st-track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.st-meter .st-track i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: 3px; transition: width .3s; }
.st-meter.bad .st-track i { background: var(--err); }
.st-meter.bad .st-meter-t b { color: var(--err); }
.st-issues { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--r-sm); background: var(--warn-soft); font-size: var(--fs-xs); color: var(--text-2); }
.st-issues b { display: block; margin-bottom: 4px; color: var(--text); font-size: var(--fs-sm); }
.st-issues ul { display: grid; gap: 4px; padding-left: 18px; margin: 0; }
.st-closed { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-alt); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-2); }
.st-vrow { display: flex; gap: 8px; }
.st-vrow .st-in { flex: 1; }
.st-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.st-total b { font: 800 1.5rem/1 var(--font-display); letter-spacing: -.02em; }
.st-agree { margin-top: 4px; }
.st-agree a { color: var(--accent-text); }
.st-go { width: 100%; margin-top: 4px; }
.st-go.loading { opacity: .8; pointer-events: none; }

/* layar awal */
dialog.st-dlg { border: 0; padding: 0; background: transparent; max-width: min(720px, 94vw); width: 100%; color: var(--text); }
dialog.st-dlg::backdrop { background: rgba(18, 22, 28, .6); }
.st-dlg-in { background: var(--surface); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow-lg); max-height: 92vh; overflow: auto; }
.st-dlg-in h2 { font: 800 clamp(1.4rem, 3vw, 1.9rem)/1.15 var(--font-display); letter-spacing: -.02em; margin-bottom: 8px; }
.st-dlg-in > p { color: var(--text-2); margin-bottom: 18px; }
.st-start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.st-start-card { display: grid; gap: 8px; align-content: start; text-align: left; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); color: var(--text); cursor: pointer; font-family: var(--font-body); transition: transform .15s, border-color .15s; }
.st-start-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.st-start-card b { font: 800 1rem/1.2 var(--font-display); }
.st-start-card small { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.45; }
.st-start-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#stBoot { position: absolute; inset: var(--bar, 56px) 0 0 0; z-index: 20; display: grid; place-items: center; background: var(--bg); padding: 24px; text-align: center; font-size: var(--fs-lead); }
.st-noscript { padding: 40px 20px; max-width: 560px; margin: 0 auto; text-align: center; }

/* ---------- tablet dan ponsel ----------
   720-899 px (tablet tegak): tetap dua panel, panel pratinjau lebih sempit tanpa pilihan ukuran perangkat.
   di bawah 720 px (ponsel): satu panel, ganti lewat bilah bawah [Urungkan | Ubah | Pratinjau | Ulangi]. */
@media (max-width: 899px) {
  [data-dev="phone"] .st-frame, [data-dev="tablet"] .st-frame { width: 100%; }
  .st-vbar .st-devs { display: none; }
}
@media (min-width: 720px) and (max-width: 899px) {
  .st-app { grid-template-columns: minmax(320px, 380px) minmax(0, 1fr); }
  .st-tab span { font-size: .6875rem; }
}
@media (max-width: 719px) {
  .st-app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; height: calc(100vh - var(--bar, 56px)); height: calc(var(--vvh, 100dvh) - var(--bar, 56px)); }
  .st-side, .st-view { grid-row: 1; grid-column: 1; }
  .st-app[data-m="edit"] .st-view { display: none; }
  .st-app[data-m="view"] .st-side { display: none; }
  .st-mtabs { display: grid; grid-template-columns: 56px 1fr 1fr 56px; grid-row: 2; border-top: 1px solid var(--line); background: var(--surface); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .st-mtabs button { position: relative; min-height: 54px; border: 0; background: transparent; color: var(--text-3); font: 700 .8125rem/1 var(--font-body); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border-top: 3px solid transparent; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: color .2s, border-color .2s, background-color .2s; }
  .st-mtabs button[aria-pressed="true"] { color: var(--text); border-top-color: var(--accent); }
  .st-mtabs .st-mh { color: var(--text-2); border-top-color: transparent; }
  .st-mtabs .st-mh:active:not([disabled]) { background: var(--bg-alt); }
  .st-mtabs .st-mh[disabled] { opacity: .3; }
  .st-mtabs .st-mh .i { width: 22px; height: 22px; }
  .st-stage { padding: 8px; }
  .st-bar { gap: 8px; padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
  .st-bar .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}
@media (min-width: 900px) { .st-row2 { grid-template-columns: 1fr 1fr; } }
.flip-x { transform: scaleX(-1); }

/* ---------- gerak: panel, kartu, toast, kesiapan ---------- */
.st-panel:not([hidden]) { animation: st-in .3s var(--ease) both; }
@keyframes st-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes st-pop { 0% { opacity: 0; transform: translateY(-8px) scale(.97); } 100% { opacity: 1; transform: none; } }
@keyframes st-flash { 0% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 4px transparent; } }
@keyframes st-bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }
.st-item { transition: opacity .17s, transform .17s; }
.st-item.new { animation: st-pop .34s var(--ease); }
.st-item.out { opacity: 0; transform: scale(.97); }
.st-hist { display: none; align-items: center; }
@media (min-width: 720px) { .st-hist { display: inline-flex; gap: 8px; } }
.st-hist .icon-btn { border-color: transparent; }
.st-hist .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.st-hist .icon-btn:hover:not([disabled]) { background: var(--bg-alt); }
.st-vbar { position: relative; overflow: hidden; }
.st-app[data-busy="1"] .st-vbar::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 36%; background: var(--accent); animation: st-bar 1.1s ease-in-out infinite; }
.st-dot { position: absolute; top: 13px; left: calc(50% + 44px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); animation: st-pulse 1.4s ease-in-out infinite; }
.st-toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 320; width: max-content; max-width: min(92vw, 520px); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.st-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.st-toast-in { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 20px; min-height: 52px; border-radius: 999px; background: var(--text); color: var(--bg); font: 600 .9375rem/1.3 var(--font-body); box-shadow: 0 14px 34px -10px rgba(18, 22, 28, .55); }
.st-toast-act { flex: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 .875rem/1 var(--font-body); cursor: pointer; touch-action: manipulation; }
.st-toast-act:active { transform: scale(.95); }
.st-toast-act:focus-visible { outline: 3px solid var(--bg); outline-offset: 2px; }
/* tombol Feedback menempati sudut kanan-bawah: pesan singkat berdiri di atasnya (ponsel) atau menyisakan ruang di sampingnya (layar lebar), dan ujung daftar bisa digulir sampai bebas darinya */
@media (max-width: 719px) { .st-toast { bottom: calc(54px + 14px + 52px + 10px + env(safe-area-inset-bottom)); } }
@media (min-width: 720px) { .st-toast { max-width: min(92vw, 520px, calc(100vw - 340px)); } }

/* kartu kesiapan di tab Pesan */
.st-ready { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-alt); }
.st-ready-h { display: flex; align-items: baseline; justify-content: space-between; font-size: var(--fs-sm); }
.st-ready-n { font: 700 .8125rem/1 var(--font-body); color: var(--text-2); }
.st-ready-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.st-ready-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: 4px; transition: width .5s var(--ease), background-color .3s; }
.st-ready.all .st-ready-bar i { background: var(--ok); }
.st-ready-l { display: grid; gap: 8px; padding: 0; margin: 4px 0 0; list-style: none; }
.st-ready-l li { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: var(--fs-xs); color: var(--text-2); }
.st-ready-l li.todo { color: var(--text); font-weight: 600; }
.st-ready-ic { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--bg); }
.st-ready-l li.ok .st-ready-ic { background: var(--ok); border-color: var(--ok); color: #fff; animation: st-pop .3s var(--ease); }
.st-ready-ic .i { width: 13px; height: 13px; }
.st-ready-t { flex: 1; min-width: 0; line-height: 1.35; }
.st-ready-go { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--text); font: 600 .75rem/1 var(--font-body); cursor: pointer; touch-action: manipulation; }
.st-ready-go .i { width: 14px; height: 14px; }
.st-ready-go:hover { border-color: var(--text); }

/* efek tekan yang terasa di layar sentuh, dan hover hanya untuk penunjuk yang bisa hover */
.st-style:active, .st-start-card:active, .st-add:active:not([disabled]), .st-pkg:active, .st-acc:active { transform: scale(.98); }
.st-style, .st-add, .st-pkg, .st-acc, .st-start-card { transition: border-color .15s, background .15s, transform .12s var(--ease); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ---------- layar sentuh: target >= 44 px dengan jarak, huruf isian >= 16 px (tanpa zoom otomatis iOS), tanpa tarik-untuk-muat-ulang ---------- */
@media (pointer: coarse) {
  :root { --bar: 60px; }
  body.studio { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
  .st-bar .brand { min-width: 44px; min-height: 44px; }
  .st-hint a, .st-agree a, .fb-priv a { padding-block: 16px; margin-block: -16px; }
  .st-in { font-size: 16px; min-height: 48px; padding: 12px 14px; }
  .st-ta { min-height: 96px; }
  .btn-sm { --h: 44px; }
  .btn, .icon-btn, .st-seg button, .seg button, .st-tab, .st-chk, label.btn { touch-action: manipulation; }
  .seg button { min-width: 44px; height: 44px; }
  .st-bar .seg { padding: 3px; }
  .icon-btn.st-mini { width: 44px; height: 44px; min-width: 44px; }
  .st-item-h { min-height: 44px; }
  .st-chk { min-height: 44px; align-items: center; padding: 6px 0; }
  .st-chk i { width: 26px; height: 26px; margin-top: 0; }
  .st-seg button { min-height: 44px; padding: 0 18px; }
  .st-icons { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
  .st-icons button { height: 48px; }
  .st-accents { gap: 12px; }
  .st-acc { width: 48px; height: 48px; }
  .st-gal-grid { gap: 12px; }
  .st-gal-x { top: 2px; right: 2px; width: 40px; height: 40px; background: transparent; }
  .st-gal-x::before { content: ""; position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(18, 22, 28, .78); z-index: -1; }
  .st-gal-x .i { width: 16px; height: 16px; }
  .st-gal-i .st-in { min-height: 44px; font-size: 16px; }
  .st-img-act { gap: 10px; }
  .st-tab { min-height: 62px; }
  .st-pkg { padding: 16px; }
  .st-scroll { padding-bottom: calc(40px + env(safe-area-inset-bottom)); scroll-padding-bottom: 120px; }
  .st-add { min-height: 64px; }
  .st-ready-go { min-height: 44px; padding: 0 16px; }
  .st-ready-l li { min-height: 44px; }
  .st-grip { cursor: default; }
  .st-start-card:hover { transform: none; }
}
@media (hover: none) { .st-start-card:hover { transform: none; } }
@media (max-width: 719px) { .st-scroll { padding-bottom: 88px; } }      /* sesudah aturan layar sentuh: bagian paling bawah bisa digulir ke atas tombol Feedback */
@media (max-height: 520px) and (orientation: landscape) { .st-mtabs button { min-height: 46px; } .st-tab { min-height: 48px; } .fb-fab { bottom: calc(46px + 10px + env(safe-area-inset-bottom)); } }

/* ---------- Feedback: tombol melayang di pojok kanan bawah + dialog (lembar bawah di ponsel) ---------- */
.fb-fab { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font: 700 .9375rem/1 var(--font-body); letter-spacing: -.005em; box-shadow: 0 10px 28px -10px rgba(18, 22, 28, .55); cursor: pointer; opacity: 0; transform: translateY(18px) scale(.9); pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease), box-shadow .2s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fb-fab.in { opacity: 1; transform: none; pointer-events: auto; }
.fb-fab .i { width: 22px; height: 22px; flex: none; }
.fb-fab:active { transform: scale(.95); }
.fb-fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
html.fb-open .fb-fab { visibility: hidden; }
html.st-kb .fb-fab { opacity: 0; transform: translateY(18px) scale(.9); pointer-events: none; }     /* papan ketik terbuka: tidak menutupi isian */
@media (hover: hover) { .fb-fab:hover { box-shadow: 0 14px 34px -10px rgba(18, 22, 28, .65); transform: translateY(-2px); } }
dialog.fb-dlg { border: 0; padding: 0; background: transparent; color: var(--text); width: min(580px, calc(100vw - 24px)); max-width: none; max-height: none; overflow: visible; }
dialog.fb-dlg::backdrop { background: rgba(18, 22, 28, .6); backdrop-filter: blur(2px); }
dialog.fb-dlg.dropping .fb-in { outline: 3px dashed var(--accent); outline-offset: -8px; }
.fb-in { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); max-height: min(92vh, 880px); max-height: min(92dvh, 880px); overflow: hidden; }
dialog.fb-dlg[open] .fb-in { animation: fb-pop .3s var(--ease); }
.fb-grab { display: none; }
.fb-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 12px 6px 22px; }
.fb-h h2 { font: 800 1.35rem/1.15 var(--font-display); letter-spacing: -.02em; }
.fb-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 22px 0; }
.fb-done { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
.fb-form { display: grid; gap: 18px; }
.fb-lead { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.fb-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fb-type { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 68px; padding: 10px 8px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); color: var(--text-2); font: 600 .8125rem/1.2 var(--font-body); text-align: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .12s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fb-type .i { width: 22px; height: 22px; }
.fb-type[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: 0 0 0 1px var(--accent) inset; }
.fb-type:active { transform: scale(.97); }
.fb-type:focus-visible, .fb-star:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fb-rate { display: grid; gap: 8px; }
.fb-stars { display: flex; gap: 6px; }
.fb-star { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--line-strong); cursor: pointer; transition: color .15s, transform .15s var(--ease); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fb-star .i { width: 30px; height: 30px; }
.fb-star.on { color: var(--accent); transform: scale(1.06); }
.fb-star.on .i { fill: currentColor; }
.fb-star:active { transform: scale(.9); }
.fb-count { justify-self: end; font-size: var(--fs-xs); color: var(--text-3); margin-top: -2px; }
.fb-err:empty { display: none; }
.fb-shot { display: grid; gap: 8px; }
.fb-shot-box { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.fb-pick { cursor: pointer; position: relative; }
.fb-pick:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.fb-thumb { width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--bg-alt); display: grid; place-items: center; max-height: 220px; }
.fb-thumb img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; }
.fb-thumb-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
.fb-thumb-act small { flex: 1 1 200px; }
.fb-priv a { color: var(--accent-text); }
.fb-bad[hidden] { display: none; }
.fb-act { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; margin: 4px -22px 0; padding: 12px 22px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.fb-send { min-width: 180px; }
.fb-send.loading { opacity: .8; pointer-events: none; }
.fb-done { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 8px 0 4px; }
.fb-done .btn { min-width: 200px; }
.fb-done-t { font: 800 1.5rem/1.15 var(--font-display); letter-spacing: -.02em; }
.fb-ok { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #fff; animation: fb-ok .5s var(--ease); }
.fb-ok .i { width: 32px; height: 32px; }
@keyframes fb-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fb-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fb-ok { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@media (min-width: 520px) { .fb-types { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 719px) {
  .fb-fab { bottom: calc(54px + 14px + env(safe-area-inset-bottom)); width: 52px; padding: 0; }
  .fb-fab-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}
@media (max-width: 639px) {
  dialog.fb-dlg { width: 100%; margin: auto 0 0; }
  .fb-in { border-radius: 24px 24px 0 0; max-height: 94vh; max-height: 94dvh; }
  dialog.fb-dlg[open] .fb-in { animation: fb-sheet .34s var(--ease); }
  .fb-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; }
  .fb-h { padding-top: 10px; }
  .fb-act { flex-direction: column-reverse; }
  .fb-act .btn { width: 100%; min-height: 52px; }
}
/* orang yang meminta gerak dikurangi: semua animasi dan transisi praktis dimatikan (urutan, buka-tutup, dan geser tetap berfungsi, hanya tanpa gerak) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .st-app[data-busy="1"] .st-vbar::after { animation: none; width: 100%; opacity: .5; }
}
