:root {
  --bg: #07090d;
  --glass: rgba(14, 18, 26, 0.58);
  --glass-strong: rgba(14, 18, 26, 0.78);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef2f6;
  --muted: #8f9cab;
  --gempa: #ff4d4f;
  --api: #ff6a1a;
  --lapor: #3ea6ff;
  --accent: #ffd166;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Space Grotesk", Inter, system-ui, sans-serif;
  --brand-bg: rgba(14, 18, 26, .32);
  --pop-bg: rgba(14, 18, 26, .9);
  --soft: #b8c3cf;
  --merah-teks: #ffb3b4;
  --merah-teks-2: #fca5a5;
  --bayang: 0 10px 40px rgba(0,0,0,.35);
  --vignette: rgba(0,0,0,.45);
  color-scheme: dark;
}
/* ---------- tema terang ---------- */
:root[data-theme="light"] {
  --bg: #eef1f5;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --stroke: rgba(15, 23, 42, 0.1);
  --stroke-2: rgba(15, 23, 42, 0.2);
  --card: rgba(15, 23, 42, 0.04);
  --card-2: rgba(15, 23, 42, 0.08);
  --line: rgba(15, 23, 42, 0.09);
  --text: #0f172a;
  --muted: #5b6676;
  --accent: #b45309;
  --brand-bg: rgba(255, 255, 255, .55);
  --pop-bg: rgba(255, 255, 255, .96);
  --soft: #475569;
  --merah-teks: #be123c;
  --merah-teks-2: #b91c1c;
  --bayang: 0 8px 30px rgba(15, 23, 42, .14);
  --vignette: rgba(255, 255, 255, .25);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* sedikit gelap di tepi agar UI kaca terbaca, peta tetap jadi fokus */
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, var(--vignette) 100%); }

.glass { background: var(--glass); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--stroke); box-shadow: var(--bayang), inset 0 1px 0 rgba(255,255,255,.05); }

/* masuk bertahap saat halaman dibuka */
.ui-in { animation: uiIn .9s var(--ease-out) both; animation-delay: calc(.5s + var(--d, 0) * .12s); }
@keyframes uiIn { from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(6px); } }

/* ---------- brand (kiri atas, transparan) ---------- */
.brand { position: fixed; top: 16px; left: 16px; z-index: 4; padding: 10px 12px 9px 14px; border-radius: 16px;
  background: var(--brand-bg); opacity: .82; transition: opacity .25s, background .25s; max-width: 340px; }
.brand:hover, .brand:focus-within { opacity: 1; background: var(--glass); }
.brand-row { display: flex; align-items: center; gap: 8px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.02em;
  border: 0; background: none; padding: 0; color: var(--text); cursor: pointer; border-radius: 6px;
  transition: opacity .2s, transform .3s var(--spring); }
.logo:hover { opacity: .85; }
.logo:active { transform: scale(.97); }
.logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.logo b { font-weight: 700; background: linear-gradient(90deg, #ff6b6b, #ff3d71); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.live { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  color: #ff6b6b; padding: 2px 7px; border-radius: 99px; background: rgba(255,77,79,.12); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 0 0 rgba(255,77,79,.7);
  animation: livePing 1.8s infinite; }
@keyframes livePing { 70% { box-shadow: 0 0 0 7px rgba(255,77,79,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,79,0); } }
.icon-btn { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; transition: background .2s, color .2s; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--card-2); color: var(--text); }
.updated { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.updated b { color: var(--text); font-weight: 600; }
.info { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--soft);
  animation: fadeDown .3s var(--ease-out); }
.info p { margin: 0 0 6px; }
.info .credit { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- ticker (atas tengah) ---------- */
.ticker { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: min(560px, calc(100vw - 32px - 2 * 360px)); min-width: 360px; height: 52px; border-radius: 99px;
  padding: 0 16px 0 8px; display: flex; align-items: center; gap: 10px; cursor: pointer; overflow: hidden;
  transition: left .5s var(--ease-out), width .5s var(--ease-out), border-color .3s; }
.ticker:hover { border-color: var(--stroke-2); }
.ticker.ui-in { animation-name: tickerIn; }
@keyframes tickerIn { from { opacity: 0; transform: translate(-50%, -16px) scale(.96); filter: blur(6px); } }
body.mode-on .ticker { left: calc(50% + 205px); width: min(520px, calc(100vw - 460px - 32px)); min-width: 300px; }
.tk-body { position: relative; flex: 1; height: 100%; min-width: 0; }
.tk-item { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; min-width: 0;
  animation: tkIn .55s var(--ease-out) both; }
.tk-item.out { animation: tkOut .4s ease both; }
@keyframes tkIn { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } }
@keyframes tkOut { to { opacity: 0; transform: translateY(-18px); filter: blur(4px); } }
.tk-badge { flex: none; height: 36px; min-width: 36px; padding: 0 10px; border-radius: 99px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 14px; color: #fff; background: var(--c, #444);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c, #444) 55%, transparent); }
.tk-badge svg { font-size: 17px; }
.tk-text { min-width: 0; line-height: 1.25; }
.tk-kicker { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--c, var(--muted)); }
.tk-kicker .new { margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: #ff4d4f; color: #fff;
  animation: blink 1s 4; }
