:root {
  --sky-bg: var(--bg, #07111d);
  --sky-panel: color-mix(in srgb, var(--card, #101d2c) 94%, #07111d);
  --sky-panel-strong: color-mix(in srgb, var(--card2, #17283a) 92%, #07111d);
  --sky-border: color-mix(in srgb, var(--border, #294057) 82%, transparent);
  --sky-text: var(--text, #f4f8fc);
  --sky-muted: var(--muted, #8fa3b7);
  --sky-accent: var(--accent, #58c7ff);
  --sky-cyan: #32d6ff;
  --sky-green: #55e6a5;
  --sky-amber: #ffb547;
  --sky-red: #ff4d67;
  --header-height: 64px;
  --command-height: 62px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

html[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html,
body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--sky-bg);
  color: var(--sky-text);
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { color: inherit; }

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--sky-cyan);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.sky-header {
  position: relative;
  z-index: 1003;
  height: calc(var(--header-height) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: color-mix(in srgb, var(--sky-panel) 96%, transparent);
  border-bottom: 1px solid var(--sky-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.sky-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sky-text);
  text-decoration: none;
}

.sky-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.sky-brand strong { font-size: 18px; letter-spacing: -.03em; }
.sky-brand small { margin-top: 4px; color: var(--sky-muted); font-size: 9px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(50, 214, 255, .62);
  background: #07111f;
  box-shadow: 0 7px 22px rgba(77, 217, 255, .25);
}

.brand-mark svg { width: 28px; height: 28px; overflow: visible; }
.brand-mark .radar-ring { fill: none; stroke: var(--sky-cyan); stroke-width: 1.6; opacity: .82; }
.brand-mark .radar-sweep { fill: none; stroke: var(--sky-cyan); stroke-width: 2; stroke-linecap: round; opacity: .7; }
.brand-mark .brand-plane { fill: #fff; transform: scale(.72); transform-origin: 20px 20px; }

.view-switch {
  display: flex;
  padding: 4px;
  gap: 3px;
  border: 1px solid var(--sky-border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--sky-panel-strong) 80%, transparent);
}

.view-button {
  border: 0;
  border-radius: 8px;
  padding: 7px 13px;
  color: var(--sky-muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 780;
}

.view-button span { margin-right: 5px; }
.view-button:hover { color: var(--sky-text); }
.view-button.is-active { color: #07111d; background: var(--sky-cyan); box-shadow: 0 4px 14px rgba(77, 217, 255, .2); }

.header-actions { justify-self: end; }

.icon-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid color-mix(in srgb, var(--sky-cyan) 45%, var(--sky-border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--sky-cyan) 10%, var(--sky-panel-strong));
  color: var(--sky-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.icon-button svg { width: 18px; height: 18px; fill: var(--sky-cyan); }
.icon-button:hover { border-color: var(--sky-cyan); background: color-mix(in srgb, var(--sky-cyan) 16%, var(--sky-panel-strong)); }

.sky-main { height: calc(100dvh - var(--header-height) - env(safe-area-inset-top)); }

.command-bar {
  position: relative;
  z-index: 1002;
  height: var(--command-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 15px;
  background: color-mix(in srgb, var(--sky-panel) 95%, transparent);
  border-bottom: 1px solid var(--sky-border);
}

.search-box {
  flex: 0 1 360px;
  min-width: 230px;
  height: 41px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--sky-border);
  border-radius: 11px;
  background: var(--sky-panel-strong);
  transition: border-color .15s, box-shadow .15s;
}

.search-box:focus-within { border-color: var(--sky-cyan); box-shadow: 0 0 0 3px rgba(77, 217, 255, .1); }
.search-box svg { width: 18px; flex: none; fill: var(--sky-muted); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--sky-text); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: var(--sky-muted); opacity: .82; }
.search-box kbd { padding: 2px 6px; border: 1px solid var(--sky-border); border-radius: 5px; color: var(--sky-muted); background: var(--sky-panel); font-size: 10px; }

.filter-scroller {
  min-width: 0;
  flex: 1;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.filter-scroller::-webkit-scrollbar { display: none; }

.filter-chip {
  flex: none;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--sky-border);
  border-radius: 18px;
  background: transparent;
  color: var(--sky-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.filter-chip span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.filter-chip:hover { border-color: color-mix(in srgb, var(--sky-cyan) 60%, var(--sky-border)); color: var(--sky-text); }
.filter-chip.is-active { border-color: var(--sky-cyan); color: var(--sky-cyan); background: rgba(77, 217, 255, .1); }
.filter-chip.emergency-filter.is-active { border-color: var(--sky-red); color: var(--sky-red); background: rgba(255, 92, 114, .1); }

.workspace { position: relative; height: calc(100% - var(--command-height)); overflow: hidden; }
.radar-view, .list-view { width: 100%; height: 100%; }
#map { width: 100%; height: 100%; background: #102337; }

html[data-theme="dark"] .leaflet-tile-pane {
  filter: brightness(.72) saturate(.72) hue-rotate(172deg) invert(.9) contrast(1.08);
}

.leaflet-container { font-family: inherit; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 7px 25px rgba(0, 0, 0, .28) !important; }
.leaflet-control-zoom a { color: var(--sky-text) !important; background: var(--sky-panel) !important; border-color: var(--sky-border) !important; }
.leaflet-control-zoom a:hover { background: var(--sky-panel-strong) !important; }
.leaflet-control-attribution { color: var(--sky-muted) !important; background: color-mix(in srgb, var(--sky-panel) 80%, transparent) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--sky-cyan) !important; }

.glass-panel {
  border: 1px solid color-mix(in srgb, var(--sky-border) 78%, transparent);
  background: color-mix(in srgb, var(--sky-panel) 86%, transparent);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .26);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.map-summary {
  position: absolute;
  z-index: 801;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 18px;
  color: var(--sky-muted);
  font-size: 10px;
  white-space: nowrap;
}

.map-summary strong { color: var(--sky-text); }
.summary-dot { opacity: .5; }
.live-pulse { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--sky-green); box-shadow: 0 0 0 4px rgba(85, 230, 165, .12), 0 0 14px rgba(85, 230, 165, .65); }
.live-pulse.is-error { background: var(--sky-red); box-shadow: 0 0 0 4px rgba(255, 92, 114, .12); }
.live-pulse.is-loading { background: var(--sky-amber); animation: blink 1s ease-in-out infinite; }

@keyframes blink { 50% { opacity: .35; } }

.status-refresh {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--sky-muted);
  background: transparent;
  cursor: pointer;
}

.status-refresh:hover { color: var(--sky-cyan); background: rgba(77, 217, 255, .1); }
.status-refresh svg { width: 14px; fill: currentColor; }
.status-refresh.is-spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-tools {
  position: absolute;
  z-index: 801;
  right: 13px;
  top: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.map-tool {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--sky-border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--sky-panel) 92%, transparent);
  box-shadow: 0 7px 24px rgba(0, 0, 0, .23);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.map-tool:hover { color: var(--sky-cyan); border-color: var(--sky-cyan); }
.map-tool svg { width: 19px; fill: currentColor; }
.map-tool.is-active { color: var(--sky-cyan); background: color-mix(in srgb, var(--sky-cyan) 12%, var(--sky-panel)); }

.legend {
  position: absolute;
  z-index: 801;
  left: 13px;
  bottom: 24px;
  display: flex;
  gap: 14px;
  padding: 8px 11px;
  border-radius: 10px;
  color: var(--sky-muted);
  font-size: 9px;
  font-weight: 700;
}

.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-plane { width: 9px; height: 9px; display: inline-block; transform: rotate(45deg); border-radius: 2px 5px 2px 5px; background: var(--sky-cyan); }
.legend-plane.special { background: var(--sky-amber); }
.legend-plane.alert { background: var(--sky-red); }

.aircraft-marker { overflow: visible !important; background: transparent; border: 0; }
.plane-marker-wrap { position: relative; width: 34px; height: 34px; }
.plane-marker-ring { position: absolute; inset: 2px; border: 1px solid transparent; border-radius: 50%; }
.plane-marker-glyph {
  position: absolute;
  inset: 5px;
  transform: rotate(var(--track, 0deg));
  transform-origin: 50% 50%;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .65));
  transition: transform .6s ease;
}
.plane-marker-glyph svg { width: 100%; height: 100%; fill: var(--plane-color, var(--sky-cyan)); stroke: rgba(4, 13, 22, .8); stroke-width: .7; }
.plane-marker-label {
  position: absolute;
  top: 27px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 86px;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  color: #f6fbff;
  background: rgba(5, 15, 25, .82);
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.plane-marker-wrap.is-interesting { --plane-color: var(--sky-amber); }
.plane-marker-wrap.is-military { --plane-color: #b89aff; }
.plane-marker-wrap.is-emergency { --plane-color: var(--sky-red); }
.plane-marker-wrap.is-selected .plane-marker-ring { border-color: var(--plane-color, var(--sky-cyan)); animation: markerPulse 1.5s ease-out infinite; }
.plane-marker-wrap.is-selected .plane-marker-label { color: #07111d; background: var(--plane-color, var(--sky-cyan)); border-color: transparent; }

@keyframes markerPulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.55); opacity: 0; } }

.airport-marker { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); color: #07111d; background: #f5f8fc; box-shadow: 0 3px 10px rgba(0,0,0,.35); font-size: 8px; font-weight: 900; }
.user-marker { position: relative; width: 20px; height: 20px; border: 3px solid white; border-radius: 50%; background: #3887ff; box-shadow: 0 0 0 7px rgba(56,135,255,.18), 0 2px 8px rgba(0,0,0,.5); }

.list-view {
  overflow-y: auto;
  padding: 28px clamp(16px, 4vw, 58px) 80px;
  background:
    radial-gradient(900px 400px at 20% -20%, rgba(77, 217, 255, .08), transparent),
    var(--sky-bg);
}

.list-heading { max-width: 1050px; margin: 0 auto 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow { color: var(--sky-cyan); font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.list-heading h1 { margin: 4px 0 0; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.04em; }
.list-heading > span { color: var(--sky-muted); font-size: 12px; }
.flight-table-head,
.flight-card { display: grid; grid-template-columns: 1.4fr 1.25fr .85fr .75fr .8fr; align-items: center; gap: 15px; }
.flight-table-head { max-width: 1050px; margin: 0 auto; padding: 0 18px 8px; color: var(--sky-muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.flight-list { max-width: 1050px; margin: 0 auto; display: flex; flex-direction: column; gap: 7px; }
.flight-card {
  width: 100%;
  min-height: 68px;
  padding: 10px 18px;
  border: 1px solid var(--sky-border);
  border-radius: 13px;
  color: var(--sky-text);
  background: var(--sky-panel);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.flight-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--sky-cyan) 55%, var(--sky-border)); background: var(--sky-panel-strong); }
.flight-card.is-selected { border-color: var(--sky-cyan); box-shadow: inset 3px 0 var(--sky-cyan); }
.flight-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.list-plane { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--sky-cyan); background: rgba(77, 217, 255, .1); }
.list-plane svg { width: 21px; fill: currentColor; transform: rotate(var(--track, 0deg)); }
.flight-card.is-interesting .list-plane { color: var(--sky-amber); background: rgba(255, 200, 90, .1); }
.flight-card.is-emergency .list-plane { color: var(--sky-red); background: rgba(255, 92, 114, .1); }
.flight-main, .flight-type { min-width: 0; }
.flight-main strong, .flight-type strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flight-main strong { font-size: 14px; }
.flight-main span, .flight-type span, .flight-metric small { display: block; margin-top: 3px; color: var(--sky-muted); font-size: 10px; }
.flight-type strong { font-size: 12px; }
.flight-metric { font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.empty-state { padding: 12vh 20px; text-align: center; color: var(--sky-muted); }
.empty-state > span { display: block; font-size: 42px; color: var(--sky-border); transform: rotate(-20deg); }
.empty-state h2 { margin: 14px 0 3px; color: var(--sky-text); font-size: 18px; }
.empty-state p { margin: 0; font-size: 12px; }

.flight-drawer {
  position: absolute;
  z-index: 901;
  top: 0;
  right: 0;
  width: min(390px, 100%);
  height: 100%;
  padding: 22px;
  overflow-y: auto;
  background: color-mix(in srgb, var(--sky-panel) 97%, transparent);
  border-left: 1px solid var(--sky-border);
  box-shadow: -18px 0 55px rgba(0, 0, 0, .3);
  transform: translateX(105%);
  transition: transform .26s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(20px);
}
.flight-drawer.is-open { transform: translateX(0); }
.drawer-close { position: absolute; z-index: 2; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--sky-muted); background: var(--sky-panel-strong); cursor: pointer; font-size: 22px; line-height: 1; }
.drawer-close:hover { color: var(--sky-text); }
.drawer-hero { padding: 14px 0 20px; border-bottom: 1px solid var(--sky-border); }
.drawer-kicker { color: var(--sky-green); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.drawer-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 9px; }
.drawer-title-row h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.drawer-title-row p { margin: 5px 0 0; color: var(--sky-muted); font-size: 11px; }
.heading-dial { position: relative; width: 58px; height: 58px; flex: none; }
.heading-dial svg { width: 100%; height: 100%; overflow: visible; }
.heading-dial circle { fill: var(--sky-panel-strong); stroke: var(--sky-border); stroke-width: 1; }
.heading-dial .dial-plane { fill: var(--sky-cyan); transform: rotate(var(--heading, 0deg)); transform-origin: 24px 24px; transition: transform .5s ease; }
.heading-dial span { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); color: var(--sky-muted); font-size: 8px; font-weight: 800; }
.detail-badges { min-height: 21px; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.detail-badge { padding: 4px 7px; border-radius: 6px; color: var(--sky-muted); background: var(--sky-panel-strong); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.detail-badge.interesting { color: #2a1c00; background: var(--sky-amber); }
.detail-badge.military { color: #190d2f; background: #b89aff; }
.detail-badge.emergency { color: white; background: var(--sky-red); animation: blink .8s ease-in-out infinite; }
.aircraft-photo { position: relative; aspect-ratio: 3 / 2; margin: 17px 0; overflow: hidden; border: 1px solid var(--sky-border); border-radius: 14px; background: linear-gradient(145deg, rgba(77,217,255,.12), var(--sky-panel-strong) 58%, rgba(255,181,71,.08)); }
.aircraft-photo-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--sky-muted); font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.aircraft-photo-placeholder svg { width: 54px; height: 54px; fill: var(--sky-cyan); opacity: .68; transform: rotate(18deg); filter: drop-shadow(0 8px 16px rgba(50,214,255,.18)); }
.aircraft-photo-link { position: absolute; inset: 0; display: block; }
.aircraft-photo-link img { width: 100%; height: 100%; display: block; object-fit: cover; }
.aircraft-photo-credit { position: absolute; z-index: 1; left: 9px; bottom: 9px; max-width: calc(100% - 18px); padding: 6px 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: white; background: rgba(3,10,17,.72); backdrop-filter: blur(9px); font-size: 8px; font-weight: 750; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.aircraft-photo-credit:hover { background: rgba(3,10,17,.88); }
.aircraft-photo [hidden] { display: none; }
.detail-primary { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 17px 0; }
.detail-primary > div { min-width: 0; padding: 11px 9px; border: 1px solid var(--sky-border); border-radius: 10px; background: var(--sky-panel-strong); }
.detail-primary span, .detail-grid dt { display: block; color: var(--sky-muted); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.detail-primary strong { display: block; margin-top: 5px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--sky-border); }
.detail-grid div { min-width: 0; padding: 13px 4px; border-bottom: 1px solid var(--sky-border); }
.detail-grid div:nth-child(odd) { border-right: 1px solid var(--sky-border); }
.detail-grid div:nth-child(even) { padding-left: 15px; }
.detail-grid dd { margin: 5px 0 0; overflow: hidden; color: var(--sky-text); font-size: 12px; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.trail-note { display: flex; align-items: center; gap: 9px; margin: 15px 2px; color: var(--sky-muted); font-size: 10px; }
.trail-line { width: 27px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, rgba(77,217,255,.2), var(--sky-cyan)); }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.primary-action, .secondary-action { min-height: 42px; border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 820; }
.primary-action { display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--sky-cyan); color: #06121f; background: var(--sky-cyan); }
.primary-action svg { width: 16px; fill: currentColor; }
.primary-action.is-active { color: var(--sky-cyan); background: rgba(77,217,255,.1); }
.secondary-action { border: 1px solid var(--sky-border); color: var(--sky-text); background: var(--sky-panel-strong); }
.primary-action:hover, .secondary-action:hover { filter: brightness(1.08); }
.data-note { margin: 17px 2px 0; color: var(--sky-muted); font-size: 9px; line-height: 1.5; }

.ar-overlay { position: fixed; z-index: 10000; inset: 0; overflow: hidden; color: white; background: #02070b; }
.ar-overlay video { width: 100%; height: 100%; object-fit: cover; }
.ar-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 22%, transparent 70%, rgba(0,0,0,.68)); }
.ar-header { position: absolute; z-index: 5; top: max(14px, env(safe-area-inset-top)); left: 14px; right: 14px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; }
.ar-close { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: white; background: rgba(4,12,18,.48); backdrop-filter: blur(12px); cursor: pointer; font-size: 27px; line-height: 1; }
.ar-brand { display: flex; flex-direction: column; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.ar-brand strong { font-size: 16px; }
.ar-brand span { margin-top: 2px; color: rgba(255,255,255,.7); font-size: 9px; }
.ar-count { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(4,12,18,.45); backdrop-filter: blur(12px); font-size: 10px; font-weight: 800; }
.ar-compass { position: absolute; z-index: 4; top: max(78px, calc(env(safe-area-inset-top) + 67px)); left: 50%; transform: translateX(-50%); padding: 6px 11px; border-radius: 12px; color: rgba(255,255,255,.8); background: rgba(4,12,18,.35); font-size: 9px; font-weight: 750; white-space: nowrap; backdrop-filter: blur(8px); }
.ar-reticle { position: absolute; z-index: 2; top: 50%; left: 50%; width: 64px; height: 64px; transform: translate(-50%,-50%); opacity: .65; pointer-events: none; }
.ar-reticle i { position: absolute; display: block; background: white; border-radius: 2px; box-shadow: 0 0 6px rgba(0,0,0,.5); }
.ar-reticle i:nth-child(1), .ar-reticle i:nth-child(2) { top: 50%; width: 20px; height: 1px; }
.ar-reticle i:nth-child(1) { left: 0; }.ar-reticle i:nth-child(2) { right: 0; }
.ar-reticle i:nth-child(3), .ar-reticle i:nth-child(4) { left: 50%; width: 1px; height: 20px; }
.ar-reticle i:nth-child(3) { top: 0; }.ar-reticle i:nth-child(4) { bottom: 0; }
.ar-targets { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.ar-target { position: absolute; min-width: 116px; transform: translate(-50%,-50%); color: white; filter: drop-shadow(0 3px 8px rgba(0,0,0,.7)); }
.ar-target::before { content: ""; position: absolute; top: 50%; right: calc(100% + 7px); width: 23px; height: 1px; background: var(--sky-cyan); }
.ar-target::after { content: ""; position: absolute; top: calc(50% - 3px); right: calc(100% + 30px); width: 7px; height: 7px; border: 1px solid var(--sky-cyan); border-radius: 50%; }
.ar-target-main { padding: 7px 9px; border-left: 2px solid var(--sky-cyan); border-radius: 0 7px 7px 0; background: rgba(4,12,18,.68); backdrop-filter: blur(8px); }
.ar-target strong { display: block; font-size: 12px; letter-spacing: .02em; }
.ar-target span { display: block; margin-top: 3px; color: rgba(255,255,255,.74); font-size: 9px; }
.ar-target.is-interesting .ar-target-main { border-left-color: var(--sky-amber); }
.ar-target.is-interesting::before { background: var(--sky-amber); }
.ar-target.is-interesting::after { border-color: var(--sky-amber); }
.ar-target.is-emergency .ar-target-main { border-left-color: var(--sky-red); }
.ar-nearest { position: absolute; z-index: 5; left: 14px; right: 14px; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
.ar-nearest::-webkit-scrollbar { display: none; }
.ar-bearing-card { flex: none; min-width: 145px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: rgba(4,12,18,.55); backdrop-filter: blur(12px); }
.ar-bearing-card strong { display: block; font-size: 11px; }
.ar-bearing-card span { display: block; margin-top: 3px; color: rgba(255,255,255,.7); font-size: 9px; }
.ar-permission { position: absolute; z-index: 10; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 35px; text-align: center; background: radial-gradient(circle at 50% 30%, #19334c, #06101a 70%); }
.permission-icon { width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid rgba(77,217,255,.45); border-radius: 22px; color: var(--sky-cyan); background: rgba(77,217,255,.08); font-size: 36px; }
.ar-permission h2 { margin: 20px 0 8px; font-size: clamp(23px,6vw,32px); letter-spacing: -.04em; }
.ar-permission p { max-width: 430px; margin: 0; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.55; }
.ar-permission button { min-width: 180px; min-height: 47px; margin-top: 22px; border: 0; border-radius: 13px; color: #06121f; background: var(--sky-cyan); cursor: pointer; font-weight: 850; }
.ar-permission button:disabled { opacity: .55; cursor: wait; }
.ar-permission small { margin-top: 12px; color: rgba(255,255,255,.45); font-size: 9px; }

.toast { position: fixed; z-index: 11000; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); max-width: calc(100% - 28px); padding: 10px 14px; border: 1px solid var(--sky-border); border-radius: 10px; color: var(--sky-text); background: var(--sky-panel); box-shadow: 0 12px 35px rgba(0,0,0,.35); opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .2s, transform .2s; font-size: 11px; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }
.noscript { position: fixed; z-index: 20000; inset: 0; display: grid; place-items: center; padding: 30px; color: white; background: #07111d; text-align: center; }

@media (max-width: 740px) {
  :root { --header-height: 57px; --command-height: 103px; }
  .sky-header { grid-template-columns: 1fr auto; padding-inline: 11px; }
  .view-switch { position: fixed; z-index: 850; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: color-mix(in srgb, var(--sky-panel) 94%, transparent); box-shadow: 0 8px 30px rgba(0,0,0,.36); backdrop-filter: blur(14px); }
  .header-actions { grid-column: 2; }
  .icon-button { width: 39px; padding: 0; }
  .icon-button span { display: none; }
  .command-bar { display: grid; grid-template-rows: 42px 37px; gap: 5px; padding: 7px 10px 8px; }
  .search-box { width: 100%; min-width: 0; height: 39px; }
  .filter-scroller { width: calc(100vw - 20px); }
  .filter-chip { height: 31px; padding-inline: 10px; }
  .map-summary { top: 9px; max-width: calc(100% - 118px); left: 10px; transform: none; overflow: hidden; text-overflow: ellipsis; }
  .map-summary #feedStatus { overflow: hidden; text-overflow: ellipsis; }
  .summary-dot, .map-summary strong { display: none; }
  .map-tools { top: 9px; right: 9px; }
  .legend { display: none; }
  .leaflet-control-zoom { margin-left: 10px !important; margin-bottom: 70px !important; }
  .leaflet-control-attribution { margin-bottom: 55px !important; }
  .plane-marker-label { display: none; }
  .flight-drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(69%, 590px);
    padding: 19px 17px calc(76px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--sky-border);
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 55px rgba(0,0,0,.4);
    transform: translateY(105%);
  }
  .flight-drawer::before { content: ""; display: block; width: 38px; height: 4px; margin: -8px auto 11px; border-radius: 2px; background: var(--sky-border); }
  .flight-drawer.is-open { transform: translateY(0); }
  .drawer-hero { padding-top: 2px; }
  .drawer-title-row h2 { font-size: 24px; }
  .heading-dial { width: 52px; height: 52px; margin-right: 34px; }
  .list-view { padding: 20px 10px 80px; }
  .list-heading { padding: 0 4px; margin-bottom: 13px; }
  .list-heading h1 { font-size: 23px; }
  .flight-table-head { display: none; }
  .flight-list { gap: 6px; }
  .flight-card { grid-template-columns: minmax(0,1.4fr) .8fr .7fr; gap: 8px; min-height: 65px; padding: 9px 11px; }
  .flight-type { display: none; }
  .flight-metric.distance { display: none; }
  .ar-target { min-width: 105px; }
}

@media (max-width: 380px) {
  .sky-brand small { display: none; }
  .sky-brand strong { font-size: 16px; }
  .brand-mark { width: 32px; height: 32px; }
  .detail-primary strong { font-size: 11px; }
  .detail-primary > div { padding-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
