/* Stratos EFB — the flight-deck interface.
 *
 * A working EFB, not a tablet mock-up: one top bar that always states the flight
 * and the simulator link, a section rail, and a single content region. The
 * palette is charcoal with one cyan accent reserved for the selected section,
 * the active route and the primary action; green, amber and red are state only.
 *
 * Everything is expressed in tokens so a section never invents its own spacing,
 * border weight or type size. The `e-*` component classes are the shared kit the
 * section modules render with; they are styled once, here.
 *
 *   colour      --efb-bg / --efb-surface* / --efb-line* / --efb-text|muted|faint
 *   accent      --efb-accent (cyan) and its ink
 *   state       --efb-good / --efb-warn / --efb-bad
 *   space       4 / 8 / 12 / 16 / 20 / 28
 *   radius      --efb-r (panels) / --efb-r-sm (controls)
 */

:root {
  /* The EFB's token names are aliases of the shared Stratos tokens
     (tokens.css), so the bag and the Flight Deck are one palette, one type
     family and one scale, and follow the same Day/Night/High theme. Section
     modules and inline styles keep reading the --efb-* names. */
  --efb-bg: var(--bg);
  --efb-screen-a: var(--bg);
  --efb-screen-b: var(--land);
  --efb-screen-c: var(--bg);
  --efb-panel: var(--ui);
  --efb-panel-2: var(--ui2);
  --efb-panel-3: color-mix(in srgb, var(--ui2) 88%, var(--txt));
  --efb-line: var(--line);
  --efb-line-strong: color-mix(in srgb, var(--mut) 34%, transparent);
  --efb-text: var(--txt);
  --efb-muted: var(--mut);
  --efb-faint: color-mix(in srgb, var(--mut) 72%, var(--bg));
  --efb-accent: var(--acc);
  --efb-accent-soft: color-mix(in srgb, var(--acc) 10%, transparent);
  --efb-accent-line: color-mix(in srgb, var(--acc) 38%, transparent);
  --efb-accent-ink: color-mix(in srgb, var(--acc) 18%, #000);
  --efb-accent-2: var(--acc);
  --efb-good: var(--grn);
  --efb-warn: var(--warn);
  --efb-bad: var(--red);
  --efb-radius: var(--s-radius-lg);
  --efb-r: var(--s-radius-lg);
  --efb-r-sm: var(--s-radius-md);
  --efb-shadow: var(--s-elev-2);
  --efb-font: var(--s-font);
  --efb-mono: var(--s-font-mono);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

/* The page itself is `body.efb`; `.efb-body` is the scrolling content region.
   They must not share a name or the region's padding lands on the viewport. */
body.efb {
  background: var(--efb-bg);
  color: var(--efb-text);
  font: 13.5px/1.45 var(--efb-font);
  /* Every figure in a column lines up: frequencies, headings, times, weights. */
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--efb-accent); text-decoration: none; }
a:hover { text-decoration: none; }
::selection { background: rgba(34, 211, 238, .25); }

/* ── frame ──────────────────────────────────────────────────────────── */

.efb-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  grid-template-rows: 54px minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
}

/* ── top bar ────────────────────────────────────────────────────────── */

.efb-top {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: content-box;
  background: #090d13;
  border-bottom: 1px solid var(--efb-line);
  min-width: 0;
}

.et-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--efb-text);
  flex: 0 0 auto;
}
.et-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--efb-accent);
  background: var(--efb-accent-soft);
  border: 1px solid var(--efb-accent-line);
}
.et-name {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .17em;
  line-height: 1.15;
}
.et-name small {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--efb-faint);
}

.et-flight {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--efb-line);
  height: 26px;
  overflow: hidden;
  white-space: nowrap;
}
.et-flight-empty {
  color: var(--efb-faint);
  font-size: 11.5px;
  letter-spacing: .01em;
}
.etf-callsign {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  color: var(--efb-text);
  background: var(--efb-panel-2);
  border: 1px solid var(--efb-line);
  border-radius: 5px;
  padding: 2px 7px;
}
.etf-route {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  font-variant-numeric: tabular-nums;
  color: var(--efb-text);
}
.etf-route s { text-decoration: none; color: var(--efb-faint); font-weight: 500; }
.etf-meta {
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--efb-faint);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
}

.et-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.et-conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 5px;
  border: 1px solid var(--efb-line);
  background: var(--efb-panel-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--efb-muted);
  white-space: nowrap;
}
.et-conn i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--efb-faint);
  flex: 0 0 auto;
}
.et-conn[data-state="live"] { color: #9df2d6; border-color: rgba(52, 211, 153, .32); background: rgba(52, 211, 153, .08); }
.et-conn[data-state="live"] i { background: var(--efb-good); }
.et-conn[data-state="connecting"] { color: #f6d79a; border-color: rgba(242, 181, 68, .3); background: rgba(242, 181, 68, .07); }
.et-conn[data-state="connecting"] i { background: var(--efb-warn); }
.et-conn[data-state="offline"] { color: #f6b7b7; border-color: rgba(248, 113, 113, .28); background: rgba(248, 113, 113, .06); }
.et-conn[data-state="offline"] i { background: var(--efb-bad); }

.et-clock {
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--efb-muted);
  padding: 0 8px;
  border-left: 1px solid var(--efb-line);
  height: 26px;
  display: inline-flex;
  align-items: center;
}
.et-clock small { font-size: 9px; color: var(--efb-faint); margin-left: 2px; letter-spacing: .1em; }

.et-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  min-width: 28px;
  padding: 0 7px;
  border-radius: var(--efb-r-sm);
  border: 1px solid transparent;
  color: var(--efb-muted);
  background: transparent;
}
.et-icon:hover { color: var(--efb-text); background: var(--efb-panel-2); border-color: var(--efb-line); }
.et-icon:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.et-tracker b {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* A launched-from-home-screen bag already has the OS status bar for the clock. */
body.efb-standalone .et-clock { display: none; }

/* ── section rail ───────────────────────────────────────────────────── */

.efb-nav {
  grid-column: 1;
  grid-row: 2;
  background: #080b11;
  border-right: 1px solid var(--efb-line);
  padding: 12px 8px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

/* Home sits above the section groups: it is the deck, not one of the apps. */
.en-home {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid var(--efb-line);
  background: rgba(148, 163, 184, .06);
  color: var(--efb-text);
  font-size: 12.5px;
  font-weight: 650;
}
.en-home:hover { background: rgba(148, 163, 184, .11); }
.en-home:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.en-home .en-icon { color: var(--efb-accent); }
.en-home.is-active { background: var(--efb-accent-soft); border-color: rgba(34, 211, 238, .18); }

.en-group { display: flex; flex-direction: column; gap: 1px; }
.en-group-head {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #55657a;
  padding: 2px 8px 6px;
}

.en-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 6px;
  color: var(--efb-muted);
  font-size: 12.5px;
  font-weight: 550;
  border: 1px solid transparent;
  position: relative;
}
.en-item:hover { color: var(--efb-text); background: rgba(148, 163, 184, .06); }
.en-item:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.en-icon { display: inline-flex; color: currentColor; opacity: .85; flex: 0 0 auto; }
.en-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-item.is-active {
  color: #dffbff;
  background: var(--efb-accent-soft);
  border-color: rgba(34, 211, 238, .18);
  font-weight: 650;
}
.en-item.is-active .en-icon { color: var(--efb-accent); opacity: 1; }
.en-item.is-active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--efb-accent);
}

.en-foot {
  margin-top: auto;
  padding: 12px 9px 2px;
  border-top: 1px solid var(--efb-line);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--efb-faint);
  text-transform: uppercase;
}
.en-foot b { color: var(--efb-muted); font-weight: 700; }
.en-foot-note { text-transform: none; letter-spacing: .01em; font-size: 9.5px; color: #526176; line-height: 1.35; }

/* ── content region ─────────────────────────────────────────────────── */

.efb-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--efb-bg);
}
body[data-wall="midnight"] .efb-main { background: radial-gradient(900px 420px at 60% -20%, rgba(30, 64, 175, .12), transparent 65%), var(--efb-bg); }
body[data-wall="horizon"] .efb-main { background: radial-gradient(900px 420px at 70% -10%, rgba(14, 165, 233, .10), transparent 62%), var(--efb-bg); }
body[data-wall="graphite"] .efb-main { background: radial-gradient(800px 400px at 30% -10%, rgba(148, 163, 184, .07), transparent 60%), #080a0e; }

.efb-page-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px 12px;
  border-bottom: 1px solid var(--efb-line);
  background: rgba(9, 13, 19, .6);
}
.eph-text { min-width: 0; }
.eph-text h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.005em;
}
.eph-text p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--efb-faint);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.efb-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.efb-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 30px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .26) transparent;
}
.efb-body::-webkit-scrollbar { width: 10px; }
.efb-body::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .2); border-radius: 8px; }
.efb-body > :first-child { margin-top: 0; }

/* ── home screen ────────────────────────────────────────────────────── */

body.view-home .efb-shell { display: none; }

.efb-home[hidden] { display: none; }

.efb-home {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  color: var(--efb-text);
  overflow: hidden;
}

.home-wall { position: absolute; inset: 0; z-index: 0; }
body[data-wall="aurora"] .home-wall {
  background:
    radial-gradient(120% 85% at 12% -15%, rgba(18, 92, 118, .55) 0%, transparent 58%),
    radial-gradient(95% 75% at 92% 6%, rgba(38, 58, 122, .5) 0%, transparent 62%),
    radial-gradient(80% 60% at 50% 110%, rgba(12, 74, 84, .35) 0%, transparent 68%),
    linear-gradient(165deg, #080d14 0%, #05080d 72%, #04060a 100%);
}
body[data-wall="midnight"] .home-wall {
  background:
    radial-gradient(110% 80% at 80% -10%, rgba(29, 78, 216, .38) 0%, transparent 62%),
    linear-gradient(170deg, #070b14 0%, #05070d 75%);
}
body[data-wall="horizon"] .home-wall {
  background:
    radial-gradient(100% 70% at 20% -5%, rgba(14, 165, 233, .32) 0%, transparent 60%),
    radial-gradient(80% 60% at 88% 100%, rgba(8, 96, 120, .3) 0%, transparent 65%),
    linear-gradient(170deg, #060a11 0%, #04070b 78%);
}
body[data-wall="graphite"] .home-wall {
  background:
    radial-gradient(90% 70% at 30% -10%, rgba(148, 163, 184, .16) 0%, transparent 62%),
    linear-gradient(170deg, #0a0c11 0%, #06080b 76%);
}

/* The house mark, without the wordmark, laid large in the middle of the deck
   the way a wallpaper carries an identity. One accent tone, faint enough to
   stay texture behind the app labels and never over the dock. */
.home-logo {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity .45s ease;
}
/* The house icon belongs to the unbranded deck: once an airline is resolved,
   its own colour wash carries the wallpaper and the Stratos mark steps back. */
body:not([data-airline]) .home-logo,
body[data-airline=""] .home-logo { opacity: .22; }
/* The app icon as a luminance mask: the white wing shows in the accent, the
   icon's dark navy ground all but disappears. */
.home-mark {
  width: clamp(300px, 52vmin, 640px);
  aspect-ratio: 1;
  background: var(--efb-accent);
  /* The wing alone on a transparent ground, so no square of the icon's navy shows. */
  -webkit-mask: url(images/stratos-wing.png) center / contain no-repeat;
  mask: url(images/stratos-wing.png) center / contain no-repeat;
}

/* The resolved airline's mark, laid large across the deck and shown only when
   the bag is dressed for that operator. The house mark above steps aside. */
.home-airline-logo {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity .45s ease;
}
body[data-airline]:not([data-airline=""]) .home-airline-logo { opacity: 1; }
.hb-mark { display: grid; place-items: center; }
.hb-symbol {
  width: clamp(220px, 38vmin, 460px);
  aspect-ratio: 1;
  background: var(--efb-accent);
  -webkit-mask: var(--brand-logo) center / contain no-repeat;
  mask: var(--brand-logo) center / contain no-repeat;
  opacity: .24;
}
.hb-wordmark {
  width: min(82vw, 780px);
  height: clamp(130px, 20vh, 220px);
  background: var(--efb-accent);
  -webkit-mask: var(--brand-logo) center / contain no-repeat;
  mask: var(--brand-logo) center / contain no-repeat;
  opacity: .2;
}
.hb-name {
  max-width: 86vw;
  font-size: clamp(38px, 8vmin, 92px);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: .01em;
  text-align: center;
  color: var(--efb-accent);
  opacity: .2;
}

.home-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px 6px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  min-width: 0;
}
.hb-time { display: inline-flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.hb-time b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hb-time em { font-style: normal; font-size: 9.5px; letter-spacing: .14em; color: rgba(230, 237, 246, .58); }
.hb-flight {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 11px;
  color: rgba(230, 237, 246, .72);
}
.hb-flight b {
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .08em;
  color: #eaf6ff;
  background: rgba(148, 163, 184, .16);
  border-radius: 4px;
  padding: 2px 7px;
}
.hb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hb-glyph { display: inline-flex; color: rgba(230, 237, 246, .55); }
.efb-home .et-conn { background: rgba(10, 16, 23, .55); border-color: rgba(148, 163, 184, .2); color: rgba(230, 237, 246, .78); }

.home-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 30px 38px 10px;
  scrollbar-width: thin;
}
.home-head h1 { margin: 0; font-size: 27px; font-weight: 750; letter-spacing: -.02em; }
.home-head p { margin: 5px 0 0; font-size: 11.5px; letter-spacing: .02em; color: rgba(230, 237, 246, .5); }

/* The deck's one widget: current route and bridge state, with the two numbers a
   pilot glances at. It is a link, so tapping it opens Live. */
.home-widget {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 20px;
  max-width: 1120px;
  margin-top: 22px;
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(11, 17, 24, .72);
  border: 1px solid rgba(34, 211, 238, .17);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--efb-text);
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.home-widget:hover { border-color: rgba(34, 211, 238, .38); background: rgba(13, 21, 30, .82); }
.home-widget:active { transform: scale(.996); }
.home-widget:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 3px; }

.hw-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.hw-eyebrow {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--efb-faint);
}
.hw-state {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--efb-muted);
}
.hw-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--efb-faint); }
.hw-state[data-state="live"] { color: #9df2d6; }
.hw-state[data-state="live"] i { background: var(--efb-good); }
.hw-state[data-state="connecting"] { color: #f6d79a; }
.hw-state[data-state="connecting"] i { background: var(--efb-warn); }
.hw-state[data-state="offline"] { color: #f6b7b7; }
.hw-state[data-state="offline"] i { background: var(--efb-bad); }

.hw-route {
  display: block;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.hw-route s { text-decoration: none; color: var(--efb-faint); font-weight: 500; margin: 0 10px; }
.hw-route.is-empty { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--efb-muted); }
.hw-meta { display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: .02em; color: var(--efb-faint); }
.hw-phase {
  /* Sits in the widget's header after the connection state, so the phase reads
     as part of the status line rather than as a stray label under the route. */
  margin: 0 0 0 10px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #cfd9e6;
  border: 1px solid var(--efb-line-strong);
  background: rgba(148, 163, 184, .08);
}
.hw-phase[data-phase="AIRBORNE"],
.hw-phase[data-phase="CLIMB"],
.hw-phase[data-phase="CRUISE"] { color: #9ff0d5; border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .09); }
.hw-phase[data-phase="TAXI"],
.hw-phase[data-phase="TAKEOFF"] { color: #f7dca4; border-color: rgba(242, 181, 68, .3); background: rgba(242, 181, 68, .09); }
.hw-phase[data-phase="DESCENT"],
.hw-phase[data-phase="APPROACH"] { color: #b6f4fd; border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }
.hw-phase[data-phase="LANDED"],
.hw-phase[data-phase="COMPLETE"] { color: #b6f4fd; border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }

.hw-tele { display: flex; gap: 22px; justify-self: end; }
.hw-cell { display: flex; flex-direction: column; gap: 1px; min-width: 84px; }
.hw-cell em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--efb-faint);
}
.hw-cell b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hw-cell b .hw-unit { font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--efb-faint); margin-left: 1px; }
.hw-cell small { font-size: 9.5px; color: var(--efb-faint); }
.hw-hint { font-size: 11px; line-height: 1.45; color: var(--efb-muted); max-width: 36ch; text-align: right; }

/* Fixed 96 px columns, centred: the tiles stay the same size from a phone to a
   desk monitor instead of stretching with the viewport. */
.home-grid {
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 108px));
  gap: 28px 4px;
  justify-content: center;
  max-width: 1120px;
}

.home-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(230, 237, 246, .26);
}

.hi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--efb-text);
  text-decoration: none;
  border-radius: 14px;
}
.hi-tile {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 23%;
  display: grid;
  place-items: center;
  color: #fff;
  /* Each app is its own rounded-square tile, the way an iPhone home screen
     reads: a saturated gradient, a white glyph and a soft top highlight. */
  background: linear-gradient(160deg, #4a5566, #232b36);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -10px 18px rgba(0, 0, 0, .22), 0 8px 16px rgba(0, 0, 0, .34);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
  overflow: hidden;
}
.hi-tile::after {
  content: "";
  position: absolute;
  inset: 1px 1px 52%;
  border-radius: 22% 22% 40% 40% / 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.hi-tile svg { position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .28)); }
