/* Gema Creative Lab, prototipe web app (v2, app shell).
   Satu file CSS untuk semua layar. Nanti dipindah ke src/web/public/css/gema.css.
   Bentuk: kartu radius 12, kontrol radius 8, thumbnail radius 6. Kartu tanpa bayangan, hanya garis 1px.
   Jarak: 4, 8, 12, 16, 24, 32, 48, 64. */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/BricolageGrotesque-VF.latin.woff2") format("woff2"), url("../fonts/BricolageGrotesque-VF.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-VF.latin.woff2") format("woff2"), url("../fonts/Inter-VF.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

/* ================= Token warna ================= */
:root {
  --bg: #F3F0E8;          /* Paper */
  --fg: #15130F;          /* Ink */
  --muted: #5E5A52;       /* Stone, teks sekunder, 6:1 */
  --accent: #C73A17;      /* Echo: tombol utama, "menunggu kamu", error */
  --accent-press: #A92F11;
  --accent-fg: #F3F0E8;
  --surface: #FBFAF6;     /* kartu, sidebar, input */
  --surface-2: #ECE8DE;   /* hover, baris aktif */
  --sunken: #E6E1D5;      /* blok data, track */
  --line: #DEDACF;        /* garis dekoratif */
  --line-strong: #847F75; /* batas input dan kontrol, minimal 3:1 */
  --focus: #15130F;
  --pill-1: #15130F;      /* pilar konten 1, 2, 3: tingkat ink, bukan warna baru */
  --pill-2: #7A746A;
  --pill-3: #C9C3B6;
  --panel-bg: #15130F;    /* panel brand: kartu tugas, panel masuk */
  --panel-fg: #F3F0E8;
  --panel-muted: #A9A398;
  --panel-line: transparent;
  --rings-op: .5;
  --echo-op: 1;
  --shadow-pop: 0 24px 64px -24px rgba(40, 30, 15, .35), 0 2px 8px rgba(40, 30, 15, .08);
  --backdrop: rgba(21, 19, 15, .45);
  --sk: #E2DDD1;
  --col-bg: #E6E1D5;
  color-scheme: light;

  --font-head: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --r-card: 12px; --r-ctl: 8px; --r-thumb: 6px;
  --side-w: 248px;
  --ph-h: 76px;
  --tab-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130F; --fg: #F3F0E8; --muted: #A9A398; --accent: #FF6A3D; --accent-press: #FF8461; --accent-fg: #15130F;
    --surface: #1F1C17; --surface-2: #2A261F; --sunken: #24201A; --line: #3A352D; --line-strong: #7C766B; --focus: #F3F0E8;
    --pill-1: #F3F0E8; --pill-2: #A9A398; --pill-3: #5E5A52;
    --panel-bg: #1F1C17; --panel-fg: #F3F0E8; --panel-muted: #A9A398; --panel-line: #3A352D;
    --rings-op: .3; --echo-op: .8;
    --shadow-pop: 0 24px 64px -16px rgba(0, 0, 0, .7); --backdrop: rgba(0, 0, 0, .6); --sk: #2A261F; --col-bg: #1A1814;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15130F; --fg: #F3F0E8; --muted: #A9A398; --accent: #FF6A3D; --accent-press: #FF8461; --accent-fg: #15130F;
  --surface: #1F1C17; --surface-2: #2A261F; --sunken: #24201A; --line: #3A352D; --line-strong: #7C766B; --focus: #F3F0E8;
  --pill-1: #F3F0E8; --pill-2: #A9A398; --pill-3: #5E5A52;
  --panel-bg: #1F1C17; --panel-fg: #F3F0E8; --panel-muted: #A9A398; --panel-line: #3A352D;
  --rings-op: .3; --echo-op: .8;
  --shadow-pop: 0 24px 64px -16px rgba(0, 0, 0, .7); --backdrop: rgba(0, 0, 0, .6); --sk: #2A261F; --col-bg: #1A1814;
  color-scheme: dark;
}

