/* Wailawi K1–K4 result browser */

:root {
  --bg: #0d1526;
  --bg2: #101a2e;
  --panel: #121d33;
  --panel2: #16223a;
  --line: #22314f;
  --line2: #2c3d5e;
  --fg: #e6ecf5;
  --muted: #94a3b8;
  --dim: #64748b;
  --accent: #e94560;
  --accent2: #38bdf8;
  --amber: #f59e0b;
  --teal: #2dd4bf;
  --green: #34d399;
  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
body { display: flex; flex-direction: column; overflow: hidden; }

/* ─────────────────────────────  top bar  ───────────────────────────── */
#topbar {
  height: var(--nav-h); flex: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding: 0 20px;
  background: var(--bg2); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden;
  flex: 0 0 auto; }
.brand > div { min-width: 0; overflow: hidden; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: #0d1526 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M5 21c4 0 4-4 8-4s4 4 8 4 4-4 6-4' fill='none' stroke='%2338bdf8' stroke-width='2.2' stroke-linecap='round'/><path d='M5 15c4 0 4-4 8-4s4 4 8 4 4-4 6-4' fill='none' stroke='%232ecc71' stroke-width='2.2' stroke-linecap='round' opacity='.8'/><circle cx='16' cy='24' r='2.6' fill='%23e94560'/></svg>") center / 100% 100% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.18);
}
#topbar h1 { font-size: 15px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
#topbar h1 span { color: var(--muted); font-weight: 500; }
#topbar p { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }

