/* ============================================================
   STRATUS Atlas v34 — Elite UI Enhancement Layer
   Fixes all cascade conflicts from v20–v26, maximizes
   information density, and elevates visual quality across
   every component in the weather intelligence dashboard.
   ============================================================ */

/* ── SECTION 1: TOKEN AUGMENTATION ────────────────────────── */
:root {
  /* ── Panel layout geometry ───────────────────────────────────────
   * Header: top:12px, min-height:62px  →  bottom edge ≈ 74px
   * panel-top: 74px + 10px gap = 84px
   * Timeline bar: bottom:24px, height≈44px  →  panel-bottom: 76px
   * Both side panels identical width for visual balance.
   * ─────────────────────────────────────────────────────────── */
  --stratus-header-height: 62px;
  --stratus-panel-top:    84px;
  --stratus-panel-bottom: 76px;
  --stratus-edge:         12px;
  --stratus-left-width:   clamp(300px, 22vw, 385px);
  --stratus-right-width:  clamp(300px, 22vw, 385px);

  /* Richer glass backgrounds */
  --glass-bg-deep:    rgba(10, 9, 7, 0.94);
  --glass-bg-panel:   rgba(13, 12, 10, 0.90);
  --glass-bg-header:  rgba(15, 14, 11, 0.88);

  /* Per-severity glow */
  --glow-tornado:  0 0 14px rgba(255, 77,  77,  0.30);
  --glow-severe:   0 0 14px rgba(255, 159, 69,  0.26);
  --glow-flood:    0 0 14px rgba(43,  217, 217, 0.24);
  --glow-green:    0 0 14px rgba(62,  207, 142, 0.24);

  /* Per-severity tinted card fills */
  --sev-tornado-bg:    rgba(255, 77,  77,  0.11);
  --sev-tornado-bd:    rgba(255, 77,  77,  0.38);
  --sev-severe-bg:     rgba(255, 159, 69,  0.10);
  --sev-severe-bd:     rgba(255, 159, 69,  0.32);
  --sev-flood-bg:      rgba(34,  197, 94,  0.10);  /* NWS green for flood */
  --sev-flood-bd:      rgba(34,  197, 94,  0.30);
  --sev-hurricane-bg:  rgba(232, 121, 249, 0.10);  /* fuchsia for hurricane */
  --sev-hurricane-bd:  rgba(232, 121, 249, 0.28);
  --sev-winter-bg:     rgba(147, 197, 253, 0.09);
  --sev-winter-bd:     rgba(147, 197, 253, 0.26);
  --sev-fire-bg:       rgba(249, 115, 22,  0.10);  /* amber-orange fire */
  --sev-fire-bd:       rgba(249, 115, 22,  0.28);
  --sev-storm-bg:      rgba(56,  189, 248, 0.09);
  --sev-storm-bd:      rgba(56,  189, 248, 0.26);
  --sev-heat-bg:       rgba(250, 204, 21,  0.09);
  --sev-heat-bd:       rgba(250, 204, 21,  0.26);
  --sev-tropical-bg:   rgba(167, 139, 250, 0.09);
  --sev-tropical-bd:   rgba(167, 139, 250, 0.26);

  /* Motion tokens */
  --ease-crisp:  cubic-bezier(0.20, 0.00, 0.40, 1.00);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1.00);
  --dur-fast:  110ms;
  --dur-med:   190ms;
  --dur-slow:  310ms;
}


/* ── SECTION 1b: MAP LAYER COMPOSITING ───────────────────────
 * Apple Maps "glow" effect: radar and MRMS panes use mix-blend-mode: screen.
 * screen(src, dst) = 1-(1-src)(1-dst) — dark near-black pixels (no echo areas)
 * collapse toward transparent, vivid precipitation pixels bloom on the basemap.
 * Leaflet pane divs are named "stratus-radar-pane" etc. by L.Map.createPane().
 * ─────────────────────────────────────────────────────────── */
.stratus-radar-pane {
  mix-blend-mode: screen !important;
}
.stratus-mrms-pane {
  mix-blend-mode: screen !important;
  /* screen blend also makes the solid Esri ImageServer background
     (near-black) disappear, eliminating the opaque-tile-over-radar problem */
}


/* ── SECTION 2: GLASS PANEL SYSTEM ───────────────────────── */
.glass-panel {
  background: var(--glass-bg-panel);
  border-color: rgba(232, 228, 220, 0.11);
  backdrop-filter: blur(28px) saturate(1.45) brightness(1.03);
  -webkit-backdrop-filter: blur(28px) saturate(1.45) brightness(1.03);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.70),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 1px 0 rgba(255, 255, 255, 0.055) inset;
}


/* ── SECTION 3: TOP TICKER / HEADER ───────────────────────── */
.top-ticker {
  background:
    linear-gradient(180deg, rgba(15, 18, 24, 0.95) 0%, rgba(10, 9, 8, 0.86) 100%),
    radial-gradient(ellipse at 0% 0%, rgba(62, 207, 142, 0.10) 0%, transparent 50%);
  border-color: rgba(232, 228, 220, 0.13);
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.58),
    0 1px 0 rgba(255, 255, 255, 0.055) inset;
  backdrop-filter: blur(22px) saturate(1.42);
  -webkit-backdrop-filter: blur(22px) saturate(1.42);
}

/* Brand zone layout */
.topbar-brand-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* ── SONAR DOT ─────────────────────────────────────────────────────
   Replaces simple pulse with outward radar-ping rings.
   Two rings stagger 1.3 s apart for continuous sweep feel.
──────────────────────────────────────────────────────────────────── */
.live-dot {
  position:      relative !important;
  width:         8px !important;
  height:        8px !important;
  border-radius: 50% !important;
  background:    #3ecf8e !important;
  box-shadow:
    0 0 0 1.5px rgba(62, 207, 142, 0.22),
    0 0 7px  rgba(62, 207, 142, 0.90),
    0 0 18px rgba(62, 207, 142, 0.38) !important;
  animation:     none !important;
  flex-shrink:   0 !important;
  overflow:      visible !important;
}
.live-dot::before,
.live-dot::after {
  content:       '';
  position:      absolute;
  inset:         -1px;
  border-radius: 50%;
  border:        1.5px solid rgba(62, 207, 142, 0.80);
  pointer-events: none;
  animation:     sonar-ping 2.6s cubic-bezier(0.18, 0, 0.28, 1) infinite;
}
.live-dot::after {
  animation-delay: 1.3s;
}

@keyframes sonar-ping {
  0%   { transform: scale(1);   opacity: 0.85; border-width: 1.5px; }
  60%  {                         opacity: 0.30;                       }
  100% { transform: scale(6);   opacity: 0;    border-width: 0.5px; }
}

/* ── BRAND TEXT ─────────────────────────────────────────────────────
   .brand-name wraps STRATUS — periodic glitch chromatic shift.
   .brand-accent (Atlas) breathes through a moving gradient.
──────────────────────────────────────────────────────────────────── */
.brand-block strong {
  font-size:      0.88rem;
  letter-spacing: 0.19em;
}

