/* =========================================================================
   Atlas Jawa Barat — antarmuka atlas kartografis
   ========================================================================= */

:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-sans: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Base uses dark teal + gold mockup palette */
  --paper: #081718;
  --paper-2: #0d2223;
  --paper-3: #122d2e;
  --ink: #eaf4ee;
  --ink-soft: #a8beb6;
  --ink-faint: #6f8a84;
  --line: rgba(212, 175, 96, 0.16);
  --line-strong: rgba(212, 175, 96, 0.3);
  --accent: #d4af60;
  --accent-soft: rgba(212, 175, 96, 0.18);
  --accent-2: #3aa89a;
  --accent-2-soft: rgba(58, 168, 154, 0.18);
  --gold: #e2c06a;
  --teal: #1b6b67;
  --teal-deep: #0a3a3b;

  --glass: rgba(7, 29, 31, 0.72);
  --glass-strong: rgba(6, 24, 26, 0.9);
  --glass-input: rgba(255, 255, 255, 0.05);
  --glass-hover: rgba(212, 175, 96, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(212,175,96,.06);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.38);

  --sea-1: #0b3a40;
  --sea-2: #072c32;
  --sea-3: #041d22;
  --land: #163634;
  --land-deep: #102928;
  --null: #5f706c;

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --header-h: 68px;
  --sidebar-w: 300px;
  --panel-w: 372px;
  --timeline-h: 96px;

  color-scheme: dark;
}

[data-theme="dark"] {
  --paper: #081718; --paper-2:#0d2223; --paper-3:#122d2e;
  --ink:#eaf4ee; --ink-soft:#a8beb6; --ink-faint:#6f8a84;
  --line:rgba(212,175,96,.16); --line-strong:rgba(212,175,96,.3);
  --accent:#d4af60; --accent-soft:rgba(212,175,96,.18);
  --accent-2:#3aa89a; --accent-2-soft:rgba(58,168,154,.18); --gold:#e2c06a;
  --glass:rgba(7,29,31,.72); --glass-strong:rgba(6,24,26,.9);
  --glass-input:rgba(255,255,255,.05); --glass-hover:rgba(212,175,96,.1);
  --shadow:0 24px 80px rgba(0,0,0,.52), 0 0 0 1px rgba(212,175,96,.06);
  --shadow-soft:0 12px 34px rgba(0,0,0,.38);
  --sea-1:#0b3a40; --sea-2:#072c32; --sea-3:#041d22;
  --land:#163634; --land-deep:#102928; --null:#5f706c;
  color-scheme: dark;
}
[data-theme="light"] {
  --paper:#f4efe3; --paper-2:#ebe3d2; --paper-3:#e1d7c2;
  --ink:#192727; --ink-soft:#53625e; --ink-faint:#7d8984;
  --line:rgba(25,39,39,.14); --line-strong:rgba(25,39,39,.26);
  --accent:#b45739; --accent-soft:#e8c9b9; --accent-2:#2f6f64; --accent-2-soft:#c6ded7; --gold:#b88a45;
  --glass:rgba(249,246,238,.82); --glass-strong:rgba(250,247,240,.96);
  --glass-input:rgba(255,255,255,.52); --glass-hover:rgba(255,255,255,.7);
  --shadow:0 24px 70px rgba(28,38,36,.18), 0 2px 8px rgba(28,38,36,.08);
  --shadow-soft:0 10px 30px rgba(28,38,36,.12);
  --sea-1:#d3e4df; --sea-2:#b8d1cb; --sea-3:#a4c4bd; --land:#e9e0cb; --land-deep:#ded2b8; --null:#b6b0a4;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 3000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

#app {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Peta ---------- */

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 74% 14%, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(ellipse at 18% 88%, rgba(255, 255, 255, 0.13), transparent 50%),
    linear-gradient(152deg, var(--sea-1) 0%, var(--sea-2) 55%, var(--sea-3) 100%);
  cursor: grab;
  outline: none;
}
#map:active { cursor: grabbing; }
#map:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.leaflet-container {
  background: transparent;
  font-family: var(--font-sans);
}
.leaflet-container a { color: inherit; }
.leaflet-interactive { transition: fill-opacity 160ms ease, stroke 140ms ease, stroke-width 140ms ease; }

.map-vignette {
  position: absolute;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(26, 39, 37, 0.06), transparent 18%, transparent 82%, rgba(26, 39, 37, 0.05)),
    radial-gradient(ellipse at center, transparent 58%, rgba(21, 34, 33, 0.12) 100%);
  mix-blend-mode: multiply;
}
[data-theme="dark"] .map-vignette { mix-blend-mode: normal; opacity: 0.55; }