@keyframes blink { 50% { opacity: .3; } }
.tk-main { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-main span { color: var(--muted); font-weight: 500; }
.tk-dots { display: flex; gap: 4px; flex: none; }
.tk-dots i { width: 5px; height: 5px; border-radius: 99px; background: var(--stroke-2); transition: width .35s var(--ease-out), background .3s; }
.tk-dots i.on { width: 14px; background: var(--text); }
.tk-progress { position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px; border-radius: 2px; overflow: hidden; }
.tk-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, transparent, var(--c, #fff)); }
.tk-progress i.run { animation: tkBar var(--dur, 6s) linear both; }
@keyframes tkBar { to { width: 100%; } }
.ticker:hover .tk-progress i { animation-play-state: paused; }

/* ---------- dock (bawah tengah) ---------- */
.dock { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 4px; padding: 6px; border-radius: 22px; max-width: calc(100vw - 32px); }
.dock.ui-in { animation-name: dockIn; }
@keyframes dockIn { from { opacity: 0; transform: translate(-50%, 24px) scale(.96); filter: blur(6px); } }
/* Sorotan yang meluncur ke tombol aktif */
.dock-ind { position: absolute; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 16px; pointer-events: none; z-index: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c, #fff) 26%, transparent), color-mix(in srgb, var(--c, #fff) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--c, #fff) 45%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--c, #fff) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.12);
  opacity: 0; transform: scale(.85);
  transition: left .55s var(--spring), width .55s var(--spring), opacity .3s, transform .45s var(--spring), background .4s, border-color .4s, box-shadow .4s; }
.dock-ind.on { opacity: 1; transform: scale(1); }
.dock.swiping .dock-ind { transition: opacity .3s, transform .2s; }
.dock-btn.just .dock-ic { animation: dockPop .6s var(--spring); }
@keyframes dockPop { 0% { transform: scale(1); } 30% { transform: scale(.82) rotate(-6deg); } 65% { transform: scale(1.18) rotate(4deg); } 100% { transform: scale(1); } }
.dock-btn.just .dock-txt b { animation: numPop .5s var(--ease-out); }
@keyframes numPop { from { transform: translateY(6px); opacity: .3; } }
.dock-btn { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 7px; border: 0;
  border-radius: 16px; background: transparent; cursor: pointer; text-align: left; isolation: isolate;
  transition: transform .35s var(--spring), background .25s; }
.dock-btn:hover { transform: translateY(-4px); background: var(--card-2); }
.dock-btn:active { transform: translateY(-1px) scale(.97); }
.dock-btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0;
  background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--c) 40%, transparent), transparent 70%);
  transition: opacity .35s; }
.dock-btn[aria-pressed="true"] { background: transparent; }
.dock-btn[aria-pressed="true"]::before { opacity: 0; }
.dock-btn[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 18px; height: 3px;
  border-radius: 3px; transform: translateX(-50%); background: var(--c); box-shadow: 0 0 10px var(--c); }