/* ================= Dasar ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
@media (max-width: 767px) { body { font-size: 16px; line-height: 1.5; } }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 650; letter-spacing: -0.015em; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.i { width: 18px; height: 18px; flex: none; display: inline-block; }
.i svg { width: 100%; height: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 20px; }
.num { font-family: var(--font-head); font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.logo { height: 28px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* ================= App shell ================= */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.app.admin { --side-w: 220px; }
.side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 0 12px 12px; }
.side-logo { height: 64px; display: flex; align-items: center; padding: 0 8px; }
.biz { display: grid; grid-template-columns: 32px 1fr 16px; gap: 10px; align-items: center; padding: 10px 8px; border-radius: var(--r-ctl); text-decoration: none; margin-bottom: 12px; border: 1px solid var(--line); background: var(--bg); }
.biz:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: #3B2A20; color: #EFE3CF; font: 700 14px var(--font-head); overflow: hidden; }
.avatar img { width: 100%; height: 100%; }
.biz b { display: block; font-size: 14px; line-height: 18px; }
.biz small { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.biz .i { width: 14px; height: 14px; color: var(--muted); }
.nav-h { font-size: 12px; color: var(--muted); padding: 14px 10px 6px; }
.nav a { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; height: 40px; padding: 0 10px; border-radius: var(--r-ctl); text-decoration: none; font-size: 14px; font-weight: 500; color: var(--fg); }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--fg); font-weight: 600; }
.nav a > .i { color: var(--muted); }
.nav a[aria-current="page"] > .i { color: var(--fg); }
.nav a.locked { color: color-mix(in srgb, var(--fg) 55%, transparent); }
.sg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.sg .i { width: 16px; height: 16px; }
.sg-done .i { color: var(--fg); }
.sg-wait { color: var(--accent); }
.sg-wait::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.sg-work .i { color: var(--muted); animation: spin 1.4s linear infinite; }
.sg-lock .i { color: var(--muted); width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sg-work .i, .spin { animation: none !important; } }
.side-block { margin-top: 16px; padding: 14px 10px; border-top: 1px solid var(--line); }
.side-block h3 { font: 600 13px var(--font-body); letter-spacing: 0; margin-bottom: 8px; }
.quota { display: grid; gap: 8px; font-size: 13px; }
.quota > div { display: flex; justify-content: space-between; gap: 8px; }
.quota span { color: var(--muted); }
.quota b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--fg); border-radius: 4px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.side-foot a, .side-foot button { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-ctl); border: 0; background: none; text-decoration: none; font-size: 14px; color: var(--muted); cursor: pointer; width: 100%; text-align: left; }
.side-foot a:hover, .side-foot button:hover { background: var(--surface-2); color: var(--fg); }