/* STRATUS glitch + gradient shimmer */
.brand-name {
  display:                  inline !important;
  position:                 relative !important;
  font:                     inherit !important;
  background:               linear-gradient(115deg, #e8e4dc 0%, #3ecf8e 38%, #2bd9d9 55%, #e8e4dc 100%) !important;
  background-size:          280% 100% !important;
  -webkit-background-clip:  text !important;
  background-clip:          text !important;
  -webkit-text-fill-color:  transparent !important;
  animation:
    stratus-glitch  13s ease infinite,
    name-shimmer    6s  ease-in-out infinite !important;
}

@keyframes name-shimmer {
  0%, 100% { background-position:   0% 50%; }
  50%       { background-position: 100% 50%; }
}
.brand-name::before,
.brand-name::after {
  content:        'STRATUS';
  position:       absolute;
  left: 0; top: 0;
  font:           inherit;
  letter-spacing: inherit;
  pointer-events: none;
  opacity:        0;
  animation:      glitch-layer 13s ease infinite;
}
.brand-name::before {
  color:                   #2bd9d9;
  -webkit-text-fill-color: #2bd9d9;
  clip-path:               polygon(0 10%, 100% 10%, 100% 40%, 0 40%);
}
.brand-name::after {
  color:                   #ff4d6d;
  -webkit-text-fill-color: #ff4d6d;
  clip-path:               polygon(0 60%, 100% 60%, 100% 85%, 0 85%);
  animation-delay:         0.06s;
}

@keyframes stratus-glitch {
  0%, 88%, 100% { transform: none;            text-shadow: none; }
  88.3%         { transform: translateX(-2px); text-shadow:  2px 0 rgba(43,217,217,0.65); }
  88.6%         { transform: translateX( 2px); text-shadow: -2px 0 rgba(248,113,113,0.65); }
  88.9%         { transform: none;            text-shadow: none; }
  89.2%         { transform: translateX(-1px); text-shadow:  1px 0 rgba(43,217,217,0.40); }
  89.5%         { transform: none;            text-shadow: none; }
}

@keyframes glitch-layer {
  0%, 88%, 100% { opacity: 0; transform: none; }
  88.3%         { opacity: 0.85; transform: translateX( 3px); }
  88.6%         { opacity: 0;    transform: translateX(-2px); }
  88.9%         { opacity: 0.65; transform: translateX( 2px); }
  89.2%         { opacity: 0; }
}

/* (brand-accent removed — Atlas dropped from name) */

/* Scan line sweeps the brand copy area */
.brand-copy {
  position: relative !important;
  overflow: hidden !important;
}
.brand-copy::after {
  content:    '';
  position:   absolute;
  left:  -5%;
  right: -5%;
  top:        0;
  height:     1px;
  background: linear-gradient(90deg,
    transparent               0%,
    rgba(62,207,142,0.00)    10%,
    rgba(62,207,142,0.55)    35%,
    rgba(62,207,142,0.85)    50%,
    rgba(62,207,142,0.55)    65%,
    rgba(62,207,142,0.00)    90%,
    transparent              100%);
  pointer-events: none;
  animation:  scan-sweep 8s ease-in-out infinite;
  opacity:    0;
}

@keyframes scan-sweep {
  0%   { top: 0%;   opacity: 0; }
  6%   {             opacity: 1; }
  94%  {             opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ── LIVE PILL — HUD style ─────────────────────────────────────────
   Square corners, blinking ◉ dot, border pulses.
──────────────────────────────────────────────────────────────────── */
.runtime-status-pill {
  display:         inline-flex !important;
  align-items:     center !important;
  gap:             4px !important;
  padding:         2px 7px 2px 5px !important;
  border-radius:   4px !important;
  border:          1px solid rgba(62, 207, 142, 0.35) !important;
  background:      transparent !important;
  color:           #3ecf8e !important;
  font:            700 0.51rem var(--font-mono, monospace) !important;
  letter-spacing:  0.15em !important;
  text-transform:  uppercase !important;
  white-space:     nowrap !important;
  flex:            0 0 auto !important;
  animation:       pill-border-pulse 2.2s ease infinite !important;
}
.runtime-status-pill::before {
  content:         '◉' !important;
  font-size:       0.50rem !important;
  line-height:     1 !important;
  width:           auto !important;
  height:          auto !important;
  border-radius:   0 !important;
  background:      none !important;
  color:           #3ecf8e !important;
  box-shadow:      none !important;
  animation:       dot-blink 1.4s step-start infinite !important;
  flex:            0 0 auto !important;
}

@keyframes dot-blink {
  0%, 45%, 100% { opacity: 1; }
  50%, 95%      { opacity: 0.06; }
}

@keyframes pill-border-pulse {
  0%, 100% {
    border-color: rgba(62, 207, 142, 0.32);
    box-shadow: none;
  }
  50% {
    border-color: rgba(62, 207, 142, 0.72);
    box-shadow:
      0 0 7px rgba(62, 207, 142, 0.18),
      inset 0 0 6px rgba(62, 207, 142, 0.07);
  }
}

/* State variants */
.runtime-status-pill[data-state="booting"],
.runtime-status-pill[data-state="initializing"] {
  border-color: rgba(255, 180, 84, 0.35) !important;
  color: var(--color-accent-amber) !important;
}
.runtime-status-pill[data-state="booting"]::before,
.runtime-status-pill[data-state="initializing"]::before {
  color: var(--color-accent-amber) !important;
}
.runtime-status-pill[data-state="error"],
.runtime-status-pill[data-state="offline"] {
  border-color: rgba(255, 92, 92, 0.35) !important;
  color: var(--color-error) !important;
}
.runtime-status-pill[data-state="error"]::before,
.runtime-status-pill[data-state="offline"]::before {
  color: var(--color-error) !important;
}

/* Nav buttons */
.top-actions {
  background: rgba(6, 5, 4, 0.45);
  border-color: rgba(232, 228, 220, 0.09);
}
.top-action {
  font-size: 0.60rem;
  letter-spacing: 0.12em;
  transition: all var(--dur-fast) var(--ease-crisp);
}
.top-action:hover,
.top-action:focus-visible {
  color: var(--color-text);
  background: rgba(232, 228, 220, 0.08);
  transform: none;
}
.top-action.active,
.top-action[aria-pressed="true"] {
  color: var(--color-accent);
  background: linear-gradient(135deg, rgba(62, 207, 142, 0.20), rgba(43, 217, 217, 0.14));
  border-color: rgba(62, 207, 142, 0.42);
  font-weight: 800;
  box-shadow: 0 0 8px rgba(62, 207, 142, 0.14);
}

/* ── Search group — pill + standalone clear icon ── */
.top-search-group {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

/* Search pill — input + Go only */
.top-search {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  width: 200px !important;
  max-width: 200px !important;
  padding: 2px 3px 2px 11px !important;
  gap: 3px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(232,228,220,0.11) !important;
  background: rgba(8,7,5,0.62) !important;
  height: 30px !important;
  box-sizing: border-box !important;
  transition: border-color 120ms ease !important;
}
.top-search:focus-within {
  border-color: rgba(62,207,142,0.32) !important;
}
.top-search input {
  font-size: 0.59rem !important;
  padding: 0 !important;
  height: 100% !important;
  letter-spacing: 0.02em !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: rgba(232,228,220,0.82) !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
.top-search input::placeholder {
  color: rgba(232,228,220,0.26) !important;
  font-size: 0.59rem !important;
}
/* Go — accent pill button inside search */
#top-location-go {
  flex: 0 0 auto !important;
  height: 23px !important;
  padding: 0 9px !important;
  border-radius: 999px !important;
  font-size: 0.54rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.10em !important;
  background: rgba(62,207,142,0.88) !important;
  border: none !important;
  color: #071510 !important;
  cursor: pointer !important;
  transition: background 100ms ease !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}
#top-location-go:hover { background: #3ecf8e !important; }

/* Clear — standalone icon button, outside pill */
#clear-map-btn {
  flex: 0 0 auto !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: rgba(232,228,220,0.32) !important;
  font-size: 0.70rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 110ms ease, background 110ms ease, border-color 110ms ease !important;
}
#clear-map-btn:hover {
  color: rgba(248,113,113,0.90) !important;
  background: rgba(248,113,113,0.09) !important;
  border-color: rgba(248,113,113,0.20) !important;
}

/* ── Header — full flex row, no dead gap ── */
.top-ticker {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  padding: 0 14px !important;
  min-height: 54px !important;
  gap: 8px !important;
  grid-template-columns: none !important; /* kill the 2-col grid */
}

/* Brand zone */
.topbar-brand-zone {
  flex: 0 0 auto !important;
  gap: 8px !important;
  min-width: 0 !important;
}
.brand-block { min-width: 0 !important; gap: 8px !important; }
.brand-block strong { font-size: 0.80rem !important; letter-spacing: 0.16em !important; }
.brand-block small  { font-size: 0.56rem !important; margin-top: 2px !important; letter-spacing: 0.04em !important; }
/* live-dot: keep sonar geometry intact — position+overflow allow rings to expand */
.live-dot {
  width:    8px !important;
  height:   8px !important;
  position: relative  !important;
  overflow: visible   !important;
}
.runtime-status-pill {
  padding: 2px 6px !important;
  font-size: 0.48rem !important;
  gap: 4px !important;
}
/* ::before is now the ◉ text glyph — remove stale box-dimension overrides */

/* Thin separator between brand and nav */
.topbar-brand-zone::after {
  content: "" !important;
  display: block !important;
  width: 1px !important;
  height: 22px !important;
  background: rgba(232,228,220,0.10) !important;
  margin-left: 4px !important;
  flex-shrink: 0 !important;
}

/* Nav buttons */
.top-actions {
  flex: 0 0 auto !important;
  gap: 2px !important;
}
.top-action {
  font-size: 0.57rem !important;
  padding: 4px 10px !important;
  letter-spacing: 0.10em !important;
}

/* Search group — in flex header */
.top-search-group {
  flex: 0 0 auto !important;
}

/* Status zone — pushed to far right */
.topbar-status-zone {
  margin-left: auto !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Health chips — small pills */
.source-health { gap: 3px !important; }
.health-chip {
  padding: 2px 6px !important;
  font-size: 0.49rem !important;
  gap: 3px !important;
  letter-spacing: 0.07em !important;
}
.health-chip::before { width: 4px !important; height: 4px !important; }

/* Clock */
.ticker-clock { gap: 1px !important; }
.clock-utc   { font-size: 0.64rem !important; }
.clock-local { font-size: 0.52rem !important; }

/* Icon buttons */
.top-icon {
  width: 26px !important;
  height: 26px !important;
  font-size: 0.70rem !important;
  padding: 0 !important;
}


/* ── SECTION 4: HEALTH CHIPS (restore + animate) ──────────── */
/* v26 applied display:none!important — we restore here */
.source-health {
  display: flex !important;
  align-items: center;
  gap: 4px;
}
.health-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(232, 228, 220, 0.09);
  background: rgba(8, 7, 5, 0.50);
  color: var(--color-subtle);
  font: 600 0.53rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all var(--dur-med) ease;
}
.health-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-subtle);
  flex: 0 0 auto;
  transition: background var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
.health-chip[data-state="healthy"],
.health-chip[data-state="ready"] {
  border-color: rgba(62, 207, 142, 0.24);
  background: rgba(62, 207, 142, 0.07);
  color: var(--color-accent);
}
.health-chip[data-state="healthy"]::before,
.health-chip[data-state="ready"]::before {
  background: var(--color-accent);
  box-shadow: 0 0 5px var(--color-accent);
  animation: pulse 2.8s ease-in-out infinite;
}
.health-chip[data-state="degraded"] {
  border-color: rgba(255, 180, 84, 0.26);
  background: rgba(255, 180, 84, 0.07);
  color: var(--color-accent-amber);
}
.health-chip[data-state="degraded"]::before { background: var(--color-accent-amber); }
.health-chip[data-state="pending"] { animation: v34-shimmer 2.5s ease infinite; }
.health-chip[data-state="offline"],
.health-chip[data-state="error"] {
  border-color: rgba(255, 92, 92, 0.26);
  background: rgba(255, 92, 92, 0.07);
  color: var(--color-error);
}
.health-chip[data-state="offline"]::before,
.health-chip[data-state="error"]::before {
  background: var(--color-error);
  box-shadow: 0 0 5px var(--color-error);
}

/* Local clock — restore (v26 hid it) */
.clock-local {
  display: block !important;
  font-size: 0.60rem !important;
  opacity: 0.80;
}
.clock-utc { font-size: 0.76rem !important; }

/* Icon buttons */
.top-icon {
  background: rgba(8, 7, 5, 0.46);
  border-color: rgba(232, 228, 220, 0.12);
  transition: all var(--dur-fast) ease;
}
.top-icon:hover {
  color: var(--color-accent);
  border-color: rgba(62, 207, 142, 0.38);
  background: rgba(62, 207, 142, 0.07);
}


/* ── SECTION 5: ALERT SIDEBAR ─────────────────────────────── */
.sidebar {
  background:
    linear-gradient(165deg,
      rgba(14, 13, 10, 0.93) 0%,
      rgba(10, 9, 7, 0.91) 100%);
  border-color: rgba(232, 228, 220, 0.10);
}
.sidebar-toggle {
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.sidebar-toggle:hover {
  color: var(--color-accent);
  background: rgba(62, 207, 142, 0.08);
}
.panel-heading-row h2 {
  font-size: 0.65rem;
  letter-spacing: 0.17em;
  color: rgba(154, 149, 138, 0.75);
}
#visible-warning-count {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--color-accent);
}
.alert-search {
  background: rgba(7, 6, 5, 0.60);
  border-color: rgba(232, 228, 220, 0.10);
  border-radius: 9px;
  font-size: 0.70rem;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.alert-search:focus {
  border-color: rgba(62, 207, 142, 0.42);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.07);
}
.alert-feed-status {
  font-size: 0.67rem;
  line-height: 1.45;
  color: rgba(232, 228, 220, 0.75);
  border-radius: 10px;
}
.alert-filter {
  border-radius: 999px;
  font-size: 0.60rem;
  padding: 4px 9px;
  transition: all var(--dur-fast) ease;
}
.alert-filter:hover { color: var(--color-text); border-color: rgba(232, 228, 220, 0.20); }
.alert-filter[aria-pressed="true"] {
  background: rgba(62, 207, 142, 0.14);
  border-color: rgba(62, 207, 142, 0.44);
  color: var(--color-accent);
  font-weight: 700;
}


/* ── SECTION 6: ALERT CARDS + MASTER-DETAIL SPLIT PANEL ────────
 * Cards: NWS border-left color, click marks as-active and opens
 * the detail panel below the list (master-detail pattern).
 * No modal/backdrop — the panel is an inline flex child of #sidebar
 * so the list stays visible and scrollable above the detail.
 * ─────────────────────────────────────────────────────────── */

/* Focus ring for keyboard nav */
.alert-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Selected / active card highlight */
.alert-card.is-active {
  background: rgba(62, 207, 142, 0.07);
  border-left-width: 3px !important;
  box-shadow: inset 0 0 0 1px rgba(62, 207, 142, 0.10);
}

/* ── Sidebar: flex column to enable the split ─────────────── */
#sidebar {
  display:        flex !important;
  flex-direction: column !important;
  overflow:       hidden !important;
  gap:            0 !important;
  /* Remove bundle padding so list and detail fill edge-to-edge;
     panel-heading-row carries its own inner padding (Section 24) */
  padding:        0 !important;
  /* Override bundle's hard-coded px values with CSS variable versions */
  top:            var(--stratus-panel-top,    84px)  !important;
  left:           var(--stratus-edge,         12px)  !important;
  bottom:         var(--stratus-panel-bottom, 76px)  !important;
  width:          var(--stratus-left-width,   clamp(300px, 22vw, 385px)) !important;
}

/* Alert list: fills all remaining space when no split */
#sidebar .alert-list {
  flex:            1 1 auto;
  min-height:      0;
  overflow-y:      auto;
  /* Compensate for sidebar padding removal — cards stay inset */
  padding:         8px 10px 10px !important;
  /* Smooth compression when split opens */
  transition:      max-height 300ms cubic-bezier(0.32, 0.72, 0, 1),
                   flex       300ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* When split active: compress list to top 36% */
#sidebar.is-split .alert-list {
  flex:       0 0 36% !important;
  max-height: 36% !important;
  min-height: 100px;
  border-bottom: 1px solid rgba(232, 228, 220, 0.09);
}

/* Cancel the bundle's margin-top on alert-list-clean (padding handles spacing now) */
#sidebar .alert-list-clean {
  margin-top: 0 !important;
}

/* ── Alert detail panel ──────────────────────────────────────
 * Injected as a flex child of #sidebar by _ensureDrawer().
 * Collapses to zero height by default; expands when .is-split.
 * ─────────────────────────────────────────────────────────── */
#alert-detail-drawer {
  /* Override any stale fixed/absolute rules from cascade */
  position:      static !important;
  bottom:        auto   !important;
  left:          auto   !important;
  width:         100%   !important;
  max-height:    none   !important;
  z-index:       auto   !important;
  transform:     none   !important;
  border-radius: 0      !important;
  border-left:   none   !important;
  border-right:  none   !important;
  border-bottom: none   !important;
  box-shadow:    none   !important;

  /* Flex child: starts collapsed */
  flex:          0 0 0;
  min-height:    0;
  overflow:      hidden;
  display:       flex;
  flex-direction: column;

  /* Panel appearance */
  background: linear-gradient(175deg,
    rgba(13, 12, 10, 0.98) 0%,
    rgba(10,  9,  7, 0.99) 100%);
  border-top: 1px solid rgba(232, 228, 220, 0.10);

  /* Animate open */
  opacity:    0;
  transition:
    flex-basis 300ms cubic-bezier(0.32, 0.72, 0, 1),
    opacity    220ms ease 60ms;
}

/* Remove drag-handle pseudo-element (panel is inline, not modal) */
#alert-detail-drawer::before {
  display: none !important;
}

/* Expanded state */
#sidebar.is-split #alert-detail-drawer {
  flex:    1 1 0;
  opacity: 1;
  overflow: hidden;
}

/* Divider line between list and detail */
#sidebar.is-split .alert-list {
  border-bottom: 1px solid rgba(232, 228, 220, 0.09);
}