.dock-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 95%, #fff 5%), color-mix(in srgb, var(--c) 65%, #000));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.3); }
.dock-btn:hover .dock-ic { animation: wiggle .5s var(--spring); }
@keyframes wiggle { 30% { transform: rotate(-8deg) scale(1.06); } 60% { transform: rotate(6deg) scale(1.06); } }
.dock-txt { display: flex; flex-direction: column; line-height: 1.1; }
.dock-txt b { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dock-txt small { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.dock-txt .sm { display: none; }

/* ---------- panel lapisan ---------- */
.panel { position: fixed; top: var(--top-ui, 92px); left: 16px; bottom: 100px; width: 380px; z-index: 2;
  transition: top .3s var(--ease-out);
  display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; overflow: hidden;
  background: var(--glass-strong); animation: panelIn .55s var(--ease-out) both; }
@keyframes panelIn { from { opacity: 0; transform: translateX(-28px) scale(.98); filter: blur(4px); } }
.grip { display: none; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--stroke);
  background: var(--card); border-radius: 99px; padding: 4px 12px 4px 8px; color: var(--muted); font-weight: 600;
  font-size: 12.5px; cursor: pointer; transition: color .2s, border-color .2s, transform .3s var(--spring); }
.back:hover { color: var(--text); border-color: var(--stroke-2); transform: translateX(-2px); }
.panel-head { display: flex; flex-direction: column; gap: 8px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hide-list { margin-left: 0; width: 32px; height: 32px; font-size: 17px; border: 1px solid var(--stroke); }

.show-list { position: fixed; top: var(--top-ui, 92px); left: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 11px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 13px;
  animation: showListIn .45s var(--spring) both; transition: transform .3s var(--spring), border-color .2s, top .3s var(--ease-out); }
.show-list:hover { transform: translateX(3px); border-color: var(--stroke-2); }
.show-list svg { font-size: 17px; color: var(--c, var(--text)); }
.show-list b { font-family: var(--display); font-variant-numeric: tabular-nums; }
@keyframes showListIn { from { opacity: 0; transform: translateX(-16px) scale(.95); } }
.panel-title { display: flex; align-items: center; gap: 10px; }
.p-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 17px;
  background: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 50%, transparent); }
.panel-title h1 { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: -.02em; }
.count { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.panel-sub { margin: 0; color: var(--muted); font-size: 12px; }

.legend { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--card);
  border-radius: 14px; font-size: 12px; color: var(--muted); }
