/* RAPHAEL | Community Health & Safety Desk
 * Unified Design System — Full-Viewport Map Background + Darkened Outer-Edge Vignette
 * Consistent Typography, Type Scale, Controls, Scrollbars, Emergency Codes & Accessibility
 * Zero external fonts/CDNs — works offline and on weak mobile connections.
 */

:root {
  /* Core Dark Operations Palette */
  --bg: #05090f;
  --surface-1: rgba(8, 13, 21, 0.86);
  --surface-2: rgba(14, 21, 33, 0.90);
  --surface-3: rgba(7, 11, 18, 0.94);
  --surface-hover: rgba(24, 37, 56, 0.96);

  --border: rgba(148, 163, 184, 0.18);
  --border-accent: rgba(56, 189, 248, 0.38);
  --border-strong: rgba(148, 163, 184, 0.34);

  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-bg: rgba(14, 165, 233, 0.16);

  /* Unified Emergency Colour Codes (ALWAYS paired with text codes) */
  --code-red-bg: rgba(68, 14, 20, 0.92);
  --code-red-border: #ef4444;
  --code-red-text: #fecaca;

  --code-orange-bg: rgba(66, 28, 10, 0.92);
  --code-orange-border: #f97316;
  --code-orange-text: #fed7aa;

  --code-amber-bg: rgba(58, 43, 8, 0.92);
  --code-amber-border: #eab308;
  --code-amber-text: #fef08a;

  --code-blue-bg: rgba(11, 36, 56, 0.90);
  --code-blue-border: #38bdf8;
  --code-blue-text: #bae6fd;

  --code-green-bg: rgba(10, 42, 26, 0.90);
  --code-green-border: #22c55e;
  --code-green-text: #bbf7d0;

  --code-slate-bg: rgba(24, 34, 49, 0.92);
  --code-slate-border: #64748b;
  --code-slate-text: #e2e8f0;

  /* Unified Typography System */
  --font-ui: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, ui-monospace, Menlo, monospace;

  /* Strict 5-Step Type Scale */
  --text-xs: 0.72rem;
  --text-sm: 0.82rem;
  --text-md: 0.90rem;
  --text-lg: 1.00rem;
  --text-xl: 1.16rem;

  --base-font-size: 14.5px;
  --radius: 6px;
  --radius-sm: 4px;
  --control-h: 32px;
  --shadow-panel: 0 12px 32px rgba(0, 0, 0, 0.56);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.42);
}

html.large-text {
  --base-font-size: 18px;
}

html.high-contrast {
  --bg: #000000;
  --surface-1: #000000;
  --surface-2: #080808;
  --surface-3: #000000;
  --surface-hover: #141414;
  --border: #ffffff;
  --border-accent: #ffe600;
  --border-strong: #ffffff;
  --text: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #e5e5e5;
  --accent: #ffe600;
  --accent-bg: #262200;
  --code-red-bg: #000000;
  --code-red-border: #ff4d4d;
  --code-red-text: #ffffff;
  --code-orange-bg: #000000;
  --code-orange-border: #ff9900;
  --code-orange-text: #ffffff;
  --code-amber-bg: #000000;
  --code-amber-border: #ffe600;
  --code-amber-text: #ffe600;
  --code-blue-bg: #000000;
  --code-blue-border: #4dd2ff;
  --code-blue-text: #ffffff;
  --code-green-bg: #000000;
  --code-green-border: #4dff88;
  --code-green-text: #ffffff;
  --code-slate-bg: #000000;
  --code-slate-border: #ffffff;
  --code-slate-text: #ffffff;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: var(--base-font-size);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Custom sleek dark scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.32) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.30);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.55);
}

/* =========================================================================
   FULL-VIEWPORT SITUATIONAL MAP / 3D GLOBE BACKGROUND + EDGE VIGNETTE
   ========================================================================= */
.map-bg-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: #040911;
  overflow: hidden;
}

.map-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-bg-layer .map-svg,
.map-bg-layer .globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.map-bg-layer .globe-canvas {
  cursor: grab;
}
.map-bg-layer .globe-canvas:active {
  cursor: grabbing;
}

/* Darkened outer-edge vignette behind left/right/top/bottom HUD rails */
.map-bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 6, 11, 0.92) 0%, rgba(3, 6, 11, 0.68) 25%, rgba(3, 6, 11, 0.14) 44%, rgba(3, 6, 11, 0.14) 56%, rgba(3, 6, 11, 0.68) 75%, rgba(3, 6, 11, 0.92) 100%),
    linear-gradient(180deg, rgba(3, 6, 11, 0.92) 0%, rgba(3, 6, 11, 0.28) 18%, rgba(3, 6, 11, 0.06) 50%, rgba(3, 6, 11, 0.42) 84%, rgba(3, 6, 11, 0.94) 100%),
    radial-gradient(ellipse 64% 64% at 50% 52%, rgba(3, 6, 11, 0) 32%, rgba(3, 6, 11, 0.56) 78%, rgba(2, 4, 8, 0.90) 100%);
}

html.hud-collapsed .map-bg-vignette {
  background: radial-gradient(ellipse 82% 82% at 50% 50%, rgba(3, 6, 11, 0) 56%, rgba(2, 4, 8, 0.62) 100%);
}

html.high-contrast .map-bg-vignette {
  background: rgba(0, 0, 0, 0.84);
}

/* Foreground HUD Shell */
.hud-foreground {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.hud-foreground > header,
.hud-foreground > nav,
.hud-foreground > .exercise-banner,
.hud-foreground > .agency-banner,
.hud-foreground > footer,
.hud-interactive,
.panel,
.callout,
.stats-ribbon,
.map-floating-bar {
  pointer-events: auto;
}

html.hud-collapsed .hud-hideable {
  display: none !important;
}

/* Links & Focus */
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(56, 189, 248, 0.45);
}
a:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

