/* MotionCraft — Light Editorial + dark theme. Lihat DESIGN.md.
   Dua tema lewat [data-theme] di <html>: light (default, paper) & dark.
   Semua warna lewat variabel — komponen tidak pernah hardcode warna. */

:root,
[data-theme="light"] {
  --paper: #F6F4EF;
  --panel: #FFFFFF;
  --ink: #1A1917;
  --muted: #6B665C;
  --line: #DED9CE;
  --line-soft: #EAE6DD;
  --soft-bg: #FBFAF7;
  --checker: #EFEBE2;
  --badge-bg: #EFEAE2;
  --ink-soft: #8A8478;
  --accent: #C8401F;
  --accent-hover: #B03717;
  --accent-ink: #FFFFFF;
  --accent-soft-bg: #F7E7DF;
  --accent-soft-border: #EDD3C6;
  --accent-soft-ink: #8A3A1E;
  --ok: #2F6B3C;
  --warn: #9A6B00;
  --err: #A32B1C;
  --shadow-stage: 0 1px 2px rgba(26,25,23,.04), 0 8px 28px rgba(26,25,23,.06);
  --shadow-modal: 0 24px 64px rgba(26,25,23,.28);
  --code-bg: #23211D;
  --code-ink: #D8D3C7;
  --code-comment: #8A8478;
}

[data-theme="dark"] {
  --paper: #171613;
  --panel: #201E1A;
  --ink: #EDEAE2;
  --muted: #A59E90;
  --line: #3A3730;
  --line-soft: #2B2823;
  --soft-bg: #23211D;
  --checker: #2A2722;
  --badge-bg: #2B2823;
  --ink-soft: #8F897C;
  --accent: #E05532;
  --accent-hover: #EA6A47;
  --accent-ink: #FFFFFF;
  --accent-soft-bg: #3A231A;
  --accent-soft-border: #4E2E20;
  --accent-soft-ink: #E8A184;
  --ok: #7FB98A;
  --warn: #D9B24C;
  --err: #E0765F;
  --shadow-stage: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
  --shadow-modal: 0 24px 64px rgba(0,0,0,.55);
  --code-bg: #14120F;
  --code-ink: #D8D3C7;
  --code-comment: #6E685C;
}

