/* Flight Globe, "Cinematic" design (Glenn's pick, Nov 15 2026): the globe is the picture, the interface is type laid
   over it. No boxed card: flight details sit on a soft scrim at the left. Thin type, one warm accent, hairlines
   instead of boxes. Dark is the default; light keeps the same layout on a pale palette. */
@font-face { font-family: 'Inter'; font-weight: 200; font-style: normal; font-display: swap; src: url(fonts/inter-latin-200-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 300; font-style: normal; font-display: swap; src: url(fonts/inter-latin-300-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }

:root {
  --ink: #16151a; --muted: rgba(22, 21, 26, 0.56); --faint: rgba(22, 21, 26, 0.36); --hair: rgba(22, 21, 26, 0.1);
  --accent: #b2741a; --glow: rgba(178, 116, 26, 0.35); --on-ink: #fbfaf7;
  --raised: #fffdf9; --glass: rgba(255, 253, 249, 0.72); --glass-edge: rgba(22, 21, 26, 0.08);
  --shadow: 0 1px 2px rgba(22, 21, 26, 0.06), 0 18px 44px -18px rgba(22, 21, 26, 0.28);
  --card: #f2f0eb; --scrim: rgba(242, 240, 235, 0.94); --scrim-mid: rgba(242, 240, 235, 0.6);
  --page: radial-gradient(90% 75% at 55% 50%, #fbfaf7 0%, #efece6 60%, #e2ded6 100%);
  --volt: var(--accent); --focus: var(--accent); --dot-ring: transparent;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #f5f3ee; --muted: rgba(245, 243, 238, 0.56); --faint: rgba(245, 243, 238, 0.34); --hair: rgba(245, 243, 238, 0.12);
  --accent: #ffcf7a; --glow: rgba(255, 207, 122, 0.45); --on-ink: #0c0b0f;
  --raised: #1a191f; --glass: rgba(22, 21, 27, 0.62); --glass-edge: rgba(245, 243, 238, 0.1);
  --shadow: 0 18px 48px -16px rgba(0, 0, 0, 0.75);
  --card: #0b0b0e; --scrim: rgba(6, 6, 8, 0.95); --scrim-mid: rgba(6, 6, 8, 0.78);
  --page: radial-gradient(90% 75% at 55% 50%, #17161c 0%, #08080b 60%, #000 100%);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--page); color: var(--ink); font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-feature-settings: "cv11", "ss01"; overflow: hidden; -webkit-font-smoothing: antialiased; }
#app { position: fixed; inset: 0; overflow: clip; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sub { font-size: 12px; line-height: 16px; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; }

/* ---- top bar: quiet glass chips */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 24px 28px; pointer-events: none; }
.top > * { pointer-events: auto; }
.left { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pill, .search, .tools button, .results {
  background: var(--glass); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
}
.pill { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 12px; }
.pill b { font-weight: 600; letter-spacing: 0.2em; font-size: 11px; }
.pill span { color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.pill.off .dot { background: var(--faint); box-shadow: none; }
.tools { display: flex; flex-direction: column; gap: 6px; }
.tools button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 999px; cursor: pointer; color: var(--muted); transition: color 0.15s, background 0.15s; }
.tools button:hover { color: var(--ink); }
.tools svg { width: 16px; height: 16px; }
.tools button[aria-pressed="true"], .tools button[aria-expanded="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* search */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { position: relative; display: flex; align-items: center; gap: 8px; height: 34px; width: 260px; padding: 0 12px; border-radius: 999px; }
.search:focus-within { border-color: var(--accent); }
.search > svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; outline: none; }
.search input::placeholder { color: var(--faint); font-weight: 400; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { flex: none; min-width: 18px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--hair); color: var(--faint); font: inherit; font-size: 10px; line-height: 15px; text-align: center; }
.search:focus-within kbd { display: none; }
.results { position: absolute; left: -1px; top: 42px; width: 320px; max-width: calc(100vw - 32px); padding: 6px; border-radius: 16px; background: var(--raised); box-shadow: var(--shadow); z-index: 5; }
.results__head { padding: 6px 10px 4px; font-size: 11px; line-height: 16px; color: var(--muted); letter-spacing: 0.04em; }
.results ul { margin: 0; padding: 0; list-style: none; }
.results button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.results button:hover, .results button[aria-selected="true"] { background: var(--hair); }
.results .cs { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.04em; }
.results .who { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .alt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- the picked flight: type over a scrim, no box */
#card { position: absolute; left: 44px; bottom: 40px; z-index: 3; width: 360px; max-width: calc(100vw - 88px); display: flex; flex-direction: column; gap: 18px; }
#card::before { content: ""; position: fixed; left: 0; top: 0; bottom: 0; width: min(620px, 72vw); z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--scrim) 0%, var(--scrim) 34%, var(--scrim-mid) 62%, transparent 100%); }
#card .head { align-items: flex-start; }
#card .cs { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
#card .head .sub { margin-top: 2px; }
#c-close { width: 32px; height: 32px; flex: none; display: grid; place-items: center; padding: 0; border: 1px solid var(--hair); border-radius: 50%; background: transparent; cursor: pointer; color: var(--muted); }
#c-close:hover { color: var(--ink); border-color: var(--faint); }
#c-close svg { width: 14px; height: 14px; }
#card .route { align-items: flex-end; gap: 14px; margin-top: -4px; }
#card .route > div { min-width: 0; }
.code { font-size: 64px; line-height: 0.95; font-weight: 200; letter-spacing: -0.045em; }
#card .route .sub { margin-top: 8px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { text-align: right; }
.arrow { position: relative; flex: 1; min-width: 28px; height: 1px; margin-bottom: 38px; background: linear-gradient(90deg, var(--faint), var(--hair)); }
.arrow i { position: absolute; right: -1px; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--faint); border-right: 1px solid var(--faint); transform: rotate(45deg); }
#c-noroute { font-size: 13px; }
#card .type { display: flex; align-items: center; gap: 10px; margin-top: -6px; font-size: 13px; }
#card .type svg { width: 15px; height: 15px; flex: none; fill: var(--muted); stroke: none; }
#card .type > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
#card .type b { font-weight: 500; }
#card .type .sub { font-size: 12px; }

.progress { display: flex; flex-direction: column; gap: 8px; }
.bar { position: relative; height: 2px; border-radius: 1px; background: var(--hair); }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 1px; background: linear-gradient(90deg, var(--faint), var(--accent)); }
.bar b { position: absolute; top: -4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.progress .row { font-size: 11px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 18px; }
.stats > div { min-width: 0; }
.stats .sub { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; color: var(--faint); }
.val { margin-top: 4px; font-size: 19px; line-height: 24px; font-weight: 300; font-variant-numeric: tabular-nums; white-space: nowrap; }

#card .phase { display: flex; align-items: center; gap: 10px; font-size: 13px; }
#card .phase > i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--glow); }
#card .phase > span:first-of-type { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
#card .phase b { font-weight: 500; white-space: nowrap; }
#card .phase .sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inf { flex: none; padding: 2px 8px; border: 1px solid var(--hair); border-radius: 99px; font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); cursor: help; }

.profile { display: flex; flex-direction: column; gap: 6px; }
.profile .row { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.profile .row span:last-child { letter-spacing: 0.04em; text-transform: none; font-size: 11px; color: var(--muted); }
.profile svg { width: 100%; height: 30px; display: block; overflow: visible; }
.profile path { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0.85; }
.profile circle { fill: var(--accent); stroke: none; r: 3; }

#card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
#card .explore, #card .replaybtn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
#card .explore { border: 0; background: var(--ink); color: var(--on-ink); }
#card .explore svg { width: 16px; height: 16px; }
#card .explore:hover { filter: brightness(1.08); }
#card .replaybtn { border: 1px solid var(--hair); background: transparent; color: var(--ink); }
#card .replaybtn:hover { border-color: var(--faint); }
#card .replaybtn svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
#card .replaybtn small { font-size: 12px; font-weight: 400; color: var(--muted); }
#c-zoom { font-size: 11px; color: var(--faint); margin-top: -6px; }
#card .lo { display: none !important; }

/* labels over the globe */
#hint { position: absolute; left: 44px; bottom: 32px; z-index: 2; margin: 0; font-size: 12px; line-height: 18px; color: var(--faint); }
.attr { position: absolute; right: 28px; bottom: 24px; z-index: 2; max-width: 46vw; text-align: right; font-size: 10.5px; line-height: 16px; color: var(--faint); }
.attr a { color: inherit; }
.attr a:hover { color: var(--ink); }
#card:not([hidden]) ~ .attr, #replay:not([hidden]) ~ .attr { display: none; }
.ap { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; will-change: transform; }
.ap i { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--card); box-shadow: 0 0 10px var(--glow); }
.ap b, .tag { text-shadow: 0 0 3px var(--card), 0 0 6px var(--card), 0 0 10px var(--card); margin-top: -4.5px; }
.tag { position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; will-change: transform; }
#tip { position: absolute; left: 0; top: 0; z-index: 7; pointer-events: none; padding: 8px 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--glass-edge); color: var(--ink); font-size: 12px; line-height: 16px; white-space: nowrap; box-shadow: var(--shadow); }
#tip b { display: block; font-weight: 600; letter-spacing: 0.06em; }
#tip span { color: var(--muted); }

/* "explore this aircraft" popover on the plane */
.pop { position: absolute; left: 0; top: 0; z-index: 6; transform: translate(-50%, calc(-100% - 14px)); }
.pop button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 16px; border: 0; border-radius: 14px; background: var(--ink); color: var(--on-ink); font: inherit; cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; }
.pop b { font-size: 13px; font-weight: 600; } .pop span { font-size: 11px; opacity: 0.6; }
.pop::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.pop button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.detail { position: fixed; inset: 0; z-index: 50; background: #0b0b0e; animation: detail-in 0.32s ease-out; }
.detail iframe { width: 100%; height: 100%; border: 0; display: block; }
@keyframes detail-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }

/* ---- settings panel */
.settings { position: absolute; top: 24px; right: 76px; bottom: 24px; width: 320px; max-width: calc(100vw - 104px); z-index: 6; display: flex; flex-direction: column;
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 20px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3); }
.set-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 8px 22px; }
.set-head h2 { margin: 0; font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.icon { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--hair); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.icon:hover { color: var(--ink); }
.icon svg { width: 14px; height: 14px; }
.set-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 22px 22px; display: flex; flex-direction: column; gap: 18px; }
.settings section { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--hair); }
.settings section:first-child { border-top: 0; padding-top: 4px; }
.settings h3 { margin: 0; font-size: 10px; line-height: 16px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.field { display: flex; flex-direction: column; gap: 6px; }
.lbl { display: flex; justify-content: space-between; font-size: 13px; line-height: 20px; }
.lbl output { color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { margin: 0; font-size: 11.5px; line-height: 16px; color: var(--muted); }
.settings select { width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 10px; background: var(--raised); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.settings select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.settings input[type="range"] { width: 100%; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.tog { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; font-size: 13px; cursor: pointer; }
.tog small { display: block; font-size: 11.5px; color: var(--muted); }
.tog input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 0; border-radius: 999px; background: var(--hair); cursor: pointer; transition: background 0.2s; }
.tog input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.2s, background 0.2s; }
.tog input:checked { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.tog input:checked::after { transform: translateX(16px); background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.tog input:disabled { opacity: 0.4; }
.tog:has(input:disabled) { color: var(--muted); }
.tog input:focus-visible, .seg input:focus-visible + span, .settings input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg { display: flex; padding: 3px; gap: 3px; border-radius: 999px; border: 1px solid var(--hair); }
.seg label { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 6px 8px; border-radius: 999px; text-align: center; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--ink); color: var(--on-ink); }
.reset { align-self: flex-start; min-height: 36px; padding: 0 16px; border: 1px solid var(--hair); border-radius: 999px; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; }
.reset:hover { border-color: var(--faint); }

/* ---- replay: the same type-over-scrim treatment, centred along the bottom */
.replay { position: absolute; left: 0; right: 0; bottom: 34px; margin: 0 auto; width: min(640px, calc(100vw - 32px)); z-index: 5; display: flex; flex-direction: column; gap: 14px; }
.replay::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 340px; z-index: -1; pointer-events: none; background: linear-gradient(0deg, var(--scrim) 0%, var(--scrim-mid) 50%, transparent 100%); }
.replay .rp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.replay .rp-head > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.replay .rp-head b { font-size: 40px; line-height: 1; font-weight: 200; letter-spacing: -0.03em; }
.replay .rp-head .sub { font-size: 13px; }
.replay .rp-head button { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 1px solid var(--hair); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.replay .rp-head button:hover { color: var(--ink); }
.replay .rp-head button svg { width: 14px; height: 14px; }
.replay .rp-now { display: flex; align-items: baseline; gap: 22px; font-size: 12px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; color: var(--muted); }
.replay .rp-now b { font-size: 19px; font-weight: 300; letter-spacing: 0; color: var(--ink); }
.replay .rp-phase { display: flex; align-items: center; gap: 10px; min-height: 22px; font-size: 13px; }
.replay .rp-phase > i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--glow); flex: none; }
.replay .rp-phase b { font-weight: 500; white-space: nowrap; }
.replay .rp-phase .sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replay .rp-bar { position: relative; height: 2px; border-radius: 1px; background: var(--hair); cursor: pointer; touch-action: none; }
.replay .rp-bar::before { content: ""; position: absolute; inset: -10px 0; }
.replay .rp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1px; background: linear-gradient(90deg, var(--faint), var(--accent)); }
.replay .rp-bar i::after { content: ""; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.replay .rp-bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.replay .rp-ctl { display: flex; align-items: center; gap: 8px; }
.replay .round { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hair); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.replay #rp-play { background: var(--ink); color: var(--on-ink); border: 0; }
.replay .round svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.replay #rp-again svg { fill: none; }
.replay #rp-again svg path { stroke: currentColor; }
.replay #rp-play .pl, .replay #rp-play[data-on="1"] .pa { display: inline; }
.replay #rp-play .pa, .replay #rp-play[data-on="1"] .pl { display: none; }
.replay .pillbtn { height: 38px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--hair); background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.replay .pillbtn:hover, .replay .round:hover { border-color: var(--faint); }
.replay #rp-play:hover { filter: brightness(1.08); }
.replay button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.replay .pillbtn:disabled { opacity: 0.5; cursor: default; }
.replay.recording #rp-video { border-color: #ff6a5c; color: #ff6a5c; opacity: 1; }
.replay .rp-msg { font-size: 12px; }
.replay .rp-msg a { color: var(--accent); font-weight: 500; }
.replay .rp-link { width: 100%; font: inherit; font-size: 12px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--hair); background: transparent; color: inherit; }
.inf { cursor: help; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pill, .tools button, .search, .results, .settings { background: var(--raised); }
}
@media (prefers-reduced-motion: reduce) { .detail { animation: none; } .tog input, .tog input::after { transition: none; } }

/* ---- phones: everything along the bottom, over a bottom scrim; the globe keeps the top half */
@media (max-width: 640px) {
  .top { padding: 14px 16px; }
  .left { flex-direction: column; }
  .search { width: calc(100vw - 32px - 52px); }
  .search kbd { display: none; }
  #card { left: 18px; right: 18px; bottom: 18px; width: auto; max-width: none; gap: 12px; }
  #card::before { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 62vh; background: linear-gradient(0deg, var(--scrim) 0%, var(--scrim) 55%, var(--scrim-mid) 78%, transparent 100%); }
  .code { font-size: 46px; }
  .arrow { margin-bottom: 30px; }
  .stats { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 32px; row-gap: 10px; }
  .stats > div:nth-child(n+3) { display: none; }
  .val { font-size: 17px; }
  #card .profile, #c-zoom, #card .phase .sub { display: none; }
  #hint { left: 18px; right: 18px; bottom: 52px; }
  .attr { left: 18px; right: 18px; bottom: 16px; max-width: none; text-align: left; }
  .settings { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; max-height: 72vh; }
  .replay { bottom: 16px; gap: 12px; }
  .replay .rp-head b { font-size: 30px; }
  .replay .rp-phase .sub { display: none; }
}

/* ---- aircraft history panel (sits where Settings does) */
#card .histbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.h-top { display: flex; flex-direction: column; gap: 8px; padding-bottom: 2px; }
.h-reg { font-size: 40px; line-height: 1; font-weight: 200; letter-spacing: -0.03em; }
.h-count { margin-left: 8px; padding: 0 7px; border: 1px solid var(--hair); border-radius: 99px; font-size: 10px; letter-spacing: 0.04em; color: var(--muted); }
.h-facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; font-size: 13px; line-height: 18px; }
.h-facts dt { color: var(--muted); }
.h-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.h-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.h-list li { display: flex; justify-content: space-between; gap: 12px; }
.h-list b { font-weight: 500; letter-spacing: 0.04em; }
.h-ev { display: flex; flex-direction: column; gap: 4px; padding: 2px 0 2px 12px; border-left: 2px solid var(--accent); }
.h-ev + .h-ev { margin-top: 8px; }
.h-ev-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 13px; }
.h-ev-head b { font-weight: 600; }
.h-ev-head span { color: var(--muted); }
.h-sum { margin: 2px 0 0; font-size: 12.5px; line-height: 18px; opacity: 0.88; }
.h-sum.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.h-more { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 500; cursor: pointer; }
.h-ev-foot { font-size: 11px; color: var(--faint); letter-spacing: 0.02em; }
.h-none { margin: 0; font-size: 13px; }
.h-text { margin: 0; font-size: 13px; line-height: 19px; color: var(--muted); }
.h-links { display: flex; flex-wrap: wrap; gap: 6px; }
.h-links a { padding: 6px 12px; border: 1px solid var(--hair); border-radius: 99px; font-size: 12px; color: var(--ink); text-decoration: none; }
.h-links a:hover { border-color: var(--faint); }
.h-links a:focus-visible, .h-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.h-foot { margin: 6px 0 0; font-size: 11px; line-height: 16px; color: var(--faint); }