.legend .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.legend .ramp { flex: 1; min-width: 140px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #ffa53a, #ff7a1a, #ff4013, #e0121b, #b0001a); }
.legend .note { color: var(--soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--card); font-size: 12px; font-weight: 600; color: var(--muted);
  transition: all .25s var(--ease-out); }
.chip:hover { border-color: var(--stroke-2); color: var(--text); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--c, #fff) 18%, transparent); color: var(--text);
  border-color: color-mix(in srgb, var(--c, #fff) 55%, transparent); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.chip b { font-variant-numeric: tabular-nums; }

.list { flex: 1; overflow-y: auto; margin: 0 -8px; padding: 0 8px; min-height: 80px; }
.list::-webkit-scrollbar { width: 6px; }
.list::-webkit-scrollbar-thumb { background: var(--stroke-2); border-radius: 3px; }
.item { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 10px 10px; border: 0;
  background: none; text-align: left; cursor: pointer; border-radius: 14px; margin-bottom: 2px;
  animation: itemIn .45s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 30ms);
  transition: background .2s, transform .3s var(--spring); }
@keyframes itemIn { from { opacity: 0; transform: translateY(10px); } }
.item:hover { background: var(--card-2); transform: translateX(3px); }
.item-main { min-width: 0; flex: 1; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-sub { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.item-news { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 11px; font-weight: 600; color: var(--accent); }
.badge { flex: none; min-width: 44px; height: 36px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; background: var(--card-2); }
.badge svg { font-size: 18px; }
.badge.m-tinggi { background: linear-gradient(145deg, #ff6b6b, #e11d48); color: #fff; box-shadow: 0 4px 16px rgba(255,77,79,.4); }
.badge.m-sedang { background: rgba(255,77,79,.2); color: var(--merah-teks); }
.bar { height: 6px; border-radius: 3px; background: var(--card-2); margin-top: 7px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ffa53a, #ff4013, #e0121b);
  transform-origin: left; animation: grow .9s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 30ms + .15s); }
@keyframes grow { from { transform: scaleX(0); } }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 10px 10px 4px; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sec-title:first-child { margin-top: 2px; }
.sec-title i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.sec-title span { margin-left: auto; font-family: var(--display); color: var(--text); letter-spacing: 0; }
.sec-note { margin: 0 10px 6px; font-size: 11.5px; color: var(--muted); }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .key.tri svg { font-size: 13px; }
.item-flag { display: inline-block; margin: 5px 6px 0 0; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600;
  background: rgba(239, 68, 68, .16); color: var(--merah-teks-2); }
.badge > svg[style] { font-size: 20px; }
.legend .key i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); border: 1.5px solid var(--b, var(--c)); }
.pop .chips-mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pop .chips-mini span { padding: 1px 7px; border-radius: 99px; background: var(--card-2); font-size: 11px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600;
  background: var(--card-2); text-transform: capitalize; }
.foot { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.foot p { margin: 0; }

/* ---------- popup ---------- */
.maplibregl-popup { animation: popIn .35s var(--spring) both; }
@keyframes popIn { from { opacity: 0; transform: var(--tw, none) scale(.92); } }
/* Kartu tidak menggulir; hanya isi tab (.ppane) yang menggulir bila kartu mentok tinggi maksimal */
.maplibregl-popup-content { background: var(--pop-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: var(--text); border: 1px solid var(--stroke); border-radius: 18px; padding: 14px 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,.55); font-size: 13px; max-height: var(--pop-max, 60vh); overflow: hidden;
  display: flex; flex-direction: column; }
.pop { display: flex; flex-direction: column; min-height: 0; max-height: calc(var(--pop-max, 60vh) - 28px); }
.pop > * { flex-shrink: 0; }
.pop > .ppane { flex: 0 1 auto; min-height: 70px; }
.maplibregl-popup-tip { border-top-color: var(--pop-bg) !important; border-bottom-color: var(--pop-bg) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; padding: 4px 9px; border-radius: 0 18px 0 10px; }
.maplibregl-popup-close-button:hover { background: var(--card-2); color: var(--text); }
.pop h3 { margin: 0 24px 2px 0; font-family: var(--display); font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pop h3 .hi { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 14px; background: var(--c); }
.pop .sub { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; }
.pop dt { color: var(--muted); }
.pop dd { margin: 0; }
.pop img { width: 100%; max-height: 150px; object-fit: cover; border-radius: 12px; margin-top: 8px; }
.pop .src { margin-top: 8px; font-size: 11px; color: var(--muted); }
.pop .lv { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 99px; font-weight: 700; font-size: 11px;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.pop .flags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.pop .flags span { padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: rgba(239,68,68,.16); color: var(--merah-teks-2); }
.pop .dl-stack { display: block; }
.pop .dl-stack dt { font-size: 11px; font-weight: 700; margin-top: 6px; }
.pop .dl-stack dt:first-child { margin-top: 0; }
.pop .rek { margin: 0; padding-left: 18px; }
.pop .rek li { margin-bottom: 6px; }
.pop .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.pop .grid3 div { background: var(--card); border-radius: 10px; padding: 6px; text-align: center; }
.pop .grid3 b { display: block; font-family: var(--display); font-size: 18px; }
.pop .grid3 span { font-size: 11px; color: var(--muted); }
.pop .soon { margin-top: 6px; padding: 8px; border: 1px dashed var(--stroke-2); border-radius: 10px; color: var(--muted); font-size: 12px; }
.pop .sec { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.pop .sec-h { font-weight: 700; font-size: 12px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.pop .news { display: block; padding: 7px 8px; margin: 0 -8px; text-decoration: none; color: var(--text); border-radius: 10px; transition: background .2s; }
.pop .news:hover { background: var(--card-2); }
.pop .nt { font-weight: 600; line-height: 1.35; }
.pop .nm { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pop .nm em { color: #c9a24d; font-style: normal; }
.pop .rings { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 8px; align-items: center; font-size: 12px; }
.pop .rings i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pop .rings span:nth-child(3n) { color: var(--muted); }
.pop .ptabs { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pop .ptab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--stroke); background: var(--card); color: var(--muted); font-size: 12px; font-weight: 600;
  transition: all .25s var(--ease-out); }
.pop .ptab:hover { color: var(--text); border-color: var(--stroke-2); }
.pop .ptab b { font-family: var(--display); color: var(--text); }
.pop .ptab svg { font-size: 13px; }
.pop .ptab[aria-expanded="true"] { background: rgba(255, 209, 102, .14); border-color: rgba(255, 209, 102, .5); color: var(--accent); }
.pop .ppane { margin-top: 10px; animation: fadeDown .3s var(--ease-out);
  max-height: 300px; overflow-y: auto; overscroll-behavior: contain; margin-right: -6px; padding-right: 6px; }
.pop .ppane::-webkit-scrollbar { width: 5px; }
.pop .ppane::-webkit-scrollbar-thumb { background: var(--stroke-2); border-radius: 3px; }
.pop .more { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.pop .more summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent);
  list-style: none; display: flex; align-items: center; gap: 6px; }
.pop .more summary::-webkit-details-marker { display: none; }
.pop .more summary::before { content: "▸"; transition: transform .2s var(--ease-out); }
.pop .more[open] summary::before { transform: rotate(90deg); }
.pop .more[open] summary { margin-bottom: 8px; }
.pop .more[open] > *:not(summary) { animation: fadeDown .3s var(--ease-out); }

.pulse { width: 16px; height: 16px; border-radius: 50%; pointer-events: none; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gempa);
  animation: ring 2.2s var(--ease-out) infinite; }
.pulse::after { animation-delay: 1.1s; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(5); opacity: 0; } }

.maplibregl-ctrl-group { background: var(--glass) !important; backdrop-filter: blur(14px); border: 1px solid var(--stroke);
  border-radius: 14px !important; box-shadow: none !important; overflow: hidden; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--stroke) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) opacity(.8); }
:root[data-theme="light"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: opacity(.75); }
.updated .warn { color: var(--merah-teks); }
.pop .ptab[aria-expanded="true"] { color: var(--accent); }
:root[data-theme="light"] .pop .ptab[aria-expanded="true"] { background: rgba(180, 83, 9, .1); border-color: rgba(180, 83, 9, .4); }
:root[data-theme="light"] .tk-dots i.on { background: var(--text); }
:root[data-theme="light"] .maplibregl-ctrl-attrib { background: rgba(255,255,255,.7); }

/* ---------- tombol tema (brand) ---------- */
.icon-btn + .icon-btn { margin-left: 2px; }
.tema-btn .ic-gelap { display: none; }
:root[data-theme="light"] .tema-btn .ic-terang { display: none; }
:root[data-theme="light"] .tema-btn .ic-gelap { display: block; }

/* ---------- pencarian wilayah ---------- */
.cari { position: fixed; top: var(--top-ui, 92px); left: 16px; width: 360px; z-index: 6; border-radius: 18px;
  background: var(--glass-strong); padding: 6px; animation: fadeDown .25s var(--ease-out); }
.cari-row { display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 10px; }
.cari-row > svg { font-size: 17px; color: var(--muted); }
.cari-row input { flex: 1; min-width: 0; height: 38px; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; }
.cari-row input::placeholder { color: var(--muted); }
.cari-row input::-webkit-search-cancel-button { display: none; }
.cari-row .icon-btn { margin-left: 0; }
.cari-hasil { max-height: min(52vh, 420px); overflow-y: auto; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.cari-hasil:empty { display: none; }
.cari-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 12px;
  background: none; text-align: left; cursor: pointer; }
.cari-item[aria-selected="true"], .cari-item:hover { background: var(--card-2); }
.ci-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-t b { font-weight: 600; }
.ci-t span { font-size: 12px; color: var(--muted); }
.ci-n { flex: none; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 8px; border-radius: 99px; background: var(--card); }
.ci-n.ada { color: #1a1200; background: #fbbf24; }
.cari-kosong { padding: 10px 12px; font-size: 12.5px; color: var(--muted); }

/* ringkasan wilayah di popup */
.pop .grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 8px 0 2px; }
.pop .grid5 div { background: var(--card); border-radius: 10px; padding: 6px 2px; text-align: center; }
.pop .grid5 b { display: block; font-family: var(--display); font-size: 17px; }
.pop .grid5 span { display: block; font-size: 10px; line-height: 1.25; color: var(--muted); }
.pop .grid5 .nol b { color: var(--muted); font-weight: 500; }
.pop .evs { display: flex; flex-direction: column; gap: 2px; }
.pop .ev { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 7px 8px; margin: 0 -8px; width: calc(100% + 16px);
  border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 12.5px; }
.pop .ev:hover { background: var(--card-2); }
.pop .ev-ic { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px;
  color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.pop .ev-t { min-width: 0; display: flex; flex-direction: column; }
.pop .ev-t b { font-weight: 600; }
.pop .ev-t span { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- tombol & animasi angin ---------- */
.maplibregl-ctrl-group .ctrl-angin { display: grid; place-items: center; font-size: 17px; color: var(--text); opacity: .8;
  transition: color .2s, background .2s, opacity .2s; }
.maplibregl-ctrl-group .ctrl-angin:hover { opacity: 1; }
.maplibregl-ctrl-group .ctrl-angin[aria-pressed="true"] { opacity: 1; color: #fff; background: #0d9488; }
.angin-kanvas { position: absolute; top: 0; left: 0; pointer-events: none; }
.maplibregl-ctrl-bottom-right { bottom: var(--ctrl-bottom, 0px); transition: bottom .3s var(--ease-out); }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ---------- layar sedang ---------- */
@media (max-width: 1180px) and (min-width: 761px) {
  .dock-btn { flex-direction: column; gap: 3px; padding: 7px 10px 6px; min-width: 78px; text-align: center; }
  .dock-txt { align-items: center; }
  .dock-txt b { font-size: 16px; }
  .dock-txt .lg { display: none; }
  .dock-txt .sm { display: inline; }
  .dock-ic { width: 30px; height: 30px; font-size: 15px; border-radius: 10px; }
  .ticker { width: min(520px, calc(100vw - 32px - 2 * 260px)); min-width: 320px; }
  body.mode-on .ticker { left: auto; right: 16px; transform: none; width: min(460px, calc(100vw - 440px)); }
  body.mode-on .ticker.ui-in { animation: none; }
}

/* ---------- HP ---------- */
@media (max-width: 760px) {
  .brand { top: calc(8px + env(safe-area-inset-top)); left: 8px; padding: 7px 10px; max-width: calc(100vw - 16px); }
  .logo { font-size: 15px; }
  .brand:not(:focus-within) .updated { display: none; }
  .ticker, body.mode-on .ticker { top: calc(56px + env(safe-area-inset-top)); left: 8px; right: 8px; width: auto; min-width: 0;
    transform: none; height: 48px; }
  .ticker.ui-in { animation-name: uiIn; }
  .tk-dots { display: none; }
  .dock { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); transform: none; justify-content: space-between;
    gap: 2px; padding: 5px; max-width: none; }
  .dock.ui-in { animation-name: uiIn; }
  .dock-ind { top: 5px; bottom: 5px; border-radius: 14px; }
  .dock-btn { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 7px 2px 5px; text-align: center; border-radius: 14px; }
  .dock-txt { align-items: center; min-width: 0; max-width: 100%; }
  .dock-txt b { font-size: 15px; }
  .dock-txt small { font-size: 10px; margin-top: 1px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .dock-txt .lg { display: none; }
  .dock-txt .sm { display: inline; }
  .dock-ic { width: 30px; height: 30px; font-size: 15px; border-radius: 10px; }
  .dock-btn:hover { transform: none; }
  .dock { touch-action: pan-y; }

  .panel { top: auto; left: 8px; right: 8px; width: auto; bottom: var(--dock-h, 96px); max-height: 40vh;
    border-radius: 22px; padding: 4px 14px 12px; gap: 10px; transition: max-height .3s var(--ease-out);
    animation-name: sheetIn; }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(30px); } }
  /* dibesarkan: berhenti tepat di bawah ticker (tidak tertutup) */
  .panel.open { max-height: calc(100dvh - var(--tk-bottom, 120px) - var(--dock-h, 96px) - 10px); }
  .grip { display: flex; justify-content: center; align-items: center; height: 20px; margin: 0 -14px;
    border: 0; background: none; cursor: pointer; flex: none; }
  .grip span { width: 40px; height: 5px; border-radius: 3px; background: var(--stroke-2); }
  .panel-head { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .show-list { top: auto; left: 8px; bottom: var(--dock-h, 96px); }
  .panel-title { flex: 1; }
  .panel-title h1 { font-size: 18px; }
  .panel-sub, .foot, .back, .hide-list, .head-row { display: none; }
  /* geser panel ke bawah untuk menutup daftar */
  .panel { touch-action: none; user-select: none; -webkit-user-select: none; }
  .panel .grip, .panel .panel-head { cursor: grab; }
  .panel .list { touch-action: pan-y; }
  .panel.dragging { transition: none; }
  .legend { padding: 8px 10px; }
  .cari { left: 8px; right: 8px; width: auto; top: calc(8px + env(safe-area-inset-top)); }
  .cari-row input { font-size: 16px; } /* >=16px: iOS tidak zoom otomatis */
  /* filter jenis: satu baris yang bisa digeser, agar daftar tetap kebagian ruang */
  .chips { flex: none; flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; touch-action: pan-x; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Layar sentuh: efek hover "nyangkut" setelah jari diangkat (mis. abu-abu di dock) -> matikan */
@media (hover: none) {
  .dock-btn:hover { background: transparent; transform: none; }
  .dock-btn:hover .dock-ic { animation: none; }
  .item:hover { background: none; transform: none; }
  .show-list:hover, .back:hover { transform: none; }
  .pop .news:hover, .chip:hover, .pop .ptab:hover, .icon-btn:hover { background: inherit; }
  .chip:hover { background: var(--card); }
  .chip[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--c, #fff) 18%, transparent); }
}