:root {
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --s1: 6px; --s2: 10px; --s3: 16px; --s4: 24px; --s5: 36px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
/* atribut hidden HARUS menang atas display apapun (class dgn display:flex
   menimpa rule UA [hidden] kalau tidak dipaksa — bug "Nothing running yet"). */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.wordmark { display: flex; align-items: center; gap: var(--s2); }
.mark-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.mark { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.mark em { font-style: normal; color: var(--accent); }
.mark-sub { font-size: 10px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.tag { color: var(--muted); font-size: 11px; }
.topbar-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.topbar-link { color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none; }
.topbar-link:hover { color: var(--ink); }
/* chip topbar: SATU gaya utk Galeri + badge trial, tiru tombol Panduan
   (.btn-quiet.btn-sm). Panduan = acuan. */
.topbar-chip {
  display: inline-flex; align-items: center;
  font-family: var(--font-body); font-size: 11px; font-weight: 500; line-height: 18px;
  padding: 5px 10px; border-radius: var(--r-sm);
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
a.topbar-chip:hover { border-color: var(--muted); }
.license-badge { cursor: default; }
.license-ok { background: var(--accent-soft-bg); border-color: var(--accent-soft-border); color: var(--accent-soft-ink); }
.engine-unknown { color: var(--muted); font-size: 11px; }
.engine-ok { color: var(--ok); font-size: 11px; }
.engine-off { color: var(--err); font-size: 11px; }

/* tombol tema: satu ikon tampil per tema */
#btn-theme { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; }
#btn-theme svg { width: 16px; height: 16px; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---------- workspace: brief kiri | stage kanan, kode = drawer ---------- */
.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 420px) 1fr;
  gap: 0;
  min-height: calc(100vh - 61px);
}
.col { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.col.brief { border-right: 1px solid var(--line); }
.col h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  margin: 0; letter-spacing: -0.01em;
}
.col-hint { color: var(--muted); font-size: 13px; margin: calc(-1 * var(--s2)) 0 0; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.field > span { font-weight: 500; letter-spacing: 0.01em; }
.field.grow { flex: 1; min-height: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }

input, select, textarea {
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  width: 100%;
}
select { cursor: pointer; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus,
.btn-quiet:focus-visible, .btn-accent:focus-visible, .btn-icon:focus-visible,
.preset:focus-visible, .check input:focus-visible + span, #btn-theme:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

/* ---------- buttons ---------- */
.btn-accent, .btn-quiet, .btn-icon {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  border-radius: var(--r-sm); cursor: pointer; border: 1px solid transparent;
  padding: 9px 14px; white-space: nowrap;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-accent:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-quiet { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--muted); }
.btn-quiet:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-icon { background: transparent; border: 0; font-size: 18px; line-height: 1; color: var(--muted); padding: 4px 8px; }
.btn-icon:hover { color: var(--ink); }
.wide { width: 100%; }

/* ---------- reference block ---------- */
.ref-block {
  border: 1px solid var(--line-soft); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: var(--s2) var(--s3); background: var(--soft-bg);
  display: flex; flex-direction: column; gap: 6px;
}
.check-ref { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check-ref input { width: auto; accent-color: var(--accent); }
.ref-hint { margin: 0; font-size: 10px; color: var(--muted); }
#ref-note { font-size: 11px; }
#ref-note:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- prompt block ---------- */
.prompt-block { display: flex; flex-direction: column; gap: var(--s1); }
.block-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); font-weight: 500; }
.mono-box {
  font-family: var(--font-mono); font-size: 10px; line-height: 1.6;
  background: var(--soft-bg); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: var(--s2); white-space: pre-wrap; word-break: break-word;
  max-height: 320px; overflow: auto; margin: 0; color: var(--ink);
}
textarea.mono-box { max-height: 260px; resize: vertical; }

/* ---------- preview ---------- */
.stage-head { display: flex; align-items: baseline; gap: var(--s3); }
.stage-stats { margin-left: auto; display: flex; gap: var(--s3); font-size: 11px; color: var(--muted); }
.stage-stats b { color: var(--ink); font-weight: 600; }
/* wrap TIDAK boleh flex: di kolom flex-column ia akan melar mengisi sisa
   tinggi dan mendorong preview ke tengah -> muncul celah besar di atas/bawah.
   Cukup blok biasa, preview nempel langsung di bawah hint. */
.viewport-wrap { position: relative; align-self: flex-start; width: 100%; }
.viewport {
  /* rasio & batas tinggi diatur dari JS (ikut ukuran kanvas user).
     width:auto + max-width:100% supaya kotak menyusut dari tinggi, bukan
     melar ke lebar kolom (itu yang dulu bikin celah besar di bawah preview). */
  position: relative; width: auto; max-width: 100%; aspect-ratio: 16 / 9;
  max-height: min(62vh, 640px);
  margin-inline: auto;
  background:
    linear-gradient(45deg, var(--checker) 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, transparent 75%, var(--checker) 75%) 0 0 / 20px 20px,
    var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-stage);
}
.viewport iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.stage-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: var(--s4); color: var(--muted); font-size: 11px;
}
.stage-badge { position: absolute; top: 8px; right: 8px; }
.stage-badge span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; }

.transport { display: flex; align-items: center; gap: var(--s2); }
.transport-spacer { flex: 1; }
.timecode { font-size: 10px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.check input { width: auto; accent-color: var(--accent); }

/* ---------- queue bar (preview sebelum bulk export) ---------- */
.queue-bar {
  display: flex; align-items: center; gap: var(--s2);
  border: 1px solid var(--line-soft); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: var(--s2) var(--s3); background: var(--soft-bg);
}
.q-title { font-size: 11px; font-weight: 500; color: var(--ink); }
.q-label { font-size: 10px; color: var(--muted); }
.btn-sm { padding: 6px 10px; font-size: 11px; }

/* ---------- code drawer (collapsible, di bawah stage) ---------- */
.code-drawer { border-top: 1px solid var(--line); margin: var(--s2) calc(-1 * var(--s4)) calc(-1 * var(--s4)); }
@media (max-width: 560px) {
  /* margin negatif full-bleed melewati lebar layar di mobile */
  .code-drawer { margin-left: calc(-1 * var(--s3)); margin-right: calc(-1 * var(--s3)); }
}
.code-drawer-head {
  display: flex; align-items: center; gap: var(--s2);
  padding: 12px var(--s4); cursor: pointer; user-select: none;
  background: var(--soft-bg);
}
.code-drawer-head:hover { background: var(--checker); }
.code-drawer-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.code-drawer-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 13px; margin: 0; }
.code-drawer-head .drawer-badge { font-size: 10px; color: var(--muted); font-family: var(--font-mono); }
/* chevron = penanda drawer bisa dibuka/ditutup; dibikin jelas (kotak kecil) */
.code-drawer-head .chev {
  margin-left: auto; color: var(--ink);
  transition: transform .15s ease;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--panel);
}
.code-drawer-head:hover .chev { border-color: var(--muted); }
.code-drawer.open .code-drawer-head .chev { transform: rotate(180deg); }
.code-body { display: none; padding: var(--s3) var(--s4) var(--s4); flex-direction: column; gap: var(--s2); }
.code-drawer.open .code-body { display: flex; }
.code-actions { display: flex; gap: var(--s2); }
.action-spacer { flex: 1; }
.bulk-row { display: flex; align-items: center; gap: var(--s2); }
.bulk-row .mono { font-size: 10px; color: var(--muted); }
.code-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); font-family: var(--font-mono); min-height: 15px; }
.warn { color: var(--warn); }