.tabwrap { display: flex; align-items: center; gap: 4px; min-width: 0; flex-shrink: 1; }
.tabarrow {
  flex: none; width: 24px; height: 36px; padding: 0;
  border: 1px solid rgba(148, 163, 184, .16); border-radius: 8px; cursor: pointer;
  background: #0d1728; color: #94a3b8;
  font: inherit; font-size: 18px; line-height: 1; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s, border-color .15s, opacity .15s;
}
.tabarrow:hover { color: #fff; background: #1d2d47; border-color: rgba(148, 163, 184, .38); }
.tabarrow:active { background: #26364f; }
.tabarrow:disabled { opacity: .3; cursor: default; }
.tabarrow:disabled:hover { color: #94a3b8; background: #0d1728;
  border-color: rgba(148, 163, 184, .16); }
#tabs { display: flex; gap: 3px; background: #0a1220; padding: 4px;
  border-radius: 10px; overflow-x: auto; scrollbar-width: none; flex-shrink: 1;
  min-width: 0; scroll-behavior: smooth; }
#tabs::-webkit-scrollbar { display: none; }
/* tepi deretan tab memudar hanya kalau masih ada tab di luar layar */
#tabs.fade-l {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px);
  mask-image: linear-gradient(to right, transparent 0, #000 18px);
}
#tabs.fade-r {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 18px);
  mask-image: linear-gradient(to left, transparent 0, #000 18px);
}
#tabs.fade-l.fade-r {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px,
    #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 18px,
    #000 calc(100% - 18px), transparent 100%);
}
.tab {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
/* 14 tab harus muat tanpa panah gulir pada 1600 px — brand yang lebih
   panjang ("Bentang 3D Survey") memakan ruang yang dulu dipakai tab. */
@media (min-width: 1440px) and (max-width: 1750px) {
  .tab { font-size: 12px; padding: 8px 9px; }
}
.tab:hover { color: var(--fg); background: #16233b; }
.tab.active { background: var(--accent); color: #fff; }

.links { display: flex; gap: 8px; flex: none; }
.links a {
  font-size: 11.5px; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line2); border-radius: 7px; padding: 6px 10px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.links a:hover { color: var(--accent2); border-color: var(--accent2); }

/* pemilih bahasa */
.langsw { display: flex; gap: 2px; background: #0a1220; border: 1px solid var(--line2);
  border-radius: 7px; padding: 2px; flex: none; }
.langbtn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
  padding: 4px 8px; border-radius: 5px; line-height: 1;
  transition: background .15s, color .15s;
}
.langbtn:hover { color: var(--fg); }
.langbtn.active { background: var(--accent); color: #fff; }
@media (max-width: 1000px) { .langsw { display: none; } }

/* ─────────────────────────────  views  ───────────────────────────── */
main { flex: 1; min-height: 0; position: relative; }
.view { display: none; height: 100%; overflow: auto; }
.view.active { display: block; }
#v-illum.active, #v-surface.active { display: flex; overflow: hidden; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 22px 26px 60px; }

.lead { margin-bottom: 18px; }
.lead h2 { font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.lead p { font-size: 13px; line-height: 1.62; color: var(--muted); margin-top: 7px; max-width: 96ch; }
.lead b.c-blue { color: #7fb2ff; }
.lead b.c-red { color: #ff8a7a; }

h3.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 26px 0 12px; font-weight: 700; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700; margin-bottom: 9px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px;
}
.panel + .panel { margin-top: 14px; }
.panel h3 { margin-bottom: 10px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.two-col.wide-left { grid-template-columns: 1.35fr 1fr; }
.two-col + .two-col { margin-top: 14px; }

.note { font-size: 11.5px; line-height: 1.55; color: var(--dim); margin-top: 10px; }
.foot { font-size: 11.5px; color: var(--dim); margin-top: 26px; line-height: 1.6; }
.foot code { background: #0a1220; padding: 1px 5px; border-radius: 4px; color: #9fb3cc; }

/* ─────────────────────────────  overview  ───────────────────────────── */
.cfg-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cfg-card {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px;
  position: relative; overflow: hidden;
}
.cfg-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c, var(--accent));
}
.cfg-card h4 { font-size: 17px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.cfg-card h4 small { font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--c, var(--accent)); text-transform: uppercase; }
.cfg-card .nm { font-size: 11.5px; color: var(--muted); margin-top: 3px; min-height: 30px; line-height: 1.4; }
.cfg-card .kv { display: flex; justify-content: space-between; font-size: 12px;
  padding: 5px 0; border-top: 1px solid #1b2942; }
.cfg-card .kv span:first-child { color: var(--muted); }
.cfg-card .kv b { font-variant-numeric: tabular-nums; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { padding: 7px 9px; text-align: right; border-bottom: 1px solid #1b2942;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .05em; }
.tbl td:first-child, .tbl th:first-child { text-align: left; }
.tbl tbody tr:hover { background: #16223a; }
.tbl .k1 { color: var(--muted); }
.tbl .hi { color: var(--accent2); font-weight: 700; }
.tbl .lo { color: #f0857a; }

.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.find { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; }
.find h4 { font-size: 14px; margin: 8px 0 7px; line-height: 1.35; }
.find p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 20px; }
.tag.red { background: rgba(233,69,96,.14); color: #ff8a9b; }
.tag.amber { background: rgba(245,158,11,.14); color: #fbbf24; }
.tag.teal { background: rgba(45,212,191,.14); color: #5eead4; }

/* ─────────────────────────────  design  ───────────────────────────── */
.design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.design-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; cursor: zoom-in; transition: border-color .15s; }
.design-item:hover { border-color: var(--accent2); }
.design-item img { width: 100%; display: block; border-radius: 6px; background: #fff; }
.design-item .cap { display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 9px; font-size: 12.5px; }
.design-item .cap b { font-size: 13.5px; }
.design-item .cap span { color: var(--muted); font-size: 11.5px; }

.legend-strip { display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 16px; font-size: 11.5px; color: var(--muted); margin-bottom: 16px; }
.legend-strip span { display: flex; align-items: center; gap: 7px; }
.sw { width: 18px; height: 0; border-top: 2.4px solid; display: inline-block; }
.sw.src { border-color: #a51c16; }
.sw.rcv { border-color: #1e40af; }
.sw.river { border-color: #0ea5e9; border-top-width: 1.6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.small { background: #f59e0b; border: 1.5px solid #fff; }
.dot.large { width: 12px; height: 12px; background: #92400e; border: 1.5px solid #fff; }
.dot.well { background: #111; border: 1.5px solid #fff; }
.dia { width: 9px; height: 9px; background: #a51c16; transform: rotate(45deg); display: inline-block; }

/* lapisan peta: jalan / pemukiman / kilang */
.sw.road { border-color: #f8fafc; border-top-width: 2px; }
.pat { width: 15px; height: 11px; display: inline-block; border-radius: 2px; }
.pat.settle { background: rgba(167,139,250,.16); border: 1.4px dashed #a78bfa; }
.pat.kilang { background: rgba(244,114,182,.18); border: 1.4px dashed #f472b6; }
.legend-strip.thin {
  padding: 7px 12px; gap: 14px; font-size: 10.5px; margin: 10px 0 0;
  background: transparent; border-style: dashed;
}
.chk.sep { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.chk .u { color: var(--dim); font-size: 10.5px; }
.chk2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.chk2 .chk { margin: 3px 0; font-size: 11.5px; }
.chk2 .chk input { margin: 0; }

/* ─────────────────────────────  side layout  ───────────────────────────── */
.side { display: flex; width: 100%; min-height: 0; }
.side > .panel {
  width: 300px; flex: none; border-radius: 0; border: 0;
  border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 16px 22px;
}
.side > .panel h3 { margin: 11px 0 5px; }
.side > .panel h3:first-child { margin-top: 0; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px 16px 16px; overflow: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.col { flex-direction: column; }
.chip {
  border: 1px solid var(--line2); background: #0f1a2d; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 600; padding: 7px 11px;
  border-radius: 8px; cursor: pointer; transition: all .14s; text-align: left;
}
.chip:hover { color: var(--fg); border-color: #3b527a; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .sub { display: block; font-size: 10px; font-weight: 500; opacity: .78; margin-top: 1px; }

.sel {
  width: 100%; background: #0f1a2d; color: var(--fg); border: 1px solid var(--line2);
  border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.sel:focus { outline: 1px solid var(--accent2); }

.pal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.pal button {
  border: 1px solid var(--line2); border-radius: 6px; padding: 0; cursor: pointer;
  height: 24px; position: relative; overflow: hidden; background: #0f1a2d;
}
.pal button i { position: absolute; inset: 3px; border-radius: 3px; }
.pal button span {
  position: absolute; left: 5px; bottom: 1px; font-size: 8px; font-weight: 700;
  color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; letter-spacing: .02em;
}
.pal button.active { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }

.chk { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
  margin: 5px 0; cursor: pointer; }
.chk input { accent-color: var(--accent); width: 14px; height: 14px; }
.rng { display: block; font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.rng b { color: var(--fg); float: right; font-variant-numeric: tabular-nums; }
.rng input { width: 100%; margin-top: 6px; accent-color: var(--accent2); }

.stat { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
/* baris "label → nilai" di kotak bacaan; sebelumnya .kv hanya didefinisikan
   untuk .cfg-card sehingga di panel Sintetik label dan angka menempel */
.stat .kv {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; font-size: 11.5px; padding: 3px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .07);
}
.stat .kv:last-child { border-bottom: 0; }
.stat .kv > span { flex: 1 1 auto; min-width: 0; }
.stat .kv > b {
  flex: 0 0 auto; max-width: 62%; text-align: right;
  color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums;
}
.stat .row { display: flex; justify-content: space-between; font-size: 11.5px;
  padding: 4px 0; color: var(--muted); }
.stat .row b { color: var(--fg); font-variant-numeric: tabular-nums; }
.stat .ttl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--dim); margin-bottom: 6px; }

/* ─────────────────────────────  map  ───────────────────────────── */
.mapbox { position: relative; flex: 1; min-height: 340px; display: flex; }
#il-canvas, #sf-canvas { flex: 1; min-width: 0; height: 100%; display: block; cursor: crosshair; }
.tip {
  position: absolute; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: rgba(8,14,26,.95); border: 1px solid var(--line2); border-radius: 7px;
  padding: 7px 10px; font-size: 11px; line-height: 1.5; color: var(--fg);
  white-space: nowrap; z-index: 5; box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.tip b { color: var(--accent2); font-variant-numeric: tabular-nums; }
.tip .u { color: var(--muted); font-size: 10.5px; }
.tip .cred-donor { color: #22c55e; font-size: 10px; font-weight: 600; }
.tip .cred-fill { color: #38bdf8; font-size: 10px; font-weight: 600; }
.tip .cred-marg { color: #f59e0b; font-size: 10px; font-weight: 600; }
.tip .cred-hole { color: #ef4444; font-size: 10px; font-weight: 600; }
.axis-note { font-size: 10.5px; color: var(--dim); margin-top: 8px; text-align: center; }

/* ────────────────────  source-zone polygon tool  ──────────────────── */
#v-split.active { display: block; overflow: auto; }
.split-grid {
  display: grid; grid-template-columns: 306px minmax(0, 1fr); gap: 14px;
  padding: 14px 16px 0;
  height: max(700px, calc(100vh - 148px));
}
.split-grid > .panel { overflow: hidden; }
/* kontrol bisa digulir, kotak bacaan hasil selalu menempel di bawah */
.sp-side { display: flex; flex-direction: column; padding-bottom: 10px; }
.sp-ctl {
  flex: 1; min-height: 0; overflow-y: auto; padding-right: 3px;
}
.sp-ctl::-webkit-scrollbar { width: 6px; }
.sp-ctl::-webkit-scrollbar-thumb { background: #2a3a55; border-radius: 3px; }
/* tepi daftar kontrol dibuat memudar saat masih ada isi di luar layar,
   supaya baris yang terpotong terbaca sebagai "masih bisa digulir" */
.sp-ctl.fade-b {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
}
.sp-ctl.fade-t {
  -webkit-mask-image: linear-gradient(to top, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to top, #000 calc(100% - 20px), transparent);
}
.sp-ctl.fade-t.fade-b {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20px,
    #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 20px,
    #000 calc(100% - 20px), transparent 100%);
}
#sp-stat {
  flex: none; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.split-grid .stage { padding: 0; }
#sp-canvas { flex: 1; min-width: 0; height: 100%; display: block; cursor: crosshair; }
#sp-over {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 4;
}
.btnrow { display: flex; gap: 6px; margin-top: 8px; }
.btn {
  flex: 1; border: 1px solid var(--line2); background: #0f1a2d; color: var(--muted);
  font: inherit; font-size: 11.5px; font-weight: 600; padding: 7px 8px;
  border-radius: 8px; cursor: pointer; transition: all .14s;
}
.btn:hover { color: var(--fg); border-color: #3b527a; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .4; cursor: default; }
.btn:disabled:hover { color: var(--muted); border-color: var(--line2); }
.hint { font-size: 11px; color: var(--dim); line-height: 1.5; margin-top: 8px; }
/* tabel pembanding K1–K4 di bawah pemilih skala */
table.cmp {
  width: 100%; border-collapse: collapse; margin: 2px 0 7px;
  font-size: 10.5px; font-variant-numeric: tabular-nums;
}
table.cmp th {
  font-weight: 600; text-align: right; padding: 0 0 2px;
  border-bottom: 1px solid var(--line2); font-size: 10px;
}
table.cmp th:first-child { text-align: left; }
table.cmp td {
  text-align: right; padding: 1px 0; color: var(--muted);
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}
table.cmp td:first-child { text-align: left; color: var(--dim); }
table.cmp td.nul { color: var(--dim); }
table.cmp tr:last-child td { border-bottom: 0; }
#of-scale-note .cap { font-weight: 600; }
#of-scale-note .dim { color: var(--dim); }
.legend-src { display: flex; gap: 14px; margin-top: 9px; font-size: 11px; color: var(--muted); }
.legend-src i {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; vertical-align: 1px;
}
#sp-stat .row.crit b { color: #f59e0b; }
#sp-stat .row .u { color: var(--dim); font-size: 10.5px; font-weight: 400; }

/* ─────────────────────────────  bars  ───────────────────────────── */
.bars { margin-top: 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px 14px; }
.bars h3 { margin-bottom: 10px; }
.bars h3 .muted { color: var(--dim); text-transform: none; letter-spacing: 0; }
.bar-row { display: grid; grid-template-columns: 34px 1fr 78px; gap: 10px;
  align-items: center; font-size: 11.5px; margin: 5px 0; }
.bar-row .lb { color: var(--muted); font-weight: 700; }
.bar-track { height: 13px; background: #0a1220; border-radius: 4px; overflow: hidden; position: relative; }
.bar-track.stack { height: 19px; display: flex; flex-direction: column; justify-content: center; gap: 2px; background: #0a1220; }
.bar-track.stack .bar-fill { height: 6px; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-row .vl { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); }
.bar-note { font-size: 10.5px; color: var(--dim); margin-top: 9px; line-height: 1.5; }

/* ─────────────────────────────  figures / lists  ───────────────────────────── */
.panel.fig { padding: 10px; display: flex; align-items: center; justify-content: center; }
.panel.fig img { width: 100%; height: auto; display: block; border-radius: 6px; background: #fff; }

.bul { list-style: none; }
.bul li { font-size: 12.5px; line-height: 1.6; color: var(--muted); padding: 6px 0 6px 16px;
  position: relative; border-bottom: 1px solid #1b2942; }
.bul li:last-child { border-bottom: 0; }
.bul li::before { content: '—'; position: absolute; left: 0; color: var(--line2); }
.bul li b { color: var(--fg); }
.bul li.warn { color: #fbbf24; }
.bul li.warn b { color: #fbbf24; }

/* numbered variant, used by the conversion procedure */
.bul.num { counter-reset: eqn; }
.bul.num li { counter-increment: eqn; padding-left: 22px; }
.bul.num li::before {
  content: counter(eqn) '.'; color: var(--accent2); font-weight: 700;
  font-variant-numeric: tabular-nums; width: 16px; }
.tbl .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; vertical-align: 1px; }

/* ─────────────────────────────  lightbox  ───────────────────────────── */
#lightbox {
  position: fixed; inset: 0; background: rgba(5,9,17,.94); display: none;
  align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; padding: 24px;
}
#lightbox.on { display: flex; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; background: #fff; }
#lightbox .close { position: absolute; top: 14px; right: 22px; font-size: 30px;
  color: var(--muted); line-height: 1; }

@media (max-width: 1300px) {
  /* deretan tab butuh ruang; judul dipendekkan daripada dipotong elipsis */
  #topbar h1 span { display: none; }
}

@media (max-width: 1180px) {
  .cfg-cards { grid-template-columns: repeat(2, 1fr); }
  .findings { grid-template-columns: 1fr; }
  #topbar p { display: none; }
}
@media (max-width: 900px) {
  .side { flex-direction: column; }
  .side > .panel { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .two-col, .two-col.wide-left, .design-grid { grid-template-columns: 1fr; }
}

/* ─────────────────────  figure captions & citations  ───────────────────── */
.fig-note { font-size: 11.5px; line-height: 1.66; color: var(--dim);
  margin: 9px 2px 20px; max-width: 110ch; }
.cit { color: #7dd3fc; text-decoration: none; border-bottom: 1px dotted #3b6f8f;
  white-space: nowrap; }
.cit:hover { color: #bae6fd; border-bottom-color: #bae6fd; }
.sec-intro { font-size: 12.5px; line-height: 1.68; color: var(--muted);
  margin: 2px 0 14px; max-width: 100ch; }
.sec-intro b { color: var(--fg); }

/* ─────────────────────────────  references  ───────────────────────────── */
#ref-list { display: grid; gap: 10px; padding-bottom: 30px; }
.ref { background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  padding: 14px 17px; display: grid; grid-template-columns: 96px 1fr; gap: 16px;
  scroll-margin-top: 14px; }
.ref:target { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }
.ref .kind { font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 800; color: var(--dim); padding-top: 3px; line-height: 1.4; }
.ref .kind.j { color: #7dd3fc; }
.ref .kind.b { color: #fbbf24; }
.ref .kind.p { color: var(--teal); }
.ref .kind.r { color: var(--muted); }
.ref .cite { font-size: 12.5px; line-height: 1.62; color: var(--fg); }
.ref .used { font-size: 11.5px; line-height: 1.58; color: var(--dim); margin-top: 6px; }
.ref .used b { color: var(--muted); font-weight: 600; }
.ref .doi { font-size: 11px; color: #7dd3fc; margin-top: 4px; }
@media (max-width: 760px) {
  .ref { grid-template-columns: 1fr; gap: 6px; }
}

/* recommended row in the charge-spectrum table */
.tbl tbody tr.rec { background: rgba(56,189,248,.09); }
.tbl tbody tr.rec td { border-bottom-color: #2b3f63; }
.ref.flash { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }

/* ────────────────────  wiggle & mix  ──────────────────── */
#v-mix.active { display: block; overflow: auto; }
/* canvas diposisikan absolut: kalau ikut aliran flex, menyetel width/height
   di dalam ResizeObserver memicu loop tak berujung */
#mx-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: crosshair;
}
.rng { width: 100%; margin: 4px 0 0; accent-color: var(--accent); }
.rng-lab {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px; color: var(--dim); margin-top: 2px;
}
.rng-lab b {
  color: var(--fg); font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.steps {
  margin: 8px 0 0; padding-left: 17px; font-size: 12px;
  line-height: 1.55; color: var(--muted);
}
.steps li { margin-bottom: 8px; }
.steps li:last-child { margin-bottom: 0; }
.steps b { color: var(--fg); }
.eq {
  display: inline-block; margin-top: 4px; font-family: Consolas, monospace;
  font-size: 11.5px; color: var(--accent2); background: #0b1524;
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px;
}
.verdict {
  background: linear-gradient(135deg, #14263f 0%, #121d33 100%);
  border: 1px solid var(--line2); border-left: 3px solid var(--accent2);
  border-radius: 10px; padding: 14px 18px 16px;
}
.verdict > p { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.verdict > p b { color: var(--fg); }
#mx-stat .row .u { color: var(--dim); font-size: 10.5px; font-weight: 400; }
#mx-stat .verdict-line {
  margin-top: 8px; font-size: 11.5px; line-height: 1.45;
  padding: 6px 8px; border-radius: 6px; background: #0b1524;
  border: 1px solid var(--line);
}

/* ───────────────────────  tab Ray 3D  ─────────────────────── */
#v-ray.active { display: block; overflow: auto; }
#ray-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: grab; touch-action: none;
}
#ray-canvas:active { cursor: grabbing; }
#ray-mini {
  display: block; width: 100%; margin: 8px 0 2px; border-radius: 7px;
  border: 1px solid var(--line2); background: #0a1220; cursor: crosshair;
}
.ray-pick { display: flex; gap: 6px; align-items: stretch; margin: 4px 0 8px; }
.ray-pick .btn.arrow {
  flex: 0 0 28px; padding: 0; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.ray-name {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  justify-content: center; gap: 1px; padding: 4px 9px;
  border: 1px solid var(--line2); background: #0f1a2d; border-radius: 8px;
}
.ray-name b { font-size: 12.5px; color: var(--fg); }
.ray-name span {
  font-size: 9.5px; color: var(--dim); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
#ray-hz .chip .sub, #ray-den .chip .sub { font-size: 9.5px; }

/* tombol kamera mengambang di sudut kanvas 3D */
.ray-cam {
  position: absolute; left: 12px; top: 12px; z-index: 4;
  display: flex; gap: 6px;
}
.ray-cam .btn {
  flex: 0 0 auto; padding: 5px 10px; font-size: 11px; border-radius: 7px;
  background: rgba(9, 16, 29, .82); border: 1px solid rgba(90, 120, 165, .55);
  color: #b9c8dc;
}
.ray-cam .btn:hover {
  background: rgba(24, 40, 64, .94); color: #fff; border-color: #3b527a;
}
.ray-cam .btn.on {
  background: rgba(56, 189, 248, .20); border-color: #38bdf8; color: #e0f2fe;
}
#ray-cfg .chip { padding: 6px 9px; font-size: 11.5px; }
#ray-cfg .chip .sub { font-size: 9.5px; }
#ray-cfg-note { margin-top: 6px; }
#ray-stat .row.crit b { color: #f59e0b; }
.btnrow[hidden] { display: none; }
#ray-poly-nav { margin-top: 6px; }
#ray-poly-nav .btn.arrow {
  flex: 0 0 28px; padding: 0; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
#ray-poly-count { padding: 3px 9px; }
#ray-poly-count b { font-size: 12px; }
#ray-poly-count span { font-size: 9.5px; }

/* ───────────────────────  layar sempit (< 900 px)  ───────────────────────
   Di jendela sempit panel 300 px memakan seluruh lebar dan peta hilang sama
   sekali. Di bawah 900 px tata letaknya ditumpuk: kontrol di atas, peta di
   bawah, dan tiap view boleh menggulir sendiri seperti biasa. */
@media (max-width: 900px) {
  #topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  #topbar h1 { font-size: 13px; }
  #topbar p { display: none; }
  .brand .mark { width: 24px; height: 24px; }
  .tabwrap { order: 3; width: 100%; }
  #tabs { flex: 1; }
  .tab { font-size: 12px; padding: 7px 10px; }
  .links { order: 2; margin-left: auto; }
  .links a { padding: 5px 8px; font-size: 11px; }

  .wrap { padding: 16px 14px 44px; }
  .lead h2 { font-size: 17px; }
  .two-col, .cfg-cards, .findings { grid-template-columns: 1fr; }

  #v-illum.active, #v-surface.active { display: block; overflow: auto; }
  .side { flex-direction: column; }
  .side > .panel {
    width: 100%; border-right: 0; border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
  }
  .stage { padding: 12px; }
  .mapbox { min-height: 380px; }

  .split-grid {
    grid-template-columns: 1fr; height: auto; padding: 12px;
  }
  .sp-side { max-height: none; }
  .split-grid .stage { min-height: 440px; }
}

/* ═══════════════════════  tab Fold (peta fold permukaan)  ═══════════════ */
#fd-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: crosshair;
}
#fd-hist {
  display: block; width: 100%; height: 92px; margin-top: 4px;
  border: 1px solid var(--line2); border-radius: 7px; background: #0a1220;
}
.fd-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fd-thumb { cursor: pointer; border: 1px solid var(--line2); border-radius: 9px;
  overflow: hidden; background: #0a1220; transition: border-color .14s, transform .14s; }
.fd-thumb:hover { border-color: #3b527a; transform: translateY(-1px); }
.fd-thumb.on { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }
.fd-thumb canvas { display: block; width: 100%; height: auto; }
.fd-thumb .cap { display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 9px 7px; font-size: 11px; color: var(--muted); }
.fd-thumb .cap b { font-size: 12px; }
.fd-thumb .cap span { font-variant-numeric: tabular-nums; font-size: 10.5px; }

/* ═══════════════════  tab Ray 3D: info konfigurasi  ═══════════════════ */
.cfg-info { margin-top: 8px; border: 1px solid var(--line2); border-radius: 8px;
  background: #0d182a; padding: 8px 10px 9px; font-size: 11.5px; }
.cfg-info .hd { display: flex; justify-content: space-between; align-items: baseline;
  color: var(--muted); margin-bottom: 5px; }
.cfg-info .hd b { color: var(--fg); font-size: 12.5px; }
.cfg-info .r { display: flex; justify-content: space-between; gap: 8px; padding: 2.5px 0;
  color: var(--muted); }
.cfg-info .r b { color: var(--fg); font-variant-numeric: tabular-nums; }
.cfg-info .r .u { color: var(--dim); font-size: 10px; }
.cfg-info .bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden;
  margin: 5px 0 6px; background: #16233a; }
.cfg-info .bar i { display: block; height: 100%; }
.legend-src .sh { border-radius: 0; }
.legend-src .sh.cir { border-radius: 50%; }
.legend-src .sh.tri {
  width: 0; height: 0; background: none !important; border-radius: 0;
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-bottom: 8px solid #ef4444; vertical-align: 0;
}
.legend-src .sh.sq { border-radius: 1px; }
.legend-src .sh.ring { background: none !important; border: 1.6px solid #fbbf24;
  border-radius: 50%; }
#ray-fixbox { border-top: 1px dashed #24354f; margin-top: 10px; padding-top: 2px; }
#ray-fixbox h3 { color: #fbbf24; }
#ray-fix-note { min-height: 0; }
#ray-ver { margin-top: 6px; }
#ray-ver .chip { font-size: 11px; padding: 6px 9px; }
#ray-ver .chip .sub { font-size: 9.5px; }
#ray-shoot-row .btn { font-size: 11.5px; padding: 7px 10px; }
.cfg-card .kv .u { color: var(--dim); font-size: 10px; font-weight: 400; }

/* ── tab Fold: tabel luas per kelas ─────────────────────────────────── */
.fd-areatbl { width: 100%; border-collapse: collapse; font-size: 10.5px;
  margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.fd-areatbl th { text-align: right; font-weight: 500; color: var(--muted);
  font-size: 9.5px; padding: 2px 3px; border-bottom: 1px solid var(--line2); }
.fd-areatbl th:first-child { text-align: left; }
.fd-areatbl td { padding: 2.5px 3px; text-align: right; color: var(--fg);
  border-bottom: 1px solid rgba(120, 140, 170, .10); }
.fd-areatbl td:first-child { text-align: left; white-space: nowrap;
  color: var(--muted); }
.fd-areatbl td i { display: inline-block; width: 9px; height: 9px;
  border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.fd-areatbl tfoot td { color: var(--dim); font-size: 9.5px;
  border-top: 1px solid var(--line2); border-bottom: 0; }
#fd-clsbox .sel { margin-top: 4px; }
#fd-style-note, #fd-spread-note { min-height: 30px; }

/* penanda overlay SP/RP di legenda tab Fold */
.dot.fsp { width: 9px; height: 9px; background: #f87171;
  border: 1.4px solid #0b1220; }
.dot.fsv { width: 0; height: 0; border-radius: 0; background: none;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 9px solid #22d3ee; }
.dot.frp { width: 7px; height: 7px; background: #cbd8eb; border: 0; }

/* penanda "di luar jendela peta" di catatan SP/RP tab Fold */
#fd-pts-note { margin-top: 6px; }
#fd-pts-note b { color: var(--fg); }
#fd-pts-note .off { color: #fbbf24; }

/* ─────────────────────────  tab Offset  ───────────────────────── */
#of-canvas { flex: 1; min-width: 0; height: 100%; display: block; cursor: crosshair; }
#v-offset .split-grid { height: max(720px, calc(100vh - 148px)); }

.of-formula {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px; color: #7dd3fc; text-align: center;
  background: rgba(56,189,248,.07); border: 1px solid rgba(56,189,248,.22);
  border-radius: 8px; padding: 8px 12px; margin: 12px auto 4px;
  max-width: 320px; letter-spacing: .02em;
}
.of-formula sub { font-size: 10px; }

/* kotak warna horizon di legenda */
.of-hz { display: inline-block; width: 13px; height: 0;
  border-top: 2px solid; vertical-align: middle; margin-right: 2px; }
.of-hz.ubi { border-color: #fbbf24; }
.of-hz.mbe { border-color: #a78bfa; }
.of-hz.upm { border-color: #34d399; }

#of-tbl-band td, #of-tbl-gap td, #of-tbl-sprp td { font-variant-numeric: tabular-nums; }
#of-tbl-band tbody tr:hover, #of-tbl-gap tbody tr:hover,
#of-tbl-sprp tbody tr:hover { background: rgba(56,189,248,.05); }
#of-tbl-sprp tr:last-child td { color: #6ee7b7; }

#of-stat .row b span { font-size: 10.5px; }
#of-pts-note { margin-top: 4px; }

/* tab Sintetik */
#sy-canvas { flex: 1; min-width: 0; height: 100%; display: block; }
#sy-cur { position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; }

/* peta inline–crossline di kanan penampang */
#v-synth .stage.sy-stage {
  flex-direction: row; gap: 10px; align-items: stretch; overflow: hidden;
  padding: 14px 16px 10px;
}
#v-synth .sy-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#v-synth .sy-side {
  flex: 0 0 320px; width: 320px; align-self: flex-start;
  display: flex; flex-direction: column; gap: 7px;
  padding: 10px 12px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
#v-synth .sy-side h4 {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
/* bilah alat zoom di atas kanvas */
#v-synth .sy-tools {
  display: flex; align-items: center; gap: 6px; flex: none;
  padding: 0 0 7px 2px;
}
#v-synth .sy-tools .chip {
  padding: 1px 9px; font-size: 11px; line-height: 18px; min-width: 26px;
  justify-content: center;
}
#v-synth .sy-zoom {
  margin-left: auto; font-size: 10px; color: var(--dim);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
#v-synth .sy-sprp { font-size: 11px; margin: 0; }
/* panel spektrum: kartu mengambang di atas kanvas seismik */
.sy-specbox {
  position: absolute; right: 10px; top: 10px; width: 372px;
  background: #0a1220; border: 1px solid var(--line2);
  border-radius: 9px; padding: 9px 11px 8px; z-index: 6;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
.sy-specbox[hidden] { display: none; }
.sy-specbox.light {
  background: #ffffff; border-color: rgba(15,23,42,.20);
  box-shadow: 0 10px 30px rgba(15,23,42,.18);
}
.sy-specbox.light .sy-spechd span,
.sy-specbox.light .sy-specft { color: #64748b; }
/* tab dB–Hz / f–k: dua tombol kecil, bukan judul statis — kartu ini
   sekarang memuat dua analisis dari wilayah yang sama. */
.sy-spectabs { display: flex; gap: 3px; }
.sy-spectabs button {
  border: 1px solid transparent; background: none; cursor: pointer;
  color: var(--dim); font: inherit; font-size: 10.5px; font-weight: 700;
  letter-spacing: .02em;
  padding: 2px 7px; border-radius: 5px; line-height: 1.3;
}
.sy-spectabs button:hover { color: var(--fg); }
.sy-spectabs button.on {
  color: var(--fg); background: rgba(148,163,184,.16);
  border-color: var(--line2);
}
.sy-specbox.light .sy-spectabs button { color: #64748b; }
.sy-specbox.light .sy-spectabs button.on {
  background: rgba(15,23,42,.07); border-color: rgba(15,23,42,.16);
  color: #0f172a;
}
.sy-spechd {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  cursor: grab;                 /* kartu bisa digeser — lihat wire() */
  user-select: none;
}
.sy-spechd:active { cursor: grabbing; }
.sy-spechd b {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.sy-spechd span {
  font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums;
  margin-left: auto; white-space: nowrap;
}
.sy-spechd button {
  border: 0; background: none; color: var(--dim); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 0 0 4px;
}
.sy-spechd button:hover { color: var(--fg); }
#sy-spec-cv { display: block; width: 100%; height: 196px; }
.sy-specft {
  margin: 5px 0 0; font-size: 10px; line-height: 1.45; color: var(--dim);
  font-variant-numeric: tabular-nums; white-space: pre-line;
}
.sy-specact { display: flex; gap: 5px; margin-top: 6px; }
.sy-specact button {
  flex: 1; border: 1px solid var(--line2); background: none;
  color: var(--dim); cursor: pointer; font: inherit; font-size: 10px;
  padding: 3px 4px; border-radius: 5px; white-space: nowrap;
}
.sy-specact button:hover { color: var(--fg); border-color: var(--fg); }
.sy-specbox.light .sy-specact button { border-color: rgba(15,23,42,.18); }
/* kotak filter: empat slider bertumpuk, hanya tampil saat filter aktif */
#sy-bp-row { display: none; }
#sy-bp-row.on { display: block; }

#v-synth .sy-side .sel { font-size: 11px; }
#v-synth .sy-mapbox { position: relative; flex: none; height: 288px; }
#sy-map { position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: crosshair; }
#v-synth .sy-secrow { margin-top: 0; }
#v-synth .sy-secrow .chip { flex: 1; justify-content: center; }
#v-synth .sy-side .hint { font-size: 10.5px; line-height: 1.45; }
#v-synth .split-grid { height: max(680px, calc(100vh - 148px)); }
#sy-stat .kv span { color: var(--dim); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

/* ───────────────  kolofon produk (tab Referensi)  ─────────────── */
.colophon { margin-top: 22px; }
.colophon h3 { margin-bottom: 8px; }
.colo-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; margin: 14px 0 6px;
}
.colo-grid .ttl {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
.colo-grid p { font-size: 12px; line-height: 1.55; color: var(--muted); }
@media (max-width: 1100px) {
  .colo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .colo-grid { grid-template-columns: 1fr; }
}

/* ───────────────  label kecil di atas judul (eyebrow)  ─────────────── */
.kicker {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent2); margin: 0 0 6px;
}

/* ───────────────────────  tab SEG-Y: inspeksi byte  ─────────────────────── */
.sg-nav { display: flex; align-items: center; gap: 6px; }
.sg-nav .btn { padding: 3px 10px; font-size: 14px; line-height: 1.1; }
.sg-nav b {
  flex: 1; text-align: center; font-size: 11.5px; font-weight: 600;
  color: var(--fg); font-variant-numeric: tabular-nums;
}
#sg-line-row[hidden] { display: none; }

.sg-txtwrap {
  max-height: 342px; overflow: auto; border: 1px solid var(--line);
  border-radius: 8px; background: #0a1220;
}
.sg-txt {
  margin: 0; padding: 10px 14px; white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.52; color: #cbd5e1;
  font-variant-ligatures: none;
}
.sg-txt .ln { color: #4b5f7d; }
.sg-txt .gap { color: #33445f; }
.sg-txt .hit { background: rgba(56, 189, 248, .16); border-radius: 2px; }

.sg-hmap { display: block; width: 100%; height: 218px; margin-top: 12px; }

.sg-hex {
  margin: 12px 0 0; padding: 10px 14px; max-height: 268px; overflow: auto;
  background: #0a1220; border: 1px solid var(--line); border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.55; color: #cbd5e1; white-space: pre;
}
.sg-hex .off { color: #4b5f7d; }
.sg-hex .hex { color: #93c5fd; }
.sg-hex .asc { color: #6ee7b7; }
.sg-hex .zer { color: #3d4d66; }
#sg-canvas { flex: 1; min-width: 0; height: 100%; display: block; cursor: crosshair; }
.sg-scroll { max-height: 430px; overflow: auto; }

/* ═════════════════════  tab Kubus 3D (volume SEG-Y)  ═════════════════════ */
/* kanvas dipatok absolut: layout() membaca getBoundingClientRect dan menulis
   cv.width — kalau kanvas ikut menentukan tinggi wadah, setiap pengukuran
   mengubah dirinya sendiri (loop ukuran tak berujung) */
#v3-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: grab; touch-action: none;
}
#v-kubus .mapbox { background: #080f1c; border-radius: 10px; overflow: hidden; }
#v-kubus .split-grid { height: max(720px, calc(100vh - 148px)); }

/* tombol sudut pandang mengambang di atas kanvas */
.v3-float {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  display: flex; gap: 6px; pointer-events: auto;
}
.v3-fbtn {
  width: 34px; height: 30px; border-radius: 7px; border: 1px solid var(--line2);
  background: rgba(15, 26, 45, .92); color: var(--muted); font: inherit;
  font-size: 10.5px; font-weight: 700; cursor: pointer; transition: all .14s;
}
.v3-fbtn:hover { color: var(--fg); border-color: #3b527a; background: rgba(22, 38, 64, .96); }
.v3-fbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.dropz {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 16px 10px; margin-top: 8px; cursor: pointer; text-align: center;
  border: 1.5px dashed #2a3a55; border-radius: 9px; background: #0b1526;
  transition: border-color .12s, background .12s;
}
.dropz b { font-size: 12px; color: var(--fg); font-weight: 600; }
.dropz span { font-size: 10.5px; color: var(--dim); }
.dropz:hover, .dropz.over {
  border-color: var(--accent2); background: rgba(56, 189, 248, .08);
}
#v3-stat .kv { display: flex; justify-content: space-between; gap: 10px;
  padding: 2px 0; font-size: 11px; }
#v3-stat .kv span { color: var(--muted); }
#v3-stat .kv b { color: var(--fg); font-variant-numeric: tabular-nums;
  text-align: right; }
#v3-prog { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
