@font-face { font-family: "Geist"; src: url("geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #04080a; --panel: rgba(8,16,14,.92); --ink: #d8f5e4; --muted: #7fa592; --line: rgba(120,255,170,.14);
  --plane: #3dff8f; --plane-edge: #04080a; --sel: #ffffff; --ground: #2f6b49; --trail: #f5c400; --rwy: #6f8f7f;
  --ring: #12402a; --tick: #1d5c3c;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;   /* sharp, clean (user); numbers line up */
  --mono: var(--font);
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* playback has its own sleeker face (user): Geist, numbers still lined up */
.pb, .pbs { --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: var(--font); font-family: var(--font);
  font-feature-settings: "tnum"; letter-spacing: -.005em; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.35 var(--font);
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; font-optical-sizing: auto; font-kerning: normal; }
button, input, select { font-family: inherit; }
#scope { position: fixed; inset: 0; display: block; touch-action: none; cursor: grab; background: var(--bg); }
#scope:active { cursor: grabbing; }

.chip {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; z-index: 1000;
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line); font-size: 13px; white-space: nowrap;
  backdrop-filter: blur(6px);
}
.chip b { font-weight: 650; }
.chip .sep { color: var(--muted); }
.chip .replay { color: var(--muted); margin-left: 4px; }
.chip .replay:empty { display: none; }   /* an empty span plus the flex gap left extra space on the right */
.chip b { line-height: 1; }
.chip #icao { display: none; }   /* just the status dot (user): the airports on the scope already name the field */
.chip:has(.replay:empty) { padding: 8px; background: none; box-shadow: none; backdrop-filter: none; }   /* just one clean dot (user) */
.chip:has(.replay:empty) .dot { box-shadow: none; width: 10px; height: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa1ab; }
.dot.live { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.dot.stale { background: #f59e0b; }

.card {
  position: fixed; z-index: 1000; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 280px;
  padding: 14px 16px 12px; border-radius: 14px; background: var(--panel); box-shadow: 0 0 0 1px var(--line); backdrop-filter: blur(6px);
}
.card[hidden] { display: none; }
.card:not(.open) .more { display: none; }
@media (min-width: 521px) { .card.open { width: 400px; } }   /* more room when showing everything; phones are already full width */
.card.open .grid { gap: 12px 16px; }   /* compact by default: tap "More info" for the rest */
.card:not(.open) .grid { grid-template-columns: repeat(2, 1fr); }
.card .toggle { display: block; width: 100%; margin: 12px 0 -4px; padding: 6px 0 2px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--muted); font: 12px var(--font); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.card .x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px; }
.card .call { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.card .sub { color: var(--muted); margin-top: 1px; min-height: 18px; }
.route { margin-top: 10px; font: 650 16px var(--mono); letter-spacing: .04em; }
.route[hidden], .trip[hidden] { display: none; }
.route .arrow { color: var(--muted); margin: 0 8px; font-weight: 400; }
.card.open .less { display: none; }

/* trip panel (More info): airports, times and progress, FR24's layout kept quiet */
.trip { margin-top: 14px; }
.trip .ends { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; }
.trip .ends b { display: block; font: 700 30px/1 var(--mono); letter-spacing: .02em; }
.trip .ends span { display: block; margin-top: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip .ends small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.trip .r { text-align: right; }
.trip .jet { width: 36px; height: 36px; margin-top: -3px; fill: var(--plane); }   /* centred on the airport codes */
.trip .jet path { display: none; }
.trip .jet[data-ph="cruise"] .ph-cruise, .trip .jet[data-ph="dep"] .ph-dep, .trip .jet[data-ph="arr"] .ph-arr { display: inline; }
.trip .times { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.trip .times[hidden] { display: none; }
.trip .times div { display: flex; justify-content: space-between; align-items: baseline; }
.trip .times span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.trip .times b { font: 600 15px var(--mono); }
.trip .bar { position: relative; height: 2px; margin: 14px 0 6px; background: var(--line); border-radius: 2px; }
.trip .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--plane); border-radius: 2px; }
.trip .bar i::after { content: ""; position: absolute; right: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--plane); }
.trip .prog { display: flex; justify-content: space-between; color: var(--muted); font: 12px var(--mono); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; margin: 12px 0 0; }
.grid div { min-width: 0; }
.grid dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.grid dd { margin: 1px 0 0; font: 600 14px var(--mono); }
@media (max-width: 520px) {
  .card { left: 8px; right: 8px; width: auto; }
}

/* playback, laid out like Flightradar24's: a date/time wheel sheet, then a bottom panel with speed and a timeline */
.pb-open { position: fixed; z-index: 1000; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 38px; height: 38px;
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--panel); box-shadow: 0 0 0 1px var(--line);
  color: var(--muted); cursor: pointer; backdrop-filter: blur(6px); }
.pb-open svg, .pbs-lab svg, .pb-date svg, .pb-play svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pb-open svg { width: 20px; height: 20px; }
.pb-open:hover { color: var(--ink); }
body.pb-on .pb-open:not(.proc-btn), body.pb-on .chip, body.pbs-on .pb-open { display: none; }
/* approach overlay on/off, under the playback button (user) */
.proc-btn { top: calc(max(12px, env(safe-area-inset-top)) + 46px); }
body.pb-on .proc-btn, .pb-open[hidden] ~ .proc-btn { top: max(12px, env(safe-area-inset-top)); }
.pb-open[hidden] { display: none; }
.proc-btn.on { color: var(--plane); box-shadow: 0 0 0 1px rgba(61,255,143,.35); }
.pb-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: var(--ink); font-size: 30px; font-weight: 200; line-height: 1; cursor: pointer; padding: 4px 6px; }

