.app-page { overflow: hidden; height: 100vh; }
#panggung { position: relative; height: calc(100vh - 60px); overflow: hidden; background: radial-gradient(90% 80% at 50% 38%, color-mix(in srgb, var(--accent) 9%, var(--bg)), var(--bg)); }
#kanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#kanvas:active { cursor: grabbing; }
.lapisan { position: absolute; inset: 0; pointer-events: none; transition: opacity .5s ease, transform .5s ease; }
.lapisan > * { pointer-events: auto; }
.lapisan.keluar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.lapisan.keluar > * { pointer-events: none; }
.lapisan[hidden] { display: none; }
.kecil { font-size: 12px; color: var(--muted); font-weight: 600; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.kartu { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.kepala { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.kepala h2 { font-size: 15px; }
.up { color: var(--accent); } .dn { color: #f0816b; }
:root[data-theme="light"] .dn { color: #c2412b; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); }
.seg button { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink2); background: none; border: 0; padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.btn { font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 10px; height: 34px; padding: 0 14px; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; margin-top: 12px; width: 100%; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink2); margin-top: 10px; align-items: center; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

/* Beranda */
.judul { position: absolute; left: clamp(16px, 2.5vw, 36px); top: 24px; max-width: 400px; }
.judul h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; margin: 12px 0 10px; }
.sub { color: var(--ink2); font-size: 13.5px; margin-bottom: 14px; }
.info-nas { position: absolute; left: clamp(16px, 2.5vw, 36px); bottom: 44px; display: flex; gap: 16px; align-items: center; }
.info-nas div { display: flex; flex-direction: column; }
.info-nas b { font-size: 15px; }
.garis-v { width: 1px; align-self: stretch; background: var(--line); }
.top5 { position: absolute; right: clamp(16px, 2.5vw, 36px); top: 24px; width: 320px; }
.t5 { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 22px 1fr auto auto; gap: 2px 10px; align-items: center; padding: 7px 4px; font-size: 13px; cursor: pointer; border-radius: 8px; }
.t5:hover { background: var(--surface2); }
.t5 .no { color: var(--muted); font-weight: 800; } .t5 .nm { font-weight: 700; } .t5 .vl { font-weight: 700; } .t5 .gr { font-size: 12px; font-weight: 700; min-width: 48px; text-align: right; }
.t5 .br { grid-column: 2 / 5; height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.t5 .br i { display: block; height: 100%; background: var(--b4); border-radius: 2px; }
.terpilih { position: absolute; right: clamp(16px, 2.5vw, 36px); bottom: 44px; width: 320px; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat3 div, .stat2 div { display: flex; flex-direction: column; } .stat3 b { font-size: 16px; }
.mini { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; color: var(--ink2); }
.sumber { position: absolute; left: clamp(16px, 2.5vw, 36px); right: clamp(16px, 2.5vw, 36px); bottom: 10px; font-size: 11px; color: var(--muted); margin: 0; }
.balon { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; padding: 8px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; background: #0b1018; color: #e8edf4; border: 1px solid #2b394d; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.balon[hidden] { display: none; }
.pesan { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; pointer-events: none; }
.pesan[hidden] { display: none; }
#panggung.memuat #kanvas { opacity: 0; }

/* Diorama */
.ui { position: absolute; }
.kiri-atas { left: clamp(16px, 2.5vw, 36px); top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 420px; }
.kiri-atas h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); }
.chip i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; } .chip b { font-size: 14px; }
.tengah-atas { left: 50%; transform: translateX(-50%); top: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 480px; }
.jelas { font-size: 12.5px; color: var(--ink2); margin: 10px 0 0; }
.tengah-atas .legenda { justify-content: center; }
.daftar { right: clamp(16px, 2.5vw, 36px); top: 20px; bottom: 24px; width: 350px; display: flex; flex-direction: column; }
#daftar { overflow: auto; margin: 0 -6px; padding: 0 6px; }
.srow { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 12px 1fr auto; gap: 2px 10px; align-items: center; width: 100%; padding: 7px 6px; font-size: 12.5px; border-radius: 9px; cursor: pointer; }
.srow:hover, .srow.on { background: var(--surface2); }
.srow.on { box-shadow: inset 0 0 0 1px var(--accent2); }
.srow .sw { width: 10px; height: 10px; border-radius: 3px; } .srow .sn { font-weight: 600; } .srow .sv { font-weight: 800; }
.srow .sb { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: var(--surface2); overflow: hidden; }
.srow .sb i { display: block; height: 100%; border-radius: 2px; opacity: .85; }
.sektor-kartu { left: clamp(16px, 2.5vw, 36px); bottom: 24px; width: 330px; }
.stat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; } .stat2 b { font-size: 15px; }
#label { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lab { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; font-size: 11px; line-height: 1.15; color: var(--ink); text-shadow: 0 1px 2px var(--bg), 0 0 6px var(--bg); text-align: center; white-space: nowrap; transition: opacity .3s; }
.lab b { font-weight: 800; font-size: 12px; } .lab span { font-weight: 600; opacity: .85; }
.lab.kecil-lab span { display: none; } .lab.on b, .lab.on span { color: var(--accent2); }
@media (max-width: 1000px) {
  .top5, .info-nas { display: none; }
  .terpilih { left: 16px; right: 16px; width: auto; bottom: 36px; }
  .daftar { display: none; }
  .tengah-atas { top: auto; bottom: 16px; width: calc(100% - 32px); max-width: none; }
  .sektor-kartu { bottom: 130px; width: calc(100% - 32px); left: 16px; }
  .kiri-atas h1 { font-size: 26px; }
  .judul { max-width: calc(100% - 32px); }
}