/* Header row: colored event name + close button */
.add-header {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
  padding:     12px 14px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(232, 228, 220, 0.07);
}
.add-color-bar {
  width:        3px;
  min-height:   18px;
  align-self:   stretch;
  border-radius: 2px;
  flex-shrink:  0;
  background:   var(--add-color, rgba(232, 228, 220, 0.4));
  box-shadow:   0 0 6px var(--add-color, transparent);
}
.add-title {
  flex:           1;
  font-size:      0.78rem;
  font-weight:    800;
  font-family:    var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height:    1.25;
  color:          var(--color-text, #e8e4dc);
  min-width:      0;
}
.add-close {
  width:       26px;
  height:      26px;
  border-radius: 7px;
  border:      1px solid rgba(232, 228, 220, 0.10);
  background:  rgba(232, 228, 220, 0.04);
  color:       rgba(232, 228, 220, 0.45);
  font-size:   0.80rem;
  line-height: 1;
  cursor:      pointer;
  flex-shrink: 0;
  display:     flex;
  align-items: center;
  justify-content: center;
  transition:  background 140ms ease, color 140ms ease;
}
.add-close:hover {
  background: rgba(232, 228, 220, 0.09);
  color:      var(--color-text);
}

/* Pill badges row */
.add-pills {
  display:     flex;
  flex-wrap:   wrap;
  gap:         5px;
  padding:     8px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(232, 228, 220, 0.06);
}
.add-pill {
  font-size:      0.54rem;
  font-weight:    700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding:        2px 7px;
  border-radius:  4px;
  border:         1px solid rgba(232, 228, 220, 0.13);
  color:          rgba(232, 228, 220, 0.65);
  background:     rgba(232, 228, 220, 0.05);
}
.add-pill--severity-extreme  { color: #FF5555; border-color: rgba(255,85,85,0.38);   background: rgba(255,85,85,0.09); }
.add-pill--severity-severe   { color: #FB923C; border-color: rgba(251,146,60,0.38);  background: rgba(251,146,60,0.09); }
.add-pill--severity-moderate { color: #FBBF24; border-color: rgba(251,191,36,0.38);  background: rgba(251,191,36,0.09); }
.add-pill--urgency-immediate { color: #FF6677; border-color: rgba(255,102,119,0.38); background: rgba(255,102,119,0.09); }

/* Scrollable body */
.add-body {
  overflow-y:      auto;
  flex:            1;
  padding:         12px 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 228, 220, 0.11) transparent;
  overscroll-behavior: contain;
  min-height:      0;
}

/* Dividers */
.add-divider {
  height:     1px;
  background: rgba(232, 228, 220, 0.07);
  margin:     10px 0;
}

/* Meta row: timing grid */
.add-meta {
  display:     flex;
  gap:         14px;
  flex-wrap:   wrap;
  margin-bottom: 10px;
}
.add-meta-item {
  display:        flex;
  flex-direction: column;
  gap:            2px;
}
.add-meta-label {
  font-size:      0.50rem;
  font-weight:    700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color:          rgba(232, 228, 220, 0.38);
}
.add-meta-value {
  font-size:   0.67rem;
  font-family: var(--font-mono);
  color:       rgba(232, 228, 220, 0.82);
}

/* Section labels */
.add-section-label {
  font-size:      0.50rem;
  font-weight:    700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color:          rgba(232, 228, 220, 0.35);
  margin-bottom:  4px;
}

/* Area affected */
.add-area-label {
  font-size:      0.50rem;
  font-weight:    700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color:          rgba(232, 228, 220, 0.35);
  margin-bottom:  3px;
}
.add-area {
  font-size:     0.67rem;
  color:         rgba(232, 228, 220, 0.72);
  line-height:   1.45;
  margin-bottom: 10px;
}

/* Description + instruction prose */
.add-desc,
.add-instr {
  font-size:  0.66rem;
  color:      rgba(232, 228, 220, 0.68);
  line-height: 1.58;
  white-space: pre-wrap;
  word-break:  break-word;
}
.add-instr {
  color:        rgba(232, 228, 220, 0.82);
  border-left:  3px solid var(--add-color, rgba(232, 228, 220, 0.28));
  padding-left: 9px;
  margin-top:   6px;
}

/* NWS office footer */
.add-footer {
  padding-top:    10px;
  font-size:      0.58rem;
  color:          var(--color-accent-cyan, #2dd4bf);
  font-family:    var(--font-mono);
  letter-spacing: 0.04em;
  opacity:        0.75;
}

/* ── SECTION 7: LAYER PANEL ───────────────────────────────── */
.layer-panel {
  background:
    linear-gradient(175deg,
      rgba(14, 13, 10, 0.94) 0%,
      rgba(10, 9, 7, 0.92) 100%);
  border-color: rgba(232, 228, 220, 0.10);
}

/* Correct desktop position — overrides bundle's 86px header assumption */
#layer-panel {
  position:   fixed !important;
  top:        var(--stratus-panel-top,    84px)  !important;
  right:      var(--stratus-edge,         12px)  !important;
  bottom:     var(--stratus-panel-bottom, 76px)  !important;
  left:       auto !important;
  width:      var(--stratus-right-width,  clamp(300px, 22vw, 385px)) !important;
  max-height: none !important;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.22) transparent;
  z-index:    1000 !important;
}
#layer-panel.hidden { display: none !important; }

/* ── Titlebar: copy on left, actions cluster on right ─────── */
.control-panel-titlebar {
  display:         flex !important;
  align-items:     flex-start !important;
  justify-content: space-between !important;
  gap:             10px;
}
.titlebar-copy {
  display:        flex;
  flex-direction: column;
  gap:            3px;
  min-width:      0;
  flex:           1 1 auto;
}
.control-panel-titlebar h2,
.titlebar-copy h2 {
  letter-spacing: 0.19em;
  color:          var(--color-text);
  font-size:      0.78rem !important;
  margin:         0 !important;
}
.control-panel-titlebar small,
.titlebar-copy small {
  font-size:   0.60rem;
  color:       rgba(107, 102, 92, 0.80);
  line-height: 1.35;
}

/* Action buttons cluster in titlebar */
.titlebar-actions {
  display:     flex;
  align-items: center;
  gap:         5px;
  flex:        0 0 auto;
  padding-top: 2px;           /* optical alignment with h2 */
}

/* EXP / COL compact text buttons */
.titlebar-icon-btn {
  height:       22px;
  padding:      0 6px;
  border-radius: 6px;
  border:       1px solid rgba(232, 228, 220, 0.10);
  background:   rgba(8, 7, 5, 0.52);
  color:        var(--color-muted, #6b7280);
  font-family:  var(--font-mono);
  font-size:    0.52rem;
  letter-spacing: 0.08em;
  cursor:       pointer;
  transition:   color 120ms ease, border-color 120ms ease, background 120ms ease;
  white-space:  nowrap;
}
.titlebar-icon-btn:hover {
  color:        var(--color-accent, #3ecf8e);
  border-color: rgba(62, 207, 142, 0.36);
  background:   rgba(62, 207, 142, 0.07);
}

/* Panel close button — matches sidebar-toggle look */
.panel-collapse-btn {
  width:         26px;
  height:        26px;
  border-radius: 8px;
  border:        1px solid rgba(232, 228, 220, 0.13);
  background:    rgba(8, 7, 6, 0.38);
  color:         var(--color-muted, #6b7280);
  font-size:     0.62rem;
  cursor:        pointer;
  display:       flex;
  align-items:   center;
  justify-content: center;
  transition:    color 120ms ease, border-color 120ms ease, background 120ms ease;
  font-family:   var(--font-mono);
  padding:       0;
  line-height:   1;
}
.panel-collapse-btn:hover {
  color:         var(--color-accent, #3ecf8e);
  border-color:  rgba(62, 207, 142, 0.40);
  background:    rgba(62, 207, 142, 0.07);
}
.panel-collapse-btn:active {
  background:    rgba(62, 207, 142, 0.12);
}

/* Hide the old filter toolbar entirely */
.layer-toolbar { display: none !important; }

/* ── Section header ± indicators — smaller & subtler ─────── */
.layer-section {
  border-top-color: rgba(232, 228, 220, 0.07);
}
.layer-section-title {
  font-size:   0.60rem;
  letter-spacing: 0.17em;
  color:       rgba(154, 149, 138, 0.78);
  transition:  color var(--dur-fast) ease;
}
.layer-section-title:hover { color: var(--color-muted); }

/* Override bundle's 22×22px badges — shrink to 16×16px */
.layer-section-title::after {
  width:        16px !important;
  height:       16px !important;
  font-size:    0.60rem !important;
  border-radius: 5px !important;
  background:   rgba(7, 6, 5, 0.52) !important;
  border-color: rgba(232, 228, 220, 0.09) !important;
  transition:   all var(--dur-med) var(--ease-crisp);
}
.layer-section-title:hover::after {
  color:        var(--color-accent);
  border-color: rgba(62, 207, 142, 0.26);
}


/* ── SECTION 8: LAYER CARDS ───────────────────────────────── */
.layer-card {
  position:      relative;
  border-radius: 14px;
  background: rgba(9, 8, 6, 0.46);
  border-color: rgba(232, 228, 220, 0.07);
  transition:
    border-color var(--dur-med) ease,
    background var(--dur-med) ease,
    box-shadow var(--dur-med) ease;
}
.layer-card:hover {
  border-color: rgba(232, 228, 220, 0.15);
  background: rgba(11, 10, 8, 0.56);
}
.layer-card.enabled {
  background: linear-gradient(148deg,
    rgba(62, 207, 142, 0.10) 0%,
    rgba(43, 217, 217, 0.04) 45%,
    rgba(9, 8, 6, 0.52) 100%);
  border-color: rgba(62, 207, 142, 0.36);
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.04) inset, var(--glow-green);
}
.layer-card-head {
  padding: 12px 13px;
  min-height: 54px;
}
.layer-card-head strong {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--color-text);
}
.layer-card-head small {
  font-size: 0.57rem;
  color: rgba(107, 102, 92, 0.85);
  margin-top: 3px;
}
.layer-card-body {
  padding: 0 13px 13px;
  border-top-color: rgba(255, 255, 255, 0.04);
}

/* Toggle switch */
.switch-label span {
  background: rgba(18, 16, 13, 0.95);
  border-color: rgba(232, 228, 220, 0.20);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
}
.switch-label span::after {
  background: var(--color-subtle);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
  transition: transform 180ms var(--ease-spring), background 160ms ease;
}
.switch-label input:checked + span {
  background: linear-gradient(90deg,
    rgba(62, 207, 142, 0.45) 0%,
    rgba(43, 217, 217, 0.72) 100%);
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(62, 207, 142, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.switch-label input:checked + span::after {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

/* Settings & opacity */
.settings-toggle {
  background: rgba(7, 6, 5, 0.52);
  border-color: rgba(232, 228, 220, 0.10);
  font-size: 0.61rem;
  letter-spacing: 0.11em;
  transition: all var(--dur-fast) ease;
}
.settings-toggle:hover {
  color: var(--color-accent-cyan);
  border-color: rgba(43, 217, 217, 0.36);
  background: rgba(43, 217, 217, 0.06);
}
.layer-settings {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(232, 228, 220, 0.07);
  border-radius: 12px;
}

/* Card selects */
.card-select span {
  font-size: 0.63rem;
  letter-spacing: 0.09em;
}
select {
  background: rgba(9, 8, 6, 0.72);
  border-color: rgba(232, 228, 220, 0.12);
  border-radius: 9px;
  font-size: 0.74rem;
  transition: border-color var(--dur-fast) ease;
}
select:hover { border-color: rgba(232, 228, 220, 0.22); }
select:focus { border-color: rgba(62, 207, 142, 0.44); outline: none; box-shadow: 0 0 0 2px rgba(62, 207, 142, 0.08); }

/* Bookmark / preset / tool grid buttons */
.bookmark-grid button,
.preset-grid button,
.tool-grid button,
.location-tools button {
  font-size: 0.67rem;
  border-radius: 10px;
  padding: 9px 8px;
  background: rgba(9, 8, 6, 0.55);
  border-color: rgba(232, 228, 220, 0.09);
  transition: all var(--dur-fast) var(--ease-crisp);
}
.bookmark-grid button:hover,
.preset-grid button:hover,
.tool-grid button:hover,
.location-tools button:hover {
  color: var(--color-accent);
  border-color: rgba(62, 207, 142, 0.38);
  background: rgba(62, 207, 142, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
.preset-grid button.active {
  background: linear-gradient(135deg, rgba(62, 207, 142, 0.20), rgba(43, 217, 217, 0.13));
  border-color: rgba(62, 207, 142, 0.46);
  color: var(--color-accent);
  box-shadow: 0 0 12px rgba(62, 207, 142, 0.14);
}

/* Satellite date stepper */
.sat-date-row button {
  background: rgba(9, 8, 6, 0.60);
  border-color: rgba(232, 228, 220, 0.12);
  border-radius: 9px;
  transition: all var(--dur-fast) ease;
}
.sat-date-row button:hover { border-color: rgba(62, 207, 142, 0.38); color: var(--color-accent); }
.sat-date-row #satellite-date-label {
  background: rgba(7, 6, 5, 0.58);
  border-color: rgba(232, 228, 220, 0.09);
  border-radius: 9px;
}


/* ── SECTION 9: TOOLS PANEL ───────────────────────────────── */
.tools-panel {
  background:
    linear-gradient(175deg,
      rgba(14, 13, 10, 0.94) 0%,
      rgba(10, 9, 7, 0.92) 100%);
  border-color: rgba(232, 228, 220, 0.10);
}
.measure-readout {
  background: rgba(7, 6, 5, 0.60);
  border-color: rgba(232, 228, 220, 0.08);
  border-radius: 11px;
  font-size: 0.70rem;
  line-height: 1.5;
}
.watchpoint-card button:first-child {
  border-radius: 9px;
  background: rgba(9, 8, 6, 0.55);
  border-color: rgba(232, 228, 220, 0.10);
  font-size: 0.72rem;
}


/* ── SECTION 10: TIMELINE ─────────────────────────────────── */

#timeline.timeline {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
  /* Width: fills the map gap between both side panels */
  width: min(640px, calc(100vw - (var(--stratus-left-width, 385px) + var(--stratus-right-width, 385px) + 80px))) !important;
  min-width: 320px !important;
  /* Align bottom with panel-bottom clearance */
  bottom: calc(var(--stratus-panel-bottom, 76px) - 52px) !important;
  background: rgba(11, 10, 8, 0.96) !important;
  border-color: rgba(232, 228, 220, 0.09) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.60),
    0 1px 0 rgba(232, 228, 220, 0.05) !important;
}

/* Play/pause — circle, no border-style button */
.tl-btn--play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3ecf8e 0%, #2bd9d9 100%);
  border: none;
  color: #071510;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(62,207,142,0.22);
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.tl-btn--play:hover { transform: scale(1.08); box-shadow: 0 3px 14px rgba(62,207,142,0.40); }
.tl-btn--play:active { transform: scale(0.94); }

.tl-icon { width: 7px; height: 9px; display: block; flex: 0 0 auto; }

/* Icon swap */
.tl-btn--play .icon-pause                     { display: none;  }
.tl-btn--play[data-playing="true"] .icon-play  { display: none;  }
.tl-btn--play[data-playing="true"] .icon-pause { display: block; }

/* Scrubber: progress bar + timestamp stacked */
.tl-scrubber {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

/* Range input — no thumb, just a clean fill bar */
#timeline-slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0; padding: 0;
  background: linear-gradient(to right,
    rgba(62,207,142,0.75) 0%,
    rgba(62,207,142,0.75) var(--tl-pct, 0%),
    rgba(232,228,220,0.10) var(--tl-pct, 0%),
    rgba(232,228,220,0.10) 100%
  );
}
/* Hide thumb completely */
#timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0; height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
#timeline-slider::-moz-range-thumb {
  width: 0; height: 0;
  background: transparent;
  border: none;
}
#timeline-slider::-webkit-slider-runnable-track { background: transparent; height: 3px; }
#timeline-slider::-moz-range-track { background: rgba(232,228,220,0.10); height: 3px; border-radius: 2px; }
#timeline-slider::-moz-range-progress { background: rgba(62,207,142,0.75); height: 3px; }

/* Timestamp */
.tl-timestamp {
  font: 0.60rem/1 var(--font-mono);
  color: rgba(232,228,220,0.45);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tl-timestamp.is-loading {
  background: linear-gradient(90deg,
    rgba(232,228,220,0.12) 0%, rgba(232,228,220,0.40) 50%, rgba(232,228,220,0.12) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: tl-shimmer 2s linear infinite;
}
@keyframes tl-shimmer {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}

/* Remove all dead LIVE/dot/badge/sep/frame-count CSS */
.tl-live-btn, .tl-live-dot, .tl-dot,
.tl-mode-badge, .tl-sep, .tl-frame-count,
.tl-btn:not(.tl-btn--play), .tl-transport { display: none !important; }

/* LIVE button dead — keeping keyframe for dot animation if re-enabled */
@keyframes tl-dot-pulse {
  0%, 100% { opacity: 0.30; transform: scale(0.75); }
  50%       { opacity: 1.00; transform: scale(1.25); }
}
@keyframes tl-live-blink {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1.00; }
}

/* ── LIVE/mode/badge stubs (removed from HTML, CSS kept for safety) ── */
/* .tl-live-btn removed — mode shown via progress fill color */
/* .tl-mode-badge removed — redundant */
/* Old LIVE button styles below are now dead: */
.tl-live-btn {
  flex: 0 0 auto;
  display: none !important;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 5px;
  font: 700 0.56rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease,
              color 120ms ease, box-shadow 120ms ease;
  /* Archive mode: bright actionable green — "click to go live" */
  background: rgba(62,207,142,0.14);
  border: 1px solid rgba(62,207,142,0.40);
  color: rgba(62,207,142,0.95);
  box-shadow: 0 0 8px rgba(62,207,142,0.12);
}
.tl-live-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  box-shadow: none;
}
.tl-live-btn:not(:disabled):hover {
  background: rgba(62,207,142,0.22);
  border-color: rgba(62,207,142,0.60);
  box-shadow: 0 0 12px rgba(62,207,142,0.22);
}

/* Dot */
/* Already-live state: on latest frame — dim button, dot still pulses */
.tl-live-btn[data-live="true"] {
  background: rgba(62,207,142,0.06);
  border-color: rgba(62,207,142,0.18);
  color: rgba(62,207,142,0.45);
  box-shadow: none;
}
@keyframes tl-live-blink {
  0%, 100% { opacity: 0.55; box-shadow: 0 0 3px rgba(62,207,142,0.35); }
  50%       { opacity: 1.00; box-shadow: 0 0 8px rgba(62,207,142,0.75); }
}


/* ── SECTION 11: FORECAST PANEL ───────────────────────────── */
.forecast-panel {
  background:
    linear-gradient(160deg,
      rgba(14, 13, 10, 0.96) 0%,
      rgba(10, 9, 7, 0.94) 100%);
  border-color: rgba(232, 228, 220, 0.11);
}
.forecast-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--color-hairline);
}
.forecast-panel h2 {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  margin: 0;
}
.forecast-panel .forecast-panel-header small {
  display: block;
  margin-top: 3px;
  color: var(--color-subtle);
  font: 0.60rem var(--font-mono);
}
.forecast-panel-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}
.forecast-panel-actions button {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(232, 228, 220, 0.11);
  background: rgba(9, 8, 6, 0.55);
  color: var(--color-muted);
  font: 0.60rem var(--font-mono);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}
.forecast-panel-actions button:hover { color: var(--color-accent); border-color: rgba(62, 207, 142, 0.36); }
#forecast-close { width: 28px; padding: 0; font-size: 1.1rem; line-height: 1; }

.current-grid div {
  background: rgba(16, 15, 11, 0.65);
  border: 1px solid rgba(232, 228, 220, 0.07);
  border-radius: 12px;
  transition: border-color var(--dur-fast) ease;
}
.current-grid div:hover { border-color: rgba(232, 228, 220, 0.14); }
.current-grid span {
  font-size: 0.54rem;
  letter-spacing: 0.09em;
  margin-bottom: 4px;
  color: var(--color-subtle);
}
.current-grid strong {
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}
.forecast-period {
  border-radius: 11px;
  border-color: rgba(232, 228, 220, 0.07);
  background: rgba(15, 14, 11, 0.58);
  transition: border-color var(--dur-fast) ease;
}
.forecast-period:hover { border-color: rgba(232, 228, 220, 0.14); }
.forecast-period strong { font-size: 0.76rem; }
.forecast-period span { font-size: 0.78rem; }
.forecast-period small { font-size: 0.66rem; }
.forecast-alert {
  border-radius: 10px;
  border-left-width: 3px;
}
.forecast-card h3 {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--color-accent-cyan);
}


/* ── SECTION 12: LEGEND PANEL ─────────────────────────────── */
.legend-panel {
  background:
    linear-gradient(160deg,
      rgba(14, 13, 10, 0.96) 0%,
      rgba(10, 9, 7, 0.94) 100%);
  border-color: rgba(232, 228, 220, 0.11);
}
.legend-header {
  background: rgba(17, 15, 12, 0.68);
}
.legend-header h2 {
  font-size: 0.66rem;
  letter-spacing: 0.17em;
}
.legend-section h3 {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(107, 102, 92, 0.78);
  margin-bottom: 7px;
}
.legend-item {
  font-size: 0.67rem;
  gap: 7px;
}
.legend-swatch {
  width: 12px;
  height: 12px;
}
.legend-gradient {
  height: 10px;
  border-radius: 5px;
  /* Meteorological dBZ reflectivity scale */
  background: linear-gradient(90deg,
    #00d4ff 0%,
    #008899 10%,
    #00aa44 20%,
    #00cc00 32%,
    #aadd00 44%,
    #ffff00 54%,
    #ff8800 66%,
    #ff3300 78%,
    #ff44ff 90%,
    #ffffff 100%
  );
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.legend-gradient-wind {
  border-radius: 5px;
  background: linear-gradient(90deg,
    #2BD9D9 0%,
    #3ECF8E 22%,
    #C9D66E 42%,
    #FFB454 62%,
    #FF6E40 82%,
    #FF4D4D 100%
  );
}
.legend-scale {
  font-size: 0.56rem;
  color: rgba(107, 102, 92, 0.72);
  margin-top: 3px;
}


/* ── SECTION 13: ANALYSIS TOOLS PANEL ────────────────────── */

/* Override bundle's display:grid gap (too large) */
#tools-panel { gap: 0 !important; padding: 10px 10px 12px !important; }
/* Remove bundle diagnostics-body max-height — outer panel scrolls */
.tools-panel .diagnostics-body { max-height: none !important; overflow: visible !important; }
/* Remove bundle's extra tool-grid margin */
.tools-panel .tool-grid { margin-top: 0 !important; }

/* ── Panel titlebar ──────────────────────────────────────── */
.at-titlebar {
  display: flex !important;
  align-items: center !important;
  padding: 0 2px 8px !important;
  border-bottom: 1px solid rgba(232, 228, 220, 0.07) !important;
  margin-bottom: 8px !important;
}
.at-title-text { display: flex !important; flex-direction: column !important; gap: 1px !important; }
.at-title-label {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(232, 228, 220, 0.92) !important;
  font-family: var(--font-mono) !important;
}
.at-title-sub {
  font-size: 0.54rem !important;
  letter-spacing: 0.10em !important;
  color: rgba(107, 114, 128, 0.70) !important;
  font-family: var(--font-mono) !important;
}

/* ── Diagnostics card ────────────────────────────────────── */
#diagnostics {
  border: 1px solid rgba(232, 228, 220, 0.08) !important;
  border-radius: 8px !important;
  background: rgba(8, 7, 5, 0.55) !important;
  overflow: hidden !important;
  margin-bottom: 8px !important;
}
.diagnostics-header {
  background: rgba(16, 14, 10, 0.80) !important;
  border-bottom: 1px solid rgba(232, 228, 220, 0.06) !important;
  padding: 6px 9px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  user-select: none !important;
  border-radius: 8px 8px 0 0 !important;
}
.diagnostics.collapsed .diagnostics-header {
  border-radius: 8px !important;
  border-bottom-color: transparent !important;
}
.diag-header-title {
  font-size: 0.62rem !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: rgba(232, 228, 220, 0.88) !important;
  flex: 1 !important;
}
.diag-health-dot {
  width: 6px !important; height: 6px !important;
  border-radius: 50% !important; flex-shrink: 0 !important;
  background: rgba(107,114,128,0.60) !important;
  transition: background 400ms ease, box-shadow 400ms ease !important;
}
.diag-health-dot[data-health="healthy"]  { background: #3ecf8e !important; box-shadow: 0 0 5px rgba(62,207,142,0.70) !important; animation: v34-pulse 2.4s ease infinite !important; }
.diag-health-dot[data-health="degraded"] { background: #f59e0b !important; box-shadow: 0 0 5px rgba(245,158,11,0.60) !important; }
.diag-health-dot[data-health="offline"]  { background: #f87171 !important; box-shadow: 0 0 5px rgba(248,113,113,0.60) !important; }
.diag-health-dot[data-health="booting"]  { background: rgba(107,114,128,0.50) !important; animation: v34-shimmer 1.8s ease infinite !important; }
.diag-live {
  font-size: 0.48rem !important; font-family: var(--font-mono) !important;
  letter-spacing: 0.18em !important; color: #3ecf8e !important;
  opacity: 0.75 !important; text-transform: uppercase !important;
}
.diag-collapse-btn {
  background: rgba(0,0,0,0.25) !important; border: none !important;
  border-radius: 4px !important; padding: 1px 5px !important;
  font-size: 0.65rem !important; line-height: 1.3 !important;
  color: rgba(232,228,220,0.50) !important; cursor: pointer !important;
}
.diagnostics.collapsed .diagnostics-body { display: none !important; }

/* Diagnostics body */
.diagnostics-body { padding: 6px 9px 8px !important; }

/* Group label */
.diag-group-label {
  font-size: 0.50rem !important; font-family: var(--font-mono) !important;
  letter-spacing: 0.16em !important; text-transform: uppercase !important;
  color: rgba(107,114,128,0.60) !important;
  margin: 5px 0 3px !important; padding: 0 !important;
  border: none !important;
}
.diag-group-label:first-child { margin-top: 0 !important; }

/* 2-col status grid */
.diag-status-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 3px !important;
  margin-bottom: 2px !important;
}
.diag-cell {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  background: rgba(20,18,14,0.50) !important;
  border: 1px solid rgba(232,228,220,0.05) !important;
  border-radius: 5px !important;
  padding: 4px 6px !important;
}
.diag-cell-key {
  font-size: 0.50rem !important; font-family: var(--font-mono) !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important;
  color: rgba(107,114,128,0.65) !important; line-height: 1 !important;
}
.diag-cell-val {
  font-size: 0.62rem !important; font-family: var(--font-mono) !important;
  color: rgba(232,228,220,0.60) !important; line-height: 1.2 !important;
  font-weight: 500 !important;
}
/* Status colors WIN via !important on [data-state] */
#diagnostics [data-state="healthy"]  { color: #3ecf8e !important; }
#diagnostics [data-state="ready"]    { color: #3ecf8e !important; }
#diagnostics [data-state="degraded"] { color: #f59e0b !important; }
#diagnostics [data-state="warning"]  { color: #f59e0b !important; }
#diagnostics [data-state="offline"]  { color: #f87171 !important; }
#diagnostics [data-state="error"]    { color: #f87171 !important; }
#diagnostics [data-state="pending"]  { color: rgba(107,114,128,0.65) !important; }
#diagnostics [data-state="booting"]  { color: rgba(107,114,128,0.65) !important; animation: v34-shimmer 2s ease infinite !important; }

/* Telemetry metrics strip (3-col) */
.diag-metrics-row {
  display: grid !important; grid-template-columns: 1fr 1fr 1fr !important;
  gap: 3px !important; margin-bottom: 3px !important;
}
.diag-metric {
  display: flex !important; flex-direction: column !important; gap: 1px !important;
  background: rgba(20,18,14,0.50) !important;
  border: 1px solid rgba(232,228,220,0.05) !important;
  border-radius: 5px !important; padding: 4px 5px !important;
}
.diag-metric-key {
  font-size: 0.48rem !important; font-family: var(--font-mono) !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important;
  color: rgba(107,114,128,0.60) !important; line-height: 1 !important;
}
.diag-metric-val {
  font-size: 0.66rem !important; font-family: var(--font-mono) !important;
  color: rgba(232,228,220,0.85) !important; font-weight: 600 !important; line-height: 1.2 !important;
}

/* Sync timestamps row */
.diag-sync-row {
  display: grid !important; grid-template-columns: 1fr 1fr !important;
  gap: 3px !important; margin-bottom: 3px !important;
}
.diag-sync-item {
  display: flex !important; flex-direction: column !important; gap: 1px !important;
  padding: 3px 5px !important;
  background: rgba(20,18,14,0.35) !important;
  border: 1px solid rgba(232,228,220,0.04) !important;
  border-radius: 4px !important;
}
.diag-sync-key {
  font-size: 0.46rem !important; font-family: var(--font-mono) !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important;
  color: rgba(107,114,128,0.55) !important; line-height: 1 !important;
}
.diag-sync-val {
  font-size: 0.58rem !important; font-family: var(--font-mono) !important;
  color: rgba(232,228,220,0.65) !important; line-height: 1.2 !important;
}

/* Position row (full width) */
.diag-pos-row {
  display: flex !important; justify-content: space-between !important;
  align-items: center !important;
  padding: 3px 5px !important;
  background: rgba(20,18,14,0.35) !important;
  border: 1px solid rgba(232,228,220,0.04) !important;
  border-radius: 4px !important;
}
.diag-pos-row .diag-sync-key { font-size: 0.48rem !important; }
.diag-pos-row .diag-sync-val { font-size: 0.60rem !important; }

/* ── Map Tools section ───────────────────────────────────── */
.at-tools-section {
  border-top: 1px solid rgba(232,228,220,0.07) !important;
  padding-top: 7px !important;
}
.tool-row-label {
  font-size: 0.48rem !important; font-family: var(--font-mono) !important;
  letter-spacing: 0.14em !important; text-transform: uppercase !important;
  color: rgba(107,114,128,0.55) !important;
  margin: 5px 0 3px !important;
}
.tool-row-label:first-of-type { margin-top: 2px !important; }

/* 4-col and 2-col tool button grids */
.tool-grid-4 {
  display: grid !important; grid-template-columns: repeat(4, 1fr) !important;
  gap: 3px !important; margin-bottom: 2px !important;
}
.tool-grid-2 {
  display: grid !important; grid-template-columns: 1fr 1fr !important;
  gap: 3px !important; margin-bottom: 2px !important;
}
.tool-btn {
  font-size: 0.60rem !important; font-family: var(--font-mono) !important;
  padding: 5px 4px !important; border-radius: 5px !important;
  background: rgba(18,16,12,0.80) !important;
  border: 1px solid rgba(232,228,220,0.08) !important;
  color: rgba(232,228,220,0.75) !important;
  cursor: pointer !important; text-align: center !important;
  letter-spacing: 0.03em !important; white-space: nowrap !important;
  overflow: hidden !important; text-overflow: ellipsis !important;
  transition: background 90ms ease, border-color 90ms ease, color 90ms ease !important;
}
.tool-btn:hover {
  background: rgba(38,34,26,0.95) !important;
  border-color: rgba(232,228,220,0.18) !important;
  color: rgba(232,228,220,1) !important;
}
.tool-btn:active { background: rgba(62,207,142,0.10) !important; border-color: rgba(62,207,142,0.28) !important; }
.tool-btn--toggle.active {
  background: rgba(62,207,142,0.14) !important;
  border-color: rgba(62,207,142,0.38) !important;
  color: #3ecf8e !important;
}

/* Measure readout */
.measure-readout {
  font-size: 0.56rem !important; font-family: var(--font-mono) !important;
  color: rgba(107,114,128,0.75) !important;
  padding: 2px 2px 5px !important; min-height: 16px !important;
  background: none !important; border: none !important;
}

/* Watchpoints */
.watchpoint-list {
  font-size: 0.58rem !important; font-family: var(--font-mono) !important;
  color: rgba(107,114,128,0.75) !important; margin-top: 3px !important;
}
.watchpoint-card {
  display: flex !important; align-items: center !important;
  gap: 4px !important; padding: 2px 0 !important;
}
.watchpoint-card button[data-watch-zoom] {
  flex: 1 !important; text-align: left !important;
  font-size: 0.58rem !important; font-family: var(--font-mono) !important;
  color: rgba(232,228,220,0.68) !important;
  background: none !important; border: none !important;
  cursor: pointer !important; padding: 1px 0 !important;
}
.watchpoint-card button[data-watch-zoom]:hover { color: #3ecf8e !important; }
.watchpoint-card button[data-watch-remove] {
  font-size: 0.68rem !important; color: rgba(248,113,113,0.55) !important;
  background: none !important; border: none !important;
  cursor: pointer !important; padding: 0 2px !important; line-height: 1 !important;
}
.watchpoint-card button[data-watch-remove]:hover { color: #f87171 !important; }


/* ── SECTION 14: API KEYS PANEL ──────────────────────────── */
.at-api-keys-section {
  border-top: 1px solid rgba(232,228,220,0.07) !important;
  padding-top: 10px !important;
  margin-top: 4px !important;
}
.at-api-note {
  font-size: 0.56rem !important;
  color: rgba(232,228,220,0.38) !important;
  line-height: 1.5 !important;
  margin: 0 0 10px !important;
  letter-spacing: 0.01em !important;
}
.api-key-row {
  margin-bottom: 10px !important;
  padding: 7px 8px !important;
  border-radius: 6px !important;
  background: rgba(20,18,14,0.45) !important;
  border: 1px solid rgba(232,228,220,0.06) !important;
}
.api-key-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 5px !important;
}
.api-key-provider {
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  color: rgba(232,228,220,0.72) !important;
  flex: 1 !important;
}
.api-key-status {
  font-size: 0.52rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  color: rgba(107,114,128,0.55) !important;
  font-family: var(--font-mono, monospace) !important;
  transition: color 150ms ease !important;
}
.api-key-status[data-state="active"] {
  color: #3ecf8e !important;
}
.api-key-signup {
  font-size: 0.51rem !important;
  color: rgba(62,207,142,0.55) !important;
  text-decoration: none !important;
  letter-spacing: 0.05em !important;
  transition: color 120ms ease !important;
  white-space: nowrap !important;
}
.api-key-signup:hover { color: #3ecf8e !important; }
.api-key-input-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-bottom: 4px !important;
}
.api-key-input {
  flex: 1 !important;
  height: 24px !important;
  padding: 0 7px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(232,228,220,0.09) !important;
  background: rgba(8,7,5,0.65) !important;
  color: rgba(232,228,220,0.80) !important;
  font-size: 0.58rem !important;
  font-family: var(--font-mono, monospace) !important;
  letter-spacing: 0.02em !important;
  outline: none !important;
  min-width: 0 !important;
  transition: border-color 120ms ease !important;
}
.api-key-input:focus {
  border-color: rgba(62,207,142,0.30) !important;
}
.api-key-input::placeholder {
  color: rgba(232,228,220,0.20) !important;
  font-size: 0.56rem !important;
}
.api-key-save {
  flex: 0 0 auto !important;
  height: 24px !important;
  padding: 0 10px !important;
  border-radius: 4px !important;
  font-size: 0.54rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  background: rgba(62,207,142,0.14) !important;
  border: 1px solid rgba(62,207,142,0.28) !important;
  color: #3ecf8e !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background 110ms ease, border-color 110ms ease !important;
}
.api-key-save:hover {
  background: rgba(62,207,142,0.24) !important;
  border-color: rgba(62,207,142,0.50) !important;
}
.api-key-hint {
  font-size: 0.50rem !important;
  color: rgba(232,228,220,0.28) !important;
  letter-spacing: 0.02em !important;
  line-height: 1.4 !important;
  display: block !important;
}


/* ── SECTION 14b: ALERT SUMMARY POPOVER ──────────────────── */
.alert-summary-toggle {
  transition: all var(--dur-med) ease;
}
.alert-summary-toggle:hover,
.alert-summary-toggle[aria-expanded="true"] {
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.25),
    0 0 14px rgba(62, 207, 142, 0.14);
}
.alert-summary-popover {
  background:
    linear-gradient(160deg,
      rgba(14, 13, 10, 0.98) 0%,
      rgba(10, 9, 7, 0.97) 100%);
  border-color: rgba(232, 228, 220, 0.12);
  border-radius: 18px;
  box-shadow:
    0 30px 76px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.alert-summary-heading strong {
  font-size: 0.70rem;
  letter-spacing: 0.14em;
  color: var(--color-text);
}
.alert-summary-heading small { font-size: 0.65rem; }
.alert-last-updated {
  display: block;
  font-size: 0.60rem;
  color: rgba(232, 228, 220, 0.38);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.alert-refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  background: transparent;
  border: 1px solid rgba(232, 228, 220, 0.12);
  border-radius: 6px;
  color: rgba(232, 228, 220, 0.55);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  flex-shrink: 0;
  margin-right: 4px;
}
.alert-refresh-btn:hover {
  color: var(--color-accent);
  border-color: rgba(62, 207, 142, 0.38);
}
.alert-refresh-btn.spinning {
  animation: spin-refresh 0.8s linear infinite;
}
.alert-heading-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
@keyframes spin-refresh {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.alert-summary-popover .metric {
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(9, 8, 6, 0.45);
  transition: all var(--dur-fast) ease;
}
.alert-summary-popover .metric:hover {
  border-color: rgba(232, 228, 220, 0.15);
  background: rgba(14, 13, 10, 0.60);
}
.alert-summary-popover .metric.has-active {
  border-color: rgba(62, 207, 142, 0.28);
  background: rgba(62, 207, 142, 0.07);
}
.alert-summary-popover .metric.has-active:hover {
  border-color: rgba(62, 207, 142, 0.42);
  box-shadow: var(--glow-green);
}
.popover-close { border-radius: 9px; }
.popover-close:hover { color: var(--color-accent); border-color: rgba(62, 207, 142, 0.38); }


/* ── SECTION 15: PICK / POINT POPUP ──────────────────────── */
.pick-popup .pick-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(232, 228, 220, 0.07);
  margin-bottom: 10px;
}
.pick-popup .pick-grid > div {
  background: rgba(16, 15, 11, 0.60);
  border: 1px solid rgba(232, 228, 220, 0.06);
  border-radius: 9px;
  padding: 7px 8px;
}
.pick-popup .pick-grid strong { font-size: 14px; }
.pick-popup .pick-watch {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-accent-strong) 0%, var(--color-accent) 100%);
  font-weight: 800;
  letter-spacing: 0.10em;
  box-shadow: 0 2px 10px rgba(62, 207, 142, 0.24);
  transition: filter var(--dur-fast) ease;
}


/* ── SECTION 16: SHORTCUTS OVERLAY ───────────────────────── */
.shortcuts-overlay { backdrop-filter: blur(4px); }
.shortcuts-card {
  border-radius: 16px;
  background: rgba(13, 12, 10, 0.98);
  border-color: rgba(232, 228, 220, 0.13);
  box-shadow:
    0 36px 88px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}
.shortcuts-head { border-bottom-color: rgba(232, 228, 220, 0.08); }
.shortcuts-list kbd {
  background: rgba(24, 22, 17, 0.85);
  border-color: rgba(232, 228, 220, 0.18);
  border-radius: 5px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(232, 228, 220, 0.06);
}
.shortcuts-list > div {
  padding: 7px 0;
  border-bottom-color: rgba(232, 228, 220, 0.04);
  transition: background var(--dur-fast) ease;
}
.shortcuts-list > div:hover { background: rgba(232, 228, 220, 0.02); border-radius: 6px; }


/* ── SECTION 17: TOAST NOTIFICATIONS ─────────────────────── */
.toast {
  border-radius: 11px;
  background: rgba(16, 15, 12, 0.98);
  border-left-width: 3px;
  font-size: 0.75rem;
  line-height: 1.48;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1.00); }
}


/* ── SECTION 18: LEAFLET MAP POPUPS ──────────────────────── */
.leaflet-popup-content-wrapper {
  background: rgba(13, 12, 10, 0.98) !important;
  border: 1px solid rgba(232, 228, 220, 0.13) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255,255,255,0.03) inset !important;
}
.leaflet-popup-tip {
  background: rgba(13, 12, 10, 0.98) !important;
}
.leaflet-popup-close-button {
  color: var(--color-muted) !important;
  font-size: 16px !important;
  top: 10px !important;
  right: 10px !important;
}
/* Constrain warning polygon popups — NWS text can be several paragraphs */
.leaflet-popup-content {
  max-height: 52vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.28) transparent;
}
/* Weather-alert popup: cap the description block specifically */
.weather-popup > div {
  max-height: 28vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.22) transparent;
}