/* ---------- CSV metadata: section terpisah full-width ---------- */
.meta-section { border-top: 1px solid var(--line); background: var(--soft-bg); }
.meta-inner { max-width: 1400px; margin: 0 auto; padding: var(--s3) var(--s4) var(--s4); display: grid; grid-template-columns: 1fr auto; gap: var(--s4); align-items: start; }
.meta-title { display: flex; align-items: baseline; gap: var(--s2); margin-bottom: 10px; }
.meta-title h3 { font-family: var(--font-display); font-weight: 600; font-size: 14px; margin: 0; }
.meta-count { font-style: normal; color: var(--muted); font-weight: 400; font-size: 11px; }
.meta-list { list-style: none; margin: 0; padding: 0; max-height: 140px; overflow-y: auto; }
.meta-list li { font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line-soft); display: flex; justify-content: space-between; gap: 8px; }
.meta-list code { font-family: var(--font-mono); font-size: 12px; }
.meta-src { color: var(--muted); white-space: nowrap; }
/* baris seed (anti-duplikat aset) */
.seed-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; }
.seed-row .btn-sm { flex: 0 0 auto; }
.seed-info { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.meta-empty { color: var(--muted); font-style: italic; }
/* peringatan validasi metadata (keyword <25, brand, kategori salah) */
.meta-warn {
  margin: 6px 0 0; font-size: 10.5px; line-height: 1.5; color: var(--accent);
  border-left: 2px solid var(--accent); padding-left: 8px;
}
.toolbar-row { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
.meta-actions .btn-quiet { width: 100%; }
.meta-note { font-size: 10px; color: var(--muted); line-height: 1.5; margin: 0; max-width: 200px; }

/* ---------- modal ---------- */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; background: rgba(10,9,7,0.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: var(--s4); }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); width: min(560px, 100%); overflow: hidden; box-shadow: var(--shadow-modal); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin: 0; }
.modal-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line-soft); }

.preset-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); }
.preset {
  text-align: left; font-family: var(--font-body); font-size: 11px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.preset small { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.preset.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.preset:hover { border-color: var(--muted); }

.estimate { font-size: 10px; color: var(--muted); }
.progress { display: flex; align-items: center; gap: var(--s2); }
.progress-track { flex: 1; height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--accent); transition: width 0.2s ease; }
#export-text { font-size: 10px; color: var(--muted); min-width: 38px; text-align: right; }

/* ---------- panduan modal (pola Vektora: tabs + langkah bernomor) ---------- */
.guide-card { width: min(680px, 100%); }
.guide-tabs { display: flex; gap: 4px; padding: 0 var(--s4); border-bottom: 1px solid var(--line-soft); }
.tab {
  padding: 9px 14px; font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; border: 0; background: transparent; font-family: var(--font-body);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.sel { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.guide-lede { font-size: 13px; line-height: 1.65; color: var(--ink); margin: 0; }
.guide-lede b { font-weight: 600; }
.steps { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft-bg); color: var(--accent-soft-ink);
  font-weight: 600; font-size: 12px; display: grid; place-items: center;
}
.step .txt { font-size: 13px; line-height: 1.6; padding-top: 4px; }
.step .txt b { font-weight: 600; }
.kbd { display: inline-block; background: var(--badge-bg); border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 8px; font-size: 11px; font-weight: 600; color: var(--ink); }
.tip {
  display: flex; gap: 10px; background: var(--accent-soft-bg); border: 1px solid var(--accent-soft-border);
  border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 1.6; color: var(--accent-soft-ink); margin: 0;
}
.tip b { font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr; }
  .col.brief { border-right: 0; border-bottom: 1px solid var(--line); }
  .viewport { aspect-ratio: 16 / 9; }
  .meta-inner { grid-template-columns: 1fr; }
  .meta-actions { flex-direction: row; min-width: 0; }
  .meta-actions .btn-quiet { width: auto; }
}
@media (max-width: 560px) {
  .topbar { padding: var(--s2) var(--s3); }
  .tag { display: none; }
  .mark { font-size: 17px; }
  .mark-sub { font-size: 10px; }
  .col { padding: var(--s3); }
  .grid-2, .grid-3, .preset-row { grid-template-columns: 1fr; }
  .stage-stats { display: none; }
  .meta-actions { flex-direction: column; }
  .meta-actions .btn-quiet { width: 100%; }
}

/* ---------- License gate ---------- */
body.locked > *:not(#license-gate) { filter: blur(6px); pointer-events: none; user-select: none; }
body.locked #license-gate { display: flex; }
#license-gate { position: fixed; inset: 0; display: none; z-index: 100; }
#license-gate .modal-card { width: min(440px, 92vw); }
#lic-form { display: flex; flex-direction: column; gap: 14px; }
#lic-btn { width: 100%; padding: 10px 0; }
#btn-lic-logout[hidden] { display: none; }

/* ---------- Pemeriksaan hasil (critique.js) ---------- */
.critique-note {
  margin-top: var(--s2);
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-border);
  border-radius: var(--r-sm);
  padding: var(--s2);
}
.critique-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s2); margin-bottom: var(--s1);
}
.critique-head span {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent-soft-ink);
}
.critique-head button { font-size: 11px; padding: 2px 8px; }
.critique-list {
  margin: 0 0 var(--s1); padding-left: 16px;
  font-family: var(--font-body); font-size: 12px; line-height: 1.5;
  color: var(--ink);
}
.critique-list li { margin-bottom: 3px; }
.critique-foot { font-size: 10px; color: var(--muted); margin: 0; }