.hi-navigator .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-flightplan .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-routes .hi-tile { background: linear-gradient(160deg, #2f7bff, #0b2f9f 80%); }
/* Route Finder */
.rf { display: flex; flex-direction: column; gap: 12px; max-width: 1100px; }
.rf-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.rf-filters > div.rf-field { grid-column: span 2; }
.rf-now { height: 36px; gap: 7px; }
.rf-slider { display: flex; align-items: center; gap: 12px; height: 36px; }
.rf-track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--efb-line); }
.rf-track i { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--efb-accent); }
.rf-track input { position: absolute; inset: -10px 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.rf-track input::-webkit-slider-runnable-track { background: none; }
.rf-track input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--efb-accent); cursor: grab; }
.rf-track input::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--efb-accent); cursor: grab; }
.rf-track input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--efb-accent-line); }
.rf-slider output { min-width: 112px; font: 600 12.5px/1 var(--efb-font); font-variant-numeric: tabular-nums; color: var(--efb-text, inherit); text-align: right; }
.rf-now i { width: 8px; height: 8px; border-radius: 50%; background: var(--efb-faint, #64748b); flex: none; }
.rf-now[aria-pressed="true"] { border-color: var(--efb-accent-line); color: var(--efb-accent); }
.rf-now[aria-pressed="true"] i { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.rf-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rf-field .e-input { text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.rf-go { height: 36px; }
.rf-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.rf-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--efb-r); background: var(--efb-panel); border: 1px solid var(--efb-line); }
.rf-card:hover { border-color: var(--efb-accent-line); }
.rf-head { display: flex; align-items: center; gap: 10px; }
/* Airline marks are drawn for light backgrounds, so the tile is light. */
.rf-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; background: #f8fafc; padding: 4px; flex: none; }
.rf-code { display: grid; place-items: center; font: 700 10px/1 var(--efb-mono); color: var(--efb-muted); background: var(--efb-panel-2); }
.rf-id { display: flex; flex-direction: column; min-width: 0; }
.rf-id b { font: 700 16px/1.1 var(--efb-font); letter-spacing: .03em; }
.rf-id span { font-size: 11.5px; color: var(--efb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-live { margin-left: auto; flex: none; }
.rf-typ { font-style: normal; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.rf-route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.rf-apt { display: flex; flex-direction: column; }
.rf-apt b { font: 700 22px/1 var(--efb-font); letter-spacing: .04em; }
.rf-apt span { font-size: 11px; color: var(--efb-muted); margin-top: 3px; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-stand { margin-top: 5px; font: 600 11px/1.2 var(--efb-font); font-style: normal; letter-spacing: .03em; color: var(--efb-accent); }
.rf-stand[hidden] { display: none; }
.rf-arr { text-align: right; align-items: flex-end; }
.rf-leg { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--efb-muted); font-variant-numeric: tabular-nums; }
.rf-leg i { display: block; width: 100%; height: 0; border-top: 1.5px dashed var(--efb-accent-line); position: relative; }
.rf-leg i::after { content: '✈'; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); color: var(--efb-accent); font-size: 12px; font-style: normal; }
.rf-actions { display: flex; gap: 8px; justify-content: flex-end; }
.rf-source { margin: 2px; }
@media (max-width: 900px) { .rf-filters { grid-template-columns: 1fr 1fr; } .rf-filters .e-seg { flex-wrap: wrap; } .rf-results { grid-template-columns: 1fr; } }
.hi-briefing .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-weather .hi-tile { background: linear-gradient(160deg, #4fb0ff, #0a63d8 78%); }
.hi-charts .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-airport .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-performance .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-weightbalance .hi-tile { background: linear-gradient(160deg, #2c2c2e, #1c1c1e 78%); }
.hi-fuel .hi-tile { background: linear-gradient(160deg, #4cd964, #1a8f3a 78%); }
.hi-checklists .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-cabin .hi-tile { background: linear-gradient(160deg, #ff5c7c, #b3123c 78%); }
.hi-notepad .hi-tile { background: linear-gradient(180deg, #ffd60a 0 27%, #ffffff 27%); }
.hi-logbook .hi-tile { background: linear-gradient(160deg, #ffffff, #eef1f5); }
.hi-settings .hi-tile { background: linear-gradient(160deg, #b9bec6, #6f757f 78%); }
/* Downloaded app artwork: the image is the tile, so no tint, gloss or border. */
.hi-tile.is-art { background: none; border-color: transparent; box-shadow: 0 10px 20px rgba(0, 0, 0, .42); }
.hi-tile.is-art::after { display: none; }
.hi-tile .hi-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.hi:hover .hi-tile {
  transform: translateY(-2px);
  filter: saturate(1.12) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -10px 18px rgba(0, 0, 0, .22), 0 14px 24px rgba(0, 0, 0, .44);
}
.hi:active .hi-tile { transform: scale(.96); }
.hi:focus-visible .hi-tile { outline: 2px solid var(--efb-accent); outline-offset: 3px; }
.hi-label {
  font-size: 11.5px;
  line-height: 1.3;
  text-align: center;
  color: #dbe6f2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  overflow-wrap: anywhere;
  max-width: 100%;
}

.home-dock {
  position: relative;
  z-index: 1;
  align-self: center;
  display: flex;
  gap: 20px;
  margin: auto 16px 18px;
  padding: 11px 18px;
  border-radius: 24px;
  background: rgba(12, 18, 26, .58);
  border: 1px solid rgba(148, 163, 184, .16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.home-dock .hi-tile { width: 58px; height: 58px; }
.home-dock .hi-label { display: none; }
/* On a phone the tab bar (mobile.css) already holds these apps; the dock would only cover the grid. */
@media (max-width: 767px) { .home-dock { display: none; } }
.home-dock .hi { gap: 0; }

/* iPadOS home layout: a column of widgets on the left, the app grid on the
   right, glass widgets and a glass dock over the wallpaper. */
.home-head h1, .home-head p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 34px; align-items: start; max-width: 1180px; margin: 6px auto 0; }
.home-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-content: start; }
.home-widgets > [data-widget] { grid-column: 1 / -1; position: relative; }
.home-widgets > .hw-tz { grid-column: auto; }
[data-widget][hidden] { display: none !important; }
.home-layout .home-widget {
  margin: 0; max-width: none; min-height: 158px;
  grid-template-columns: minmax(0, 1fr); align-content: space-between; gap: 6px;
  padding: 16px 18px; border-radius: 24px; border: 0;
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.home-layout .home-widget:hover { background: rgba(255, 255, 255, .14); }
.home-layout .hw-tele { justify-content: flex-start; }
.home-clockw {
  display: flex; align-items: center; gap: 20px; min-height: 158px;
  padding: 16px 20px; border-radius: 24px;
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.hcw-face { width: 118px; height: 118px; flex: none; }
.hcw-dial { fill: #f5f5f7; }
.hcw-ticks line { stroke: #1c1c1e; stroke-width: 2.4; stroke-linecap: round; }
.hcw-hand { stroke: #1c1c1e; stroke-width: 4; stroke-linecap: round; }
.hcw-sec { stroke: #ff9500; stroke-width: 1.6; stroke-linecap: round; }
.hcw-pin { fill: #ff9500; }
.hcw-read { display: flex; flex-direction: column; gap: 12px; }
.hcw-read span { display: flex; flex-direction: column; }
.hcw-read b { font-size: 30px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hcw-read em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(235, 240, 248, .6); margin-top: 3px; }
.home-layout .home-grid { margin: 0; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 30px 8px; justify-content: stretch; max-width: none; }
.home-dock {
  border-radius: 32px; padding: 12px 16px; gap: 18px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5);
}
@media (max-width: 1060px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .home-widgets { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
}

/* ── layout helpers ─────────────────────────────────────────────────── */

.e-grid { display: grid; gap: 12px; }
/* A grid child defaults to min-content width, which lets a long METAR decode
   run under the neighbouring column. Every cell is allowed to shrink. */
.e-grid > * { min-width: 0; }
.e-grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.e-grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.e-grid.four { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.e-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.e-spacer { flex: 1 1 auto; }

/* ── panels ─────────────────────────────────────────────────────────── */

.e-card {
  background: var(--efb-panel);
  border: 1px solid var(--efb-line);
  border-radius: var(--efb-r);
  padding: 13px 15px;
  min-width: 0;
}
.e-card h3 {
  margin: 0 0 10px;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--efb-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.e-card h3 em {
  font-style: normal;
  letter-spacing: .04em;
  text-transform: none;
  font-weight: 600;
  color: var(--efb-faint);
  font-size: 10px;
}

.e-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.e-hero b { font-size: 24px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.e-hero s { text-decoration: none; color: var(--efb-faint); }
.e-hero span { color: var(--efb-muted); font-size: 11.5px; }

.e-big { font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.e-label { font-size: 9px; letter-spacing: .13em; text-transform: uppercase; color: var(--efb-faint); font-weight: 700; }
.e-value { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.e-muted { color: var(--efb-muted); }
.e-small { font-size: 11px; line-height: 1.5; }
.e-faint { color: var(--efb-faint); }
.e-code {
  display: block;
  font: 11.5px/1.55 var(--efb-mono);
  background: #0e0f12;
  border: 1px solid var(--efb-line);
  border-radius: var(--efb-r-sm);
  padding: 9px 11px;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  color: #cfdceb;
}

/* ── key/value lists ───────────────────────────────────────────────── */

.e-kv { display: grid; grid-template-columns: minmax(90px, 42%) 1fr; gap: 6px 14px; margin: 0; }
.e-kv dt { color: var(--efb-muted); font-size: 11.5px; min-width: 0; }
.e-kv dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.e-kv dd small { display: block; font-weight: 500; color: var(--efb-faint); font-size: 10px; }

/* ── badges ─────────────────────────────────────────────────────────── */

.e-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid var(--efb-line);
  color: var(--efb-muted);
  background: rgba(148, 163, 184, .06);
  white-space: nowrap;
}
.e-badge.good { color: #9ff0d5; border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .09); }
.e-badge.warn { color: #f7dca4; border-color: rgba(242, 181, 68, .3); background: rgba(242, 181, 68, .09); }
.e-badge.bad { color: #f7bdbd; border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .09); }
.e-badge.accent { color: #b6f4fd; border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }

/* ── controls ───────────────────────────────────────────────────────── */

.e-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--efb-r-sm);
  border: 1px solid var(--efb-line-strong);
  background: var(--efb-panel-2);
  color: var(--efb-text);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.e-btn:hover { background: var(--efb-panel-3); border-color: rgba(148, 163, 184, .38); }
.e-btn:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.e-btn.primary {
  background: var(--efb-accent);
  border-color: var(--efb-accent);
  color: var(--efb-accent-ink);
  font-weight: 750;
}
.e-btn.primary:hover { background: #4ce0f4; border-color: #4ce0f4; }
.e-btn.ghost { background: transparent; border-color: var(--efb-line); color: var(--efb-muted); }
.e-btn.ghost:hover { color: var(--efb-text); border-color: var(--efb-line-strong); background: rgba(148, 163, 184, .05); }
.e-btn.small { min-height: 26px; padding: 0 9px; font-size: 10.5px; border-radius: 6px; }
.e-btn[aria-pressed="true"] { color: #b6f4fd; border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }
.e-btn:disabled { opacity: .45; cursor: not-allowed; }

.e-input, .e-select {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: var(--efb-r-sm);
  border: 1px solid var(--efb-line-strong);
  background: #0e0f12;
  color: var(--efb-text);
  font-size: 12.5px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.e-input::placeholder { color: #5d6c80; }
.e-input:hover, .e-select:hover { border-color: rgba(148, 163, 184, .34); }
.e-input:focus, .e-select:focus {
  outline: none;
  border-color: var(--efb-accent);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, .16);
}
.e-input.small { min-height: 28px; padding: 4px 8px; font-size: 11.5px; }
.e-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.e-field > label {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--efb-faint);
  font-weight: 700;
}
.e-field .e-hint { font-size: 10px; color: var(--efb-faint); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--efb-accent); }

.e-seg {
  display: inline-flex;
  gap: 2px;
  background: #0e0f12;
  border: 1px solid var(--efb-line);
  padding: 2px;
  border-radius: var(--efb-r-sm);
}
.e-seg button {
  border: 0;
  background: none;
  color: var(--efb-muted);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 650;
}
.e-seg button:hover { color: var(--efb-text); }
.e-seg button[aria-pressed="true"] { background: var(--efb-panel-3); color: var(--efb-text); }

/* ── tables ─────────────────────────────────────────────────────────── */

.e-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.e-table th {
  text-align: left;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--efb-faint);
  font-weight: 750;
  padding: 6px 8px;
  border-bottom: 1px solid var(--efb-line);
  white-space: nowrap;
}
.e-table td { padding: 6px 8px; border-bottom: 1px solid rgba(148, 163, 184, .06); vertical-align: top; }
.e-table tbody tr:hover td { background: rgba(148, 163, 184, .035); }
.e-table tr:last-child td { border-bottom: 0; }
.e-table td.num, .e-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.e-table tr.is-current td { background: var(--efb-accent-soft); }
.e-table .e-group td {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 9px;
  font-weight: 800;
  color: var(--efb-muted);
  background: rgba(148, 163, 184, .05);
}

/* ── lists ──────────────────────────────────────────────────────────── */

.e-list { display: flex; flex-direction: column; gap: 6px; }
.e-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--efb-r-sm);
  border: 1px solid var(--efb-line);
  background: var(--efb-panel-2);
  text-align: left;
  width: 100%;
  color: var(--efb-text);
}
.e-list-item:hover { border-color: var(--efb-line-strong); background: var(--efb-panel-3); }
.e-list-item[aria-current="true"] { border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }
.e-list-item .li-main { min-width: 0; flex: 1; }
.e-list-item .li-main b { display: block; font-size: 12.5px; }
.e-list-item .li-main span { display: block; font-size: 10.5px; color: var(--efb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── progress ───────────────────────────────────────────────────────── */

.e-bar { height: 5px; border-radius: 3px; background: rgba(148, 163, 184, .14); overflow: hidden; }
.e-bar b { display: block; height: 100%; border-radius: 3px; background: var(--efb-accent); transition: width .3s ease; }
.e-bar[data-state="warn"] b { background: var(--efb-warn); }
.e-bar[data-state="bad"] b { background: var(--efb-bad); }
.e-bar[data-state="good"] b { background: var(--efb-good); }
.e-strip { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(148, 163, 184, .1); }
.e-strip b { display: block; height: 100%; }

/* ── empty, notice, loading ─────────────────────────────────────────── */

.e-empty {
  padding: 22px 18px;
  border-radius: var(--efb-r);
  border: 1px dashed var(--efb-line-strong);
  background: rgba(148, 163, 184, .03);
  color: var(--efb-muted);
  text-align: center;
}
.e-empty b { display: block; color: var(--efb-text); font-size: 13px; margin-bottom: 5px; }
.e-empty p { margin: 5px auto 10px; max-width: 520px; font-size: 11.5px; line-height: 1.55; }

.e-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--efb-r-sm);
  border: 1px solid var(--efb-line);
  background: rgba(148, 163, 184, .05);
  color: var(--efb-muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.e-notice b { color: var(--efb-text); }
.e-notice.warn { border-color: rgba(242, 181, 68, .28); background: rgba(242, 181, 68, .07); color: #f3dfb4; }
.e-notice.bad { border-color: rgba(248, 113, 113, .28); background: rgba(248, 113, 113, .07); color: #f7cfcf; }
.e-notice.good { border-color: rgba(52, 211, 153, .26); background: rgba(52, 211, 153, .07); color: #c6f5e5; }

.e-loading { display: flex; align-items: center; gap: 8px; color: var(--efb-muted); font-size: 11.5px; padding: 12px 2px; }
.e-loading i {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, .28);
  border-top-color: var(--efb-accent);
  animation: efbSpin .8s linear infinite;
}
@keyframes efbSpin { to { transform: rotate(360deg); } }

/* ── search ─────────────────────────────────────────────────────────── */

.e-search { position: relative; flex: 1; min-width: 180px; }
.e-search .e-input { padding-left: 31px; }
.e-search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; color: var(--efb-faint); pointer-events: none;
}
.e-results {
  position: absolute;
  z-index: 30;
  left: 0; right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
  border-radius: var(--efb-r-sm);
  border: 1px solid var(--efb-line-strong);
  background: #151619;
  box-shadow: var(--efb-shadow);
}
.e-results button {
  display: block; width: 100%; text-align: left;
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .07);
  background: none;
  color: var(--efb-text);
  font-size: 11.5px;
}
.e-results button:hover, .e-results button:focus-visible { background: var(--efb-accent-soft); outline: none; }
.e-results button b { font-weight: 700; }
.e-results button span { color: var(--efb-muted); margin-left: 6px; font-size: 10.5px; }
.e-results .e-empty-small { padding: 10px 11px; color: var(--efb-faint); font-size: 11px; }

/* ── maps ───────────────────────────────────────────────────────────── */

.e-map {
  position: relative;
  height: 320px;
  border-radius: var(--efb-r);
  overflow: hidden;
  border: 1px solid var(--efb-line);
  background: #08090c;
}
.e-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ── charts ─────────────────────────────────────────────────────────── */

/* A chart workspace, not a page of cards: library on the left, document on the
   right, both the same height so the list never floats in empty space. */
.ch-workspace {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 12px;
  min-height: 430px;
  height: calc(100dvh - 54px - 54px - 46px);
}
.ch-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--efb-panel);
  border: 1px solid var(--efb-line);
  border-radius: var(--efb-r);
  overflow: hidden;
}
.ch-side-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--efb-line);
  background: rgba(148, 163, 184, .025);
}
.ch-quick { display: flex; flex-wrap: wrap; gap: 5px; }
.ch-quick:empty { display: none; }
.ch-seg { display: flex; }
.ch-seg button { flex: 1 1 auto; padding: 5px 4px; }
.ch-list { flex: 1; min-height: 0; overflow-y: auto; padding: 7px; gap: 4px; scrollbar-width: thin; }
.ch-list .e-list-item { padding: 7px 9px; gap: 8px; }
.ch-list .e-list-item .li-main b { font-size: 12px; font-weight: 600; }
.ch-list .e-list-item .li-main span { font-size: 10px; }
.ch-list a.e-list-item { text-decoration: none; }
.ch-hint { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.ch-hint b { font-size: 12px; font-weight: 600; color: var(--efb-text); }
.ch-hint span { font-size: 11px; color: var(--efb-faint); line-height: 1.5; }

.ch-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ch-main > #chart-notice,
.ch-main > #chart-header { flex: 0 0 auto; }
.ch-main > .chart-frame { flex: 1; min-height: 0; }
.ch-main > .chart-frame.is-centred { justify-content: center; }
.ch-main > .chart-frame.is-centred .ch-sources { margin-bottom: 4px; }

/* Airport header: identity, coverage status and the source of the charts. */
.ch-airport { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.ch-airport-top { display: flex; align-items: flex-start; gap: 10px; }
.ch-airport-id { display: flex; gap: 9px; align-items: center; min-width: 0; }
.ch-flag { font-size: 19px; line-height: 1; }
.ch-airport-codes { display: flex; align-items: baseline; gap: 6px; }
.ch-airport-codes b { font-size: 14px; letter-spacing: .05em; }
.ch-airport-codes span { font-size: 10px; color: var(--efb-faint); }
.ch-airport-name { font-size: 11.5px; color: var(--efb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-airport-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.ch-airport-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ch-airport-meta span { display: flex; flex-direction: column; gap: 1px; font-size: 11px; color: var(--efb-text); }
.ch-airport-meta i { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--efb-faint); }
.ch-side-top select.e-input { min-width: 0; flex: 1 1 0; }

.ch-viewer-empty {
  flex: 1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 24px;
  border: 1px dashed var(--efb-line-strong);
  border-radius: var(--efb-r-sm);
  background: rgba(148, 163, 184, .025);
}
.ch-viewer-empty b { font-size: 13px; margin-bottom: 6px; }
.ch-viewer-empty p { margin: 0; max-width: 460px; font-size: 11.5px; line-height: 1.55; color: var(--efb-muted); }

.ch-viewer-head { padding: 4px 2px 12px; }
.ch-viewer-title { font-size: 15px; font-weight: 700; margin: 4px 0 5px; }
.ch-viewer-text { margin: 0; max-width: 74ch; font-size: 11.5px; line-height: 1.6; color: var(--efb-muted); }

.ch-sources {
  margin-top: 10px;
  padding: 12px 13px;
  border: 1px solid var(--efb-line);
  border-radius: var(--efb-r-sm);
  background: rgba(148, 163, 184, .03);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ch-main > .chart-frame > .ch-viewer-empty { border-style: solid; }
.ch-sources-head { display: flex; flex-direction: column; gap: 3px; }
.ch-sources-note { font-size: 11px; color: var(--efb-muted); }
.ch-source-list { display: flex; flex-direction: column; gap: 5px; }
.ch-source {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--efb-line);
  border-radius: 6px;
  background: var(--efb-panel-2);
  color: var(--efb-text);
}
.ch-source:hover { border-color: var(--efb-line-strong); background: var(--efb-panel-3); }
.ch-source-main { min-width: 0; flex: 1; }
.ch-source-main b { display: block; font-size: 12px; }
.ch-source-main span { display: block; font-size: 10.5px; color: var(--efb-muted); }

.chart-frame { display: flex; flex-direction: column; height: 100%; min-height: 0; }
/* Night rendering: ink becomes light on a dark sheet; hue-rotate keeps the
   publisher's colours (magenta, blue) recognisable after the inversion. */
.chart-night .chart-page { filter: invert(.92) hue-rotate(180deg); }
.chart-night .chart-stage { background: #0f1013; }
/* Split view: the chart and a moving map side by side, stacked on a phone. */
.chart-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.chart-split.on { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.chart-split > .chart-host { min-height: 0; }
.chart-map { position: relative; min-height: 260px; border-radius: var(--efb-r-sm); overflow: hidden; border: 1px solid var(--efb-line); }
.chart-map canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 900px) { .chart-split.on { grid-template-columns: 1fr; grid-template-rows: minmax(0, 3fr) minmax(220px, 2fr); } }
.ch-quick { display: flex; flex-direction: column; gap: 6px; }
.ch-quick-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ch-pins .ch-pin { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-host {
  position: relative;
  flex: 1;
  min-height: 300px;
  background: #0b0c0f;
  border-radius: var(--efb-r-sm);
  border: 1px solid var(--efb-line);
  overflow: hidden;
}
.chart-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.chart-stage.is-dragging { cursor: grabbing; }
.chart-page { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.chart-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 0 10px; }

/* ── checklists ─────────────────────────────────────────────────────── */

.check-section {
  border: 1px solid var(--efb-line);
  border-radius: var(--efb-r);
  overflow: hidden;
  background: var(--efb-panel);
}
.check-section > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(148, 163, 184, .04);
  border-bottom: 1px solid var(--efb-line);
}
.check-section > header b { font-size: 11.5px; letter-spacing: .02em; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid rgba(148, 163, 184, .06);
}
.check-item:first-of-type { border-top: 0; }
.check-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 1px 0 0;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 4px;
  border: 1px solid var(--efb-line-strong);
  background: #0e0f12;
  display: grid;
  place-items: center;
  transition: background .12s ease, border-color .12s ease;
}
.check-item input[type="checkbox"]:hover { border-color: rgba(148, 163, 184, .45); }
.check-item input[type="checkbox"]:checked { background: var(--efb-accent); border-color: var(--efb-accent); }
.check-item input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--efb-accent-ink);
  border-bottom: 2px solid var(--efb-accent-ink);
  transform: rotate(-45deg) translateY(-1px);
}
.check-item input[type="checkbox"]:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 2px; }
.check-item .ci-main { min-width: 0; }
.check-item .ci-main b { display: block; font-size: 12px; font-weight: 600; }
.check-item .ci-main span { display: block; font-size: 10.5px; color: var(--efb-muted); }
.check-item .ci-main em { display: block; font-size: 10px; color: var(--efb-faint); font-style: normal; margin-top: 2px; }
.check-item.done .ci-main b { color: var(--efb-faint); text-decoration: line-through; }

/* ── settings ───────────────────────────────────────────────────────── */

.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(148, 163, 184, .07);
}
.set-row:last-child { border-bottom: 0; }
.set-row .set-main { flex: 1; min-width: 0; }
.set-row .set-main b { display: block; font-size: 12px; }
.set-row .set-main span { display: block; font-size: 10.5px; color: var(--efb-muted); }
.set-row .set-control { flex: 0 0 auto; min-width: 160px; text-align: right; }
.wallpaper-swatches { display: flex; gap: 6px; }
.wallpaper-swatches button {
  width: 40px; height: 26px; border-radius: 6px; border: 1px solid var(--efb-line-strong);
}
.wallpaper-swatches button[aria-pressed="true"] { outline: 2px solid var(--efb-accent); outline-offset: 2px; }

/* ── notepad ────────────────────────────────────────────────────────── */

.np-card { display: flex; flex-direction: column; gap: 10px; }
.np-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.np-draw-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.np-draw-tools[hidden] { display: none; }
.np-swatches { display: flex; gap: 5px; }
.np-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 0;
}
.np-swatch[aria-pressed="true"] { outline: 2px solid var(--efb-accent); outline-offset: 2px; }

.np-board {
  position: relative;
  height: clamp(320px, 58vh, 640px);
  min-height: 0;
  border: 1px solid var(--efb-line);
  border-radius: var(--efb-r-sm);
  background: #0e0f12;
  overflow: hidden;
}
.np-pane { position: absolute; inset: 0; }
.np-pane[hidden] { display: none; }
.np-text {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px 20px 18px;
  border: 0;
  resize: none;
  outline: none;
  color: var(--efb-text);
  background: transparent;
  font: 13px/26px var(--efb-mono);
  background-image: repeating-linear-gradient(180deg, transparent 0 25px, rgba(148, 163, 184, .1) 25px 26px);
  background-position: 0 15px;
}
.np-text::placeholder { color: #55647a; }
.np-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

/* ── map ────────────────────────────────────────────────────────────── */

/* The Map app owns the content region: no gutter, no card. The page header
   above names the app; everything below it is the chart, with the flight data
   in the aircraft's own margins the way a flight bag lays it out. */
body.view-map .efb-body { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
body.view-map .efb-main { background: #07080b; }

.map-shell { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.map-view { position: relative; flex: 1; min-height: 0; background: #08090c; overflow: hidden; }
.map-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.map-hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  pointer-events: none;
  z-index: 2;
}
.map-flight {
  min-width: 0;
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(12, 13, 16, .8);
  border: 1px solid var(--efb-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.map-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: .05em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.map-route s { text-decoration: none; color: var(--efb-faint); font-weight: 500; }
.map-route-empty { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--efb-muted); }
.map-sub {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: .03em;
  color: var(--efb-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-hud-right { margin-left: auto; display: flex; align-items: center; gap: 6px; pointer-events: auto; }

.map-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid var(--efb-line);
  background: rgba(12, 13, 16, .82);
  color: var(--efb-muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.map-chip.is-live { color: #9ff0d5; border-color: rgba(52, 211, 153, .32); background: rgba(22, 23, 26, .82); }
.map-chip.is-next { color: #b6f4fd; border-color: var(--efb-accent-line); background: rgba(24, 25, 28, .9); }
.map-conn[data-state="live"] { color: #9ff0d5; border-color: rgba(52, 211, 153, .32); }
.map-conn[data-state="connecting"] { color: #f7dca4; border-color: rgba(242, 181, 68, .3); }
.map-conn[data-state="offline"] { color: #f6b7b7; border-color: rgba(248, 113, 113, .28); }

.map-banner {
  position: absolute;
  top: 72px; left: 14px; right: 14px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}
.map-banner[hidden] { display: none; }
.map-banner-card {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 660px;
  padding: 8px 10px 8px 13px;
  border-radius: 9px;
  background: rgba(14, 15, 18, .93);
  border: 1px solid var(--efb-line-strong);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .42);
  pointer-events: auto;
}
.map-banner-card.warn { border-color: rgba(242, 181, 68, .3); background: rgba(26, 21, 10, .93); }
.map-banner-card.bad { border-color: rgba(248, 113, 113, .3); background: rgba(30, 12, 12, .93); }
.map-banner-text { font-size: 11px; line-height: 1.45; color: var(--efb-muted); }
.map-banner-text b { color: var(--efb-text); }
.map-banner-btn {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--efb-line-strong);
  background: var(--efb-panel-2);
  color: var(--efb-text);
  font-size: 10.5px;
  font-weight: 650;
}

.map-tools {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}
.map-tool {
  min-width: 40px;
  height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--efb-line-strong);
  background: rgba(14, 15, 18, .88);
  color: var(--efb-text);
  font-size: 10.5px;
  font-weight: 650;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.map-tool:hover { background: rgba(27, 28, 31, .95); }
.map-tool:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.map-tool[aria-pressed="true"] { color: #b6f4fd; border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }

.map-tele {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  gap: 1px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--efb-line);
  background: rgba(12, 13, 16, .9);
  z-index: 2;
}
.map-block { padding: 7px 12px; min-width: 90px; background: rgba(15, 16, 19, .55); }
.map-block em {
  display: block;
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--efb-faint);
  font-weight: 700;
}
.map-block b { display: block; margin-top: 2px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.map-block b small { font-size: 9.5px; font-weight: 600; letter-spacing: .02em; color: var(--efb-faint); margin-left: 2px; }
.map-block span { display: block; font-size: 9px; color: var(--efb-faint); margin-top: 1px; white-space: nowrap; }
.map-tele.is-empty { border-style: dashed; }
.map-empty { padding: 9px 13px; display: flex; flex-direction: column; gap: 2px; background: rgba(15, 16, 19, .6); }
.map-empty b { font-size: 11px; }
.map-empty span { font-size: 10px; color: var(--efb-faint); max-width: 42ch; }

.map-foot {
  flex: 0 0 auto;
  padding: 0 14px 7px;
  background: #08090c;
  border-top: 1px solid var(--efb-line);
}
.map-strip { padding: 8px 0 0; }
.map-credit { margin: 6px 0 0; font-size: 9px; letter-spacing: .02em; color: rgba(148, 163, 184, .55); }
.map-strip-note { flex: 1 1 auto; min-width: 0; }
.map-progress { height: 3px; border-radius: 2px; background: rgba(148, 163, 184, .2); overflow: hidden; margin-bottom: 8px; }
.map-progress b { display: block; height: 100%; background: var(--efb-accent); }
.map-strip-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.map-strip-facts { display: flex; gap: 18px; min-width: 0; overflow: hidden; }
.map-strip-facts > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.map-strip-facts em {
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--efb-faint);
  font-weight: 700;
}
.map-strip-facts b { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.map-strip-facts i { font-style: normal; font-size: 9px; color: var(--efb-faint); white-space: nowrap; }
.map-strip-note { font-size: 11px; color: var(--efb-muted); }
.map-strip-actions { margin-left: auto; display: flex; gap: 6px; }
.map-strip-btn {
  white-space: nowrap;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--efb-line-strong);
  background: rgba(14, 15, 18, .9);
  color: var(--efb-text);
  font-size: 10.5px;
  font-weight: 650;
}
.map-strip-btn:hover { border-color: rgba(148, 163, 184, .45); }

.map-route-panel {
  position: absolute;
  right: 64px;
  top: 72px;
  width: min(340px, 46vw);
  max-height: 54%;
  overflow: auto;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--efb-line-strong);
  background: rgba(14, 15, 18, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .45);
  z-index: 3;
}
.map-route-panel[hidden] { display: none; }
.map-panel-title { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--efb-muted); }
.map-panel-title em { font-style: normal; color: var(--efb-faint); letter-spacing: .03em; text-transform: none; margin-left: 6px; }
.map-panel-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.map-panel-chips .map-chip { height: 22px; font-size: 9px; }
.map-panel-note { margin: 9px 0 0; font-size: 10.5px; color: var(--efb-faint); }

/* The observation and the wind picture are different readings; a rule keeps
   them from running together when the cloud line wraps. */
.wx-wind { border-left: 1px solid var(--efb-line); padding-left: 14px; }
.wx-wind-label { margin-top: 2px; }

/* ── responsive ─────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .ch-workspace { grid-template-columns: 260px minmax(0, 1fr); }
  .lv-grid { grid-template-columns: minmax(0, 1fr); }
  .lv-col-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .lv-col-side > * { min-width: 0; }
}

@media (max-width: 900px) {
  .efb-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 52px auto minmax(0, 1fr);
  }
  .efb-nav {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    gap: 4px;
    padding: 6px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--efb-line);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }
  .efb-nav.is-more { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%); }
  .efb-nav.is-back { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 34px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 34px), transparent 100%); }
  .efb-nav.is-back:not(.is-more) { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 100%); mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 100%); }
  .efb-nav::-webkit-scrollbar { display: none; }
  .en-group { flex-direction: row; gap: 2px; }
  .en-group + .en-group::before {
    content: "";
    width: 1px;
    align-self: stretch;
    margin: 6px 5px;
    background: var(--efb-line);
  }
  .en-group-head, .en-foot { display: none; }
  .en-item {
    flex-direction: column;
    gap: 3px;
    min-width: 62px;
    padding: 6px 8px;
    font-size: 10px;
    letter-spacing: .01em;
  }
  .en-item.is-active::before { display: none; }
  .en-item.is-active { border-color: transparent; }
  .en-label { font-size: 9.5px; }
  .en-home { flex-direction: column; gap: 3px; min-width: 62px; padding: 6px 8px; margin-bottom: 0; font-size: 10px; background: transparent; border-color: transparent; }
  .en-home.is-active { background: var(--efb-accent-soft); border-color: rgba(34, 211, 238, .18); }
  .en-home .en-label { font-size: 9.5px; }

  .home-stage { padding: 18px 22px 8px; }
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 6px; }
  .hi-tile { width: 76px; height: 76px; }
  .home-head h1 { font-size: 22px; }
  .home-mark { width: clamp(260px, 50vmin, 460px); }

  .map-hud { padding: 10px 12px; }
  .map-tele { left: 10px; right: 10px; bottom: 10px; }
  .map-block { flex: 1; min-width: 0; padding: 6px 9px; }
  .map-block b { font-size: 15px; }
  .map-foot { padding: 0 12px 6px; }
  .map-route-panel { right: 12px; top: 64px; width: min(320px, 72vw); }
  .home-dock { gap: 14px; padding: 9px 14px; margin-bottom: 12px; }
  .home-dock .hi-tile { width: 52px; height: 52px; }
  .hb-flight span { display: none; }
  /* Both regions must be re-seated explicitly: the base rules put the rail in
     column 1 and the content in column 2, which would keep a phantom column. */
  .efb-nav { grid-column: 1; }
  .efb-main { grid-column: 1; grid-row: 3; }
  .efb-page-head { padding: 10px 14px; }
  .eph-text h1 { font-size: 15px; }
  .efb-body { padding: 12px 14px 24px; }

  .et-flight { border-left: 0; padding-left: 0; }
  .etf-meta { display: none; }
  .et-tracker b { display: none; }
  .et-conn span { display: none; }
  .et-conn { padding: 0 7px; }
  .et-name small { display: none; }

  .lv-hero { grid-template-columns: minmax(0, 1fr); }
  .lv-actions { justify-content: flex-start; }
  .lv-route { font-size: 22px; }
  .lv-col-side { grid-template-columns: 1fr; }

  .wx-wind { border-left: 0; padding-left: 0; border-top: 1px solid var(--efb-line); padding-top: 10px; }

  /* Stacked on a tablet: the library sits above the document and keeps its own
     scroll so the page itself does not become three screens tall. */
  .ch-workspace { grid-template-columns: minmax(0, 1fr); height: auto; gap: 10px; }
  .ch-side { max-height: 320px; }
  .ch-main > .chart-frame { min-height: 420px; }
  .ch-viewer-empty { min-height: 160px; }
}

@media (max-width: 560px) {
  .et-name { display: none; }
  .et-clock { display: none; }
  /* Settings lives in the section grid on a phone, so the header keeps room for
     the flight instead of a second way into the same page. */
  .et-icon[href="#/settings"] { display: none; }
  .et-flight { gap: 7px; }
  .lv-route { font-size: 19px; gap: 8px; }
  .lv-route .dot { max-width: 60px; }
  .tele-v { font-size: 17px; }
  .e-kv { grid-template-columns: 1fr; gap: 2px; }
  .e-kv dd { text-align: left; margin-bottom: 6px; }
  .set-row { flex-wrap: wrap; }
  .set-row .set-control { min-width: 0; width: 100%; text-align: left; }

  .home-bar { padding: 8px 14px 4px; }
  .hb-time em { display: none; }

  /* With the home control in the bar, the wordmark gives up its space on a
     phone so the flight still reads in full. */
  .et-brand { display: none; }

  .check-section > header { flex-wrap: wrap; gap: 6px 8px; }
  .check-section > header .e-badge { display: none; }
  .check-section > header > b { font-size: 12px; }
  .check-section > header .e-small { white-space: nowrap; }
  .home-stage { padding: 12px 16px 4px; }
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 4px; margin-top: 20px; }
  .home-head h1 { font-size: 20px; }
  .hi-tile { width: 64px; height: 64px; }
  .hi-label { font-size: 10.5px; }
  .home-dock { gap: 12px; padding: 8px 12px; }
  .home-dock .hi-tile { width: 48px; height: 48px; }
  .home-logo svg { width: clamp(240px, 68vmin, 420px); }

  .map-hud { padding: 8px; gap: 8px; }
  .map-flight { padding: 6px 9px; }
  .map-route { font-size: 15px; }
  .map-sub { display: none; }
  .map-hud-right { gap: 4px; }
  .map-chip { height: 22px; font-size: 8.5px; padding: 0 6px; }
  .map-tools { top: auto; bottom: 96px; right: 8px; transform: none; flex-direction: row; }
  .map-tele { left: 8px; right: 8px; bottom: 8px; }
  .map-block:nth-child(4) { display: none; }
  .map-block b { font-size: 14px; }
  .map-block span { display: none; }
  .map-foot { padding: 0 8px 5px; }
  .map-strip-facts { gap: 10px; }
  .map-strip-facts > span:nth-child(4) { display: none; }
  .map-banner { top: 56px; left: 8px; right: 8px; }

  .home-widget { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 11px 13px; }
  .hw-route { font-size: 18px; }
  .hw-tele { justify-self: start; margin-top: 9px; gap: 18px; }
  .hw-cell b { font-size: 17px; }
  .hw-hint { text-align: left; }
}

/* Landscape phones keep the deck on one screen: smaller tiles, tighter rows. */
@media (max-height: 520px) and (orientation: landscape) {
  .home-bar { padding: 6px 18px 2px; }
  .home-stage { padding: 8px 26px 4px; }
  .home-head { display: none; }
  .home-widget { display: none; }
  .home-grid { margin-top: 6px; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 4px; }
  .hi-tile { width: 54px; height: 54px; }
  .hi-label { font-size: 9.5px; }
  .hi { gap: 4px; }
  .home-dock { gap: 12px; padding: 7px 12px; margin-bottom: 8px; }
  .home-dock .hi-tile { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .e-loading i { animation-duration: 2s; }
}
html[data-efb-motion="reduced"] .e-loading i { animation-duration: 2s; }

/* Printing a checklist or briefing should not print the chrome. */
@media print {
  .efb-top, .efb-nav, .efb-page-head { display: none; }
  .efb-shell, .efb-main, .efb-body { display: block; height: auto; background: #fff; color: #000; }
  body.efb { background: #fff; color: #000; }
  .efb-body { overflow: visible; padding: 0; }
  .e-card, .check-section { break-inside: avoid; border-color: #bbb; background: #fff; }
}

/* ── airline identity ───────────────────────────────────────────────────
   Branding is one accent plus the operator's own mark. The airline's colour
   replaces the cyan accent through the tokens above; nothing else is
   recoloured. Where a licensed file is bundled the real logo is shown; an
   airline without one falls back to its IATA/ICAO code on the accent chip. */

.et-airline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 2px 8px 2px 3px;
  border-radius: 6px;
  border: 1px solid var(--efb-accent-line);
  background: var(--efb-accent-soft);
  font-size: 10px;
}
.et-airline[hidden] { display: none; }
.et-airline b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--efb-accent);
  color: var(--efb-accent-ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
}
.et-airline span {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--efb-muted);
}
/* A fixed box with contain, so a wide wordmark and a square symbol both sit on
   the same baseline without being squashed to fit. */
.et-logo {
  width: 84px;
  height: 16px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.home-airline {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid var(--efb-accent-line);
  background: rgba(16, 17, 20, .45);
}
.home-airline[hidden] { display: none; }
.home-airline b {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--efb-accent);
}
.home-airline span {
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(230, 237, 246, .55);
}

/* The airline tint over whichever wallpaper is chosen: two soft glows from the
   brand's own colour, never a repaint of the deck. */
.home-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
  background:
    radial-gradient(110% 65% at 88% -12%, var(--efb-airline-glow, transparent), transparent 62%),
    radial-gradient(85% 65% at 2% 106%, var(--efb-airline-wash, transparent), transparent 68%);
}
body[data-airline]:not([data-airline=""]) .home-wall::after { opacity: .5; }

/* ── Navigator ─────────────────────────────────────────────────────────
   The chart is the page. Everything else is a thin overlay at its edges. */

body.view-nav .efb-main { background: #07080b; }
.nav-view canvas { touch-action: none; cursor: grab; }
.nav-view canvas:active { cursor: grabbing; }

.nav-tools {
  position: absolute;
  top: 62px;
  right: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-tool {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid var(--efb-line);
  background: rgba(12, 13, 16, .86);
  color: var(--efb-muted);
  font-size: 15px;
  line-height: 1;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.nav-tool:hover { background: rgba(27, 28, 31, .95); color: var(--efb-text); }
.nav-tool-text { width: auto; min-width: 30px; padding: 0 6px; font: 700 10.5px/1 var(--efb-font); letter-spacing: .04em; }
.nav-tool[aria-pressed="true"] { color: var(--efb-accent); border-color: var(--efb-accent-line); }
.nav-tool:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.nav-tool[aria-pressed="true"] { color: var(--efb-accent); border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }
.nav-tool-gap { height: 1px; margin: 2px 4px; background: var(--efb-line); }

/* Route panel: the plan in reading order, beside the chart rather than on it. */
.nav-panel {
  position: absolute;
  top: 62px;
  right: 52px;
  width: 308px;
  max-height: calc(100% - 74px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 9px;
  border: 1px solid var(--efb-line-strong);
  background: rgba(12, 13, 16, .93);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.nav-panel[hidden] { display: none; }
.nav-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 11px;
  border-bottom: 1px solid var(--efb-line);
}
.nav-panel-head b {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--efb-text);
}
.nav-panel-count {
  font-size: 9.5px;
  letter-spacing: .04em;
  color: var(--efb-faint);
}
.nav-panel-close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid transparent;
  background: none;
  color: var(--efb-muted);
}
.nav-panel-close:hover { background: rgba(148, 163, 184, .12); color: var(--efb-text); }

.nav-summary { padding: 9px 11px; border-bottom: 1px solid var(--efb-line); }
.nav-empty { margin: 0; font-size: 10.5px; line-height: 1.5; color: var(--efb-faint); }
.nav-summary .e-btn { margin-top: 8px; }

.nav-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  margin: 0;
}
.nav-facts dt {
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--efb-faint);
  white-space: nowrap;
}
.nav-facts dd {
  margin: 0;
  font-size: 10.5px;
  text-align: right;
  color: var(--efb-text);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-detail {
  padding: 9px 11px;
  border-bottom: 1px solid var(--efb-line);
  background: rgba(148, 163, 184, .04);
}
.nav-detail[hidden] { display: none; }
.nav-detail-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; min-width: 0; }
.nav-detail-head b { font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.nav-detail-head span { font-size: 9.5px; color: var(--efb-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-detail .e-btn { margin-top: 8px; }

.nav-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 5px 4px 7px;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
}
.nav-wp {
  display: grid;
  grid-template-columns: 20px 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border-radius: 5px;
  cursor: pointer;
}
.nav-wp:hover { background: rgba(148, 163, 184, .09); }
.nav-wp.is-selected { background: var(--efb-accent-soft); box-shadow: inset 0 0 0 1px var(--efb-accent-line); }
.nav-wp.is-passed { opacity: .5; }
.nav-wp.is-next .nav-ident { color: var(--efb-accent); font-weight: 700; }
.nav-seq {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: var(--efb-faint);
  letter-spacing: .03em;
}
.nav-ident {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-alt {
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: var(--efb-muted);
  letter-spacing: .02em;
}
/* Chart symbols, small: ring for an airport, hexagon for a navaid, triangle
   for a fix. */
.nav-sym {
  width: 9px;
  height: 9px;
  display: block;
  border: 1.3px solid #cfe3ff;
  border-radius: 50%;
  box-sizing: border-box;
  position: relative;
}
.nav-sym[data-kind="apt"]::after {
  content: "";
  position: absolute;
  inset: 2.2px;
  border-radius: 50%;
  background: #cfe3ff;
}
.nav-sym[data-kind="nav"] {
  border: 0;
  border-radius: 0;
  background: #cfe3ff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.nav-sym[data-kind="fix"] {
  border: 0;
  border-radius: 0;
  background: #cfe3ff;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.nav-wp.is-next .nav-sym { background: var(--efb-accent); border-color: var(--efb-accent); }
.nav-wp.is-next .nav-sym[data-kind="apt"]::after { background: var(--efb-accent); }

.nav-leg {
  display: flex;
  gap: 12px;
  margin: 0 0 0 27px;
  padding: 1px 7px 3px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 9px;
  letter-spacing: .03em;
  color: var(--efb-faint);
  font-variant-numeric: tabular-nums;
}
.nav-leg:hover { color: var(--efb-text); background: rgba(148, 163, 184, .07); }
.nav-leg.is-selected { color: var(--efb-accent); }
.nav-leg-nm { min-width: 48px; }
.nav-leg-hdg { color: inherit; opacity: .85; }


/* ── airline selector (settings) ─────────────────────────────────────── */

.air-detection {
  margin: 9px 0 0;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid var(--efb-line);
  background: rgba(148, 163, 184, .05);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--efb-muted);
}
.air-list {
  margin-top: 8px;
  /* Grows with the window but never past a comfortable column: the table holds
     more than fifty operators, and a four-row window makes one of them hard to
     find even with the search field above it. */
  max-height: clamp(176px, 42vh, 420px);
  overflow-y: auto;
  border: 1px solid var(--efb-line);
  border-radius: 7px;
  scrollbar-width: thin;
}
.air-row {
  display: grid;
  grid-template-columns: 9px 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid var(--efb-line);
  background: none;
  color: var(--efb-text);
  text-align: left;
}
.air-row:last-child { border-bottom: 0; }
.air-row:hover { background: rgba(148, 163, 184, .07); }
.air-row[aria-selected="true"] {
  background: var(--efb-accent-soft);
  box-shadow: inset 2px 0 0 var(--efb-accent);
}
.air-dot { width: 8px; height: 8px; border-radius: 50%; }
.air-row b { font-size: 10px; font-weight: 750; letter-spacing: .07em; }
.air-row span { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.air-row em { font-style: normal; font-size: 9px; letter-spacing: .07em; color: var(--efb-faint); }
.air-none { margin: 0; padding: 10px; font-size: 10.5px; color: var(--efb-faint); }

.air-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--efb-accent-line);
  background:
    radial-gradient(120% 120% at 0% 0%, var(--efb-airline-wash, #18191c), transparent 70%),
    #111215;
}
.air-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--efb-accent);
  color: var(--efb-accent-ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  flex: 0 0 auto;
}
/* The real mark sits on the preview's own backing rather than the accent chip:
   an airline logo is already coloured and should read as itself. */
.air-mark.has-logo {
  width: auto;
  min-width: 30px;
  max-width: 136px;
  padding: 0 6px;
  background: transparent;
  border-radius: 6px;
}
.air-mark img { display: block; height: 24px; max-width: 124px; object-fit: contain; }
.air-name { display: flex; flex-direction: column; min-width: 0; }
.air-name b { font-size: 11.5px; font-weight: 650; }
.air-name small { font-size: 9.5px; color: var(--efb-muted); }
.air-sample {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--efb-accent);
  white-space: nowrap;
}
.air-sample i { width: 8px; height: 8px; border-radius: 2px; background: var(--efb-accent); }

@media (max-width: 1100px) {
  .et-airline span { display: none; }
  .et-airline .et-logo { width: 64px; height: 15px; }
  .nav-panel { width: 276px; }
}

@media (max-width: 860px) {
  .nav-tools { top: 58px; right: 8px; }
  .nav-panel { width: 264px; right: 48px; }
  .map-tele { gap: 0; border-radius: 8px; }
  .map-block { flex: 1 1 0; min-width: 0; padding: 6px 9px; }
}

@media (pointer: coarse) and (max-width: 900px) {
  /* A finger is not a mouse pointer: the chart controls keep a comfortable hit
     area on a tablet or a phone instead of shrinking with the type. */
  .nav-tool { width: 38px; height: 38px; }
}

@media (max-width: 640px) {
  /* On a phone the panel is a sheet over the lower half of the chart, so the
     map above it stays usable; a tablet keeps the panel at the chart's side. */
  .nav-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 52%;
  }
  .nav-tools { top: 54px; gap: 6px; }
  /* Kept tappable: this is the only route to zoom, fit and the panel here. */
  .nav-tool { width: 38px; height: 38px; }
  .nav-facts dd { font-size: 10px; }
  /* The four live numbers stay on a phone, two by two above the strip. */
  .map-tele {
    left: 8px;
    right: 62px;
    bottom: 8px;
    flex-wrap: wrap;
    border-radius: 8px;
  }
  .map-block { flex: 1 1 42%; }
  .map-block b { font-size: 15px; }
  .map-block em { font-size: 8px; }
  /* All four numbers fit in the two-by-two tile, so none is dropped here. */
  .map-block:nth-child(4) { display: block; }
  .map-block span { display: block; }
}

/* ── performance: the readiness list ─────────────────────────────────────
   A pilot filling in a takeoff or landing analysis wants to know what is still
   missing before the numbers appear, not after. One row per input, with the
   value that came from the plan, the airport or the observation beside it. */

/* Performance: inputs on the left, the estimate drawn on the right: speeds,
   the thrust and flap flags, a to-scale runway and the wind on it. One column
   below 1180 px so neither side is squeezed. */
.pf { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 12px; align-items: start; }
.pf-side, .pf-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pf-card { background: var(--efb-panel); border: 1px solid var(--efb-line); border-radius: var(--efb-r); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-card-head b { font: 700 13px/1.2 var(--efb-font); letter-spacing: .02em; }
.pf-sub { font: 600 12px/1 var(--efb-mono); color: var(--efb-muted); letter-spacing: .06em; }
.pf-note { font-size: 11.5px; color: var(--efb-muted); line-height: 1.45; }
.pf-note.wide, .pf-field.wide { grid-column: 1 / -1; }
.pf-note details { display: inline; margin-left: 6px; }
.pf-phase { width: 100%; }
.pf-phase button { flex: 1; font-weight: 700; letter-spacing: .04em; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.pf-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-grid .pf-field:has(#perf-runway) { grid-column: span 2; }
.pf-label { display: flex; align-items: center; gap: 5px; font: 600 10px/1 var(--efb-font); letter-spacing: .1em; text-transform: uppercase; color: var(--efb-muted); white-space: nowrap; }
.pf-src { font: 600 8.5px/1 var(--efb-font); letter-spacing: .04em; text-transform: none; color: var(--efb-accent); background: var(--efb-accent-soft); padding: 2px 5px; border-radius: 99px; overflow: hidden; text-overflow: ellipsis; }
.pf-input { display: flex; align-items: center; height: 36px; border: 1px solid var(--efb-line-strong); border-radius: var(--efb-r-sm); background: var(--efb-panel-2); padding: 0 9px; transition: border-color .15s; }
.pf-input:focus-within { border-color: var(--efb-accent); box-shadow: 0 0 0 3px var(--efb-accent-soft); }
.pf-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--efb-text); font: 600 15px/1 var(--efb-mono); text-transform: uppercase; }
.pf-input i { font-style: normal; font-size: 11px; color: var(--efb-faint); margin-left: 4px; }
.pf-select { height: 36px; }
.pf-seg { width: 100%; }
.pf-seg button { flex: 1; font: 700 12px/1 var(--efb-mono); }
.pf-empty { color: var(--efb-muted); font-size: 12.5px; padding: 12px 0; text-align: center; }
.pf-placeholder { align-items: center; text-align: center; padding: 40px 20px; }
.pf-placeholder p { color: var(--efb-muted); font-size: 12.5px; max-width: 360px; margin: 0; }
.pf-ph-rwy { width: 240px; opacity: .8; }

.pf-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pf-speeds { display: flex; gap: 8px; }
.pf-speed { display: flex; flex-direction: column; align-items: center; min-width: 86px; padding: 10px 12px 9px; border-radius: 12px; background: linear-gradient(180deg, var(--efb-panel-2), transparent); border: 1px solid var(--efb-line-strong); }
.pf-speed span { font: 700 11px/1 var(--efb-mono); letter-spacing: .12em; color: #22d3ee; }
.pf-speed b { font: 700 40px/1.05 var(--efb-mono); letter-spacing: -.01em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.pf-speed i { font-style: normal; font-size: 10px; color: var(--efb-faint); letter-spacing: .06em; text-transform: uppercase; }
.pf-speed.main { border-color: color-mix(in srgb, #22d3ee 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, #22d3ee 12%, transparent), transparent); }
.pf-speed.main b { font-size: 48px; }
.pf-tags { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.pf-tag { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 8px; font: 700 12px/1 var(--efb-mono); letter-spacing: .12em; color: var(--efb-text); background: var(--efb-panel-2); border: 1px solid var(--efb-line-strong); }
.pf-tag b { font-size: 22px; letter-spacing: 0; }
.pf-tag.flag { color: #1a1205; background: linear-gradient(180deg, #fbbf24, #f59e0b); border: 0; padding-right: 30px; border-radius: 6px 0 0 6px; clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%); }
.pf-tag.flag.toga { background: linear-gradient(180deg, #f87171, #ef4444); color: #fff; }

.pf-status { padding: 9px 12px; border-radius: 9px; font-size: 12.5px; border: 1px solid; }
.pf-status b { letter-spacing: .1em; font-family: var(--efb-mono); margin-right: 4px; }
.pf-status.good { color: #4ade80; border-color: rgba(74, 222, 128, .3); background: rgba(74, 222, 128, .07); }
.pf-status.warn { color: var(--efb-warn); border-color: color-mix(in srgb, var(--efb-warn) 35%, transparent); background: color-mix(in srgb, var(--efb-warn) 8%, transparent); }
.pf-status.bad { color: #f87171; border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .08); }

.pf-runway { width: 100%; height: auto; display: block; border-radius: 10px; background: radial-gradient(120% 140% at 50% 0%, rgba(34, 211, 238, .05), transparent 60%), #121316; }
.pf-runway .pf-rwy-id { font: 800 24px/1 var(--efb-mono); fill: #f1f5f9; text-anchor: middle; dominant-baseline: middle; letter-spacing: .04em; }
.pf-runway .pf-lab, .pf-runway .pf-tick { font: 600 15px/1 var(--efb-font); fill: #94a3b8; }
.pf-runway .pf-tick { font-size: 13px; text-anchor: middle; }
.pf-runway .pf-pin { font: 700 14px/1 var(--efb-mono); fill: #e2e8f0; }
.pf-runway .pf-flag-t { font: 800 13px/1 var(--efb-mono); fill: #1a1205; letter-spacing: .06em; }
.pf-runway .pf-flag-s { font: 700 16px/1 var(--efb-mono); fill: #fbbf24; }
.pf-runway .pf-margin { font: 700 16px/1 var(--efb-mono); fill: #4ade80; }
.pf-runway .pf-margin.bad { fill: #f87171; }
.pf-axis { stroke: #475569; stroke-width: 1; fill: none; }

.pf-legs, .pf-cond { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pf-cond { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-legs > div, .pf-cond > div { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: 9px; background: var(--efb-panel-2); min-width: 0; }
.pf-legs span, .pf-cond span, .pf-wind-read span { font: 600 9.5px/1 var(--efb-font); letter-spacing: .12em; text-transform: uppercase; color: var(--efb-muted); }
.pf-legs b, .pf-cond b { font: 700 17px/1.1 var(--efb-mono); }
.pf-legs i { font-style: normal; font-size: 10.5px; color: var(--efb-faint); }

.pf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.pf-wind-wrap { display: flex; align-items: center; gap: 14px; }
.pf-wind { width: 150px; flex: none; }
.pf-wind text { font-size: 10px; fill: #94a3b8; }
.pf-wind-read { display: flex; flex-direction: column; gap: 10px; }
.pf-wind-read div { display: flex; flex-direction: column; gap: 3px; }
.pf-wind-read b { font: 700 18px/1 var(--efb-mono); }
.pf-wind-read b.warn { color: #f59e0b; }
.pf-gauge { display: flex; flex-direction: column; gap: 6px; }
.pf-gauge-top { display: flex; justify-content: space-between; font: 600 11.5px/1 var(--efb-mono); color: var(--efb-muted); }
.pf-gauge-top span:first-child { color: var(--efb-text); }
.pf-bar { position: relative; height: 10px; border-radius: 99px; background: var(--efb-panel-2); }
.pf-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #0ea5e9, #22d3ee); }
.pf-bar i.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.pf-bar i.bad { background: linear-gradient(90deg, #ef4444, #f87171); }
.pf-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--efb-text); opacity: .7; }
.pf-gauge-foot { font-size: 11px; color: var(--efb-muted); }
.pf-gauge-foot.bad { color: #f87171; }
.pf-method { font-size: 11.5px; color: var(--efb-faint); line-height: 1.5; }
.pf-method summary { cursor: pointer; color: var(--efb-muted); font-weight: 600; }

@media (max-width: 1180px) {
  .pf { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pf-row, .pf-legs { grid-template-columns: minmax(0, 1fr); }
  .pf-speed { min-width: 0; flex: 1; }
  .pf-speed b { font-size: 30px; }
  .pf-tags { flex-direction: row; align-items: center; }
}

/* ── cabin experience ─────────────────────────────────────────────────────
   One square icon per announcement, two per row on a tablet and one on a
   phone, grouped by flight phase. The playback panel is the only sticky
   control surface: the tiles themselves are deliberately quiet. */

.cab-panel { margin-bottom: 12px; }
.cab-now { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cab-now-glyph {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--efb-accent-line);
  background: var(--efb-accent-soft); color: var(--efb-accent);
}
.cab-now-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cab-now-text b { font-size: 14px; font-weight: 650; }
.cab-sub { font-size: 10.5px; color: var(--efb-faint); }
.cab-progress {
  height: 4px; margin: 12px 0 8px; border-radius: 99px; overflow: hidden;
  background: rgba(148, 163, 184, .12);
}
.cab-progress i {
  display: block; width: 0; height: 100%; background: var(--efb-accent);
  transition: width .35s linear;
}
.cab-range { width: 120px; accent-color: var(--efb-accent); }

.cab-phases { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.cab-phase {
  padding: 12px 12px 10px; border: 1px solid var(--efb-line);
  border-radius: var(--efb-r);
  background: linear-gradient(180deg, rgba(25, 26, 29, .72), rgba(17, 18, 21, .55));
}
.cab-phase-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cab-phase-head h3 { margin: 0; font-size: 12px; letter-spacing: .02em; }

.cab-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cab-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cab-tile {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px;
  padding: 9px 10px; text-align: left; color: var(--efb-text); cursor: pointer;
  background: rgba(148, 163, 184, .04); border: 1px solid var(--efb-line);
  border-radius: var(--efb-r-sm);
  transition: border-color .12s, background .12s;
}
.cab-tile:hover:not(:disabled) { border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }
.cab-tile:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.cab-tile:disabled { opacity: .55; cursor: not-allowed; }
.cab-glyph {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 8px; color: var(--efb-accent);
  border: 1px solid rgba(34, 211, 238, .16); background: rgba(34, 211, 238, .07);
}
.cab-tile-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cab-tile-text b { font-size: 11.5px; font-weight: 650; line-height: 1.3; }
.cab-tile-text span { font-size: 9.5px; color: var(--efb-faint); }
.cab-go { flex: none; color: var(--efb-accent); opacity: .8; }
.cab-item-foot { display: flex; align-items: center; gap: 6px; min-height: 14px; padding-left: 2px; }
.cab-auto, .cab-switch {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--efb-faint);
}
.cab-auto input, .cab-switch input { width: 12px; height: 12px; accent-color: var(--efb-accent); }
.cab-manual { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: #56657a; }
.cab-needs { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--efb-warn); }

.cab-alert { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cab-alert span { flex: 1; min-width: 0; }

@media (max-width: 760px) {
  .cab-tiles { grid-template-columns: minmax(0, 1fr); }
  .cab-range { width: 90px; }
}

/* ── Navigator: 3D recorded track ─────────────────────────────────────── */
.nav-mode {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(15, 16, 19, .88);
}
.nav-mode-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--efb-muted);
  font: 650 10.5px/1 system-ui, sans-serif;
  letter-spacing: .04em;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.nav-mode-btn.is-on {
  background: var(--efb-accent-soft);
  color: #dffbff;
  box-shadow: inset 0 0 0 1px var(--efb-accent-line);
}
.nav-mode-btn:focus-visible { outline: 2px solid var(--efb-accent); outline-offset: 1px; }
.nav-track3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #0c0d10;
  touch-action: none;
  cursor: grab;
}
.nav-track3d:active { cursor: grabbing; }
.nav-3d-tip {
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 1px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--efb-line);
  background: rgba(12, 13, 16, .94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  pointer-events: none;
  font: 10.5px/1.35 system-ui, sans-serif;
  color: var(--efb-muted);
}
.nav-3d-tip b { font-size: 12px; color: var(--efb-text); }
.map-shell.is-3d .map-hud,
.map-shell.is-3d .map-banner,
.map-shell.is-3d .nav-tools,
.map-shell.is-3d .map-tele,
.map-shell.is-3d .nav-panel { z-index: 5; }

/* ── Airport ground chart ─────────────────────────────────────────────── */
.gc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.gc-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gc-title b { font-size: 13px; letter-spacing: .02em; }
.gc-status { font-size: 10.5px; color: var(--efb-muted); }
.gc-tools { display: flex; gap: 4px; flex: 0 0 auto; }
.gc-tools button {
  appearance: none;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--efb-line);
  background: var(--efb-panel-2);
  color: var(--efb-muted);
  font: 650 11px/1 system-ui, sans-serif;
  cursor: pointer;
}
.gc-tools button:hover { color: var(--efb-text); border-color: var(--efb-accent-line); }
.gc-find {
  display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; margin-right: 4px;
  border-radius: 7px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-muted);
}
.gc-find:focus-within { border-color: var(--efb-accent-line); }
.gc-find input {
  width: 118px; min-width: 0; border: 0; padding: 0; background: none; outline: none;
  color: var(--efb-text); font: 650 11.5px/1 system-ui, sans-serif; text-transform: uppercase;
}
.gc-find input::placeholder { text-transform: none; color: var(--efb-muted); }
.gc-wrap {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--efb-line);
  overflow: hidden;
  background: #0c0d10;
}
.gc-wrap canvas {
  display: block;
  width: 100%;
  height: 420px;
  touch-action: none;
  cursor: grab;
}
.gc-wrap canvas:active { cursor: grabbing; }
.gc-tip {
  position: absolute;
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid var(--efb-line);
  background: rgba(12, 13, 16, .94);
  font: 10.5px/1.35 system-ui, sans-serif;
  color: var(--efb-muted);
  pointer-events: none;
}
.gc-tip b { font-size: 11.5px; color: var(--efb-text); }
.gc-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--efb-muted);
  font: 600 12px/1.4 system-ui, sans-serif;
  text-align: center;
  padding: 20px;
  pointer-events: none;
  background: rgba(12, 13, 16, .55);
}
.gc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 9px;
  font-size: 10.5px;
  color: var(--efb-muted);
}
.gc-key {
  display: inline-block;
  width: 15px;
  height: 3px;
  margin-right: 5px;
  vertical-align: middle;
  border-radius: 2px;
}
.gc-key.runway { height: 5px; background: #414d5c; box-shadow: inset 0 0 0 1px rgba(241, 245, 249, .68); }
.gc-key.taxi { height: 6px; background: linear-gradient(#2d2e31 0 40%, #facc15 40% 60%, #2d2e31 60%); }
.gc-key.apron { background: rgba(146, 162, 184, .4); }
.gc-key.terminal { background: rgba(34, 211, 238, .35); }
.gc-key.route { height: 2px; background: var(--efb-accent); }
.gc-key.hold { height: 6px; width: 4px; border-left: 2px solid #f87171; border-right: 2px dashed #f87171; background: none; }
.gc-note { margin-top: 7px; font-size: 10.5px; line-height: 1.45; color: var(--efb-faint); }
/* Without geometry the card is a short notice, not a tall empty chart. */
.e-card.is-empty .gc-wrap,
.e-card.is-empty .gc-wrap canvas { height: 132px; }
.e-card.is-empty .gc-tools { visibility: hidden; }
.e-card.is-empty .gc-legend,
.e-card.is-empty .gc-note { display: none; }
@media (max-width: 700px) {
  .gc-wrap canvas { height: 320px; }
}

/* ── lock screen ──────────────────────────────────────────────────────
   Shown when the bag opens, over the deck's own wallpaper: the airline's
   mark (or the Stratos wing) stays behind it while the apps, the bar and
   the dock are hidden. Large local time in the middle, a column of quiet
   widgets on the left and a home bar at the foot, like a tablet at rest. */
body.efb-locked .efb-home[hidden] { display: flex; }
body.efb-locked .efb-shell { visibility: hidden; }
/* iOS's own curve for unlock and app close: a fast start that settles softly. */
:root { --ios-ease: cubic-bezier(.32, .72, 0, 1); }
/* While locked the deck waits slightly enlarged and transparent; --unlock
   (0 to 1, set while the lock is dragged) brings it in under the finger. */
body.efb-locked .home-bar,
body.efb-locked .home-stage,
body.efb-locked .home-dock,
body.efb-locked .home-indicator {
  opacity: var(--unlock, 0);
  transform: scale(calc(1.08 - .08 * var(--unlock, 0)));
  pointer-events: none;
  transition: opacity .5s var(--ios-ease), transform .5s var(--ios-ease);
}
body.lk-dragging .home-bar,
body.lk-dragging .home-stage,
body.lk-dragging .home-dock,
body.lk-dragging .home-indicator { transition: none; }
.efb-lock[hidden] { display: none; }
.efb-lock {
  position: fixed;
  inset: 0;
  z-index: 60;
  color: rgba(255, 255, 255, .94);
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 30%, transparent 70%, rgba(0, 0, 0, .28));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: transform, opacity;
  transition: transform .5s var(--ios-ease), opacity .5s var(--ios-ease);
}
.efb-lock.lk-drag { transition: none; cursor: grabbing; }
.lk-padlock { position: absolute; top: 3.2vh; left: 50%; transform: translateX(-50%); opacity: .9; }
.lk-head {
  position: absolute;
  top: 7vh;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .25);
}
.lk-date { font-size: clamp(15px, 2.1vmin, 22px); font-weight: 600; letter-spacing: .01em; }
.lk-time {
  font-size: clamp(84px, 17vmin, 190px);
  line-height: .95;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .88);
}
.lk-utc { margin-top: 6px; font-size: clamp(12px, 1.5vmin, 15px); font-weight: 600; letter-spacing: .14em; opacity: .7; }

.lk-widgets {
  position: absolute;
  top: 7vh;
  left: 4.2vw;
  width: clamp(170px, 19vmin, 230px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 13px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .2);
}
.lk-clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lk-face { margin: 0; }
.lk-face svg { width: 100%; height: auto; display: block; }
.lkf-dial { fill: rgba(255, 255, 255, .2); stroke: rgba(255, 255, 255, .35); stroke-width: 1.2; }
.lkf-ticks line { stroke: rgba(255, 255, 255, .7); stroke-width: 1.4; stroke-linecap: round; }
.lkf-h, .lkf-m { stroke: #fff; stroke-linecap: round; }
.lkf-h { stroke-width: 3.6; }
.lkf-m { stroke-width: 2.4; }
.lkf-pin { fill: #fff; }
.lkf-label { fill: rgba(255, 255, 255, .8); font: 600 9px/1 system-ui, sans-serif; letter-spacing: .1em; text-anchor: middle; }

.lk-list header { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.lk-list ul { list-style: none; margin: 0; padding: 0; }
.lk-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .22); font-size: 13px; }
.lk-list li::before { content: ""; flex: none; width: 15px; height: 15px; border-radius: 50%; border: 1.4px solid rgba(255, 255, 255, .7); }
.lk-list li.lk-empty::before { display: none; }

.lk-sim { display: flex; flex-direction: column; gap: 3px; }
.lk-sim-line { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.lk-sim-line i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.efb-lock[data-sim="live"] .lk-sim-line i { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); }
.lk-sim-sub { font-size: 13px; opacity: .85; }
.lk-meter { margin-top: 5px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.lk-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: #fff; transition: width .4s ease; }

.lk-cal { font-size: 10.5px; }
.lk-cal b { display: block; font-size: 11px; letter-spacing: .08em; margin-bottom: 6px; }
.lk-cal table { width: 100%; border-collapse: collapse; text-align: center; font-variant-numeric: tabular-nums; }
.lk-cal th { font-weight: 600; opacity: .7; padding: 2px 0; }
.lk-cal td { padding: 3px 0; }
.lk-cal td.lk-today span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #0b1220; font-weight: 700; }

.lk-note { display: flex; flex-direction: column; gap: 2px; padding-left: 9px; border-left: 2.5px solid rgba(255, 255, 255, .8); font-size: 13px; }
.lk-note span { opacity: .85; }

.lk-open {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 40px 6px;
  border: 0;
  background: none;
  color: inherit;
  font: 600 13px/1 inherit;
  cursor: pointer;
}
.lk-open i { width: clamp(130px, 18vw, 230px); height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .9); }
.lk-open:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 12px; }

/* A phone, or any narrow screen: the widgets sit under the time in one column. */
@media (max-width: 700px) {
  .lk-widgets { top: auto; bottom: 90px; left: 50%; transform: translateX(-50%); width: min(300px, 86vw); gap: 16px; }
  .lk-clocks, .lk-cal { display: none; }
}
@media (max-height: 560px) and (min-width: 701px) {
  .lk-cal, .lk-note { display: none; }
}
/* The home bar on the deck: swipe it up (or tap it) to go back to the Flight
   Deck, the way closing an app returns to the home screen. */
.efb-home > .home-dock { margin-bottom: 30px; }
.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 6;
  width: 260px;
  height: 26px;
  margin-left: -130px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  touch-action: none;
}
.home-indicator i { width: clamp(120px, 16vw, 200px); height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .85); }
.home-indicator:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 12px; }
.efb-home { transform-origin: 50% 100%; will-change: transform; }
.efb-home.hm-drag { transition: none; }
.efb-home.hm-leaving {
  transform: translateY(-12%) scale(.62);
  opacity: 0;
  border-radius: 40px;
  transition: transform .42s var(--ios-ease), opacity .42s var(--ios-ease), border-radius .42s var(--ios-ease);
}
@media (prefers-reduced-motion: reduce) {
  .efb-lock { transition: opacity .2s linear; }
  body.efb-locked .home-bar, body.efb-locked .home-stage, body.efb-locked .home-dock, body.efb-locked .home-indicator { transform: none; }
  .efb-home.hm-leaving { transform: none; transition: opacity .2s linear; }
}

/* ── Navigator: the Flight Deck map, embedded edge to edge ───────────── */
.nav-deck { flex: 1; display: flex; min-height: 0; }
.nav-deck-frame { flex: 1; width: 100%; min-height: 0; border: 0; display: block; background: #07080b; }

/* ── home widgets: flight tracking and airport clocks ────────────────── */
.hw-flight, .hw-tz {
  border-radius: 24px; overflow: hidden; color: #fff;
  background: rgba(28, 30, 36, .72);
  -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.hf-photo { position: relative; height: 176px; background: linear-gradient(180deg, #5f8fbd, #9fc2e2 60%, #d4e3f1); overflow: hidden; }
.hf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hf-photo img[hidden] { display: none; }
.hf-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .38), transparent 38%, transparent 70%, rgba(0, 0, 0, .35)); pointer-events: none; }
.hf-nophoto { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: rgba(255, 255, 255, .85); }
.hf-nophoto[hidden] { display: none; }
.hf-head { position: absolute; z-index: 1; left: 14px; top: 12px; right: 14px; display: flex; align-items: center; gap: 6px; }
.hf-head b { font-size: 19px; font-weight: 800; letter-spacing: -.01em; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.hf-tag { font-size: 10.5px; font-weight: 700; padding: 3px 6px; border-radius: 6px; background: rgba(0, 0, 0, .45); }
.hf-tag[hidden] { display: none; }
.hf-tag.is-type { background: #1e6fd9; }
.hf-cred { position: absolute; z-index: 1; left: 12px; bottom: 8px; right: 12px; font-size: 10px; color: rgba(255, 255, 255, .95); text-decoration: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-cred[hidden] { display: none; }
.hf-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.hf-air { font-size: 12px; color: rgba(255, 255, 255, .62); }
.hf-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.hf-ap { display: flex; flex-direction: column; min-width: 0; }
.hf-ap.is-r { text-align: right; }
.hf-ap b { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.hf-ap small { font-size: 11px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.hf-plane { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #f5b400; color: #fff; }
.hf-times, .hf-stats { display: grid; gap: 8px; }
.hf-times { grid-template-columns: 1fr 1fr; }
.hf-stats { grid-template-columns: repeat(3, 1fr); padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); }
.hf-times span, .hf-stats span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hf-times .is-r { text-align: right; }
.hf-times em, .hf-stats em { font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.hf-times b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hf-times b.is-live { color: #34c759; }
.hf-stats b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hf-bar { position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.hf-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: #f5b400; }
.hf-bar svg { position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%) rotate(90deg); color: #fff; }
.hf-dist { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: rgba(255, 255, 255, .55); }
.hw-tz { aspect-ratio: 1; display: grid; place-items: center; background: #f4f4f6; color: #111; }
.tz-ring { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
.tz-ring line { stroke-linecap: round; }
.tz-in { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.tz-in em { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #8a8a8e; }
.tz-in b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.tz-in small { font-size: 12px; font-weight: 600; color: #8a8a8e; min-height: 12px; }

/* ── edit mode: hold the wallpaper, as on iPadOS ─────────────────────── */
@keyframes hm-jiggle { 0% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } 100% { transform: rotate(-1.4deg); } }
body.home-editing #efb-home .hi, body.home-editing #home-grid > [data-widget] { animation: hm-jiggle .26s ease-in-out infinite; }
body.home-editing #efb-home .hi:nth-child(2n), body.home-editing #home-grid > [data-widget]:nth-child(2n) { animation-delay: -.13s; }
body.home-editing #efb-home { touch-action: none; }
body.home-editing #efb-home .hi, body.home-editing #home-grid > [data-widget] { cursor: grab; }
/* The lifted item rides above the rest and lets the pointer see what is under it. */
body.home-editing #efb-home .is-dragging { animation: none; transition: none !important; z-index: 50; position: relative; pointer-events: none; cursor: grabbing; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .5)); }
body.home-editing .home-bar { visibility: hidden; }
.wg-remove {
  display: none; position: absolute; z-index: 4; top: 6px; left: 6px; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(205, 205, 210, .95); color: #111; font: 700 20px/24px system-ui, sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); cursor: pointer;
}
body.home-editing .wg-remove { display: block; }
.home-editbar { position: absolute; z-index: 20; top: 14px; left: 22px; right: 22px; display: flex; justify-content: space-between; pointer-events: none; }
.home-editbar[hidden] { display: none; }
.home-editbar button {
  pointer-events: auto; border: 0; border-radius: 99px; padding: 10px 18px; color: #fff; cursor: pointer;
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: rgba(120, 120, 128, .45); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.home-editbar .he-add { width: 40px; height: 40px; padding: 0; font-size: 24px; line-height: 40px; }
.wg-gallery {
  position: absolute; z-index: 30; left: 50%; top: 70px; transform: translateX(-50%); width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 120px); overflow: auto; padding: 16px; border-radius: 26px; color: #fff;
  background: rgba(30, 32, 38, .92); -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.wg-gallery[hidden] { display: none; }
.wg-gallery header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 17px; }
.wg-gallery header button, .wg-list button { border: 0; border-radius: 99px; padding: 8px 14px; cursor: pointer; font: 600 13px/1 system-ui, sans-serif; color: #fff; background: rgba(255, 255, 255, .14); }
.wg-list { display: flex; flex-direction: column; gap: 8px; }
.wg-list div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.wg-list button { background: #0a84ff; }
.wg-list p { margin: 4px 2px; color: rgba(255, 255, 255, .6); font-size: 13px; }
@media (prefers-reduced-motion: reduce) {
  body.home-editing #efb-home .hi, body.home-editing #home-grid > [data-widget] { animation: none; }
}

/* A long press edits the deck instead of opening the browser's link menu. */
#efb-home .hi, #efb-home [data-widget] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ── the home board: apps and widgets on one grid of cells, as on iPadOS ── */
.home-layout { display: block; }
.home-layout > .home-widgets { display: none; }
#home-grid:not(.is-flow) {
  display: grid;
  grid-template-columns: repeat(var(--cols, 8), 116px);
  grid-auto-rows: 116px;
  gap: 0;
  justify-content: center;
  align-content: start;
}
#home-grid > .hi { align-self: center; justify-self: center; }
#home-grid > [data-widget] { position: relative; margin: 9px; min-width: 0; min-height: 0; max-width: none; }
#home-grid:not(.is-flow) > .hw-tz { aspect-ratio: auto; }
#home-grid:not(.is-flow) > .home-widget, #home-grid:not(.is-flow) > .home-clockw { min-height: 0; }
/* The flight widget's photo takes whatever height its block leaves. */
#home-grid > .hw-flight { display: flex; flex-direction: column; }
#home-grid > .hw-flight .hf-photo { flex: 1 1 auto; height: auto; min-height: 110px; }
#home-grid > .hw-flight .hf-body { flex: none; gap: 10px; }
/* A phone: everything flows in order, widgets across the width. */
#home-grid.is-flow { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); grid-auto-rows: auto; gap: 18px 6px; }
#home-grid.is-flow > [data-widget] { grid-column: 1 / -1; margin: 0; }
#home-grid.is-flow > .hw-tz { grid-column: span 2; }
#home-grid.is-flow > .hw-flight .hf-photo { flex: none; height: 176px; }

/* The pilot's own registration for this aircraft, as Volanta allows. */
.hf-air-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hf-setreg { flex: none; border: 0; border-radius: 99px; padding: 5px 10px; cursor: pointer; font: 600 11px/1 system-ui, sans-serif; color: #fff; background: rgba(255, 255, 255, .14); }
.hf-setreg:hover { background: rgba(255, 255, 255, .22); }

/* An illustration is shown whole and in white, so it never reads as a photograph. */
.hf-photo img.is-silhouette { object-fit: contain; padding: 18px 24px; filter: brightness(0) invert(1); opacity: .85; }
.hf-air-row { flex-wrap: wrap; }
.hf-air-row .hf-air { flex: 1 1 auto; min-width: 0; }

/* ChartFox account bar in Charts: always visible, above the chart list. */
.cf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(69, 196, 245, .22); background: rgba(69, 196, 245, .06); font-size: 12.5px; }
.cf-bar b { color: #45c4f5; }
.cf-bar .cf-error { flex-basis: 100%; margin: 0; }


/* OFP flight card, Navigraph-style: two airport blocks joined by the flight. */
.ofc { margin: 0 0 12px; padding: 14px 16px 12px; border-radius: 14px; border: 1px solid rgba(148, 163, 184, .16); background: linear-gradient(180deg, rgba(20, 30, 46, .92), rgba(12, 18, 28, .96)); }
.ofc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ofc-callsign { font: 700 12px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; color: #94a3b8; }
.ofc-legs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 10px; }
.ofc-apt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ofc-arr { text-align: right; align-items: flex-end; }
.ofc-role { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #64748b; }
.ofc-icao { font: 700 30px/1.05 "Bahnschrift SemiCondensed", "DIN Alternate", system-ui, sans-serif; letter-spacing: .04em; color: #f1f5f9; }
.ofc-name { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ofc-time { margin-top: 4px; font: 600 16px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #e2e8f0; }
.ofc-time i { margin-left: 6px; font-style: normal; font-size: 10px; letter-spacing: .1em; color: #64748b; }
.ofc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ofc-arr .ofc-tags { justify-content: flex-end; }
.ofc-tags em { font-style: normal; font: 600 10.5px/1 ui-monospace, Consolas, monospace; padding: 4px 6px; border-radius: 5px; background: rgba(69, 196, 245, .1); color: #7dd3fc; }
.ofc-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 22px; min-width: 92px; color: #94a3b8; font: 600 11px/1 ui-monospace, Consolas, monospace; }
.ofc-line { display: flex; align-items: center; gap: 4px; width: 100%; }
.ofc-line i { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, rgba(148, 163, 184, .5) 0 4px, transparent 4px 8px); }
.ofc-line svg { width: 18px; height: 18px; fill: #45c4f5; transform: rotate(90deg); }
.ofc-imported { margin-top: 2px; font-size: 11.5px; color: #64748b; }
.ofc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin-top: 12px; border-radius: 10px; overflow: hidden; background: rgba(148, 163, 184, .14); }
.ofc-stats div { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; background: rgba(12, 18, 28, .96); }
.ofc-stats span { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #64748b; }
.ofc-stats b { font: 600 14px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #f1f5f9; white-space: nowrap; }
.ofc-stats b small { font-size: 10px; color: #64748b; }
@media (max-width: 640px) {
  .ofc-icao { font-size: 24px; }
  .ofc-mid { min-width: 64px; }
  .ofc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* IMPORT F-PLN: the SimBrief fetch, top right. */
.et-import { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--efb-accent) 55%, transparent); background: color-mix(in srgb, var(--efb-accent) 14%, transparent); color: var(--efb-text); font: 700 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; cursor: pointer; white-space: nowrap; }
.et-import:hover { background: color-mix(in srgb, var(--efb-accent) 26%, transparent); }
.et-import:disabled { opacity: .6; cursor: progress; }
.et-import[data-state="bad"] { border-color: #e5484d; color: #ff8a8d; }
@media (max-width: 700px) { .et-import b { display: none; } }

/* The live aircraft drawn on the open chart. */
.chart-ownship { position: absolute; left: 0; top: 0; width: 30px; height: 30px; transform-origin: 15px 15px; pointer-events: none; z-index: 2; filter: drop-shadow(0 0 4px rgba(34, 211, 238, .8)) drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.chart-ownship[hidden] { display: none; }

/* ── Charts: a terminal-chart workspace ─────────────────────────────────
   Airports down the left, the chart index beside them, the chart filling the
   rest — the layout pilots know from Jeppesen FliteDeck and Navigraph. */
.cx {
  position: relative;
  display: grid;
  grid-template-columns: 76px 300px minmax(0, 1fr);
  height: calc(100dvh - 54px - 54px - 46px);
  min-height: 460px;
  border: 1px solid var(--efb-line);
  border-radius: var(--efb-r);
  overflow: hidden;
  background: var(--efb-panel);
}
/* airports rail */
.cx-apts { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; background: color-mix(in srgb, var(--efb-panel) 70%, #000); border-right: 1px solid var(--efb-line); overflow-y: auto; scrollbar-width: none; }
.cx-apt-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 2px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--efb-muted); font: 700 12px/1 var(--efb-mono); letter-spacing: .03em; cursor: pointer; }
.cx-apt-tab:hover { background: var(--efb-panel-2); color: var(--efb-text); }
.cx-apt-tab.on { background: var(--efb-accent-soft); border-color: var(--efb-accent-line); color: var(--efb-text); }
.cx-apt-tab.on::before { content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--efb-accent); }
.cx-apt-tab i, .cx-apt-id i { font: 800 8.5px/1 var(--efb-font); font-style: normal; letter-spacing: .08em; padding: 2px 5px; border-radius: 4px; background: var(--efb-panel-3); color: var(--efb-muted); }
.cx-apt-tab i.r-dep, .cx-apt-id i.r-dep { background: rgba(56, 189, 248, .16); color: #38bdf8; }
.cx-apt-tab i.r-arr, .cx-apt-id i.r-arr { background: rgba(192, 132, 252, .16); color: #c084fc; }
.cx-apt-tab i.r-alt, .cx-apt-id i.r-alt { background: rgba(251, 191, 36, .16); color: #fbbf24; }
.cx-apt-tab i.r-fav { background: transparent; color: #fbbf24; font-size: 11px; padding: 0; }
.cx-apt-add svg { width: 17px; height: 17px; }
.cx-apt-add b, .cx-auto b { font: 700 9.5px/1 var(--efb-font); letter-spacing: .08em; }
.cx-apts-gap { flex: 1; }
.cx-auto.on { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .5); color: #4ade80; }
/* index */
.cx-index { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--efb-line); }
.cx-apt { padding: 12px 14px 10px; border-bottom: 1px solid var(--efb-line); }
.cx-apt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cx-apt-id { display: flex; align-items: center; gap: 8px; }
.cx-apt-id b { font: 800 24px/1 var(--efb-mono); letter-spacing: .04em; color: var(--efb-text); }
.cx-apt-id span { font-size: 18px; }
.cx-apt-name { margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--efb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-apt-src { margin-top: 3px; font: 600 10.5px/1.3 var(--efb-mono); color: var(--efb-muted); letter-spacing: .03em; }
.cx-apt-empty { color: var(--efb-muted); font-size: 13px; }
.cx-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-muted); cursor: pointer; font-size: 16px; }
.cx-icon.on { color: #fbbf24; }
.cx-icon svg { width: 18px; height: 18px; }
.cx-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 8px 8px 0; }
.cx-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border: 0; border-radius: 9px 9px 0 0; background: transparent; color: var(--efb-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.cx-tabs button b { font: 800 12px/1 var(--efb-mono); letter-spacing: .06em; }
.cx-tabs button span { font: 600 10px/1 var(--efb-mono); opacity: .8; }
.cx-tabs button:hover:not(:disabled) { color: var(--efb-text); background: var(--efb-panel-2); }
.cx-tabs button.on { color: var(--efb-accent); border-bottom-color: var(--efb-accent); background: var(--efb-accent-soft); }
.cx-tabs button:disabled { opacity: .35; cursor: default; }
.cx-tools { display: flex; flex-direction: column; gap: 7px; padding: 8px 10px; border-top: 1px solid var(--efb-line); border-bottom: 1px solid var(--efb-line); }
.cx-rwys { display: flex; flex-wrap: wrap; gap: 4px; }
.cx-rwys[hidden] { display: none; }
.cx-rwys button { padding: 4px 8px; border-radius: 7px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-muted); font: 700 11px/1 var(--efb-mono); cursor: pointer; }
.cx-rwys button.on { background: var(--efb-accent); border-color: transparent; color: var(--efb-accent-ink); }
.cx-filter { display: flex; align-items: center; gap: 7px; padding: 0 10px; height: 32px; border-radius: 9px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-muted); }
.cx-filter svg { width: 15px; height: 15px; flex: none; }
.cx-filter input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--efb-text); font: 500 12.5px var(--efb-font); outline: none; }
.cx-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.cx-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--efb-text); text-align: left; text-decoration: none; cursor: pointer; }
.cx-row:hover { background: var(--efb-panel-2); }
.cx-row.on { background: var(--efb-accent-soft); border-color: var(--efb-accent-line); }
.cx-row.on .cx-row-main b { color: var(--efb-accent); }
.cx-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-row-main b { font: 700 12.5px/1.25 var(--efb-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-row-main span { font-size: 10.5px; color: var(--efb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-rw { flex: none; font: 700 10px/1 var(--efb-mono); color: var(--efb-muted); padding: 3px 5px; border-radius: 5px; background: var(--efb-panel-3); }
.cx-ext svg { width: 14px; height: 14px; color: var(--efb-muted); }
.cx-badge { font: 700 9px/1 var(--efb-font); letter-spacing: .06em; padding: 3px 6px; border-radius: 5px; background: var(--efb-panel-3); color: var(--efb-muted); text-transform: uppercase; }
.cx-badge.bad { color: #f87171; background: rgba(248, 113, 113, .12); }
.cx-pinmark { font-size: 11px; }
.cx-hint { padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.cx-hint b { font-size: 12.5px; color: var(--efb-text); }
.cx-hint span { font-size: 11.5px; color: var(--efb-muted); }
.cx-note { margin: 4px 4px 6px; padding: 9px 11px; border-radius: 9px; background: var(--efb-panel-2); color: var(--efb-muted); font-size: 11.5px; line-height: 1.4; }
.cx-note.bad { color: #fca5a5; background: rgba(248, 113, 113, .1); }
.cx-loading { display: flex; align-items: center; gap: 9px; padding: 18px 12px; color: var(--efb-muted); font-size: 12px; }
.cx-loading i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--efb-line-strong); border-top-color: var(--efb-accent); animation: cx-spin .8s linear infinite; }
@keyframes cx-spin { to { transform: rotate(360deg); } }
.cx-cf { margin: 4px 4px 8px; padding: 14px; border-radius: 12px; border: 1px solid var(--efb-accent-line); background: var(--efb-accent-soft); display: flex; flex-direction: column; gap: 9px; }
.cx-cf-head b { font-size: 13.5px; color: var(--efb-text); }
.cx-cf p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--efb-muted); }
.cx-btn { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-text); font: 700 13px var(--efb-font); cursor: pointer; }
.cx-btn.primary { background: var(--efb-accent); border-color: transparent; color: var(--efb-accent-ink); }
.cx-link { border: 0; background: none; padding: 0; color: var(--efb-accent); font: 600 11.5px var(--efb-font); text-decoration: none; cursor: pointer; }
.cx-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px 12px; border-top: 1px solid var(--efb-line); font-size: 11.5px; }
.cx-foot:empty { display: none; }
.cx-cf-on { color: #4ade80; font-weight: 600; }
/* viewer */
.cx-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: color-mix(in srgb, var(--efb-panel) 60%, #000); }
.cx-clips { display: flex; gap: 6px; padding: 7px 10px; border-bottom: 1px solid var(--efb-line); overflow-x: auto; scrollbar-width: none; min-height: 44px; align-items: center; }
.cx-clips-empty { font-size: 11px; color: var(--efb-faint); white-space: nowrap; }
.cx-clip { display: flex; align-items: center; gap: 6px; flex: none; max-width: 230px; height: 30px; padding: 0 6px 0 9px; border-radius: 8px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-text); cursor: pointer; }
.cx-clip.on { border-color: var(--efb-accent-line); background: var(--efb-accent-soft); }
.cx-clip i { font: 800 9.5px/1 var(--efb-mono); font-style: normal; color: var(--efb-muted); }
.cx-clip b { font: 600 11.5px/1 var(--efb-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-clip span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; color: var(--efb-muted); }
.cx-clip span:hover { background: var(--efb-panel-3); color: var(--efb-text); }
.cx-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cx-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--efb-line); }
.cx-back { display: none; }
.cx-bar-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-bar-title b { font: 700 13.5px/1.2 var(--efb-font); color: var(--efb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-bar-title span { font: 600 10.5px/1 var(--efb-mono); color: var(--efb-muted); letter-spacing: .03em; }
.cx-doc { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.cx-doc.split { grid-template-columns: minmax(0, 1fr) minmax(0, 40%); }
.cx-host { position: relative; min-height: 0; overflow: hidden; background: #fff; }
.cx-doc.night .cx-host { background: #0f1013; }
.cx-doc.night .chart-page { filter: invert(.92) hue-rotate(180deg); }
.cx-doc.night .chart-stage { background: #0f1013; }
.cx-map { position: relative; border-left: 1px solid var(--efb-line); }
.cx-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-float { position: absolute; right: 12px; top: 12px; z-index: 3; display: flex; flex-direction: column; gap: 4px; padding: 5px; border-radius: 12px; background: rgba(14, 16, 20, .9); border: 1px solid rgba(120, 150, 175, .28); box-shadow: 0 10px 26px rgba(0, 0, 0, .4); backdrop-filter: blur(8px); }
.cx-doc.split .cx-float { right: calc(40% + 12px); }
.cx-float button, .cx-float a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; border: 0; background: transparent; color: #dbe7f2; font: 700 17px/1 var(--efb-font); cursor: pointer; text-decoration: none; }
.cx-float button[data-split] { font-size: 10px; letter-spacing: .06em; }
.cx-float button:hover, .cx-float a:hover { background: rgba(255, 255, 255, .08); }
.cx-float button.on { background: #38bdf8; color: #04121c; }
.cx-float svg { width: 18px; height: 18px; }
.cx-sep { height: 1px; margin: 2px 4px; background: rgba(120, 150, 175, .25); }
.cx-pages { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(14, 16, 20, .9); color: #dbe7f2; font: 700 12px var(--efb-mono); }
.cx-pages[hidden] { display: none; }
.cx-pages button { width: 30px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: inherit; font-size: 16px; cursor: pointer; }
.cx-zoom { position: absolute; left: 12px; bottom: 12px; z-index: 3; padding: 4px 8px; border-radius: 7px; background: rgba(14, 16, 20, .78); color: #9fb3c8; font: 700 11px var(--efb-mono); }
.cx-zoom:empty { display: none; }
.cx-valid { padding: 6px 14px; border-top: 1px solid var(--efb-line); font-size: 10.5px; color: var(--efb-muted); }
.cx-valid.bad { color: #fca5a5; }
.cx-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px; text-align: center; color: var(--efb-muted); }
.cx-empty-mark { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--efb-panel-2); color: var(--efb-accent); }
.cx-empty-mark svg { width: 28px; height: 28px; }
.cx-empty b { font-size: 15px; color: var(--efb-text); }
.cx-empty p { margin: 0; font-size: 12.5px; }
.cx-sources { margin-top: 14px; width: min(420px, 100%); display: flex; flex-direction: column; gap: 6px; text-align: left; }
.cx-sources-head { font: 700 10px/1 var(--efb-font); letter-spacing: .12em; text-transform: uppercase; color: var(--efb-faint); }
.cx-source { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--efb-panel-2); border: 1px solid var(--efb-line); color: var(--efb-text); text-decoration: none; }
.cx-source b { font-size: 12.5px; }
.cx-source span { grid-row: 2; font-size: 11px; color: var(--efb-muted); }
.cx-source svg { grid-row: 1 / 3; grid-column: 2; align-self: center; width: 15px; height: 15px; color: var(--efb-muted); }
/* airport search */
.cx-search { position: absolute; inset: 0; z-index: 10; display: flex; justify-content: center; padding-top: 70px; background: rgba(4, 7, 12, .55); backdrop-filter: blur(3px); }
.cx-search[hidden] { display: none; }
.cx-search-box { width: min(520px, calc(100% - 28px)); align-self: flex-start; border-radius: 14px; overflow: hidden; background: var(--efb-panel); border: 1px solid var(--efb-line-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.cx-search-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--efb-line); color: var(--efb-muted); }
.cx-search-in svg { width: 19px; height: 19px; }
.cx-search-in input { flex: 1; border: 0; background: transparent; color: var(--efb-text); font: 600 17px var(--efb-font); outline: none; }
.cx-search-res { max-height: 360px; overflow-y: auto; padding: 6px; }
.cx-search-res button { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--efb-text); text-align: left; cursor: pointer; }
.cx-search-res button:hover, .cx-search-res button:focus { background: var(--efb-panel-2); outline: none; }
.cx-search-res b { font: 800 14px var(--efb-mono); }
.cx-search-res span { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-search-res i { font-style: normal; font-size: 11px; color: var(--efb-muted); white-space: nowrap; }
.cx-search-hint { padding: 16px; font-size: 12.5px; color: var(--efb-muted); }
/* tablet: a narrower index */
@media (max-width: 1100px) {
  .cx { grid-template-columns: 68px 260px minmax(0, 1fr); }
}
/* phone: one column at a time — airports and index, then the chart full screen */
@media (max-width: 767px) {
  .cx { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 150px); border-radius: 12px; }
  .cx-apts { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--efb-line); padding: 6px; overflow-x: auto; overflow-y: hidden; }
  .cx-apt-tab { min-height: 44px; min-width: 62px; }
  .cx-apt-tab.on::before { left: 10px; right: 10px; top: auto; bottom: -6px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .cx-apts-gap { display: none; }
  .cx-index { border-right: 0; }
  .cx-view { position: absolute; inset: 0; z-index: 5; display: none; }
  .cx.cx-viewing .cx-view { display: flex; }
  .cx-back { display: inline-grid; }
  .cx-clips { display: none; }
  .cx-doc.split { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 40%; }
  .cx-doc.split .cx-float { right: 12px; }
  .cx-map { border-left: 0; border-top: 1px solid var(--efb-line); }
  .cx-float { right: 8px; top: 8px; padding: 4px; gap: 2px; }
  .cx-float button, .cx-float a { width: 34px; height: 34px; font-size: 15px; }
  .cx-float button[data-split] { font-size: 9px !important; }
}

/* ── App Store — Apple's App Store, dark appearance ─────────────────────── */
.as { --as-bg: #000; --as-card: #1c1c1e; --as-card-2: #2c2c2e; --as-line: rgba(84, 84, 88, .55); --as-text: #fff; --as-sub: rgba(235, 235, 245, .6); --as-blue: #0a84ff;
  position: relative; max-width: 1080px; margin: 0 auto; padding: 6px 4px 96px; color: var(--as-text); font-family: -apple-system, "SF Pro Display", "Segoe UI", system-ui, sans-serif; }
body:has(.as) .efb-page-head { display: none; }
.as-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 4px 14px; }
.as-head h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.as-date { display: block; font-size: 13px; font-weight: 600; color: var(--as-sub); letter-spacing: .01em; margin-bottom: 2px; }
.as-icon { display: inline-grid; place-items: center; flex: none; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18), 0 1px 3px rgba(0, 0, 0, .35); }
.as-icon svg { display: block; }
/* GET / OPEN */
.as-get { flex: none; min-width: 74px; height: 30px; padding: 0 16px; border: 0; border-radius: 15px; background: var(--as-card-2); color: var(--as-blue); font: 800 14.5px/30px -apple-system, "Segoe UI", system-ui, sans-serif; letter-spacing: .02em; cursor: pointer; text-align: center; }
.as-get:hover { background: #3a3a3c; }
.as-prog { display: inline-grid; place-items: center; min-width: 30px; width: 30px; padding: 0; background: conic-gradient(var(--as-blue) calc(var(--p) * 1%), #3a3a3c 0); border-radius: 50%; }
.as-prog i { width: 24px; height: 24px; border-radius: 50%; background: var(--as-bg); display: grid; place-items: center; }
.as-prog i::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--as-blue); }
/* rows */
.as-row { display: flex; align-items: center; gap: 13px; padding: 10px 2px; cursor: pointer; }
.as-row.sep { box-shadow: inset 0 -.5px 0 var(--as-line); }
.as-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.as-row-text b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-row-text span { font-size: 13.5px; color: var(--as-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-row-text.light b, .as-row-text.light span { color: #fff; }
.as-row-text.light span { opacity: .8; }
/* Today */
.as-today { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.as-card { position: relative; height: 420px; border-radius: 22px; overflow: hidden; cursor: pointer; background: linear-gradient(155deg, var(--a), var(--b)); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); transition: transform .25s ease; }
.as-card:hover { transform: scale(.985); }
.as-card-art { position: absolute; inset: 0; }
.as-card-art svg { position: absolute; opacity: .22; }
.as-card-art svg:nth-child(1) { width: 300px; height: 300px; right: -60px; top: 60px; transform: rotate(-12deg); opacity: .28; }
.as-card-art svg:nth-child(2) { width: 150px; height: 150px; left: 26px; top: 150px; transform: rotate(14deg); }
.as-card-art svg:nth-child(3) { width: 90px; height: 90px; right: 40px; top: 20px; opacity: .14; }
.as-card-top { position: absolute; left: 22px; right: 22px; top: 22px; }
.as-card-top span { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .75); letter-spacing: .04em; }
.as-card-top h2 { margin: 6px 0 0; font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -.015em; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .2); }
.as-card-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(0, 0, 0, .28); backdrop-filter: blur(22px) saturate(1.4); }
.as-card-foot .as-get { background: rgba(255, 255, 255, .92); color: var(--as-blue); }
.as-list-card { grid-column: 1 / -1; padding: 18px 20px 8px; border-radius: 22px; background: var(--as-card); }
.as-eyebrow { font-size: 13px; font-weight: 700; color: var(--as-sub); letter-spacing: .04em; }
.as-list-card h2 { margin: 4px 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.015em; }
/* Apps */
.as-sec { margin-bottom: 26px; }
.as-sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px 6px; box-shadow: inset 0 -.5px 0 var(--as-line); }
.as-sec-head h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.as-sec-head span { font-size: 15px; color: var(--as-blue); }
.as-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.as-grid .as-row { box-shadow: inset 0 -.5px 0 var(--as-line); }
/* Search */
.as-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; margin: 0 2px 18px; border-radius: 11px; background: var(--as-card-2); color: var(--as-sub); }
.as-search svg { width: 18px; height: 18px; }
.as-search input { flex: 1; border: 0; background: transparent; color: #fff; font: 400 17px -apple-system, "Segoe UI", system-ui, sans-serif; outline: none; }
.as-discover h3 { margin: 0 2px 6px; font-size: 22px; font-weight: 800; }
.as-discover button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 2px; border: 0; box-shadow: inset 0 -.5px 0 var(--as-line); background: none; color: var(--as-blue); font-size: 19px; text-align: left; cursor: pointer; }
.as-discover button svg { width: 18px; height: 18px; color: var(--as-sub); }
.as-none { color: var(--as-sub); text-align: center; padding: 40px 0; }
/* Detail */
.as-detail { padding: 4px 4px 0; }
.as-back { display: inline-flex; align-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; color: var(--as-blue); font-size: 17px; cursor: pointer; }
.as-back svg { width: 22px; height: 22px; }
.as-hero { display: flex; gap: 20px; align-items: center; margin: 14px 0 22px; }
.as-hero .as-icon { border-radius: 26px !important; }
.as-hero-text h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.as-hero-text p { margin: 3px 0 14px; font-size: 16px; color: var(--as-sub); }
.as-hero-act { display: flex; align-items: center; gap: 14px; }
.as-hero-act .as-get { background: var(--as-blue); color: #fff; }
.as-hero-act .as-prog { background: conic-gradient(var(--as-blue) calc(var(--p) * 1%), #3a3a3c 0); }
.as-remove { border: 0; background: none; color: #ff453a; font-size: 15px; cursor: pointer; }
.as-info { display: grid; grid-template-columns: repeat(5, 1fr); padding: 12px 0; margin-bottom: 18px; box-shadow: inset 0 .5px 0 var(--as-line), inset 0 -.5px 0 var(--as-line); }
.as-info div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 6px; text-align: center; }
.as-info div + div { box-shadow: inset .5px 0 0 var(--as-line); }
.as-info span { font-size: 11px; font-weight: 600; color: var(--as-sub); letter-spacing: .04em; }
.as-info b { font-size: 21px; font-weight: 800; color: var(--as-sub); min-height: 26px; display: grid; place-items: center; }
.as-info i { font-style: normal; font-size: 12px; color: var(--as-sub); }
.as-h3 { margin: 8px 2px 12px; font-size: 22px; font-weight: 800; }
.as-shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.as-shot { flex: none; width: 260px; height: 420px; border-radius: 20px; padding: 22px 18px; background: linear-gradient(160deg, var(--a), var(--b)); scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; }
.as-shot b { font-size: 21px; line-height: 1.18; font-weight: 800; color: #fff; }
.as-shot-mock { height: 230px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .15); padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.as-shot-lines { display: flex; flex-direction: column; gap: 10px; }
.as-shot-lines i { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .45); }
.as-shot-lines i + i { background: rgba(255, 255, 255, .25); }
.as-desc { margin: 0 2px 18px; font-size: 16px; line-height: 1.5; color: rgba(235, 235, 245, .85); }
.as-new { display: flex; flex-direction: column; gap: 4px; margin: 0 2px 26px; font-size: 15px; }
.as-new span { color: var(--as-sub); }
.as-foot { text-align: center; font-size: 12px; color: var(--as-sub); padding: 18px 0; }
/* tab bar */
.as-tabs { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; display: flex; gap: 4px; padding: 6px; border-radius: 26px; background: rgba(30, 30, 32, .82); backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 12px 34px rgba(0, 0, 0, .5), inset 0 0 0 .5px rgba(255, 255, 255, .12); }
.as-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 86px; padding: 6px 12px; border: 0; border-radius: 20px; background: none; color: rgba(235, 235, 245, .55); font: 600 11px -apple-system, "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.as-tabs button svg { width: 24px; height: 24px; }
.as-tabs button.on { color: var(--as-blue); background: rgba(255, 255, 255, .08); }
@media (max-width: 760px) {
  .as-today, .as-grid { grid-template-columns: minmax(0, 1fr); }
  .as-card { height: 380px; }
  .as-info { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
  .as-tabs { bottom: 84px; }
}
.en-tile .hi-tile { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; box-shadow: none; }

/* ── App Store apps — shared layout ───────────────────────────────────── */
.sa { display: flex; flex-direction: column; gap: 14px; max-width: 1080px; }
.sa-inputs { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.sa-inputs label { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 120px; flex: 1 1 130px; }
.sa-inputs label > i { position: absolute; right: 10px; bottom: 9px; font-style: normal; font-size: 12px; color: var(--efb-muted); pointer-events: none; }
.sa-check { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 13px; color: var(--efb-text); }
.sa-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.sa-big > div { padding: 14px 16px; border-radius: var(--efb-r); background: var(--efb-panel); border: 1px solid var(--efb-line); display: flex; flex-direction: column; gap: 4px; }
.sa-big b { font: 800 30px/1.05 var(--efb-mono); color: var(--efb-text); letter-spacing: -.01em; }
.sa-big b small { font-size: 14px; color: var(--efb-muted); font-weight: 600; }
.sa-big i { font-style: normal; font-size: 12px; color: var(--efb-muted); }
.sa-big.small b { font-size: 20px; }
.sa-status { display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; border-radius: var(--efb-r); border: 1px solid var(--efb-line); background: var(--efb-panel); }
.sa-status b { font-size: 15px; }
.sa-status span { font-size: 12.5px; color: var(--efb-muted); line-height: 1.4; }
.sa-status.good { border-color: rgba(48, 209, 88, .45); background: rgba(48, 209, 88, .08); } .sa-status.good b { color: #4ade80; }
.sa-status.warn { border-color: rgba(255, 214, 10, .45); background: rgba(255, 214, 10, .07); } .sa-status.warn b { color: #fcd34d; }
.sa-status.bad { border-color: rgba(255, 69, 58, .45); background: rgba(255, 69, 58, .08); } .sa-status.bad b { color: #fca5a5; }
.sa-chart svg { width: 100%; height: auto; display: block; }
.sa-t { font: 600 12px var(--efb-mono); fill: var(--efb-muted); }
.sa-note { margin: 0; font-size: 11.5px; color: var(--efb-faint); }
.sa-empty { margin: 6px 0; font-size: 12.5px; color: var(--efb-muted); }
.sa-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sa-table th { text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--efb-faint); padding: 6px 8px; }
.sa-table td { padding: 8px; border-top: 1px solid var(--efb-line); color: var(--efb-text); }
.sa-table td.bad { color: #fca5a5; }
.sa-table tr.best td { background: rgba(48, 209, 88, .08); }
.sa-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-steps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sa-steps button { flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--efb-line); background: var(--efb-panel); color: var(--efb-muted); font: 600 12.5px var(--efb-font); cursor: pointer; }
.sa-steps button.on { background: var(--efb-accent); border-color: transparent; color: var(--efb-accent-ink); }
.sa-progress { height: 6px; border-radius: 3px; background: var(--efb-panel-3); overflow: hidden; }
.sa-progress i { display: block; height: 100%; border-radius: 3px; background: var(--efb-accent); transition: width .3s ease; }
/* converter */
.sa-conv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sa-pair { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto; gap: 6px 8px; align-items: center; }
.sa-pair > .e-label { grid-column: 1 / -1; }
.sa-pair label { position: relative; } .sa-pair label i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--efb-muted); }
.sa-eq { color: var(--efb-muted); font-weight: 700; }
.sa-density { grid-template-columns: 1fr auto 1fr auto; } .sa-res { font: 800 15px var(--efb-mono); }
/* chrono */
.sa-clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sa-clocks .e-card b { display: block; font: 700 30px var(--efb-mono); margin-top: 4px; }
.sa-watch { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sa-watch > b { font: 300 64px/1 var(--efb-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sa-watch > b.done { color: #ff453a; animation: sa-blink .6s step-end infinite; }
@keyframes sa-blink { 50% { opacity: .2; } }
.sa-round { width: 78px; height: 78px; border-radius: 50%; border: 0; background: var(--efb-panel-3); color: var(--efb-text); font: 600 15px var(--efb-font); cursor: pointer; }
.sa-round.go { background: rgba(48, 209, 88, .22); color: #30d158; } .sa-round.go.stop { background: rgba(255, 69, 58, .22); color: #ff453a; }
.sa-presets { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.sa-presets button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-text); cursor: pointer; }
.sa-laps { width: 100%; max-width: 420px; margin: 0; padding: 0; list-style: none; }
.sa-laps li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 7px 4px; border-top: 1px solid var(--efb-line); font: 600 13px var(--efb-mono); }
.sa-laps li i { font-style: normal; color: var(--efb-muted); }
/* vatsim */
.sa-live { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--efb-muted); flex: 2 1 300px; }
.sa-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #30d158; box-shadow: 0 0 8px #30d158; }
.sa-live .bad { color: #fca5a5; }
.sa-apts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.sa-apt header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sa-apt header b { font: 800 20px var(--efb-mono); }
.sa-apt header span { margin-left: auto; font-size: 12px; color: var(--efb-muted); }
.sa-apt i, .sa-chips i { font: 800 9px/1 var(--efb-font); font-style: normal; padding: 3px 6px; border-radius: 4px; letter-spacing: .08em; }
.r-dep { background: rgba(56, 189, 248, .16); color: #38bdf8; } .r-arr { background: rgba(192, 132, 252, .16); color: #c084fc; } .r-alt { background: rgba(251, 191, 36, .16); color: #fbbf24; }
.sa-ctl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 9px 0; border-top: 1px solid var(--efb-line); }
.sa-ctl b { font-size: 13.5px; } .sa-ctl span { display: block; font-size: 11.5px; color: var(--efb-muted); }
.sa-ctl code { font: 800 16px var(--efb-mono); color: #30d158; align-self: center; }
.sa-atis { grid-column: 1 / -1; margin: 2px 0 0; font: 500 11.5px/1.45 var(--efb-mono); color: var(--efb-muted); }
/* phraseology */
.sa-chat header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; } .sa-chat header b { font-size: 18px; } .sa-chat header span { font-size: 12px; color: var(--efb-muted); }
.sa-msg { display: flex; gap: 10px; margin: 10px 0; max-width: 80%; }
.sa-msg i { flex: none; font: 800 9.5px/1 var(--efb-font); font-style: normal; letter-spacing: .08em; padding-top: 12px; color: var(--efb-muted); width: 30px; }
.sa-msg p { margin: 0; padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; }
.sa-msg.pilot { margin-left: auto; flex-direction: row-reverse; } .sa-msg.pilot p { background: #0a84ff; color: #fff; border-bottom-right-radius: 6px; } .sa-msg.pilot i { text-align: right; }
.sa-msg.atc p { background: var(--efb-panel-3); color: var(--efb-text); border-bottom-left-radius: 6px; }
/* landings */
.sa-pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font: 700 10.5px var(--efb-font); color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.sa-mix { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 12px; gap: 2px; } .sa-mix span { background: var(--c); min-width: 0; }
/* quiz */
.sa-q h2 { margin: 8px 0 16px; font-size: 21px; line-height: 1.3; }
.sa-opts { display: grid; gap: 8px; }
.sa-opts button { padding: 13px 16px; border-radius: 12px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-text); font: 600 14.5px var(--efb-font); text-align: left; cursor: pointer; }
.sa-opts button.right { border-color: #30d158; background: rgba(48, 209, 88, .14); } .sa-opts button.wrong { border-color: #ff453a; background: rgba(255, 69, 58, .14); } .sa-opts button.dim { opacity: .5; }
.sa-why { margin: 14px 0; padding: 12px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; } .sa-why.right { background: rgba(48, 209, 88, .1); } .sa-why.wrong { background: rgba(255, 69, 58, .1); }
.sa-why b { font-size: 14.5px; } .sa-why span { color: var(--efb-muted); line-height: 1.45; }
.sa-done { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 30px; } .sa-done > b { font: 800 64px var(--efb-mono); } .sa-done > b small { font-size: 26px; color: var(--efb-muted); }
/* career */
.sa-join { display: flex; flex-direction: column; gap: 12px; max-width: 560px; } .sa-join h2 { margin: 0; } .sa-join p { margin: 0; color: var(--efb-muted); font-size: 13.5px; }
.sa-badge { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-left: 4px solid var(--a); }
.sa-badge b { display: block; font-size: 26px; margin: 4px 0; } .sa-badge i { font-style: normal; font-size: 12.5px; color: var(--efb-muted); }
.sa-hours { min-width: 200px; } .sa-hours b small { font-size: 14px; color: var(--efb-muted); }
.sa-legs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 12px 0 16px; }
.sa-legs div:last-child { text-align: right; } .sa-legs b { display: block; font: 800 32px var(--efb-mono); } .sa-legs span { font-size: 12px; color: var(--efb-muted); }
.sa-arrow { text-align: center; font-size: 22px; color: var(--efb-accent); } .sa-arrow i { display: block; font-style: normal; font-size: 11.5px; color: var(--efb-muted); }
/* reference + brief */
.sa-refhead b { font-size: 22px; display: block; } .sa-refhead span { font-size: 12.5px; color: var(--efb-muted); }
.sa-briefcard { display: flex; flex-direction: column; gap: 14px; }
.sa-briefcard header div { display: flex; gap: 10px; align-items: baseline; } .sa-briefcard header b { font: 800 32px var(--efb-mono); } .sa-briefcard header span { font: 700 15px var(--efb-mono); color: var(--efb-muted); }
.sa-briefcard header h2 { margin: 2px 0 0; font-size: 16px; color: var(--efb-muted); font-weight: 600; }
.sa-chips { display: flex; gap: 6px; flex: 2 1 260px; } .sa-chips button { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--efb-line); background: var(--efb-panel-2); color: var(--efb-text); font: 700 13px var(--efb-mono); cursor: pointer; }

.sa-hold-svg { max-height: 420px; }
.sa-boxes { display: inline-flex; gap: 3px; margin-left: 4px; }
.sa-atcbox { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: var(--c); color: #fff; font: 800 11px/1 system-ui, sans-serif; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.sa-atcbox[title="atis"] { color: #1a1a1a; }
.sa-atcring { display: inline-grid; place-items: center; height: 18px; padding: 0 6px; border-radius: 9px; border: 2px solid rgba(238, 121, 1, .8); color: #EE7901; font: 800 9px/1 system-ui, sans-serif; }

/* Store, toned down: dark surfaces, the app's tint only as a quiet accent. */
.as-card { height: 300px; border-radius: 14px; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--a) 30%, transparent), transparent 60%), linear-gradient(180deg, #1d2026, #131519); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.as-card:hover { transform: none; border-color: rgba(255, 255, 255, .16); }
.as-card-art svg:nth-child(1) { width: 190px; height: 190px; right: -20px; top: auto; bottom: 64px; transform: none; opacity: .07; }
.as-card-top span { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--a) 60%, #fff); }
.as-card-top h2 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; text-shadow: none; max-width: 80%; }
.as-card-foot { background: rgba(0, 0, 0, .25); border-top: 1px solid rgba(255, 255, 255, .06); }
.as-card-foot .as-get { background: rgba(255, 255, 255, .1); color: #fff; }
.as-icon { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 1px 2px rgba(0, 0, 0, .4); }

/* Home, flat and quiet: no glossy bubble highlight, a softer shadow, a faint house mark. */
.hi-tile { border-radius: 22%; border-color: rgba(255, 255, 255, .08); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.hi-tile::after { display: none; }
.hi-tile svg { filter: none; }
.home-mark { opacity: .18; }