/* ── SECTION 19: SCROLLBARS ───────────────────────────────── */
.alert-list,
.layer-panel,
.forecast-panel,
.legend-body,
.shortcuts-card,
.watchpoint-list,
.alert-summary-popover .ticker-metrics,
#alert-detail-drawer .add-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.28) transparent;
}

/* Prevent scroll from bleeding out of panels into the map or page.
 * overscroll-behavior: contain keeps wheel/touch scroll local to each panel. */
.alert-list,
.layer-panel,
#alert-detail-drawer .add-body {
  overscroll-behavior: contain;
}
.alert-list::-webkit-scrollbar,
.layer-panel::-webkit-scrollbar,
.forecast-panel::-webkit-scrollbar,
.legend-body::-webkit-scrollbar { width: 4px; }
.alert-list::-webkit-scrollbar-track,
.layer-panel::-webkit-scrollbar-track { background: transparent; }
.alert-list::-webkit-scrollbar-thumb,
.layer-panel::-webkit-scrollbar-thumb,
.forecast-panel::-webkit-scrollbar-thumb,
.legend-body::-webkit-scrollbar-thumb {
  background: rgba(62, 207, 142, 0.26);
  border-radius: 2px;
}
.alert-list::-webkit-scrollbar-thumb:hover,
.layer-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(62, 207, 142, 0.46);
}