/* ---- the 3D airport: over the globe, under the replay player */
.airport { position: absolute; inset: 0; z-index: 4; opacity: 0; transition: opacity 0.8s ease; background: #9fb4c8; }
.airport.on { opacity: 1; }
.airport canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.apt-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.apt-tag { position: absolute; left: 0; top: 0; margin: -22px 0 0 8px; padding: 2px 7px; border-radius: 8px; background: rgba(10, 10, 13, 0.62); color: #f5f3ee; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; will-change: transform; }
.apt-tag.air { background: rgba(255, 207, 122, 0.9); color: #17140c; }
.apt-head { position: absolute; left: 24px; top: 24px; display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 18px; border-radius: 18px; background: rgba(10, 10, 13, 0.72); color: #f5f3ee; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); max-width: calc(100vw - 48px); }
.apt-head b { display: block; font-size: 15px; font-weight: 600; }
.apt-head .sub { display: block; margin-top: 3px; font-size: 12px; color: rgba(245, 243, 238, 0.66); }
.apt-close { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: rgba(245, 243, 238, 0.14); color: inherit; cursor: pointer; }
.apt-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.apt-note { position: absolute; left: 24px; bottom: 14px; margin: 0; max-width: 70vw; font-size: 11px; color: rgba(20, 22, 26, 0.72); }
.apt-open { pointer-events: auto; border: 0; background: none; color: inherit; cursor: pointer; padding: 6px 8px 6px 0; z-index: 2; }
.apt-open span { margin-top: -4.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--accent, var(--volt)); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--card); }
.apt-open:hover span, .apt-open:focus-visible span { background: var(--accent, var(--volt)); color: #17140c; }
html[data-airport] .top, html[data-airport] .attr, html[data-airport] #labels { visibility: hidden; }

/* ---- the explore view over the flying aircraft: see-through, cross-faded in; the globe's own panels step aside */
.detail.air { background: transparent; animation: none; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.detail.air.on { opacity: 1; pointer-events: auto; }
.detail.air iframe { background: transparent; }
html[data-detail] .top, html[data-detail] #card, html[data-detail] #labels, html[data-detail] .attr, html[data-detail] #hint, html[data-detail] .apt-open { opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }

/* first load: the globe is drawing itself in (intro.js); the marks on it wait, then fade in with it */
html[data-intro] #labels, html[data-intro] #hint { opacity: 0; }
html[data-intro=out] #labels, html[data-intro=out] #hint { opacity: 1; transition: opacity 0.5s ease; }