/* Label pulau/daerah */
.region-label {
  pointer-events: none;
  width: max-content;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: 600 11px/1.06 var(--font-sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 0 var(--paper), 0 0 5px var(--paper), 0 0 12px var(--paper);
  white-space: nowrap;
  opacity: 0.92;
  transition: opacity 180ms ease, color 180ms ease;
}
.region-label.kota {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 250ms ease;
}
.region-label.kota.visible { opacity: 0.94; }
.region-label.is-active { color: var(--accent); opacity: 1; }
[data-theme="dark"] .region-label { text-shadow: 0 1px 2px #061010, 0 0 7px #061010, 0 0 14px #061010; }

.city-dot {
  filter: drop-shadow(0 1px 3px rgba(20, 30, 28, 0.35));
}
.city-dot path { transition: r 160ms ease; }

.sea-label {
  pointer-events: none;
  width: max-content;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
  letter-spacing: 0.22em;
  font-size: 15px;
  text-transform: uppercase;
  opacity: 0.52;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .sea-label { opacity: 0.4; text-shadow: none; }
.sea-label.ocean { font-size: 16px; letter-spacing: 0.28em; }

.graticule-label {
  pointer-events: none;
  width: max-content;
  font: 500 9px/1 var(--font-sans);
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
}
[data-theme="dark"] .graticule-label { color: #728581; }

.mountain-marker {
  pointer-events: none;
  display: flex;
  width: max-content;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink);
  opacity: 0.9;
  transform: translate(-50%, -100%);
}
.mountain-marker.clickable {
  pointer-events: auto;
  cursor: pointer;
  transition: transform 140ms ease, color 140ms ease, opacity 140ms ease;
}
.mountain-marker.clickable:hover,
.mountain-marker.clickable:focus {
  color: var(--accent);
  opacity: 1;
  transform: translate(-50%, -100%) scale(1.06);
}
.mountain-marker svg { width: 26px; height: 18px; filter: drop-shadow(0 1px 0 var(--paper)); }
.mountain-marker span {
  font: 600 8.5px/1 var(--font-sans);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 0 var(--paper), 0 0 4px var(--paper);
}
[data-theme="dark"] .mountain-marker svg { filter: none; }
[data-theme="dark"] .mountain-marker span { text-shadow: 0 0 4px #071010; }

.river-label {
  pointer-events: none;
  width: max-content;
  font: italic 500 9px/1 var(--font-display);
  color: #4b7f85;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 1px 0 var(--paper), 0 0 5px var(--paper);
  opacity: 0.82;
  background: transparent;
  border: 0;
}
[data-theme="dark"] .river-label { color: #7fb3ad; text-shadow: 0 0 5px #061111; }

.region-tooltip {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  padding: 9px 12px;
  font-family: var(--font-sans);
}
.region-tooltip::before { display: none; }
.region-tooltip .tt-name { display: block; font-weight: 700; font-size: 12px; letter-spacing: -0.01em; }
.region-tooltip .tt-meta { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 10.5px; }
.region-tooltip .tt-meta strong { color: var(--ink); font-weight: 600; }

/* Penanda monumen */
.monumen-marker {
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.monumen-marker .monumen-pin {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--gold) 74%, var(--paper));
  background: var(--glass-strong);
  color: var(--gold);
  box-shadow: 0 2px 7px rgba(20, 30, 28, 0.3), inset 0 0 0 2px color-mix(in srgb, var(--gold) 13%, transparent);
  transition: transform 150ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.monumen-marker .monumen-pin svg { width: 13px; height: 13px; display: block; }
.monumen-marker:hover .monumen-pin,
.monumen-marker:focus-visible .monumen-pin {
  transform: scale(1.16);
  background: var(--gold);
  border-color: var(--gold);
  color: var(--paper);
}
.monumen-marker.is-active .monumen-pin {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 9px rgba(20, 30, 28, 0.42);
}
.monumen-marker.extra .monumen-pin {
  width: 17px;
  height: 17px;
  opacity: 0.86;
}
.monumen-marker.extra .monumen-pin svg { width: 10px; height: 10px; }
.monumen-marker:focus-visible { outline: none; }

.monumen-tooltip {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  padding: 9px 12px;
  font-family: var(--font-sans);
}
.monumen-tooltip::before { display: none; }
.monumen-tooltip .tt-name { display: block; font-weight: 700; font-size: 12px; letter-spacing: -0.01em; }
.monumen-tooltip .tt-meta { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 10.5px; }

/* ---------- Heritage markers (monumen + cagar budaya) ---------- */
.heritage-marker {
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.heritage-marker .heritage-pin {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.6px solid color-mix(in srgb, var(--gold) 72%, var(--paper));
  background: var(--glass-strong);
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(20, 30, 28, 0.32), inset 0 0 0 2px color-mix(in srgb, var(--gold) 12%, transparent);
  transition: transform 150ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.heritage-marker .heritage-pin svg { width: 15px; height: 15px; display: block; }
.heritage-marker.cagar .heritage-pin {
  border-radius: 8px;
  border-color: color-mix(in srgb, #2f7b67 68%, var(--paper));
  color: #2f7b67;
  box-shadow: 0 2px 8px rgba(20, 30, 28, 0.3), inset 0 0 0 2px color-mix(in srgb, #2f7b67 12%, transparent);
}
[data-theme="dark"] .heritage-marker.cagar .heritage-pin {
  border-color: color-mix(in srgb, #58b192 68%, var(--paper));
  color: #58b192;
  box-shadow: 0 2px 8px rgba(0,0,0,.38), inset 0 0 0 2px color-mix(in srgb, #58b192 12%, transparent);
}
.heritage-marker:hover .heritage-pin,
.heritage-marker:focus-visible .heritage-pin {
  transform: scale(1.14);
  background: var(--gold);
  border-color: var(--gold);
  color: var(--paper);
}
.heritage-marker.cagar:hover .heritage-pin,
.heritage-marker.cagar:focus-visible .heritage-pin {
  background: #2f7b67;
  border-color: #2f7b67;
  color: #fff;
}
[data-theme="dark"] .heritage-marker.cagar:hover .heritage-pin,
[data-theme="dark"] .heritage-marker.cagar:focus-visible .heritage-pin {
  background: #58b192;
  border-color: #58b192;
  color: #082019;
}
.heritage-marker.is-active .heritage-pin {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(20, 30, 28, 0.42);
}
.heritage-marker.extra .heritage-pin { width: 20px; height: 20px; opacity: 0.9; }
.heritage-marker.extra .heritage-pin svg { width: 11px; height: 11px; }
.heritage-marker:focus-visible { outline: none; }
.monumen-tooltip.cagar { border-color: color-mix(in srgb, #2f7b67 28%, var(--line)); }

.heritage-group-label {
  margin: 8px 0 2px;
  font: 700 9px/1.2 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.heritage-group-label:first-child { margin-top: 0; }
.heritage-group-label.cagar { color: #2f7b67; }
[data-theme="dark"] .heritage-group-label.cagar { color: #58b192; }
.mi-seal.cagar {
  border-color: color-mix(in srgb, #2f7b67 52%, var(--line));
  background: color-mix(in srgb, #2f7b67 10%, transparent);
  color: #2f7b67;
}
[data-theme="dark"] .mi-seal.cagar {
  border-color: color-mix(in srgb, #58b192 52%, var(--line));
  background: color-mix(in srgb, #58b192 12%, transparent);
  color: #58b192;
}
.kind-chip.cagar {
  color: #2f7b67;
  border-color: color-mix(in srgb, #2f7b67 32%, var(--line));
  background: color-mix(in srgb, #2f7b67 8%, transparent);
}
[data-theme="dark"] .kind-chip.cagar { color: #58b192; border-color: color-mix(in srgb, #58b192 32%, var(--line)); background: color-mix(in srgb, #58b192 10%, transparent); }
.monumen-seal svg { width: 100%; height: 100%; display: block; }
.marker-note-symbol.heritage { background: linear-gradient(135deg, var(--gold), #2f7b67); }

.marker-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 9px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.marker-note-symbol {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  box-shadow: inset 0 0 0 2px var(--paper);
}

/* ---------- Bilah atas ---------- */

.topbar {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 16px;
  right: 16px;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  border-radius: 12px;
  padding: 5px 6px;
  margin-left: -6px;
}
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.55), transparent 65%);
}
.brand-mark svg { width: 27px; height: 27px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.brand-kicker {
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
.brand-title {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.search-wrap {
  position: relative;
  justify-self: center;
  width: min(480px, 100%);
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  height: 42px;
  padding: 0 72px 0 39px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-input);
  color: var(--ink);
  outline: none;
  font-size: 13px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
#searchInput::placeholder { color: var(--ink-faint); }
#searchInput:focus {
  border-color: var(--accent);
  background: var(--glass-hover);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.search-key {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 10px/1 var(--font-sans);
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  background: var(--glass-input);
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
}
.search-clear:hover { background: var(--glass-hover); color: var(--ink); }

.search-results {
  position: absolute;
  z-index: 50;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  padding: 6px;
  backdrop-filter: blur(22px);
}
.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}
.search-item:hover, .search-item.is-active { background: var(--glass-hover); }
.search-item .si-name { font-size: 12.5px; font-weight: 650; }
.search-item .si-kind { display: block; font-size: 9.5px; font-weight: 500; color: var(--ink-faint); letter-spacing: 0.09em; text-transform: uppercase; margin-top: 1px; }
.search-item .si-arrow { color: var(--ink-faint); font-size: 14px; }
.search-empty { padding: 14px 12px; color: var(--ink-soft); font-size: 12px; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.pill-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-input);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.pill-btn svg { width: 16px; height: 16px; }
.pill-btn:hover { background: var(--glass-hover); border-color: var(--line-strong); }
.pill-btn:active { transform: translateY(1px); }
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass-input);
  color: var(--ink);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--glass-hover); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(0.96); }
.menu-btn { display: none; }
.ico-moon { display: block; }
.ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: block; }

button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Panel kiri ---------- */

.sidebar {
  position: fixed;
  z-index: 900;
  top: calc(14px + var(--header-h) + 12px);
  bottom: 16px;
  left: 16px;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  overflow: hidden;
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1), opacity 200ms ease;
}
.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 19px 13px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 3px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.sidebar-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 19px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.panel-section { padding: 15px 0 17px; border-bottom: 1px solid var(--line); }
.panel-section:last-child { border-bottom: 0; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.section-heading h3 {
  margin: 0;
  font: 700 9.5px/1.2 var(--font-sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.section-hint {
  font: 500 9.5px/1.2 var(--font-sans);
  color: var(--ink-faint);
  text-align: right;
}

.layer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.layer-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.layer-option:hover { background: var(--glass-hover); color: var(--ink); }
.layer-option.is-active {
  border-color: var(--line-strong);
  background: var(--glass-hover);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}
.layer-option.is-active::after {
  content: "";
  position: absolute;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.swatch {
  flex: 0 0 auto;
  width: 21px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(20, 30, 28, 0.16);
}
.swatch-netral { background: linear-gradient(110deg, #d9cdb5 0 55%, #b9c7b4 55%); }
.swatch-penduduk { background: linear-gradient(90deg, #efe5c9, #d4ae72, #8e5638); }
.swatch-umk { background: linear-gradient(90deg, #e8e3cf, #a9c39a, #3f7468); }
.swatch-umkm { background: linear-gradient(90deg, #f0e4d0, #d7a477, #8f4538); }
.swatch-cctv { background: linear-gradient(90deg, #ece7d3, #a3c1a6, #376b63); }

.layer-meta {
  margin-top: 10px;
  padding: 9px 11px;
  border-left: 2px solid var(--accent-2);
  border-radius: 0 7px 7px 0;
  background: color-mix(in srgb, var(--accent-2) 7%, transparent);
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.5;
}
.layer-meta strong { color: var(--ink); font-weight: 650; }

.legend { display: flex; flex-direction: column; gap: 7px; }
.legend-row {
  display: grid;
  grid-template-columns: 13px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--ink-soft);
}
.legend-chip { width: 13px; height: 13px; border-radius: 3px; border: 1px solid rgba(20, 30, 28, 0.16); }
.legend-chip.null { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--null) 2px 3px); border-style: dashed; }
.legend-row .legend-value { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.legend-note { margin: 8px 0 0; font-size: 9.5px; line-height: 1.5; color: var(--ink-faint); }
.legend-note .dash { display: inline-block; width: 16px; border-top: 1px dashed var(--ink-faint); vertical-align: middle; margin-right: 4px; }

.ranking { display: flex; flex-direction: column; gap: 2px; }
.rank-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  color: var(--ink);
}
.rank-item:hover, .rank-item:focus-visible { background: var(--glass-hover); }
.rank-num {
  font: 500 9px/1 var(--font-sans);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.rank-body { min-width: 0; }
.rank-name { display: block; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-track { display: block; height: 3px; margin-top: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.rank-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: .72; }
.rank-value { font-size: 9.5px; font-weight: 650; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-empty { font-size: 10.5px; color: var(--ink-faint); line-height: 1.5; padding: 6px 0; }

.all-regions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font: 700 9.5px/1.2 var(--font-sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 2px 0;
}
.all-regions summary::-webkit-details-marker { display: none; }
.all-regions summary::after {
  content: "+";
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-faint);
}
.all-regions[open] summary::after { content: "−"; }
.summary-count {
  margin-left: auto;
  margin-right: 8px;
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 2px 6px;
}
.all-regions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding-top: 10px;
}
.region-jump {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  padding: 5px 6px;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.region-jump:hover, .region-jump:focus-visible { background: var(--glass-hover); color: var(--ink); }

.source-note p { margin: 0 0 8px; font-size: 9.5px; line-height: 1.55; color: var(--ink-soft); }
.source-note .fineprint { color: var(--ink-faint); margin-bottom: 0; }
.fineprint { font-size: 9.5px; line-height: 1.55; color: var(--ink-faint); }

.close-mobile { display: none; }

.drawer-handle {
  display: none;
  position: fixed;
  z-index: 910;
  left: 14px;
  bottom: 18px;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
}
.drawer-handle svg { width: 16px; height: 16px; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: rgba(12, 22, 21, 0.38);
  backdrop-filter: blur(2px);
}

/* ---------- Panel detail ---------- */

.detail {
  position: fixed;
  z-index: 960;
  top: calc(14px + var(--header-h) + 12px);
  right: 16px;
  bottom: 16px;
  width: var(--panel-w);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  transition: transform 360ms cubic-bezier(.2, .85, .2, 1), opacity 220ms ease;
  overflow: hidden;
}
.detail.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.detail-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 21px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.detail-scroll::-webkit-scrollbar { width: 5px; }
.detail-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kind-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 700 8.5px/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 8%, transparent);
}
.kind-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.detail h2 {
  margin: 2px 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(27px, 2.5vw, 33px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.detail-intro {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}
.stat-card {
  position: relative;
  padding: 10px 11px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--paper) 46%, transparent);
  min-height: 72px;
}
.stat-label {
  display: block;
  font: 700 8px/1 var(--font-sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-value.missing { font-family: var(--font-sans); font-size: 10.5px; line-height: 1.25; color: var(--ink-faint); font-weight: 500; }
.stat-sub {
  display: block;
  margin-top: 4px;
  font-size: 8.5px;
  line-height: 1.35;
  color: var(--ink-faint);
}
.stat-card a { color: var(--ink-faint); text-decoration-color: var(--line-strong); }
.stat-card a:hover { color: var(--accent); }

.detail-actions { display: flex; gap: 6px; margin-bottom: 4px; }
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--glass-input);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 650;
  transition: background 150ms ease, border-color 150ms ease;
}
.action-btn:hover { background: var(--glass-hover); border-color: var(--line-strong); }
.action-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.action-btn.primary:hover { opacity: .9; }
.action-btn svg { width: 15px; height: 15px; }
.action-btn[aria-label="Salin tautan daerah ini"] { width: 36px; padding: 0; margin-left: auto; }
.speech-status { min-height: 14px; margin: 5px 0 0; font-size: 9.5px; color: var(--ink-faint); }

.detail-section { padding-top: 16px; margin-top: 15px; border-top: 1px solid var(--line); }
.story { display: flex; flex-direction: column; gap: 13px; }
.story-chapter { display: grid; grid-template-columns: 24px 1fr; gap: 9px; }
.story-num {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}
.story-chapter h4 {
  margin: 0 0 3px;
  font: 700 9px/1 var(--font-sans);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
}
.story-chapter p { margin: 0; font-size: 11.5px; line-height: 1.62; color: var(--ink-soft); }
.story-note {
  margin: 13px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.story-note:empty { display: none; }

/* ---------- Linimasa perkota ---------- */
.city-timeline {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  position: relative;
}
.city-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 18%, transparent));
  opacity: .65;
}
.city-timeline-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 11px;
  padding-bottom: 15px;
  position: relative;
}
.city-timeline-item:last-child { padding-bottom: 2px; }
.ct-marker { position: relative; display: flex; justify-content: center; padding-top: 4px; }
.ct-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent);
  position: relative; z-index: 1;
}
.ct-year {
  display: inline-block;
  font: 700 9px/1 var(--font-sans);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gold-deep, #8a6a28);
  margin-bottom: 4px;
}
.ct-body h4 {
  margin: 0 0 3px;
  font: 600 12.5px/1.35 var(--font-display);
  color: var(--ink);
}
.ct-body p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.62;
  color: var(--ink-soft);
}
.city-timeline-note {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink-faint);
}

.wisata-text { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--ink-soft); }
.source-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.source-list li { font-size: 10px; line-height: 1.45; }
.source-list a { color: var(--accent-2); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-2) 35%, transparent); text-underline-offset: 2px; }
.source-list a:hover { color: var(--accent); }
.source-list .src-note { color: var(--ink-faint); }

/* Daftar monumen di panel detail */
.monumen-list { display: flex; flex-direction: column; gap: 6px; }
.monumen-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 42%, transparent);
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.monumen-item:hover,
.monumen-item:focus-visible {
  background: var(--glass-hover);
  border-color: color-mix(in srgb, var(--gold) 46%, var(--line));
}
.monumen-item:active { transform: translateY(1px); }
.mi-seal {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 52%, var(--line));
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  color: var(--gold);
}
.mi-seal svg { width: 13px; height: 13px; display: block; }
.mi-body { min-width: 0; }
.mi-name {
  display: block;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
}
.mi-meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.42;
  color: var(--ink-faint);
}
.mi-arrow { color: var(--ink-faint); font-size: 13px; }
.monumen-empty { margin: 0; font-size: 10.5px; line-height: 1.5; color: var(--ink-faint); }

/* ---------- Kontrol peta ---------- */

.map-tools {
  position: fixed;
  z-index: 940;
  top: calc(14px + var(--header-h) + 14px);
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: right 360ms cubic-bezier(.2, .85, .2, 1), opacity 200ms ease;
}
body.has-panel .map-tools { right: calc(16px + var(--panel-w) + 14px); }
.tool-stack {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  backdrop-filter: blur(16px);
}
.tool-btn {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  transition: background 140ms ease;
}
.tool-btn:last-child { border-bottom: 0; }
.tool-btn:hover { background: var(--glass-hover); }
.tool-btn svg { width: 16px; height: 16px; }
.north-arrow {
  width: 44px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}
.north-arrow svg { width: 25px; height: 34px; }
.north-arrow text { font: 700 7px var(--font-sans); fill: var(--ink-soft); letter-spacing: .1em; }

.map-status {
  position: fixed;
  z-index: 930;
  left: calc(16px + var(--sidebar-w) + 14px);
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  font-size: 9.5px;
  color: var(--ink-soft);
  transition: left 300ms ease;
}
.scale-bar { display: flex; align-items: center; gap: 6px; }
#scaleLine {
  display: block;
  height: 6px;
  border-left: 1px solid var(--ink-soft);
  border-right: 1px solid var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
  min-width: 18px;
}
#scaleLabel { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }
.status-sep { width: 1px; height: 13px; background: var(--line-strong); }
.coord-readout { font-variant-numeric: tabular-nums; white-space: nowrap; }

.minimap-wrap {
  position: fixed;
  z-index: 930;
  right: 18px;
  bottom: 18px;
  width: 174px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: right 360ms cubic-bezier(.2, .85, .2, 1), opacity 200ms ease;
  backdrop-filter: blur(16px);
}
body.has-panel .minimap-wrap { right: calc(16px + var(--panel-w) + 14px); }
.minimap-label {
  padding: 5px 8px 4px;
  font: 700 7.5px/1 var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}
.minimap { height: 102px; background: var(--sea-2); }
.minimap .leaflet-container { background: transparent; }
.minimap .leaflet-interactive { transition: none; }
.minimap .leaflet-control-attribution { display: none; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  z-index: 2000;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Modal bandingkan ---------- */

.modal { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 22px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 19, 18, 0.52);
  backdrop-filter: blur(7px);
}
.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
  animation: modal-in 260ms cubic-bezier(.2, .85, .2, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.99); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 28px; letter-spacing: -0.03em; }
.compare-selects {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}
.compare-selects label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font: 700 8.5px/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.compare-selects select {
  height: 40px;
  width: 100%;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--glass-input);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.versus {
  padding-bottom: 13px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 13px;
}
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  background: color-mix(in srgb, var(--paper) 36%, transparent);
}
.compare-card h3 { margin: 0 0 2px; font-family: var(--font-display); font-size: 21px; font-weight: 500; letter-spacing: -0.02em; }
.compare-card .cc-kind { display: block; font: 700 8px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 8px; }
.compare-rows { display: flex; flex-direction: column; gap: 0; margin: 10px 0 12px; }
.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
}
.compare-row:last-child { border-bottom: 0; }
.compare-row .cr-label { color: var(--ink-faint); }
.compare-row .cr-value { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.compare-row .cr-value small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 8.5px; }
.compare-card .cc-story { margin: 0; font-size: 10.5px; line-height: 1.55; color: var(--ink-soft); }
.compare-empty { grid-column: 1 / -1; color: var(--ink-faint); font-size: 11px; }

/* ---------- Modal monumen ---------- */

.monumen-modal { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 22px; }
.monumen-modal[hidden] { display: none; }
.monumen-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 19, 18, 0.55);
  backdrop-filter: blur(8px);
}
.monumen-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--gold) 13%, transparent), transparent 62%),
    var(--glass-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.4);
  animation: modal-in 260ms cubic-bezier(.2, .85, .2, 1);
}
.monumen-card::-webkit-scrollbar { width: 5px; }
.monumen-card::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
.monumen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.monumen-kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.monumen-region {
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.monumen-seal {
  position: absolute;
  top: 58px;
  right: 20px;
  width: 66px;
  height: 66px;
  color: var(--gold);
  opacity: 0.3;
  pointer-events: none;
}
.monumen-card .eyebrow { margin: 10px 0 2px; }
.monumen-card h2 {
  margin: 0 0 8px;
  padding-right: 64px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.monumen-ringkas {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink);
}
.monumen-deskripsi { margin: 0; font-size: 12px; line-height: 1.68; color: var(--ink-soft); }
.monumen-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.monumen-source { text-decoration: none; }
.monumen-source[hidden] { display: none; }
.monumen-card .speech-status { margin-top: 6px; }
.monumen-footnote {
  margin: 14px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* ---------- Boot ---------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 60% 30%, rgba(255, 255, 255, .5), transparent 55%),
    linear-gradient(150deg, #eee7d8, #e4dac5);
  transition: opacity 500ms ease, visibility 500ms ease;
}
[data-theme="dark"] .boot { background: radial-gradient(ellipse at 60% 30%, #1a2c2a, transparent 55%), linear-gradient(150deg, #101d1c, #0b1515); }
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner { text-align: center; color: var(--ink); }
.boot-mark { width: 52px; height: 52px; color: var(--accent); }
.boot-kicker { margin: 12px 0 4px; font: 700 8.5px/1 var(--font-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-faint); }
.boot h1 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 44px; letter-spacing: -.04em; }
.boot-status { margin: 8px 0 16px; font-size: 11px; color: var(--ink-soft); }
.boot-line { width: 160px; height: 2px; margin: 0 auto; background: var(--line); overflow: hidden; border-radius: 99px; }
.boot-line span { display: block; width: 50%; height: 100%; background: var(--accent); animation: boot-slide 1.2s ease-in-out infinite; }
@keyframes boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 3000;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* ---------- Responsif ---------- */

@media (max-width: 1180px) {
  :root { --sidebar-w: 310px; --panel-w: 360px; }
  .topbar { grid-template-columns: auto minmax(150px, 1fr) auto; gap: 12px; }
  .brand-kicker { display: none; }
  .pill-btn span { display: none; }
  .pill-btn { width: 38px; padding: 0; justify-content: center; }
  .map-status { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    height: var(--header-h);
    padding: 0 10px;
    gap: 8px;
    border-radius: 16px;
  }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand-title { font-size: 18px; }
  .search-wrap { width: auto; }
  #searchInput { height: 38px; padding: 0 34px 0 33px; font-size: 12px; }
  .search-icon { left: 10px; width: 15px; height: 15px; }
  .search-key { display: none; }
  .search-clear { right: 4px; }
  #compareBtn { display: none; }
  .menu-btn { display: grid; }

  .sidebar {
    z-index: 920;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(338px, calc(100vw - 46px));
    border-radius: 0 20px 20px 0;
    border-left: 0;
    transform: translateX(-104%);
    opacity: 0;
  }
  .sidebar.open { transform: translateX(0); opacity: 1; }
  .sidebar-head { padding-top: max(19px, env(safe-area-inset-top)); }
  .close-mobile { display: grid; }
  .menu-btn, .drawer-handle { -webkit-tap-highlight-color: transparent; }

  .detail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 82dvh;
    max-height: 82dvh;
    display: flex;
    flex-direction: column;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    transform: translateY(105%);
    transition: transform 380ms cubic-bezier(.2, .85, .2, 1), opacity 200ms ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .detail.open { transform: translateY(0); }
  .detail::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 3px;
    border-radius: 99px;
    background: var(--line-strong);
    z-index: 2;
  }
  .detail-scroll { padding-top: 20px; flex: 1 1 auto; height: auto; min-height: 0; overflow-y: auto; }

  .map-tools {
    top: auto;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    gap: 8px;
  }
  body.has-panel .map-tools { right: 12px; opacity: 0; pointer-events: none; }
  .north-arrow { display: none; }
  .minimap-wrap {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 132px;
    opacity: 0;
    pointer-events: none;
  }
  body.has-panel .minimap-wrap { right: 12px; }
  .map-status { display: none; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }

  .modal { padding: 10px; align-items: end; }
  .modal-card { max-height: calc(100dvh - 20px); border-radius: 20px 20px 0 0; padding: 20px 17px calc(20px + env(safe-area-inset-bottom)); }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-selects { grid-template-columns: 1fr; gap: 8px; }
  .versus { display: none; }
  .modal-head h2 { font-size: 24px; }

  .monumen-modal { padding: 10px; align-items: end; }
  .monumen-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 20px 20px 0 0;
    padding: 18px 17px calc(18px + env(safe-area-inset-bottom));
  }
  .monumen-seal { top: 54px; right: 16px; width: 56px; height: 56px; }
  .monumen-card h2 { font-size: 28px; padding-right: 54px; }
}

@media (max-width: 620px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .brand-title { font-size: 16px; }
  .brand-mark { display: none; }
  .brand { margin-left: 0; padding-left: 4px; }
  .search-wrap { min-width: 0; }
  #searchInput { padding-right: 10px; }
  .search-clear { right: 5px; }
  .top-actions { gap: 5px; }
  .icon-btn { width: 36px; height: 36px; }
  .pill-btn { width: 36px; height: 36px; }
  .detail h2 { font-size: 26px; }
  .stat-value { font-size: 16px; }
  .drawer-handle { display: inline-flex; }
  .detail-actions { flex-wrap: wrap; }
  .action-btn[aria-label="Salin tautan daerah ini"] { margin-left: 0; }
}

@media (max-width: 380px) {
  .brand-title { font-size: 14px; }
  .search-wrap { max-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Penyesuaian atlas interaktif ---------- */

.atlas-empty-icon {
  background: transparent;
  border: 0;
}
.atlas-empty-icon > .region-label,
.atlas-empty-icon > .sea-label,
.atlas-empty-icon > .river-label,
.atlas-empty-icon > .graticule-label {
  display: block;
  transform: translate(-50%, -50%);
}
.atlas-empty-icon > .region-label.kota {
  transform: translate(-50%, 10px);
}
.atlas-empty-icon > .mountain-marker {
  transform: translate(-50%, -100%);
}
.leaflet-marker-icon.is-hidden {
  display: none !important;
}
.region-label.is-hidden {
  opacity: 0 !important;
}
.rank-value small {
  display: block;
  margin-top: 1px;
  font-size: 7.5px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}
.layer-meta a {
  color: var(--accent-2);
  text-underline-offset: 2px;
}
.layer-meta a:hover {
  color: var(--accent);
}
.boot-error .boot-line {
  display: none;
}
.boot-error .boot-status {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

/* ---------- Modal figure & facts (heritage + gunung) ---------- */
.monumen-figure {
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
}
.monumen-figure[hidden] { display: none; }
.monumen-figure-art { position: relative; background: var(--paper); }
.monumen-figure-art svg { display: block; width: 100%; height: auto; }
.monumen-photo-wrap { position: relative; }
.monumen-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  background: var(--line);
}
.monumen-figure-caption {
  margin: 0;
  padding: 7px 10px 8px;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}
.monumen-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}
.monumen-facts[hidden] { display: none; }
.monumen-fact {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 55%, transparent);
}
.mf-label {
  display: block;
  font: 650 8.5px/1.2 var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.mf-value { display: block; margin-top: 2px; font-size: 11px; line-height: 1.35; color: var(--ink); font-weight: 600; }
.kind-chip.gunung {
  color: #4a6741;
  border-color: color-mix(in srgb, #4a6741 32%, var(--line));
  background: color-mix(in srgb, #4a6741 8%, transparent);
}
[data-theme="dark"] .kind-chip.gunung { color: #8ec07c; border-color: color-mix(in srgb, #8ec07c 32%, var(--line)); background: color-mix(in srgb, #8ec07c 10%, transparent); }
.monumen-modal .monumen-seal { display: grid; place-items: center; }
.monumen-modal .monumen-seal svg { width: 44px; height: 44px; }

/* ===== Mockup Atlas Jabar: dark teal + gold, nav, filters, timeline, glow ===== */
body { background: radial-gradient(ellipse at 50% 35%, #0d3a3c 0%, var(--paper) 62%, #040f10 100%); }
#map {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(42,122,118,.22), transparent 45%),
    radial-gradient(ellipse at 20% 80%, rgba(212,175,96,.06), transparent 35%),
    linear-gradient(165deg, var(--sea-1) 0%, var(--sea-2) 55%, var(--sea-3) 100%);
}
.map-vignette {
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(2,12,13,.45) 100%),
    linear-gradient(to top, rgba(2,12,13,.55) 0, transparent 22%);
  mix-blend-mode: normal; opacity: 1;
}

/* Header */
.topbar {
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(6,28,30,.92), rgba(6,24,26,.78));
  border-color: rgba(212,175,96,.18);
  box-shadow: 0 10px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(212,175,96,.08);
}
.brand-mark { color: var(--gold); border-color: rgba(212,175,96,.35); background: rgba(212,175,96,.08); box-shadow: 0 0 18px rgba(212,175,96,.12); }
.brand-kicker { color: var(--gold); opacity: .85; }
.brand-title { color: #f3ecd8; }
.top-nav { display:flex; align-items:center; gap:4px; justify-self:center; }
.top-nav-link {
  padding: 8px 14px; border-radius: 999px; text-decoration:none; font-size:12.5px; font-weight:650;
  color: var(--ink-soft); border:1px solid transparent; transition: all 150ms ease;
}
.top-nav-link:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.top-nav-link.is-active { color:#1a1408; background: linear-gradient(180deg, #e6ca78, #c99a3e); border-color: rgba(255,230,160,.35); box-shadow: 0 4px 16px rgba(212,175,96,.25); }
@media (max-width: 980px){ .top-nav{ display:none; } }

/* Filters */
.filter-list { display:flex; flex-wrap:wrap; gap:8px; }
.filter-list.compact { gap:6px; }
.filter-chip {
  display:inline-flex; align-items:center; gap:8px; padding:8px 11px; border-radius:999px; cursor:pointer;
  border:1px solid rgba(212,175,96,.14); background: rgba(255,255,255,.03); color: var(--ink-soft);
  font-size:11.5px; font-weight:600; transition: all 140ms ease; user-select:none;
}
.filter-chip input { position:absolute; opacity:0; pointer-events:none; }
.filter-chip.is-active { color: var(--ink); border-color: rgba(212,175,96,.38); background: rgba(212,175,96,.1); box-shadow: 0 0 0 1px rgba(212,175,96,.08) inset; }
.chip-dot { width:8px; height:8px; border-radius:50%; box-shadow: 0 0 8px currentColor; }
.chip-dot.gold { color:#e2c06a; background:#e2c06a; }
.chip-dot.teal { color:#46b8aa; background:#46b8aa; }
.chip-dot.amber { color:#d99a4a; background:#d99a4a; }
.chip-dot.stone { color:#c8bfa8; background:#c8bfa8; }
.chip-dot.green { color:#7fb069; background:#7fb069; }
.period-btn {
  padding:7px 11px; border-radius:999px; border:1px solid rgba(212,175,96,.14); background: rgba(255,255,255,.03);
  color: var(--ink-soft); font-size:11px; font-weight:650; transition: all 140ms ease;
}
.period-btn:hover { color:var(--ink); background: rgba(255,255,255,.05); }
.period-btn.is-active { color:#1a1408; background: linear-gradient(180deg,#e2c06a,#c99639); border-color: rgba(255,230,160,.3); }

/* Panels */
.sidebar, .detail { border-color: rgba(212,175,96,.16); background: linear-gradient(180deg, rgba(7,31,33,.86), rgba(5,22,24,.82)); }
.sidebar-head h2, .detail h2 { color:#f3ecd8; }

/* Glowing heritage markers */
.heritage-marker .heritage-pin {
  background: rgba(8,28,30,.88);
  border-color: rgba(226,192,106,.75);
  color: var(--gold);
  box-shadow: 0 0 0 3px rgba(226,192,106,.12), 0 0 18px rgba(226,192,106,.38), 0 2px 8px rgba(0,0,0,.45);
}
.heritage-marker.cagar .heritage-pin {
  border-color: rgba(70,184,170,.75); color:#63d1c3;
  box-shadow: 0 0 0 3px rgba(70,184,170,.12), 0 0 18px rgba(70,184,170,.34), 0 2px 8px rgba(0,0,0,.45);
}
.heritage-marker:hover .heritage-pin, .heritage-marker:focus-visible .heritage-pin {
  box-shadow: 0 0 0 4px rgba(226,192,106,.18), 0 0 28px rgba(226,192,106,.55), 0 2px 10px rgba(0,0,0,.5);
}
.heritage-marker.cagar:hover .heritage-pin, .heritage-marker.cagar:focus-visible .heritage-pin {
  box-shadow: 0 0 0 4px rgba(70,184,170,.18), 0 0 28px rgba(70,184,170,.5), 0 2px 10px rgba(0,0,0,.5);
}
.heritage-marker.is-active .heritage-pin { background: var(--gold); color:#13201b; box-shadow: 0 0 0 4px rgba(226,192,106,.22), 0 0 34px rgba(226,192,106,.65); }
.mountain-marker.clickable svg { filter: drop-shadow(0 0 6px rgba(127,176,105,.35)); }

/* Bottom timeline */
.timeline-bar {
  position: fixed; z-index: 940; left: calc(var(--sidebar-w) + 30px); right: calc(var(--panel-w) + 30px);
  bottom: 14px; height: var(--timeline-h);
  display:flex; align-items:center; gap:14px; padding: 10px 16px;
  border:1px solid rgba(212,175,96,.18); border-radius: 16px;
  background: linear-gradient(180deg, rgba(7,31,33,.88), rgba(5,22,24,.84));
  box-shadow: 0 14px 40px rgba(0,0,0,.42); backdrop-filter: blur(14px);
}
@media (max-width: 1200px){ .timeline-bar { left:16px; right:16px; } }
@media (max-width: 900px){ .timeline-bar { left:12px; right:12px; height:auto; flex-direction:column; align-items:stretch; bottom:10px; } body { padding-bottom: 140px; } }
.timeline-head { min-width: 160px; }
.timeline-kicker { display:block; font:700 8.5px/1 var(--font-sans); letter-spacing:.22em; text-transform:uppercase; color:var(--gold); }
.timeline-head strong { display:block; margin-top:4px; font-family: var(--font-display); font-size:16px; color:#f3ecd8; font-weight:500; }
.timeline-track-wrap { flex:1; overflow:auto; }
.timeline-track { display:flex; align-items:flex-start; gap:0; min-width: 620px; position:relative; padding-top:6px; }
.timeline-track::before { content:""; position:absolute; left:18px; right:18px; top:12px; height:2px; background: linear-gradient(90deg, rgba(212,175,96,.15), rgba(212,175,96,.55), rgba(212,175,96,.15)); }
.timeline-node { flex:1; position:relative; border:0; background:transparent; padding:0 8px; text-align:center; color:var(--ink-soft); }
.tn-dot { display:block; width:12px; height:12px; margin:0 auto 8px; border-radius:50%; background:#12383a; border:2px solid rgba(212,175,96,.55); box-shadow: 0 0 10px rgba(212,175,96,.2); position:relative; z-index:1; }
.timeline-node:hover .tn-dot, .timeline-node.is-active .tn-dot { background:var(--gold); box-shadow: 0 0 0 4px rgba(212,175,96,.16), 0 0 16px rgba(212,175,96,.55); }
.tn-era { display:block; font-size:10.5px; font-weight:700; color:var(--ink); line-height:1.2; }
.tn-year { display:block; font-size:9px; color:var(--ink-faint); margin-top:2px; }
.timeline-hint { margin:0; max-width: 180px; font-size:10px; line-height:1.4; color:var(--ink-faint); }
@media (max-width: 900px){ .timeline-hint{ max-width:none; } }

/* Detail enrichments */
.detail-facts-rich { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin: 10px 0 12px; }
.dfr-card { padding:10px 11px; border:1px solid rgba(212,175,96,.14); border-radius:12px; background: rgba(255,255,255,.03); }
.dfr-label { display:block; font:700 8.5px/1.2 var(--font-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--gold); opacity:.9; }
.dfr-value { display:block; margin-top:4px; font-size:12px; line-height:1.4; color:var(--ink); font-weight:600; }
.monumen-card { border-color: rgba(212,175,96,.22); background: linear-gradient(180deg, rgba(8,34,36,.96), rgba(5,22,24,.96)); }
.action-btn.primary { background: linear-gradient(180deg,#e2c06a,#c99639); color:#1a1408; border-color: rgba(255,230,160,.35); }

.is-filter-hidden{ display:none !important; }
.leaflet-marker-icon.is-hidden,.leaflet-marker-icon.is-filter-hidden{ opacity:0 !important; pointer-events:none !important; }

.map-status{ bottom: calc(var(--timeline-h) + 24px); } .minimap-wrap{ bottom: calc(var(--timeline-h) + 24px); } @media (max-width:900px){ .map-status,.minimap-wrap{ bottom: 150px; } }