/* ── SECTION 20: FOCUS + ACCESSIBILITY ───────────────────── */
:focus-visible {
  outline: 2px solid rgba(62, 207, 142, 0.60);
  outline-offset: 2px;
}
.switch-label input:focus-visible + span {
  outline: 2px solid rgba(62, 207, 142, 0.60);
  outline-offset: 2px;
}
.alert-card:focus-visible {
  outline: 2px solid rgba(62, 207, 142, 0.50);
  outline-offset: 1px;
}
.empty-state {
  padding: 28px 16px;
  font-size: 0.78rem;
  line-height: 1.55;
}


/* ── SECTION 21: RESPONSIVE + MOBILE ─────────────────────── */

/* ── Large display breakpoints (QHD / 4K) ─────────────────── */

/* 2560px+ (QHD) — wider panels, more breathing room */
@media (min-width: 2560px) {
  :root {
    --stratus-left-width:   clamp(380px, 18vw, 480px);
    --stratus-right-width:  clamp(380px, 18vw, 480px);
    --stratus-panel-top:    90px;
    --stratus-panel-bottom: 84px;
    --stratus-edge:         18px;
  }
}

/* 1920px (FHD/1080p) — comfortable balanced widths */
@media (min-width: 1920px) and (max-width: 2559px) {
  :root {
    --stratus-left-width:   clamp(340px, 20vw, 420px);
    --stratus-right-width:  clamp(340px, 20vw, 420px);
    --stratus-edge:         16px;
  }
}

/* 1481–1919px — standard desktop */
@media (min-width: 1481px) and (max-width: 1919px) {
  :root {
    --stratus-left-width:   clamp(300px, 22vw, 385px);
    --stratus-right-width:  clamp(300px, 22vw, 385px);
  }
}

/* 1480px — trim header overflow */
@media (max-width: 1480px) {
  .source-health { display: none !important; }
  .clock-local   { display: none !important; }
  .clock-utc     { font-size: 0.72rem !important; }
}

/* 1360px — hide search pill */
@media (max-width: 1360px) {
  .top-search-group { display: none !important; }
}

/* 1180px — collapse nav to hamburger */
@media (max-width: 1180px) {
  .top-actions   { display: none !important; }
  .ticker-clock  { display: none !important; }
  .mobile-control-toggle {
    display:         inline-flex !important;
    align-items:     center !important;
    justify-content: center !important;
    width:           36px !important;
    height:          36px !important;
    border-radius:   8px !important;
    font-size:       1.05rem !important;
    flex-shrink:     0 !important;
  }
}

