:root {
  color-scheme: light;
  --brand-paper: 250 248 244;
  --brand-surface: 255 255 255;
  --brand-ink: 24 54 56;
  --brand-muted: 82 105 107;
  --brand-border: 220 229 226;
  --brand-softTeal: 228 243 241;
  --brand-link: 40 125 131;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-paper: 16 27 29;
  --brand-surface: 25 42 45;
  --brand-ink: 233 242 241;
  --brand-muted: 174 194 194;
  --brand-border: 54 81 86;
  --brand-softTeal: 36 63 66;
  --brand-link: 115 201 204;
}
.theme-menu summary { list-style: none; }
.theme-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary { list-style: none; cursor: pointer; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu :focus-visible { outline: 2px solid rgb(var(--brand-link)); outline-offset: 2px; }
.theme-menu button { display: flex; align-items: center; width: 100%; padding: .5rem .75rem; text-align: start; border-radius: .5rem; gap: .5rem; }
.theme-menu button:hover, .theme-menu button[aria-pressed="true"] { background: rgb(var(--brand-softTeal)); color: rgb(var(--brand-link)); }
.theme-menu button[aria-pressed="true"]::after { content: '✓'; margin-inline-start: auto; font-weight: bold; }
.theme-menu :focus-visible { outline: 2px solid rgb(var(--brand-link)); outline-offset: 2px; }

/* Mobile Navigation Drawer & Backdrop */
.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  inset-inline-start: 0;
  width: 310px;
  max-width: 86vw;
  background: rgb(var(--brand-surface));
  z-index: 100;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(100%);
  border-inline-end: 1px solid rgb(var(--brand-border));
}
[dir="ltr"] .mobile-drawer {
  transform: translateX(-100%);
}
.mobile-drawer.is-open {
  transform: translateX(0) !important;
}
.mobile-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(24, 54, 56, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}
.mobile-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
/* Map imagery retains its source colors; only the surrounding controls change. */
.leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-bar a, .leaflet-control-attribution {
  background: rgb(var(--brand-surface)) !important;
  color: rgb(var(--brand-ink)) !important;
}
.leaflet-bar a:hover { background: rgb(var(--brand-softTeal)) !important; }
.leaflet-container a { color: rgb(var(--brand-link)); }

