/* =====================================================================
   FASE 2 — MEJA PRESIDEN
   Layar adalah meja kerja Presiden: alas kulit hijau, peta situasi di
   tengahnya, map (stopmap) berisi berkas, nota yang diketik, disposisi
   tulisan tangan, dan kalender sobek untuk mengakhiri bulan.
   ===================================================================== */
:root {
  --desk: #16302a;        /* alas kulit hijau */
  --desk-deep: #0f231e;
  --desk-hi: #1f3d35;
  --stitch: rgba(201, 165, 90, .35);
  --manila: #dcc184;      /* stopmap */
  --manila-deep: #c5a764;
  --paper: #f1eee4;       /* kertas HVS */
  --paper-ink: #1d1c18;
  --paper-ink2: #57534a;
  --stamp: #c3202f;       /* tinta stempel */
  --pen: #233fa0;         /* tinta pulpen */
  --brass: #c9a55a;
  --brass-hi: #e6c987;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --type: 'Courier Prime', 'Courier New', monospace;
  --hand: 'Kalam', 'Segoe Print', cursive;
}
body { font-feature-settings: 'ss01' on; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }

/* ---------- huruf tampilan: tebal & rapat, bukan kapital berjarak ---------- */
.intro-logo h1, .intro-card h2, .tb-brand, .tb-date div, .nx-label, .drawer-head h3, .el-head h2, .el-cand .pct,
.el-verdict h1, .ending h1, .ending .score, .prov-big, .rp-app span, .tk-label, .tk-brand {
  font-family: var(--display); font-weight: 800; letter-spacing: -.02em;
}
.drawer-head h3 { font-size: 21px; }
.intro-card h2 { font-size: 26px; }
.el-head h2 { font-size: 28px; } .el-verdict h1, .ending h1 { font-size: 44px; }
/* label kecil: kalimat biasa, bukan KAPITAL BERJARAK */
.tb-stat small, .panel-title, .field, .section-h, .rc-head small, .rp-head small, #rapor h5 { text-transform: none; letter-spacing: 0; }
.tb-stat small { font-size: 11.5px; font-weight: 600; color: var(--ink3); }
.panel-title, .section-h { font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.field { font-size: 13px; }

/* ---------- ikon garis ---------- */
.ic { width: 20px; height: 20px; display: block; flex: none; }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn { color: var(--ink2); border-color: transparent; }
.icon-btn:hover { color: var(--brass-hi); background: rgba(201,165,90,.08); }
.btn-music.on { color: var(--brass-hi); }

/* ---------- tombol ---------- */
.btn { border-radius: 6px; }
.btn-primary { background: var(--stamp); border-color: #e0525d; box-shadow: 0 2px 0 #7d0f19, 0 8px 22px rgba(195,32,47,.3); }
.btn-primary:hover { background: #d42a39; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 0 0 #7d0f19; }

/* ---------- bilah atas: kulit gelap dengan jahitan kuningan ---------- */
#topbar { background: var(--desk-deep); border-bottom: 0; position: relative; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
#topbar::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 4px; border-bottom: 1px dashed var(--stitch); pointer-events: none; }
.tb-brand { gap: 10px; font-size: 19px; color: var(--ink); border-right-color: transparent; }
.tb-brand b { font-weight: 800; }
.seal { display: inline-grid; width: 32px; height: 32px; color: var(--brass); filter: drop-shadow(0 1px 0 rgba(0,0,0,.5)); }
.seal svg { width: 100%; height: 100%; }
.tb-date { border-right-color: transparent; }
.tb-date div { font-size: 20px; }
.tb-stat { border-right: 0; border-left: 1px solid rgba(196,204,178,.1); }
.tb-stat b { font-weight: 700; font-size: 18px; }
.tb-stat.big b { font-size: 23px; font-weight: 800; }

/* ---------- laci kiri: punggung stopmap ---------- */
#left { background: linear-gradient(90deg, var(--desk-deep), var(--desk) 85%); border-right: 0; box-shadow: inset -1px 0 0 rgba(0,0,0,.4); }
#dock { gap: 8px; padding-top: 4px; }
#dock button { color: var(--ink2); border-radius: 4px 10px 10px 4px; padding: 11px 4px 9px; border: 0; background: transparent; transition: transform .18s ease, background .18s, color .18s; }
#dock button [data-icon] { display: grid; place-items: center; }
#dock button .ic { width: 26px; height: 26px; stroke-width: 1.5; }
#dock button b { font-weight: 600; font-size: 11.5px; letter-spacing: 0; }
#dock button:hover { color: var(--brass-hi); background: rgba(201,165,90,.07); transform: translateX(2px); }
#dock button.on, #dock button[aria-current] { color: var(--paper-ink); background: linear-gradient(180deg, var(--manila), var(--manila-deep)); box-shadow: 0 3px 0 rgba(0,0,0,.35); transform: translateX(6px); }
#dock button em { background: var(--stamp); color: #fff; font-weight: 700; }

/* ---------- peta situasi di atas meja ---------- */
#mapWrap { background: radial-gradient(ellipse at 50% 42%, #18403a 0%, #0d2622 55%, #081713 100%); }
#mapWrap::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255,226,160,.06), transparent 70%); }
#map .prov { stroke: rgba(8,22,19,.95); }
#map .prov:hover { stroke: var(--brass-hi); filter: brightness(1.2); }
.layer-seg { background: rgba(10,26,22,.88); border-color: rgba(201,165,90,.25); border-radius: 6px; }
.layer-seg button { border-radius: 4px; }
.layer-seg button.on { background: var(--manila); color: var(--paper-ink); }
#zoomCtl button { background: rgba(10,26,22,.88); border-color: rgba(201,165,90,.25); color: var(--ink2); }
#legend { background: rgba(10,26,22,.85); border-radius: 6px; }

/* ---------- kalender sobek: tombol akhiri bulan ---------- */
.btn-next.kalender { display: block; padding: 0; border: 0; background: none; box-shadow: none; width: 168px; right: 20px; bottom: 18px; text-align: left; color: var(--paper-ink); transform-origin: 50% 0; }
.btn-next.kalender:hover { transform: rotate(-1.2deg); }
.btn-next.kalender:active .kal-page { transform: translateY(1px); }
.btn-next.kalender:disabled { filter: none; opacity: 1; }
.btn-next.kalender:disabled .kal-page { filter: saturate(.4) brightness(.8); }
.kal-rings { position: absolute; top: -7px; left: 0; right: 0; display: flex; justify-content: space-around; z-index: 3; padding: 0 34px; }
.kal-rings i { width: 9px; height: 18px; border-radius: 5px; border: 2px solid #a9adb0; border-bottom-color: #6f7477; background: linear-gradient(90deg, #8d9295, #d7dadb 50%, #8d9295); box-shadow: 0 2px 2px rgba(0,0,0,.4); }
.kal-stack { position: absolute; inset: 4px -3px -5px 3px; background: #ddd8c9; border-radius: 3px; box-shadow: 0 1px 0 #bfb9a8, 0 3px 0 #cfc9b8, 0 5px 0 #b9b3a2, 0 16px 30px rgba(0,0,0,.5); }
.kal-page { position: relative; display: grid; background: var(--paper); border-radius: 3px; overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset; }
.kal-year { background: var(--stamp); color: #fff; font-weight: 700; font-size: 12px; padding: 9px 12px 5px; letter-spacing: .02em; }
.kal-month { font-weight: 800; font-size: 31px; letter-spacing: -.035em; line-height: 1; padding: 10px 12px 2px; color: var(--paper-ink); }
.kal-pasaran { font-family: var(--type); font-size: 10.5px; color: var(--paper-ink2); padding: 2px 12px 10px; line-height: 1.3; }
.kal-foot { display: grid; gap: 1px; padding: 8px 12px 10px; border-top: 1px dashed #b9b29d; background: linear-gradient(180deg, #ebe6d7, #e4dece); }
.kalender .nx-label { font-family: var(--font); font-size: 14px; font-weight: 800; letter-spacing: -.01em; color: var(--stamp); }
.kalender .nx-sub { font-size: 11px; color: var(--paper-ink2); opacity: 1; }
.kalender .nx-arrow { display: none; }
.kalender.kal-wait .kal-foot { background: repeating-linear-gradient(-45deg, #f4e3a9, #f4e3a9 6px, #efd994 6px, #efd994 12px); }
.kalender.kal-wait .nx-label { color: var(--paper-ink); }
.kal-torn { z-index: 90; pointer-events: none; transform-origin: 18% 0; animation: kalTear 1.2s cubic-bezier(.5, 0, .75, .4) forwards; clip-path: polygon(0 0, 100% 0, 100% 100%, 92% 98%, 84% 100%, 76% 98%, 68% 100%, 60% 98%, 52% 100%, 44% 98%, 36% 100%, 28% 98%, 20% 100%, 12% 98%, 4% 100%, 0 98%); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
@keyframes kalTear {
  0% { transform: none; }
  18% { transform: rotate(-7deg) translate(-4px, 2px); }
  100% { transform: rotate(-38deg) translate(-120px, 420px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .kal-torn { animation: none; display: none; } }

/* ---------- panel kanan ---------- */
#right { background: linear-gradient(270deg, var(--desk-deep), var(--desk) 85%); border-left: 0; box-shadow: inset 1px 0 0 rgba(0,0,0,.4); }
.tabs button.on { border-bottom-color: var(--brass); color: var(--brass-hi); }

/* ---------- berkas (modal & laci): map dengan tab manila ---------- */
.modal { background: var(--desk); border-color: rgba(201,165,90,.3); border-radius: 4px 12px 12px 12px; }
.m-head { background: linear-gradient(180deg, var(--manila), var(--manila-deep)); color: var(--paper-ink); border-bottom: 0; border-radius: 4px 12px 0 0; }
.m-head h3 { font-weight: 800; letter-spacing: -.01em; }
.m-head p { color: #4d4535; }
.m-head .icon-btn { color: var(--paper-ink); border-color: rgba(0,0,0,.15); }
.m-head .icon-btn:hover { background: rgba(0,0,0,.08); color: var(--stamp); }
.m-head .m-ic { filter: saturate(.8); }
.hub-tabs { background: var(--desk); top: 0; position: relative; }
.drawer { background: var(--desk); border-right: 1px solid rgba(201,165,90,.25); }
.drawer-head { background: linear-gradient(180deg, var(--manila), var(--manila-deep)); color: var(--paper-ink); border-bottom: 0; }
.drawer-head .icon-btn { color: var(--paper-ink); }

/* ---------- lembar disposisi: pilihan atas peristiwa ---------- */
.choices { background: var(--paper); color: var(--paper-ink); margin: 0; padding: 16px 20px 20px; border-top: 1px dashed #b9b29d; position: relative; }
.choices::before { content: 'Disposisi Presiden'; display: block; font-family: var(--type); font-weight: 700; font-size: 13px; color: var(--paper-ink2); margin-bottom: 2px; }
.choice { background: transparent; border: 0; border-bottom: 1px solid #d6d0bf; border-radius: 0; padding: 10px 4px 10px 0; color: var(--paper-ink); position: relative; }
.choice:last-child { border-bottom: 0; }
.choice:hover { background: rgba(35,63,160,.05); border-color: #d6d0bf; transform: none; }
.choice .cn { background: transparent; border: 1.5px solid var(--paper-ink); border-radius: 3px; width: 20px; height: 20px; margin-top: 1px; color: transparent; font-size: 0; }
.choice:hover .cn { border-color: var(--pen); }
.choice b { font-family: var(--type); font-size: 15px; font-weight: 700; }
.choice p { color: var(--paper-ink2); font-size: 13px; }
.choice .tags span, .choice .tag { filter: none; }
.choice.stamped .cn { border-color: var(--pen); }
.choice.stamped .cn::after { content: '✓'; font-family: var(--hand); font-size: 26px; color: var(--pen); display: block; line-height: 14px; margin: -4px 0 0 1px; }
.stamp-mark { position: absolute; right: 18px; top: 50%; font-family: var(--type); font-weight: 700; font-size: 17px; letter-spacing: .08em; color: var(--stamp); border: 3px double var(--stamp); border-radius: 6px; padding: 3px 10px; transform: translateY(-50%) rotate(-9deg) scale(2.2); opacity: 0; animation: stampIn .32s cubic-bezier(.3, 1.4, .5, 1) forwards; mix-blend-mode: multiply; pointer-events: none; }
@keyframes stampIn { to { transform: translateY(-50%) rotate(-9deg) scale(1); opacity: .88; } }
@media (prefers-reduced-motion: reduce) { .stamp-mark { animation: none; opacity: .88; transform: translateY(-50%) rotate(-9deg); } }

/* ---------- kertas kecil: reaksi publik & rapor bulanan ---------- */
#reactCard, .rp-card { background: var(--paper); color: var(--paper-ink); border: 0; border-radius: 3px; box-shadow: 0 2px 0 #cfc9b8, 0 18px 40px rgba(0,0,0,.5); }
#reactCard .up, .rp-card .up, #reactCard .rc-up .rc-ar { color: #1d7a4c; }
#reactCard .down, .rp-card .down, #reactCard .rc-down .rc-ar { color: var(--stamp); }
.rc-head, .rp-head { border-bottom-color: #d6d0bf; }
.rc-head small, .rp-head small, #rapor h5 { color: var(--paper-ink2); font-size: 11.5px; font-weight: 600; }
.rc-w, .rc-natl, .rp-opp small, .rp-th { color: var(--paper-ink2); }
.rc-natl, .rc-foot { border-top-color: #d6d0bf; }
.rc-foot.bad { background: rgba(195,32,47,.08); color: #8f1520; } .rc-foot.good { background: rgba(29,122,76,.08); color: #155c39; }
#reactCard .icon-btn, .rp-card .icon-btn { color: var(--paper-ink2); }
#reactCard.rc-bad { box-shadow: 0 2px 0 #cfc9b8, 0 18px 40px rgba(0,0,0,.5), 0 0 0 2px rgba(195,32,47,.5); }
.rp-head b, .rc-head b { font-weight: 800; }
.rp-ev { background: #e7e2d3; } .rp-ev.bad { background: rgba(195,32,47,.09); border-left-color: var(--stamp); } .rp-ev.good { background: rgba(29,122,76,.09); border-left-color: #1d7a4c; }
.rp-bar { background: #ddd7c6; } .rp-bar u { background: var(--paper-ink); }
.rp-th.l2 { color: var(--paper-ink); } .rp-th.l2::before { background: var(--stamp); box-shadow: none; }
.rp-th.l1::before { background: #b5892c; }
#rapor .rp-card { position: relative; padding-top: 14px; }
#rapor .rp-card::before { content: ''; position: absolute; top: -9px; left: 26px; width: 14px; height: 30px; border: 2.5px solid #a9adb0; border-radius: 8px; border-bottom-color: transparent; transform: rotate(8deg); }
#rapor.rp-min .rp-pill { background: var(--paper); color: var(--paper-ink); border: 0; border-radius: 3px; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
#rapor.rp-min .rp-pill .up { color: #1d7a4c; } #rapor.rp-min .rp-pill .down { color: var(--stamp); }

/* ---------- toast: catatan tempel ---------- */
.toast { background: var(--paper); color: var(--paper-ink); border: 0; border-left: 4px solid var(--brass); border-radius: 2px; }
.toast.bad { border-left-color: var(--stamp); } .toast.good { border-left-color: #1d7a4c; }
.toast b { color: var(--paper-ink); }
.choices::before { content: none; }
.disp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--type); padding-bottom: 6px; border-bottom: 2px solid var(--paper-ink); margin-bottom: 2px; }
.disp-h b { font-size: 14px; } .disp-h span { font-size: 12px; color: var(--paper-ink2); }
.choice .adv { font-family: var(--hand); font-size: 15px; color: var(--pen); margin-top: 1px; transform: rotate(-.6deg); transform-origin: left; }

/* ---------- plakat status kursi ---------- */
#powerBox { background: linear-gradient(180deg, rgba(201,165,90,.1), rgba(201,165,90,.03)); border-bottom: 1px solid rgba(201,165,90,.25); padding: 12px 14px 10px; }
.pw-head { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--brass-hi); font-weight: 700; align-items: center; }
.pw-state { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 3px; border: 1.5px solid currentColor; transform: rotate(-3deg); }
.pw-state.ok { color: var(--green); } .pw-state.warn { color: var(--brass-hi); } .pw-state.bad { color: #ff6b73; animation: pulse 1.2s infinite; }
.pw-row { font-size: 12px; color: var(--ink2); }
.pw-row b { color: var(--ink); }
.pw-row .pv-bar { background: rgba(0,0,0,.3); border-radius: 2px; }
.pw-row .pv-bar i { border-radius: 2px; }
.pw-ok .pv-bar i { background: var(--teal); } .pw-warn .pv-bar i { background: var(--brass); } .pw-bad .pv-bar i { background: var(--red); }
.pw-bad b { color: #ff8a90; }

/* ---------- daftar data: lembar angka, tanpa emoji ---------- */
#tab-stats .st-row:not([data-sit]) { grid-template-columns: 1fr auto; }
#tab-stats .st-row:not([data-sit]) .ic { display: none; }
.st-row { border-radius: 4px; }
.st-row .val { font-size: 13.5px; }

/* ---------- ikon Lini ---------- */
#chirpIcon { border: 1.5px solid rgba(201,165,90,.6); background: var(--desk-deep); color: var(--brass-hi); box-shadow: 0 6px 18px rgba(0,0,0,.4); display: grid; place-items: center; }
#chirpIcon .ic { width: 20px; height: 20px; }

/* ---------- layar judul: meja di malam pelantikan ---------- */
#intro { background: radial-gradient(ellipse 80% 70% at 50% 45%, #1d4038 0%, #12291f 55%, #0b1a14 100%); }
#intro::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 45% 35% at 50% 38%, rgba(255,226,160,.09), transparent 70%); }
.intro-bg path { fill: rgba(201,165,90,.05); stroke: rgba(201,165,90,.4); }
.intro-logo { display: flex; flex-direction: column; align-items: center; }
.seal-lg { width: 76px; height: 76px; color: var(--brass); filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.intro-logo h1 { font-size: clamp(46px, 7.4vw, 104px); line-height: .9; letter-spacing: -.045em; margin: 18px 0 0; color: var(--ink); text-shadow: 0 6px 30px rgba(0,0,0,.45); }
.intro-logo h1 span { display: block; color: inherit; text-shadow: inherit; }
.intro-logo h1 span + span { color: var(--ink); }
.tagline { font-size: 16px; color: var(--ink2); margin-top: 16px; max-width: 46ch; }
.intro-card { background: linear-gradient(180deg, var(--manila), var(--manila-deep)); color: var(--paper-ink); border: 0; border-radius: 4px 12px 12px 12px; box-shadow: 0 3px 0 #8e7640, 0 30px 70px rgba(0,0,0,.5); backdrop-filter: none; position: relative; }
#introMenu { width: min(360px, 100%); padding: 26px 22px 20px; margin-top: 30px; }
#introMenu::before { content: 'Berkas pelantikan'; position: absolute; top: -26px; left: 0; height: 27px; padding: 6px 16px 0; font-size: 12px; font-weight: 700; color: #4d4535; background: var(--manila); border-radius: 8px 8px 0 0; }
#introMenu .btn-ghost { color: var(--paper-ink); border-color: rgba(29,28,24,.25); background: rgba(255,255,255,.18); font-weight: 600; }
#introMenu .btn-ghost:hover { background: rgba(255,255,255,.4); border-color: rgba(29,28,24,.45); }
.intro-foot { color: var(--ink3); }
/* wizard pelantikan */
.intro-card.setup { background: var(--paper); color: var(--paper-ink); box-shadow: 0 3px 0 #bdb6a2, 0 30px 70px rgba(0,0,0,.5); }
.intro-card.setup .fine { color: var(--paper-ink2); }
.intro-card.setup .field { color: var(--paper-ink2); }
.intro-card.setup .field input { background: #fff; color: var(--paper-ink); border-color: #c9c2ae; font-family: var(--type); font-size: 18px; }
.intro-card.setup .field input:focus { outline-color: var(--pen); }
.intro-card.setup .btn-ghost { color: var(--paper-ink); border-color: #c9c2ae; }
.intro-card.setup .btn-ghost:hover { background: #e6e1d2; }
.intro-card.setup .btn { color: var(--paper-ink); }
.intro-card.setup .btn-primary { color: #fff; }
.intro-music { background: rgba(10,26,22,.8); color: var(--brass-hi); border-color: rgba(201,165,90,.3); }
/* kertas: warna tinta lokal untuk semua komponen di dalam wizard */
.intro-card.setup { --ink: #1d1c18; --ink2: #4f4b42; --ink3: #77715f; --line: #d6d0bf; --line2: #c9c2ae; --gold: #9c7a2c; --green: #1d7a4c; --red: #c3202f; color: var(--ink); }
.intro-card.setup h2 { color: var(--paper-ink); }
.intro-card.setup .vp-card, .intro-card.setup .seg button, .intro-card.setup .cab-opt { background: #fbfaf5; color: var(--paper-ink); border-color: #d6d0bf; }
.intro-card.setup .vp-card:hover, .intro-card.setup .cab-opt:hover { border-color: #8f8873; }
.intro-card.setup .vp-card.on, .intro-card.setup .cab-opt.on, .intro-card.setup .seg button.on { background: #fff7de; border-color: var(--pen); box-shadow: 0 0 0 1px var(--pen) inset; }
.intro-card.setup .vp-card small { color: #8a6a22; }
.intro-card.setup .steps span { background: transparent; border: 0; border-bottom: 2px solid #d6d0bf; border-radius: 0; color: var(--ink3); }
.intro-card.setup .steps span.on { color: var(--paper-ink); border-bottom-color: var(--stamp); background: transparent; }
.intro-card.setup .steps span.done { color: #1d7a4c; border-bottom-color: #1d7a4c; }
.intro-card.setup .quota .q { background: #fbfaf5; }
.intro-card.setup .cab-tools .btn { background: #fbfaf5; }
#intro:has(#introSetup:not([hidden])) .intro-inner { justify-content: flex-start; gap: 18px; }
#intro:has(#introSetup:not([hidden])) .intro-logo { flex-direction: row; gap: 14px; }
#intro:has(#introSetup:not([hidden])) .seal-lg { width: 40px; height: 40px; }
#intro:has(#introSetup:not([hidden])) .intro-logo h1 { font-size: 30px; margin: 0; letter-spacing: -.03em; }
#intro:has(#introSetup:not([hidden])) .intro-logo h1 span { display: inline; }
#intro:has(#introSetup:not([hidden])) .tagline { display: none; }
#dock button.on b, #dock button.on .ic { color: var(--paper-ink); }
/* label kecil di layar dalam permainan: kalimat biasa (koran tetap boleh kapital: itu bagian dunia game) */
.eff-box h5, .kv small, .orient-l small { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }
.kv > div, .kv .k { border-radius: 4px; }
:root { --blue: #8aa7d8; }

/* ---------- malam pemilu: grafis siaran NusantaraTV ---------- */
.elect { border-radius: 4px; overflow: hidden; }
.el-head { background: var(--stamp); align-items: center; }
.el-head small { display: block; font-size: 12px; font-weight: 700; opacity: .8; }
.el-head h2 { font-size: 26px; letter-spacing: -.02em; }
.el-live { color: var(--stamp); font-weight: 800; font-size: 13px; border-radius: 3px; animation: none; position: relative; padding-left: 20px; }
.el-live::before { content: ''; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--stamp); animation: pulse 1s infinite; }
.el-cand b { font-size: 17px; font-weight: 800; }
.el-cand .pct { font-size: 60px; letter-spacing: -.04em; }
.el-verdict h1 { font-size: 46px; }

/* ---------- layar akhir: lembaran sejarah ---------- */
.ending.sejarah { position: relative; text-align: left; width: min(680px, 100%); background: var(--paper); color: var(--paper-ink); border: 0; border-radius: 3px; padding: 30px 34px 26px; box-shadow: 0 3px 0 #bdb6a2, 0 40px 100px rgba(0,0,0,.6); }
.sj-head { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 2px solid var(--paper-ink); }
.sj-head .seal { width: 46px; height: 46px; color: #8a6a22; }
.sj-head small { display: block; font-family: var(--type); font-size: 12.5px; color: var(--paper-ink2); }
.sj-head b { display: block; font-size: 18px; font-weight: 800; }
.sj-head span { font-size: 13px; color: var(--paper-ink2); }
.ending.sejarah h1 { font-size: clamp(38px, 6vw, 58px); line-height: 1; margin: 22px 0 8px; color: var(--paper-ink); letter-spacing: -.04em; }
.sj-lede { font-family: var(--type); font-size: 15.5px; line-height: 1.55; color: var(--paper-ink); margin: 0; max-width: 54ch; }
.sj-stamp { position: absolute; right: 30px; top: 92px; font-family: var(--type); font-weight: 700; font-size: 30px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 16px; border: 4px double currentColor; border-radius: 8px; transform: rotate(-11deg); mix-blend-mode: multiply; opacity: .85; animation: stampEnd .5s cubic-bezier(.3, 1.4, .5, 1) .5s both; }
.sejarah.win .sj-stamp { color: #1d7a4c; } .sejarah.lose .sj-stamp { color: var(--stamp); }
@keyframes stampEnd { from { transform: rotate(-11deg) scale(2.6); opacity: 0; } }
.sj-legacy { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin: 24px 0 6px; padding: 16px 0; border-top: 1px solid #d6d0bf; border-bottom: 1px solid #d6d0bf; }
.sj-legacy small { display: block; font-size: 12px; color: var(--paper-ink2); font-weight: 600; }
.ending.sejarah .score { font-size: 64px; font-weight: 800; color: #8a6a22; letter-spacing: -.04em; line-height: 1; }
.sj-legacy h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.sj-legacy p { margin: 0; color: var(--paper-ink2); font-size: 14px; line-height: 1.5; }
.ending.sejarah .end-stats div { background: transparent; border: 0; border-left: 2px solid #d6d0bf; border-radius: 0; padding: 4px 10px; }
.ending.sejarah .end-stats small { color: var(--paper-ink2); font-size: 12px; }
.ending.sejarah .end-stats b { font-size: 18px; font-weight: 800; }
.sj-act { display: flex; gap: 10px; }
.ending.sejarah .btn:not(.btn-primary) { color: var(--paper-ink); border-color: #c9c2ae; }
@media (max-width: 560px) { .ending.sejarah { padding: 22px 18px; } .sj-stamp { font-size: 20px; right: 14px; top: 76px; } .sj-legacy { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .sj-stamp { animation: none; } }

/* ---------- tur: catatan tempel ajudan ---------- */
.tour-hole { border-color: var(--brass-hi); border-radius: 6px; }
.tour-card { background: var(--paper); color: var(--paper-ink); border: 0; border-radius: 3px; box-shadow: 0 3px 0 #bdb6a2, 0 24px 60px rgba(0,0,0,.55); }
.tour-card small { color: var(--stamp); font-family: var(--type); }
.tour-card p { color: var(--paper-ink2); }
.tour-card .btn:not(.btn-primary) { color: var(--paper-ink); border-color: #c9c2ae; }
.ending.sejarah .sj-lede { color: var(--paper-ink); }
.ending.sejarah .sj-legacy p { color: var(--paper-ink2); }
.sj-stamp { top: 26px; right: 26px; }
.sj-head > div { padding-right: 150px; }
@media (max-width: 560px) { .sj-stamp { top: 20px; right: 12px; } .sj-head > div { padding-right: 90px; } }
.elect { background: var(--desk-deep); }

/* ---------- layar sempit ---------- */
@media (max-width: 760px) {
  .btn-next.kalender { width: 128px; right: 10px; bottom: 10px; }
  .kal-month { font-size: 22px; padding: 6px 10px 6px; }
  .kal-year { padding: 6px 10px 3px; font-size: 11px; }
  .kal-pasaran { display: none; }
  .kal-foot { padding: 6px 10px 7px; }
  .kalender .nx-label { font-size: 12.5px; } .kalender .nx-sub { font-size: 10px; }
  #chirp { top: auto; bottom: 10px; left: 10px; transform: none; align-items: flex-start; width: calc(100% - 160px); }
  .layer-seg { max-width: calc(100% - 50px); overflow-x: auto; }
  .layer-seg button { white-space: nowrap; }
  #rapor { left: 8px; bottom: 8px; width: calc(100% - 156px); }
  #dock button.on { transform: translateY(-3px); }
}
.layer-seg, #dock { scrollbar-width: none; } .layer-seg::-webkit-scrollbar, #dock::-webkit-scrollbar { display: none; }

/* ---------- tokoh ---------- */
.tk-janji { background: var(--paper); color: var(--paper-ink); border-left: 4px solid var(--stamp); padding: 10px 14px; border-radius: 2px; font-size: 13.5px; line-height: 1.5; margin-bottom: 14px; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tk-card { background: var(--paper); color: var(--paper-ink); border-radius: 3px; padding: 12px 14px; box-shadow: 0 2px 0 #cfc9b8; display: flex; flex-direction: column; gap: 8px; }
.tk-card header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.tk-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brass); }
.tk-card header b { display: block; font-size: 14px; font-weight: 800; }
.tk-card header small { font-size: 12px; color: var(--paper-ink2); }
.tk-card header em { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 3px; border: 1.5px solid currentColor; transform: rotate(-3deg); }
.tk-warm header em { color: #1d7a4c; } .tk-mid header em { color: #6b6450; } .tk-cold header em { color: #9a6b12; } .tk-hostile header em { color: var(--stamp); }
.tk-bar { height: 5px; background: #ddd7c6; border-radius: 2px; overflow: hidden; }
.tk-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--stamp), #b5892c 45%, #1d7a4c); background-size: 260px 100%; }
.tk-card p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--paper-ink2); }
.tk-card p b { color: var(--paper-ink); }
.tk-card ul { margin: 0; padding: 8px 0 0; list-style: none; border-top: 1px dashed #c9c2ae; display: flex; flex-direction: column; gap: 4px; }
.tk-card li { font-family: var(--hand); font-size: 14.5px; line-height: 1.25; color: var(--pen); }
.tk-card li span { font-family: var(--type); font-size: 11px; color: var(--paper-ink2); margin-right: 6px; }
.tk-card li.down { color: #8f1520; } .tk-card li.tk-none { color: var(--paper-ink2); font-family: var(--font); font-size: 12px; }

/* ---------- ikon pengganti emoji ---------- */
.em { display: inline-flex; vertical-align: -.16em; line-height: 1; }
.em .ic { width: 1.15em; height: 1.15em; stroke-width: 1.7; }
.pc-ic .em .ic, .inv-ic .em .ic, .vp-ic .em .ic, .orient-ic .em .ic { width: 1em; height: 1em; }
.m-ic { color: #5b4b25; }
.m-ic .em .ic { width: 30px; height: 30px; }
.grp-row .ic .em .ic, .av .em .ic, .ch-av .em .ic { width: 18px; height: 18px; }
.av, .ch-av { color: var(--brass-hi); }
.chip .em, .st-row .ic .em { color: inherit; }

/* ---------- foto koran: ilustrasi halftone ---------- */
.paper-img { --il-paper: #e6dcc3; --il-ink: #2a241a; color: #2a241a; font-size: 0; overflow: hidden; filter: none; padding: 0; background: var(--il-paper); }
.paper-img::after { z-index: 2; color: #f1eadb; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.il { display: block; width: 100%; height: 100%; }
.il .il-mid { fill: color-mix(in srgb, var(--il-ink) 55%, var(--il-paper)); }
.il .il-light { fill: color-mix(in srgb, var(--il-ink) 22%, var(--il-paper)); }
.il .il-flame { fill: #8c2a1d; }
.il .il-banner { fill: var(--il-paper); stroke: currentColor; stroke-width: 2; }
.il .il-shield { fill: color-mix(in srgb, var(--il-ink) 70%, var(--il-paper)); stroke: currentColor; }
.paper-badge { position: absolute; left: 6px; top: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; background: #f3ecdc; color: var(--stamp); display: grid; place-items: center; font-size: 15px; box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.paper-badge .em .ic { width: 15px; height: 15px; }
#map .m-ic { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.paper-img::after { content: 'Foto: Harian Nusantara'; letter-spacing: 0; font-weight: 600; }
.tb-stat { display: grid; grid-template-columns: auto auto; justify-content: start; align-content: center; column-gap: 6px; padding-right: 14px; } .tb-stat small { grid-column: 1 / -1; } .tb-stat i { position: static; align-self: end; margin-bottom: 4px; font-size: 11px; white-space: nowrap; }
#map .mover { pointer-events: none; } #map .mover-ship { fill: #d9cfae; opacity: .75; } #map .mover-plane { fill: #ece8dc; opacity: .8; }

/* ---------- skenario awal ---------- */
.scen-h { margin: 18px 0 6px; font-size: 15px; font-weight: 800; color: var(--paper-ink); }
.scen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.scen-card { text-align: left; background: #fbfaf5; color: var(--paper-ink); border: 1px solid #d6d0bf; border-radius: 4px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.scen-card:hover { border-color: #8f8873; transform: translateY(-1px); }
.scen-card.on { background: #fff7de; border-color: var(--pen); box-shadow: 0 0 0 1px var(--pen) inset; }
.scen-card b { font-size: 13.5px; font-weight: 800; }
.scen-card p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--paper-ink2); }
.scen-card.scen-daily { grid-column: 1 / -1; cursor: default; transform: none; }
.mod-note { margin: 4px 0 0; font-size: 12px; text-align: center; opacity: .7; }

/* ---------- arsip kepresidenan ---------- */
.arsip h4 { margin: 18px 0 8px; font-size: 14px; font-weight: 800; color: var(--brass-hi); }
.ars-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ars-stats div { background: var(--paper); color: var(--paper-ink); border-radius: 3px; padding: 10px 12px; }
.ars-stats small { display: block; font-size: 12px; color: var(--paper-ink2); }
.ars-stats b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.ars-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ars-runs li { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 3px; background: rgba(255,255,255,.04); border-left: 3px solid var(--red); font-size: 13px; }
.ars-runs li.win { border-left-color: var(--green); }
.ars-runs li span { color: var(--ink2); font-size: 12px; } .ars-runs li em { font-style: normal; color: var(--ink2); font-size: 12px; }
.ars-runs li strong { font-size: 18px; font-weight: 800; color: var(--brass-hi); }
.ars-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ars-ach div { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; padding: 10px; border-radius: 3px; background: rgba(255,255,255,.03); border: 1px dashed var(--line2); opacity: .55; }
.ars-ach div.on { opacity: 1; background: var(--paper); color: var(--paper-ink); border: 0; }
.ars-ach span { grid-row: span 2; font-size: 22px; color: var(--brass-hi); } .ars-ach div.on span { color: #8a6a22; }
.ars-ach b { font-size: 13px; font-weight: 800; } .ars-ach small { font-size: 11.5px; color: var(--ink3); line-height: 1.35; } .ars-ach div.on small { color: var(--paper-ink2); }
@media (max-width: 640px) { .ars-stats { grid-template-columns: 1fr 1fr; } .ars-runs li { grid-template-columns: 1fr auto; } .ars-runs li span, .ars-runs li em { grid-column: 1; } }

/* ---------- epilog di lembaran sejarah ---------- */
.sj-epi { margin: 16px 0 6px; }
.sj-epi h3, .sj-ach h3 { margin: 0 0 6px; font-size: 14px; font-weight: 800; }
.sj-epi p { margin: 0 0 6px; font-family: var(--type); font-size: 14px; line-height: 1.55; color: var(--paper-ink); }
.sj-record { font-family: var(--hand); font-size: 20px; color: var(--stamp); margin: 4px 0; transform: rotate(-1.5deg); }
.sj-ach div { display: flex; flex-wrap: wrap; gap: 6px; } .sj-ach span { background: #e7e2d3; padding: 4px 10px; border-radius: 3px; font-size: 12.5px; font-weight: 700; }
.sj-scen { font-size: 12px; color: var(--paper-ink2); margin: 8px 0 14px; }
.ending.sejarah { max-height: calc(100vh - 40px); overflow-y: auto; }