/* 1180px gap fix — hamburger can open layer panel even when hidden class is set */
@media (min-width: 981px) and (max-width: 1180px) {
  body.control-panel-open #layer-panel,
  body.control-panel-open #layer-panel.hidden {
    display:   block !important;
    transform: none !important;
  }
}

/* 980px — mobile slide-in panel mode */
@media (max-width: 980px) {
  /* Layer panel: always block, hide/show via transform only */
  #layer-panel,
  #layer-panel.hidden {
    display:       block !important;   /* override display:none */
    position:      fixed !important;
    top:           0 !important;
    bottom:        0 !important;
    right:         0 !important;
    left:          auto !important;
    width:         min(88vw, 380px) !important;
    max-height:    100vh !important;
    border-radius: 0 !important;
    z-index:       1600 !important;
    transform:     translateX(calc(100% + 4px));
    transition:    transform 220ms cubic-bezier(0.20, 0, 0.40, 1);
    overflow-y:    auto;
  }
  body.control-panel-open #layer-panel,
  body.control-panel-open #layer-panel.hidden {
    transform: translateX(0) !important;
  }

  /* Mobile scrim — darken map when panel is open */
  #mobile-control-scrim {
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(2px) !important;
  }

  /* Tools panel: hidden on mobile (no trigger) */
  #tools-panel { display: none !important; }

  /* Forecast: full-width at bottom */
  #forecast-panel,
  .forecast-panel {
    left:       8px !important;
    right:      8px !important;
    bottom:     76px !important;
    top:        auto !important;
    width:      auto !important;
    min-width:  unset !important;
    max-height: 45vh !important;
    resize:     none !important;
    z-index:    1200 !important;
  }

  /* Timeline: full width */
  #timeline.timeline {
    width: calc(100vw - 16px) !important;
    max-width: none !important;
  }

  /* Hide alert summary on mobile (use sidebar instead) */
  .alert-summary-host { display: none !important; }
  .brand-block small  { display: none !important; }
}

/* 640px — phone-sized adjustments */
@media (max-width: 640px) {
  /* Header: strip to brand + hamburger only */
  .topbar-status-zone { display: none !important; }
  .live-dot { display: none !important; }
  .top-ticker {
    padding: 0 10px !important;
    min-height: 46px !important;
  }
  .brand-block strong { font-size: 0.72rem !important; }

  /* Play button larger touch target */
  .tl-btn--play { width: 32px !important; height: 32px !important; }

  /* Layer panel: full screen on phones */
  #layer-panel,
  #layer-panel.hidden {
    width: 100vw !important;
    border-radius: 0 !important;
  }

  /* Forecast: tighter */
  #forecast-panel,
  .forecast-panel {
    bottom: 68px !important;
    max-height: 40vh !important;
  }
}


/* ── SECTION 22: ZOOM CONTROLS ───────────────────────────── */
/* Side-by-side pill instead of stacked box */
.leaflet-control-zoom {
  display: flex !important;
  flex-direction: row !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  gap: 3px !important;
}
.leaflet-control-zoom a {
  width: 26px !important;
  height: 26px !important;
  line-height: 26px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  background: rgba(11,10,8,0.88) !important;
  border: 1px solid rgba(232,228,220,0.10) !important;
  color: rgba(232,228,220,0.60) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 100ms ease, border-color 100ms ease, color 100ms ease !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.40) !important;
  text-decoration: none !important;
}
.leaflet-control-zoom a:hover {
  background: rgba(30,28,22,0.96) !important;
  border-color: rgba(62,207,142,0.32) !important;
  color: rgba(62,207,142,0.90) !important;
}
/* Kill the border between stacked items (no longer needed) */
.leaflet-control-zoom-in  { border-bottom: none !important; }
.leaflet-control-zoom-out { border-top: none !important; }

/* ── SECTION 24: ANIMATIONS ───────────────────────────────── */
@keyframes v34-shimmer {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 0.80; }
}
@keyframes v34-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(62, 207, 142, 0.18); }
  50%       { box-shadow: 0 0 20px rgba(62, 207, 142, 0.44); }
}


/* ── SECTION 23: TOOLS PANEL — RIGHT COLUMN (2K LAYOUT) ────── */
/*
 * Tools panel shares the RIGHT column with the layer panel.
 * They are mutually exclusive (opening one closes the other).
 * Alerts sidebar stays permanently in the LEFT column.
 */
#tools-panel {
  /* Match layer-panel's right-side position from v26 */
  top:    var(--stratus-panel-top,    84px);
  right:  var(--stratus-edge,         12px);
  bottom: var(--stratus-panel-bottom, 76px);
  width:  var(--stratus-right-width,  clamp(300px, 22vw, 385px));
  max-width: 390px;
  min-width: 300px;
  /* Ensure no left override bleeds in from prior layers */
  left:       auto !important;
  position:   fixed !important;
  /* Scroll within the panel, not the page */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.22) transparent;
  z-index:    1000 !important;
}

/* Hidden state — use `display:none` so it takes zero layout space */
#tools-panel.hidden {
  display: none !important;
}

/* Diagnostics state colors — defined in Section 13 with !important */


/* ── SECTION 24: SIDEBAR — PROFESSIONAL PANEL HEADER ─────────
 * The bundle puts .sidebar-toggle position:absolute;right:-34px
 * (a tab outside the panel). We restructure the heading row so
 * the toggle is a proper flex sibling: title+badge on the left,
 * collapse button on the far right — no overlapping.
 *
 * HTML: #sidebar-toggle moved inside .panel-heading-row with a
 * .sidebar-title-block wrapper around the h2 + count badge.
 * ─────────────────────────────────────────────────────────── */

/* Heading row: horizontal flex — title block + collapse button */
#sidebar .panel-heading-row {
  display:         flex !important;
  flex-direction:  row !important;
  align-items:     center !important;
  justify-content: space-between !important;
  gap:             10px;
  padding:         13px 14px 12px !important;
  margin-bottom:   0 !important;
  border-bottom:   1px solid rgba(232, 228, 220, 0.09);
}

/* Left block: title stacked over count badge */
.sidebar-title-block {
  display:        flex;
  flex-direction: column;
  gap:            5px;
  min-width:      0;
  flex:           1 1 auto;
}

#sidebar .panel-heading-row h2 {
  font-size:      0.65rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  color:          var(--color-text, #e8e4dc) !important;
  margin:         0 !important;
  line-height:    1.2;
  white-space:    normal;          /* allow wrapping in narrow panel */
}

/* Count badge — lives below the title now, no longer a flex sibling */
#sidebar #visible-warning-count {
  display:         inline-block;
  font-family:     var(--font-mono);
  font-size:       0.60rem;
  letter-spacing:  0.07em;
  font-weight:     700;
  color:           var(--color-accent, #3ecf8e);
  background:      rgba(62, 207, 142, 0.10);
  border:          1px solid rgba(62, 207, 142, 0.24);
  border-radius:   999px;
  padding:         2px 9px;
  white-space:     nowrap;
  width:           fit-content;
}

/* ── Collapse button ─────────────────────────────────────────
 * Override bundle's position:absolute / right:-34px so the
 * button sits inline inside the flex row instead of as a tab.
 * ─────────────────────────────────────────────────────────── */
#sidebar-toggle {
  position:        static !important;   /* cancel bundle's absolute */
  right:           auto !important;
  top:             auto !important;
  flex:            0 0 auto;
  align-self:      center;
  width:           28px;
  height:          28px;
  border-radius:   8px;
  border:          1px solid rgba(232, 228, 220, 0.13);
  background:      rgba(8, 7, 6, 0.38);
  color:           var(--color-muted, #6b7280);
  font-size:       0.64rem;
  cursor:          pointer;
  display:         flex !important;
  align-items:     center;
  justify-content: center;
  transition:      color 120ms ease, border-color 120ms ease, background 120ms ease;
  line-height:     1;
  font-family:     var(--font-mono);
  padding:         0;
}
#sidebar-toggle:hover {
  color:         var(--color-accent, #3ecf8e);
  border-color:  rgba(62, 207, 142, 0.40);
  background:    rgba(62, 207, 142, 0.07);
}
#sidebar-toggle:active {
  background:  rgba(62, 207, 142, 0.12);
  border-color: rgba(62, 207, 142, 0.55);
}

/* When sidebar collapses, the heading row collapses with it —
   the header "Alerts" top-bar button reopens it */
#sidebar.collapsed #sidebar-toggle { color: var(--color-accent, #3ecf8e); }


/* ── SECTION 25: ALERT-SUMMARY POPOVER — FIXED PANEL ─────────
 * The popover uses position:absolute relative to .alert-summary-host
 * inside the header. On large monitors this breaks badly — the
 * containing-block chain produces wrong coordinates.
 * Fix: position:fixed anchored to the viewport, right-column
 * width, appears just below the header. Same glass styling as
 * Map Layers / Analysis Tools. All JS wiring stays intact.
 * ─────────────────────────────────────────────────────────── */
#alert-summary-popover {
  position: fixed !important;
  top:    var(--stratus-panel-top, 84px) !important;
  right:  var(--stratus-edge, 12px) !important;
  left:   auto !important;
  bottom: auto !important;
  width:  var(--stratus-right-width, clamp(300px, 22vw, 385px));
  max-height: calc(100vh - var(--stratus-panel-top, 84px) - var(--stratus-panel-bottom, 76px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.22) transparent;
  z-index: 1800;
  /* Reinforce glass styling — some cascade layers strip it from
     nested elements inside the header */
  background:          rgba(10, 10, 9, 0.86) !important;
  backdrop-filter:     blur(18px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
  border:       1px solid rgba(232, 228, 220, 0.13) !important;
  border-radius: 17px !important;
  padding:       14px !important;
  box-shadow:    0 24px 70px rgba(0, 0, 0, 0.58) !important;
}

/* Search input inside the popover */
#alert-summary-popover .alert-search {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(232, 228, 220, 0.14);
  border-radius: 8px;
  background: rgba(8, 7, 6, 0.48);
  color: var(--color-text, #e8e4dc);
  font-family: var(--font-mono);
  font-size: 0.70rem;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 8px;
}
#alert-summary-popover .alert-search:focus {
  border-color: rgba(62, 207, 142, 0.50);
}
#alert-summary-popover .alert-search::placeholder {
  color: var(--color-muted, #4b5563);
}

/* Filter bar inside the popover */
#alert-summary-popover .alert-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  max-height: 96px;
  overflow-y: auto;
}

/* Feed status inside the popover */
#alert-summary-popover .alert-feed-status {
  font-size: 0.60rem;
  line-height: 1.4;
  color: var(--color-subtle, #6b7280);
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(232, 228, 220, 0.07);
  border-radius: 8px;
  margin-bottom: 10px;
}

