:root {
  --bg: #07101d;
  --panel: rgba(10, 22, 39, 0.92);
  --panel-solid: #0d1b2f;
  --line: rgba(126, 161, 202, 0.22);
  --text: #eaf3ff;
  --muted: #91a6c2;
  --accent: #44b7ff;
  --good: #50e3a4;
  --warn: #ffd166;
  --bad: #ff6b6b;
}

/*
  Leaflet critical layout CSS.
  This is intentionally bundled locally because if the CDN Leaflet CSS is blocked,
  fails SRI, or is stripped by proxy/CSP, the map still initializes but tiles render
  as loose square images across the page. These rules keep panes, tiles, controls,
  markers, and popups positioned/clipped correctly even without the remote stylesheet.
*/
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-container { overflow: hidden; }
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow { user-select: none; -webkit-user-drag: none; }
.leaflet-tile { filter: inherit; visibility: hidden; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-zoom-box { width: 0; height: 0; box-sizing: border-box; z-index: 800; }
.leaflet-overlay-pane svg { -moz-user-select: none; }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape { width: 1px; height: 1px; }
.lvml { behavior: url(#default#VML); display: inline-block; position: absolute; }
.leaflet-control { position: relative; z-index: 800; pointer-events: visiblePainted; pointer-events: auto; }
.leaflet-top,
.leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-fade-anim .leaflet-popup { opacity: 0; transition: opacity .2s linear; }
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { opacity: 1; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform .25s cubic-bezier(0,0,.25,1); }
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile { transition: none; }
.leaflet-interactive { cursor: pointer; }
.leaflet-grab { cursor: grab; }
.leaflet-dragging .leaflet-grab { cursor: move; cursor: grabbing; }
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container { pointer-events: none; }
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path { pointer-events: visiblePainted; pointer-events: auto; }
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile { max-width: none !important; max-height: none !important; }
.leaflet-container.leaflet-touch-zoom { touch-action: pan-x pan-y; }
.leaflet-container.leaflet-touch-drag { touch-action: pinch-zoom; }
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { touch-action: none; }
.leaflet-container { -webkit-tap-highlight-color: transparent; }
.leaflet-container a { color: #44b7ff; }
.leaflet-control-zoom a { display: block; width: 30px; height: 30px; line-height: 30px; text-align: center; text-decoration: none; color: #eaf3ff; background: #0d1b2f; border-bottom: 1px solid rgba(126,161,202,.22); }
.leaflet-control-zoom a:hover { background: #142742; }
.leaflet-control-zoom-in { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.leaflet-control-zoom-out { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-bottom: 0 !important; }
.leaflet-control-attribution { background: rgba(10,22,39,.82); color: #91a6c2; padding: 2px 6px; font-size: 11px; border-radius: 8px 0 0 0; }
.leaflet-popup { position: absolute; text-align: center; margin-bottom: 20px; }
.leaflet-popup-content-wrapper { padding: 1px; text-align: left; border-radius: 12px; }
.leaflet-popup-content { margin: 12px 14px; line-height: 1.4; }
.leaflet-popup-tip-container { width: 40px; height: 20px; position: absolute; left: 50%; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-popup-tip { width: 17px; height: 17px; padding: 1px; margin: -10px auto 0; transform: rotate(45deg); }
.leaflet-popup-close-button { position: absolute; top: 0; right: 0; border: none; text-align: center; width: 24px; height: 24px; font: 16px/24px Tahoma, Verdana, sans-serif; color: #91a6c2; text-decoration: none; background: transparent; }
.leaflet-tooltip { position: absolute; padding: 6px 8px; background: #0d1b2f; border: 1px solid rgba(126,161,202,.22); border-radius: 8px; color: #eaf3ff; white-space: nowrap; user-select: none; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.28); }

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow: hidden; }
.map-shell { width: 100%; height: 100%; display: grid; grid-template-rows: 64px minmax(0, 1fr); }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: linear-gradient(90deg, #081426, #0c2038); border-bottom: 1px solid var(--line); z-index: 900; }
.brand { display: flex; align-items: center; gap: 12px; line-height: 1.1; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #1e81ce, #44b7ff); color: #03101f; font-weight: 900; }
.brand strong { display: block; font-size: 16px; letter-spacing: .2px; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.status { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 13px; }
.status.ok { color: var(--good); }
.status.warn { color: var(--warn); }
.status.bad { color: var(--bad); }
.map-wrap { position: relative; width: 100%; height: calc(100vh - 64px); min-height: 360px; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; background: #06101c; z-index: 1; }
#map .leaflet-tile-pane { filter: saturate(.92) brightness(.85); }
.panel { position: absolute; top: 16px; right: 16px; width: 310px; z-index: 500; display: grid; gap: 12px; pointer-events: none; }
.panel-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.28); backdrop-filter: blur(12px); padding: 14px; pointer-events: auto; }
.metric { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.metric:last-child { border-bottom: 0; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { font-size: 16px; }
.controls { display: grid; gap: 10px; color: var(--text); font-size: 14px; }
.controls label { display: flex; gap: 9px; align-items: center; cursor: pointer; }
.controls input { accent-color: var(--accent); }
.small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.aircraft-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: rotate(var(--heading, 0deg));
  transform-origin: center;
  color: var(--accent);
  filter: drop-shadow(0 1px 7px rgba(0,0,0,.78));
}
.aircraft-icon svg { width: 30px; height: 30px; display: block; fill: currentColor; stroke: #03101f; stroke-width: 1.15; }
.aircraft-icon.stale { color: var(--warn); opacity: .72; }
.airport-dot { width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #44b7ff; box-shadow: 0 0 0 3px rgba(68,183,255,.15); }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip { background: var(--panel-solid); color: var(--text); border: 1px solid var(--line); }
.popup-title { font-weight: 800; margin-bottom: 6px; }
.popup-grid { display: grid; grid-template-columns: 90px 1fr; gap: 4px 9px; font-size: 12px; }
.popup-grid span:nth-child(odd) { color: var(--muted); }
@media (max-width: 760px) {
  .topbar { padding: 0 12px; }
  .status { display: none; }
  .panel { left: 10px; right: 10px; bottom: 10px; top: auto; width: auto; grid-template-columns: 1fr; }
  .panel-card.small { display: none; }
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 2000;
  transform: translateY(-160%);
  background: #eaf3ff;
  color: #06111f;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.skip-link:focus { transform: translateY(0); outline: 3px solid #44b7ff; outline-offset: 3px; }
.brand-logo { width: 46px; max-height: 46px; object-fit: contain; display:block; }
.brand-mark[hidden] { display: none !important; }
.sr-only {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
.controls { border: 1px solid var(--line); }
button:focus-visible,
a:focus-visible,
input:focus-visible,
label:has(input:focus-visible),
.leaflet-control a:focus-visible {
  outline: 3px solid #44b7ff;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
.topnav { display:flex; align-items:center; gap:10px; margin-left:auto; margin-right:12px; }
.topnav a { color:#d8ecff; text-decoration:none; font-weight:800; font-size:13px; border:1px solid #1b3552; background:#0a1828; border-radius:999px; padding:8px 11px; }
.topnav a:hover, .topnav a:focus-visible { border-color:#41a6ff; outline:none; }
@media (max-width: 760px) { .topnav { display:none; } }


/* ADSB1090 public map polish: navy/white header, cleaner controls, and readable aircraft list. */
html, body{background:#07111f}.map-shell{width:100%;height:100%;display:grid;grid-template-rows:64px minmax(0,1fr)}.topbar{background:#07111f;border-bottom:1px solid rgba(255,255,255,.12);box-shadow:0 1px 0 rgba(0,0,0,.25)}.brand-logo{width:172px;max-height:42px}.brand strong,.brand span{display:none}.topnav a{border-radius:7px;border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#f8fafc}.topnav a:hover{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.22)}.status{border-radius:8px;background:#fff;color:#0f172a;border-color:#d7e0ec;font-weight:800}.status.ok{color:#14532d}.status.bad{color:#991b1b}.map-wrap{background:#07111f}#map{background:#0b1728}#map .leaflet-tile-pane{filter:saturate(.72) brightness(.9) contrast(.92)}.panel{top:14px;right:14px;width:340px;gap:10px}.panel-card{background:rgba(255,255,255,.96);color:#0f172a;border-color:#d7e0ec;border-radius:12px;box-shadow:0 18px 38px rgba(2,6,23,.22);backdrop-filter:blur(10px)}.panel-title{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;font-weight:900;color:#475569;margin-bottom:.55rem}.metric span{color:#64748b}.metric strong{color:#0f172a}.controls{color:#0f172a}.controls input{accent-color:#0b1728}.small{color:#475569}.aircraft-icon{width:28px;height:28px;color:#0b1728;filter:drop-shadow(0 1px 4px rgba(15,23,42,.45))}.aircraft-icon svg{width:26px;height:26px;stroke:#fff;stroke-width:1.5}.aircraft-icon.category-military,.aircraft-icon.category-government{color:#b91c1c}.aircraft-icon.category-private{color:#334155}.aircraft-icon.category-emergency{color:#dc2626}.aircraft-icon.stale{color:#b45309;opacity:.72}.airport-dot{background:#0b1728;border-color:#fff;box-shadow:0 0 0 3px rgba(11,23,40,.18)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#0f172a;border-color:#d7e0ec;border-radius:10px}.leaflet-popup-content a{color:#0b1728;font-weight:900}.popup-title{font-size:1rem;color:#0f172a}.popup-grid span:nth-child(odd){color:#64748b}.aircraft-list{display:grid;gap:.35rem;max-height:250px;overflow:auto}.aircraft-list a{display:grid;grid-template-columns:minmax(80px,1fr) 72px 58px;gap:.4rem;align-items:center;border:1px solid #e2e8f0;border-radius:8px;padding:.45rem .5rem;color:#0f172a;text-decoration:none;background:#fff}.aircraft-list a:hover{background:#f8fafc;border-color:#cbd5e1}.aircraft-list strong{font-size:.86rem}.aircraft-list span{font-size:.78rem;color:#64748b;text-align:right}.leaflet-control-zoom a{background:#fff;color:#0f172a;border-color:#d7e0ec}.leaflet-control-zoom a:hover{background:#f8fafc}.leaflet-control-attribution{background:rgba(255,255,255,.9);color:#475569;border-radius:8px 0 0 0}.map-action-link{display:inline-flex;margin-top:.55rem;padding:.34rem .5rem;border:1px solid #cbd5e1;border-radius:7px;color:#0b1728;text-decoration:none;font-weight:900;background:#f8fafc}@media(max-width:760px){.brand-logo{width:145px}.panel{left:10px;right:10px;width:auto}.aircraft-list-card{display:none}}

/* 4.1.6 map usability polish: legend, airport classes, public-safe status text. */
.legend-card{font-size:.83rem;}
.legend-list{display:grid;grid-template-columns:1fr 1fr;gap:.45rem .75rem;align-items:center;}
.legend-list span{display:flex;align-items:center;gap:.45rem;color:#334155;font-weight:750;}
.legend-aircraft{width:18px;height:18px;display:inline-block;clip-path:polygon(50% 0,63% 42%,100% 55%,100% 68%,63% 62%,57% 100%,43% 100%,37% 62%,0 68%,0 55%,37% 42%);background:#0b1728;border:1px solid #fff;filter:drop-shadow(0 1px 2px rgba(15,23,42,.35));}
.legend-aircraft.category-private{background:#334155}.legend-aircraft.category-military{background:#b91c1c}.legend-aircraft.stale{background:#b45309;opacity:.75}
.legend-airport{width:12px;height:12px;border-radius:999px;border:2px solid #fff;box-shadow:0 0 0 2px rgba(15,23,42,.12);display:inline-block;}
.airport-dot-local,.legend-airport.airport-dot-local{background:#64748b;}
.airport-dot-regional,.legend-airport.airport-dot-regional{background:#1b3658;}
.airport-dot-national,.legend-airport.airport-dot-national{background:#0b1728;}
.airport-dot-international,.legend-airport.airport-dot-international{background:#b91c1c;}
.airport-dot{width:12px;height:12px;}
.airport-popup-grid{margin-top:.55rem;}
.status.ok{color:#14532d}.status.ok::before{content:"";display:inline-block;width:.48rem;height:.48rem;border-radius:999px;background:#16a34a;margin-right:.35rem;vertical-align:.08rem;}
@media(max-width:760px){.legend-card{display:none}.panel{max-height:45vh;overflow:auto}}

/* 4.2 map polish */
.topbar{background:#07111f!important;border-bottom:1px solid rgba(255,255,255,.1)}.topnav a{border-radius:8px}.panel-card{border-radius:10px!important;border-color:#d7e0ec!important;box-shadow:none!important}.panel-title{font-weight:900;color:#0b1728}.metric strong{color:#0b1728}.legend-list{display:grid;gap:.42rem}.legend-list span{display:flex;align-items:center;gap:.45rem;color:#334155}.airport-popup-grid strong,.popup-grid strong{color:#0b1728}.aircraft-list a{border-radius:8px;border:1px solid #e2e8f0}.aircraft-icon svg{filter:drop-shadow(0 1px 2px rgba(15,23,42,.24))}.aircraft-icon.category-military svg,.aircraft-icon.category-government svg{fill:#991b1b}.aircraft-icon.category-private svg,.aircraft-icon.category-ga svg{fill:#475569}.aircraft-icon.category-aircraft svg,.aircraft-icon svg{fill:#0b3a67}.aircraft-icon.stale svg{fill:#94a3b8;opacity:.72}.airport-dot{box-shadow:0 0 0 2px #fff,0 1px 4px rgba(15,23,42,.28)}.airport-dot-local{background:#64748b}.airport-dot-regional{background:#2563eb}.airport-dot-national{background:#0b1728}.airport-dot-international{background:#b91c1c}.legend-airport,.legend-aircraft{display:inline-block;width:14px;height:14px;flex:0 0 14px}.legend-aircraft{clip-path:polygon(50% 0,62% 43%,100% 56%,100% 70%,62% 64%,57% 100%,43% 100%,38% 64%,0 70%,0 56%,38% 43%)}.legend-airport{border-radius:999px}.category-aircraft{background:#0b3a67}.category-private{background:#475569}.category-military{background:#991b1b}.stale{background:#94a3b8}.map-wrap{background:#eef2f7}.panel{background:#fff;border-left:1px solid #d7e0ec}

/* 4.2.4 map marker hotfix: keep aircraft markers transparent and scope legend color swatches only to the legend. */
.aircraft-icon,
.aircraft-icon.category-aircraft,
.aircraft-icon.category-private,
.aircraft-icon.category-ga,
.aircraft-icon.category-military,
.aircraft-icon.category-government,
.aircraft-icon.category-emergency,
.aircraft-icon.stale {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.aircraft-icon svg {
  background: transparent !important;
  overflow: visible;
}
.legend-aircraft.category-aircraft { background: #0b3a67 !important; }
.legend-aircraft.category-private,
.legend-aircraft.category-ga { background: #475569 !important; }
.legend-aircraft.category-military,
.legend-aircraft.category-government { background: #991b1b !important; }
.legend-aircraft.stale { background: #94a3b8 !important; }
.aircraft-icon.category-aircraft,
.aircraft-icon.category-private,
.aircraft-icon.category-ga,
.aircraft-icon.category-military,
.aircraft-icon.category-government,
.aircraft-icon.category-emergency,
.aircraft-icon.stale { clip-path: none !important; }

/* 4.2.6 public map cleanup: count-only live badge, no aircraft list/detail tray, type icons + flight-level colors, visitor clock. */
.topbar { grid-template-columns: auto 1fr auto !important; }
.status.live-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .65rem;
  border-radius: 9px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #d7e0ec;
  box-shadow: 0 1px 0 rgba(15,23,42,.08);
}
.status.live-status-badge::before { content: none !important; }
.status.live-status-badge .live-dot {
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.16);
}
.status.live-status-badge strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.35rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #07111f;
  color: #fff;
  font-size: .78rem;
}
.panel { width: 315px; }
.map-clock {
  position: absolute;
  left: 12px;
  bottom: 24px;
  z-index: 520;
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  pointer-events: none;
  padding: .45rem .6rem;
  border-radius: 9px;
  border: 1px solid #d7e0ec;
  background: rgba(255,255,255,.94);
  color: #0f172a;
  box-shadow: 0 8px 22px rgba(15,23,42,.22);
}
.map-clock strong { font-size: .86rem; }
.map-clock span { font-size: .68rem; color: #64748b; font-weight: 800; }
.aircraft-icon {
  width: 32px !important;
  height: 32px !important;
  color: var(--marker-color, #2563eb) !important;
  filter: drop-shadow(0 2px 4px rgba(15,23,42,.45)) !important;
}
.aircraft-icon svg {
  width: 30px !important;
  height: 30px !important;
  display: block;
  fill: currentColor !important;
  stroke: #fff !important;
  stroke-width: 1.6 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.aircraft-icon .rotor { fill: none !important; stroke: #fff !important; stroke-width: 2.4 !important; }
.aircraft-icon.aircraft-kind-helicopter svg { transform: rotate(calc(-1 * var(--heading, 0deg))); }
.aircraft-icon.aircraft-kind-special svg { stroke-width: 1.3 !important; }
.aircraft-icon.stale { color: #94a3b8 !important; opacity: .7; }
.legend-heading {
  margin: .75rem 0 .35rem;
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 900;
  color: #64748b;
}
.legend-list { grid-template-columns: 1fr 1fr; }
.legend-list span { font-size: .76rem; }
.legend-list i { flex: 0 0 auto; }
.flight-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(15,23,42,.22);
}
.legend-shape {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: #334155;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(15,23,42,.22);
}
.legend-shape.aircraft-kind-airliner { clip-path: polygon(50% 0,63% 42%,100% 55%,100% 68%,63% 62%,57% 100%,43% 100%,37% 62%,0 68%,0 55%,37% 42%); }
.legend-shape.aircraft-kind-ga { clip-path: polygon(50% 0,60% 43%,88% 52%,88% 66%,60% 61%,54% 100%,46% 100%,40% 61%,12% 66%,12% 52%,40% 43%); }
.legend-shape.aircraft-kind-heavy { clip-path: polygon(50% 0,61% 8%,61% 42%,100% 58%,100% 72%,62% 65%,58% 88%,72% 98%,50% 90%,28% 98%,42% 88%,38% 65%,0 72%,0 58%,39% 42%,39% 8%); }
.legend-shape.aircraft-kind-helicopter { border-radius: 4px; clip-path: polygon(0 15%,100% 15%,100% 30%,60% 30%,78% 55%,100% 55%,100% 72%,70% 72%,58% 100%,42% 100%,30% 72%,0 72%,0 55%,22% 55%,40% 30%,0 30%); }
.legend-shape.aircraft-kind-military { clip-path: polygon(50% 0,68% 50%,100% 62%,100% 76%,62% 68%,55% 100%,45% 100%,38% 68%,0 76%,0 62%,32% 50%); }
.legend-shape.aircraft-kind-special { border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); }
.aircraft-list-card,
#selectedAircraft,
#aircraftCount,
#staleCount,
#lastRefresh { display: none !important; }
@media(max-width:760px){
  .status.live-status-badge { display: inline-flex !important; }
  .map-clock { bottom: 12px; left: 10px; }
  .panel { max-height: 58vh; overflow: auto; }
}

/* 5.1 public map overlays: ARTCC zones and collapsible legend. */
.legend-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  border: 0;
  background: transparent;
  color: #0b1728;
  padding: 0 0 .55rem;
  margin: 0 0 .55rem;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.legend-toggle span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 900; color: #475569; }
.legend-toggle strong { font-size: .74rem; font-weight: 900; color: #0b1728; }
.legend-card.is-collapsed { padding-bottom: 10px; }
.legend-card.is-collapsed .legend-body { display: none; }
.legend-heading { margin: .68rem 0 .35rem; font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 900; color: #64748b; }
.legend-shape { display: inline-block; width: 15px; height: 15px; flex: 0 0 15px; clip-path: polygon(50% 0,62% 43%,100% 56%,100% 70%,62% 64%,57% 100%,43% 100%,38% 64%,0 70%,0 56%,38% 43%); background: #0b3a67; }
.legend-shape.aircraft-kind-ga { background: #475569; }
.legend-shape.aircraft-kind-heavy { background: #ea580c; }
.legend-shape.aircraft-kind-helicopter { background: #0f766e; border-radius: 4px; clip-path: none; }
.legend-shape.aircraft-kind-military { background: #991b1b; }
.legend-shape.aircraft-kind-special { background: #7c3aed; border-radius: 999px; clip-path: none; }
.flight-legend i { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 999px; display: inline-block; }
.legend-artcc { width: 28px; height: 14px; flex: 0 0 28px; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37,99,235,.12); display: inline-block; }
.legend-note { color: #64748b !important; font-size: .78rem; font-weight: 700 !important; }
.overlay-legend { grid-template-columns: 1fr; }
.artcc-tooltip { background: #0b1728; border: 1px solid #93c5fd; color: #fff; font-weight: 900; }

/* 5.2 overlay controls: advanced map layer settings. */
.overlay-advanced {
  margin-top: .5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: .55rem;
}
.overlay-advanced summary {
  cursor: pointer;
  font-weight: 900;
  color: #0f172a;
  list-style-position: inside;
}
.overlay-advanced label {
  display: grid;
  gap: .28rem;
  margin-top: .55rem;
  color: #334155;
  font-weight: 850;
}
.overlay-advanced select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  padding: .42rem .5rem;
}
.legend-list .legend-note {
  grid-column: 1 / -1;
}

/* 5.2.1 overlay controls are always visible; no hidden advanced settings. */
.map-layer-options {
  background: #f8fafc;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  padding: .7rem;
}
.overlay-settings-title {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 950;
  color: #64748b;
  margin-bottom: .35rem;
}

/* 5.2.2 map controls: separate collapsible overlay controls, separate legend, and modal advanced settings. */
.map-control-stack {
  display: grid;
  gap: 10px;
  background: transparent !important;
  border-left: 0 !important;
  pointer-events: none;
}
.map-control-stack > .panel-card {
  pointer-events: auto;
}
.control-box-toggle,
.legend-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  border: 0;
  background: transparent;
  color: #0b1728;
  padding: 0 0 .55rem;
  margin: 0 0 .55rem;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.control-box-toggle span,
.legend-toggle span {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 950;
  color: #475569;
}
.control-box-toggle strong,
.legend-toggle strong {
  font-size: .74rem;
  font-weight: 950;
  color: #0b1728;
}
.control-box.is-collapsed { padding-bottom: 10px; }
.control-box-body { display: grid; gap: .55rem; }
.layer-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: #0f172a;
  font-weight: 850;
}
.layer-row label,
.layer-row span { display: inline-flex; align-items: center; gap: .4rem; }
.layer-advanced-button,
.overlay-modal-done,
.overlay-modal-close {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0b1728;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
.layer-advanced-button { padding: .32rem .5rem; font-size: .76rem; }
.layer-advanced-button:hover,
.layer-advanced-button:focus-visible,
.overlay-modal-done:hover,
.overlay-modal-done:focus-visible,
.overlay-modal-close:hover,
.overlay-modal-close:focus-visible { border-color: #0b1728; outline: none; }
.layer-status-list {
  display: grid;
  gap: .35rem;
  border-top: 1px solid #e2e8f0;
  padding-top: .55rem;
  margin-top: .1rem;
}
.layer-status-list div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.layer-status-list span { color: #64748b; font-size: .76rem; font-weight: 850; }
.layer-status-list strong { color: #0f172a; font-size: .78rem; font-weight: 950; text-align: right; }
.overlay-modal[hidden] { display: none !important; }
.overlay-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.overlay-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.58);
  backdrop-filter: blur(4px);
}
.overlay-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(2,6,23,.34);
}
.overlay-modal-header,
.overlay-modal-footer { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.overlay-modal-header { border-bottom: 1px solid #e2e8f0; }
.overlay-modal-footer { border-top: 1px solid #e2e8f0; justify-content: flex-end; }
.overlay-modal-kicker { display: block; color: #64748b; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 950; margin-bottom: .25rem; }
.overlay-modal-header h2 { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.overlay-modal-close { width: 34px; height: 34px; font-size: 1.4rem; line-height: 1; }
.overlay-modal-body { padding: 18px; }
.overlay-settings-panel { display: grid; gap: 1rem; }
.overlay-settings-panel p { margin: 0; color: #475569; font-weight: 750; line-height: 1.55; }
.overlay-settings-panel label { display: grid; gap: .4rem; color: #334155; font-weight: 900; }
.overlay-settings-panel select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 850;
  padding: .55rem .65rem;
}
.overlay-modal-done { padding: .52rem .85rem; }
body.overlay-modal-open { overflow: hidden; }
.artcc-tooltip { z-index: 650 !important; }
@media(max-width:760px){
  .map-control-stack { max-height: 58vh; overflow: auto; }
  .layer-row { align-items: flex-start; }
}

/* 5.2.3 separate overlay-specific advanced settings. */
.overlay-checkbox-row {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: .55rem !important;
}
.overlay-checkbox-row input { width: auto; }
.overlay-setting-value {
  display: inline-block;
  color: #334155;
  font-size: .82rem;
  font-weight: 950;
}
.overlay-settings-panel input[type="range"] {
  width: 100%;
  accent-color: #0b3a67;
}
.artcc-tooltip.leaflet-tooltip {
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .02em;
}


/* 5.2.5 mobile map controls: collapsed boxes must become compact headers and stop covering the map. */
.control-box.is-collapsed .control-box-body,
#mapLegend.is-collapsed .legend-body,
.legend-card.is-collapsed .legend-body {
  display: none !important;
}
.control-box.is-collapsed .control-box-toggle,
#mapLegend.is-collapsed .legend-toggle {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}
@media (max-width: 760px) {
  .map-wrap { height: calc(100dvh - 64px); }
  .panel.map-control-stack {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    top: auto !important;
    width: auto !important;
    max-height: min(42vh, 330px) !important;
    overflow: visible !important;
    gap: 8px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: end !important;
    pointer-events: none !important;
  }
  .map-control-stack > .panel-card {
    pointer-events: auto !important;
    max-height: min(36vh, 285px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 10px 11px !important;
    border-radius: 11px !important;
  }
  .map-control-stack > .panel-card.is-collapsed {
    max-height: 42px !important;
    overflow: hidden !important;
    padding: 9px 10px !important;
  }
  .control-box-toggle,
  .legend-toggle {
    min-height: 24px;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 0 !important;
  }
  .control-box-toggle span,
  .legend-toggle span {
    font-size: .68rem !important;
  }
  .control-box-toggle strong,
  .legend-toggle strong {
    font-size: .7rem !important;
  }
  .control-box-body,
  .legend-body {
    padding-top: .55rem;
    margin-top: .55rem;
    border-top: 1px solid #e2e8f0;
  }
  .layer-row {
    align-items: center !important;
    min-height: 30px;
  }
  .layer-status-list {
    margin-bottom: 0;
  }
  .legend-list {
    grid-template-columns: 1fr !important;
  }
  .map-clock {
    left: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    transform: translateY(calc(-100% - 8px));
  }
  .overlay-modal {
    padding: 12px !important;
  }
  .overlay-modal-panel {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    border-radius: 13px !important;
  }
}
@media (max-width: 420px) {
  .panel.map-control-stack {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
  }
  .map-control-stack > .panel-card:not(.is-collapsed) {
    max-height: min(34vh, 255px) !important;
  }
}

/* ADSB1090 5.3.23 public map enrollment notice */
.public-enrollment-banner{position:relative;z-index:700;margin:.75rem 1rem 0;border:1px solid rgba(96,165,250,.38);background:linear-gradient(135deg,rgba(14,34,62,.96),rgba(7,17,31,.96));color:#eaf3ff;border-radius:16px;padding:.8rem 1rem;display:flex;gap:1rem;align-items:center;justify-content:space-between;box-shadow:0 18px 46px rgba(0,0,0,.24)}.public-enrollment-banner .eyebrow{display:block;color:#7db3ff;font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;font-weight:900}.public-enrollment-banner p{margin:.2rem 0 0;color:#dbeafe;font-weight:800}.public-enrollment-banner p span{display:block;color:#b9c8dc;font-weight:700}.public-enrollment-banner a{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;text-decoration:none;border-radius:12px;background:#eaf3ff;color:#07111f;font-weight:900;padding:.65rem .85rem}@media (max-width:760px){.public-enrollment-banner{align-items:flex-start;flex-direction:column}.public-enrollment-banner a{width:100%}}

/* ADSB1090 5.3.25 compact dismissible public-map enrollment notice */
.public-enrollment-banner{display:none!important}
.public-enrollment-toast{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);z-index:720;width:min(560px,calc(100vw - 420px));min-width:320px;border:1px solid rgba(148,163,184,.34);background:rgba(248,250,252,.96);color:#07111f;border-radius:14px;padding:.72rem .9rem .72rem 1rem;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:center;box-shadow:0 18px 45px rgba(2,6,23,.25);backdrop-filter:blur(10px)}
.public-enrollment-toast[hidden]{display:none!important}.public-enrollment-toast .eyebrow{display:block;color:#2563eb;font-size:.64rem;letter-spacing:.16em;text-transform:uppercase;font-weight:950}.public-enrollment-toast strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.95rem;font-weight:950}.public-enrollment-toast span,.public-enrollment-toast small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569;font-size:.78rem;font-weight:800}.public-enrollment-toast a{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;text-decoration:none;border-radius:10px;background:#07111f;color:#fff;font-weight:950;padding:.55rem .7rem;font-size:.82rem}.public-enrollment-dismiss{position:absolute;top:-9px;right:-9px;width:24px;height:24px;border:1px solid rgba(148,163,184,.55);border-radius:999px;background:#fff;color:#0f172a;display:grid;place-items:center;font-size:1rem;line-height:1;font-weight:950;cursor:pointer;box-shadow:0 8px 18px rgba(2,6,23,.18)}
@media(max-width:1100px){.public-enrollment-toast{width:min(520px,calc(100vw - 24px));bottom:12px}}
@media(max-width:760px){.public-enrollment-toast{left:12px;right:12px;bottom:10px;transform:none;width:auto;min-width:0;grid-template-columns:1fr}.public-enrollment-toast a{width:100%}}

/* ADSB1090 5.3.26 public map session-aware account menu */
.map-account-slot{position:relative;display:flex;align-items:center;margin-right:12px;z-index:1200}.map-signin-button,.map-account-trigger{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border:1px solid rgba(255,255,255,.14);background:#fff;color:#0f172a;border-radius:8px;padding:8px 11px;text-decoration:none;font-weight:950;font-size:13px;line-height:1;min-height:36px;box-shadow:0 1px 0 rgba(0,0,0,.2)}.map-signin-button:hover,.map-signin-button:focus-visible,.map-account-trigger:hover,.map-account-menu:focus-within .map-account-trigger{border-color:rgba(255,255,255,.35);background:#f8fafc;outline:none}.map-account-trigger span:first-child{display:grid;gap:.05rem;text-align:left}.map-account-trigger strong{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem;color:#0f172a}.map-account-trigger small{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.65rem;color:#64748b;font-weight:850}.map-account-dropdown{position:absolute;right:0;top:calc(100% + 10px);min-width:210px;background:#fff;color:#0f172a;border:1px solid #d7e0ec;border-radius:12px;box-shadow:0 22px 45px rgba(2,6,23,.28);padding:.45rem;display:grid;gap:.15rem;visibility:hidden;opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .14s ease,transform .14s ease,visibility .14s ease}.map-account-menu:hover .map-account-dropdown,.map-account-menu:focus-within .map-account-dropdown{visibility:visible;opacity:1;transform:translateY(0);pointer-events:auto}.map-account-dropdown a,.map-account-dropdown button{display:flex;width:100%;align-items:center;border:0;background:transparent;color:#0f172a;text-align:left;text-decoration:none;border-radius:8px;padding:.58rem .65rem;font:inherit;font-size:.86rem;font-weight:900;cursor:pointer}.map-account-dropdown a:hover,.map-account-dropdown button:hover,.map-account-dropdown a:focus-visible,.map-account-dropdown button:focus-visible{background:#f1f5f9;outline:none}.map-account-dropdown button{color:#991b1b}.map-topnav{margin-right:10px}@media(max-width:760px){.map-account-slot{margin-left:auto;margin-right:8px}.map-account-trigger strong,.map-account-trigger small{max-width:118px}.map-account-dropdown{right:0}.map-signin-button{padding:8px 10px}}


/* ADSB1090 5.3.36: remove guessed public-map navigation glyphs. */
.topnav a::before,.map-topnav a::before,.map-action-link::before { content:none !important; display:none !important; }