[data-theme="dark"] .bg-red-50, [data-theme="dark"] .hover\:bg-red-50:hover, [data-theme="dark"] .bg-red-100, [data-theme="dark"] .hover\:bg-red-100:hover, [data-theme="dark"] .bg-red-200, [data-theme="dark"] .hover\:bg-red-200:hover { background-color: #402326; }

[data-theme="dark"] .text-red-500, [data-theme="dark"] .hover\:text-red-500:hover, [data-theme="dark"] .text-red-600, [data-theme="dark"] .hover\:text-red-600:hover, [data-theme="dark"] .text-red-700, [data-theme="dark"] .hover\:text-red-700:hover, [data-theme="dark"] .text-red-800, [data-theme="dark"] .hover\:text-red-800:hover, [data-theme="dark"] .text-red-900, [data-theme="dark"] .hover\:text-red-900:hover { color: #FFB4AB; }

[data-theme="dark"] .border-red-200, [data-theme="dark"] .hover\:border-red-200:hover, [data-theme="dark"] .border-red-300, [data-theme="dark"] .hover\:border-red-300:hover { border-color: #87444B; }

[data-theme="dark"] .bg-amber-50, [data-theme="dark"] .hover\:bg-amber-50:hover, [data-theme="dark"] .bg-amber-100, [data-theme="dark"] .hover\:bg-amber-100:hover, [data-theme="dark"] .bg-amber-200, [data-theme="dark"] .hover\:bg-amber-200:hover { background-color: #3C321E; }

[data-theme="dark"] .text-amber-500, [data-theme="dark"] .hover\:text-amber-500:hover, [data-theme="dark"] .text-amber-600, [data-theme="dark"] .hover\:text-amber-600:hover, [data-theme="dark"] .text-amber-700, [data-theme="dark"] .hover\:text-amber-700:hover, [data-theme="dark"] .text-amber-800, [data-theme="dark"] .hover\:text-amber-800:hover, [data-theme="dark"] .text-amber-900, [data-theme="dark"] .hover\:text-amber-900:hover { color: #FFD590; }

[data-theme="dark"] .border-amber-200, [data-theme="dark"] .hover\:border-amber-200:hover, [data-theme="dark"] .border-amber-300, [data-theme="dark"] .hover\:border-amber-300:hover { border-color: #79603A; }

[data-theme="dark"] .bg-emerald-50, [data-theme="dark"] .hover\:bg-emerald-50:hover, [data-theme="dark"] .bg-emerald-100, [data-theme="dark"] .hover\:bg-emerald-100:hover, [data-theme="dark"] .bg-emerald-200, [data-theme="dark"] .hover\:bg-emerald-200:hover { background-color: #183C34; }

[data-theme="dark"] .text-emerald-500, [data-theme="dark"] .hover\:text-emerald-500:hover, [data-theme="dark"] .text-emerald-600, [data-theme="dark"] .hover\:text-emerald-600:hover, [data-theme="dark"] .text-emerald-700, [data-theme="dark"] .hover\:text-emerald-700:hover, [data-theme="dark"] .text-emerald-800, [data-theme="dark"] .hover\:text-emerald-800:hover, [data-theme="dark"] .text-emerald-900, [data-theme="dark"] .hover\:text-emerald-900:hover { color: #93DFC0; }

[data-theme="dark"] .border-emerald-200, [data-theme="dark"] .hover\:border-emerald-200:hover, [data-theme="dark"] .border-emerald-300, [data-theme="dark"] .hover\:border-emerald-300:hover { border-color: #39695A; }

[data-theme="dark"] .bg-blue-50, [data-theme="dark"] .hover\:bg-blue-50:hover, [data-theme="dark"] .bg-blue-100, [data-theme="dark"] .hover\:bg-blue-100:hover, [data-theme="dark"] .bg-blue-200, [data-theme="dark"] .hover\:bg-blue-200:hover { background-color: #20364A; }

[data-theme="dark"] .text-blue-500, [data-theme="dark"] .hover\:text-blue-500:hover, [data-theme="dark"] .text-blue-600, [data-theme="dark"] .hover\:text-blue-600:hover, [data-theme="dark"] .text-blue-700, [data-theme="dark"] .hover\:text-blue-700:hover, [data-theme="dark"] .text-blue-800, [data-theme="dark"] .hover\:text-blue-800:hover, [data-theme="dark"] .text-blue-900, [data-theme="dark"] .hover\:text-blue-900:hover { color: #ACD5FF; }

[data-theme="dark"] .border-blue-200, [data-theme="dark"] .hover\:border-blue-200:hover, [data-theme="dark"] .border-blue-300, [data-theme="dark"] .hover\:border-blue-300:hover { border-color: #476B8E; }

[data-theme="dark"] .bg-gray-50, [data-theme="dark"] .hover\:bg-gray-50:hover, [data-theme="dark"] .bg-gray-100, [data-theme="dark"] .hover\:bg-gray-100:hover, [data-theme="dark"] .bg-gray-200, [data-theme="dark"] .hover\:bg-gray-200:hover { background-color: #26383B; }

[data-theme="dark"] .text-gray-500, [data-theme="dark"] .hover\:text-gray-500:hover, [data-theme="dark"] .text-gray-600, [data-theme="dark"] .hover\:text-gray-600:hover, [data-theme="dark"] .text-gray-700, [data-theme="dark"] .hover\:text-gray-700:hover, [data-theme="dark"] .text-gray-800, [data-theme="dark"] .hover\:text-gray-800:hover, [data-theme="dark"] .text-gray-900, [data-theme="dark"] .hover\:text-gray-900:hover { color: #D4E1E1; }

[data-theme="dark"] .border-gray-200, [data-theme="dark"] .hover\:border-gray-200:hover, [data-theme="dark"] .border-gray-300, [data-theme="dark"] .hover\:border-gray-300:hover { border-color: #50666A; }

[data-theme="dark"] .text-semantic-danger { color: #FFB4AB; }
[data-theme="dark"] .text-semantic-success { color: #93DFC0; }
[data-theme="dark"] .text-semantic-warning { color: #FFD590; }
