:root {
  --bg: #0c111a;
  --panel: #141c28;
  --panel-dark: #101722;
  --surface: #1c2634;
  --line: #283444;
  --text: #edf2f8;
  --muted: #9baabe;
  --faint: #7b8ca2;
  --mint: #85dfc0;
  --orange: #e9bc7f;
  --accent: #a9c7f7;
  --sidebar: 356px;
  --header: 88px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { font-size: 13px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: var(--accent); }
strong { font-weight: 600; }
small { font-size: 11px; }
button, input, select { border-radius: 8px; }
button, a, input, select, summary { outline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); }
button { transition: background .16s, border-color .16s, color .16s, box-shadow .16s; }
button:hover:not(:disabled) { color: white; }
input, select { min-width: 0; border: 1px solid var(--line); background: var(--panel-dark); color: var(--text); padding: 10px 11px; }
input::placeholder { color: var(--faint); }
select { cursor: pointer; }
input[type="range"], input[type="checkbox"] { accent-color: var(--mint); cursor: pointer; }
input[type="range"] { padding: 0; }
input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; }
.hidden, [hidden] { display: none !important; }
.icon { width: 18px; height: 18px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
kbd { font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); padding: 2px 5px; }

/* A quiet application frame leaves the map as the primary surface. */
.topbar { height: var(--header); display: flex; align-items: center; gap: 24px; padding: 0 26px; }
.title-block { min-width: 235px; display: flex; flex-direction: column; gap: 6px; }
.dashboard-title { font-size: 18px; font-weight: 600; letter-spacing: -.4px; }
.dashboard-subtitle { color: var(--faint); font-size: 11px; }
.live-status { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #283e3b; border-radius: 7px; background: #162725; color: #b7e7d7; font-size: 11px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--faint); flex-shrink: 0; }
.status-dot.online { background: var(--mint); box-shadow: 0 0 0 3px #85dfc012; }
.status-dot.offline { background: #f09b91; }
.status-dot.idle { background: var(--orange); }
.badge { font-size: 9px; letter-spacing: .6px; color: var(--orange); padding-left: 7px; border-left: 1px solid #49615a; }
.top-stats { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.top-stats > div { display: flex; flex-direction: column; gap: 5px; min-width: 89px; padding-left: 20px; border-left: 1px solid var(--line); }
.top-stats strong { font-size: 24px; font-weight: 500; letter-spacing: -.7px; line-height: 1; font-variant-numeric: tabular-nums; }
.top-stats span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.clock-block { min-width: 112px; display: flex; flex-direction: column; gap: 7px; padding-left: 22px; border-left: 1px solid var(--line); }
.clock-block > span { color: var(--faint); font-size: 10px; }
.weather-block { display: flex; flex-direction: column; gap: 7px; padding-left: 22px; border-left: 1px solid var(--line); max-width: 260px; cursor: help; }
.weather-block > span { color: var(--faint); font-size: 10px; letter-spacing: .3px; }
.weather-block > span[data-category="VFR"] { color: var(--mint); }
.weather-block > span[data-category="MVFR"] { color: #8fb6ff; }
.weather-block > span[data-category="IFR"] { color: #ff8a8f; }
.weather-block > span[data-category="LIFR"] { color: #e48cf0; }
.weather-block strong { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kind-badge { display: inline-block; margin-left: 6px; padding: 1px 5px; border: 1px solid #6bd3f180; border-radius: 4px; color: #8fe0f6; font-size: 8.5px; font-weight: 600; letter-spacing: .4px; vertical-align: 1px; }
#clock { font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; color: #c8d4e4; white-space: nowrap; }
#mobile-menu { display: none; }
.workspace { height: calc(100% - var(--header)); height: calc(100dvh - var(--header)); display: flex; gap: 14px; padding: 0 16px 16px; }
.sidebar { width: var(--sidebar); min-width: var(--sidebar); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; z-index: 1000; box-shadow: 0 6px 24px #0000000d; }
.sidebar-heading { padding: 22px 20px 17px; }
.sidebar-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
h1 { font-size: 23px; font-weight: 600; letter-spacing: -.65px; margin: 0; }
.section-tag { color: var(--muted); background: #202a38; border: 1px solid #2e3a4b; border-radius: 5px; font-size: 10px; padding: 3px 6px; }
.sidebar-heading p { font-size: 10px; line-height: 1.6; color: var(--faint); margin: 0; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 3px; padding: 4px; margin: 0 16px 4px; border: 1px solid #242f3f; border-radius: 9px; background: #101721; flex-shrink: 0; }
.tab { display: flex; flex: 1; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 7px 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tab .icon { width: 14px; height: 14px; }
.tab:hover { background: #1b2533; }
.tab.active { background: #273447; border-color: #3a4a60; color: #f4f7fc; box-shadow: 0 2px 5px #0002; }
.tab span { display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; background: #a9c7f719; color: var(--accent); border-radius: 4px; font-size: 9px; }
.tab-panel { padding: 16px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-color: #3a495b transparent; scrollbar-width: thin; }
#panel-traffic { display: flex; flex-direction: column; overflow: hidden; }
.search { display: flex; align-items: center; flex-shrink: 0; gap: 8px; min-height: 40px; background: var(--panel-dark); border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; transition: border-color .15s; }
.search:focus-within { border-color: #7594bd; box-shadow: 0 0 0 3px #a9c7f708; }
.search > .icon { width: 16px; height: 16px; color: var(--faint); }
.search input { width: 100%; padding: 10px 0; border: 0; background: transparent; font-size: 12px; outline: none; }
.search kbd { margin-left: auto; }
.filter-row { display: flex; gap: 8px; margin-top: 10px; }
.filter-row select { width: 50%; padding: 9px 8px; font-size: 11px; color: #bac8d9; }
.range-filter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 16px 0 17px; color: var(--muted); font-size: 11px; }
.range-filter output { color: #d5e0ee; font-size: 10px; font-variant-numeric: tabular-nums; }
.range-filter input { width: 100%; height: 3px; margin: 5px 0; }
.list-label { display: flex; justify-content: space-between; padding: 4px 8px 10px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 9px; letter-spacing: .7px; }
.aircraft-list { flex: 1; min-height: 64px; overflow: auto; scrollbar-width: thin; scrollbar-color: #3a495b transparent; margin: 0 -5px; padding: 5px; }
.aircraft-row { width: 100%; display: flex; text-align: left; align-items: center; gap: 9px; padding: 14px 8px; background: transparent; border: 1px solid transparent; border-bottom-color: #263140; border-radius: 7px; }
.aircraft-row:hover { background: #1e2a39; }
.aircraft-row.selected { background: #223547; border-color: #779ec17a; box-shadow: inset 3px 0 var(--accent); }
.aircraft-row.emergency { background: #793e3e33; border-color: #a25b5b; }
.plane-dot { width: 30px; height: 34px; display: grid; place-items: center; flex-shrink: 0; }
.plane-dot svg { width: 25px; height: 25px; }
.aircraft-ident { flex: 1; min-width: 0; }
.aircraft-ident strong { display: block; font-size: 13px; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aircraft-ident small { display: block; font-size: 10px; margin-top: 5px; color: var(--muted); }
.aircraft-alt { text-align: right; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aircraft-alt small { display: block; font-size: 10px; color: var(--faint); margin-top: 5px; }
.watch-star .icon { width: 12px; height: 12px; }
.watch-star { color: var(--orange); font-size: 11px; }
.empty-state { min-height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 24px 12px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-visual { position: relative; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #a9c7f706; border: 1px solid #a9c7f714; color: #91aac7; margin-bottom: 14px; box-shadow: 0 0 0 9px #a9c7f703; }
.empty-visual .icon { width: 30px; height: 30px; stroke-width: 1.1; }
.empty-state h3 { margin: 0 0 5px; font-size: 13px; font-weight: 500; color: #d9e2ee; }
.empty-state p { margin: 0; max-width: 230px; color: var(--faint); font-size: 11px; line-height: 1.7; }
.empty-state .button { margin-top: 14px; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; flex-shrink: 0; padding-top: 12px; font-size: 9px; color: var(--faint); }
.sidebar-footer .status-dot { width: 5px; height: 5px; box-shadow: none; }
.shortcut { margin-left: auto; white-space: nowrap; font-size: 9px; }
.shortcut kbd { margin-right: 3px; font-size: 9px; }
.receiver-panel { flex-shrink: 0; padding: 16px 20px 19px; background: #111925; border-top: 1px solid var(--line); max-height: 28%; overflow: auto; scrollbar-width: thin; }
.receiver-panel summary { display: flex; align-items: center; gap: 7px; list-style: none; cursor: pointer; font-size: 11px; color: #c5d0df; font-weight: 500; }
.receiver-panel summary::-webkit-details-marker { display: none; }
.receiver-panel summary::before { content: ''; width: 5px; height: 5px; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); transform: rotate(45deg) translateY(-2px); margin-right: 3px; }
.receiver-panel:not([open]) summary::before { transform: rotate(-45deg); }
.receiver-panel summary span { margin-left: auto; color: var(--faint); font-size: 9px; font-weight: 400; }
.receiver-item { display: flex; align-items: center; gap: 9px; margin-top: 16px; font-size: 11px; color: var(--muted); }
.receiver-item strong { color: #c0cddd; font-weight: 400; }
.receiver-item small { margin-left: auto; font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sidebar-scrim { display: none; }

/* Map tools share one visual language, including the map library controls. */
.map-stage { flex: 1; min-width: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #161e27; isolation: isolate; }
#map { position: absolute; inset: 0; background: #161e27; }
.basemap-tiles { filter: grayscale(1) invert(1) brightness(.65) contrast(.95); }
.map-toolbar { position: absolute; top: 16px; left: 16px; display: flex; flex-wrap: wrap; gap: 8px; max-width: calc(100% - 84px); z-index: 800; }
.map-mode { display: flex; padding: 4px; border: 1px solid #3c4859; border-radius: 9px; background: #141d2bee; box-shadow: 0 4px 20px #0003; backdrop-filter: blur(14px); }
.map-mode button { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 5px; background: transparent; color: #a8b6c9; font-size: 11px; white-space: nowrap; }
.map-mode .icon { width: 15px; height: 15px; }
.map-mode button.active { color: #e8effa; background: #35465d; box-shadow: 0 1px 4px #0002; }
.map-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; background: #141d2bf2; border: 1px solid #3c4859; color: #c8d5e6; font-size: 11px; border-radius: 8px; box-shadow: 0 3px 12px #0002; backdrop-filter: blur(14px); }
.map-button:hover, .icon-button:hover { background: #28394e; border-color: #69809d; }
.map-button.active, .icon-button.active { color: var(--accent); background: #25384e; border-color: #577599; }
.icon-button { width: 38px; height: 38px; padding: 0; flex-shrink: 0; }
.map-settings { display: flex; flex-direction: column; gap: 8px; position: absolute; top: 16px; right: 16px; z-index: 800; }
#toggle-units { font-size: 11px; font-weight: 500; }
.map-caption { position: absolute; bottom: 60px; left: 17px; display: flex; flex-direction: column; gap: 5px; padding: 11px 13px; border: 1px solid #3c485966; background: #121b29e6; border-radius: 8px; backdrop-filter: blur(10px); z-index: 700; pointer-events: none; }
.eyebrow { font-size: 9px; letter-spacing: 1px; color: var(--accent); font-weight: 500; }
.map-caption .eyebrow { display: flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: .8px; color: #c6d6e9; }
.map-caption .eyebrow::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.map-caption > span:last-child { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.altitude-legend { position: absolute; right: 17px; bottom: 60px; width: 192px; padding: 11px 13px; border: 1px solid #3c485966; border-radius: 8px; background: #121b29e6; backdrop-filter: blur(10px); z-index: 700; pointer-events: none; }
.altitude-legend > div { display: flex; justify-content: space-between; font-size: 9px; color: #b4c3d7; }
.altitude-legend > div:first-child { font-size: 8px; letter-spacing: .7px; }
.altitude-ramp { height: 4px; margin: 8px 0 7px; border-radius: 2px; background: linear-gradient(90deg,#7fe1c4,#6bd3f1,#f9dd84,#f2a46e,#ea7a8f,#bb9bf0); }
.map-message { position: absolute; top: 80px; left: 16px; max-width: min(430px,calc(100% - 88px)); padding: 12px 15px; border: 1px solid #556b88; background: #172437f2; color: #c6d8eb; font-size: 12px; line-height: 1.65; border-radius: 8px; z-index: 900; }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 9px !important; background: #121b29d9 !important; color: #95a6bc !important; }
.leaflet-control-attribution a { color: #b7c9df !important; }
.leaflet-control-zoom { border: 1px solid #3c4859 !important; box-shadow: 0 3px 12px #0002 !important; border-radius: 8px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 20px !important; font-weight: 400 !important; background: #141d2bf2 !important; color: #c8d5e6 !important; border-color: #3c4859 !important; }
.leaflet-control-zoom a:hover { background: #28394e !important; }
.leaflet-top.leaflet-right { top: 250px; right: 6px; }
.leaflet-control-scale-line { background: #121b29c9; border-color: #8a9fb8; color: #b5c7dd; font-size: 9px; }
.leaflet-bottom.leaflet-left { bottom: 5px; left: 8px; }
.mapboxgl-ctrl-top-right { top: 342px !important; right: 6px !important; }
.mapboxgl-ctrl-group { background: #141d2bf2 !important; border: 1px solid #3c4859 !important; border-radius: 8px !important; box-shadow: 0 3px 12px #0002 !important; }
.mapboxgl-ctrl-group button { width: 36px !important; height: 36px !important; }
.mapboxgl-ctrl-group button + button { border-color: #3c4859 !important; }
.mapboxgl-ctrl-group .mapboxgl-ctrl-icon { filter: invert(.85); }
.mapboxgl-ctrl-bottom-right { max-width: 85%; font-size: 9px; }
.mapboxgl-canvas { outline: 0; }
.mapboxgl-marker button { border: 0; padding: 0; background: none; }
.plane-marker { background: none; border: 0; }
.plane-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.plane-wrap.selected::before { content: ''; position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #edfaf4b3; box-shadow: 0 0 0 5px #a9c7f719; pointer-events: none; }
.plane-wrap.stale { opacity: .5; }
.plane-label { position: absolute; left: 29px; top: 3px; white-space: nowrap; font-size: 10px; font-weight: 500; color: #ecf3fc; text-shadow: 0 1px 3px #061419; border: 1px solid #53698444; background: #101a28c9; border-radius: 4px; padding: 3px 5px; pointer-events: none; }
.plane-label small { display: block; font-size: 9px; color: #b5c7dd; margin-top: 2px; }
.receiver-marker { width: 15px; height: 15px; border: 3px solid #bfd5ef; background: #365274; box-shadow: 0 0 0 6px #a9c7f71c,0 0 0 1px #0c111a; border-radius: 50%; }
.leaflet-tooltip { background: #141d2bf2; color: #d3dfed; border: 1px solid #3c4859; border-radius: 6px; box-shadow: none; font-size: 11px; padding: 6px 10px; }
.leaflet-tooltip-top::before { border-top-color: #3c4859; }

/* Detail and analysis panels. */
.selection-card { position: absolute; top: 78px; right: 70px; width: 310px; padding: 22px; border: 1px solid #4a5c73; border-radius: 13px; background: #141f2ef7; backdrop-filter: blur(18px); box-shadow: 0 16px 50px #0005; z-index: 900; max-height: calc(100% - 100px); overflow-y: auto; scrollbar-width: thin; }
.selection-head { display: flex; justify-content: space-between; gap: 10px; }
.selection-head h2 { font-size: 27px; font-weight: 600; letter-spacing: -.6px; margin: 7px 0; }
.selection-head .icon-button { width: 26px; height: 26px; background: transparent; border: 0; box-shadow: none; color: var(--muted); font-size: 22px; }
.selection-meta { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 6px 0 20px; }
.selection-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.selection-metrics small { display: block; color: var(--faint); font-size: 9px; letter-spacing: .5px; margin-bottom: 7px; }
.selection-metrics strong { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.selection-metrics strong span { color: var(--muted); font-size: 11px; margin-left: 4px; }
.selection-card .button-row { margin-top: 17px; }
.selection-card .hint { font-size: 10px; margin-bottom: 0; }
.selection-card { padding-top: 0; }
.selection-body { padding-top: 22px; }
.selection-media { margin: 0 -22px; border-radius: 12px 12px 0 0; overflow: hidden; background: #0e1520; }
.selection-media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.selection-media figcaption { padding: 6px 12px; color: var(--faint); font-size: 9px; }
.selection-details { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 9px; }
.selection-details > div { display: grid; grid-template-columns: 74px 1fr; gap: 8px; font-size: 11px; line-height: 1.5; }
.selection-details dt { color: var(--faint); font-size: 9.5px; letter-spacing: .3px; text-transform: uppercase; padding-top: 1px; }
.selection-details dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.selection-card .route-note { margin: 8px 0 0; font-size: 9px; line-height: 1.6; }
.external-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0 4px; font-size: 10.5px; }
.external-links a { text-decoration: none; }
.external-links a:hover { text-decoration: underline; }
.leaflet-tooltip.airport-label { background: #101722e6; border: 1px solid #a9c7f766; color: #d4e6ff; font-size: 10px; font-weight: 600; padding: 1px 5px; box-shadow: none; }
.leaflet-tooltip.airport-label::before { display: none; }
.altitude-profile { display: block; width: 100%; height: 54px; margin: 20px 0 8px; border-bottom: 1px solid var(--line); }
.selection-emergency { color: #ffaba9; border: 1px solid #835252; background: #a4545415; border-radius: 6px; padding: 8px 10px; font-size: 11px; margin-bottom: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 9px 12px; border: 1px solid #3c4b60; border-radius: 7px; background: #243245; color: #dce6f4; text-decoration: none; font-size: 11px; line-height: 1.4; }
.button .icon { width: 15px; height: 15px; }
.button:hover { background: #30435c; border-color: #647fa1; }
.button.accent { background: #a9c7f7; color: #142239; border-color: #a9c7f7; font-weight: 600; }
.button.accent:hover { background: #c0d7fc; color: #142239; }
.button.subtle { background: transparent; color: #bdcce0; }
.button.subtle:hover { background: #263449; }
.button.active { border-color: #799bc4; background: #294460; color: #d4e6ff; }
.button.wide { width: 100%; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.section-heading h2 { font-size: 19px; font-weight: 500; letter-spacing: -.35px; margin: 3px 0 7px; }
.section-heading p, .hint { font-size: 11px; color: var(--muted); line-height: 1.75; }
.section-heading p { margin: 0 0 21px; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: #b7c5d7; margin-bottom: 12px; }
.field select, .field input { max-width: 64%; font-size: 11px; }
.layer-card { display: flex; align-items: center; gap: 10px; padding: 13px 11px; margin: 10px 0; border: 1px solid var(--line); background: #192432; border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.layer-card:hover { border-color: #536782; }
.layer-card:has(input:checked) { border-color: #5d7488; background: #1c2938; }
.layer-card input { margin: 0; }
.layer-card .line-key { width: 22px; flex-shrink: 0; border-bottom: 2px solid #d5e2de; }
.layer-card.actual .line-key { height: 12px; border: 1.5px solid #d5e2de; background: #d5e2de24; border-radius: 2px; }
.layer-card.guessed .line-key { border-bottom: 2px dashed #d5e2de; }
.link-button { border: 0; background: none; padding: 0; color: var(--accent); font-size: 11px; }
.link-button:hover { text-decoration: underline; }
.altitude-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 5px; margin: -4px 0 12px; }
#path-altitudes { grid-template-columns: repeat(3, 1fr); }
.path-altitude-field { margin: 14px 0 12px; }
.altitude-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 999px; background: #151e2a; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s, color .15s; }
.altitude-chip:hover { border-color: #536782; }
.altitude-chip[aria-pressed="true"] { color: var(--text); border-color: color-mix(in srgb, var(--ring) 55%, var(--line)); background: color-mix(in srgb, var(--ring) 12%, #151e2a); }
.ring-swatch { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; background: var(--ring); }
.altitude-chip[aria-pressed="false"] .ring-swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ring); }
.coverage-table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 11px; font-variant-numeric: tabular-nums; }
.coverage-table th, .coverage-table td { padding: 7px 4px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
.coverage-table thead th { color: var(--faint); font-size: 9px; font-weight: 500; letter-spacing: .3px; text-transform: uppercase; }
.coverage-table th:first-child { text-align: left; white-space: nowrap; }
.coverage-table tbody th { font-weight: 500; }
.coverage-table tbody th .ring-swatch { margin-right: 7px; vertical-align: -1px; }
.coverage-table td small { display: block; color: var(--faint); font-size: 9px; margin-top: 2px; }
.coverage-table tr.muted { opacity: .45; }
.layer-card strong { display: block; font-size: 12px; font-weight: 500; }
.layer-card small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; }
#fit-coverage { margin: 4px 0 15px; }
.coverage-directions { color: var(--mint); font-size: 10px; line-height: 1.5; margin: -4px 0 13px; }
.coverage-plot { border: 1px solid var(--line); background: var(--panel-dark); border-radius: 9px; margin-bottom: 14px; }
.plot-heading { display: flex; justify-content: space-between; align-items: center; padding: 12px 13px 0; color: var(--muted); font-size: 10px; }
.plot-heading .icon { width: 14px; height: 14px; color: var(--faint); }
#coverage-chart { display: block; width: 100%; height: auto; margin: -1px auto 2px; }
.coverage-metrics { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--panel-dark); border-radius: 8px; }
.coverage-metrics > div { padding: 13px 12px; }
.coverage-metrics > div + div { border-left: 1px solid var(--line); }
.coverage-metrics strong { display: block; font-size: 21px; font-weight: 500; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.coverage-metrics small { display: block; color: var(--faint); font-size: 8px; letter-spacing: .35px; line-height: 1.4; margin-top: 6px; }
.fine-print { font-size: 10px; line-height: 1.8; color: var(--faint); margin: 17px 0 8px; }
.archive-card { padding: 18px; border: 1px solid #35475f; border-radius: 9px; background: linear-gradient(125deg,#24364d,#1b293a); margin-bottom: 20px; }
.archive-card .eyebrow { font-size: 9px; }
.archive-stats { display: flex; align-items: baseline; gap: 10px; margin: 12px 0; }
.archive-stats strong { font-size: 36px; line-height: 1; font-weight: 500; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.archive-stats span { color: var(--muted); font-size: 11px; }
.archive-card .hint { font-size: 10px; margin-bottom: 0; }
.section-divider { height: 1px; background: var(--line); margin: 23px 0; }
h3 { font-size: 13px; font-weight: 500; margin: 0 0 15px; }
.history-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 15px 3px; text-align: left; }
.history-row:hover { background: #202d3e; }
.history-row strong { display: block; font-size: 12px; }
.history-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; }
.history-row > span:last-child { color: var(--accent); font-size: 10px; white-space: nowrap; }
.replay-bar { position: absolute; left: 16px; right: 16px; bottom: 115px; display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid #4b6483; border-radius: 9px; background: #162437f5; box-shadow: 0 5px 25px #0003; z-index: 950; }
.replay-bar input { flex: 1; min-width: 45px; }
.replay-bar time { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.replay-badge { font-size: 9px; letter-spacing: .7px; color: var(--orange); }
.replay-bar select { font-size: 11px; padding: 8px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2000; max-width: min(520px,90vw); padding: 14px 20px; border: 1px solid #627e9d; border-radius: 9px; background: #24364d; color: #ebf2fc; box-shadow: 0 8px 30px #0005; font-size: 12px; line-height: 1.6; }
.no-script { position: fixed; top: 40%; left: 20%; right: 20%; z-index: 3000; padding: 30px; background: #24364d; border-radius: 12px; }
.map-stage:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }

@media (min-width: 1500px) {
  :root { --sidebar: 380px; }
  .workspace { gap: 18px; padding: 0 20px 20px; }
  .sidebar-heading { padding: 25px 24px 20px; }
  .tabs { margin-inline: 20px; }
  .tab-panel { padding: 20px; }
  .tab { font-size: 12px; }
  .receiver-panel { padding-inline: 24px; }
}
@media (max-width: 1180px) {
  :root { --sidebar: 334px; }
  .topbar { gap: 18px; padding-inline: 22px; }
  .title-block { min-width: 230px; }
  .top-stats { gap: 12px; }
  .top-stats > div { padding-left: 15px; min-width: 85px; }
  .clock-block { display: none; }
  #home-view span { display: none; }
  .tab { font-size: 10px; gap: 4px; }
  .tab .icon { width: 13px; height: 13px; }
  .selection-card { width: 290px; padding: 0 20px 20px; }
  .selection-media { margin-inline: -20px; }
  .selection-body { padding-top: 20px; }
  .weather-block { max-width: 190px; padding-left: 15px; }
  .map-caption { padding: 10px; }
  .altitude-legend { width: 165px; padding: 10px; }
}
@media (min-width: 761px) and (max-width: 940px) {
  :root { --sidebar: 314px; }
  .workspace { gap: 10px; padding-inline: 12px; }
  .title-block { min-width: 185px; }
  .dashboard-title { font-size: 17px; }
  .dashboard-subtitle { font-size: 10px; }
  .top-stats > div { min-width: 72px; padding-left: 12px; }
  .top-stats span { font-size: 9px; }
  .map-mode .icon { display: none; }
  #all-paths span, #toggle-corridors span { display: none; }
  .weather-block { display: none; }
  .shortcut { display: none; }
  .map-caption { bottom: 100px; }
}
@media (max-width: 760px) {
  :root { --header: 124px; --sidebar: min(360px,calc(100vw - 24px)); }
  .topbar { display: grid; grid-template-columns: 1fr auto auto; grid-template-rows: 62px 50px; align-content: start; gap: 0 10px; padding: 0 16px; }
  .weather-block { display: none; }
  .title-block { min-width: 0; gap: 4px; grid-area: 1 / 1; }
  .dashboard-title { font-size: 16px; }
  .dashboard-subtitle { font-size: 9px; }
  .live-status { font-size: 10px; gap: 6px; padding: 7px 8px; grid-area: 1 / 2; }
  .badge { font-size: 7px; }
  #mobile-menu { grid-area: 1 / 3; display: inline-flex; width: 34px; height: 34px; background: #1c293b; box-shadow: none; }
  .top-stats { grid-row: 2; grid-column: 1 / -1; width: 100%; gap: 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
  .top-stats > div { width: 33.333%; min-width: 0; padding-left: 18px; gap: 4px; }
  .top-stats > div:first-child { padding-left: 0; border-left: 0; }
  .top-stats strong { font-size: 19px; letter-spacing: -.3px; }
  .top-stats span { font-size: 9px; }
  .workspace { padding: 0 10px 10px; gap: 0; }
  .map-stage { border-radius: 10px; }
  .sidebar { position: fixed; top: var(--header); left: 10px; bottom: 10px; transform: translateX(calc(-100% - 25px)); visibility: hidden; transition: transform .2s, visibility .2s; box-shadow: 12px 0 50px #0007; }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .sidebar-scrim { display: block; position: fixed; top: var(--header); left: 0; right: 0; bottom: 0; border: 0; border-radius: 0; background: #03091280; backdrop-filter: blur(2px); z-index: 990; }
  .sidebar-heading { padding: 18px 20px 16px; }
  .tab { font-size: 11px; }
  .tab .icon { width: 14px; height: 14px; }
  .tab-panel { padding: 16px; }
  .map-toolbar { top: 12px; left: 12px; max-width: calc(100% - 68px); gap: 7px; }
  .map-mode { padding: 3px; }
  .map-mode button { padding: 7px 8px; font-size: 10px; gap: 5px; }
  .map-mode .icon { width: 14px; height: 14px; }
  .map-button { height: 36px; padding: 8px; font-size: 10px; }
  #all-paths span { display: none; }
  .map-settings { top: 12px; right: 12px; gap: 7px; }
  .icon-button { width: 34px; height: 34px; }
  .leaflet-top.leaflet-right { top: 178px; right: 2px; }
  .mapboxgl-ctrl-top-right { top: 178px !important; right: 2px !important; }
  .leaflet-control-zoom a, .mapboxgl-ctrl-group button { width: 32px !important; height: 32px !important; line-height: 32px !important; }
  .map-caption { left: 12px; bottom: 128px; padding: 9px 11px; }
  .map-caption .eyebrow { font-size: 8px; }
  .map-caption > span:last-child { font-size: 9px; }
  .altitude-legend { left: 12px; right: auto; bottom: 60px; width: 170px; padding: 10px 11px; }
  .map-message { left: 12px; top: 100px; max-width: calc(100% - 68px); font-size: 11px; }
  .selection-card { width: min(290px,calc(100% - 66px)); top: 65px; right: 54px; max-height: calc(100% - 83px); padding: 0 18px 18px; }
  .selection-media { margin-inline: -18px; }
  .selection-body { padding-top: 18px; }
  .selection-metrics { gap: 16px 10px; }
  .selection-metrics strong { font-size: 18px; }
  .selection-head h2 { font-size: 24px; }
  .replay-bar { left: 12px; right: 12px; bottom: 175px; flex-wrap: wrap; gap: 8px; padding: 9px; }
  .replay-bar input { order: 1; flex-basis: 100%; }
  .replay-bar .button { margin-left: auto; }
  .replay-bar time { font-size: 10px; }
  .replay-badge { font-size: 8px; }
}
@media (max-height: 720px) and (min-width: 761px) {
  :root { --header: 76px; }
  .sidebar-heading { padding-top: 17px; padding-bottom: 14px; }
  .sidebar-title-row { margin-bottom: 6px; }
  .sidebar-heading h1 { font-size: 21px; }
  .empty-visual { width: 44px; height: 44px; margin-bottom: 10px; }
  .empty-visual .icon { width: 25px; height: 25px; }
  .empty-state { padding: 20px 8px; }
  .receiver-panel { padding-block: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Phone layout: compact header with weather in place of the subtitle, pinch-zoom instead of
   zoom buttons, a slim legend, and aircraft details as a bottom sheet. */
@media (max-width: 760px) {
  :root { --header: 104px; }
  .topbar { grid-template-rows: 56px 46px; }
  .title-block { align-self: start; padding-top: 11px; }
  .dashboard-subtitle { display: none; }
  .weather-block { display: flex; grid-area: 1 / 1; align-self: end; flex-direction: row; align-items: baseline; gap: 6px; padding: 0 0 9px; border: 0; max-width: 100%; min-width: 0; }
  .weather-block.hidden { display: none; }
  .weather-block > span, .weather-block strong { font-size: 10px; }
  .weather-block strong { font-weight: 400; color: var(--muted); }
  .top-stats { padding-top: 7px; }
  .top-stats strong { font-size: 17px; }
  .top-stats span { font-size: 8.5px; }
  .leaflet-control-zoom { display: none; }
  .mapboxgl-ctrl-top-right { top: 228px !important; }
  .map-caption { display: none; }
  .altitude-legend { left: auto; right: 10px; bottom: 26px; width: 148px; padding: 7px 9px; }
  .altitude-legend > div { font-size: 8px; }
  .plane-label { font-size: 9px; }
  .replay-bar { bottom: 92px; }
  .selection-card { z-index: 1100; top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 58%; border-radius: 16px; padding: 0 16px 16px; box-shadow: 0 -10px 40px #0007; overscroll-behavior: contain; }
  .selection-card::before { content: ''; position: sticky; top: 0; display: block; width: 36px; height: 4px; margin: 0 auto -4px; border-radius: 2px; background: #ffffff33; z-index: 2; transform: translateY(6px); }
  .selection-media { margin-inline: -16px; border-radius: 16px 16px 0 0; }
  .selection-media img { aspect-ratio: 16 / 7; }
  .selection-body { padding-top: 14px; }
  .selection-head h2 { font-size: 21px; }
  .selection-meta { margin-bottom: 14px; }
  .selection-metrics { gap: 12px 10px; padding-top: 14px; }
  .selection-metrics strong { font-size: 16px; }
  .map-stage:has(.selection-card:not(.hidden)) .altitude-legend { display: none; }
}

/* Display & alerts panel */
#open-settings { position: relative; }
.alert-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #ff8a8f; box-shadow: 0 0 0 2px var(--panel); }
.settings-panel { position: absolute; top: 78px; right: 70px; width: 300px; max-height: calc(100% - 100px); overflow-y: auto; padding: 20px; border: 1px solid #4a5c73; border-radius: 13px; background: #141f2ef7; backdrop-filter: blur(18px); box-shadow: 0 16px 50px #0005; z-index: 950; scrollbar-width: thin; }
.settings-panel h3 { margin: 18px 0 10px; font-size: 11px; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.settings-panel h2 { font-size: 18px; margin: 4px 0 14px; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12px; color: var(--text); cursor: pointer; }
.check-row input { margin: 0; }
.nearby-row { display: flex; gap: 12px; margin: 0 0 6px 24px; font-size: 11px; color: var(--muted); }
.nearby-row select { font-size: 11px; }
.notify-row { margin-top: 8px; }
.notify-row .hint { margin: 6px 0 0; font-size: 10px; line-height: 1.6; }
.alert-log { display: grid; gap: 4px; }
.alert-entry { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: #182231; text-align: left; font-size: 11px; line-height: 1.45; }
.alert-entry:hover { border-color: #536782; }
.alert-entry time { color: var(--faint); font-size: 10px; white-space: nowrap; }
.range-ring-label { color: #b4c3d7; font-size: 10px; text-align: center; text-shadow: 0 1px 3px #061419, 0 0 6px #061419; pointer-events: none; }

/* Stats tab */
.stats-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: 8px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.stats-tiles > div { padding: 11px 10px; background: var(--panel-dark); }
.stats-tiles strong { display: block; font-size: 19px; font-weight: 500; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.stats-tiles small { display: block; margin-top: 4px; color: var(--faint); font-size: 8px; letter-spacing: .35px; }
.stats-tiles .hint { grid-column: 1 / -1; padding: 12px; margin: 0; background: var(--panel-dark); }
.stats-records { display: grid; gap: 1px; margin-bottom: 14px; }
.record-row { display: grid; grid-template-columns: 62px 1fr auto auto; gap: 8px; align-items: baseline; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 11px; font-variant-numeric: tabular-nums; }
.record-row small { color: var(--faint); font-size: 9px; letter-spacing: .3px; text-transform: uppercase; }
.record-row strong { font-weight: 500; }
.record-row time { color: var(--faint); font-size: 10px; }
.chart-card { border: 1px solid var(--line); background: var(--panel-dark); border-radius: 9px; padding: 10px 10px 6px; margin-bottom: 10px; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.chart-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.chart-legend i, .chart-tip i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; }
.chart-wrap { position: relative; }
.chart-wrap canvas { display: block; width: 100%; touch-action: pan-y; }
.chart-tip { position: absolute; top: -4px; display: grid; gap: 2px; padding: 6px 8px; border: 1px solid #4a5c73; border-radius: 6px; background: #0e1520f2; font-size: 10px; color: var(--muted); white-space: nowrap; pointer-events: none; z-index: 2; }
.chart-tip time { color: var(--faint); font-size: 9px; }
.chart-tip strong { color: var(--text); font-weight: 500; }
.chart-tip span { display: flex; align-items: center; gap: 5px; }
.receiver-table td small { white-space: nowrap; }
.rank-columns { display: grid; grid-template-columns: 1fr; gap: 4px; }
.rank-list { display: grid; gap: 6px; margin-bottom: 14px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 28px; gap: 8px; align-items: center; font-size: 11px; }
.rank-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.rank-name strong { color: var(--text); font-weight: 500; margin-right: 3px; }
.rank-bar { height: 6px; border-radius: 3px; background: #1d2836; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 3px; background: #3987e5; }
.rank-count { text-align: right; font-variant-numeric: tabular-nums; }
#panel-stats h3 { margin: 16px 0 10px; }
.tab { padding-inline: 4px; }

@media (max-width: 760px) {
  .mapboxgl-ctrl-top-right { top: 304px !important; }
  .settings-panel { z-index: 1150; top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 70%; border-radius: 16px; padding: 16px; box-shadow: 0 -10px 40px #0007; overscroll-behavior: contain; }
}
.nearby-row label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

/* IFR overlay */
.ifr-options { margin-left: 22px; }
.ifr-options .check-row { padding: 4px 0; font-size: 11px; color: var(--muted); }
.ifr-status { font-size: 10px; line-height: 1.6; margin: 6px 0 0; }
#toggle-ifr.active, #toggle-ifr[aria-pressed="true"] { border-color: #799bc4; background: #294460; color: #d4e6ff; }
.airway-label { color: #dbe6f3; font: 600 9px/14px Inter, sans-serif; text-align: center; letter-spacing: .3px; text-shadow: 0 0 3px #0c111a, 0 0 6px #0c111a; pointer-events: none; opacity: .75; }
.airway-label.high { opacity: .95; }
.fix-label { color: #b4c3d7; font: 9px/12px Inter, sans-serif; white-space: nowrap; text-shadow: 0 0 3px #0c111a, 0 0 5px #0c111a; pointer-events: none; }
.navaid-marker, .airport-marker { cursor: pointer; }
.navaid-symbol { position: absolute; inset: 1px; display: block; }
.navaid-symbol.vor { background: #101722; border: 1.6px solid #7fe1c4; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); border-radius: 0; }
.navaid-symbol.vor::after { content: ''; position: absolute; inset: 0; margin: auto; width: 3px; height: 3px; border-radius: 50%; background: #7fe1c4; }
.navaid-symbol.ndb { border-radius: 50%; border: 1.6px dotted #e2b27a; background: #101722; }
.navaid-symbol.ndb::after { content: ''; position: absolute; inset: 0; margin: auto; width: 3px; height: 3px; border-radius: 50%; background: #e2b27a; }
.airport-symbol { position: absolute; inset: 1px; border-radius: 50%; background: #a9c7f7; border: 1.5px solid #0c111a; }
.airport-symbol.small { inset: 3px; background: #8ea3bd; }
.navaid-label { position: absolute; left: 16px; top: -1px; color: #c9d6e6; font: 600 9.5px/14px Inter, sans-serif; white-space: nowrap; text-shadow: 0 0 3px #0c111a, 0 0 6px #0c111a; pointer-events: none; }
.nav-popup .leaflet-popup-content-wrapper, .mapboxgl-popup.nav-popup .mapboxgl-popup-content { background: #141f2ef7; color: var(--text); border: 1px solid #4a5c73; border-radius: 10px; box-shadow: 0 12px 34px #0006; padding: 0; }
.nav-popup .leaflet-popup-content { margin: 0; width: auto !important; }
.nav-popup .leaflet-popup-tip, .mapboxgl-popup.nav-popup .mapboxgl-popup-tip { background: #141f2e; border-top-color: #141f2e; }
.mapboxgl-popup.nav-popup .mapboxgl-popup-close-button, .nav-popup a.leaflet-popup-close-button { color: var(--muted); font-size: 16px; padding: 2px 6px; }
.nav-popup-body { padding: 12px 14px 10px; min-width: 200px; font-size: 11px; }
.nav-popup-body > strong { display: block; font-size: 14px; font-weight: 500; padding-right: 14px; }
.nav-popup-body > small { display: block; color: var(--muted); margin: 2px 0 8px; font-size: 10.5px; }
.nav-popup-body dl { display: grid; gap: 5px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.nav-popup-body dl > div { display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.nav-popup-body dt { color: var(--faint); font-size: 9.5px; text-transform: uppercase; letter-spacing: .3px; padding-top: 1px; }
.nav-popup-body dd { margin: 0; }
.nav-popup-body p { margin: 8px 0 0; color: var(--faint); font-size: 9.5px; }
@media (max-width: 760px) { #toggle-ifr span, #toggle-corridors span { display: none; } }

/* Receiver view */
#pov-toggle.active { border-color: #799bc4; background: #294460; color: #d4e6ff; }
.pov-hud { position: absolute; inset: 0; pointer-events: none; z-index: 860; }
.receiver-3d { position: absolute; inset: 0; z-index: 840; overflow: hidden; border-radius: inherit; background: #0b111b; }
.receiver-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.receiver-3d .r3d-overlay { touch-action: none; cursor: grab; }
.receiver-3d .r3d-overlay:active { cursor: grabbing; }
.pov-top { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 8px; background: #0e1520b3; text-align: center; white-space: nowrap; }
.pov-readout { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin-top: 2px; }
.pov-readout strong { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pov-readout span { color: var(--muted); font-size: 10.5px; }
.pov-actions { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100% - 24px); pointer-events: auto; }
.pov-actions .button[aria-pressed="true"] { border-color: #799bc4; background: #294460; color: #d4e6ff; }
.pov-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; color: #c9d6e6; font-size: 10.5px; text-shadow: 0 1px 4px #000; white-space: nowrap; }
.pov-info { position: absolute; top: 72px; right: 12px; width: min(290px, calc(100% - 24px)); max-height: calc(100% - 190px); overflow-y: auto; border: 1px solid #4a5c73; border-radius: 10px; background: #141f2ef2; box-shadow: 0 12px 34px #0006; pointer-events: auto; overscroll-behavior: contain; }
.pov-info .icon-button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; }
.map-stage:has(.pov-hud:not(.hidden)) .altitude-legend, .map-stage:has(.pov-hud:not(.hidden)) .map-caption { display: none; }
@media (max-width: 760px) {
  .pov-top { top: 32px; }
  .pov-actions { bottom: 40px; }
  .pov-actions .button { font-size: 11px; padding: 8px 10px; }
  .pov-info { top: auto; bottom: 140px; left: 8px; right: 8px; width: auto; max-height: 45%; }
  /* A compact sheet in the receiver view keeps the aircraft and the view's buttons in sight. */
  .map-stage:has(.receiver-3d:not(.hidden)) .selection-card { max-height: 30%; }
  .map-stage:has(.receiver-3d:not(.hidden)) .selection-media { display: none; }
  .map-stage:has(.receiver-3d:not(.hidden)) .selection-body { padding-top: 22px; }
  .map-stage:has(.receiver-3d:not(.hidden)):has(.selection-card:not(.hidden)) .pov-actions { bottom: calc(30% + 16px); }
  .map-stage:has(.receiver-3d:not(.hidden)):has(.selection-card:not(.hidden)) .pov-hint { display: none; }
}

/* Map controls are hidden while the receiver view covers the map. */
.map-stage:has(.receiver-3d:not(.hidden)) :is(.leaflet-control-container, .mapboxgl-control-container, .map-toolbar, .map-settings, .map-message) { display: none; }

/* Alerts tab */
.tab-alert { display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 8px; background: #d9534f; color: #fff; font-size: 9.5px; font-weight: 700; line-height: 16px; text-align: center; }
.events-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.events-heading h3 { margin: 0; }
.events-heading select { font-size: 11px; }
.event-list { display: grid; gap: 6px; margin: 10px 0 4px; }
.event-row { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #172231; text-align: left; font: inherit; color: inherit; }
button.event-row:hover { border-color: #536782; }
.event-row.active { border-color: #a5474a; background: #2a1c22; }
.event-row.brief { opacity: .72; }
.event-code { display: inline-flex; align-items: center; justify-content: center; height: 22px; border-radius: 5px; background: #3a2328; color: #ff9b9b; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.event-code.watch { background: #3a3220; color: #f2c66d; }
.event-code.military, .event-code.helicopter, .event-code.nearby { background: #1f2f40; color: #9cc3ef; }
.event-main { display: grid; gap: 2px; min-width: 0; }
.event-main strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.event-main small { color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.event-actions { display: flex; gap: 14px; margin-top: 4px; }
@media (max-width: 460px) { .tabs .tab .icon { display: none; } .tabs .tab { padding-inline: 2px; } }

/* Military and Helicopters tabs; with seven tabs the bar scrolls sideways when it runs out of room. */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; }
a.event-row { text-decoration: none; }
a.event-row:hover { border-color: #536782; }
.event-code { overflow: hidden; text-overflow: clip; white-space: nowrap; }
.area-label { color: #c9dcf5; font-size: 10.5px; font-weight: 600; text-align: center; text-shadow: 0 1px 3px #061419, 0 0 6px #061419; pointer-events: none; }