/* toast: dipakai MC_toast, sebelumnya dipanggil tanpa pernah didefinisikan */
#mc-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
  max-width: min(560px, 90vw);
  background: var(--ink); color: var(--paper);
  font-family: var(--font-body); font-size: 12px; line-height: 1.5;
  padding: 10px 14px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-modal);
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
  z-index: 90;
}
#mc-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Modal pemeriksaan hasil ---------- */
.crit-lead {
  font-family: var(--font-body); font-size: 13px; line-height: 1.55;
  color: var(--ink); margin: 0 0 var(--s2);
}
.crit-modal-list {
  margin: 0 0 var(--s3); padding-left: 20px;
  font-family: var(--font-body); font-size: 13px; line-height: 1.6; color: var(--ink);
}
.crit-modal-list li { margin-bottom: 6px; }
.crit-modal-list li.berat { color: var(--accent-soft-ink); font-weight: 600; }
.crit-fix {
  background: var(--soft-bg); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: var(--s2); margin-bottom: var(--s3);
}
.crit-fix-label {
  display: block; font-family: var(--font-body); font-size: 10px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}
.crit-fix .mono-box { max-height: 150px; background: transparent; border: 0; padding: 0; }
.crit-actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s2); }
.crit-foot { font-size: 10px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Catatan kecil di bawah sebuah field (mis. penjelasan kategori).
   Sengaja 11px dan muted supaya tidak bersaing dengan label field. */
.field-note { font-size: 11px; line-height: 1.45; color: var(--muted); opacity: 0.85; }

/* Badge hasil ukur gerak di label antrean bulk.
   BEKU = merah (harus digenerate ulang), persen = hijau/abu (terukur hidup). */
.q-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em; vertical-align: 1px;
  font-variant-numeric: tabular-nums; }
.q-badge-beku { background: var(--accent); color: #fff; }
.q-badge-hidup { background: var(--soft-bg); color: var(--muted); border: 1px solid var(--line-soft); }
.bulk-warn { color: var(--accent); font-weight: 600; }

/* panel cek standar platform (di bawah preview) */
.platform-check {
  margin-top: var(--s3); padding: var(--s3) var(--s3) 10px;
  border: 1px solid var(--line-soft); border-radius: 10px; background: var(--soft-bg);
}
.platform-check .block-head { margin-bottom: 8px; }
.pc-verdict { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pc-rows { display: flex; flex-direction: column; gap: 4px; }
.pc-row {
  display: grid; grid-template-columns: 92px 1fr 1fr; gap: 8px; align-items: center;
  font-size: 11.5px; line-height: 1.35;
}
.pc-label { color: var(--muted); }
.pc-sel {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px;
  border-radius: 6px; background: var(--paper); border: 1px solid var(--line-soft);
  font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-sel b { font-weight: 700; width: 10px; text-align: center; }
.pc-ok { color: #1b7f4b; border-color: rgba(27,127,75,.35); }
.pc-warn { color: #9a6200; border-color: rgba(154,98,0,.35); }
.pc-fail { color: #b3261e; border-color: rgba(179,38,30,.35); }
.pc-belum { color: var(--muted); }
.pc-note { margin: 8px 0 0; font-size: 10.5px; line-height: 1.45; color: var(--muted); }
@media (max-width: 900px) {
  .pc-row { grid-template-columns: 78px 1fr 1fr; }
}