.main { min-width: 0; display: flex; flex-direction: column; }
.ph { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid transparent; min-height: var(--ph-h); padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ph.scrolled { border-bottom-color: var(--line); }
.ph h1 { font-size: 28px; line-height: 34px; }
.ph .meta { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.pc { padding: 8px 40px 64px; width: 100%; max-width: 1640px; }
@media (min-width: 1600px) { .ph, .pc { padding-left: 48px; padding-right: 48px; } }

.mtop { display: none; }
.tabbar { display: none; }

/* Grid isi */
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.g > * { min-width: 0; }
.s12 { grid-column: span 12; } .s8 { grid-column: span 8; } .s7 { grid-column: span 7; } .s6 { grid-column: span 6; } .s5 { grid-column: span 5; } .s4 { grid-column: span 4; } .s3 { grid-column: span 3; }
.with-insp { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 22vw, 380px); gap: 24px; align-items: start; }
.with-insp > * { min-width: 0; }
.insp { position: sticky; top: calc(var(--ph-h) + 12px); display: grid; gap: 16px; }
.stretch { align-self: stretch; }

/* ================= Komponen ================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; }
.card.tight { padding: 16px 20px; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.card h2, .h2 { font-size: 18px; line-height: 24px; }
.card h3, .h3 { font: 600 14px/20px var(--font-body); letter-spacing: 0; }
.lead { font-size: 15px; color: var(--muted); max-width: 72ch; }
.prose { max-width: 72ch; }
.prose p + p { margin-top: 8px; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; min-height: 112px; display: flex; flex-direction: column; }
.stat small { font-size: 13px; color: var(--muted); }
.stat .num { font-size: 32px; line-height: 36px; margin: 6px 0 4px; }
.stat .num.word { font-size: 26px; }
.stat .ctx { font-size: 13px; color: var(--muted); margin-top: auto; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-ctl); border: 1px solid transparent; font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; background: none; transition: background-color .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-dark { background: var(--fg); color: var(--bg); }
.btn-text { color: var(--fg); padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.btn-block { width: 100%; }
.btn-lg { min-height: 48px; font-size: 15px; padding: 0 20px; }
.btn-icon { width: 40px; padding: 0; }

.seg { display: inline-flex; padding: 3px; background: var(--sunken); border-radius: 10px; gap: 2px; }
.seg button, .seg a { min-height: 32px; padding: 0 12px; border: 0; background: none; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.seg .i { width: 15px; height: 15px; }

.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv dt { color: var(--muted); }
.kv dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.ticks li { list-style: none; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 5px 0; }
.ticks .i { width: 16px; height: 16px; margin-top: 3px; }
.dash li { list-style: none; position: relative; padding: 5px 0 5px 16px; }
.dash li::before { content: ""; position: absolute; left: 1px; top: 16px; width: 7px; height: 1.5px; background: var(--muted); }
.ranked { counter-reset: r; }
.ranked li { list-style: none; counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ranked li:first-child { border-top: 0; padding-top: 0; }
.ranked li::before { content: counter(r); font: 650 18px/24px var(--font-head); color: var(--muted); }

.callout { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-ctl); background: var(--sunken); font-size: 14px; }
.callout .i { margin-top: 2px; color: var(--muted); }
.need { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px solid var(--accent); font-size: 14px; }
.need .i { color: var(--accent); margin-top: 2px; }
.changed { box-shadow: inset 2px 0 0 var(--accent); }
.changed-tag { font-size: 12px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { position: sticky; top: 0; text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 0 16px; height: 44px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.tbl td { padding: 0 16px; height: 52px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: default; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .sub { display: block; font-size: 12px; color: var(--muted); line-height: 16px; }
.tbl b { font-weight: 600; }
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.st .i { width: 16px; height: 16px; }
.st.hot { color: var(--accent); }
.st.dim { color: var(--muted); }
.meter { width: 96px; height: 4px; border-radius: 4px; background: var(--sunken); overflow: hidden; margin-top: 6px; margin-left: auto; }
.meter i { display: block; height: 100%; background: var(--fg); }
.meter.hot i { background: var(--accent); }

/* Form */
.field { display: grid; gap: 6px; }
.field + .field, .field + .row-2, .row-2 + .field, .row-2 + .row-2 { margin-top: 20px; }
.label { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.label .opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.help { font-size: 13px; color: var(--muted); }
.err { font-size: 13px; color: var(--accent); display: none; align-items: center; gap: 6px; font-weight: 500; }
.err .i { width: 15px; height: 15px; }
.field.invalid .err, .invalid > .err { display: flex; }
.field.invalid .input { border-color: var(--accent); }
.input { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); font-size: 15px; line-height: 1.4; }
.input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
textarea.input { min-height: 112px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.affix { display: flex; }
.affix > span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-ctl) 0 0 var(--r-ctl); background: var(--sunken); color: var(--muted); font-weight: 500; }
.affix .input { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
.count { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-2 > * { min-width: 0; }
.row-2 > .field + .field { margin-top: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; width: 100%; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; cursor: pointer; padding: 6px 0; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-weight: 500; font-size: 14px; cursor: pointer; }
.chip input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.opts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; }
.opts span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); font-weight: 600; cursor: pointer; }
.opts input:checked + span { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.opts input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.scale-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.drop { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-ctl); background: var(--surface); cursor: pointer; position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ic { width: 40px; height: 40px; border-radius: 8px; background: var(--sunken); display: grid; place-items: center; }
.drop b { display: block; font-weight: 600; font-size: 14px; }
.drop small { color: var(--muted); font-size: 13px; }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.files:empty { display: none; }
.file { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; max-width: 100%; }
.file img, .file i.sw { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; background: var(--sunken); flex: none; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tahapan horizontal */
.tracker { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tracker li { list-style: none; position: relative; padding-top: 14px; }
.tracker li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--sunken); }
.tracker li.done::before { background: var(--fg); }
.tracker li.now::before { background: var(--accent); }
.tracker b { display: block; font-size: 14px; font-weight: 600; line-height: 20px; }
.tracker .sg { margin-top: 4px; font-weight: 500; }
.tracker .sg-done, .tracker .sg-lock, .tracker .sg-work, .tracker .sg-idle { color: var(--muted); }
.tracker a { text-decoration: none; }
.tracker a:hover b { text-decoration: underline; }

/* Kartu aksi berikutnya */
.next { background: var(--panel-bg); color: var(--panel-fg); border: 1px solid var(--panel-line); border-radius: var(--r-card); padding: 28px 32px; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.next h2 { font-size: 24px; line-height: 30px; max-width: 26ch; }
.next p { color: var(--panel-muted); margin-top: 6px; max-width: 56ch; }
.next .rings { position: absolute; right: -300px; top: -330px; width: 600px; height: 600px; opacity: var(--rings-op); pointer-events: none; }
.next > * { position: relative; }
.next .rings { position: absolute; }

/* Timeline */
.timeline li { list-style: none; display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 9px 0; font-size: 14px; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .i { width: 16px; height: 16px; margin-top: 3px; color: var(--muted); }
.timeline time { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Keputusan */
.decide h2 { font-size: 16px; }
.decide .rev { font-size: 13px; color: var(--muted); margin: 4px 0 14px; display: flex; gap: 6px; align-items: center; }
.decide .rev .i { width: 15px; height: 15px; }
.decide .btns { display: grid; gap: 8px; }
.decide .btns .btn { min-height: 44px; }
.decide .rv { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.decide .confirm { margin-top: 14px; padding: 14px; border-radius: var(--r-ctl); background: var(--sunken); font-size: 14px; }
.decide .confirm .btns { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.decided { display: flex; gap: 8px; align-items: center; font-weight: 600; }

.versions li { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.versions li:first-child { border-top: 0; padding-top: 0; }
.versions a { text-decoration: none; font-weight: 600; }
.versions a:hover { text-decoration: underline; }
.versions .cur { color: var(--muted); font-size: 13px; }
.banner { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 16px; border-radius: var(--r-ctl); background: var(--sunken); font-size: 14px; margin-bottom: 16px; }

/* Anchor tabs */
.anchors { position: sticky; top: var(--ph-h); z-index: 15; background: var(--bg); display: flex; gap: 4px; padding: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.anchors { border-bottom: 1px solid var(--line); margin-bottom: 20px; padding-bottom: 0 !important; gap: 0 !important; }
.anchors a { padding: 10px 14px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.anchors a:hover { color: var(--fg); }
.anchors a.on { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }
section[id] { scroll-margin-top: calc(var(--ph-h) + 60px); }

/* Pilar */
.pbar { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; height: 12px; }
.pbar i { border-radius: 3px; }
.p1 { background: var(--pill-1); } .p2 { background: var(--pill-2); } .p3 { background: var(--pill-3); }
.psq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.pillar { border-top: 1px solid var(--line); padding-top: 14px; }
.pillar b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pillar p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.pillar .n { font-size: 13px; color: var(--muted); margin-top: 8px; }
.weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.week { padding: 16px; border-radius: var(--r-ctl); background: var(--sunken); }
.week small { display: block; color: var(--muted); font-size: 12px; }
.week b { display: block; font-size: 15px; margin: 6px 0 4px; }
.week p { font-size: 14px; color: var(--muted); }
.msgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.msgs p { font: 600 17px/24px var(--font-head); letter-spacing: -0.01em; padding-left: 14px; border-left: 2px solid var(--fg); }

/* Skala tahap */
.scale { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 18px; }
.scale > div { padding-top: 12px; position: relative; font-size: 13px; color: var(--muted); }
.scale > div::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--sunken); }
.scale > .past::before { background: var(--fg); }
.scale > .cur::before { background: var(--accent); }
.scale > .cur { color: var(--fg); }
.scale b { display: block; font-size: 14px; color: inherit; }
.segbar { display: inline-grid; grid-template-columns: repeat(3, 18px); gap: 3px; margin-top: 6px; }
.segbar i { height: 6px; border-radius: 3px; background: var(--sunken); }
.segbar i.on { background: var(--fg); }

/* Board social media plan */
.summary-strip { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); font-size: 14px; align-items: center; margin-bottom: 20px; }
.summary-strip > div { display: flex; align-items: center; gap: 8px; }
.summary-strip .legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.summary-strip .legend span { display: inline-flex; align-items: center; gap: 6px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bcol { background: var(--col-bg); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; min-height: 420px; }
.bcol-h { display: block; padding: 4px 4px 12px; }
.bcol-h small { display: block; }
.bcol-h b { font-size: 14px; }
.bcol-h small { font-size: 12px; color: var(--muted); }
.bcard { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; transition: border-color .15s, transform .15s; }
.bcard + .bcard { margin-top: 10px; }
.bcard:hover { border-color: var(--line-strong); }
.bcard[aria-expanded="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.bcard .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.bcard .top span { display: inline-flex; align-items: center; gap: 5px; }
.bcard .top .i { width: 14px; height: 14px; }
.bcard b { display: block; font-size: 15px; line-height: 21px; margin: 8px 0 10px; font-weight: 600; }
.bcard .foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); align-items: center; }
.bcard .foot span { display: inline-flex; align-items: center; gap: 6px; }
.bcard .needs { color: var(--fg); font-weight: 500; }
.bcard .needs .i { width: 14px; height: 14px; }
.list-week + .list-week { margin-top: 24px; }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-pop); z-index: 60; transform: translateX(105%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.drawer-h small { color: var(--muted); font-size: 13px; }
.drawer-h h2 { font-size: 20px; line-height: 26px; margin-top: 2px; }
.drawer-b { padding: 8px 24px 24px; overflow-y: auto; flex: 1; }
.drawer-b h3 { font: 600 13px var(--font-body); color: var(--muted); letter-spacing: 0; margin: 18px 0 6px; }
.drawer-f { padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.slides { list-style: none; display: grid; gap: 6px; counter-reset: s; }
.slides li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 8px 12px; background: var(--sunken); border-radius: 8px; font-size: 14px; }
.slides li::before { content: counter(s); font: 650 14px/22px var(--font-head); color: var(--muted); }
.slides.single li { grid-template-columns: 1fr; }
.slides.single li::before { content: none; }
.caption { white-space: pre-line; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; position: relative; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }

/* Dialog dan sheet */
dialog { border: 0; padding: 0; background: var(--surface); color: var(--fg); width: min(480px, 100%); max-width: 100%; border-radius: 16px; max-height: 90dvh; box-shadow: var(--shadow-pop); }
dialog::backdrop { background: var(--backdrop); }
.dlg { padding: 24px; }
.dlg-h { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 8px; }
.dlg-h h2 { font-size: 20px; }
.dlg .btns { display: flex; gap: 8px; margin-top: 20px; justify-content: flex-end; }

/* Menu titik tiga */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; }
.menu-list button, .menu-list a { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border: 0; background: none; border-radius: 6px; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.menu-list button:hover, .menu-list a:hover { background: var(--surface-2); }

/* Galeri konten */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.gcard .thumb { aspect-ratio: 4 / 5; overflow: hidden; border-bottom: 1px solid var(--line); }
.gcard .thumb .post { aspect-ratio: auto; height: 100%; }
.gcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.gcard b { font-size: 15px; font-weight: 600; line-height: 21px; }
.gcard .meta { font-size: 13px; color: var(--muted); }
.gcard .st { font-size: 13px; margin-top: 6px; }
.gcard .act { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.gcard .act .btn { flex: 1; }
.sk { background: var(--sk); border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) { .sk { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .55; } }
.gcard.making .thumb { display: grid; place-items: center; background: var(--sunken); color: var(--muted); font-size: 14px; }

/* Konten milik UMKM contoh (palet Seduh Lawas, bukan warna Gema) */
.post { --kb: #3B2A20; --kc: #EFE3CF; --kg: #7F8F55; --ka: #D9A441;
  aspect-ratio: 4 / 5; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 9%; font-family: "Bricolage Grotesque", sans-serif; container-type: inline-size; }
.post .pt { display: block; font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; font-size: 11.5cqi; }
.post .ps { font-family: "Inter", sans-serif; font-size: 6cqi; line-height: 1.3; opacity: .85; }
.post .pm { font-family: "Inter", sans-serif; font-size: 6cqi; font-weight: 600; }
.post.dark { background: var(--kb); color: var(--kc); }
.post.cream { background: var(--kc); color: var(--kb); }
.post.green { background: var(--kg); color: #FBF6EC; }
.post.photo { background: repeating-linear-gradient(135deg, rgba(59,42,32,.09) 0 8px, transparent 8px 16px), #D8C7AA; color: var(--kb); }
.post.photo .pph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: "Inter", sans-serif; font-size: 6.4cqi; font-weight: 600; color: #3B2A20; padding: 20%; line-height: 1.25; }
.post .stack-ic { position: absolute; top: 6%; right: 6%; width: 8cqi; height: 8cqi; opacity: .85; }
.post .badge-price { align-self: flex-start; background: var(--ka); color: var(--kb); padding: 2cqi 4cqi; border-radius: 99px; font-family: Inter, sans-serif; font-weight: 700; font-size: 6cqi; }

/* Visual */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sw { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.sw > i { display: block; height: 64px; }
.sw div { padding: 8px 10px; font-size: 13px; }
.sw b { display: block; }
.sw small { color: var(--muted); font-variant-numeric: tabular-nums; display: block; }
.phone { width: 100%; max-width: 380px; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: 28px; padding: 14px 10px 18px; background: var(--surface); }
.phone-h { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; font-size: 13px; }
.phone-h img { width: 36px; height: 36px; border-radius: 50%; }
.phone-h b { display: block; font-size: 13px; }
.ig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.ig > * { min-width: 0; }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dodont h3 { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }

/* Menunggu, inline di shell */
.waiting { position: relative; }
.waiting .ghost { opacity: .4; pointer-events: none; }
.waiting .ghost .sk { height: 14px; margin-top: 10px; }
.wcard { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px 32px; display: grid; grid-template-columns: 96px 1fr; gap: 0 28px; align-items: start; margin-bottom: 24px; }
.wcard .echo { margin: 4px 0 0; grid-row: span 5; }
.wcard .wsteps { margin: 16px 0 0; }
.wcard h2 { font-size: 20px; line-height: 26px; }
.wcard p { color: var(--muted); margin-top: 6px; }
.echo { width: 96px; height: 96px; margin: 0 auto 20px; position: relative; opacity: var(--echo-op); }
.echo span { position: absolute; inset: 0; border-radius: 50%; border: 6px solid var(--accent); }
.echo span:nth-child(1) { inset: 33px; border-width: 8px; }
.echo span:nth-child(2) { inset: 20px; opacity: .62; }
.echo span:nth-child(3) { inset: 8px; opacity: .4; border-width: 5px; }
.echo span:nth-child(4) { inset: -4px; opacity: .22; border-width: 4px; }
.echo.idle span { border-color: var(--line-strong); }
@media (prefers-reduced-motion: no-preference) {
  .echo.run span { animation: ripple 2.4s ease-out infinite; }
  .echo.run span:nth-child(2) { animation-delay: .3s; } .echo.run span:nth-child(3) { animation-delay: .6s; } .echo.run span:nth-child(4) { animation-delay: .9s; }
}
@keyframes ripple { 0%, 100% { transform: scale(.94); } 40% { transform: scale(1.04); } }
.wsteps { list-style: none; text-align: left; margin: 22px auto 0; max-width: 300px; }
.wsteps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: center; padding: 6px 0; color: var(--muted); font-size: 14px; }
.wsteps .dotc { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.wsteps .dotc .i { width: 12px; height: 12px; }
.wsteps li.on { color: var(--fg); font-weight: 500; }
.wsteps li.on .dotc { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.wsteps li.ok { color: var(--fg); }
.wsteps li.ok .dotc { background: var(--fg); border-color: var(--fg); color: var(--bg); }

/* Upgrade */
.price .num { font-size: 44px; line-height: 1; }
.price span { color: var(--muted); }
.recap li { list-style: none; display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: center; }
.recap li:first-child { border-top: 0; }
.recap small { color: var(--muted); }
.steps-next li { list-style: none; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.steps-next li:first-child { border-top: 0; padding-top: 0; }
.steps-next .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--sunken); display: grid; place-items: center; }
.steps-next b { display: block; font-size: 15px; }
.steps-next p { color: var(--muted); font-size: 14px; }

/* Laporan */
.thumbs-check { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.tc { position: relative; cursor: pointer; }
.tc input { position: absolute; top: 6px; left: 6px; z-index: 2; width: 18px; height: 18px; accent-color: var(--fg); }
.tc .post { border-radius: 6px; outline: 2px solid transparent; outline-offset: 2px; }
.tc input:checked ~ .post { outline-color: var(--fg); }
.tc input:not(:checked) ~ .post { opacity: .45; }
.tc small { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }
.progress-list li { list-style: none; display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--muted); }
.progress-list li.ok { color: var(--fg); }
.progress-list .i { width: 18px; height: 18px; }

/* ================= Halaman tanpa sidebar: masuk dan profil ================= */
.auth { display: grid; grid-template-columns: 5fr 7fr; min-height: 100dvh; }
.auth-main { display: flex; flex-direction: column; padding: 32px 48px; position: relative; }
.auth-form { width: 100%; max-width: 400px; margin: auto; padding: 32px 0; }
.auth-form h1 { font-size: 32px; line-height: 38px; }
.auth-side { background: var(--panel-bg); color: var(--panel-fg); border-left: 1px solid var(--panel-line); padding: 64px 0 0 64px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.auth-side .rings { position: absolute; width: 900px; height: 900px; right: -300px; top: -380px; opacity: var(--rings-op); }
.auth-side h2 { font-size: 44px; line-height: 48px; max-width: 14ch; position: relative; }
.auth-side p { color: var(--panel-muted); max-width: 44ch; margin-top: 14px; font-size: 16px; position: relative; }
.auth-side .shot { margin-top: 48px; position: relative; flex: 1; border-radius: 12px 0 0 0; overflow: hidden; border: 1px solid rgba(243, 240, 232, .14); border-right: 0; border-bottom: 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); }
.auth-side .shot img { width: 1100px; max-width: none; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: var(--sunken); border-radius: 10px; margin: 24px 0; }
.tabs button { min-height: 38px; border: 0; background: none; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.pw { position: relative; }
.pw .input { padding-right: 48px; }
.pw button { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.corner { position: absolute; top: 16px; right: 16px; }

.onb { display: grid; grid-template-columns: 280px minmax(0, 640px) 320px; gap: 48px; justify-content: center; padding: 0 40px 64px; }
.onb-top { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.vstep { position: sticky; top: 40px; align-self: start; }
.vstep ol { list-style: none; margin-top: 16px; }
.vstep li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.vstep li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 42px; bottom: -6px; width: 1.5px; background: var(--line); }
.vstep .dot { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font: 600 12px var(--font-body); color: var(--muted); background: var(--bg); position: relative; z-index: 1; }
.vstep .dot .i { width: 14px; height: 14px; }
.vstep li.done .dot { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.vstep li.on .dot { border-color: var(--accent); color: var(--accent); border-width: 2px; }
.vstep b { display: block; font-size: 14px; line-height: 28px; }
.vstep li:not(.on) b { font-weight: 500; }
.vstep small { color: var(--muted); font-size: 13px; display: block; margin-top: -2px; }
.vstep button { all: unset; cursor: pointer; display: contents; }
.onb-form .card { padding: 32px; }
.onb-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.onb-sum { position: sticky; top: 40px; align-self: start; }
.onb-sum dl { display: grid; gap: 12px; font-size: 14px; }
.onb-sum dt { color: var(--muted); font-size: 12px; }
.onb-sum dd { font-weight: 500; overflow-wrap: anywhere; }
.onb-sum dd.empty { color: var(--muted); font-weight: 400; }
.mprog { display: none; }
[data-step] { display: none; }
[data-step].active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.review dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 14px; }
.review dt { color: var(--muted); }
.review-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review + .review { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Index review */
.idx { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.idx a { text-decoration: none; display: block; }
.idx .shot { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.idx .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.idx b { display: block; margin-top: 10px; font-size: 15px; }
.idx small { display: block; color: var(--muted); font-size: 13px; }
.idx a:hover b { text-decoration: underline; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 90; }

/* ================= Tablet (768 sampai 1279) ================= */
@media (max-width: 1279px) {
  .ph, .pc { padding-left: 28px; padding-right: 28px; }
  .with-insp { grid-template-columns: minmax(0, 1fr) 300px; }
  .onb { grid-template-columns: 220px minmax(0, 1fr); }
  .onb-sum { display: none; }
  .thumbs-check { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ================= HP dan tablet kecil: shell HP (< 1024) ================= */
@media (max-width: 1023px) {
  .app { display: block; }
  .side { display: none; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 25; height: 56px; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .mtop .logo { height: 26px; }
  .mtop .avatar { width: 36px; height: 36px; border-radius: 10px; }
  .mtop button { border: 0; background: none; padding: 4px; cursor: pointer; border-radius: 10px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; border: 0; background: none; cursor: pointer; position: relative; }
  .tabbar .i { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--fg); font-weight: 600; }
  .tabbar .dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
  .main { padding-bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); }
  .main.has-dbar { padding-bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom)); }
  .ph { position: static; min-height: 0; padding: 20px 16px 12px; display: block; }
  .ph h1 { font-size: 24px; line-height: 30px; }
  .ph-actions { margin-top: 14px; flex-wrap: wrap; }
  .ph-actions .desk { display: none; }
  .pc { padding: 4px 16px 24px; }
  .g { gap: 12px; }
  .g > [class*="s"] { grid-column: span 12; }
  .with-insp { display: flex; flex-direction: column; gap: 12px; }
  .insp { position: static; gap: 12px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 18px 16px; }
  .btn { min-height: 48px; font-size: 15px; }
  .seg button, .seg a { min-height: 36px; }
  .tracker { grid-template-columns: 1fr; gap: 0; }
  .tracker li { padding: 12px 0 12px 18px; }
  .tracker li::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 3px; height: auto; }
  .tracker .sg { margin-top: 0; }
  .next { grid-template-columns: 1fr; padding: 22px 20px; }
  .next h2 { font-size: 21px; line-height: 27px; }
  .next .btn { width: 100%; }
  .pillars, .msgs { grid-template-columns: 1fr; }
  .weeks { grid-template-columns: 1fr 1fr; gap: 10px; }
  .board { display: none; }
  .board-list { display: block !important; }
  .anchors { top: 56px; padding-top: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .drawer { width: 100vw; border-left: 0; }
  .gcard .body { padding: 10px 12px 12px; }
  .gcard b { font-size: 14px; line-height: 19px; }
  .gcard .act .btn { min-height: 40px; font-size: 13px; padding: 0 8px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dodont { grid-template-columns: 1fr; }
  .thumbs-check { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 20px 16px; }
  .auth-form { margin: 24px auto; }
  .auth-form h1 { font-size: 28px; line-height: 34px; }
  .onb { display: block; padding: 0 16px 120px; }
  .onb-top { margin-bottom: 16px; padding: 0 16px; height: 56px; }
  .vstep { display: none; }
  .mprog { display: block; margin-bottom: 16px; }
  .mprog .bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
  .mprog .bars i { height: 4px; border-radius: 4px; background: var(--sunken); }
  .mprog .bars i.on { background: var(--fg); }
  .onb-form .card { padding: 20px 16px; }
  .onb-foot { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); z-index: 30; }
  .onb-foot .btn { flex: 1; }
  .review dl { grid-template-columns: 120px 1fr; }
  .wcard { grid-template-columns: 1fr; padding: 24px 20px; text-align: center; }
  .wcard .echo { margin: 0 auto 16px; grid-row: auto; }
  .wcard .wsteps { margin: 16px auto 0; }
  .waiting .ghost { display: none; }
  .waiting { min-height: 0; }
  .table-wrap.stack-m { border: 0; background: none; overflow: visible; }
  .stack-m table, .stack-m tbody { display: block; }
  .stack-m thead { display: none; }
  .stack-m tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: 10px; }
  .stack-m td { display: block; height: auto; padding: 0; border: 0; text-align: left !important; }
  .stack-m td:first-child { grid-column: 1 / -1; }
  .stack-m td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); }
  .stack-m .meter { margin-left: 0; }
  .stack-m td.act-cell { grid-column: 1 / -1; }
}
.board-list { display: none; }
.m-only { display: none; }
@media (max-width: 1023px) { .m-only { display: block; } .d-only { display: none !important; } }

/* Bar keputusan ringkas di HP: muncul saat kartu keputusan tidak terlihat */
.dbar { display: none; }
@media (max-width: 1023px) {
  .dbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); z-index: 35; padding: 8px 12px; background: var(--bg); border-top: 1px solid var(--line); transition: transform .2s, opacity .2s; }
  .dbar.away { transform: translateY(100%); opacity: 0; pointer-events: none; }
  .dbar .btn { min-height: 44px; }
}

/* Lembar akun (HP) */
.sheet { margin: auto auto 0; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 16px; } }
.sheet .dlg { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-links a, .sheet-links button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 4px; border: 0; border-top: 1px solid var(--line); background: none; text-decoration: none; font-size: 15px; cursor: pointer; text-align: left; }

/* Admin */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.admin-tabs a { padding: 10px 14px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.admin-tabs a.on { color: var(--fg); border-bottom-color: var(--fg); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { min-height: 36px; width: auto; font-size: 14px; padding: 6px 10px; }
.filters select.input { padding-right: 34px; }
.filters .search { position: relative; }
.filters .search .i { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--muted); }
.filters .search .input { padding-left: 32px; width: 260px; }
.qc { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--surface); min-height: calc(100dvh - 180px); }
.qc-list { border-right: 1px solid var(--line); overflow-y: auto; }
.qc-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none; }
.qc-item:hover { background: var(--surface-2); }
.qc-item.on { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--fg); }
.qc-item b { font-size: 14px; display: block; }
.qc-item small { font-size: 12px; color: var(--muted); display: block; }
.qc-view { padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-content: start; }
.qc-slides { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1279px) { .qc-slides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qc-slides .post { border-radius: 6px; }
@media (max-width: 1023px) {
  .qc { grid-template-columns: 1fr; }
  .qc-list { border-right: 0; max-height: none; }
  .qc-view { grid-template-columns: 1fr; padding: 16px; }
}

/* Papan butuh lebar: panel kanan hanya di layar sangat lebar */
@media (max-width: 1599px) and (min-width: 1024px) {
  .with-insp.wide-only { grid-template-columns: 1fr; }
  .with-insp.wide-only .insp-row { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}
.tbl tr.click:focus-visible td { background: var(--surface-2); }

/* Perbaikan HP */
@media (max-width: 1023px) {
  .with-insp { align-items: stretch; }
  .tracker li { padding-top: 8px; padding-bottom: 8px; }
  .tracker li::before { top: 8px; bottom: 8px; }
  .card-h > .small.muted { display: none; }
  .scale .rng { display: none; }
  .feed-first > .insp { display: contents; }
  .feed-first > .insp > * { grid-column: span 12; }
  .feed-first > .insp > :first-child { order: -1; }
  .feed-first > .insp > [data-decide] { order: 2; }
  .recent { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr; gap: 10px; }
  .gcard { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .gcard .thumb { border-bottom: 0; border-right: 1px solid var(--line); aspect-ratio: auto; }
  .gcard .thumb .post { aspect-ratio: 4 / 5; height: auto; }
  .gcard .act { padding-top: 10px; }
  .gcard .act .btn { flex: 1; }
  .gcard .menu-list { right: 0; }
}
@media (max-width: 519px) {
  .row-2 { grid-template-columns: 1fr; }
  .row-2 > .field + .field { margin-top: 20px; }
}

/* Kritik Fable putaran 2 */
.gcard .qcstrip { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 13px; font-weight: 500; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); }
.gcard .thumb { position: relative; display: flex; flex-direction: column; }
.gcard .thumb .post { flex: 1; }
.tc .post .pm { visibility: hidden; }
.peluang > div { padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.peluang > div:first-child { border-top: 0; padding-top: 0; }
.msgs p { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); }
@media (min-width: 1600px) { .hide-xl { display: none !important; } }
@media (max-width: 1023px) {
  .insp { display: flex; flex-direction: column; }
  .insp > [data-decide] { order: 9; }
  [data-tabsec].off { display: none !important; }
  .anchors { margin-bottom: 12px; }
  .gcard .thumb .post { aspect-ratio: auto; height: 100%; }
  .gcard .qcstrip { display: none; }
  .hide-m { display: none !important; }
}