/* Metrics grid — 3-column count cards (wider popover = better balance) */
#alert-summary-popover .ticker-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: none;
  overflow: visible;
  padding: 0;
}
#alert-summary-popover .metric {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(232, 228, 220, 0.08);
  border-radius: 10px;
  background: rgba(8, 7, 6, 0.34);
  cursor: pointer;
  text-align: left;
  transition: border-color 120ms, background 120ms;
}
#alert-summary-popover .metric:hover,
#alert-summary-popover .metric.has-active {
  border-color: rgba(62, 207, 142, 0.30);
  background: rgba(62, 207, 142, 0.08);
}
#alert-summary-popover .metric.total { grid-column: 1 / -1; }
#alert-summary-popover .metric strong {
  font-size: 0.84rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-accent, #3ecf8e);
  min-width: 28px;
  text-align: right;
}
#alert-summary-popover .metric span:not(.swatch) {
  font-size: 0.67rem;
  color: var(--color-text, #e8e4dc);
  opacity: 0.78;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ── Swatch color corrections — override bundle stale values ──
 * JS warning-style.js is the source of truth for category colors.
 * flood → green, hurricane → fuchsia, fire → amber, other → slate.
 * ─────────────────────────────────────────────────────────────── */
.swatch.flood     { background: #22c55e !important; color: #22c55e !important; }
.swatch.hurricane { background: #e879f9 !important; color: #e879f9 !important; }
.swatch.fire      { background: #fb923c !important; color: #fb923c !important; }
.swatch.other     { background: #64748b !important; color: #64748b !important; }

/* Hidden state — owned by wireTopPanelToggles (class swap, not attribute) */
#alert-summary-popover.hidden { display: none !important; }


/* ── SECTION 26: ALERT BEACON LAYER ─────────────────────────────
 * Each beacon is a Leaflet divIcon wrapping two spans:
 *   .ab-ring  — expanding ring that fades out (keyframe: ab-pulse)
 *   .ab-dot   — solid filled circle at center
 * Color is injected inline as --bc (beacon color) per marker.
 * Category-specific durations make tornado beacons pulse fastest.
 * ─────────────────────────────────────────────────────────────── */

/* Outer wrapper (replaces the default Leaflet icon div) */
.alert-beacon {
  position: relative;
  display: block;
  width:  24px;
  height: 24px;
  pointer-events: none;
}

/* Solid center dot */
.ab-dot {
  position: absolute;
  width:  10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bc, #60a5fa);
  top:  50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow:
    0 0 5px  var(--bc, #60a5fa),
    0 0 10px var(--bc, #60a5fa);
}

/* Expanding pulse ring */
.ab-ring {
  position: absolute;
  width:  24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bc, #60a5fa);
  top:  0;
  left: 0;
  opacity: 0;
  animation: ab-pulse 2.4s ease-out infinite;
}

@keyframes ab-pulse {
  0%   { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Category-tuned pulse speeds — most urgent beacons blink fastest */
.alert-beacon--tornado  .ab-ring { animation-duration: 1.2s; }
.alert-beacon--severe   .ab-ring { animation-duration: 1.5s; }
.alert-beacon--hurricane .ab-ring { animation-duration: 1.7s; }
.alert-beacon--flood    .ab-ring { animation-duration: 1.9s; }
.alert-beacon--tropical .ab-ring { animation-duration: 2.0s; }
.alert-beacon--fire     .ab-ring { animation-duration: 2.1s; }
.alert-beacon--storm    .ab-ring { animation-duration: 2.2s; }
.alert-beacon--winter   .ab-ring { animation-duration: 2.6s; }
.alert-beacon--marine   .ab-ring { animation-duration: 2.8s; }
.alert-beacon--heat     .ab-ring { animation-duration: 3.0s; }
.alert-beacon--other    .ab-ring { animation-duration: 3.4s; }

/* ── Beacon popup styling ─────────────────────────────────────── */

.beacon-popup-pane .leaflet-popup-content-wrapper {
  background:       rgba(10, 10, 9, 0.92) !important;
  border:           1px solid rgba(232, 228, 220, 0.16) !important;
  border-radius:    14px !important;
  box-shadow:       0 16px 48px rgba(0, 0, 0, 0.60) !important;
  backdrop-filter:  blur(14px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
  color:            var(--color-text, #e8e4dc) !important;
  padding:          0 !important;
}
.beacon-popup-pane .leaflet-popup-content {
  margin: 0 !important;
}
.beacon-popup-pane .leaflet-popup-tip-container {
  display: none;          /* cleaner without an arrow on these small cards */
}
.beacon-popup-pane .leaflet-popup-close-button {
  color: var(--color-muted, #6b7280) !important;
  top: 6px !important;
  right: 8px !important;
}

.beacon-popup {
  display:        flex;
  flex-direction: column;
  gap:            5px;
  padding:        12px 14px;
  min-width:      180px;
  font-family:    var(--font-mono);
  font-size:      0.65rem;
  line-height:    1.4;
}
.bp-title {
  font-size:    0.72rem;
  font-weight:  700;
  letter-spacing: 0.03em;
  line-height:  1.3;
  color:        var(--color-text, #e8e4dc);
  margin-bottom: 2px;
}
.bp-badge {
  display:       inline-flex;
  align-items:   center;
  padding:       2px 8px;
  border-radius: 999px;
  font-size:     0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight:   700;
  width:         fit-content;
}
.bp-area {
  color:       var(--color-muted, #9ca3af);
  line-height: 1.35;
}
.bp-expires {
  color:     var(--color-subtle, #6b7280);
  font-size: 0.60rem;
}


/* ── SECTION 27: POINT FORECAST PANEL ────────────────────────────────────────────
 * Draggable floating panel. Default position: left-aligned to
 * sidebar right edge, bottom-anchored just above the timeline.
 * JS uses setProperty('important') during drag to beat these defaults;
 * _resetGeometry() calls removeProperty() to restore them.
 * Glass morphism matches Map Layers / Tools panel.
 * ─────────────────────────────────────────────── */

#forecast-panel {
  position:   fixed !important;
  left:       calc(var(--stratus-left-width, 385px) + 30px) !important;
  bottom:     calc(var(--stratus-panel-bottom, 76px) + 10px) !important;
  right:      auto !important;
  top:        auto !important;
  width:      clamp(300px, 26vw, 400px) !important;
  max-height: 360px !important;
  overflow-y: auto;
  overflow-x: hidden;
  padding:    14px !important;
  z-index:    790 !important;
  cursor:     default;
  resize:     both;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 207, 142, 0.28) transparent;
  background:
    linear-gradient(175deg,
      rgba(13, 12, 10, 0.97) 0%,
      rgba(10,  9,  7, 0.96) 100%) !important;
  border-color: rgba(232, 228, 220, 0.10) !important;
}
#forecast-panel::-webkit-scrollbar { width: 4px; }
#forecast-panel::-webkit-scrollbar-thumb {
  background: rgba(62, 207, 142, 0.28);
  border-radius: 4px;
}

/* Header drag handle */
.forecast-panel-header {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.forecast-panel-header:active { cursor: grabbing; }

/* Header h2 + small */
.forecast-panel-header h2 {
  font-size:      0.72rem !important;
  letter-spacing: 0.17em !important;
  text-transform: uppercase !important;
  color:          var(--color-text, #e8e4dc) !important;
  margin:         0 0 2px !important;
}
.forecast-panel-header small {
  font-size:   0.58rem;
  color:       rgba(107, 102, 92, 0.80);
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

/* Action buttons */
.forecast-panel-actions button {
  height:        22px;
  padding:       0 8px;
  border-radius: 7px;
  border:        1px solid rgba(232, 228, 220, 0.12);
  background:    rgba(8, 7, 5, 0.55);
  color:         var(--color-muted, #6b7280);
  font-family:   var(--font-mono);
  font-size:     0.55rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight:   700;
  cursor:        pointer;
  transition:    all 120ms ease;
}
.forecast-panel-actions button:hover {
  color:        var(--color-accent, #3ecf8e);
  border-color: rgba(62, 207, 142, 0.38);
  background:   rgba(62, 207, 142, 0.08);
}

/* Close button */
#forecast-close {
  width:    26px;
  padding:  0;
  font-size: 0.80rem;
  line-height: 1;
  border-radius: 50% !important;
  font-family: inherit !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Forecast card body */
.forecast-card {
  display:        flex;
  flex-direction: column;
  gap:            8px;
  margin-top:     2px;
}
.forecast-card > strong {
  font-family:  var(--font-mono);
  font-size:    0.82rem;
  color:        var(--color-text, #e8e4dc);
  font-weight:  700;
}
.forecast-card > span {
  font-size: 0.65rem;
  color:     var(--color-muted, #9a958a);
  line-height: 1.45;
}

/* Opacity range inputs: polished webkit track + thumb for layer cards */
.layer-settings input[type="range"] {
  -webkit-appearance: none;
  appearance:         none;
  width:              100%;
  height:             4px;
  border-radius:      3px;
  background:         rgba(232, 228, 220, 0.12);
  outline:            none;
  cursor:             pointer;
  margin:             0;
}
.layer-settings input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width:              14px;
  height:             14px;
  border-radius:      50%;
  background:         var(--color-accent, #3ecf8e);
  box-shadow:         0 0 0 2px rgba(0, 0, 0, 0.55), 0 2px 5px rgba(62, 207, 142, 0.35);
  cursor:             pointer;
  transition:         box-shadow 120ms ease, transform 120ms ease;
}
.layer-settings input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(62, 207, 142, 0.55);
  transform:  scale(1.15);
}
.layer-settings input[type="range"]::-moz-range-thumb {
  width:        14px;
  height:       14px;
  border:       none;
  border-radius: 50%;
  background:   var(--color-accent, #3ecf8e);
  box-shadow:   0 0 0 2px rgba(0, 0, 0, 0.55), 0 2px 5px rgba(62, 207, 142, 0.35);
  cursor:       pointer;
}
.layer-settings input[type="range"]::-moz-range-track {
  height:       4px;
  border-radius: 3px;
  background:   rgba(232, 228, 220, 0.12);
}
.layer-settings input[type="range"]:focus-visible {
  outline:        2px solid rgba(62, 207, 142, 0.55);
  outline-offset: 3px;
  border-radius:  3px;
}

/* ── Section 28 · GOES Near-Real-Time indicator ───────────────────────────────

   The satellite card used to render a floating LIVE pseudo-badge in the top
   right corner. That overlapped the enable/disable switch. The date row already
   carries the active LIVE state, so the card-level badge is intentionally off.
*/
.layer-card[data-layer-card="satellite"].satellite-nrt::after {
  content: none;
  display: none;
}

/* Pulsing dot on the satellite date label when NRT is active */
#satellite-date-label[data-nrt="true"]::before {
  content:        '';
  display:        inline-block;
  width:          7px;
  height:         7px;
  margin-right:   6px;
  border-radius:  50%;
  background:     var(--color-accent, #3ecf8e);
  box-shadow:     0 0 0 0 rgba(62, 207, 142, 0.6);
  animation:      nrt-dot-pulse 2s ease-in-out infinite;
  vertical-align: middle;
  position:       relative;
  top:            -1px;
}

#satellite-date-label[data-nrt="true"] {
  color:       var(--color-accent, #3ecf8e);
  font-weight: 600;
}

@keyframes nrt-dot-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(62, 207, 142, 0.60); }
  50%  { box-shadow: 0 0 0 5px rgba(62, 207, 142, 0.00); }
  100% { box-shadow: 0 0 0 0   rgba(62, 207, 142, 0.60); }
}

/* v40.3 help/about panel refinements */
.help-card { width: min(640px, 94vw); }
.help-tab.active { box-shadow: 0 -1px 0 rgba(62, 207, 142, 0.18) inset; }
.about-meta > div:hover,
.source-grid > div:hover { background: rgba(232, 228, 220, 0.02); }

/* ── stratus-mobile-profile-v40-6 ─────────────────────────────
   Phone/tablet profile hardening. Keep hamburger/help visible, keep the
   drawer closed on boot, and respect mobile browser safe areas. */
@supports (height: 100dvh) {
  .app-shell,
  .map-root {
    height: 100dvh !important;
    min-height: 100dvh !important;
  }
}

@media (max-width: 980px) {
  .top-ticker {
    position: fixed !important;
    top: max(8px, env(safe-area-inset-top)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 48px !important;
    max-height: none !important;
    padding: 6px 8px !important;
    overflow: visible !important;
    z-index: 1900 !important;
  }

  .topbar-brand-zone {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 112px) !important;
  }
  .topbar-brand-zone::after,
  .brand-block small,
  .top-actions,
  .top-search-group,
  .source-health,
  .alert-summary-host,
  .ticker-clock,
  #fullscreen-btn {
    display: none !important;
  }
  .runtime-status-pill {
    display: inline-flex !important;
    max-width: 62px !important;
    padding: 2px 6px !important;
    font-size: 0.48rem !important;
  }
  .topbar-status-zone {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    min-width: auto !important;
  }
  #help-btn,
  #mobile-control-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 1.05rem !important;
    border-color: rgba(232, 228, 220, 0.16) !important;
    background: rgba(8, 7, 6, 0.72) !important;
    color: rgba(232, 228, 220, 0.92) !important;
    touch-action: manipulation !important;
  }
  #mobile-control-toggle.active,
  #mobile-control-toggle[aria-expanded="true"] {
    color: #0B0A09 !important;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-cyan)) !important;
    border-color: transparent !important;
    font-weight: 900 !important;
  }

  #layer-panel,
  #layer-panel.hidden {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(92vw, 420px) !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    border-radius: 0 !important;
    z-index: 1800 !important;
    transform: translate3d(calc(100% + 12px), 0, 0) !important;
    transition: transform 220ms cubic-bezier(0.20, 0, 0.40, 1) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body.control-panel-open #layer-panel,
  body.control-panel-open #layer-panel.hidden {
    transform: translate3d(0, 0, 0) !important;
  }
  body.control-panel-open #mobile-control-scrim {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1750 !important;
    background: rgba(0, 0, 0, 0.56) !important;
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(2px) !important;
  }
  .control-panel-titlebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    padding-top: 8px !important;
    background: linear-gradient(180deg, rgba(14,13,10,0.98), rgba(14,13,10,0.88)) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
  }
  #layer-panel-toggle {
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .leaflet-top.leaflet-left {
    top: calc(62px + env(safe-area-inset-top)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
  }
  #timeline.timeline {
    left: max(8px, env(safe-area-inset-left)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }
  #forecast-panel,
  .forecast-panel {
    left: max(8px, env(safe-area-inset-left)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: min(44vh, 330px) !important;
    overflow-y: auto !important;
  }
  .shortcuts-overlay.open {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)) !important;
  }
  .shortcuts-card,
  .help-card {
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 640px) {
  .top-ticker {
    min-height: 46px !important;
    padding: 5px 7px !important;
  }
  .topbar-status-zone {
    display: flex !important;
  }
  .brand-block {
    gap: 6px !important;
  }
  .brand-block strong {
    font-size: 0.70rem !important;
    letter-spacing: 0.12em !important;
  }
  .runtime-status-pill {
    display: none !important;
  }
  #help-btn,
  #mobile-control-toggle {
    flex-basis: 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }
  #layer-panel,
  #layer-panel.hidden {
    width: 100vw !important;
  }
  .titlebar-copy small {
    display: none !important;
  }
  .leaflet-control-attribution {
    max-width: calc(100vw - 16px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .top-ticker {
    min-height: 42px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
  #layer-panel,
  #layer-panel.hidden {
    width: min(78vw, 420px) !important;
  }
  #timeline.timeline,
  #forecast-panel,
  .forecast-panel {
    display: none !important;
  }
  .leaflet-top.leaflet-left {
    top: calc(50px + env(safe-area-inset-top)) !important;
  }
}

/* ── stratus-mobile-window-fix-v40-7 ─────────────────────────────
   Mobile toolbar/window correction. Help/About is a true top-level modal;
   it sits above the mobile toolbar, drawer, and scrim, and remains closable
   by X, backdrop tap, and Escape. */
body.help-panel-open {
  overflow: hidden !important;
  touch-action: none !important;
}

.shortcuts-overlay.open {
  z-index: 5000 !important;
  pointer-events: auto !important;
}

.shortcuts-overlay.open .shortcuts-card,
.shortcuts-overlay.open .help-card {
  pointer-events: auto !important;
}

@media (max-width: 980px) {
  body.help-panel-open .top-ticker,
  body.help-panel-open #layer-panel,
  body.help-panel-open #mobile-control-scrim,
  body.help-panel-open #timeline,
  body.help-panel-open #forecast-panel,
  body.help-panel-open .forecast-panel {
    pointer-events: none !important;
  }

  .shortcuts-overlay.open {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    background: rgba(4, 4, 3, 0.78) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
  }

  .shortcuts-overlay.open .shortcuts-card,
  .shortcuts-overlay.open .help-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top))) !important;
    margin: 0 !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    border-radius: 18px 18px 0 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.72) !important;
  }

  .shortcuts-overlay.open .shortcuts-head,
  .shortcuts-overlay.open .help-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
    flex: 0 0 auto !important;
    min-height: 54px !important;
    padding: 12px 14px !important;
    background: rgba(14, 13, 10, 0.98) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
  }

  .shortcuts-overlay.open .shortcuts-head button,
  .shortcuts-overlay.open .help-head button,
  .shortcuts-overlay.open [data-help-close] {
    min-width: 44px !important;
    width: 44px !important;
    min-height: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 14px !important;
    background: rgba(232, 228, 220, 0.08) !important;
    color: rgba(232, 228, 220, 0.96) !important;
    font-size: 1.65rem !important;
    line-height: 1 !important;
    touch-action: manipulation !important;
  }

  .shortcuts-overlay.open .help-tabs {
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 8px 10px !important;
  }

  .shortcuts-overlay.open .help-panel.active,
  .shortcuts-overlay.open .shortcuts-list {
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .shortcuts-overlay.open .help-panel.active {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 640px) {
  .top-ticker {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .topbar-status-zone {
    gap: 5px !important;
  }

  #help-btn,
  #mobile-control-toggle {
    flex-basis: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }

  .shortcuts-overlay.open .shortcuts-card,
  .shortcuts-overlay.open .help-card {
    max-height: calc(100dvh - max(6px, env(safe-area-inset-top))) !important;
    border-radius: 16px 16px 0 0 !important;
  }
}

/* ── stratus-mobile-toolbar-modal-fix-v40-8 ────────────────────
   Hard mobile pass: compact toolbar, sane phone panels, and a help modal
   that is always above the app and always closes on X/backdrop/Escape. */
@media (max-width: 980px) {
  html,
  body,
  #app,
  .app-shell,
  .map-root {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .top-ticker {
    top: max(10px, env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    min-height: 56px !important;
    padding: 7px 8px !important;
    border-radius: 18px !important;
    z-index: 2200 !important;
  }

  .topbar-brand-zone {
    min-width: 0 !important;
    max-width: calc(100vw - 118px - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
  }

  .brand-block {
    min-width: 0 !important;
  }

  .brand-block strong {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topbar-status-zone {
    display: flex !important;
    gap: 8px !important;
  }

  #help-btn,
  #mobile-control-toggle {
    display: inline-flex !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 16px !important;
    font-size: 1.25rem !important;
  }

  #sidebar.sidebar {
    position: fixed !important;
    top: calc(78px + env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(58dvh, 560px) !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    z-index: 1250 !important;
  }

  #sidebar.sidebar.collapsed {
    transform: translate3d(calc(-100% - 24px), 0, 0) !important;
  }

  #sidebar .alert-list {
    max-height: calc(min(58dvh, 560px) - 96px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  #timeline.timeline {
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    min-height: 58px !important;
    border-radius: 18px !important;
    z-index: 1150 !important;
  }

  .leaflet-control-attribution {
    display: none !important;
  }
}

body.help-panel-open {
  overflow: hidden !important;
  touch-action: none !important;
}

#shortcuts-overlay.shortcuts-overlay.open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  display: flex !important;
  pointer-events: auto !important;
  background: rgba(3, 3, 2, 0.82) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}

#shortcuts-overlay.shortcuts-overlay:not(.open) {
  display: none !important;
  pointer-events: none !important;
}

@media (max-width: 980px) {
  #shortcuts-overlay.shortcuts-overlay.open {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    touch-action: none !important;
  }

  #shortcuts-overlay.shortcuts-overlay.open .shortcuts-card,
  #shortcuts-overlay.shortcuts-overlay.open .help-card {
    position: relative !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: min(82dvh, 720px) !important;
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top))) !important;
    margin: 0 !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    border-radius: 22px 22px 0 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    pointer-events: auto !important;
  }

  #shortcuts-overlay.shortcuts-overlay.open .shortcuts-head,
  #shortcuts-overlay.shortcuts-overlay.open .help-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    flex: 0 0 auto !important;
    padding: 14px 64px 12px 14px !important;
    min-height: 62px !important;
  }

  #shortcuts-overlay.shortcuts-overlay.open [data-help-close] {
    position: absolute !important;
    top: 10px !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    z-index: 10 !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    border: 1px solid rgba(232, 228, 220, 0.16) !important;
    border-radius: 16px !important;
    background: rgba(8, 7, 6, 0.88) !important;
    color: rgba(232, 228, 220, 0.98) !important;
    font-size: 1.8rem !important;
    line-height: 1 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  #shortcuts-overlay.shortcuts-overlay.open .help-tabs {
    flex: 0 0 auto !important;
    padding: 8px 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #shortcuts-overlay.shortcuts-overlay.open .help-panel.active,
  #shortcuts-overlay.shortcuts-overlay.open .shortcuts-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }
}

@media (max-width: 430px) {
  .top-ticker {
    min-height: 52px !important;
    border-radius: 16px !important;
  }
  #help-btn,
  #mobile-control-toggle {
    flex-basis: 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
  #sidebar.sidebar {
    top: calc(72px + env(safe-area-inset-top)) !important;
    max-height: min(54dvh, 500px) !important;
  }
  #sidebar .alert-list {
    max-height: calc(min(54dvh, 500px) - 92px) !important;
  }
}

