* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
:root { color-scheme: dark; accent-color: #FF6D00; --target-size: 36px; interpolate-size: allow-keywords; }
@media (pointer: coarse) { :root { --target-size: 42px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  text-overflow: ellipsis; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }
:where(button, a, input, [tabindex]):focus-visible { outline: 2px solid #38BDF8; outline-offset: 2px; }

html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow-wrap: break-word; background-color: #0A0D12; color: #ECEFF1; }
main { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; overflow: hidden; }
body.embedded-app main { height: 100%; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; background-color: #0A0D12; }
.leaflet-pane, .leaflet-tooltip, .leaflet-popup-content { overflow-wrap: normal; word-break: normal; }
.dark-tiles .leaflet-tile { filter: brightness(0.65) invert(1) contrast(2.8) hue-rotate(200deg) saturate(0.25) brightness(0.75); }
.leaflet-pane svg path { transition: fill-opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), stroke-opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), stroke-width 0.3s ease; }

/* Unified Floating Top HUD Stack */
.map-header {
  position: absolute; top: max(10px, env(safe-area-inset-top, 10px)); left: max(10px, env(safe-area-inset-left, 10px));
  right: max(10px, env(safe-area-inset-right, 10px)); z-index: 1000; display: flex; flex-direction: column; gap: 7px; pointer-events: none;
}
.map-controls-row { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; pointer-events: auto; }
body.embedded-app .brand-pill { display: none; }

.brand-pill {
  background: rgba(20, 24, 32, 0.94); backdrop-filter: blur(8px); border: 1px solid rgba(249, 115, 22, 0.4);
  border-radius: 20px; padding: 6px 12px; min-height: var(--target-size); display: inline-flex; align-items: center;
  gap: 6px; color: #FFF; font-family: 'Trade Winds', cursive, sans-serif; letter-spacing: 0.4px; font-size: 14px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 10px rgba(249, 115, 22, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.brand-pill:hover { border-color: #F97316; transform: translateY(-1px); }

.search-bar {
  flex: 1 1 110px; min-width: 0; min-height: var(--target-size); background: rgba(20, 24, 32, 0.94);
  backdrop-filter: blur(8px); border: 1px solid #2C3646; border-radius: 20px; padding: 2px 6px 2px 12px;
  display: flex; align-items: center; gap: 4px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.search-bar:focus-within { border-color: #38BDF8; }
.search-input { flex: 1 1 auto; width: 100%; min-width: 0; background: transparent; border: none; outline: none; color: #FFF; font-size: 13px; }
.search-input::placeholder { color: #94A3B8; }
.search-submit-btn {
  background: transparent; border: none; color: #CBD5E1; min-width: 32px; min-height: 32px; border-radius: 50%;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.search-submit-btn:hover { background: rgba(255, 255, 255, 0.08); }

.map-btn {
  background: rgba(20, 24, 32, 0.94); backdrop-filter: blur(8px); border: 1px solid #2C3646; border-radius: 20px;
  padding: 6px 12px; min-height: var(--target-size); color: #ECEFF1; font-size: 12px; font-weight: 700; white-space: nowrap;
  flex-shrink: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.map-btn:hover { background: #1B222D; border-color: #0288D1; color: #FFF; }
.map-btn:active { transform: scale(0.95); }
.map-btn.active { background: #0288D1; color: #FFF; border-color: #0288D1; }

@media (max-width: 540px) {
  .map-controls-row { flex-wrap: nowrap; gap: 5px; }
  .search-bar { flex: 1 1 90px; min-width: 0; }
}
@media (max-width: 440px) {
  .brand-pill-text { display: none; }
  .brand-pill, .map-btn { padding: 6px 10px; }
}

/* Weather Metrics Mini-HUD */
.weather-metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #252D3A; }
.metric-pill {
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 8px; padding: 4px;
  width: 100%; font-family: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, scale 150ms ease-out;
}
.metric-pill:hover, .metric-pill[aria-pressed="true"] { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.45); }
.metric-pill:active { scale: 0.97; }
.metric-pill.metric-warn { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.5); }
.metric-pill.metric-warn:hover, .metric-pill.metric-warn[aria-pressed="true"] { background: rgba(245, 158, 11, 0.26); border-color: #F59E0B; }
.metric-pill.metric-warn .metric-label, .metric-pill.metric-warn .metric-val { color: #FDE68A; }
.metric-pill.metric-danger { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.56); }
.metric-pill.metric-danger:hover, .metric-pill.metric-danger[aria-pressed="true"] { background: rgba(239, 68, 68, 0.28); border-color: #EF4444; }
.metric-pill.metric-danger .metric-label, .metric-pill.metric-danger .metric-val { color: #FECACA; }

.weather-metric-reason {
  display: block !important; position: relative; height: 0 !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; overflow: visible !important; z-index: 30; pointer-events: none;
}
.weather-metric-reason-box {
  position: absolute; top: 6px; left: 0; right: 0; padding: 7px 10px; border-radius: 9px; font-size: 11px; line-height: 1.35;
  color: #E2E8F0; background: rgba(15, 23, 42, 0.96); backdrop-filter: blur(10px); border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65); opacity: 1; transform: translateY(0);
  transition: opacity 160ms ease-out, transform 160ms cubic-bezier(0.22, 1, 0.36, 1), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.weather-metric-reason.hidden .weather-metric-reason-box { opacity: 0; transform: translateY(-4px); visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .weather-metric-reason-box { transition: none !important; } }
.weather-metric-reason.metric-warn .weather-metric-reason-box { background: rgba(28, 22, 14, 0.96); border-color: rgba(245, 158, 11, 0.65); color: #FDE68A; }
.weather-metric-reason.metric-danger .weather-metric-reason-box { background: rgba(34, 14, 18, 0.96); border-color: rgba(239, 68, 68, 0.7); color: #FECACA; }

/* Expandable Verdict "Why" Pill & Breakdown Drawer */
.why-verdict-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.why-verdict-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-family: inherit;
  font-size: 11px; font-weight: 700; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08); color: #E2E8F0;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, filter 150ms ease-out, scale 150ms ease-out;
}
.why-verdict-pill.orange { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.42); color: #FCD34D; }
.why-verdict-pill.red { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.45); color: #FCA5A5; }
.why-verdict-pill.green { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.4); color: #6EE7B7; }
.why-verdict-pill:hover { filter: brightness(1.15); }
.why-verdict-pill:active { scale: 0.97; }
.why-verdict-chevron { font-size: 9px; transition: transform 0.2s ease; }
.why-verdict-pill[aria-expanded="true"] .why-verdict-chevron { transform: rotate(180deg); }
.why-scope-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.14); border: 1px solid rgba(56, 189, 248, 0.35); color: #7DD3FC;
}

.why-verdict-drawer {
  display: block !important; block-size: auto; block-size: calc-size(auto, size); overflow: hidden; margin-top: 6px;
  padding: 8px 10px; border-radius: 10px; background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px; color: #CBD5E1; opacity: 1; visibility: visible;
  transition: block-size 240ms cubic-bezier(0.22, 1, 0.36, 1), margin-top 240ms cubic-bezier(0.22, 1, 0.36, 1), padding-top 240ms cubic-bezier(0.22, 1, 0.36, 1), padding-bottom 240ms cubic-bezier(0.22, 1, 0.36, 1), border-width 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease-out, visibility 240ms;
}
.why-verdict-drawer[hidden] {
  display: block !important; block-size: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; border-top-width: 0; border-bottom-width: 0; opacity: 0; visibility: hidden; pointer-events: none;
}
.why-tags-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.why-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #E2E8F0; }
.why-reasons-list { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; line-height: 1.38; }
.why-footer-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.why-footer-link { font-size: 10.5px; font-weight: 700; color: #7DD3FC; text-decoration: none; }
.why-footer-link:hover { text-decoration: underline; }
.metric-label { font-size: 9.5px; color: #94A3B8; font-weight: 600; }
.metric-val { font-size: 11.5px; font-weight: 800; color: #F8FAFC; margin-top: 1px; }

/* Nearest Fire Station & Response Card */
.fire-station-card {
  display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-top: 6px; padding: 6px 9px;
  background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.22); border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fire-station-card:hover { background: rgba(56, 189, 248, 0.13); border-color: rgba(56, 189, 248, 0.44); }
.fire-station-card-top { display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; }
.fire-station-icon { font-size: 16px; line-height: 1; flex-shrink: 0; }
.fire-station-info { flex: 1 1 auto; min-width: 0; }
.fire-station-name { font-size: 11.5px; font-weight: 700; color: #F8FAFC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fire-station-meta { font-size: 10px; color: #94A3B8; margin-top: 1px; line-height: 1.25; }

.fire-station-eta-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14); cursor: pointer; font-family: inherit;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, filter 150ms ease-out, scale 150ms ease-out;
}
.fire-station-eta-badge:hover { filter: brightness(1.14); }
.fire-station-eta-badge:active { scale: 0.96; }
.fire-station-eta-badge.fast { background: rgba(16, 185, 129, 0.16); color: #6EE7B7; border-color: rgba(16, 185, 129, 0.35); }
.fire-station-eta-badge.moderate { background: rgba(245, 158, 11, 0.16); color: #FCD34D; border-color: rgba(245, 158, 11, 0.35); }
.fire-station-eta-badge.remote { background: rgba(239, 68, 68, 0.16); color: #FCA5A5; border-color: rgba(239, 68, 68, 0.35); }

/* Modal Quick Explore Grid */
.modal-explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 380px) { .modal-explore-grid { grid-template-columns: 1fr; } }
.modal-explore-grid .explorer-chip { width: 100%; text-align: left; min-height: 36px; padding: 7px 10px; font-size: 11.5px; }

/* Fire Station & Wildfire markers */
.station-map-pin {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(15, 23, 42, 0.94); border: 1.5px solid #38BDF8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55); display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1;
}
.burn-flame-marker { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(15, 23, 42, 0.9); border: 1.5px solid rgba(251, 146, 60, 0.85); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55); }
.fire-marker-lg { width: 24px; height: 24px; border-color: #EF4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.65); }
.fire-marker-md { width: 20px; height: 20px; box-shadow: 0 0 6px rgba(249, 115, 22, 0.5); }
.fire-marker-sm { width: 16px; height: 16px; }
.burn-flame-svg { width: 70%; height: 70%; display: block; }
.fire-cluster-badge { position: absolute; top: -6px; right: -8px; background: #EA580C; color: #FFF; font-size: 9px; font-weight: 800; line-height: 1; padding: 2px 4px; border-radius: 999px; border: 1px solid #0F172A; }

/* Floating Bottom Status Sheet */
.map-status-overlay {
  position: absolute; bottom: max(12px, calc(10px + env(safe-area-inset-bottom, 0px))); left: max(10px, env(safe-area-inset-left, 10px));
  right: max(10px, env(safe-area-inset-right, 10px)); margin-inline: auto; max-width: 440px; max-height: calc(100% - 76px);
  z-index: 1000; display: flex; flex-direction: column; background: rgba(18, 22, 30, 0.95); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 18px; padding: 5px 14px 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: padding 0.25s ease; overflow: hidden; user-select: none;
}
.sheet-handle-bar { display: flex; justify-content: center; align-items: center; padding: 2px 0 4px; cursor: pointer; touch-action: pan-y; flex-shrink: 0; }
.sheet-handle-pill { width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.28); }
.status-badge-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; cursor: pointer; }
.status-header-right { display: flex; align-items: center; gap: 8px; min-width: 0; }

.sheet-chevron-btn {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; height: 28px;
  padding: 0 10px; gap: 5px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  color: #E2E8F0; font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, scale 150ms ease-out;
}
.sheet-chevron-icon { font-size: 9px; line-height: 1; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.sheet-chevron-btn:hover { background: rgba(255, 255, 255, 0.18); color: #FFF; }
.sheet-chevron-btn:active { scale: 0.96; }

.sheet-expanded-body {
  flex: 1 1 auto; min-height: 0; max-height: min(72dvh, 560px); opacity: 1; overflow-y: auto; overscroll-behavior: contain;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin 0.3s ease; margin-top: 4px;
}
.map-status-overlay.collapsed { padding-bottom: 10px; }
.map-status-overlay.collapsed .sheet-expanded-body { max-height: 0; opacity: 0; margin-top: 0; pointer-events: none; overflow: hidden; }
.map-status-overlay.collapsed .sheet-action-row { display: none; }
.map-status-overlay.collapsed .sheet-chevron-btn { border-color: rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.14); color: #7DD3FC; }
.map-status-overlay.collapsed .sheet-chevron-icon { transform: rotate(-180deg); }

.sheet-action-row { margin-top: 8px; display: flex; justify-content: stretch; flex-shrink: 0; }
.sheet-action-btn {
  width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%); color: #FFF; font-weight: 800; font-size: 13px;
  border: none; border-radius: 12px; padding: 10px 16px; cursor: pointer; box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
  transition: transform 0.15s ease, background 0.2s ease;
}
.sheet-action-btn:hover { background: linear-gradient(135deg, #FB923C 0%, #F97316 100%); }
.sheet-action-btn:active { transform: scale(0.97); }

.leaflet-pane.burn-county-heatmap-pane { pointer-events: none; will-change: opacity; transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
.leaflet-pane.burn-tier-fade-pane { will-change: opacity; transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) {
  .why-verdict-drawer { transition: none !important; }
  .leaflet-pane.burn-county-heatmap-pane, .leaflet-pane.burn-tier-fade-pane { transition: opacity 0.12s linear; }
}
.leaflet-overlay-pane svg path.leaflet-interactive { transition: fill-opacity 0.35s ease, stroke-opacity 0.35s ease, fill 0.35s ease, stroke 0.35s ease; }
.sheet-center-btn { background: rgba(249, 115, 22, 0.18); border: 1px solid rgba(249, 115, 22, 0.55); border-radius: 999px; height: 28px; padding: 0 9px; color: #FED7AA; font-family: inherit; font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; cursor: pointer; }
.sheet-center-btn:hover { background: rgba(249, 115, 22, 0.32); color: #FFF; }
.wildfire-sat-btn { margin-top: 8px; width: 100%; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(56, 189, 248, 0.45); background: rgba(14, 165, 233, 0.18); color: #7DD3FC; font-family: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.wildfire-sat-btn:hover { background: rgba(14, 165, 233, 0.32); color: #FFF; }
.skip-link {
  position: fixed; top: -9999px; left: 14px; z-index: 2000; padding: 10px 16px; background: #0F172A; color: #F8FAFC;
  border: 2px solid #38BDF8; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
}
.skip-link:focus, .skip-link:focus-visible { top: 14px; }
.smoke-plume-pill-wrap { background: transparent; border: none; pointer-events: none; }
.smoke-plume-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(148, 163, 184, 0.72);
  color: #E2E8F0; font-family: inherit; font-size: 11px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45); transform: translate(-50%, -50%); pointer-events: none;
}
.smoke-plume-pill.warn { border-color: rgba(245, 158, 11, 0.85); color: #FDE68A; }

/* Polished Layers Modal Chips, Civic Safety Portals & Language Selector */
.map-lang-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.72); border: 1px solid rgba(56, 189, 248, 0.24);
}
.map-lang-label { font-size: 11.5px; font-weight: 700; color: #E2E8F0; white-space: nowrap; }
.map-lang-select {
  background: #0F172A; color: #F8FAFC; border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.map-lang-select:hover, .map-lang-select:focus-visible { border-color: #38BDF8; background: #1E293B; }

.explorer-chip,
.portal-modal-link {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px;
  background: rgba(30, 41, 59, 0.72); border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px; color: #E2E8F0; font-family: inherit; font-size: 11.5px; font-weight: 700;
  text-decoration: none; cursor: pointer; padding: 8px 11px; min-height: 36px;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}
.explorer-chip:hover,
.portal-modal-link:hover {
  background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.55); color: #FFFFFF; transform: translateY(-1px);
}
.portal-modal-link { border-color: rgba(249, 115, 22, 0.28); }
.portal-modal-link:hover { background: rgba(249, 115, 22, 0.16); border-color: rgba(249, 115, 22, 0.6); }

/* Map Top Bar Spring Theme Slider, Planetary Language Globe & Active-Layer Intel HUD */
.theme-slider-btn { appearance: none; background: transparent; border: none; padding: 0; cursor: pointer; font-family: inherit; border-radius: 999px; flex-shrink: 0; }
.theme-slider-track {
  display: flex; align-items: center; justify-content: space-between; position: relative;
  width: 54px; height: var(--target-size); padding: 3px; border-radius: 999px; background: rgba(20, 24, 32, 0.94);
  border: 1px solid #2C3646; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.45);
}
.theme-slider-thumb {
  position: absolute; top: 50%; left: 3px; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.42), rgba(56, 189, 248, 0.34));
  border: 1px solid rgba(56, 189, 248, 0.72); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); will-change: transform;
  transition: background 220ms ease, border-color 220ms ease;
}
.theme-slider-btn.is-obsidian .theme-slider-thumb {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.46), rgba(30, 41, 59, 0.96));
  border-color: rgba(249, 115, 22, 0.78);
}
.theme-pole { position: relative; z-index: 1; width: 22px; font-size: 12px; text-align: center; line-height: 1; opacity: 0.46; transition: opacity 200ms ease, transform 200ms ease; }
body[data-visual-mode="atmospheric"] .pole-atmos, body[data-visual-mode="obsidian"] .pole-obsidian { opacity: 1; transform: scale(1.06); }

.lang-globe-control { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.lang-globe-btn {
  position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: var(--target-size);
  padding: 5px 9px 5px 7px; border-radius: 20px; background: rgba(20, 24, 32, 0.94); border: 1px solid #2C3646;
  color: #ECEFF1; font-family: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); transition: border-color 180ms ease, background-color 180ms ease;
}
.lang-globe-btn:hover, .lang-globe-btn:focus-visible { border-color: #38BDF8; background: #1B222D; }
.lang-globe-glow {
  position: absolute; left: 4px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.78) 0%, rgba(14, 165, 233, 0.24) 55%, transparent 78%);
  filter: blur(4px); pointer-events: none; opacity: 0; will-change: opacity, transform;
}
.lang-globe-svg { width: 17px; height: 17px; color: #7DD3FC; position: relative; z-index: 1; display: block; }
.lang-globe-planet { transform-box: fill-box; transform-origin: center; will-change: transform; }
.lang-globe-code { position: relative; z-index: 1; }
.lang-popup-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 1600; width: 244px; max-width: calc(100vw - 24px);
  max-height: min(62vh, 340px); overflow-y: auto; padding: 6px; border-radius: 14px;
  background: rgba(15, 23, 42, 0.97); backdrop-filter: blur(14px); border: 1px solid rgba(56, 189, 248, 0.48);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75); display: flex; flex-direction: column; gap: 3px;
}
.lang-popup-menu.hidden { display: none; }
.lang-popup-item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 7px 10px;
  border-radius: 9px; border: 1px solid transparent; background: transparent; color: #E2E8F0;
  font-family: inherit; cursor: pointer; text-align: left;
}
.lang-popup-item:hover { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.35); }
.lang-popup-item.active { background: rgba(14, 165, 233, 0.24); border-color: rgba(56, 189, 248, 0.65); color: #FFF; }
.lang-popup-native { font-size: 12px; font-weight: 700; }
.lang-popup-sub { font-size: 10px; color: #94A3B8; font-weight: 600; }

.map-layer-intel-bar {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
  pointer-events: auto; padding: 1px 0;
}
.map-layer-intel-bar::-webkit-scrollbar { display: none; }
.intel-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 4px 10px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.92); backdrop-filter: blur(10px); border: 1px solid rgba(148, 163, 184, 0.3);
  color: #E2E8F0; font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.intel-chip.wildfire { border-color: rgba(249, 115, 22, 0.52); color: #FED7AA; }
.intel-chip.firms { border-color: rgba(239, 68, 68, 0.54); color: #FECACA; }
.intel-chip.smoke { border-color: rgba(245, 158, 11, 0.5); color: #FDE68A; }
.intel-chip.radar { border-color: rgba(56, 189, 248, 0.5); color: #BAE6FD; }
.intel-chip.station { border-color: rgba(16, 185, 129, 0.45); color: #A7F3D0; }
.intel-jump-btn {
  appearance: none; background: rgba(56, 189, 248, 0.18); border: 1px solid rgba(56, 189, 248, 0.55);
  color: #E0F2FE; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 800; cursor: pointer; font-family: inherit;
}
.intel-jump-btn:hover { background: rgba(56, 189, 248, 0.35); color: #FFF; }
.frp-heat-tag-wrap, .station-route-eta-wrap { background: transparent; border: none; pointer-events: none; }
.frp-heat-tag {
  display: inline-block; padding: 1px 5px; border-radius: 999px; background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(251, 146, 60, 0.85); color: #FDE047; font-size: 9.5px; font-weight: 800; white-space: nowrap;
  transform: translate(-50%, -140%);
}
.station-route-eta-pill {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.72); color: #BAE6FD; font-size: 10px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5); transform: translate(-50%, -50%);
}
body[data-visual-mode="atmospheric"][data-burn-status="GREEN"] .map-status-overlay { background: rgba(19, 42, 25, 0.94); border-color: rgba(46, 107, 62, 0.9); }
body[data-visual-mode="atmospheric"][data-burn-status="ORANGE"] .map-status-overlay { background: rgba(43, 25, 16, 0.94); border-color: rgba(124, 67, 36, 0.9); }
body[data-visual-mode="atmospheric"][data-burn-status="RED"] .map-status-overlay { background: rgba(43, 19, 21, 0.95); border-color: rgba(127, 47, 54, 0.9); }
body[data-visual-mode="atmospheric"][data-burn-status="GRAY"] .map-status-overlay { background: rgba(22, 32, 43, 0.94); border-color: rgba(59, 79, 102, 0.9); }

.map-drawer-tab[aria-expanded="true"] { background: rgba(249, 115, 22, 0.22); border-color: rgba(249, 115, 22, 0.72); color: #FFF; }
.map-drawer-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: rgba(56, 189, 248, 0.2); border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7DD3FC; font-size: 10px; font-weight: 800; line-height: 1;
}
.map-hud-drawer {
  background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(14px); border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 16px; padding: 10px; pointer-events: auto; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); max-width: 100%;
}
.map-hud-drawer[hidden] { display: none !important; }
.map-drawer-tools-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.map-hud-drawer .map-layer-intel-bar { flex-wrap: wrap; overflow-x: visible; max-width: 100%; }
.map-hud-drawer .intel-chip { flex-shrink: 1; max-width: 100%; white-space: normal; line-height: 1.3; flex-wrap: wrap; }
@media (max-width: 540px) {
  .leaflet-control-zoom { display: none !important; }
}
@media (max-width: 440px) {
  .status-badge-row { flex-wrap: wrap; gap: 4px 8px; }
  .status-badge-row .status-indicator { font-size: 13px; white-space: normal; flex-shrink: 1; }
  .status-badge-row .status-header-right { flex: 1 0 100%; justify-content: space-between; flex-wrap: wrap; }
  .status-header-right .status-location-name { text-align: left; white-space: normal; overflow: visible; text-overflow: clip; flex: 1 1 auto; }
}