:focus-visible {
  outline: 2px solid #ffe600;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffe600;
  color: #000000;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-sm);
  z-index: 1000;
  pointer-events: auto;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* Surface Banners */
.exercise-banner {
  background: repeating-linear-gradient(-45deg, #facc15, #facc15 14px, #18181b 14px, #18181b 28px);
  padding: 3px;
  border-bottom: 2px solid #facc15;
}

.exercise-banner-inner {
  background: #141418;
  color: #fef08a;
  padding: 7px 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
}

.agency-banner {
  background: rgba(17, 30, 68, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(96, 165, 250, 0.55);
  color: #dbeafe;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-align: center;
  font-weight: 700;
}

/* Top Operations Header */
.topbar {
  background: rgba(6, 10, 16, 0.90);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-strong);
  padding: 9px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: var(--text-xl);
  letter-spacing: 0.07em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  line-height: 1.2;
}

.brand-sub {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.hud-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.hud-chip {
  height: var(--control-h);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.hud-chip strong {
  color: var(--text);
  font-weight: 700;
}

/* Secondary Controls Bar */
.controls-bar {
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

label.ctrl-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Uniform Inputs, Selects & Buttons */
select,
input[type="text"],
input[type="password"] {
  height: var(--control-h);
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  line-height: 1;
}

textarea {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  resize: vertical;
}

button,
.btn {
  min-height: var(--control-h);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 5px 11px;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

button:hover,
.btn:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  color: #ffffff;
}

button.active,
.btn.active {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: #ffffff;
}

button.btn-danger {
  background: var(--code-red-bg);
  border-color: var(--code-red-border);
  color: var(--code-red-text);
}
button.btn-warn {
  background: var(--code-amber-bg);
  border-color: var(--code-amber-border);
  color: var(--code-amber-text);
}
button.btn-ok {
  background: var(--code-green-bg);
  border-color: var(--code-green-border);
  color: var(--code-green-text);
}

/* Status & Emergency Code Badges (Never rely on colour alone) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.35;
}

.badge-red { background: var(--code-red-bg); border-color: var(--code-red-border); color: var(--code-red-text); }
.badge-orange { background: var(--code-orange-bg); border-color: var(--code-orange-border); color: var(--code-orange-text); }
.badge-amber { background: var(--code-amber-bg); border-color: var(--code-amber-border); color: var(--code-amber-text); }
.badge-blue { background: var(--code-blue-bg); border-color: var(--code-blue-border); color: var(--code-blue-text); }
.badge-green { background: var(--code-green-bg); border-color: var(--code-green-border); color: var(--code-green-text); }
.badge-slate { background: var(--code-slate-bg); border-color: var(--code-slate-border); color: var(--code-slate-text); }

/* Main Container & Stats Ribbon */
.container {
  width: 100%;
  max-width: 1860px;
  margin: 0 auto;
  padding: 12px 16px 28px;
  flex: 1;
}

.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat-tile {
  background: var(--surface-1);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat-tile-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-tile-value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 800;
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}

.stat-tile-sub {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 3px;
}

/* 3-Zone Command Layout: Left Rail | Open Center Map Window | Right Rail */
.desk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.map-center-stage {
  display: none;
}

@media (min-width: 1180px) {
  .desk-grid {
    grid-template-columns: minmax(365px, 430px) 1fr minmax(355px, 420px);
    align-items: start;
    gap: 16px;
  }
  .map-center-stage {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: calc(100vh - 295px);
    pointer-events: none;
    position: sticky;
    top: 16px;
  }
}

@media (min-width: 960px) and (max-width: 1179px) {
  .desk-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Center Map Floating Legend & Precision Bar */
.map-floating-bar {
  background: rgba(6, 11, 18, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 9px 13px;
  box-shadow: var(--shadow-panel);
}

.map-floating-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-floating-disclaimer {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.45;
}

/* Panels & Cards — Future-HUD Glass + Corner Reticle Brackets */
.panel {
  position: relative;
  background: rgba(6, 12, 21, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: var(--radius);
  padding: 13px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(56, 189, 248, 0.14);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  border-color: var(--accent);
  opacity: 0.75;
}
.panel::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-top-left-radius: var(--radius);
}
.panel::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-bottom-right-radius: var(--radius);
}

/* Floating 3D Perspective Marker Info Popup */
.hud-3d-popup {
  position: fixed;
  z-index: 45;
  width: 330px;
  max-width: calc(100vw - 24px);
  background: rgba(5, 11, 20, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent);
  border-top: 3px solid var(--accent);
  border-radius: 7px;
  padding: 12px 14px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.80), 0 0 24px rgba(56, 189, 248, 0.26);
  transform-origin: bottom center;
  transform: translate(-50%, calc(-100% - 26px)) perspective(900px) rotateX(4deg);
  pointer-events: auto;
  transition: opacity 140ms ease;
}

.hud-3d-popup.sev-red { border-color: var(--code-red-border); box-shadow: 0 22px 48px rgba(0, 0, 0, 0.82), 0 0 24px rgba(239, 68, 68, 0.34); }
.hud-3d-popup.sev-amber { border-color: var(--code-amber-border); box-shadow: 0 22px 48px rgba(0, 0, 0, 0.82), 0 0 24px rgba(234, 179, 8, 0.28); }
.hud-3d-popup.sev-green { border-color: var(--code-green-border); box-shadow: 0 22px 48px rgba(0, 0, 0, 0.82), 0 0 24px rgba(34, 197, 94, 0.26); }
.hud-3d-popup.sev-purple { border-color: #a855f7; box-shadow: 0 22px 48px rgba(0, 0, 0, 0.82), 0 0 24px rgba(168, 85, 247, 0.32); }

.hud-3d-popup::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 2px;
  height: 24px;
  background: linear-gradient(180deg, var(--accent), rgba(56, 189, 248, 0.1));
  transform: translateX(-50%);
}

.hud-3d-popup-close {
  min-height: 32px;
  min-width: 32px;
  padding: 0 8px;
  font-size: 1.05rem;
  line-height: 1;
}

.hud-telemetry-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 6px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 11px;
}

.panel-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.panel-subheading {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 14px 0 8px;
}

.panel-note {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.rail-scroll-list {
  max-height: 470px;
  overflow-y: auto;
  padding-right: 4px;
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 12px;
  margin-bottom: 9px;
}
.card:last-child {
  margin-bottom: 0;
}

.card.sev-red { border-left-color: var(--code-red-border); background: rgba(34, 13, 18, 0.92); }
.card.sev-orange { border-left-color: var(--code-orange-border); background: rgba(36, 19, 11, 0.92); }
.card.sev-amber { border-left-color: var(--code-amber-border); background: rgba(31, 25, 10, 0.92); }
.card.sev-blue { border-left-color: var(--code-blue-border); }
.card.sev-green { border-left-color: var(--code-green-border); }
.card.sev-slate { border-left-color: var(--code-slate-border); }

.card.is-highlighted {
  outline: 2px solid #ffe600;
  background: rgba(20, 38, 58, 0.96);
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 6px;
}

.card-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.card-title {
  margin: 2px 0 5px;
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.32;
  color: var(--text);
}

.card-body {
  margin: 4px 0;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.48;
}

.card-muted {
  margin: 4px 0 0;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.action-box {
  background: var(--surface-3);
  border: 1px solid var(--border-accent);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin: 8px 0;
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.card.sev-red .action-box {
  border-color: rgba(239, 68, 68, 0.45);
  border-left-color: var(--code-red-border);
  background: rgba(45, 10, 15, 0.94);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 5px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.meta-grid strong {
  color: var(--text);
  font-weight: 700;
}

.callout {
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  backdrop-filter: blur(10px);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  line-height: 1.48;
  margin-bottom: 10px;
  box-shadow: var(--shadow-soft);
}

.callout-danger {
  background: var(--code-red-bg);
  border-color: var(--code-red-border);
  color: var(--code-red-text);
}
.callout-warn {
  background: var(--code-amber-bg);
  border-color: var(--code-amber-border);
  color: var(--code-amber-text);
}
.callout-info {
  background: var(--code-blue-bg);
  border-color: var(--code-blue-border);
  color: var(--code-blue-text);
}

.callout-mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.link-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.link-list li {
  margin: 5px 0;
}

.telemetry-list {
  margin: 6px 0 0;
  padding-left: 16px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.telemetry-list li {
  margin: 4px 0;
}

.webcam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
}

table.data-table th,
table.data-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

table.data-table th {
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer {
  background: rgba(5, 9, 15, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 11px 16px;
  margin-top: auto;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile Responsive Overrides */
@media (max-width: 767px) {
  .topbar { padding: 8px 10px; gap: 6px; }
  .brand-sub { display: none; }
  .hud-strip { gap: 6px; }
  .hud-chip { height: 28px; padding: 0 7px; }
  .controls-bar { padding: 6px 10px; gap: 6px; }
  .container { padding: 8px 10px 24px; }
  .callout { padding: 7px 9px; font-size: var(--text-xs); margin-bottom: 8px; }
  .stats-ribbon { grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
  .stat-tile { padding: 7px 9px; }
  .stat-tile-sub { display: none; }
  .stat-tile-value { font-size: var(--text-lg); }
  .utility-controls-desktop { display: none !important; }
}

@media (min-width: 768px) {
  .utility-controls-mobile { display: none !important; }
}

/* Floating restore HUD pill in Full Map Focus Mode */
.hud-restore-pill {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: none;
  gap: 7px;
  align-items: center;
  background: rgba(6, 11, 18, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  padding: 6px 13px;
  box-shadow: var(--shadow-panel);
}

html.hud-collapsed .hud-restore-pill {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 20px);
}

/* =========================================================================
   CHRISTOPHER-SISTER COASTAL-TACTICAL GLASS TRIAGE MODE (Public Desk Only)
   ========================================================================= */
body.triage-mode {
  --bg: #0c171b;
  --surface-1: rgba(13, 24, 29, 0.86);
  --surface-2: rgba(20, 36, 42, 0.88);
  --surface-3: rgba(11, 22, 26, 0.92);
  --surface-hover: rgba(31, 52, 59, 0.95);
  --border: rgba(238, 212, 174, 0.28);
  --border-accent: rgba(38, 235, 216, 0.48);
  --border-strong: rgba(240, 215, 174, 0.36);
  --text: #efe3cf;
  --text-bright: #fff8ec;
  --text-secondary: #d7e2df;
  --text-muted: #a6bab8;
  --sand: #f0d7ae;
  --accent: #26ebd8;
  --accent-bg: rgba(38, 235, 216, 0.18);
  --flamingo: #ff5f8d;
  --coral: #ff7c61;
  --sunset: #f8be5a;
  --aqua: #26ebd8;
  --walk: #6cf0b0;
  --font-display: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --tex-sand-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='%23f6e2c1' fill-opacity='0.055'%3E%3Ccircle cx='12' cy='14' r='0.75'/%3E%3Ccircle cx='39' cy='8' r='0.6'/%3E%3Ccircle cx='71' cy='21' r='0.8'/%3E%3Ccircle cx='86' cy='47' r='0.7'/%3E%3Ccircle cx='24' cy='52' r='0.85'/%3E%3Ccircle cx='58' cy='61' r='0.65'/%3E%3C/g%3E%3Cg fill='%2326ebd8' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='29' r='0.7'/%3E%3Ccircle cx='81' cy='12' r='0.65'/%3E%3Ccircle cx='43' cy='73' r='0.65'/%3E%3C/g%3E%3C/svg%3E");
  --tex-salt-patina: linear-gradient(118deg, rgba(240, 215, 174, 0.04) 0%, rgba(255, 124, 97, 0.03) 34%, rgba(38, 235, 216, 0.05) 72%, rgba(240, 215, 174, 0.03) 100%);
  background: var(--bg);
}

html.high-contrast body.triage-mode {
  --bg: #000000;
  --surface-1: #000000;
  --surface-2: #080808;
  --surface-3: #000000;
  --border: #ffffff;
  --border-accent: #ffe600;
  --text: #ffffff;
  --text-bright: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #e5e5e5;
  --accent: #ffe600;
  --sand: #ffe600;
}

body.triage-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 36% at 92% 0%, rgba(255, 114, 134, 0.13) 0%, rgba(248, 190, 90, 0.06) 38%, transparent 70%),
    radial-gradient(ellipse 52% 42% at 8% 100%, rgba(38, 235, 216, 0.12) 0%, transparent 70%);
}

body.triage-mode .map-bg-stage {
  inset: -4px;
  width: calc(100vw + 8px);
  height: calc(100vh + 8px);
  background: radial-gradient(circle at 74% 18%, #21373d 0%, #112228 48%, #091317 100%);
}

.maplibre-full-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.maplibregl-ctrl-attrib.maplibregl-compact {
  background: rgba(12, 24, 29, 0.78) !important;
  color: var(--sand, #f0d7ae) !important;
  border: 1px solid rgba(240, 215, 174, 0.25);
  margin: 0 10px 6px 0 !important;
}
.maplibregl-ctrl-attrib a {
  color: var(--aqua, #26ebd8) !important;
}

/* Light directional edge shading only — keep HD satellite globe razor-sharp */
body.triage-mode .map-bg-vignette {
  background: linear-gradient(90deg, rgba(9, 19, 23, 0.62) 0%, rgba(9, 19, 23, 0.24) 24%, rgba(9, 19, 23, 0) 44%);
}
html.hud-collapsed body.triage-mode .map-bg-vignette {
  background: transparent;
}

/* Weathered Coastal-Tactical Glass Surface */
.chr-glass {
  position: relative;
  background-color: rgba(13, 24, 29, 0.85);
  background-image:
    var(--tex-sand-grain),
    var(--tex-salt-patina),
    linear-gradient(142deg, rgba(248, 206, 154, 0.12) 0%, rgba(255, 108, 128, 0.08) 24%, rgba(16, 34, 40, 0.06) 54%, rgba(38, 235, 216, 0.11) 100%);
  border: 1px solid var(--border);
  border-top-color: rgba(248, 224, 186, 0.44);
  border-left-color: rgba(240, 215, 174, 0.32);
  border-right-color: rgba(255, 124, 97, 0.24);
  border-bottom-color: rgba(38, 235, 216, 0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 5px;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 238, 210, 0.24),
    inset 0 -1px 0 rgba(38, 235, 216, 0.18);
}

/* Art Deco Coastal Horizon Twin Top Accent Stripe */
.chr-top-bar::after,
.chr-left-panel::after,
.chr-bottom-dock::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 2.5px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 22px, rgba(16, 30, 35, 0.32) 22px, rgba(16, 30, 35, 0.32) 25px),
    linear-gradient(90deg, rgba(255, 77, 88, 0.92) 0%, rgba(255, 124, 97, 0.88) 24%, rgba(248, 190, 90, 0.82) 48%, rgba(240, 215, 174, 0.32) 58%, rgba(38, 235, 216, 0.90) 84%, rgba(108, 240, 176, 0.78) 100%);
  opacity: 0.92;
}

.chr-left-panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border-radius: 2px;
  background:
    linear-gradient(var(--sand), var(--sand)) top left / 11px 1.5px no-repeat,
    linear-gradient(var(--sand), var(--sand)) top left / 1.5px 11px no-repeat,
    linear-gradient(var(--flamingo), var(--flamingo)) top right / 11px 1.5px no-repeat,
    linear-gradient(var(--flamingo), var(--flamingo)) top right / 1.5px 11px no-repeat,
    linear-gradient(var(--aqua), var(--aqua)) bottom left / 11px 1.5px no-repeat,
    linear-gradient(var(--aqua), var(--aqua)) bottom left / 1.5px 11px no-repeat,
    linear-gradient(var(--sunset), var(--sunset)) bottom right / 11px 1.5px no-repeat,
    linear-gradient(var(--sunset), var(--sunset)) bottom right / 1.5px 11px no-repeat;
  opacity: 0.56;
  z-index: 0;
}

.chr-left-panel > * {
  position: relative;
  z-index: 1;
}

/* Floating Edge-Inset HUD Layout */
.chr-hud-layer {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  gap: 8px;
}

/* Top Floating Single-Row Command Bar */
.chr-top-bar {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 7px 10px;
  z-index: 40;
}

.chr-brand-group,
.chr-view-group,
.chr-action-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.chr-brand-badge {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 95, 141, 0.88);
  border-bottom-color: rgba(38, 235, 216, 0.88);
  background: linear-gradient(142deg, rgba(255, 77, 88, 0.45) 0%, rgba(248, 190, 90, 0.34) 52%, rgba(38, 235, 216, 0.36) 100%);
  color: var(--text-bright);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 240, 216, 0.45), 0 0 12px rgba(255, 95, 141, 0.28);
}

.chr-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-bright);
  font-size: 13.5px;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(38, 235, 216, 0.30);
}

.deco-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 2px;
  flex-shrink: 0;
}
.deco-bars span { display: block; height: 1.8px; border-radius: 1px; }
.deco-bars span:nth-child(1) { width: 14px; background: linear-gradient(90deg, #ff5f8d, #ff7c61); }
.deco-bars span:nth-child(2) { width: 10px; background: #f8be5a; }
.deco-bars span:nth-child(3) { width: 6px;  background: #26ebd8; }

.chr-select {
  background: linear-gradient(180deg, rgba(22, 40, 46, 0.94), rgba(13, 25, 30, 0.96));
  border: 1px solid rgba(240, 215, 174, 0.32);
  border-top-color: rgba(248, 224, 186, 0.42);
  color: var(--text-bright);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 600;
  height: 30px;
  line-height: 1.2;
  max-width: 185px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chr-select:hover { border-color: var(--aqua); }

.chr-chip {
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 3px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(31, 52, 59, 0.90) 0%, rgba(16, 30, 35, 0.94) 100%);
  border: 1px solid rgba(240, 215, 174, 0.28);
  color: var(--text);
  white-space: nowrap;
}
.chr-chip:hover {
  border-color: var(--flamingo);
  color: var(--text-bright);
}
.chr-chip.active {
  background: linear-gradient(145deg, rgba(255, 95, 141, 0.28) 0%, rgba(255, 124, 97, 0.22) 55%, rgba(248, 190, 90, 0.16) 100%);
  border-color: var(--flamingo);
  color: #fff2ed;
  box-shadow: 0 0 12px rgba(255, 95, 141, 0.28);
}

.chr-chip-aqua {
  border-color: rgba(38, 235, 216, 0.56);
  color: var(--aqua);
  background: linear-gradient(160deg, rgba(24, 62, 66, 0.90), rgba(14, 34, 38, 0.94));
}
.chr-chip-aqua.active,
.chr-chip-aqua:hover {
  border-color: var(--aqua);
  background: linear-gradient(145deg, rgba(38, 235, 216, 0.30), rgba(22, 86, 86, 0.45));
  color: #ebfffd;
}

.call-911-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 12px;
  background: linear-gradient(145deg, #e11d48, #b91c1c);
  color: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.call-911-btn:hover {
  background: #9f1239;
  color: #ffffff;
  text-decoration: none;
}

/* Compact Options Popover */
.hud-menu { position: relative; }
.hud-menu > summary {
  list-style: none;
  min-height: 30px;
  background: linear-gradient(180deg, rgba(31, 52, 59, 0.90), rgba(16, 30, 35, 0.94));
  color: var(--text);
  border: 1px solid rgba(240, 215, 174, 0.30);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}
.hud-menu > summary::-webkit-details-marker { display: none; }
.hud-menu[open] > summary,
.hud-menu > summary:hover { border-color: var(--aqua); color: #ffffff; }

.hud-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 65;
  width: 265px;
  background: rgba(11, 22, 26, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-accent);
  border-radius: 5px;
  padding: 9px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hud-menu-panel button,
.hud-menu-panel .btn {
  width: 100%;
  justify-content: flex-start;
  min-height: 34px;
  font-size: 11.5px;
  font-family: var(--font-ui);
}
.hud-menu-divider { border-top: 1px dashed rgba(240, 215, 174, 0.22); margin: 3px 0; }

/* Main Floating Desk Row */
.chr-desk-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.chr-left-panel {
  pointer-events: auto;
  width: 392px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 160ms ease, max-height 160ms ease;
}

.chr-left-panel.collapsed {
  width: auto;
  max-height: 44px;
}

.chr-left-panel.collapsed .chr-tsunami-strip,
.chr-left-panel.collapsed .triage-tabs,
.chr-left-panel.collapsed .triage-body {
  display: none !important;
}

.chr-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px 6px;
  border-bottom: 1px dashed rgba(240, 215, 174, 0.24);
}

.chr-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aqua);
  display: flex;
  align-items: center;
  gap: 7px;
}

.chr-tsunami-strip {
  background: linear-gradient(135deg, rgba(98, 24, 30, 0.88), rgba(46, 18, 24, 0.90));
  border-bottom: 1px solid rgba(255, 108, 122, 0.50);
  padding: 6px 11px;
  font-size: 12px;
  color: #ffe4e6;
  line-height: 1.38;
}
.chr-tsunami-strip a { color: #fecdd3; font-weight: 700; }

/* 7 Plain-English Triage Tabs (4-column desktop compact 2-row grid, 3-column narrow mobile) */
.triage-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px 9px;
  background: rgba(9, 18, 22, 0.90);
  border-bottom: 1px solid rgba(240, 215, 174, 0.20);
}

.triage-tab {
  min-height: 36px;
  padding: 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: rgba(17, 31, 36, 0.88);
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}
@media (max-width: 440px) {
  .triage-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
}
.triage-tab-count {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}
.triage-tab.active {
  background: linear-gradient(145deg, rgba(38, 235, 216, 0.22), rgba(20, 62, 66, 0.34));
  border-color: var(--aqua);
  color: #ffffff;
}
.triage-tab.active .triage-tab-count { color: var(--aqua); }
.triage-tab.has-danger { border-color: rgba(255, 95, 126, 0.72); color: #fecdd3; }
.triage-tab.has-danger .triage-tab-count { color: #fda4af; }

.triage-body {
  padding: 10px 11px 14px;
  overflow-y: auto;
  flex: 1;
}
.triage-pane[hidden] { display: none !important; }

.verdict-card {
  background: linear-gradient(155deg, rgba(20, 38, 44, 0.94), rgba(11, 22, 26, 0.96));
  border: 1px solid rgba(38, 235, 216, 0.38);
  border-left: 4px solid var(--aqua);
  border-radius: 5px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.verdict-card.verdict-danger {
  background: linear-gradient(155deg, rgba(68, 20, 26, 0.94), rgba(34, 12, 16, 0.96));
  border-color: rgba(255, 95, 126, 0.72);
  border-left-color: #ff4d58;
}
.verdict-title {
  margin: 4px 0 4px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.28;
  color: var(--text-bright);
}
.verdict-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.44;
  color: var(--text-secondary);
}

.authority-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.authority-btn {
  min-height: 38px;
  padding: 6px 9px;
  justify-content: flex-start;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.24;
  background: rgba(16, 32, 38, 0.92);
  border-color: rgba(240, 215, 174, 0.28);
}
.authority-btn:hover { border-color: var(--aqua); }

.triage-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.triage-action-row .btn,
.triage-action-row button {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-family: var(--font-ui);
}

.minor-details {
  margin: 9px 0 11px;
  border: 1px solid rgba(240, 215, 174, 0.24);
  border-radius: 5px;
  background: rgba(12, 24, 29, 0.88);
  padding: 7px 9px;
}
.minor-details > summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--aqua);
}

/* Bottom Floating Layer Filter & Telemetry Dock */
.chr-bottom-dock {
  pointer-events: auto;
  align-self: flex-end;
  max-width: calc(100vw - 425px);
  width: 680px;
  padding: 8px 11px;
  z-index: 25;
}

.globe-dock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}

.globe-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.globe-filter-bar button {
  min-height: 27px;
  padding: 3px 9px;
  font-family: var(--font-ui);
  font-size: 11px;
  border-radius: 3px;
}

.chr-dock-disclaimer {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed rgba(240, 215, 174, 0.18);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  line-height: 1.35;
}

/* Frosted Coastal-Glass Map Marker Pill Pins */
.raph-pin {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 4px;
  border-radius: 3px;
  background: linear-gradient(155deg, rgba(22, 40, 46, 0.95), rgba(11, 21, 25, 0.97));
  border: 1px solid rgba(240, 215, 174, 0.56);
  border-left: 3px solid var(--aqua);
  color: #fff8ec;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 236, 206, 0.24);
  transition: transform 110ms ease, border-color 110ms ease, box-shadow 110ms ease;
}
.raph-pin:hover {
  transform: translateY(-2px);
  border-color: #ff5f8d;
  box-shadow: 0 0 14px rgba(255, 95, 141, 0.45);
  z-index: 6;
}
.raph-pin .pin-badge {
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(38, 235, 216, 0.22);
  color: #26ebd8;
}
.raph-pin.pin-evac {
  border-color: #ff5852;
  border-left-color: #ff4d58;
  background: linear-gradient(155deg, rgba(92, 22, 28, 0.96), rgba(38, 12, 16, 0.98));
  box-shadow: 0 0 18px rgba(255, 77, 88, 0.56);
}
.raph-pin.pin-evac .pin-badge { background: #dc2626; color: #ffffff; }
.raph-pin.pin-care { border-left-color: #6cf0b0; }
.raph-pin.pin-care .pin-badge { background: rgba(108, 240, 176, 0.22); color: #6cf0b0; }
.raph-pin.pin-road { border-left-color: #f8be5a; }
.raph-pin.pin-road .pin-badge { background: rgba(248, 190, 90, 0.22); color: #f8be5a; }
.raph-pin.pin-road-major {
  border-color: #ff5852;
  border-left-color: #ff4d58;
}
.raph-pin.pin-road-major .pin-badge { background: rgba(239, 68, 68, 0.30); color: #fecaca; }
.raph-pin.pin-weather { border-left-color: #59b8ff; }
.raph-pin.pin-weather .pin-badge { background: rgba(89, 184, 255, 0.22); color: #7dd3fc; }
.raph-pin.pin-seismic { border-left-color: #c084fc; }
.raph-pin.pin-seismic .pin-badge { background: rgba(192, 132, 252, 0.24); color: #e9d5ff; }
.raph-pin.pin-wxwarn { border-color: #f59e0b; border-left-color: #f59e0b; background: linear-gradient(155deg, rgba(66, 36, 10, 0.96), rgba(32, 18, 8, 0.98)); }
.raph-pin.pin-wxwarn .pin-badge { background: rgba(245, 158, 11, 0.30); color: #fde68a; }
.raph-pin.pin-river { border-left-color: #38bdf8; }
.raph-pin.pin-river .pin-badge { background: rgba(56, 189, 248, 0.22); color: #bae6fd; }
.raph-pin.pin-aqhi { border-left-color: #6cf0b0; }
.raph-pin.pin-aqhi .pin-badge { background: rgba(108, 240, 176, 0.22); color: #bbf7d0; }

/* Smaller Circular Camera Icons + Hover Tooltip */
.raph-pin.pin-webcam {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  justify-content: center;
  background: rgba(8, 28, 36, 0.94);
  border: 1.5px solid #38bdf8;
  color: #bae6fd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  position: relative;
}
.raph-pin.pin-webcam:hover,
.raph-pin.pin-webcam:focus-visible {
  transform: scale(1.18);
  border-color: #26ebd8;
  z-index: 12;
}
.raph-pin.pin-webcam svg {
  width: 12px;
  height: 12px;
  display: block;
}
.raph-pin.pin-webcam .cam-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(7, 19, 24, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #e0f2fe;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
.raph-pin.pin-webcam:hover .cam-tip,
.raph-pin.pin-webcam:focus-visible .cam-tip {
  display: block;
}

/* Road Closures, Official Fatal Incidents, Construction & Minor Conditions */
.raph-pin.pin-road-fatal {
  border: 1.5px solid #ff2e43;
  background: linear-gradient(155deg, #450a0a, #0f0404);
  color: #fecaca;
  box-shadow: 0 0 16px rgba(255, 46, 67, 0.75);
}
.raph-pin.pin-road-fatal .pin-badge { background: #dc2626; color: #ffffff; }
.raph-pin.pin-road-closed {
  border: 1.5px solid #fca5a5;
  background: linear-gradient(155deg, #991b1b, #450a0a);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.68);
}
.raph-pin.pin-road-closed .pin-badge { background: #ffffff; color: #991b1b; }
.raph-pin.pin-road-const {
  border-color: rgba(245, 158, 11, 0.72);
  border-left: 3px solid #f59e0b;
  background: linear-gradient(155deg, rgba(66, 34, 8, 0.96), rgba(32, 18, 6, 0.98));
  color: #fef3c7;
}
.raph-pin.pin-road-const .pin-badge { background: rgba(245, 158, 11, 0.34); color: #fde68a; }
.raph-pin.pin-road-minor {
  padding: 2px 5px;
  font-size: 9.5px;
  border-left: 3px solid #38bdf8;
}
.raph-pin.pin-road-minor .pin-badge { background: rgba(56, 189, 248, 0.24); color: #bae6fd; font-size: 9px; }

.badge-fatal { background: #450a0a; border: 1px solid #ff2e43; color: #fecaca; font-weight: 800; }
.veh3d-tag.sev-tag-major { border-color: #ef4444; background: rgba(69, 10, 10, 0.94); color: #fecaca; }
.veh3d-tag.sev-tag-fatal { border-color: #ff2e43; background: #450a0a; color: #ffffff; }
.veh3d-tag.sev-tag-closed { border-color: #fca5a5; background: #991b1b; color: #ffffff; }
.veh3d-tag.sev-tag-minor { border-color: rgba(56, 189, 248, 0.55); color: #bae6fd; }

/* Ferry Terminals, Transit Bus Hubs & Highway Rest Stops / Public Washrooms */
.raph-pin.pin-ferry {
  border-left: 3px solid #06b6d4;
  background: linear-gradient(155deg, rgba(8, 47, 73, 0.95), rgba(6, 24, 38, 0.97));
  color: #e0f2fe;
}
.raph-pin.pin-ferry .pin-badge { background: rgba(6, 182, 212, 0.28); color: #67e8f9; display: inline-flex; align-items: center; gap: 3px; }
.raph-pin.pin-bus-hub {
  border-left: 3px solid #10b981;
  background: linear-gradient(155deg, rgba(6, 78, 59, 0.94), rgba(4, 34, 28, 0.96));
  color: #d1fae5;
}
.raph-pin.pin-bus-hub .pin-badge { background: rgba(16, 185, 129, 0.28); color: #6ee7b7; }
.raph-pin.pin-rest-stop {
  border-left: 3px solid #38bdf8;
  background: linear-gradient(155deg, rgba(14, 42, 56, 0.95), rgba(8, 22, 30, 0.97));
  color: #e0f2fe;
}
.raph-pin.pin-rest-stop .pin-badge { background: rgba(56, 189, 248, 0.28); color: #bae6fd; }

.road-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.road-stat-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(240, 215, 174, 0.22);
  background: rgba(10, 22, 27, 0.9);
  color: #e2e8f0;
}
.road-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.webcam-thumb {
  width: 100%;
  max-height: 155px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(240, 215, 174, 0.28);
  margin: 6px 0;
  display: block;
  background: #091317;
}

.chr-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 9, 13, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  pointer-events: auto;
}
.chr-modal {
  width: min(1140px, calc(100vw - 20px));
  height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 14px;
  gap: 8px;
}
.chr-modal-body {
  display: grid;
  grid-template-columns: 1fr 315px;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.pulsepoint-frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 1px solid rgba(38, 235, 216, 0.35);
  border-radius: 4px;
  background: #ffffff;
}
@media (max-width: 960px) {
  .chr-modal { height: min(92vh, 840px); padding: 10px; }
  .chr-modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .pulsepoint-frame { min-height: 380px; }
}

/* MapLibre Coastal-Glass 3D Popup */
.raph-popup .maplibregl-popup-content {
  width: 324px;
  max-width: calc(100vw - 24px);
  padding: 12px 13px;
  background: linear-gradient(150deg, rgba(16, 30, 36, 0.97), rgba(10, 20, 24, 0.98));
  backdrop-filter: blur(14px);
  border: 1px solid rgba(38, 235, 216, 0.58);
  border-top: 3px solid var(--aqua);
  border-radius: 6px;
  color: var(--text);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.78), 0 0 24px rgba(38, 235, 216, 0.20);
  font-family: var(--font-ui);
}
.raph-popup.sev-red .maplibregl-popup-content { border-color: #ff5852; border-top-color: #ff4d58; }
.raph-popup.sev-amber .maplibregl-popup-content { border-color: #f8be5a; border-top-color: #f8be5a; }
.raph-popup.sev-green .maplibregl-popup-content { border-color: #6cf0b0; border-top-color: #6cf0b0; }
.raph-popup.sev-purple .maplibregl-popup-content { border-color: #c084fc; border-top-color: #c084fc; }

.raph-popup .maplibregl-popup-tip {
  border-top-color: rgba(16, 30, 36, 0.97) !important;
  border-bottom-color: rgba(16, 30, 36, 0.97) !important;
}
.raph-popup .maplibregl-popup-close-button {
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  top: 6px;
  right: 6px;
}
.raph-popup .maplibregl-popup-close-button:hover {
  background: rgba(255, 95, 141, 0.30);
}

@media (min-width: 1024px) {
  .chr-hud-layer {
    position: fixed;
    inset: 0;
    height: 100vh;
    overflow: hidden;
  }
  .chr-left-panel {
    max-height: calc(100vh - 134px);
    height: calc(100vh - 134px);
  }
  .maplibregl-ctrl-top-right {
    top: 102px !important;
    right: 10px !important;
  }
  .maplibregl-ctrl-bottom-right {
    bottom: 148px !important;
    right: 10px !important;
  }
}

@media (max-width: 1023px) {
  .chr-left-panel {
    width: 100%;
  }
  .chr-bottom-dock {
    max-width: 100%;
    width: 100%;
    align-self: stretch;
  }
  .authority-grid {
    grid-template-columns: 1fr;
  }
  .maplibregl-ctrl-top-right, .maplibregl-ctrl-bottom-right {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .chr-hud-layer { padding: 6px; gap: 6px; }
  .chr-top-bar { padding: 6px 8px; }
  .hud-area-form { width: 100%; }
  .call-911-btn { width: 100%; min-height: 40px; font-size: 13px; }
  .triage-tabs { grid-template-columns: repeat(3, 1fr); }
  .chr-select { flex: 1; min-width: 0; max-width: none; font-size: 11.5px; }
}

.chr-modal-backdrop[hidden] { display: none !important; }

/* 3D Miniature Vehicle Markers, Animations & Scene Mockup Studio */
.veh3d-marker {
  background: transparent;
  border: 0;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.72));
  transition: transform 0.14s ease;
}
.veh3d-marker:hover,
.veh3d-marker:focus-visible {
  transform: scale(1.14);
  z-index: 12;
}
.veh3d-svg-wrap {
  width: 44px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.veh3d-stem {
  width: 1.5px;
  height: 16px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.85), rgba(56, 189, 248, 0.12));
  pointer-events: none;
}
.veh3d-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.15;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(9, 19, 23, 0.90);
  border: 1px solid rgba(240, 215, 174, 0.42);
  color: #fff8ec;
  white-space: nowrap;
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.veh3d-marker.veh3d-mockup .veh3d-tag {
  border-color: rgba(248, 190, 90, 0.72);
  background: rgba(28, 20, 6, 0.92);
  color: #fde68a;
}
.veh3d-marker.veh3d-sqk7700 .veh3d-tag {
  background: #dc2626;
  border-color: #fecaca;
  color: #ffffff;
}
@keyframes heliSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes lightbarRed { 0%,49% { fill: #ff2e43; opacity: 1; } 50%,100% { fill: #7f1d1d; opacity: 0.45; } }
@keyframes lightbarRb { 0%,49% { fill: #ef4444; } 50%,100% { fill: #3b82f6; } }
@keyframes lightbarAmber { 0%,49% { fill: #facc15; opacity: 1; } 50%,100% { fill: #78350f; opacity: 0.45; } }
@keyframes boatWake { 0%,100% { transform: scale(0.95); opacity: 0.55; } 50% { transform: scale(1.06); opacity: 0.92; } }
@keyframes sqkRing { 0%,100% { stroke-opacity: 1; stroke-width: 2.2; } 50% { stroke-opacity: 0.3; stroke-width: 3.4; } }
.heli-rotor-spin { transform-box: fill-box; transform-origin: center; animation: heliSpin 0.42s linear infinite; }
.lightbar-red { animation: lightbarRed 0.65s infinite; }
.lightbar-rb { animation: lightbarRb 0.55s infinite; }
.lightbar-amber { animation: lightbarAmber 0.8s infinite; }
.boat-wake-ring { transform-box: fill-box; transform-origin: center; animation: boatWake 1.8s ease-in-out infinite; }
.sqk7700-ring { animation: sqkRing 0.9s ease-in-out infinite; }

.sqk7700-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid rgba(38, 235, 216, 0.48);
  background: rgba(14, 38, 42, 0.88);
  color: var(--aqua);
  white-space: nowrap;
}
.sqk7700-pill.sqk-alert {
  background: #dc2626;
  border-color: #fecaca;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.72);
}

.mockup-studio-dock {
  position: fixed;
  top: 102px;
  right: 56px;
  z-index: 48;
  width: min(356px, calc(100vw - 24px));
  max-height: calc(100vh - 284px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  pointer-events: auto;
  overflow-y: auto;
}
.mockup-studio-dock[hidden] { display: none !important; }
.mockup-banner {
  background: repeating-linear-gradient(135deg, rgba(245, 158, 11, 0.24) 0 10px, rgba(28, 20, 6, 0.86) 10px 20px);
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #fde68a;
  line-height: 1.3;
}
.mockup-unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.mockup-unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(10, 20, 24, 0.78);
  border: 1px solid rgba(240, 215, 174, 0.22);
  font-size: 11px;
}
.mockup-unit-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.mockup-unit-ctrl button {
  min-height: 22px;
  min-width: 22px;
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 3px;
}
@media (max-width: 1023px) {
  .mockup-studio-dock {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .heli-rotor-spin, .lightbar-red, .lightbar-rb, .lightbar-amber, .boat-wake-ring, .sqk7700-ring {
    animation: none !important;
  }
}

/* Historical Archive Markers & Filter Strip */
.veh3d-marker.veh3d-hist {
  opacity: 0.88;
  filter: saturate(0.75) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.70));
}
.veh3d-marker.veh3d-hist .veh3d-tag {
  background: rgba(34, 24, 14, 0.92);
  border: 1px dashed #d97706;
  color: #fde68a;
}
.raph-pin.pin-hist {
  border: 1px dashed #d97706;
  border-left: 3px solid #d97706;
  background: linear-gradient(155deg, rgba(44, 30, 16, 0.94), rgba(22, 16, 10, 0.96));
}
.raph-pin.pin-hist .pin-badge { background: rgba(217, 119, 6, 0.28); color: #fde68a; }

/* Stations, Depots & Emergency Lifelines Markers */
.raph-pin.pin-station { border-left: 3px solid #ef4444; background: linear-gradient(155deg, rgba(54, 16, 20, 0.95), rgba(22, 10, 14, 0.97)); }
.raph-pin.pin-station .pin-badge { background: rgba(239, 68, 68, 0.30); color: #fecaca; }
.raph-pin.pin-depot { border-left: 3px solid #26ebd8; background: linear-gradient(155deg, rgba(16, 48, 52, 0.95), rgba(10, 24, 28, 0.97)); }
.raph-pin.pin-depot .pin-badge { background: rgba(38, 235, 216, 0.24); color: #a7f3d0; }
.raph-pin.pin-fuel { border-left: 3px solid #22c55e; background: linear-gradient(155deg, rgba(14, 48, 28, 0.95), rgba(8, 24, 14, 0.97)); }
.raph-pin.pin-fuel .pin-badge { background: rgba(34, 197, 94, 0.28); color: #bbf7d0; }
.raph-pin.pin-pharmacy { border-left: 3px solid #38bdf8; }
.raph-pin.pin-pharmacy .pin-badge { background: rgba(56, 189, 248, 0.25); color: #bae6fd; }

.hist-banner-dock,
.lifeline-banner-dock {
  position: fixed;
  top: 102px;
  left: auto;
  right: 56px;
  transform: none;
  z-index: 46;
  width: min(620px, calc(100vw - 470px));
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 10px;
  pointer-events: auto;
}
.hist-banner-dock[hidden],
.lifeline-banner-dock[hidden] { display: none !important; }
.lifeline-banner-dock { top: auto; bottom: 196px; right: 12px; left: auto; transform: none; width: min(520px, calc(100vw - 440px)); }
@media (max-width: 1023px) {
  .hist-banner-dock, .lifeline-banner-dock {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 6px;
  }
}

/* Solid Opaque Windy Weather/Lightning Modal & Rescue Totals Grid */
.windy-modal-box {
  background: #091317 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.windy-frame {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 1px solid rgba(38, 235, 216, 0.38);
  border-radius: 4px;
  background: #091317;
}
@media (max-width: 960px) {
  .windy-frame { min-height: 360px; }
}
.totals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 6px 0;
}
.totals-cell {
  background: rgba(10, 20, 24, 0.82);
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

/* Airport Pins & Live FIDS / METAR Modal UI */
.raph-pin.pin-airport-green { border-left: 3px solid #22c55e; background: linear-gradient(155deg, rgba(12, 46, 28, 0.96), rgba(7, 22, 16, 0.97)); }
.raph-pin.pin-airport-green .pin-badge { background: rgba(34, 197, 94, 0.28); color: #bbf7d0; }
.raph-pin.pin-airport-amber { border-left: 3px solid #f59e0b; background: linear-gradient(155deg, rgba(50, 34, 12, 0.96), rgba(24, 16, 8, 0.97)); }
.raph-pin.pin-airport-amber .pin-badge { background: rgba(245, 158, 11, 0.28); color: #fde68a; }
.raph-pin.pin-airport-red { border-left: 3px solid #ef4444; background: linear-gradient(155deg, rgba(64, 14, 18, 0.96), rgba(28, 8, 12, 0.97)); }
.raph-pin.pin-airport-red .pin-badge { background: rgba(239, 68, 68, 0.34); color: #fecaca; }
.raph-pin.pin-airport-slate { border-left: 3px solid #64748b; }
.raph-pin.pin-airport-slate .pin-badge { background: rgba(100, 116, 139, 0.28); color: #e2e8f0; }

.airports-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0 8px;
  border-bottom: 1px solid rgba(240, 215, 174, 0.16);
}
.airport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}
.fids-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 6px;
  border: 1px solid rgba(240, 215, 174, 0.18);
  border-radius: 4px;
}
.fids-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 520px;
}
.fids-table th,
.fids-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(240, 215, 174, 0.12);
  white-space: nowrap;
}
.fids-table th {
  background: rgba(10, 24, 30, 0.95);
  color: #fde68a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fids-table tbody tr:hover {
  background: rgba(38, 235, 216, 0.08);
}
.fids-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}
.fids-on-time { background: rgba(34, 197, 94, 0.24); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.45); }
.fids-done { background: rgba(56, 189, 248, 0.22); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.42); }
.fids-delayed { background: rgba(245, 158, 11, 0.28); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.55); }
.fids-cancelled { background: rgba(239, 68, 68, 0.30); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.60); }
@media (max-width: 760px) {
  .airport-grid { grid-template-columns: 1fr; }
}

/* Built-In PulsePoint BC + Multi-Channel Radio Scanner Workspace & Floating Dock */
html.pulsepoint-workspace-open #raphael-maplibre-host,
html.pulsepoint-workspace-open #raphael-globe-canvas {
  visibility: hidden !important;
  pointer-events: none !important;
}
.chr-modal-backdrop.chr-modal-solid {
  background: rgba(4, 10, 14, 0.96);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 95;
}
.chr-modal.chr-modal-workspace {
  width: min(1380px, calc(100vw - 16px));
  height: min(92vh, 880px);
  background: #071318;
  border: 1px solid rgba(38, 235, 216, 0.38);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
}
.dispatch-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(330px, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.dispatch-workspace-grid[data-mode="pulsepoint"] {
  grid-template-columns: 1fr;
}
.dispatch-workspace-grid[data-mode="pulsepoint"] .dispatch-scanner-pane {
  display: none !important;
}
.dispatch-workspace-grid[data-mode="scanner"] {
  grid-template-columns: 1fr;
}
.dispatch-workspace-grid[data-mode="scanner"] .dispatch-pulsepoint-pane {
  display: none !important;
}
.dispatch-pulsepoint-pane,
.dispatch-scanner-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
}
.pulsepoint-embed-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #0a181e;
  border: 1px solid rgba(38, 235, 216, 0.3);
  border-radius: 6px;
  overflow: hidden;
}
.pulsepoint-notice-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  background: #0c1f27;
  border-bottom: 1px solid rgba(38, 235, 216, 0.24);
  font-size: 11px;
  color: #d7e2df;
}
.pulsepoint-embed-shell .pulsepoint-frame {
  width: 100%;
  flex: 1;
  height: auto;
  min-height: 460px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  display: block;
}
.radio-console {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-height: 0;
}
.radio-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.radio-ch-btn {
  background: rgba(12, 28, 35, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 5px;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.radio-ch-btn:hover {
  border-color: rgba(38, 235, 216, 0.65);
  background: rgba(16, 40, 48, 0.96);
}
.radio-ch-btn.active {
  border-color: #26ebd8;
  background: rgba(15, 52, 60, 0.96);
  box-shadow: 0 0 0 1px rgba(38, 235, 216, 0.45);
}
.radio-ch-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff8ec;
}
.radio-ch-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #a6bab8;
}
.radio-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: #64748b;
}
.radio-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.72);
}
.radio-status-dot.offline {
  background: #ef4444;
}
.radio-telemetry-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(10, 24, 30, 0.95);
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-radius: 5px;
  font-size: 11px;
}
.radio-player-shell {
  position: relative;
  flex: 1;
  min-height: 290px;
  background: #0c1720;
  border: 1px solid rgba(38, 235, 216, 0.32);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.radio-scanner-frame {
  width: 100%;
  flex: 1;
  min-height: 280px;
  border: 0;
  background: #ffffff;
  display: block;
}
.radio-standby-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(16, 40, 48, 0.96), rgba(7, 19, 24, 0.98));
  color: #d7e2df;
}
.radio-standby-cover[hidden] { display: none !important; }
.radio-dock {
  position: fixed;
  right: 12px;
  bottom: 92px;
  width: min(410px, calc(100vw - 24px));
  max-height: min(74vh, 560px);
  z-index: 84;
  background: #071318;
  border: 1px solid rgba(38, 235, 216, 0.48);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
  gap: 7px;
  pointer-events: auto;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.radio-dock[hidden] { display: none !important; }
.radio-dock-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.radio-dock.minimized {
  max-height: none;
  width: min(370px, calc(100vw - 24px));
  padding: 7px 10px;
}
.radio-dock.minimized .radio-dock-body {
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (max-width: 960px) {
  .chr-modal.chr-modal-workspace {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 8px;
  }
  .dispatch-workspace-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .pulsepoint-embed-shell .pulsepoint-frame {
    min-height: 360px;
  }
  .radio-dock {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 72px;
    max-height: 70vh;
  }
  .radio-dock.minimized {
    width: auto;
  }
}

/* =========================================================================
   ORANGE-AMBER BACKLIT CALCULATOR-STYLE DIGITAL RADIO SCANNER (MENU BAR)
   + ON-LOCATION DISPATCH & RADIO GUI TABS
   ========================================================================= */
.lcd-radio-unit {
  display: inline-flex;
  align-items: stretch;
  gap: 5px;
  padding: 3px 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, #1f282d 0%, #0d1317 100%);
  border: 1px solid #3c4d54;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 3px 10px rgba(0, 0, 0, 0.55);
  max-width: 100%;
  flex-shrink: 0;
}
.lcd-radio-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 196px;
  padding: 3px 7px;
  border-radius: 3px;
  border: 1.5px solid #4d2600;
  cursor: pointer;
  text-align: left;
  background: linear-gradient(180deg, #ffba42 0%, #f59412 52%, #d87400 100%);
  color: #1a0c00;
  box-shadow: inset 0 2px 5px rgba(55, 22, 0, 0.56), inset 0 -1px 2px rgba(255, 236, 179, 0.45), 0 0 12px rgba(255, 152, 0, 0.34);
  font-family: var(--font-mono);
  overflow: hidden;
  min-height: 0;
}
.lcd-radio-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(26, 12, 0, 0.055) 0 1px, transparent 1px 3px);
}
.lcd-radio-screen.is-live {
  box-shadow: inset 0 2px 5px rgba(55, 22, 0, 0.48), inset 0 -1px 2px rgba(255, 240, 190, 0.52), 0 0 18px rgba(255, 165, 20, 0.58);
}
.lcd-top-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  color: #241000;
}
.lcd-mode-badge {
  padding: 0 3px;
  border-radius: 2px;
  background: rgba(26, 12, 0, 0.14);
  border: 1px solid rgba(26, 12, 0, 0.25);
  color: #190a00;
}
.lcd-mode-badge.is-rx {
  background: #1a0c00;
  color: #ffbe4d;
  border-color: #1a0c00;
}
@keyframes lcdScanBlink {
  0%, 49% { opacity: 1; background: #1a0c00; color: #ffbe4d; }
  50%, 100% { opacity: 0.48; background: rgba(26, 12, 0, 0.18); color: #1a0c00; }
}
.lcd-mode-badge.scanning {
  animation: lcdScanBlink 0.9s steps(2, end) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .lcd-mode-badge.scanning { animation: none; background: #1a0c00; color: #ffbe4d; }
}
.lcd-sig-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.lcd-sig-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
  height: 8px;
}
.lcd-sig-bars i {
  display: block;
  width: 2px;
  background: rgba(26, 12, 0, 0.22);
  border-radius: 1px;
}
.lcd-sig-bars i:nth-child(1) { height: 2px; }
.lcd-sig-bars i:nth-child(2) { height: 4px; }
.lcd-sig-bars i:nth-child(3) { height: 6px; }
.lcd-sig-bars i:nth-child(4) { height: 8px; }
.lcd-sig-bars.s1 i:nth-child(1),
.lcd-sig-bars.s2 i:nth-child(-n+2),
.lcd-sig-bars.s3 i:nth-child(-n+3),
.lcd-sig-bars.s4 i {
  background: #1a0c00;
}
.lcd-freq-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  line-height: 1.05;
  margin: 1px 0;
}
.lcd-freq-digits {
  position: relative;
  display: inline-block;
}
.lcd-freq-ghost {
  position: absolute;
  inset: 0;
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: #190a00;
  opacity: 0.11;
  pointer-events: none;
  user-select: none;
}
.lcd-freq-val {
  position: relative;
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: #190a00;
  text-shadow: 0 1px 0 rgba(255, 224, 150, 0.35);
}
.lcd-freq-unit {
  font-size: 9.5px;
  font-weight: 800;
  color: #2c1400;
  letter-spacing: 0.04em;
}
.lcd-ch-name {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1e0d00;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 186px;
  line-height: 1.1;
}
.lcd-radio-keys {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px;
  align-content: center;
}
.lcd-key {
  min-height: 18px;
  min-width: 28px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.1;
  background: #141c20;
  color: #f8be5a;
  border: 1px solid rgba(248, 190, 90, 0.35);
  border-radius: 3px;
  cursor: pointer;
}
.lcd-key:hover {
  border-color: #ffba42;
  background: #1d282e;
}
.lcd-key.active {
  background: #f59412;
  color: #190a00;
  border-color: #ffd17a;
}

.dispatch-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.incident-feed-card {
  margin-bottom: 7px;
}
#pulsepoint-tab-slot,
#radio-tab-slot {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #071318;
  border: 1px solid rgba(38, 235, 216, 0.28);
  border-radius: 6px;
  padding: 6px;
  min-height: 300px;
}
#pane-dispatch .pulsepoint-embed-shell .pulsepoint-frame {
  min-height: 430px;
}
#pane-radio .radio-player-shell {
  min-height: 250px;
}

.dispatch-db-strip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--aqua);
  background: rgba(8, 22, 27, 0.88);
  border: 1px solid rgba(38, 235, 216, 0.34);
  border-radius: 4px;
  padding: 5px 8px;
  margin-bottom: 6px;
}
.dispatch-viewport-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.inc-dist-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--aqua);
  background: rgba(11, 29, 34, 0.85);
  border: 1px solid rgba(38, 235, 216, 0.36);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: auto;
}
.badge-cleared {
  background: rgba(71, 85, 105, 0.32);
  color: #fde68a;
  border: 1px dashed rgba(245, 158, 11, 0.55);
}
.incident-feed-card.inc-cleared {
  opacity: 0.78;
  border-left-style: dashed;
}

@media (max-width: 640px) {
  .lcd-radio-unit {
    width: 100%;
    justify-content: space-between;
  }
  .lcd-radio-screen {
    min-width: 0;
    flex: 1;
  }
  .lcd-ch-name {
    max-width: 100%;
  }
}

@media print {
  .map-bg-stage, .map-bg-vignette, .topbar, .controls-bar, .chr-top-bar, .chr-bottom-dock, button, .no-print, .hud-restore-pill { display: none !important; }
  body, html { background: #ffffff !important; color: #000000 !important; }
  .panel, .card, .chr-left-panel { border: 1px solid #000 !important; background: #fff !important; color: #000 !important; box-shadow: none !important; }
}