/* ── stratus-mobile-toolbar-rebuild-v40-10 ──────────────────────
   Mobile Safari rebuild: dynamic viewport variables, explicit app-layer
   ordering, toolbar-only chrome, and a body-level Help/About modal. */
:root {
  --stratus-vvw: 100vw;
  --stratus-vvh: 100vh;
  --stratus-mobile-edge: max(10px, env(safe-area-inset-left));
  --stratus-toolbar-height: 62px;
}

@supports (height: 100dvh) {
  :root { --stratus-vvh: 100dvh; }
}

@media (max-width: 980px), (pointer: coarse) {
  html.stratus-mobile-profile,
  html.stratus-mobile-profile body {
    width: 100% !important;
    min-width: 0 !important;
    min-height: var(--stratus-vvh) !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    background: #050504 !important;
  }

  html.stratus-mobile-profile #app,
  html.stratus-mobile-profile .app-shell,
  html.stratus-mobile-profile .map-root,
  html.stratus-mobile-profile .leaflet-container {
    width: var(--stratus-vvw) !important;
    height: var(--stratus-vvh) !important;
    min-height: var(--stratus-vvh) !important;
    max-width: 100vw !important;
    max-height: var(--stratus-vvh) !important;
    overflow: hidden !important;
  }

  html.stratus-mobile-profile .top-ticker {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    width: auto !important;
    height: var(--stratus-toolbar-height) !important;
    min-height: var(--stratus-toolbar-height) !important;
    max-height: var(--stratus-toolbar-height) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "brand actions" !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 8px !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    z-index: 6200 !important;
    isolation: isolate !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
  }

  html.stratus-mobile-profile .topbar-brand-zone {
    grid-area: brand !important;
    display: flex !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
  }

  html.stratus-mobile-profile .brand-block {
    min-width: 0 !important;
    width: 100% !important;
  }

  html.stratus-mobile-profile .brand-copy,
  html.stratus-mobile-profile .brand-copy strong,
  html.stratus-mobile-profile .brand-name {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html.stratus-mobile-profile .brand-copy small,
  html.stratus-mobile-profile #system-status,
  html.stratus-mobile-profile .top-actions,
  html.stratus-mobile-profile .top-search-group,
  html.stratus-mobile-profile .source-health,
  html.stratus-mobile-profile .alert-summary-host,
  html.stratus-mobile-profile .ticker-clock,
  html.stratus-mobile-profile #fullscreen-btn {
    display: none !important;
  }

  html.stratus-mobile-profile .topbar-status-zone {
    grid-area: actions !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  html.stratus-mobile-profile #help-btn,
  html.stratus-mobile-profile #mobile-control-toggle {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 18px !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    z-index: 2 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  html.stratus-mobile-profile #mobile-control-scrim {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5000 !important;
    background: rgba(3, 3, 2, 0.56) !important;
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(2px) !important;
  }

  html.stratus-mobile-profile body:not(.control-panel-open) #mobile-control-scrim {
    display: none !important;
    pointer-events: none !important;
  }

  html.stratus-mobile-profile body.control-panel-open #mobile-control-scrim {
    display: block !important;
    pointer-events: auto !important;
  }

  html.stratus-mobile-profile #layer-panel.layer-panel {
    position: fixed !important;
    top: calc(max(10px, env(safe-area-inset-top)) + var(--stratus-toolbar-height) + 10px) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    transform: translate3d(110%, 0, 0) !important;
    z-index: 5500 !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    transition: transform 180ms ease !important;
    isolation: isolate !important;
  }

  html.stratus-mobile-profile body.control-panel-open #layer-panel.layer-panel {
    transform: translate3d(0, 0, 0) !important;
  }

  html.stratus-mobile-profile #layer-panel.layer-panel.hidden {
    pointer-events: none !important;
  }

  html.stratus-mobile-profile body.control-panel-open #layer-panel.layer-panel.hidden {
    pointer-events: auto !important;
  }

  html.stratus-mobile-profile #sidebar.sidebar {
    position: fixed !important;
    top: calc(max(10px, env(safe-area-inset-top)) + var(--stratus-toolbar-height) + 12px) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(46dvh, calc(var(--stratus-vvh) - 210px)) !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    z-index: 1250 !important;
  }

  html.stratus-mobile-profile #sidebar .panel-heading-row {
    padding: 16px 18px 12px !important;
  }

  html.stratus-mobile-profile #sidebar .alert-list {
    max-height: calc(min(46dvh, calc(var(--stratus-vvh) - 210px)) - 92px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  html.stratus-mobile-profile #timeline.timeline {
    position: fixed !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    min-height: 58px !important;
    max-height: 70px !important;
    border-radius: 20px !important;
    z-index: 1150 !important;
    transform: translate3d(0, 0, 0) !important;
  }

  html.stratus-mobile-profile body.help-panel-open .top-ticker,
  html.stratus-mobile-profile body.help-panel-open #layer-panel,
  html.stratus-mobile-profile body.help-panel-open #mobile-control-scrim,
  html.stratus-mobile-profile body.help-panel-open #sidebar,
  html.stratus-mobile-profile body.help-panel-open #timeline,
  html.stratus-mobile-profile body.help-panel-open .leaflet-control-container {
    pointer-events: none !important;
  }
}

#shortcuts-overlay.shortcuts-overlay.open {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: var(--stratus-vvh) !important;
  z-index: 100000 !important;
  display: flex !important;
  pointer-events: auto !important;
  isolation: isolate !important;
  transform: translate3d(0, 0, 0) !important;
  -webkit-transform: translate3d(0, 0, 0) !important;
}

#shortcuts-overlay.shortcuts-overlay:not(.open) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 980px), (pointer: coarse) {
  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    overflow: hidden !important;
    touch-action: none !important;
  }

  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open .help-card,
  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open .shortcuts-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: min(84dvh, calc(var(--stratus-vvh) - max(10px, env(safe-area-inset-top)))) !important;
    max-height: calc(var(--stratus-vvh) - max(10px, env(safe-area-inset-top))) !important;
    margin: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
  }

  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open .help-head,
  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open .shortcuts-head {
    flex: 0 0 auto !important;
    min-height: 66px !important;
    padding: 14px 70px 12px 16px !important;
  }

  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open [data-help-close] {
    position: absolute !important;
    top: 10px !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    z-index: 20 !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 18px !important;
    font-size: 2rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open .help-tabs {
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open .help-panel.active,
  html.stratus-mobile-profile #shortcuts-overlay.shortcuts-overlay.open .shortcuts-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
  }
}

@media (max-width: 430px), (pointer: coarse) and (max-width: 430px) {
  :root { --stratus-toolbar-height: 58px; }

  html.stratus-mobile-profile .top-ticker {
    border-radius: 18px !important;
    padding: 7px !important;
  }

  html.stratus-mobile-profile #help-btn,
  html.stratus-mobile-profile #mobile-control-toggle {
    flex-basis: 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 16px !important;
  }

  html.stratus-mobile-profile #sidebar.sidebar {
    max-height: min(43dvh, calc(var(--stratus-vvh) - 198px)) !important;
  }

  html.stratus-mobile-profile #sidebar .alert-list {
    max-height: calc(min(43dvh, calc(var(--stratus-vvh) - 198px)) - 88px) !important;
  }
}

/* ── stratus-mobile-toolbar-emergency-v40-10 ─────────────────────
   Hard fallback for phone toolbar failures. These selectors do not depend on
   runtime class toggles, so the Help/Menu buttons remain visible and touchable
   even if the JS profile class is delayed or stale mobile state remains. */
@media (max-width: 980px), (pointer: coarse) {
  html,
  body {
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100% !important;
  }

  #app,
  .app-shell,
  #map,
  .map-root,
  .leaflet-container {
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  #top-ticker.top-ticker {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    width: auto !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "brand actions" !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px !important;
    overflow: visible !important;
    z-index: 95000 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    transform: none !important;
    -webkit-transform: none !important;
  }

  #top-ticker .topbar-brand-zone {
    grid-area: brand !important;
    display: flex !important;
    min-width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  #top-ticker .brand-block,
  #top-ticker .brand-copy,
  #top-ticker .brand-name {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  #top-ticker .brand-copy small,
  #top-ticker #system-status,
  #top-ticker .top-actions,
  #top-ticker .top-search-group,
  #top-ticker .source-health,
  #top-ticker .alert-summary-host,
  #top-ticker .ticker-clock,
  #top-ticker #fullscreen-btn {
    display: none !important;
  }

  #top-ticker .topbar-status-zone {
    grid-area: actions !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    min-width: 100px !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 95001 !important;
  }

  #help-btn.top-icon,
  #mobile-control-toggle.mobile-control-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 95002 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(49, 220, 183, 0.22) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  body:not(.help-panel-open) #top-ticker,
  body:not(.help-panel-open) #help-btn,
  body:not(.help-panel-open) #mobile-control-toggle {
    pointer-events: auto !important;
  }

  #mobile-control-scrim {
    z-index: 70000 !important;
  }

  #layer-panel.layer-panel {
    z-index: 80000 !important;
  }

  body.control-panel-open #layer-panel.layer-panel {
    pointer-events: auto !important;
  }

  #shortcuts-overlay.shortcuts-overlay.open {
    z-index: 120000 !important;
    pointer-events: auto !important;
  }

  #shortcuts-overlay.shortcuts-overlay.open [data-help-close] {
    pointer-events: auto !important;
    z-index: 120002 !important;
  }
}