.pbs { position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(460px, 100%); max-height: 100%;
  overflow: auto; border-radius: 18px 18px 0 0; background: #0b1311; box-shadow: 0 0 0 1px var(--line), 0 -10px 40px rgba(0,0,0,.6); }
.pbs[hidden] { display: none; }
.pbs-head { position: relative; padding: 16px; text-align: center; font-weight: 650; font-size: 17px; background: #111c19; border-radius: 18px 18px 0 0; }
.pbs-head .pb-x { top: 4px; }
.pbs-body { padding: 14px 12px max(16px, env(safe-area-inset-bottom)); }
.pbs-lab { display: flex; align-items: center; gap: 10px; margin: 6px 4px 10px; color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.pbs-lab svg { width: 22px; height: 22px; }
.pbs-lab small { font-weight: 400; letter-spacing: 0; text-transform: none; }
.wheels { position: relative; display: flex; justify-content: center; gap: 4px; height: 180px; margin-bottom: 18px; border-radius: 14px;
  background: rgba(120,255,170,.04); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.wheels::before { content: ""; position: absolute; left: 10px; right: 10px; top: 72px; height: 36px; border-radius: 10px; background: rgba(120,255,170,.09); pointer-events: none; }
.wheel { position: relative; height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 72px 0;
  -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel div { height: 36px; line-height: 36px; scroll-snap-align: center; text-align: center; font-size: 20px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.wheel div.on { color: var(--ink); font-size: 22px; }
.wheel div.off { opacity: .18; cursor: default; }
.w-mon { width: 150px; } .w-day { width: 64px; } .w-yr { width: 90px; } .w-hr, .w-min { width: 72px; font-variant-numeric: tabular-nums; }
.pbs-note { min-height: 18px; margin: -6px 4px 10px; color: var(--muted); font-size: 12px; }
.pbs-go { display: block; width: 100%; height: 48px; border: 0; border-radius: 10px; background: var(--plane); color: #04140b; font: 650 17px var(--font); cursor: pointer; }

.pb { position: fixed; z-index: 1000; left: 0; right: 0; bottom: max(8px, env(safe-area-inset-bottom)); margin: 0 auto; width: min(600px, calc(100% - 16px));
  padding: 10px 14px 12px; border-radius: 16px; background: rgba(12,20,18,.94); box-shadow: 0 0 0 1px var(--line); backdrop-filter: blur(8px); }
.pb[hidden] { display: none; }
.pb-grip { width: 64px; height: 4px; margin: 0 auto 8px; border-radius: 2px; background: rgba(216,245,228,.3); }
.pb-top { display: flex; align-items: stretch; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(216,245,228,.25); padding-right: 36px; }
.pb-top span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.pb-date { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 16px 0 0; border: 0; border-right: 1px solid rgba(216,245,228,.25);
  background: none; color: var(--ink); cursor: pointer; }
.pb-date svg { width: 34px; height: 34px; }
.pb-speed { flex: 1; min-width: 0; }
.pb-srow { display: flex; align-items: center; gap: 14px; height: 40px; }
.pb-srow b { flex: none; min-width: 42px; text-align: right; font-size: 20px; font-weight: 650; }
#pb-speed { flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 4px; outline: none;
  background: linear-gradient(to right, var(--plane) var(--fill, 0%), rgba(216,245,228,.3) var(--fill, 0%)); }
#pb-speed::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: pointer; }
#pb-speed::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }
.pb-bot { display: flex; align-items: center; gap: 14px; padding-top: 10px; }
.pb-play { flex: none; width: 56px; height: 56px; display: grid; place-items: center; padding: 0; border: 2px solid var(--ink); border-radius: 50%;
  background: none; color: var(--ink); cursor: pointer; }
.pb-play svg { width: 26px; height: 26px; stroke-width: 2.2; }
.pb-tl { position: relative; flex: 1; min-width: 0; }
.pb-now { display: flex; justify-content: center; gap: 28px; height: 24px; align-items: baseline; white-space: nowrap; }
.pb-now b { flex: 1; text-align: right; font-size: 15px; font-weight: 700; }
.pb-now span { flex: 1; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.pb-now span em { font-style: normal; font-size: 12px; margin-left: 4px; }
.pb-now span i { font-style: normal; color: var(--ink); }
#pb-ruler { display: block; width: 100%; height: 52px; touch-action: none; cursor: grab; }
#pb-ruler:active { cursor: grabbing; }
body.pb-on .card { bottom: calc(var(--pbh, 150px) + 16px); }
@media (max-width: 520px) { .pb-now { gap: 14px; } .pb-now b, .pb-now span { font-size: 14px; } .pb-date { padding-right: 12px; } .pb-top { gap: 12px; } }
.pb-tl::after { content: ""; position: absolute; left: 50%; top: 0; height: 26px; width: 2px; margin-left: -1px; background: #fff; }

/* desktop: the playback picker as a compact panel (date field, Now, hour and minute lists) like FR24's web version */
.pbd { display: none; }
@media (min-width: 700px) {
  .pbs { left: auto; right: 16px; bottom: auto; top: max(16px, env(safe-area-inset-top)); width: 360px; margin: 0; border-radius: 14px; overflow: hidden; }
  .pbs-head { border-radius: 0; padding: 12px; font-size: 16px; }
  .pbs-head .pb-x { top: 2px; font-size: 26px; }
  .pbs-body { padding: 14px 14px 14px; }
  .pbw { display: none !important; }
  .pbd { display: block; }
  .pbd .pbs-lab { margin: 2px 0 8px; }
  .pbd-now { margin-left: 10px; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--ink);
    font: 600 13px var(--font); letter-spacing: 0; text-transform: none; cursor: pointer; }
  .pbd-now:disabled { color: var(--muted); opacity: .5; cursor: default; }
  .pbd-field { position: relative; display: flex; align-items: center; height: 42px; padding: 0 14px; margin-bottom: 14px; border-radius: 8px;
    background: #111c19; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; color: var(--ink); cursor: pointer; }
  .pbd-field:hover { box-shadow: inset 0 0 0 1px rgba(120,255,170,.35); }
  .pbd-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; color-scheme: dark; }
  .pbd-time { display: flex; align-items: center; gap: 10px; }
  .pbd-time > span { margin-bottom: 14px; color: var(--muted); }
  .pbd-sel { flex: 1; padding: 0; }
  .pbd-sel::after { content: ""; position: absolute; right: 14px; top: 14px; width: 8px; height: 8px; border: solid var(--plane); border-width: 0 1.6px 1.6px 0;
    transform: rotate(45deg); pointer-events: none; }
  .pbd-sel select { width: 100%; height: 100%; padding: 0 14px; border: 0; background: none; color: var(--ink); font: 16px var(--font);
    -webkit-appearance: none; appearance: none; cursor: pointer; outline: none; color-scheme: dark; }
  .pbd-sel select option { background: #111c19; }
  .pbd-sel select option:disabled { color: #4a5c55; }
  .pbs-note { margin: -4px 0 10px; }
  .pbs-go { height: 42px; font-size: 16px; border-radius: 8px; }
}

.pb-d, .pb-zoom, .pb-title, .pb-arrow { display: none; }
.pb-rrow { display: flex; align-items: center; }
#pb-ruler { flex: 1; min-width: 0; }
/* desktop: one bar along the bottom, like FR24's web playback: date | play | timeline | zoom | speed | close */
@media (min-width: 1000px) {
  .pb { display: flex; align-items: stretch; width: min(1180px, calc(100% - 32px)); padding: 0; bottom: 16px; }
  .pb[hidden] { display: none; }
  .pb-grip, .pb .pb-m { display: none; }
  .pb-top, .pb-bot { display: contents; }
  .pb-top { border: 0; }
  .pb > *, .pb-top > *, .pb-bot > * { flex: none; }
  .pb-date { order: 1; justify-content: center; gap: 8px; padding: 14px 16px; border-right: 1px solid rgba(216,245,228,.18); }
  .pb-date svg { width: 32px; height: 32px; }
  .pb-d { display: block; }
  .pb-play { order: 2; align-self: center; width: 52px; height: 52px; margin: 0 6px 0 22px; }
  .pb-tl { order: 3; flex: 1; min-width: 0; padding: 14px 10px 6px; }
  .pb-title { display: none; position: absolute; left: 52px; top: 16px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
  .pb-arrow { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
  .pb-arrow svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
  .pb-tl::after { top: 14px; }
  .pb-zoom, .pb-speed { display: block; order: 4; width: 210px; padding: 14px 18px; border-left: 1px solid rgba(216,245,228,.18); }
  .pb-speed { order: 5; width: 200px; }
  .pb-zoom span, .pb-speed span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
  .pb-pm { flex: none; width: 22px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
  #pb-zoom { flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 4px; outline: none;
    background: linear-gradient(to right, var(--plane) var(--fill, 0%), rgba(216,245,228,.3) var(--fill, 0%)); }
  #pb-zoom::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: pointer; }
  #pb-zoom::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }
  .pb-zoom .pb-srow { gap: 10px; }
  .pb-speed .pb-srow b { font-size: 17px; min-width: 34px; }
  #pb-speed::-webkit-slider-thumb { width: 24px; height: 24px; }
  .pb .pb-x { order: 6; position: static; align-self: stretch; width: 56px; border-left: 1px solid rgba(216,245,228,.18); font-size: 32px; }
}

/* data credit (adsb.fi's and adsb.lol's terms): small and faint, bottom right, out of the way of the card and playback */
.credit { position: fixed; z-index: 900; right: 10px; bottom: max(8px, env(safe-area-inset-bottom)); font: 10px/1 var(--font);
  color: var(--muted); opacity: .55; pointer-events: auto; }
.credit a { color: inherit; text-decoration: none; }
.credit a:hover { text-decoration: underline; }
body.pb-on .credit, body.pbs-on .credit { display: none; }
