/* Expedite Climb Simulator — night petrol shell over a slate radar scope. */

/* IBM Plex Mono & IBM Plex Sans Condensed loaded via CSP-whitelisted Google Fonts in index.html / editor.html */

:root {
  /* shell */
  --shell: #0f2b34;
  --shell-2: #153843;
  --shell-line: #22505f;
  --shell-text: #e2eef2;
  --shell-muted: #9dbcc6;
  /* panels */
  --panel: #0e191e;
  --panel-2: #132228;
  --panel-3: #182c34;
  --line: #22363f;
  --text: #dbe7ec;
  --bright: #ffffff;
  --muted: #8ea7b1;
  --faint: #78919c;
  /* scope */
  /* scope "Nuit marine": deep night blue, mint on your frequency, periwinkle announced */
  --scope: #111925;
  --scope-sector: #162131;
  --scope-edge: #4d6a86;
  --scope-tma: #3e5773;
  --scope-route: #23314a;
  --scope-fix: #8094ad;
  --scope-fix-label: #93a5bb;
  --scope-airport: #a7b6c9;
  --scope-ring: #1c2a3d;
  --scope-final: #4b6070;
  --scope-final-mark: #8fa3b8;    /* approach axis marks, IF / FAF: neutral, never the green of your traffic */
  --scope-runway: #c9d4e0;
  --scope-history: #8094ad;
  /* traffic states and alerts (shared with the canvas) */
  --c-onfreq: #86d9a8;
  --c-inbound: #8fb4ff;
  --c-transferred: #6a7b8e;
  --c-warn: #dcc48a;
  --c-selected: #5fd6e8;
  --c-stca: #ff7a1a;
  --c-los: #ff5252;
  --c-wake: #c48cff;
  --c-measure: #9fe7d8;
  --c-monitor: #ffd23f;
  --area-p: #e5484d;
  --area-r: #f08c3a;
  --area-d: #d6bf55;
  --area-tsa: #9a86f0;
  --scope-mva: #2f6a64;
  --scope-hold: #8fb3c0;
  --ok: #7fd1a0;
  --accent: #3e9fb0;              /* interface accent: a darker, quieter cyan; the bright one is kept for selected / calling on the scope */
  --accent-ink: #062027;

  --on-bg: #1d4d5a;
  --sel-bg: #12303a;
  --primary-hover: #4fb1c2;
  --strip-stca: #2a2010; --strip-wake: #241a33; --strip-los: #3a1416; --strip-mon: #2a2610;
  --unsure: #ffe3b8; --warn-text: #f0c987; --alert-text: #ff8a8a;
  --ok-line: #2f5a46; --low-line: #6d5420; --bad-line: #6d2a2a;
  --emg-bg: #2a1214; --emg-text: #ffb0b0;
  --overlay: rgb(10 19 23 / 0.88); --overlay-shell: rgb(15 43 52 / 0.94); --overlay-panel: rgb(14 25 30 / 0.96);
  --line-2: #2c4651; --backdrop: rgb(4 10 12 / 0.78);
  --ptt-hover: #1b4552; --ptt-live: #5a1a1d; --heard-live: #ffd7d7; --placeholder: #7c98a2;
  /* scope symbols: aircraft "shape" (square on frequency, diamond otherwise) or "plus" (circle and cross);
     selection "recolor" (selected colour) or "ring" (own colour, ring around) */
  --ac-symbol: fill; --ap-symbol: double; --sel-mode: ring; --route-width: 0.6;
  --route-sel-style: solid; --c-route-sel: #ef86d3;
  --scope-wx: #6fae63; --scope-turb: #c2a874; --scope-ice: #8fc3e8;

  --sans: "IBM Plex Sans Condensed", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 4px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 4px 10px rgb(0 0 0 / 0.5);
  --side: clamp(280px, 21vw, 360px);
  color-scheme: dark;
}

/* Light theme (Settings), "Gris doux": a soft mid grey with no white, comfortable by day and at night;
   dark traffic colours on it (fir green on your frequency, navy announced, dark grey the others). */
:root[data-theme="light"] {
  --shell: #8c969a; --shell-2: #848e92; --shell-line: #687276; --shell-text: #0b1317; --shell-muted: #1f2b33;
  --panel: #98a1a4; --panel-2: #8f989b; --panel-3: #868f92; --line: #6f787c; --text: #0b1418; --bright: #000000;
  --muted: #1f2b31; --faint: #29353b;
  /* scope: grey stone, darker than the panels */
  --scope: #8a908c; --scope-sector: #929894; --scope-edge: #3a413e; --scope-tma: #454c48; --scope-route: #7a807c;
  --scope-fix: #1a1f1d; --scope-fix-label: #1f2523; --scope-airport: #121715; --scope-ring: #828884;
  --scope-final: #37414b; --scope-final-mark: #27313b; --scope-runway: #121715; --scope-history: #272c2a;
  --c-onfreq: #052b1c; --c-warn: #4f2600; --c-inbound: #0f2a62; --c-transferred: #363b39; --c-selected: #00353f;
  --c-stca: #6e2800; --c-los: #7d0007; --c-wake: #421273; --c-measure: #033b45; --c-monitor: #423200;
  --area-p: #800d14; --area-r: #7e3800; --area-d: #463d00; --area-tsa: #33217f;
  --scope-mva: #1b433e; --scope-hold: #1b343b; --ok: #053d1c; --accent: #1d4a54; --accent-ink: #e3eaec;
  --shadow: 0 4px 10px rgb(0 0 0 / 0.25);
  --on-bg: #a9bfc4; --sel-bg: #a0b3b8; --primary-hover: #27606c;
  --strip-stca: #ad916e; --strip-wake: #9e92b0; --strip-los: #b08585; --strip-mon: #a89e6a;
  --unsure: #3f2600; --warn-text: #3f2600; --alert-text: #5c000c;
  --ok-line: #3a6450; --low-line: #735522; --bad-line: #733636;
  --emg-bg: #ad8c8c; --emg-text: #42000a;
  --overlay: rgb(152 161 164 / 0.94); --overlay-shell: rgb(140 150 154 / 0.96); --overlay-panel: rgb(152 161 164 / 0.97);
  --line-2: #6a7478; --backdrop: rgb(20 28 32 / 0.5);
  --ptt-hover: #87a3a9; --ptt-live: #b88282; --heard-live: #42000a; --placeholder: #29353b;
  --ac-symbol: fill; --ap-symbol: double; --sel-mode: ring;
  --route-sel-style: solid; --c-route-sel: #5c1546; --route-width: 0.6;
  --scope-wx: #1b4316; --scope-turb: #433411; --scope-ice: #0f3550;
  /* the radar scope (canvas only, read by radar.js as --radar-*): a dark slate with the dark theme's aircraft
     colours (traffic, alerts, selection, trails), its map drawn light; the panels and strips stay light */
  --radar-scope: #2e3533; --radar-scope-sector: #343c39; --radar-scope-edge: #8e9a95; --radar-scope-tma: #74807b;
  --radar-scope-route: #444d4a; --radar-scope-fix: #a9b4af; --radar-scope-fix-label: #b8c2bd; --radar-scope-airport: #c9d1cd;
  --radar-scope-ring: #3b4441; --radar-scope-final: #6b7882; --radar-scope-final-mark: #a6b2bd; --radar-scope-runway: #dfe5e2;
  --radar-scope-history: #8094ad; --radar-scope-mva: #3f7a73; --radar-scope-hold: #9fbcc5;
  --radar-c-onfreq: #86d9a8; --radar-c-inbound: #8fb4ff; --radar-c-transferred: #6a7b8e; --radar-c-warn: #dcc48a;
  --radar-c-selected: #5fd6e8; --radar-c-stca: #ff7a1a; --radar-c-los: #ff5252; --radar-c-wake: #c48cff;
  --radar-c-measure: #9fe7d8; --radar-c-monitor: #ffd23f; --radar-c-route-sel: #ef86d3;
  --radar-area-p: #e5484d; --radar-area-r: #f08c3a; --radar-area-d: #d6bf55; --radar-area-tsa: #9a86f0;
  --radar-scope-wx: #6fae63; --radar-scope-turb: #c2a874; --radar-scope-ice: #8fc3e8; --radar-ok: #7fd1a0;
  color-scheme: light;
}


* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--scope);
  color: var(--text);
  font: 15px/1.4 var(--sans);
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgb(95 214 232 / 0.35); color: var(--bright); }
input { caret-color: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
kbd { font: 12px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; }
[hidden] { display: none !important; }

button, select, input { font: inherit; color: inherit; }
.i { width: 16px; height: 16px; flex: none; }

/* ---------- buttons ---------- */
.btn, .seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 0 10px; border-radius: var(--r);
  background: var(--shell-2); border: 1px solid var(--shell-line); color: var(--shell-text);
  cursor: pointer; transition: background-color 120ms, border-color 120ms;
}
.btn:hover, .seg button:hover { border-color: var(--shell-muted); }
.btn.ic { width: 34px; padding: 0; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.toggle.on, .seg button.on { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }
.toggle:not(.on) { color: var(--shell-muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 0 18px; min-height: 38px; }
.btn.primary:hover { background: var(--primary-hover); }
.seg { display: inline-flex; align-items: center; }
.seg button { border-radius: 0; margin-left: -1px; min-width: 34px; padding: 0 8px; }
.seg button:first-of-type { border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.seg button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.seg-label { font: 500 11px var(--mono); color: var(--shell-muted); margin-right: 6px; letter-spacing: 0.04em; }
select {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
  min-height: 32px; padding: 0 8px;
}

/* ---------- top rail ---------- */
.rail {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  padding: 5px 10px; background: var(--shell); border-bottom: 1px solid var(--shell-line); color: var(--shell-text);
}
.rail::-webkit-scrollbar { display: none; }
.station { flex-shrink: 0; }
.station strong { display: block; font: 600 13px/1.1 var(--sans); letter-spacing: 0.06em; white-space: nowrap; }
.station span { display: block; font-size: 11px; color: var(--shell-muted); white-space: nowrap; max-width: 145px; overflow: hidden; text-overflow: ellipsis; }
.facts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; }
.qnh { font: 12px var(--mono); color: var(--shell-muted); }
.qnh b { color: var(--shell-text); font-weight: 500; }
#rwy-btn { font: 500 12px var(--mono); }
.clock { font: 500 17px var(--mono); letter-spacing: 0.04em; color: var(--bright); margin: 0 auto; flex-shrink: 0; white-space: nowrap; }
.tools { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; justify-content: flex-end; flex-shrink: 0; }
@media (max-width: 1360px) {
  .rail { gap: 3px; padding: 4px 5px; }
  .station strong { font-size: 12px; letter-spacing: 0.03em; }
  .station span { max-width: 90px; font-size: 10px; }
  .facts { gap: 3px; }
  .qnh, #rwy-btn { font-size: 11px; }
  .clock { font-size: 13px; letter-spacing: 0.01em; }
  .rail .btn { padding: 0 5px; font-size: 11.5px; gap: 3px; min-height: 28px; }
  .rail .btn.ic { width: 25px; padding: 0; }
  .rail .seg button { min-width: 22px; padding: 0 4px; font-size: 11.5px; min-height: 28px; }
  .rail .seg-label { font-size: 10px; margin-right: 3px; }
  .rail select { min-height: 28px; padding: 0 4px; font-size: 11.5px; }
  .tools { gap: 2px; }
}
.rail .btn, .rail .seg button { height: 28px; padding: 0 7px; font-size: 11.5px; white-space: nowrap; }
.rail .btn.ic { width: 28px; padding: 0; }
.rail .sep { margin: 0 1px; height: 18px; flex-shrink: 0; }
@media (max-width: 1480px) { .rail .key-tag { display: none; } .station span { display: none; } }
.sep { width: 1px; height: 22px; background: var(--shell-line); margin: 0 3px; }
.badge { font: 600 11px var(--mono); background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 0 5px; min-width: 16px; }
.badge:empty { display: none; }
.drawer-only { display: none; }

/* ---------- layout ---------- */
.layout {
  display: grid; min-height: 0;
  grid-template-columns: var(--side) minmax(0, 1fr) var(--side);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "strips scope comms";
}
.scope { grid-area: scope; position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--radar-scope, var(--scope)); }
#radar { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; cursor: grab; }

.panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); }
.strips { grid-area: strips; border-left: 0; border-right: 1px solid var(--line); }
.comms { grid-area: comms; }
.panel > header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 6px; }
.panel h2 { margin: 0; font: 600 13px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.panel h2 .count { font: 500 12px var(--mono); color: var(--text); letter-spacing: 0; margin-left: 4px; }
.panel ol { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; flex: 1; min-height: 0; }
.empty { margin: 0; padding: 4px 14px 14px; color: var(--faint); font-size: 14px; max-width: 40ch; }
ol:not(:empty) + .empty { display: none; }
.panel ol:empty { flex: 0; }

/* ---------- flight strips ---------- */
.strip {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; align-items: baseline;
  padding: 7px 10px; margin-bottom: 4px; border-radius: var(--r);
  background: var(--panel-2); border: 1px solid transparent; cursor: pointer;
  font: 14px var(--sans); color: var(--muted);
}
.strip .d { font: 13px var(--mono); color: var(--text); }
.strip:hover { border-color: var(--line); }
.strip .cs { display: flex; align-items: baseline; gap: 0; min-width: 0; white-space: nowrap; font: 600 15px var(--mono); color: var(--c-onfreq); letter-spacing: 0.01em; }
.strip .cs small { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.strip .cs .state { flex: none; }
.strip .cs small { font: 400 12px var(--mono); color: var(--faint); margin-left: 6px; flex: none; }
.strip .tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 1px; }
.strip .tags:empty { display: none; }
.strip .tags .state { margin-left: 0; }
.strip .lv { text-align: right; color: var(--text); font: 14px var(--mono); }
.strip .lv .vs { color: var(--muted); font-size: 12px; margin-left: 2px; }
.strip .lv .to { color: var(--accent); }
.strip .nav, .strip .xfer { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.strip .spd { font-family: var(--mono); color: var(--muted); }
.strip .spd b { color: var(--accent); font-weight: 600; }
.strip .eta { text-align: right; font: 13px var(--mono); color: var(--muted); }
.strip .xfer { grid-column: 1 / -1; }
.strip .xfer { color: var(--muted); }
.strip .xfer .unit { color: var(--muted); }
.strip .xfer .xfl { font: 600 13px var(--mono); color: var(--text); }
.strip .xfer .od { font: 13px var(--mono); color: var(--muted); letter-spacing: 0.02em; }
.strip.inbound { background: transparent; border-color: var(--line); border-style: dashed; }
.strip.inbound .cs { color: var(--c-inbound); }
.strip.sel { border-color: var(--c-selected); background: var(--sel-bg); }
.voice-test { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
.voice-diag { flex: 1 1 100%; margin: 0; max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); font: 12px/1.45 var(--mono); color: var(--text); white-space: pre-wrap; word-break: break-word; }
/* coordinations (departure clearances, climb / descent requests) above the radio exchanges */
.comms .coord-sec { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; max-height: 45%; }
.comms .radio-sec { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.comms .coord-sec { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.comms .radio-sec { padding-top: 4px; }
#coord-log .sys { flex-wrap: wrap; }
#coord-log .sys > .why { flex: 1 1 100%; margin: 2px 0 0 23px; }
#coord-log .sys.ask:not(.done) { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--c-selected); }
#coord-log .sys.ask .t { color: var(--muted); }
#coord-log .sys.xpwhy .m b { color: var(--accent); font-weight: 600; }
#coord-log .sys.xpwhy .why { color: var(--muted); }
.comms :is(.coord-sec, .radio-sec) h3 { margin: 0; padding: 0 12px 4px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.comms :is(.coord-sec, .radio-sec) h3 .count { font: 500 12px var(--mono); color: var(--text); letter-spacing: 0; margin-left: 4px; }
/* aircraft on the ground waiting for (or holding) their departure clearance */
.strips .ground { display: flex; flex-direction: column; min-height: 0; max-height: 34vh; border-top: 1px solid var(--line); padding-top: 6px; }
.strips .ground h3 { margin: 0; padding: 0 12px 6px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.strips .ground h3 .count { font: 500 12px var(--mono); color: var(--text); letter-spacing: 0; margin-left: 4px; }
.strip.gnd { background: transparent; border-color: var(--line); border-style: dotted; }
.strip.gnd .cs { color: var(--text); }
.strip .state.g-pending { color: var(--scope); background: var(--c-warn); }
.strip .state.g-standby { color: var(--c-warn); border: 1px solid currentColor; }
.strip .state.g-approved { color: var(--ok); border: 1px solid currentColor; }
:is(#log, #coord-log) li.flash { outline: 2px solid var(--accent); outline-offset: -2px; }
.strip.calling .cs::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c-selected); margin-right: 7px; vertical-align: 2px; }
.strip .state { font: 600 11px var(--mono); padding: 0 5px; border-radius: 3px; margin-left: 6px; vertical-align: 1px; }
.strip .state.calling { color: var(--scope); background: var(--c-selected); }
.strip.al-stca { background: var(--strip-stca); } .strip.al-stca .state.alert { background: var(--c-stca); color: var(--scope); }
.strip.al-wake { background: var(--strip-wake); } .strip.al-wake .state.alert { background: var(--c-wake); color: var(--scope); }
.strip.al-los { background: var(--strip-los); } .strip.al-los .state.alert { background: var(--c-los); color: var(--scope); }
.strip.al-mon { background: var(--strip-mon); } .strip.al-mon .state.alert { background: var(--c-monitor); color: var(--scope); }
.area-list { display: flex; flex-direction: column; gap: 0; max-height: 210px; overflow-y: auto; }
.area-list .chk { min-height: 30px; align-items: flex-start; padding-top: 4px; }
.area-list .chk input { margin-top: 2px; flex: none; }
.area-list b { font: 600 13px var(--mono); color: var(--text); }
.area-list small { color: var(--faint); font-size: 12px; }
.dlg .area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 14px; max-height: none; }
.strip .state.flag { color: var(--c-warn); border: 1px solid currentColor; }

/* ---------- radio log ---------- */
:is(#log, #coord-log) li { padding: 8px 6px 9px; border-bottom: 1px solid var(--line); font-size: 14px; }
:is(#log, #coord-log) li:last-child { border-bottom: 0; }
.who { font: 500 12px var(--mono); color: var(--faint); display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.who b { color: var(--muted); font-weight: 600; }
.who .src { margin-left: auto; font-size: 11px; color: var(--faint); }
.said { margin: 0; color: var(--bright); }
.chrono { margin: 2px 0 0; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.said .unsure { text-decoration: underline wavy var(--c-stca); text-decoration-thickness: 1px; text-underline-offset: 4px; color: var(--unsure); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chip { font: 12px var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: var(--panel-2); }
.chip.ok { border-color: var(--ok-line); color: var(--ok); }
.chip.low { border-color: var(--low-line); color: var(--c-stca); }
.chip.bad { border-color: var(--bad-line); color: var(--c-los); }
.chip.dim { border-color: transparent; background: transparent; color: var(--faint); padding: 1px 2px; }
.readback { margin: 7px 0 0 14px; padding-left: 10px; border-left: 1px solid var(--ok-line); }
.readback p { margin: 0; color: var(--ok); }
.readback.pending p { color: var(--faint); }
:is(#log, #coord-log) .pilot .said { color: var(--ok); }
:is(#log, #coord-log) .pilot.emg { background: var(--emg-bg); }
:is(#log, #coord-log) .pilot.emg .said { color: var(--emg-text); font-weight: 600; }
:is(#log, #coord-log) .sys { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; cursor: default; }
:is(#log, #coord-log) .sys[data-cs] { cursor: pointer; }
:is(#log, #coord-log) .sys .t { font: 11px var(--mono); color: var(--faint); flex: none; }
:is(#log, #coord-log) .sys.warn { color: var(--warn-text); }
:is(#log, #coord-log) .sys.alert { color: var(--alert-text); }
:is(#log, #coord-log) .sys.coord { color: var(--accent); }
:is(#log, #coord-log) .sys.ask { flex-wrap: wrap; }
.coordbtns { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 2px 23px; }
.lmenu .coordbtns { padding: 0 6px 8px; }
.coordbtns button { min-height: 32px; padding: 0 10px; font: 500 13px var(--mono); color: var(--text); background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.coordbtns button:hover:not(:disabled) { border-color: var(--accent); }
.coordbtns button:disabled { opacity: 0.45; cursor: default; }
.coordbtns button.on { opacity: 1; color: var(--ok); border-color: var(--ok); }
.strip .state.coord { color: var(--c-selected); border: 1px solid currentColor; }
/* departure approval asked by a neighbouring aerodrome's tower */
.apv { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: end; gap: 6px 10px; padding: 6px 0 2px 23px; color: var(--text); }
.apv label { display: flex; flex-direction: column; gap: 2px; font: 500 11px var(--sans); color: var(--muted); }
.apv input, .apv select { width: 7ch; min-height: 30px; padding: 0 6px; font: 500 13px var(--mono); color: var(--text); background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r); }
.apv input[name="time"] { width: 7ch; }
.apv select { width: 10ch; }
.apv input[name="freq"] { width: 8ch; }
.apv button { min-height: 32px; padding: 0 12px; font: 600 13px var(--mono); color: var(--text); background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.apv button.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.apv :disabled { opacity: 0.5; cursor: default; }
.strip .recall { min-height: 24px; font: 600 12px var(--mono); color: var(--text); background: var(--panel-3); border: 1px solid var(--accent); border-radius: 3px; padding: 0 10px; cursor: pointer; }
.strip .recall:hover { background: var(--accent); color: var(--accent-ink); }
.fixes .fx.omit { border-color: var(--c-warn); color: var(--c-warn); }
#selected .omitted { color: var(--c-warn); }
:is(#log, #coord-log) .sys .lvl { flex: none; width: 15px; height: 15px; align-self: center; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px 10px;
  padding: 8px 12px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint);
}
.stats-box { flex: none; border-top: 1px solid var(--line); }
.stats-box > summary { cursor: pointer; padding: 7px 12px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); list-style: none; display: flex; justify-content: space-between; }
.stats-box > summary::-webkit-details-marker { display: none; }
.stats-box > summary::after { content: "+"; font: 500 13px var(--mono); color: var(--faint); }
.stats-box[open] > summary::after { content: "−"; }
.stats-box .stats { border-top: 0; padding-top: 2px; }
.txbar.off {
  position: absolute !important; left: 50% !important; bottom: 12px !important; transform: translateX(-50%) !important;
  width: min(780px, calc(100% - 24px)) !important;
  background: transparent !important; border: none !important; padding: 0 !important;
  pointer-events: none; z-index: 25;
}
.txbar.off .tx-row { display: none !important; }
.txbar.off .lastline:not([hidden]) { pointer-events: auto; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45); }
.stats span { display: flex; justify-content: space-between; gap: 6px; }
.stats b { font: 500 12px var(--mono); color: var(--muted); }
.stats .bad b { color: var(--alert-text); }

/* ---------- transmission bar ---------- */
@media (min-width: 1280px) {
  .scope { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  #radar { position: relative; inset: auto; grid-row: 1; }
  .txbar { position: static !important; transform: none !important; width: auto !important; grid-row: 2; padding: 8px 12px; background: var(--shell); border-top: 1px solid var(--shell-line); }
  .txbar .tx-row { max-width: 900px; width: 100%; margin: 0 auto; box-shadow: none; }
}
.txbar {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  width: min(780px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 6px;
}
.lastline {
  margin: 0; align-self: center; max-width: 100%; padding: 4px 12px; border-radius: var(--r);
  background: var(--overlay); border: 1px solid var(--line); font-size: 14px; color: var(--ok);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lastline.warn { color: var(--warn-text); } .lastline.alert { color: var(--alert-text); }
.tx-row {
  position: relative; display: flex; gap: 8px; align-items: stretch;
  padding: 8px; background: var(--overlay-shell); border: 1px solid var(--shell-line); border-radius: 6px; box-shadow: var(--shadow);
}
.ptt {
  flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 104px; min-height: 64px; border-radius: var(--r);
  background: var(--shell-2); border: 1px solid var(--shell-muted); color: var(--shell-text); cursor: pointer;
  font: 600 11px var(--sans); letter-spacing: 0.08em;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.ptt .i { width: 22px; height: 22px; }
.ptt:hover { background: var(--ptt-hover); }
.ptt.live { background: var(--ptt-live); border-color: var(--c-los); color: var(--bright); }
.ptt:disabled { opacity: 0.45; cursor: not-allowed; }
.tx-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.heard {
  min-height: 26px; padding: 2px 4px; font: 15px var(--mono); color: var(--bright);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.heard .hint { font: 14px var(--sans); color: var(--shell-muted); }
.heard.live { color: var(--heard-live); }
.typed { display: flex; gap: 6px; }
.typed input {
  flex: 1; min-width: 0; min-height: 32px; padding: 0 10px; border-radius: var(--r);
  background: var(--scope); border: 1px solid var(--shell-line); font: 14px var(--mono); color: var(--bright);
}
.typed input::placeholder { color: var(--placeholder); }
.tx-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tx-top .heard { flex: 1; min-width: 0; }
.engine { flex: none; font: 11px var(--mono); color: var(--shell-muted); text-align: right; white-space: nowrap; }
.ptt .vu { width: 80%; height: 4px; border-radius: 2px; background: rgb(0 0 0 / 0.35); overflow: hidden; margin-top: 2px; }
.ptt .vu i { display: block; height: 100%; width: 0%; background: var(--c-onfreq); transition: width 60ms linear; }
.ptt.live .vu i { background: var(--bright); }
.engine-time { display: block; margin-top: 2px; }
.engine-time:empty { display: none; }

/* ---------- selected aircraft ---------- */
.selected {
  position: absolute; top: 52px; left: 12px; padding: 10px 12px; width: 286px;
  background: var(--overlay-panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); font-size: 13px;
}
.selected h3 { margin: 0 0 6px; display: flex; align-items: baseline; gap: 8px; font: 600 16px var(--mono); color: var(--accent); }
.selected h3 small { font: 13px var(--mono); color: var(--muted); }
.selected h3 .ic { margin-left: auto; width: 26px; min-height: 26px; background: transparent; border-color: transparent; color: var(--muted); }
.selected dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; }
.selected dt { color: var(--faint); }
.selected dd { margin: 0; font-size: 14px; color: var(--text); }

/* ---------- label menu ---------- */
.lmenu {
  position: absolute; z-index: 5; width: 262px; max-height: calc(100% - 16px); overflow: auto;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow);
  font-size: 14px;
}
.lmenu.in { animation: menu-in 160ms var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: scale(0.96); } }
.lmenu header { display: flex; align-items: baseline; gap: 8px; padding: 8px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.lmenu header b { font: 600 15px var(--mono); color: var(--accent); }
.lmenu header span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lmenu header .ic { margin-left: auto; width: 28px; min-height: 28px; background: transparent; border: 0; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.lmenu header .ic svg { width: 16px; height: 16px; }
.lmenu .note { margin: 0; padding: 8px 12px; color: var(--c-warn); font-size: 13px; }
.lmenu .body { padding: 6px; }
.lmenu .body[inert] { opacity: 0.4; }
.lmenu h4 { margin: 8px 6px 6px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; }
.lmenu h4 small { text-transform: none; letter-spacing: 0; font: 500 12px var(--sans); color: var(--ok); }
.lmenu .hint { margin: 6px 6px 0; font: 13px var(--mono); color: var(--muted); }
.lmenu button { cursor: pointer; }
.lmenu .list { display: flex; flex-direction: column; }
.lmenu .row {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 10px; border: 0; border-radius: var(--r);
  background: transparent; text-align: left; color: var(--text);
}
.lmenu .row:hover, .lmenu .row:focus-visible { background: var(--panel-3); }
.lmenu .row .v { margin-left: auto; font: 13px var(--mono); color: var(--muted); }
.lmenu .row .chev { width: 14px; height: 14px; transform: rotate(180deg); color: var(--faint); }
.lmenu .row.primary { color: var(--accent); font-weight: 600; }
.lmenu .row.xfer { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); color: var(--ok); }
.lmenu .back { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 8px 0 4px; border: 0; background: transparent; color: var(--muted); border-radius: var(--r); }
.lmenu .back svg { width: 14px; height: 14px; }
/* the control panel: a small heading dial, level and speed rubans, one part at a time (two from the callsign),
   the extras behind +, composed then sent as one transmission */
.lmenu.compose { width: 252px; }
.lmenu.compose:has(.cols.two) { width: 278px; }
.lmenu.compose .body { padding: 5px; }
.lmenu .ph { gap: 4px; padding: 4px 4px 4px 10px; align-items: center; }
.lmenu .ph b { margin-right: auto; font-size: 14px; }
.lmenu .ph .tabs { display: flex; gap: 2px; }
.lmenu .ph .tabs button, .lmenu .ph .plus {
  min-height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  color: var(--muted); font: 600 11px var(--sans); letter-spacing: 0.04em; width: auto; margin: 0;
}
.lmenu .ph .plus { width: 26px; padding: 0; font: 600 15px var(--mono); }
.lmenu .ph .tabs button.sel, .lmenu .ph .plus.sel { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }
.lmenu .ph .ic:last-child { margin-left: 0; width: 26px; min-height: 26px; }
.lmenu .cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; justify-items: stretch; }
.lmenu .cols.two { grid-template-columns: 140px minmax(0, 1fr); }
.lmenu .col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lmenu .col[hidden] { display: none; }
.lmenu .col-nav { align-items: center; }
.lmenu .col-nav .seg { width: 140px; }
.lmenu .col h4, .lmenu .more h4 { margin: 4px 2px 0; }
.lmenu .seg { display: flex; gap: 2px; }
.lmenu .seg button {
  flex: 1; min-width: 0; min-height: 28px; padding: 0 3px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lmenu .seg button:hover { border-color: var(--muted); }
.lmenu .seg button.sel { background: var(--on-bg); border-color: var(--accent); }
.lmenu .dial { position: relative; width: 140px; height: 140px; }
.lmenu .dialsvg { display: block; overflow: visible; touch-action: none; cursor: crosshair; border-radius: 50%; }
.lmenu .dialsvg:focus-visible { outline: 2px solid var(--c-selected); outline-offset: 2px; }
.lmenu .dial .face { fill: var(--panel); stroke: var(--line); }
.lmenu .dial .t10 { stroke: var(--scope-fix); }
.lmenu .dial .t5 { stroke: var(--scope-edge); }
.lmenu .dial text { font: 7.5px var(--mono); fill: var(--scope-fix-label); text-anchor: middle; pointer-events: none; }
.lmenu .dial text.pl { fill: var(--c-warn); font-size: 8px; }
.lmenu .dial text.pl.route { fill: var(--text); font-weight: 600; }
.lmenu .dial .arc { fill: none; stroke: var(--c-selected); stroke-width: 3; stroke-linecap: round; }
.lmenu .dial .now { stroke: var(--c-onfreq); stroke-width: 1.5; }
.lmenu .dial .tgt { stroke: var(--c-selected); stroke-width: 1.5; stroke-dasharray: 3 3; }
.lmenu .dial .knob { fill: var(--c-selected); stroke: var(--panel-2); stroke-width: 1.5; pointer-events: none; }
.lmenu .dial .rp {
  position: absolute; width: 20px; height: 20px; padding: 0; border-radius: 50%;
  background: transparent; border: 1.5px solid color-mix(in srgb, var(--c-warn) 55%, transparent);
}
.lmenu .dial .rp.route { border-color: color-mix(in srgb, var(--text) 60%, transparent); }
.lmenu .dial .rp:hover { background: color-mix(in srgb, var(--c-warn) 22%, transparent); }
.lmenu .dial .rp.sel { background: color-mix(in srgb, var(--c-warn) 40%, transparent); border-color: var(--c-warn); }
.lmenu .dial .rd { position: absolute; left: 40px; top: 50px; width: 60px; height: 40px; padding: 0; text-align: center; background: transparent; border: 0; border-radius: 50%; }
.lmenu .dial .rd:hover small { text-decoration: underline; }
.lmenu .dial .rd b { display: block; font: 600 18px var(--mono); line-height: 1.1; color: var(--c-onfreq); }
.lmenu .dial .rd b.new { color: var(--bright); }
.lmenu .dial .rd b.dct { color: var(--c-warn); font-size: 14px; }
.lmenu .dial .rd small { font: 9.5px var(--mono); color: var(--c-selected); white-space: nowrap; }
.lmenu .pts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.lmenu .pts button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 2px; min-height: 28px; padding: 0 4px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--c-warn); font: 11px var(--mono);
}
.lmenu .pts button.route { color: var(--text); border-color: var(--line-2); }
.lmenu .pts button small { font-size: 9.5px; color: var(--faint); }
.lmenu .pts button:hover { border-color: var(--muted); }
.lmenu .pts button.sel { border-color: var(--c-warn); background: var(--strip-mon); color: var(--bright); }
.lmenu .rib {
  display: flex; flex-direction: column; gap: 1px; height: 172px; overflow-y: auto; padding: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); scrollbar-width: thin;
}
.lmenu .rib button {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 28px; padding: 0 4px;
  border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--muted); font: 14px var(--mono);
}
.lmenu .rib button:hover { background: var(--panel-3); color: var(--text); }
.lmenu .rib button.afl { color: var(--c-onfreq); }
.lmenu .rib button.cur { color: var(--accent); border-color: var(--line-2); }
.lmenu .rib button.par::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.lmenu .rib button.over { color: var(--faint); }
.lmenu .rib button small { font: 9.5px var(--mono); color: var(--faint); }
.lmenu .rib button.sel { background: var(--sel-bg); border-color: var(--accent); color: var(--bright); font-weight: 600; }
.lmenu .rib button.perf { color: var(--faint); opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.lmenu .col .par-key, .lmenu .col-speed .now { margin: 0 2px; font: 11px var(--mono); color: var(--muted); }
.lmenu .col .par-key { color: var(--ok); }
.lmenu .more { margin-top: 6px; padding-top: 4px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.lmenu .more[hidden] { display: none; }
.lmenu .fpm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.lmenu .fpm button { min-height: 28px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text); font: 12px var(--mono); }
.lmenu .fpm button:hover { border-color: var(--muted); }
.lmenu .fpm button.sel { background: var(--on-bg); border-color: var(--accent); }
.lmenu .acts { display: flex; flex-wrap: wrap; gap: 3px; }
.lmenu .acts button { min-height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text); font-size: 12px; }
.lmenu .acts button:hover { border-color: var(--muted); }
.lmenu .tx { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.lmenu .tx .phrase { margin: 0 2px; font: 12px/1.4 var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmenu .tx .phrase.empty { color: var(--faint); font-family: var(--sans); }
.lmenu .txb { display: flex; gap: 4px; }
.lmenu .txb button { min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--muted); }
.lmenu .txb .send { flex: 1; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.lmenu .txb .send:hover { background: var(--primary-hover); }
.lmenu .txb .send:disabled { background: var(--panel-3); color: var(--faint); cursor: default; }
.lmenu .txb .xfer { color: var(--ok); border-color: var(--ok-line); font: 12px var(--mono); }
@media (pointer: coarse) {
  .lmenu .seg button, .lmenu .fpm button, .lmenu .pts button, .lmenu .rib button, .lmenu .acts button { min-height: 36px; }
  .lmenu .ph .tabs button, .lmenu .ph .plus, .lmenu .ph .ic:last-child { min-height: 34px; }
  .lmenu .ph .plus, .lmenu .ph .ic:last-child { width: 34px; }
  .lmenu .txb button { min-height: 42px; }
}
}
.lmenu .back:hover { color: var(--text); }
.levels { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; padding: 0 2px; }
.levels .lv {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--r);
  background: transparent; font: 15px var(--mono); color: var(--text); text-align: left;
}
.levels .lv:hover, .levels .lv:focus-visible { background: var(--panel-3); }
.levels .lv.par::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-left: auto; }
.levels .lv.over { color: var(--faint); }
.levels .lv.afl { color: var(--bright); }
.levels .lv.cur { border-color: var(--accent); color: var(--accent); }
.levels .lv small { font: 11px var(--mono); color: var(--faint); }
.par-key { color: var(--ok); display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.headings, .speeds { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; padding: 0 2px; }
.speeds { grid-template-columns: repeat(5, 1fr); }
.headings button, .speeds button {
  min-height: 36px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  font: 13px var(--mono); color: var(--text); padding: 0;
}
.headings button:hover, .speeds button:hover { border-color: var(--muted); }
.headings .cur, .speeds .cur { border-color: var(--accent); color: var(--accent); }
/* values outside the aircraft's performance now: shown, not choosable */
.levels .lv.perf, .speeds button.perf { color: var(--faint); opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.levels .lv.perf:hover, .speeds button.perf:hover { background: transparent; border-color: var(--line); }
.levels .lv.perf:hover { border-color: transparent; }
.lmenu .turn { display: flex; margin: 0 2px 6px; }
.lmenu .turn button { flex: 1; min-height: 32px; background: var(--panel); border-color: var(--line); color: var(--text); font-size: 13px; }
.lmenu .turn button.on { background: var(--on-bg); border-color: var(--accent); }
.fixes { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 2px 4px; }
.fixes .fx {
  display: inline-flex; align-items: baseline; gap: 5px; min-height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font: 13px var(--mono); color: var(--text);
}
.fixes .fx small { font-size: 11px; color: var(--faint); }
.fixes .fx:hover { border-color: var(--muted); }
.fixes .fx.cur { border-color: var(--accent); }
.fixes .fx.wide { flex: 1 1 45%; justify-content: center; }

/* ---------- popover ---------- */
.pop {
  margin: 0; inset: auto; position: fixed; top: 58px; right: 14px; width: 300px; max-height: calc(100vh - 80px); overflow-y: auto; padding: 10px 12px 12px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow);
}
.pop:popover-open { animation: menu-in 160ms var(--ease); }
.pop h3 { margin: 6px 0 4px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.chk { display: flex; align-items: center; gap: 10px; min-height: 34px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.field { display: inline-flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

/* ---------- dialogs ---------- */
.dlg {
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  padding: 22px 24px; width: min(600px, calc(100% - 24px));
}
.dlg::backdrop { background: var(--backdrop); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlg h1 { margin: 0; font: 600 22px var(--sans); letter-spacing: 0.02em; color: var(--bright); }
.dlg h2 { margin: 0 0 12px; font: 600 18px var(--sans); }
.dlg .lead { margin: 4px 0 18px; color: var(--muted); }
.dlg fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 14px; padding: 10px 14px 12px; }
.dlg legend { color: var(--muted); font-size: 13px; padding: 0 4px; }
.dlg .opt { display: flex; gap: 10px; align-items: flex-start; padding: 7px 2px; cursor: pointer; color: var(--muted); }
.dlg .opt b { color: var(--text); font-weight: 600; }
.dlg .opt input { margin-top: 4px; accent-color: var(--accent); }
.dlg .row { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.dlg .note { color: var(--muted); font-size: 13px; margin: 4px 0 16px; max-width: 70ch; }
.dlg .actions { display: flex; justify-content: flex-end; gap: 8px; }
#setup .actions { position: sticky; bottom: -1px; z-index: 2; margin: 0 -24px -24px; padding: 12px 24px; background: var(--panel); border-top: 1px solid var(--line); }
.dlg .opt input[type=radio] { width: 18px; height: 18px; accent-color: var(--c-selected); }
.emerg-set.off .area-list { opacity: 0.45; }
.dlg .btn:not(.primary) { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.dlg .seg button { background: var(--panel-2); border-color: var(--line); color: var(--muted); min-height: 28px; }
.dlg .seg button.on { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }

/* scenario picker (setup) and save dialog */
.scen-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.scen-row .grow { flex: 1 1 260px; }
.scen-row .grow select { width: 100%; }
.scen-set .scen-only { margin-top: 10px; }
.dlg:not(.with-scenario) .scen-only { display: none; }
.scen-set .replay-only { margin-top: 10px; }
.dlg:not(.with-replay) .replay-only { display: none; }
.dlg.with-scenario .free-field { display: none; }
.scen-brief { margin-top: 10px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); }
.scen-brief p { margin: 0 0 4px; color: var(--text); font-size: 14px; line-height: 1.45; }
.scen-brief .meta { margin: 0; color: var(--muted); font: 12px var(--mono); }
.dlg fieldset:disabled { opacity: 0.4; }
.dlg.narrow { width: min(520px, calc(100% - 24px)); }
.dlg .field { display: flex; margin-bottom: 12px; }
.dlg textarea, .dlg input:not([type]) { font: 14px var(--sans); color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; resize: vertical; }
.d-obj { margin-bottom: 18px; }
.d-obj li { display: flex; align-items: baseline; gap: 10px; }
.d-obj .sev { font: 600 14px var(--mono); width: 18px; }
.d-obj li.ok .sev { color: var(--ok); } .d-obj li.bad .sev { color: var(--c-los); } .d-obj li.low .sev { color: var(--c-warn); } .d-obj li.dim .sev { color: var(--faint); }
.d-obj small { color: var(--muted); }
.d-verdict { margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-mark { font: 600 16px var(--sans); padding: 2px 10px; border-radius: var(--r); border: 1px solid var(--line); }
.d-mark.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 55%, transparent); }
.d-mark.bad { color: var(--alert-text); border-color: color-mix(in oklab, var(--c-los) 55%, transparent); }
.d-mark.none { color: var(--muted); }
.d-elim { margin: 0 0 8px; color: var(--alert-text); }
.d-obj-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.d-assess { display: inline-flex; gap: 4px; }
.d-assess .btn { min-height: 26px; padding: 0 8px; font-size: 12px; }
.d-assess .btn.on { border-color: var(--accent); color: var(--accent); }
@media print { .d-assess .btn:not(.on) { display: none; } }

/* ---------- tablet and narrow screens: strips and radio become side drawers ---------- */
@media (max-width: 1279px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: 1fr; grid-template-areas: "scope"; }
  .drawer-only { display: inline-flex; }
  span.sep.drawer-only { display: block; }
  .panel {
    position: fixed; top: var(--rail-h, 56px); bottom: 0; z-index: 10; width: min(360px, 88vw);
    box-shadow: var(--shadow); transition: transform 220ms var(--ease), visibility 0s linear 220ms; visibility: hidden;
  }
  .panel.open { transform: none; visibility: visible; transition: transform 220ms var(--ease); }
  .strips { left: 0; border-left: 0; border-right: 1px solid var(--line); border-bottom: 0; transform: translateX(-100%); }
  .comms { right: 0; transform: translateX(100%); }
  .clock { font-size: 18px; }
  .station span { font-size: 12px; }
}
@media (min-width: 1280px) { .lastline { display: none; } }
@media (max-width: 1279px) {
  .rail { gap: 10px; padding: 6px 10px; }
  .tools { gap: 4px; }
  .btn.ic { width: 30px; }
  .seg button { min-width: 30px; padding: 0 6px; }
  .seg-label { display: none; }
  .sep { margin: 0 2px; }
  .drawer-only span:not(.badge) { display: none; }
  .btn.drawer-only { width: 38px; padding: 0; position: relative; }
  .btn.drawer-only .badge { position: absolute; top: -5px; right: -5px; }
  .clock { margin: 0 auto 0 4px; font-size: 18px; }
  .facts { gap: 6px; }
}
@media (max-width: 760px) {
  .rail { gap: 6px 8px; }
  .tools { width: 100%; min-width: 0; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .clock { order: -1; margin: 0 0 0 auto; }
  .drawer-pins { order: -1; display: inline-flex; gap: 4px; }
  .ptt { width: 84px; }
  .engine { display: none; }
  .selected { top: 8px; width: calc(100% - 24px); max-height: 42vh; overflow-y: auto; }
  .tool-banner { max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center; font-size: 11px; }
  .typed input, select, input, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lmenu.in, .pop:popover-open { animation: none; }
  .panel, .panel.open { transition: none; }
}

/* ---------- session options: emergencies ---------- */
.seg-radio { display: inline-flex; margin: 2px 0 8px; }
.seg-radio label { position: relative; }
.seg-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-radio span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid var(--line); margin-left: -1px; background: var(--panel-2); color: var(--muted); font-size: 13px; }
.seg-radio label:first-child span { border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.seg-radio label:last-child span { border-radius: 0 var(--r) var(--r) 0; }
.seg-radio input:checked + span { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.strip.al-id .state.alert { background: var(--accent); color: var(--scope); }

/* ---------- debrief ---------- */
.dlg.wide { width: min(980px, calc(100% - 24px)); max-height: calc(100vh - 40px); padding: 0; }
.debrief-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 18px 22px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.debrief-head .lead { margin: 4px 0 0; }
.debrief-head .actions { flex-wrap: wrap; }
#debrief-body { padding: 14px 22px 24px; }
.d-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.d-sum { width: 100%; border-collapse: collapse; font-size: 14px; }
.d-sum th, .d-sum td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.d-sum thead th { font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.d-sum .n { text-align: right; font-family: var(--mono); width: 70px; }
.d-sum td.bad { color: var(--alert-text); } .d-sum td.low { color: var(--warn-text); } .d-sum td.ok { color: var(--ok); }
.d-figs h3 { margin: 0 0 6px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.d-figs .stats { border: 0; padding: 0; }
#debrief-body .note { margin: 14px 0 6px; color: var(--faint); font-size: 13px; max-width: 75ch; }
#debrief-body section { margin-top: 22px; }
#debrief-body h2 { margin: 0 0 8px; font: 600 16px var(--sans); color: var(--bright); display: flex; align-items: baseline; gap: 10px; }
#debrief-body h2 small { font: 13px var(--sans); color: var(--faint); }
.d-list { list-style: none; margin: 0; padding: 0; }
.d-list li { padding: 8px 0 9px; border-top: 1px solid var(--line); }
.d-head { display: flex; gap: 10px; align-items: baseline; }
.d-head .t { font: 12px var(--mono); color: var(--faint); flex: none; }
.d-head b { font-weight: 500; color: var(--text); }
.sev { flex: none; font: 600 11px var(--mono); padding: 0 6px; border-radius: 3px; text-transform: uppercase; }
.sev.bad { background: var(--c-los); color: var(--scope); } .sev.low { background: var(--c-warn); color: var(--scope); } .sev.ok { background: var(--ok); color: var(--scope); }
.d-list p { margin: 3px 0 0 74px; font-size: 13px; color: var(--muted); }
.d-list p span { color: var(--faint); margin-right: 6px; }
.d-list .fix { color: var(--ok); }
.d-list .ref { font: 12px var(--mono); color: var(--faint); }
#print-area { display: none; }
@media (max-width: 760px) { .d-top { grid-template-columns: 1fr; } .d-list p { margin-left: 0; } }

/* ---------- printing the debrief (Export PDF) ---------- */
@media print {
  body.printing { display: block; overflow: visible; background: #fff; color: #111111; height: auto; }
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; font: 11pt/1.4 var(--sans); color: #111111; }
  #print-area h1 { font: 600 18pt var(--sans); margin: 0; }
  #print-area h2 { font: 600 13pt var(--sans); margin: 14pt 0 4pt; color: #111111; break-after: avoid; }
  #print-area h2 small, #print-area h3, #print-area .note, #print-area .d-head .t, #print-area .ref, #print-area .d-list p span { color: #555555; }
  #print-area .d-top { display: block; }
  #print-area table { width: 100%; border-collapse: collapse; margin: 8pt 0; }
  #print-area th, #print-area td { border-bottom: 0.5pt solid #bbbbbb; padding: 3pt 5pt; text-align: left; }
  #print-area .n { text-align: right; }
  #print-area .stats { display: flex; flex-wrap: wrap; gap: 3pt 14pt; color: #333333; }
  #print-area .stats b { margin-left: 4pt; color: #111111; }
  #print-area .d-list { list-style: none; padding: 0; }
  #print-area .d-list li { border-top: 0.5pt solid #cccccc; padding: 4pt 0; break-inside: avoid; }
  #print-area .d-list p { margin: 2pt 0 0 60pt; color: #333333; }
  #print-area .d-list .fix { color: #0b6b3a; }
  #print-area .sev { border: 0.5pt solid #333333; color: #111111; background: none; }
  #print-area .d-head b, #print-area th { color: #111111; }
  #print-area .empty { color: #555555; }
  #print-area .d-sum td.bad { color: #b00020; } #print-area .d-sum td.low { color: #8a5a00; } #print-area .d-sum td.ok { color: #0b6b3a; }
}

/* ================= scenario editor ================= */
body.editor { overflow: hidden; }
.ed-rail { gap: 14px; }
.ed-name { flex: 1 1 260px; max-width: 520px; }
.ed-name input { width: 100%; min-height: 34px; padding: 0 10px; font: 600 15px var(--sans); color: var(--bright); background: var(--shell-2); border: 1px solid var(--shell-line); border-radius: var(--r); }
.ed-rail select.btn { padding: 0 8px; }
.ed-rail label.btn { cursor: pointer; }
.ed-grid {
  display: grid; min-height: 0;
  grid-template-columns: 300px minmax(0, 1fr) 340px;
  grid-template-rows: minmax(0, 1fr) 240px;
  grid-template-areas: "set map ins" "set tl tl";
}
.ed-side { background: var(--panel); overflow-y: auto; padding: 14px 16px; min-height: 0; }
.ed-settings { grid-area: set; border-right: 1px solid var(--line); }
.ed-inspect { grid-area: ins; border-left: 1px solid var(--line); }
.ed-side h2 { margin: 0 0 12px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.ed-side .field { display: flex; margin-bottom: 10px; }
.ed-side .field.grow { flex: 1; }
.ed-side input:not([type=checkbox]), .ed-side select, .ed-side textarea {
  width: 100%; min-height: 32px; padding: 4px 8px; font: 14px var(--sans); color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
}
.ed-side input[type=number], .ed-side input[data-k=at], .ed-side input[data-k=callsign] { font-family: var(--mono); }
.ed-side textarea { resize: vertical; line-height: 1.4; }
.ed-side input:disabled { opacity: 0.5; }
.ed-side fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; padding: 8px 12px 10px; }
.ed-side legend { color: var(--muted); font-size: 13px; padding: 0 4px; }
.ed-row { display: flex; gap: 8px; }
.ed-row > .field { flex: 1 1 0; min-width: 0; }
.ed-pair { display: flex; gap: 4px; }
.ed-side .ed-pair input { flex: 1 1 0; width: auto; min-width: 0; }
.ed-settings .chk.ed-done { margin: 0 0 12px; }
/* objectives and mark (editor settings): one card per objective, its weight and eliminatory flag under it */
.ed-obj-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.ed-obj-list li { border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; background: var(--panel); }
.ed-obj-list li.custom { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.ed-obj-list li.none { color: var(--muted); font-size: 13px; border-style: dashed; }
.ed-obj-head .chk { align-items: flex-start; font-size: 13px; }
.ed-obj-k { color: var(--accent); margin-right: 6px; font-size: 10px; }
.ed-obj-head > .chk > .ed-obj-k + span, .ed-obj-head span { line-height: 1.35; }
.ed-obj-w { align-items: center; margin-top: 4px; flex-wrap: wrap; }
.ed-obj-w .field { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.ed-side .ed-obj-w .field input { width: 56px; min-height: 28px; }
.ed-obj-w .field span, .ed-obj-p .field span { font-size: 12px; color: var(--muted); }
.ed-obj-w .chk { font-size: 13px; }
.ed-obj-w .btn { margin-left: auto; min-height: 28px; padding: 2px 8px; font-size: 12px; }
.ed-obj-p { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; margin-top: 6px; }
.ed-obj-p .field { margin-bottom: 6px; min-width: 0; }
.ed-obj-p .field.wide { grid-column: 1 / -1; }
.ed-side .ed-obj-p select { min-width: 0; }
.ed-obj-p .ed-row { gap: 4px; }
.ed-obj-p .ed-row select { flex: 0 0 52px; width: 52px; }
.ed-side .ed-obj-p .ed-row input { flex: 1 1 auto; width: auto; min-width: 0; }
.ed-pass { max-width: 160px; }
.ed-obj-add { align-items: flex-end; }
.ed-obj-add .field { margin-bottom: 0; }
.ed-side .note { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.ed-side .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.ed-side .btn { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.ed-side .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--c-los) !important; }
.btn.danger:hover { border-color: var(--c-los) !important; }
.ed-add { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#ed-form.busy { opacity: 0.5; pointer-events: none; }
.ed-msg { font-size: 13px; padding: 8px 10px; border-radius: var(--r); background: var(--panel-2); border: 1px solid color-mix(in oklab, var(--ok) 45%, transparent); }
.ed-msg.bad { border-color: color-mix(in oklab, var(--c-los) 55%, transparent); }
/* the two trajectories of a conflict drawn on the map: A as the selection, B as an alert */
.swatch { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.swatch.a { background: var(--c-selected); }
.swatch.b { background: var(--c-stca); }
.ed-checks { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.ed-checks h3 { margin: 0 0 6px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.ed-checks ul { margin: 0; padding-left: 16px; }
.ed-checks li { margin: 3px 0; color: var(--muted); }
.ed-checks li.bad { color: var(--alert-text); } .ed-checks li.warn { color: var(--warn-text); }
.ed-checks .ok { color: var(--ok); margin: 0; }
.ed-map { grid-area: map; position: relative; min-height: 0; background: var(--radar-scope, var(--scope)); }
.ed-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.ed-time { position: absolute; left: 12px; top: 10px; font: 13px var(--mono); color: var(--muted); background: var(--overlay); padding: 3px 8px; border-radius: var(--r); pointer-events: none; }
.ed-time b { color: var(--c-measure); font-weight: 600; }

.ed-timeline { grid-area: tl; display: grid; grid-template-columns: minmax(0, 1fr) 420px; background: var(--panel); border-top: 1px solid var(--line); min-height: 0; user-select: none; }
.ed-timeline.vsd-hidden { grid-template-columns: minmax(0, 1fr); }
.ed-timeline.vsd-hidden .ed-vsd-deck { display: none; }
.ed-tl-deck { display: grid; grid-template-rows: 26px minmax(0, 1fr); min-height: 0; min-width: 0; }
.ed-vsd-deck { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: rgba(9, 15, 26, 0.92); min-height: 0; min-width: 0; position: relative; }
.ed-vsd-hdr { display: flex; justify-content: space-between; align-items: center; height: 26px; padding: 0 10px; border-bottom: 1px solid var(--line); font: 600 10px var(--mono); color: #7dd3fc; letter-spacing: 0.04em; }
.ed-vsd-hdr small { font-weight: 400; color: var(--muted); font-size: 10px; }
#ed-vsd-canvas { flex: 1; width: 100%; height: 100%; min-height: 0; cursor: ns-resize; display: block; }
.tl-axis { position: relative; border-bottom: 1px solid var(--line); cursor: ew-resize; }
.tl-axis .tick { position: absolute; top: 6px; transform: translateX(-50%); font: 11px var(--mono); color: var(--faint); }
.tl-rows { position: relative; overflow-y: auto; overflow-x: hidden; }
.tl-row { position: relative; height: 26px; border-bottom: 1px solid var(--line); }
.tl-row:hover { background: var(--panel-3); }
.tl-row .lbl { position: absolute; left: 10px; top: 4px; width: 152px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px var(--mono); color: var(--muted); }
.tl-row.global .lbl { color: var(--faint); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; }
.scrub { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--c-measure); opacity: 0.7; pointer-events: none; }
.tl-axis .scrub { opacity: 1; width: 2px; }
.life { position: absolute; top: 12px; height: 2px; background: rgb(95 214 232 / 0.18); pointer-events: none; }
.mk { position: absolute; top: 1px; width: 24px; height: 24px; margin-left: -12px; padding: 0; border: 0; background: transparent; cursor: grab; }
.mk::before { content: ""; position: absolute; inset: 5px; }
.mk.ac::before { border-radius: 50%; background: var(--accent); }
.mk.ac.locked { cursor: pointer; }
.mk.ac.locked::before { background: transparent; border: 2px solid var(--accent); }
.mk.ev::before { inset: 7px; transform: rotate(45deg); background: var(--c-warn); }
.mk.cf { cursor: pointer; color: var(--c-stca); font: 700 15px/24px var(--mono); }
.mk.cf.bad { color: var(--c-los); }
.mk.cf::before { display: none; }
.mk.on { outline: 2px solid var(--bright); outline-offset: 2px; border-radius: 3px; }
.tl-empty { margin: 10px 14px; color: var(--faint); font-size: 13px; }

/* phone and portrait tablet: the page scrolls, the inspector and the settings at their full height under the timeline
   (the grid kept the window's height, so both were 29 px tall) */
@media (max-width: 899px) {
  html:has(body.editor), body.editor { height: auto; }
  body.editor { min-height: 100%; }
  .ed-side { overflow: visible; }
}

/* tablet in landscape: map and inspector side by side, the settings in a drawer */
.ed-set-btn { display: none; }
@media (min-width: 900px) and (max-width: 1279px) {
  body.editor { overflow: hidden !important; }
  .ed-grid { grid-template-columns: minmax(0, 1fr) 320px !important; grid-template-rows: minmax(0, 1fr) 200px !important; grid-template-areas: "map ins" "tl tl" !important; }
  .ed-set-btn { display: inline-flex; }
  .ed-settings { position: fixed; left: 0; top: var(--rail-h, 100px); bottom: 0; z-index: 10; width: min(340px, 88vw); border-right: 1px solid var(--line) !important; box-shadow: var(--shadow); transform: translateX(-100%); visibility: hidden; transition: transform 220ms var(--ease), visibility 0s linear 220ms; }
  .ed-settings.open { transform: none; visibility: visible; transition: transform 220ms var(--ease); }
  .ed-inspect { border-left: 1px solid var(--line) !important; border-top: 0 !important; }
}
@media (max-width: 1279px) {
  body.editor { overflow: auto; }
  .ed-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: 55vh 240px auto auto; grid-template-areas: "map" "tl" "ins" "set"; }
  .ed-settings, .ed-inspect { border: 0; border-top: 1px solid var(--line); }
  .ed-rail { flex-wrap: wrap; }
  .ed-rail .tools { width: 100%; justify-content: flex-start; flex-wrap: wrap; row-gap: 8px; }
  .ed-rail #ed-open { flex: 1 1 140px; min-width: 0; }
  .ed-name { flex-basis: 100%; max-width: none; }
}

/* voice and radio settings (setup) */
.voice-set .chk { flex: 1 1 100%; min-height: 30px; }
.voice-set .note { flex: 1 1 100%; margin: 0; font-size: 13px; }
.voice-set .note:empty { display: none; }

/* expert controller */
.expert-set .field { flex: 1 1 100%; }
.expert-set .field select { flex: 1; min-width: 0; }
.expert-set .note { flex: 1 1 100%; margin: 0; font-size: 13px; }
#t-expert.on { color: var(--bright); border-color: var(--accent); background: var(--on-bg); }
:is(#log, #coord-log) .tx.expert .src { color: var(--accent); }
:is(#log, #coord-log) .why { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
:is(#log, #coord-log) .why b { color: var(--text); font-weight: 600; }
.lmenu .adv { padding: 10px 12px 12px; display: grid; gap: 8px; }
.lmenu .adv h4 { margin: 0; }
.lmenu .adv .said { margin: 0; font: 13px var(--mono); color: var(--text); }
.lmenu .adv .why { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.lmenu .adv .btn { justify-self: start; }
.cmp { margin: 0 0 18px; }
.cmp table { border-collapse: collapse; width: 100%; max-width: 560px; font-size: 13px; }
.cmp th, .cmp td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.cmp td.n, .cmp th.n { text-align: right; font-family: var(--mono); }
.cmp td.better { color: var(--bright); font-weight: 600; }
.cmp h3 { margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.cmp table.rules { max-width: 760px; }
.cmp .rules td.ref { color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) { .cmp .rules td.ref { white-space: normal; } }
/* problems of the exercise (debrief) */
.pb { margin: 0 0 18px; }
.pb .lead { margin: 4px 0 10px; font-weight: 600; }
.pb-t { border-collapse: collapse; width: 100%; font-size: 13px; }
.pb-t th, .pb-t td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pb-t td.n, .pb-t th.n { text-align: right; font-family: var(--mono); }
.pb-t small { color: var(--muted); }
.pb-t tr.bad td.n { color: var(--alert-text); font-weight: 600; }
@media (max-width: 640px) { .pb-t { font-size: 12px; } .pb-t th, .pb-t td { padding: 4px 5px; } }

/* ---------- coaching mode: the expert's proposal, the instructor's answer ---------- */
.coach {
  position: absolute; z-index: 6; top: 40px; right: 12px; width: min(400px, calc(100% - 24px)); max-height: calc(100% - 120px); overflow: auto;
  padding: 12px 14px; background: var(--overlay-panel); border: 1px solid var(--accent); border-radius: 6px; box-shadow: var(--shadow); font-size: 14px;
}
.coach h4 { margin: 0 0 4px; font: 600 15px var(--sans); color: var(--accent); }
.coach .geo, .cases .geo { margin: 0 0 8px; font: 12px var(--mono); color: var(--muted); }
.coach .said { margin: 6px 0; font: 14px var(--mono); color: var(--bright); }
.coach .said.dim { color: var(--muted); }
.coach .why { margin: 4px 0; color: var(--text); font-size: 13px; }
.coach .note { margin: 6px 0; color: var(--muted); font-size: 13px; }
.coach .coach-tx { margin: 6px 0; padding-left: 18px; font: 13px var(--mono); color: var(--ok); }
.coach .field { display: flex; width: 100%; margin-top: 6px; }
.coach textarea { width: 100%; resize: vertical; background: var(--scope); color: var(--text); border: 1px solid var(--line); border-radius: 4px; font: 14px var(--sans); padding: 6px; }
.coach .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cases .d-head .btn { margin-left: auto; min-height: 28px; }
#cases-filter { min-height: 34px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
#cases-list li { padding-left: 10px; padding-right: 10px; }
#cases-list li p { margin: 4px 0 0; }
.coach .strat { margin: 0 0 8px; font-size: 12px; color: var(--accent); }

/* editor inspector: route tools */
.ed-route-tools { margin: 2px 0 10px; flex-wrap: wrap; }
.ed-route-tools .btn { flex: 0 0 auto; }

/* ---------- start window in landscape: the sections in columns (3 on a computer, 2 on a tablet, 1 on a phone) ---------- */
#setup { width: min(860px, calc(100% - 24px)); max-height: calc(100dvh - 24px); }
#setup-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 16px; align-items: start; }
#setup-form > .dlg-head, #setup-form > .lead, #setup-form > .scen-set, #setup-form > .areas-set, #setup-form > .note, #setup-form > .actions { grid-column: 1 / -1; }
#setup-form > fieldset { min-width: 0; }
#setup .field select, .set-panel .field select { max-width: 100%; }
#setup .row > .field, .set-panel .row > .field { min-width: 0; max-width: 100%; }
#setup .area-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- settings during the session: a side panel, the scope stays visible and the session goes on ---------- */
.set-panel {
  position: fixed; right: 0; top: var(--rail-h, 56px); bottom: 0; z-index: 30; width: min(400px, 92vw); overflow-y: auto;
  background: var(--panel); color: var(--text); border-left: 1px solid var(--line); box-shadow: var(--shadow); padding: 14px 16px 24px;
}
.set-panel[hidden] { display: none; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.set-head h2 { margin: 0; font: 600 17px var(--sans); color: var(--bright); }
.set-panel .note { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.set-panel fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; padding: 10px 12px 12px; min-width: 0; }
.set-panel legend { color: var(--muted); font-size: 13px; padding: 0 4px; }
.set-panel .row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.set-panel .field { display: flex; margin-bottom: 8px; }
.set-panel .area-list { display: grid; grid-template-columns: 1fr; gap: 0; }
.set-panel .btn:not(.primary) { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.set-panel fieldset.off .area-list { opacity: 0.5; }
#t-settings.on { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }
#setup { padding-bottom: 0; }
#setup .actions { margin: 0 -24px; bottom: 0; }

/* ---------- video of the session ---------- */
#t-rec { gap: 6px; font-variant-numeric: tabular-nums; }
#t-rec .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-los); display: inline-block; }
#t-rec.rec-on { border-color: var(--c-los); color: var(--bright); }
#t-rec.rec-on .rec-dot { animation: rec-blink 1s steps(2, start) infinite; }
@keyframes rec-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { #t-rec.rec-on .rec-dot { animation: none; } }

/* ---------- help: menu and guided tour ---------- */
.help-pop { display: none; flex-direction: column; gap: 6px; padding: 10px; min-width: 220px; }
.help-pop:popover-open { display: flex; }
.help-pop .btn { justify-content: flex-start; text-decoration: none; }
.tour { position: fixed; inset: 0; z-index: 100; }
.tour-hole { position: fixed; border-radius: 8px; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.6); outline: 2px solid var(--accent); transition: all 200ms var(--ease); pointer-events: none; }
.tour-card { position: fixed; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 16px 16px 12px; }
.tour-card h3 { margin: 0 32px 6px 0; font: 600 16px var(--sans); color: var(--bright); }
.tour-txt { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-n { margin-right: auto; color: var(--muted); font: 12px var(--mono); }
.tour-x { position: absolute; top: 8px; right: 8px; }
.tour-card .btn:not(.primary) { background: var(--panel-2); border-color: var(--line); color: var(--text); }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }

/* ---------- e-strips like paper strips (Settings): cells, struck values, a tint by kind of flight ---------- */
:root { --paper-arr: #2c2817; --paper-dep: #172638; --paper-ovf: #1b2b20; --paper-ink: #e8e3d4; --paper-faint: #a9a491; --paper-line: #4c4b41; }
:root[data-theme="light"] { --paper-arr: #b4aa86; --paper-dep: #95a5b7; --paper-ovf: #a1b09a; --paper-ink: #0a0e0c; --paper-faint: #2c322f; --paper-line: #5c635f; }
#strips .bay { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; margin: 6px 0 4px; padding: 4px 6px; font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--panel); border-bottom: 1px solid var(--line); }
#strips .bay span { font: 500 12px var(--mono); color: var(--text); }
.strip.paper {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr) minmax(0, 0.9fr); gap: 0; padding: 0; margin-bottom: 3px;
  border: 1px solid var(--paper-line); border-left: 6px solid var(--paper-line); border-radius: 2px;
  color: var(--paper-ink); font: 12px/1.3 var(--mono); background: var(--paper-ovf);
}
.strip.paper.k-arr { background: var(--paper-arr); }
.strip.paper.k-dep { background: var(--paper-dep); }
.strip.paper > div { padding: 1px 5px; border-right: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.strip.paper .p-id .cs { display: inline; font: 600 14px/1.15 var(--mono); color: var(--paper-ink); }
.strip.paper .p-id span, .strip.paper .p-od { color: var(--paper-faint); }
.strip.paper .p-lv { border-right: 0; text-align: right; font-size: 13px; }
.strip.paper .p-lv small, .strip.paper .p-pt small { color: var(--paper-faint); font-size: 10px; }
.strip.paper s { color: var(--paper-faint); text-decoration-thickness: 1.5px; }
.strip.paper b { font-weight: 600; }
.strip.paper .p-pts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; border-right: 0; }
.strip.paper .p-pt { padding: 1px 2px; text-align: center; border-right: 1px solid var(--paper-line); white-space: nowrap; overflow: hidden; font-size: 11px; letter-spacing: -0.02em; }
.strip.paper .p-pt:last-child { border-right: 0; }
.strip.paper .p-ins { border-bottom: 0; }
.strip.paper .p-xf { grid-column: 2 / -1; border-right: 0; border-bottom: 0; text-align: right; color: var(--paper-faint); }
.strip.paper .tags { grid-column: 1 / -1; padding: 2px 5px; margin: 0; border-top: 1px solid var(--paper-line); white-space: normal; }
.strip.paper.inbound { opacity: 0.85; }
.strip.paper.calling { border-left-color: var(--c-selected); }
.strip.paper.sel { outline: 2px solid var(--c-selected); outline-offset: -1px; }
.strip.paper.al-los, .strip.paper.al-wake { border-left-color: var(--c-los); }
.strip.paper.al-stca { border-left-color: var(--c-stca); }
.strip.paper.al-mon { border-left-color: var(--c-monitor); }

/* ---------- the clock in the scope, top left (computer and tablet) ---------- */
.clock.in-scope { position: absolute; top: 8px; left: 10px; z-index: 3; margin: 0; padding: 2px 10px; font: 500 22px var(--mono);
  border-radius: var(--r); background: var(--overlay); border: 1px solid var(--line); color: var(--bright); pointer-events: none; }

/* ---------- toolbar: Cases, Help and REC as icons (name on hover); preferences in the Settings panel ---------- */
.btn.ic-only { width: 34px; padding: 0; position: relative; }
.btn.ic-only > span:not(.badge) { display: none; }
#t-cases.ic-only .badge { position: absolute; top: -5px; right: -5px; }
#t-rec.ic-only.rec-on { width: auto; padding: 0 8px; }
#t-rec.ic-only.rec-on > span { display: inline; }
.set-panel .prefs-set { display: grid; gap: 6px; }
.set-panel .pref { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--text); }
.set-panel .pref .seg button { min-height: 30px; }
.field.area-op .range { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.field.area-op input[type=range] { accent-color: var(--accent); width: 140px; }
.field.area-op output { font: 13px var(--mono); color: var(--text); min-width: 42px; }

/* ---------- ergonomic upgrades: pause pill, tool banner, lmenu quick bar, live inject, editor tools ---------- */
.clock { display: inline-flex; align-items: center; gap: 8px; }
.clock.in-scope { pointer-events: auto; }
.clock.paused { border-color: var(--c-warn); }
.pause-pill {
  font: 600 11px var(--mono); letter-spacing: 0.06em; padding: 2px 7px; border-radius: 3px;
  background: var(--c-warn); color: var(--scope); border: 0; cursor: pointer;
}
.pause-pill:hover { filter: brightness(1.1); }
.tool-banner {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4;
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px;
  background: var(--overlay-panel); border: 1px solid var(--c-measure); border-radius: 6px; box-shadow: var(--shadow);
  font: 12px var(--mono); color: var(--c-measure);
}
.tool-banner .btn { min-height: 24px; padding: 0 8px; font-size: 11px; }
.lmenu .qbar { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); }
.lmenu .qbar button {
  flex: 1 1 auto; min-height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--text); font: 500 12px var(--sans);
}
.lmenu .qbar button:hover { border-color: var(--accent); color: var(--bright); }
.lmenu .qbar button.on { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }
.inject-set .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.inject-set .acts .btn { min-height: 28px; font-size: 12px; padding: 0 8px; }
.ed-time { display: inline-flex; align-items: center; gap: 8px; pointer-events: auto; }
.ed-play { min-height: 24px; padding: 0 8px; font: 600 11px var(--mono); }
.ed-play.on { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }
.ed-map-tools {
  position: absolute; top: 10px; right: 12px; z-index: 4; display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.ed-map-tools .btn { min-height: 28px; padding: 0 8px; font-size: 12px; background: var(--overlay-panel); border-color: var(--line); }
.ed-map-tools .btn.on { background: var(--on-bg); border-color: var(--accent); color: var(--bright); }
.ed-mode-banner {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 4;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: var(--overlay-panel); border: 1px solid var(--accent); border-radius: 6px; box-shadow: var(--shadow);
  font: 13px var(--sans); color: var(--bright);
}
.ed-mode-banner .btn { min-height: 26px; padding: 0 8px; font-size: 12px; }
.ed-settings details { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 10px; padding: 6px 10px 8px; }
.ed-settings details > summary { cursor: pointer; font: 600 13px var(--sans); color: var(--bright); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ed-settings details > summary::after { content: "+"; font: 500 14px var(--mono); color: var(--muted); }
.ed-settings details[open] > summary { margin-bottom: 8px; }
.ed-settings details[open] > summary::after { content: "−"; }
.ed-bulk { width: min(640px, calc(100% - 24px)); }
.ed-bulk textarea { width: 100%; font: 12px/1.4 var(--mono); }

.drawer-pins { display: inline-flex; gap: 4px; align-items: center; }
@media (min-width: 1280px) and (max-width: 1440px) {
  .rail { gap: 8px; padding: 6px 10px; }
  .tools { gap: 3px; }
  .btn, .seg button { padding: 0 8px; }
}
@media (max-width: 899px) {
  .ed-map-tools { top: 46px; right: 8px; left: 8px; justify-content: flex-start; }
  .ed-map-tools .btn { min-height: 26px; padding: 0 6px; font-size: 11px; }
}


/* ---------- Target Inspector Aircraft Card (#selected) & CPDLC Datalink Console ---------- */
.selected {
  position: absolute; top: 48px; left: 10px; z-index: 4;
  width: 332px; max-height: calc(100vh - 118px); overflow-y: auto;
  padding: 0; background: var(--overlay-panel);
  border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.62); font-size: 12.5px;
  scrollbar-width: thin;
}
.fr24-hdr {
  padding: 9px 11px 8px;
  background: linear-gradient(135deg, #1b313b 0%, #102027 100%);
  border-bottom: 2px solid #f0b429;
}
.fr24-hdr-main {
  display: flex; align-items: center; gap: 7px;
}
.fr24-cs {
  font: 700 18px var(--mono); color: #ffd24c; letter-spacing: 0.03em;
}
.fr24-fn {
  padding: 1px 6px; border-radius: 3px;
  background: rgb(255 210 76 / 0.16); border: 1px solid rgb(255 210 76 / 0.4);
  font: 600 11.5px var(--mono); color: #ffe58f;
}
.fr24-status {
  margin-left: auto; padding: 2px 6px; border-radius: 3px;
  font: 600 10px var(--mono); letter-spacing: 0.04em;
}
.fr24-status.onfreq { background: rgb(134 217 168 / 0.18); color: var(--c-onfreq); border: 1px solid rgb(134 217 168 / 0.45); }
.fr24-status.inbound { background: rgb(143 180 255 / 0.18); color: var(--c-inbound); border: 1px solid rgb(143 180 255 / 0.45); }
.fr24-status.xferred { background: rgb(106 123 142 / 0.22); color: var(--muted); border: 1px solid var(--line); }
.fr24-close {
  width: 24px; min-height: 24px; padding: 0; margin-left: 2px;
  background: transparent; border-color: transparent; color: var(--muted);
}
.fr24-hdr-sub {
  margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.fr24-airline {
  font: 600 12.5px var(--sans); color: var(--bright);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fr24-airline small { font: 500 11px var(--mono); color: var(--muted); }
.fr24-badges { display: inline-flex; gap: 4px; flex: none; }
.fr24-badges b {
  padding: 1px 5px; border-radius: 3px; font: 600 10px var(--mono);
}
.fr24-badges .b-cpdlc { background: rgb(62 159 176 / 0.24); color: #7ce8ff; border: 1px solid rgb(95 214 232 / 0.45); }
.fr24-badges .b-adsb { background: rgb(255 255 255 / 0.07); color: var(--muted); border: 1px solid var(--line); }

.fr24-ac-bar {
  display: flex; align-items: center; gap: 9px; padding: 7px 11px;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.fr24-sil { width: 44px; height: 20px; color: #f0b429; flex: none; opacity: 0.92; }
.fr24-ac-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fr24-ac-meta b { font: 600 13px var(--sans); color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr24-ac-meta small { font: 11px var(--mono); color: var(--muted); }
.fr24-ac-meta small b { font: 600 11px var(--mono); color: var(--text); }
.fr24-assume { font-size: 11.5px; min-height: 26px; padding: 0 8px; }

.fr24-route {
  display: grid; grid-template-columns: 74px 1fr 74px; align-items: center; gap: 6px;
  padding: 8px 11px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.fr24-apt { display: flex; flex-direction: column; line-height: 1.15; }
.fr24-apt.right { text-align: right; }
.fr24-iata { font: 700 20px var(--mono); color: var(--bright); letter-spacing: 0.02em; }
.fr24-icao { font: 500 10.5px var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr24-mid { display: flex; flex-direction: column; gap: 5px; }
.fr24-prog-track {
  position: relative; height: 5px; border-radius: 3px;
  background: var(--panel-3); border: 1px solid var(--line);
}
.fr24-prog-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #3e9fb0, #f0b429);
}
.fr24-plane {
  position: absolute; top: 50%; transform: translate(-50%, -52%);
  font-size: 13px; color: #ffd24c; text-shadow: 0 1px 3px #000; pointer-events: none;
}
.fr24-prog-meta {
  display: flex; justify-content: space-between; font: 10.5px var(--mono); color: var(--muted);
}
.fr24-prog-meta b { color: #ffd24c; font-weight: 600; }

.fr24-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
.fr24-cell {
  padding: 6px 9px; background: var(--panel); display: flex; flex-direction: column; gap: 2px;
}
.fr24-lbl { font: 600 9.5px var(--sans); letter-spacing: 0.06em; color: var(--faint); text-transform: uppercase; }
.fr24-val { font: 600 13.5px var(--mono); color: var(--bright); }
.fr24-val small { font: 500 11px var(--mono); color: var(--c-selected); }
.fr24-val.vs-up { color: var(--c-onfreq); }
.fr24-val.vs-dn { color: #ffd24c; }
.fr24-sub { font: 10.5px var(--mono); color: var(--muted); }
.fr24-sub b { color: var(--text); font-weight: 600; }
.fr24-sub.warn { color: var(--c-monitor); }
.fr24-bar { height: 3px; border-radius: 2px; background: var(--panel-3); overflow: hidden; margin: 1px 0; }
.fr24-bar i { display: block; height: 100%; background: var(--c-selected); }
.fr24-bar.spd i { background: #f0b429; }
.fr24-ident { padding: 0 4px; border-radius: 2px; background: var(--c-selected); color: #05181e; font-size: 10px; }

.fr24-strip-info {
  padding: 6px 10px; background: var(--panel-2); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px; font: 11.5px var(--mono); color: var(--text);
}
.fr24-strip-info span { color: var(--faint); font: 600 10px var(--sans); margin-right: 4px; }
.fr24-app-badge { padding: 0 5px; border-radius: 3px; background: rgb(134 217 168 / 0.18); color: var(--c-onfreq); }

/* ---------- CPDLC Console inside FR24 Card ---------- */
.fr24-cpdlc {
  padding: 8px 10px; background: #0b161b; border-bottom: 1px solid var(--line);
}
.fr24-cpdlc-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
  font: 600 12px var(--mono); color: #7ce8ff;
}
.fr24-cpdlc-head small { font: 500 10px var(--mono); color: var(--muted); margin-left: 4px; }
.fr24-menu-btn { min-height: 23px; padding: 0 7px; font-size: 11px; }
.fr24-cpdlc-log {
  margin-bottom: 6px; padding: 5px 7px; border-radius: 4px;
  background: var(--scope); border: 1px solid var(--line);
  max-height: 82px; overflow-y: auto; font: 11px var(--mono);
}
.fr24-cpdlc-empty { color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.fr24-cpdlc-req {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 4px 6px; margin-bottom: 4px; border-radius: 3px;
  background: rgb(255 210 63 / 0.16); border: 1px solid var(--c-monitor); color: #ffe58f; font-size: 11px;
}
.cpdlc-approve { min-height: 22px; padding: 0 6px; font: 600 10.5px var(--mono); background: #1d5b43; border-color: var(--c-onfreq); color: #fff; }
.fr24-cpdlc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.fr24-cpdlc-list li { display: flex; align-items: baseline; gap: 5px; line-height: 1.25; }
.fr24-cpdlc-list .t { color: var(--faint); font-size: 10px; flex: none; }
.fr24-cpdlc-list .tag { font-size: 10.5px; flex: none; }
.fr24-cpdlc-list li.up .tag { color: #7ce8ff; }
.fr24-cpdlc-list li.down .tag { color: var(--c-onfreq); }
.fr24-cpdlc-list li.bad .tag { color: var(--c-los); }
.fr24-cpdlc-list .m { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.fr24-cpdlc-list .st {
  font: 600 9.5px var(--mono); padding: 0 4px; border-radius: 2px; flex: none;
}
.fr24-cpdlc-list li.ok .st { background: rgb(134 217 168 / 0.2); color: var(--c-onfreq); }
.fr24-cpdlc-list li.bad .st { background: rgb(255 82 82 / 0.22); color: var(--c-los); }
.fr24-cpdlc-list li.wait .st { background: rgb(255 210 63 / 0.2); color: #ffd24c; }

.fr24-cpdlc-grid { display: flex; flex-direction: column; gap: 5px; }
.fr24-cpdlc-grid[inert] { opacity: 0.42; pointer-events: none; }
.cpdlc-row { display: flex; align-items: center; gap: 4px; }
.cpdlc-lbl { width: 58px; flex: none; font: 600 10.5px var(--mono); color: var(--muted); }
.cpdlc-row select, .cpdlc-row input[type="number"], .cpdlc-row input[type="text"] {
  min-height: 26px; padding: 0 6px; border-radius: 3px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  font: 12px var(--mono); color: var(--bright);
}
.cpdlc-row select { flex: 1; min-width: 0; }
.cpdlc-chk { display: inline-flex; align-items: center; gap: 3px; font: 600 10.5px var(--mono); color: #ffd24c; cursor: pointer; }
.cpdlc-go {
  min-height: 26px; padding: 0 8px; flex: none;
  background: #144956; border: 1px solid #3e9fb0; color: #b5f4ff;
  font: 600 11px var(--mono);
}
.cpdlc-go:hover { background: #1c5f70; color: #fff; }
.cpdlc-sub { min-height: 26px; padding: 0 6px; font: 600 10.5px var(--mono); }
.cpdlc-xfer {
  width: 100%; min-height: 27px; justify-content: center;
  background: #193829; border: 1px solid #3c7d5c; color: #b7f5d0;
  font: 600 11.5px var(--mono);
}
.cpdlc-xfer:hover { background: #214b37; color: #fff; }
.cpdlc-free-row input[type="text"] { flex: 1; min-width: 0; font-size: 11.5px; }

.selected .pp-box { padding: 6px 10px 8px; background: var(--panel); font-size: 12px; color: var(--muted); }
.selected .pp-box summary { cursor: pointer; font: 600 11.5px var(--sans); color: var(--muted); }
.selected .pp-box .btn { min-height: 24px; padding: 0 7px; font-size: 11px; }

.cpdlc-tx-btn, .lmenu .txb .cpdlc {
  background: #144956; border: 1px solid #3e9fb0; color: #9cf0ff;
  font: 600 12px var(--mono); padding: 0 9px; min-height: 32px; border-radius: var(--r);
  cursor: pointer; white-space: nowrap;
}
.cpdlc-tx-btn:hover, .lmenu .txb .cpdlc:hover:not(:disabled) { background: #1d6475; color: #fff; }
.lmenu .txb .cpdlc:disabled { opacity: 0.4; cursor: not-allowed; }


/* ============================================================================
   REFONTE PLEIN ÉCRAN (100 % RADAR) — 5 THÈMES AVEC PALETTES FIDÈLES AUX 3 PHOTOS
   ============================================================================ */

/* --- PALETTE CAS 1 : OBSIDIAN SLATE, EMERALD UTC, ELECTRIC CYAN & AMBER STCA --- */
:root[data-ui-theme="case1"]:not([data-theme="light"]) {
  --shell: #0c131b;
  --shell-2: #131f2c;
  --shell-line: #1f3042;
  --shell-text: #e2e8f0;
  --shell-muted: #94a3b8;
  --panel: #0e1620;
  --panel-2: #14202e;
  --panel-3: #1b2a3b;
  --line: #233549;
  --scope: #0b1118;
  --scope-sector: #0e1722;
  --scope-edge: #38bdf8;
  --scope-tma: #2563eb;
  --scope-route: #1e293b;
  --scope-fix: #64748b;
  --scope-fix-label: #94a3b8;
  --scope-ring: #172230;
  --c-onfreq: #f8fafc;
  --c-inbound: #38bdf8;
  --c-transferred: #64748b;
  --c-selected: #38bdf8;
  --c-route-sel: #38bdf8;
  --c-stca: #f59e0b;
  --c-los: #ef4444;
  --accent: #38bdf8;
}

/* --- PALETTE CAS 2 : TACTICAL TEAL-SLATE, GLOWING TURQUOISE ROUTE & MINT --- */
:root[data-ui-theme="case2"]:not([data-theme="light"]) {
  --shell: #0d171b;
  --shell-2: #14242b;
  --shell-line: #1f3a44;
  --shell-text: #e6f4f1;
  --shell-muted: #8ab4bd;
  --panel: #101d22;
  --panel-2: #16282f;
  --panel-3: #1d343d;
  --line: #24424d;
  --scope: #111c21;
  --scope-sector: #152329;
  --scope-edge: #2dd4bf;
  --scope-tma: #0d9488;
  --scope-route: #1e333b;
  --scope-fix: #5e8c96;
  --scope-fix-label: #8ab4bd;
  --scope-ring: #182930;
  --c-onfreq: #4ade80;
  --c-inbound: #2dd4bf;
  --c-transferred: #64828a;
  --c-selected: #00f5d4;
  --c-route-sel: #00f5d4;
  --c-stca: #fb923c;
  --c-los: #f43f5e;
  --accent: #2dd4bf;
  --route-width: 1.2;
}

/* --- PALETTE CAS 3 : DEEP MIDNIGHT BLUE, PHOSPHOR GREEN & SAPPHIRE STRIPS --- */
:root[data-ui-theme="case3"]:not([data-theme="light"]) {
  --shell: #09111c;
  --shell-2: #101e30;
  --shell-line: #1e324d;
  --shell-text: #e2e8f0;
  --shell-muted: #94a3b8;
  --panel: #0b1422;
  --panel-2: #111f34;
  --panel-3: #172a45;
  --line: #1e3454;
  --scope: #080e17;
  --scope-sector: #0c1624;
  --scope-edge: #3b82f6;
  --scope-tma: #2563eb;
  --scope-route: #17253b;
  --scope-fix: #64748b;
  --scope-fix-label: #94a3b8;
  --scope-ring: #132033;
  --c-onfreq: #22c55e;
  --c-inbound: #60a5fa;
  --c-transferred: #64748b;
  --c-selected: #38bdf8;
  --c-route-sel: #60a5fa;
  --c-stca: #f59e0b;
  --c-los: #ef4444;
  --accent: #3b82f6;
}

/* --- PALETTE FUSION (CAS 1 + CAS 2 + CAS 3 COMBINÉS) --- */
:root[data-ui-theme="fusion"]:not([data-theme="light"]) {
  --shell: #0b141d;
  --shell-2: #12212f;
  --shell-line: #1f3649;
  --shell-text: #e6f1f8;
  --shell-muted: #93b1c6;
  --panel: #0d1822;
  --panel-2: #132331;
  --panel-3: #192e40;
  --line: #223c52;
  --scope: #0a121a;
  --scope-sector: #0e1924;
  --scope-edge: #38bdf8;
  --scope-tma: #0284c7;
  --scope-route: #19293a;
  --scope-fix: #648299;
  --scope-fix-label: #8da9bf;
  --scope-ring: #142230;
  --c-onfreq: #4ade80;
  --c-inbound: #38bdf8;
  --c-transferred: #64748b;
  --c-selected: #00f5d4;
  --c-route-sel: #00f5d4;
  --c-stca: #f59e0b;
  --c-los: #ef4444;
  --accent: #38bdf8;
}

/* Top rail styling matching the photos (Emerald UTC clock, coral & amber pill badges) */
:root:not([data-ui-theme="classic"]) .rail {
  padding: 5px 12px;
  gap: 10px;
}
:root:not([data-ui-theme="classic"]) .clock {
  color: #4ade80;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.key-tag {
  font: 600 11px var(--mono);
  opacity: 0.78;
  margin-right: 2px;
}
.strips-drawer-btn {
  background: rgb(136 19 55 / 0.32) !important;
  border-color: rgb(244 63 94 / 0.55) !important;
  color: #fda4af !important;
}
.strips-drawer-btn:hover, .strips-drawer-btn[aria-expanded="true"] {
  background: rgb(190 18 60 / 0.52) !important;
  color: #ffffff !important;
}
.radio-drawer-btn {
  background: rgb(120 53 15 / 0.34) !important;
  border-color: rgb(245 158 11 / 0.55) !important;
  color: #fcd34d !important;
}
.radio-drawer-btn:hover, .radio-drawer-btn[aria-expanded="true"] {
  background: rgb(180 83 9 / 0.52) !important;
  color: #ffffff !important;
}
.badge-coral {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  padding: 0 6px !important;
}
.badge-amber {
  background: #f59e0b !important;
  color: #090d14 !important;
  border-radius: 999px !important;
  padding: 0 6px !important;
}
.wx-quick-btn, .aman-quick-btn {
  font: 600 11px var(--mono);
  letter-spacing: 0.04em;
  padding: 0 8px;
}
.ui-theme-field {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.wx-pop-range {
  margin: 2px 0 6px 22px;
  font-size: 12px;
}

/* Visibility rules per theme */
:root[data-ui-theme="classic"] .classic-sil-box,
:root[data-ui-theme="classic"] .right-hud-stack .aman-hud-card,
:root[data-ui-theme="classic"] .right-hud-stack .dep-toast-box,
:root[data-ui-theme="classic"] .pin-btn {
  display: none !important;
}
:root[data-ui-theme="case2"] .classic-sil-box,
:root[data-ui-theme="case3"] .classic-sil-box {
  display: none !important;
}
:root[data-ui-theme="case1"] .pin-btn,
:root[data-ui-theme="case2"] .pin-btn {
  display: none !important;
}

/* ============================================================================
   100 % PLEIN ÉCRAN RADAR & BARRE DE TRANSMISSION FLOTTANTE EN PILULE
   (Corrige le @media (min-width: 1280px) .txbar { position: static !important })
   ============================================================================ */
:root:not([data-ui-theme="classic"]) .layout {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-areas: "scope" !important;
}
:root:not([data-ui-theme="classic"]) .scope {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
}
:root:not([data-ui-theme="classic"]) #radar {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Pinned drawers in Cas 3 & Fusion */
:root[data-ui-theme="fusion"] body.pinned-left.pinned-right .layout,
:root[data-ui-theme="case3"] body.pinned-left.pinned-right .layout {
  grid-template-columns: var(--side) minmax(0, 1fr) var(--side) !important;
  grid-template-areas: "strips scope comms" !important;
}
:root[data-ui-theme="fusion"] body.pinned-left:not(.pinned-right) .layout,
:root[data-ui-theme="case3"] body.pinned-left:not(.pinned-right) .layout {
  grid-template-columns: var(--side) minmax(0, 1fr) !important;
  grid-template-areas: "strips scope" !important;
}
:root[data-ui-theme="fusion"] body.pinned-right:not(.pinned-left) .layout,
:root[data-ui-theme="case3"] body.pinned-right:not(.pinned-left) .layout {
  grid-template-columns: minmax(0, 1fr) var(--side) !important;
  grid-template-areas: "scope comms" !important;
}

:root:not([data-ui-theme="classic"]) .drawer-only {
  display: inline-flex !important;
}
:root:not([data-ui-theme="classic"]) .panel-hdr-actions.drawer-only {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

/* True Floating Pill Transmission Bar (.txbar) at bottom-center — never full width! */
:root:not([data-ui-theme="classic"]) .txbar {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  width: min(520px, calc(100% - 32px)) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 16 !important;
  pointer-events: none;
}
:root:not([data-ui-theme="classic"]) .txbar.off {
  display: flex !important;
}
:root:not([data-ui-theme="classic"]) .txbar.off .tx-row {
  display: none !important;
}
:root:not([data-ui-theme="classic"]) .lastline[hidden] {
  display: none !important;
}
:root:not([data-ui-theme="classic"]) .lastline {
  display: block !important;
  pointer-events: auto;
  align-self: center;
  margin: 0 auto 6px !important;
  padding: 3px 14px !important;
  border-radius: 999px !important;
  background: rgb(9 16 24 / 0.88) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgb(74 222 128 / 0.38) !important;
  color: #4ade80 !important;
  font: 500 13px var(--mono) !important;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.5);
}
:root:not([data-ui-theme="classic"]) .lastline[hidden] {
  display: none !important;
}
:root:not([data-ui-theme="classic"]) .txbar .tx-row {
  pointer-events: auto;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  padding: 5px 8px !important;
  border-radius: 999px !important;
  background: rgb(15 23 34 / 0.90) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgb(148 163 184 / 0.32) !important;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.65) !important;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt {
  flex-direction: row !important;
  width: auto !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  gap: 7px !important;
  background: #1e293b !important;
  border: 1px solid rgb(148 163 184 / 0.4) !important;
  color: #f8fafc !important;
  font: 600 11.5px var(--sans) !important;
  letter-spacing: 0.06em !important;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt.live {
  background: #7f1d1d !important;
  border-color: #ef4444 !important;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt.live::after {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt .i {
  display: none !important;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt {
  position: relative;
  overflow: hidden;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt .vu {
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  width: auto;
  height: 3px;
  margin: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt.live .vu {
  opacity: 1;
}
:root:not([data-ui-theme="classic"]) .txbar .ptt .vu i {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #22c55e 0%, #38bdf8 55%, #f59e0b 82%, #ef4444 100%);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.55);
}
:root:not([data-ui-theme="classic"]) .txbar .tx-top {
  display: none !important;
}
:root:not([data-ui-theme="classic"]) .txbar .typed input {
  border-radius: 999px !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 14px !important;
  background: rgb(9 14 22 / 0.85) !important;
  border: 1px solid rgb(100 116 139 / 0.35) !important;
  font-size: 13px !important;
}
:root:not([data-ui-theme="classic"]) .txbar .typed .btn {
  border-radius: 999px !important;
  min-height: 34px !important;
  height: 34px !important;
}

/* ============================================================================
   ZÉRO CHEVAUCHEMENT DES FENÊTRES (LEFT & RIGHT HUD STACKS + DRAWER SHIFT)
   ============================================================================ */
body.drawer-left-open:not(.pinned-left) {
  --hud-left: min(382px, calc(88vw + 12px));
}
body.drawer-right-open:not(.pinned-right) {
  --hud-right: min(382px, calc(88vw + 12px));
}

/* 1. Top-Left Inbound / SIL Micro-Table (Photo Cas 1) */
.classic-sil-box {
  position: absolute;
  top: 12px;
  left: var(--hud-left, 12px);
  z-index: 12;
  width: 248px;
  background: rgb(13 20 30 / 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgb(100 116 139 / 0.38);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.55);
  font-family: var(--mono);
  color: var(--text);
  overflow: hidden;
  transition: left 220ms var(--ease);
}
.classic-sil-box.collapsed .sil-body {
  display: none;
}
.sil-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgb(20 30 44 / 0.85);
  border-bottom: 1px solid rgb(100 116 139 / 0.28);
  font: 600 12px var(--sans);
  color: #e2e8f0;
}
.sil-cnt {
  font: 600 11px var(--mono);
  color: #38bdf8;
}
.sil-min-btn {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: 600 14px var(--mono);
  cursor: pointer;
  padding: 0 4px;
}
.sil-cols {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  padding: 4px 10px;
  font-size: 10.5px;
  color: #94a3b8;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.sil-list {
  list-style: none;
  margin: 0;
  padding: 2px 0;
  max-height: 132px;
  overflow-y: auto;
}
.sil-list li {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  align-items: center;
  padding: 3.5px 10px;
  font-size: 11.5px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.sil-list li:hover {
  background: rgb(56 189 248 / 0.15);
}
.sil-list li.is-sel {
  background: rgb(56 189 248 / 0.22);
  border-left-color: #38bdf8;
}
.sil-list li.is-onfreq .sil-cs {
  color: #f8fafc;
  font-weight: 600;
}
.sil-list li.is-inbound .sil-cs {
  color: #38bdf8;
  font-weight: 600;
}
.sil-dest {
  color: #94a3b8;
}
.sil-fl {
  text-align: right;
  color: #cbd5e1;
}

/* 2. Bottom-Left Aircraft Telemetry & CPDLC Card (#selected) — NEVER overlaps #classic-sil-box */
:root:not([data-ui-theme="classic"]) .selected {
  position: absolute !important;
  top: auto !important;
  bottom: 14px !important;
  left: var(--hud-left, 12px) !important;
  z-index: 15 !important;
  width: 340px !important;
  max-height: calc(100% - 216px) !important;
  overflow-y: auto !important;
  background: rgb(16 28 36 / 0.90) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgb(45 212 191 / 0.45) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.65) !important;
  transition: left 220ms var(--ease);
}

/* 3. Top-Right Vertical Stack (#right-hud-stack): AMAN/MTCD + Departure Toast + Coach */
.right-hud-stack {
  position: absolute;
  top: 12px;
  right: var(--hud-right, 12px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100% - 80px);
  pointer-events: none;
  transition: right 220ms var(--ease);
}
.right-hud-stack > * {
  pointer-events: auto;
  width: 100%;
}
.right-hud-stack > [hidden] {
  display: none !important;
}
:root:not([data-ui-theme="classic"]) .coach {
  position: static !important;
  width: 100% !important;
  max-height: 280px !important;
  margin: 0 !important;
}

/* AMAN/MTCD Glass Card (Photo Cas 2) */
.aman-hud-card {
  background: rgb(16 29 35 / 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgb(45 212 191 / 0.38);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
  overflow: hidden;
  font-family: var(--mono);
}
.aman-hud-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgb(22 40 48 / 0.85);
  border-bottom: 1px solid rgb(45 212 191 / 0.25);
  font: 600 12px var(--sans);
  color: #e2e8f0;
}
.aman-hud-list {
  list-style: none;
  margin: 0;
  padding: 4px 10px 6px;
}
.aman-hud-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
  border-bottom: 1px solid rgb(255 255 255 / 0.05);
  cursor: pointer;
}
.aman-hud-list li:last-child {
  border-bottom: 0;
}
.aman-hud-list .aman-cs {
  color: #e2e8f0;
  font-weight: 600;
}
.aman-hud-list .aman-ttl {
  color: #4ade80;
  font-weight: 600;
}
.aman-hud-list li.is-mtcd .aman-ttl {
  color: #fb923c;
}

/* Departure Approval & Coordination Toast (Photo Cas 2 — 100% Clickable [Approve] & [Hold]) */
.dep-toast-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dep-toast-card {
  background: rgb(17 29 36 / 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgb(74 222 128 / 0.48);
  border-radius: 7px;
  padding: 10px 12px;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.65);
  color: #e2e8f0;
}
.dep-toast-card.is-coord {
  border-color: rgb(56 189 248 / 0.55);
}
.dep-toast-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 12px var(--sans);
  color: #cbd5e1;
  margin-bottom: 5px;
}
.dep-toast-close {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.dep-toast-meta {
  font: 600 13px var(--mono);
  color: #4ade80;
  margin-bottom: 2px;
}
.dep-toast-sub {
  font: 12px var(--mono);
  color: #cbd5e1;
  margin-bottom: 8px;
}
.dep-toast-actions {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  align-items: center;
  gap: 8px;
}
.dep-toast-actions.coord-actions {
  display: flex;
  flex-wrap: wrap;
}
.dep-toast-fl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 600 11.5px var(--mono);
  color: #94a3b8;
}
.dep-toast-fl input {
  width: 56px;
  height: 30px;
  padding: 0 6px;
  font: 600 12.5px var(--mono);
  background: #0d161c;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 4px;
}
.toast-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 5px;
  font: 600 12.5px var(--mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 80ms ease, filter 120ms ease;
  user-select: none;
}
.toast-btn:active {
  transform: scale(0.97);
}
.toast-btn.approve {
  background: rgb(16 185 129 / 0.25);
  border: 1px solid #10b981;
  color: #6ee7b7;
}
.toast-btn.approve:hover {
  background: #059669;
  color: #ffffff;
}
.toast-btn.hold {
  background: rgb(217 119 6 / 0.24);
  border: 1px solid #f59e0b;
  color: #fcd34d;
}
.toast-btn.hold:hover {
  background: #d97706;
  color: #ffffff;
}

/* ============================================================================
   CAS 3 & FUSION : TIROIRS VITRÉS ÉPINGLABLES & STRIPS COLORÉS (PHOTO CAS 3)
   ============================================================================ */
:root:not([data-ui-theme="classic"]) .panel {
  position: fixed;
  top: var(--rail-h, 46px);
  bottom: 0;
  z-index: 25;
  width: min(368px, 88vw);
  background: rgb(11 20 32 / 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.65);
  transition: transform 220ms var(--ease), visibility 0s linear 220ms;
  visibility: hidden;
}
:root:not([data-ui-theme="classic"]) .panel.open {
  transform: none;
  visibility: visible;
  transition: transform 220ms var(--ease);
}
:root:not([data-ui-theme="classic"]) .strips {
  left: 0;
  border-left: 0;
  border-right: 1px solid var(--shell-line);
  transform: translateX(-102%);
}
:root:not([data-ui-theme="classic"]) .comms {
  right: 0;
  border-left: 1px solid var(--shell-line);
  transform: translateX(102%);
}
:root[data-ui-theme="fusion"] body.pinned-left .strips,
:root[data-ui-theme="case3"] body.pinned-left .strips,
:root[data-ui-theme="fusion"] body.pinned-right .comms,
:root[data-ui-theme="case3"] body.pinned-right .comms {
  position: relative;
  top: auto;
  bottom: auto;
  width: auto;
  transform: none;
  visibility: visible;
  z-index: 5;
}
.pin-btn {
  min-height: 26px;
  padding: 0 8px;
  font: 500 11.5px var(--mono);
  color: var(--muted);
  border-color: var(--line-2);
}
.pin-btn[aria-pressed="true"] {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #3b82f6;
}

/* Color-coded Flight Strips & Radio Log Cards in Cas 3 and Fusion (matching Photo Cas 3!) */
:root[data-ui-theme="case3"] #strips > li.strip,
:root[data-ui-theme="fusion"] #strips > li.strip {
  border-radius: 6px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-left-width: 4px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.35);
}
/* Departure / Climbing strips: Warm Amber / Copper */
:root[data-ui-theme="case3"] #strips > li.strip.dep,
:root[data-ui-theme="fusion"] #strips > li.strip.dep {
  background: linear-gradient(135deg, rgb(124 45 18 / 0.72) 0%, rgb(67 20 7 / 0.82) 100%);
  border: 1px solid rgb(249 115 22 / 0.55);
  border-left: 4px solid #f97316;
}
/* Arrival / Approach strips: Deep Sapphire Blue */
:root[data-ui-theme="case3"] #strips > li.strip.arr,
:root[data-ui-theme="fusion"] #strips > li.strip.arr {
  background: linear-gradient(135deg, rgb(30 58 138 / 0.72) 0%, rgb(23 37 84 / 0.82) 100%);
  border: 1px solid rgb(59 130 246 / 0.55);
  border-left: 4px solid #3b82f6;
}
/* Overflight / En-route onFreq strips: Emerald Green */
:root[data-ui-theme="case3"] #strips > li.strip.ovr,
:root[data-ui-theme="fusion"] #strips > li.strip.ovr {
  background: linear-gradient(135deg, rgb(20 83 45 / 0.72) 0%, rgb(5 46 22 / 0.82) 100%);
  border: 1px solid rgb(34 197 94 / 0.55);
  border-left: 4px solid #22c55e;
}
/* Transferred / Announced strips: Slate Steel */
:root[data-ui-theme="case3"] #strips > li.strip.transferred,
:root[data-ui-theme="fusion"] #strips > li.strip.transferred {
  background: linear-gradient(135deg, rgb(51 65 85 / 0.65) 0%, rgb(30 41 59 / 0.75) 100%);
  border: 1px solid rgb(100 116 139 / 0.45);
  border-left: 4px solid #64748b;
}
/* Radio & Coordination log cards in Cas 3 & Fusion */
:root[data-ui-theme="case3"] #log > li,
:root[data-ui-theme="fusion"] #log > li {
  background: rgb(19 32 50 / 0.75);
  border: 1px solid rgb(59 130 246 / 0.25);
  border-left: 3px solid #3b82f6;
  border-radius: 5px;
  margin-bottom: 5px;
  padding: 6px 9px;
}
:root[data-ui-theme="case3"] #log > li.tx,
:root[data-ui-theme="fusion"] #log > li.tx {
  border-left-color: #f59e0b;
}


/* ============================================================================
   VARIANTES THÈME CLAIR ("GRIS DOUX" / DAYLIGHT CWP : :root[data-theme="light"])
   POUR LES 5 THÈMES (FUSION, CAS 1, CAS 2, CAS 3, CLASSIQUE)
   ============================================================================ */

/* Palette Clair Cas 1 : Daylight Pearl & Slate Scope */
:root[data-theme="light"][data-ui-theme="case1"] {
  --shell: #d4dce2; --shell-2: #c6d0d8; --shell-line: #9aa8b4; --shell-text: #0f172a; --shell-muted: #334155;
  --panel: #dfe6ec; --panel-2: #d2dbe3; --panel-3: #c4cfd9; --line: #9fb0be; --text: #0f172a; --bright: #020617;
  --radar-scope: #25303b; --radar-scope-sector: #2c3946; --radar-scope-edge: #7dd3fc; --radar-scope-tma: #60a5fa;
  --radar-c-onfreq: #ffffff; --radar-c-inbound: #38bdf8; --radar-c-selected: #00f5d4; --radar-c-stca: #f59e0b;
}

/* Palette Clair Cas 2 : Daylight Sage-Teal & Warm Stone Scope */
:root[data-theme="light"][data-ui-theme="case2"] {
  --shell: #cad8d5; --shell-2: #bccbc8; --shell-line: #8da39e; --shell-text: #09221e; --shell-muted: #274742;
  --panel: #d6e3e0; --panel-2: #c8d8d4; --panel-3: #b9ccc7; --line: #8fa6a1; --text: #09221e; --bright: #021412;
  --radar-scope: #1f2e2d; --radar-scope-sector: #263836; --radar-scope-edge: #2dd4bf; --radar-scope-tma: #14b8a6;
  --radar-c-onfreq: #4ade80; --radar-c-inbound: #2dd4bf; --radar-c-selected: #00f5d4; --radar-c-stca: #fb923c;
}

/* Palette Clair Cas 3 : Daylight Steel-Blue & Deep Slate Scope */
:root[data-theme="light"][data-ui-theme="case3"] {
  --shell: #ccd6e4; --shell-2: #bcc8da; --shell-line: #8fa0b8; --shell-text: #0f172a; --shell-muted: #2d3e56;
  --panel: #d8e1ee; --panel-2: #c9d5e6; --panel-3: #bac8dc; --line: #91a3bc; --text: #0f172a; --bright: #020617;
  --radar-scope: #1e2836; --radar-scope-sector: #253142; --radar-scope-edge: #60a5fa; --radar-scope-tma: #3b82f6;
  --radar-c-onfreq: #4ade80; --radar-c-inbound: #60a5fa; --radar-c-selected: #38bdf8; --radar-c-stca: #f59e0b;
}

/* Palette Clair Fusion : Daylight Alabaster-Grey & Contrasted Slate Scope */
:root[data-theme="light"][data-ui-theme="fusion"] {
  --shell: #cfd8dc; --shell-2: #c0ccd1; --shell-line: #90a4ae; --shell-text: #0b161c; --shell-muted: #2e434e;
  --panel: #dce4e8; --panel-2: #ced8dd; --panel-3: #bfccd2; --line: #96aab4; --text: #0b161c; --bright: #000000;
  --radar-scope: #232d34; --radar-scope-sector: #2a363e; --radar-scope-edge: #38bdf8; --radar-scope-tma: #2dd4bf;
  --radar-c-onfreq: #86efac; --radar-c-inbound: #7dd3fc; --radar-c-selected: #00f5d4; --radar-c-stca: #fb923c;
}

/* Adaptation des cartes flottantes, de la pilule PTT et des tiroirs au Thème Clair (☀️) */
:root[data-theme="light"]:not([data-ui-theme="classic"]) .clock {
  color: #047857;
}
:root[data-theme="light"] .strips-drawer-btn {
  background: rgb(254 205 211 / 0.85) !important;
  border-color: #e11d48 !important;
  color: #881337 !important;
}
:root[data-theme="light"] .radio-drawer-btn {
  background: rgb(254 243 199 / 0.90) !important;
  border-color: #d97706 !important;
  color: #78350f !important;
}
:root[data-theme="light"] .classic-sil-box,
:root[data-theme="light"] .aman-hud-card,
:root[data-theme="light"] .dep-toast-card,
:root[data-theme="light"]:not([data-ui-theme="classic"]) .selected {
  background: rgb(232 238 242 / 0.92) !important;
  border-color: rgb(71 85 105 / 0.45) !important;
  color: #0f172a !important;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.25) !important;
}
:root[data-theme="light"] .sil-head,
:root[data-theme="light"] .aman-hud-head {
  background: rgb(203 213 225 / 0.90) !important;
  color: #0f172a !important;
  border-bottom-color: rgb(100 116 139 / 0.3) !important;
}
:root[data-theme="light"] .sil-cnt { color: #0284c7; }
:root[data-theme="light"] .sil-cols { color: #475569; border-bottom-color: rgb(15 23 42 / 0.1); }
:root[data-theme="light"] .sil-list li.is-onfreq .sil-cs { color: #065f46; }
:root[data-theme="light"] .sil-list li.is-inbound .sil-cs { color: #1d4ed8; }
:root[data-theme="light"] .sil-dest, :root[data-theme="light"] .sil-fl { color: #334155; }
:root[data-theme="light"] .aman-hud-list .aman-cs { color: #0f172a; }
:root[data-theme="light"] .aman-hud-list .aman-ttl { color: #047857; }
:root[data-theme="light"] .dep-toast-top { color: #334155; }
:root[data-theme="light"] .dep-toast-meta { color: #047857; }
:root[data-theme="light"] .dep-toast-sub { color: #1e293b; }
:root[data-theme="light"] .dep-toast-fl { color: #334155; }
:root[data-theme="light"] .dep-toast-fl input { background: #ffffff; color: #0f172a; border-color: #94a3b8; }
:root[data-theme="light"] .toast-btn.approve { background: #10b981; border-color: #059669; color: #ffffff; }
:root[data-theme="light"] .toast-btn.hold { background: #f59e0b; border-color: #d97706; color: #0f172a; }
:root[data-theme="light"]:not([data-ui-theme="classic"]) .txbar .tx-row {
  background: rgb(226 232 240 / 0.94) !important;
  border-color: rgb(100 116 139 / 0.5) !important;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.25) !important;
}
:root[data-theme="light"]:not([data-ui-theme="classic"]) .txbar .ptt {
  background: #334155 !important;
  color: #ffffff !important;
}
:root[data-theme="light"]:not([data-ui-theme="classic"]) .txbar .typed input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}
:root[data-theme="light"]:not([data-ui-theme="classic"]) .lastline {
  background: rgb(241 245 249 / 0.95) !important;
  border-color: #059669 !important;
  color: #065f46 !important;
}
:root[data-theme="light"]:not([data-ui-theme="classic"]) .panel {
  background: rgb(220 228 234 / 0.94) !important;
}
/* Strips colorés en mode Clair (Cas 3 & Fusion) */
:root[data-theme="light"][data-ui-theme="case3"] #strips > li.strip.dep,
:root[data-theme="light"][data-ui-theme="fusion"] #strips > li.strip.dep {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%) !important;
  border: 1px solid #f97316 !important;
  border-left: 4px solid #ea580c !important;
  color: #431407 !important;
}
:root[data-theme="light"][data-ui-theme="case3"] #strips > li.strip.arr,
:root[data-theme="light"][data-ui-theme="fusion"] #strips > li.strip.arr {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
  border: 1px solid #3b82f6 !important;
  border-left: 4px solid #2563eb !important;
  color: #172554 !important;
}
:root[data-theme="light"][data-ui-theme="case3"] #strips > li.strip.ovr,
:root[data-theme="light"][data-ui-theme="fusion"] #strips > li.strip.ovr {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
  border: 1px solid #22c55e !important;
  border-left: 4px solid #16a34a !important;
  color: #052e16 !important;
}
:root[data-theme="light"][data-ui-theme="case3"] #strips > li.strip.transferred,
:root[data-theme="light"][data-ui-theme="fusion"] #strips > li.strip.transferred {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
  border: 1px solid #94a3b8 !important;
  border-left: 4px solid #64748b !important;
  color: #1e293b !important;
}


/* ============================================================================
   CARTE AÉRONEF HYBRIDE FR24 (FUSION PROPOSITION 2 + 3) & TOASTS COMPLETS
   ============================================================================ */
:root:not([data-ui-theme="classic"]) .selected {
  width: 398px !important;
  max-height: calc(100% - 210px) !important;
  padding: 0 !important;
}
.fr24-split-hdr {
  display: flex;
  gap: 10px;
  padding: 9px 10px;
  background: linear-gradient(135deg, rgb(20 35 45 / 0.96) 0%, rgb(11 20 28 / 0.98) 100%);
  border-bottom: 1px solid rgb(74 222 128 / 0.35);
}
:root[data-theme="light"] .fr24-split-hdr {
  background: linear-gradient(135deg, #dbe4ea 0%, #cbd6de 100%);
  border-bottom-color: #64748b;
}
.fr24-thumb-wrap {
  position: relative;
  flex: none;
  width: 116px;
  height: 74px;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(145deg, #1b2d3b 0%, #0d1822 100%);
  border: 1px solid rgb(148 163 184 / 0.35);
}
.fr24-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font: 600 10px var(--mono);
}
.fr24-thumb-fallback svg { width: 62px; height: 26px; opacity: 0.72; }
.fr24-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease;
}
.fr24-thumb.loaded { opacity: 1; }
.fr24-reg-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgb(9 14 22 / 0.84);
  border: 1px solid rgb(255 255 255 / 0.2);
  font: 600 10.5px var(--mono);
  color: #f8fafc;
}
.fr24-flag {
  width: 15px;
  height: 10px;
  border-radius: 1.5px;
  vertical-align: -1px;
  box-shadow: 0 0 1px rgb(0 0 0 / 0.6);
}
.fr24-hdr-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.fr24-hdr-top {
  display: flex;
  align-items: center;
  gap: 5px;
}
.fr24-hdr-top .fr24-cs { font: 700 16px var(--mono); color: #f8fafc; }
:root[data-theme="light"] .fr24-hdr-top .fr24-cs { color: #0f172a; }
.fr24-hdr-top .fr24-fn { font: 600 11.5px var(--mono); color: #94a3b8; }
.fr24-hdr-top .fr24-status {
  margin-left: auto;
  font: 600 10px var(--mono);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(34 197 94 / 0.2);
  border: 1px solid #22c55e;
  color: #4ade80;
}
.fr24-hdr-top .fr24-status.inbound { background: rgb(56 189 248 / 0.2); border-color: #38bdf8; color: #7dd3fc; }
.fr24-hdr-top .fr24-close { width: 22px; min-height: 22px; padding: 0; background: transparent; border: 0; color: var(--muted); }
.fr24-sub-model {
  font: 500 11.5px var(--sans);
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:root[data-theme="light"] .fr24-sub-model { color: #334155; }
.fr24-od-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font: 500 11px var(--mono);
  color: #e2e8f0;
}
:root[data-theme="light"] .fr24-od-line { color: #0f172a; }
.fr24-od-arr { color: #4ade80; font-size: 11px; }

/* 3-Tab Navigation */
.fr24-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgb(11 19 26 / 0.9);
  border-bottom: 1px solid rgb(100 116 139 / 0.3);
}
:root[data-theme="light"] .fr24-tabs { background: #cbd5e1; }
.fr24-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 6px 4px;
  font: 600 11.5px var(--sans);
  color: #94a3b8;
  cursor: pointer;
}
:root[data-theme="light"] .fr24-tabs button { color: #475569; }
.fr24-tabs button.active {
  color: #4ade80;
  border-bottom-color: #4ade80;
  background: rgb(74 222 128 / 0.08);
}
:root[data-theme="light"] .fr24-tabs button.active { color: #047857; border-bottom-color: #059669; }
.tab-badge {
  background: #f59e0b;
  color: #090d14;
  border-radius: 999px;
  padding: 0 5px;
  font-size: 10px;
}
.fr24-tab-body { padding: 8px 10px; }
.fr24-tab-body[hidden] { display: none; }

/* Interactive Waypoint Ribbon */
.fr24-ribbon {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.ribbon-fix {
  background: rgb(30 41 59 / 0.75);
  border: 1px solid rgb(100 116 139 / 0.45);
  border-radius: 4px;
  padding: 2px 6px;
  font: 600 11.5px var(--mono);
  color: #cbd5e1;
  cursor: pointer;
}
.ribbon-fix.next {
  background: rgb(20 83 45 / 0.55);
  border-color: #4ade80;
  color: #bbf7d0;
}
.ribbon-fix:hover { border-color: #38bdf8; color: #ffffff; }
.ribbon-arr { color: #64748b; font-size: 11px; }
:root[data-theme="light"] .ribbon-fix { background: #e2e8f0; color: #0f172a; border-color: #94a3b8; }
:root[data-theme="light"] .ribbon-fix.next { background: #bbf7d0; color: #064e3b; border-color: #16a34a; }

/* Compact 2-Column Mode S Telemetry */
.fr24-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgb(9 16 24 / 0.65);
  border: 1px solid rgb(100 116 139 / 0.25);
  margin-bottom: 8px;
}
:root[data-theme="light"] .fr24-compact-grid { background: rgb(241 245 249 / 0.85); border-color: #94a3b8; }
.fc-item { display: flex; flex-direction: column; font-family: var(--mono); }
.fc-item span { font-size: 9.5px; color: #94a3b8; letter-spacing: 0.04em; }
.fc-item b { font-size: 11.5px; color: #f8fafc; font-weight: 600; }
:root[data-theme="light"] .fc-item span { color: #475569; }
:root[data-theme="light"] .fc-item b { color: #0f172a; }

/* 5 Quick ATC Action Pills */
.fr24-quick-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.4fr;
  gap: 5px;
}
.qpill {
  min-height: 28px;
  border-radius: 5px;
  background: rgb(22 36 48 / 0.85);
  border: 1px solid rgb(100 116 139 / 0.45);
  color: #e2e8f0;
  font: 600 11.5px var(--mono);
  cursor: pointer;
}
.qpill:hover { border-color: #38bdf8; color: #ffffff; }
.qpill.primary { background: rgb(16 185 129 / 0.22); border-color: #10b981; color: #6ee7b7; }
:root[data-theme="light"] .qpill { background: #e2e8f0; color: #0f172a; border-color: #64748b; }
:root[data-theme="light"] .qpill.primary { background: #10b981; color: #ffffff; border-color: #059669; }

.fr24-actions-pane { display: flex; flex-direction: column; gap: 8px; }
.pp-btns { display: flex; flex-wrap: wrap; gap: 5px; }

/* Rich Approval Toast Grid */
.dep-toast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px 6px;
  margin-bottom: 8px;
}
.dep-toast-grid label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: 600 10px var(--sans);
  color: #94a3b8;
}
.dep-toast-grid input, .dep-toast-grid select {
  width: 100%;
  height: 26px;
  padding: 0 5px;
  font: 600 11.5px var(--mono);
  background: #0b131b;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 4px;
}
:root[data-theme="light"] .dep-toast-grid label { color: #334155; }
:root[data-theme="light"] .dep-toast-grid input, :root[data-theme="light"] .dep-toast-grid select {
  background: #ffffff; color: #0f172a; border-color: #94a3b8;
}


/* ============================================================================
   CONSOLE A — MICRO-BARRE FCU INLINE (~388x118 px, zéro encombrement)
   ============================================================================ */
.lmenu.compose {
  width: 420px !important;
  max-width: calc(100vw - 16px) !important;
  background: rgb(13 21 28 / 0.94) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgb(45 212 191 / 0.42) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.65) !important;
}
:root[data-theme="light"] .lmenu.compose {
  background: rgb(232 238 242 / 0.96) !important;
  border-color: #475569 !important;
}
.lmenu header.ph-fcu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-bottom: 1px solid rgb(100 116 139 / 0.28);
}
.ph-fcu b { font: 700 13.5px var(--mono); color: #f8fafc; }
.ph-fcu .ph-meta { font: 500 11.5px var(--mono); color: #94a3b8; }
.ph-fcu .ph-meta i { font-style: normal; color: #4ade80; font-weight: 600; }
.ph-fcu .ic { margin-left: auto; width: 22px; min-height: 22px; }
:root[data-theme="light"] .ph-fcu b { color: #0f172a; }
:root[data-theme="light"] .ph-fcu .ph-meta { color: #475569; }
:root[data-theme="light"] .ph-fcu .ph-meta i { color: #047857; }

.lmenu.compose .body { padding: 7px 8px; }
.fcu-bar {
  display: grid;
  grid-template-columns: 1.3fr 1.15fr 0.95fr 0.85fr;
  gap: 6px;
}
.fcu-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fcu-lbl {
  font: 600 9.5px var(--sans);
  color: #94a3b8;
  letter-spacing: 0.04em;
}
.fcu-ctrl {
  display: grid;
  grid-template-columns: 19px 1fr 19px;
  align-items: center;
  height: 28px;
  background: rgb(9 14 22 / 0.85);
  border: 1px solid rgb(100 116 139 / 0.4);
  border-radius: 5px;
  overflow: hidden;
}
.fcu-ctrl button {
  height: 100%;
  background: rgb(30 41 59 / 0.7);
  border: 0;
  color: #e2e8f0;
  font: 700 13px var(--mono);
  cursor: pointer;
}
.fcu-ctrl button:hover { background: #0284c7; color: #ffffff; }
.fcu-ctrl b {
  text-align: center;
  font: 600 12px var(--mono);
  color: #f8fafc;
}
.fcu-ctrl b.changed { color: #38bdf8; }
.fcu-box select {
  height: 28px;
  padding: 0 4px;
  background: rgb(9 14 22 / 0.85);
  border: 1px solid rgb(100 116 139 / 0.4);
  border-radius: 5px;
  color: #f8fafc;
  font: 600 11.5px var(--mono);
}
.fcu-ctrl select {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: transparent !important;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 2px;
  text-align: center;
  text-align-last: center;
  font: 700 12px var(--mono);
  color: inherit;
  cursor: pointer;
}
.fcu-ctrl select.changed { color: #38bdf8; }
:root[data-theme="light"] .fcu-ctrl select.changed { color: #164e8f; }
:root[data-theme="light"] .fcu-ctrl, :root[data-theme="light"] .fcu-box select {
  background: #ffffff;
  border-color: #94a3b8;
  color: #0f172a;
}
:root[data-theme="light"] .fcu-ctrl b { color: #0f172a; }
:root[data-theme="light"] .fcu-ctrl b.changed { color: #0284c7; }
:root[data-theme="light"] .fcu-ctrl button { background: #e2e8f0; color: #0f172a; }

.fcu-phrase {
  margin: 5px 0 0;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgb(15 23 42 / 0.65);
  font: 500 11px var(--mono);
  color: #7dd3fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:root[data-theme="light"] .fcu-phrase { background: #e2e8f0; color: #0369a1; }

.fcu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 7px;
}
.fcu-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.fcu-chip {
  height: 25px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgb(30 41 59 / 0.75);
  border: 1px solid rgb(100 116 139 / 0.45);
  color: #cbd5e1;
  font: 600 10.5px var(--mono);
  cursor: pointer;
}
.fcu-chip:hover { border-color: #38bdf8; color: #ffffff; }
.fcu-chip.xfer { border-color: rgb(45 212 191 / 0.5); color: #5eead4; }
.fcu-send {
  display: flex;
  gap: 4px;
  flex: none;
}
.fcu-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  font: 700 11px var(--mono);
  cursor: pointer;
}
.fcu-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.fcu-btn.vhf {
  background: #0284c7;
  border: 1px solid #38bdf8;
  color: #ffffff;
}
.fcu-btn.cpdlc {
  background: rgb(16 185 129 / 0.25);
  border: 1px solid #10b981;
  color: #6ee7b7;
}
:root[data-theme="light"] .fcu-chip { background: #e2e8f0; color: #0f172a; border-color: #94a3b8; }
:root[data-theme="light"] .fcu-chip.xfer { color: #0f766e; border-color: #14b8a6; }
:root[data-theme="light"] .fcu-btn.cpdlc { background: #10b981; color: #ffffff; }

.incoord-box { margin: 8px 0; padding: 8px; border: 1px solid rgba(56, 189, 248, 0.35); border-radius: 8px; background: rgba(14, 116, 144, 0.14); display: flex; flex-direction: column; gap: 6px; }
.incoord-hdr { font-size: 11px; font-weight: 700; color: #7dd3fc; text-transform: uppercase; letter-spacing: 0.04em; }
.incoord-row { display: flex; gap: 6px; align-items: center; }
.incoord-row select, .incoord-row input { flex: 1; min-width: 0; background: rgba(15, 23, 42, 0.9); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.35); border-radius: 5px; padding: 4px 6px; font-size: 12px; }
.incoord-row button { white-space: nowrap; padding: 4px 8px; border-radius: 5px; border: 1px solid rgba(56, 189, 248, 0.45); background: rgba(2, 132, 199, 0.25); color: #e0f2fe; font-size: 11px; font-weight: 600; cursor: pointer; }
.incoord-row button:hover { background: rgba(2, 132, 199, 0.45); }
.incoord-row button.wide { width: 100%; }

:root[data-ui-font="b612"] { --sans: "B612", system-ui, sans-serif; --mono: "B612 Mono", ui-monospace, monospace; }
:root[data-ui-font="radar"] { --sans: "Space Grotesk", system-ui, sans-serif; --mono: "Share Tech Mono", ui-monospace, monospace; }
:root[data-ui-font="jetbrains"] { --sans: "Inter", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace; }
:root[data-ui-font="system"] { --sans: "Segoe UI", Arial, system-ui, sans-serif; --mono: Consolas, Menlo, "Courier New", monospace; }

.fcu-ctrl select, .fcu-ctrl input[type="number"] {
  width: 100%; min-width: 0; height: 100%; border: 0; background: transparent;
  color: #f8fafc; text-align: center; font: 600 12px var(--mono); padding: 0 2px;
  outline: none; appearance: none; -moz-appearance: textfield;
}
.fcu-ctrl input[type="number"]::-webkit-inner-spin-button,
.fcu-ctrl input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.fcu-ctrl select option { background: #0f172a; color: #f8fafc; }
.fcu-ctrl select.changed, .fcu-ctrl input.changed { color: #38bdf8; }
:root[data-theme="light"] .fcu-ctrl select, :root[data-theme="light"] .fcu-ctrl input[type="number"] { color: #0f172a; }
:root[data-theme="light"] .fcu-ctrl select.changed, :root[data-theme="light"] .fcu-ctrl input.changed { color: #0284c7; }

/* ==================== 4D SCENARIO STUDIO ARCHITECTURE ==================== */
.ed-rail {
  height: 44px; min-height: 44px; padding: 0 10px; gap: 8px; flex-wrap: nowrap !important;
  background: linear-gradient(180deg, rgba(12, 22, 34, 0.98), rgba(9, 16, 26, 0.96));
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
}
.ed-rail .tools { flex-wrap: nowrap !important; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.ed-rail .tools .btn, .ed-rail .tools select.btn { min-height: 28px; padding: 0 8px; font-size: 12px; white-space: nowrap; }
.ed-studio-sel {
  background: rgba(14, 116, 144, 0.28) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #e0f2fe !important;
  font-weight: 600 !important;
  max-width: 255px;
}
.ed-drawer-btn.on {
  background: rgba(2, 132, 199, 0.32) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

/* Floating Top-Center OJTI Palette Dock & Workload Sparkline */
.ed-ojti-dock {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 8px; padding: 5px 10px;
  background: rgba(9, 16, 28, 0.84); backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.28); border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); max-width: calc(100% - 340px);
}
.ed-ojti-pills { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ojti-pill {
  height: 25px; padding: 0 9px; border-radius: 999px; font: 600 11px var(--mono);
  border: 1px solid rgba(148, 163, 184, 0.3); background: rgba(30, 41, 59, 0.75);
  color: #e2e8f0; cursor: pointer; white-space: nowrap; transition: all 140ms ease;
}
.ojti-pill:hover { transform: translateY(-1px); border-color: #38bdf8; color: #fff; background: rgba(2, 132, 199, 0.35); }
.ojti-pill.add { border-color: rgba(52, 211, 153, 0.5); color: #6ee7b7; background: rgba(6, 95, 70, 0.35); }
.ojti-pill.cf, .ojti-pill.brick { border-color: rgba(251, 191, 36, 0.5); color: #fde68a; background: rgba(146, 64, 14, 0.32); }
.ojti-pill.wx { border-color: rgba(248, 113, 113, 0.5); color: #fca5a5; background: rgba(153, 27, 27, 0.32); }
.ojti-pill.audit { border-color: rgba(56, 189, 248, 0.55); color: #7dd3fc; background: rgba(3, 105, 161, 0.35); }
.ed-workload-box {
  display: flex; align-items: center; gap: 6px; padding-left: 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.25); cursor: pointer;
}
.ed-workload-box .wk-lbl { font: 700 9px var(--mono); color: #94a3b8; letter-spacing: 0.06em; }
#ed-workload-canvas { width: 140px; height: 24px; border-radius: 4px; background: rgba(15, 23, 42, 0.7); }

/* Left Floating Chrono-Strip Sequencer Bay */
.ed-chrono-bay {
  position: absolute; left: 12px; top: 50px; bottom: 14px; width: 248px; z-index: 5;
  display: flex; flex-direction: column; background: rgba(10, 18, 30, 0.84);
  backdrop-filter: blur(14px); border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); overflow: hidden;
  transition: transform 200ms ease, width 200ms ease, height 200ms ease;
}
.ed-chrono-bay.collapsed { height: 34px; width: 176px; bottom: auto; }
.ed-chrono-bay.collapsed .ed-chrono-list { display: none; }
.ed-chrono-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 10px; background: rgba(15, 29, 46, 0.9); border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font: 700 11px var(--mono); color: #7dd3fc; letter-spacing: 0.05em;
}
.ed-chrono-hdr small { color: var(--muted); font-weight: 500; margin-right: auto; margin-left: 6px; }
.ed-chrono-hdr .ic { background: transparent; border: 0; color: #94a3b8; cursor: pointer; font-size: 11px; padding: 2px 5px; }
.ed-chrono-list { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cstrip {
  display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 6px; background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18); border-left: 3px solid #38bdf8;
  font: 11px var(--mono); color: #e2e8f0; cursor: pointer; text-align: left;
}
.cstrip:hover { background: rgba(30, 41, 59, 0.92); border-color: rgba(56, 189, 248, 0.45); }
.cstrip.on { background: rgba(14, 116, 144, 0.32); border-color: #38bdf8; box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4); }
.cstrip.dep { border-left-color: #34d399; }
.cstrip.ovf { border-left-color: #fbbf24; }
.cstrip.ev { border-left-color: #f87171; background: rgba(69, 10, 10, 0.35); }
.cstrip .t { color: #94a3b8; font-size: 10px; }
.cstrip .cs { font-weight: 700; color: #f8fafc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cstrip .meta { color: #7dd3fc; font-size: 10px; }

/* Radial Waypoint Quick-Action Menu */
.ed-radial-menu {
  position: absolute; width: 220px; height: 220px; margin-left: -110px; margin-top: -110px;
  z-index: 15; pointer-events: none;
}
.ed-radial-menu[hidden] { display: none !important; }
.ed-radial-menu .rad-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(9, 18, 32, 0.95); border: 2px solid #38bdf8;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font: 700 12px var(--mono); color: #f8fafc; pointer-events: auto;
}
.ed-radial-menu .rad-center small { font-size: 9px; color: #7dd3fc; font-weight: 500; }
.ed-radial-menu .rad-btn {
  position: absolute; pointer-events: auto; white-space: nowrap;
  padding: 5px 10px; border-radius: 999px; font: 600 11px var(--mono);
  background: rgba(15, 23, 42, 0.94); border: 1px solid rgba(56, 189, 248, 0.55);
  color: #e0f2fe; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  transition: transform 120ms ease, background 120ms ease;
}
.ed-radial-menu .rad-btn:hover { background: #0284c7; color: #fff; transform: scale(1.06); }
.ed-radial-menu .rad-btn.top { left: 50%; top: 4px; transform: translateX(-50%); }
.ed-radial-menu .rad-btn.bottom { left: 50%; bottom: 4px; transform: translateX(-50%); }
.ed-radial-menu .rad-btn.left { right: calc(50% + 42px); top: 50%; transform: translateY(-50%); }
.ed-radial-menu .rad-btn.right { left: calc(50% + 42px); top: 50%; transform: translateY(-50%); }

/* Full-Bleed Studio Modes (fusion, topsky, managair, enroute) */
:root[data-ed-studio="fusion"] .ed-grid,
:root[data-ed-studio="topsky"] .ed-grid,
:root[data-ed-studio="managair"] .ed-grid,
:root[data-ed-studio="enroute"] .ed-grid {
  position: relative;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 215px !important;
  grid-template-areas: "map" "tl" !important;
}
:root[data-ed-studio="managair"] .ed-grid {
  grid-template-rows: minmax(0, 1fr) 150px !important;
}
:root[data-ed-studio="enroute"] .ed-grid {
  grid-template-rows: minmax(0, 1fr) 140px !important;
}
:root[data-ed-studio="fusion"] .ed-settings,
:root[data-ed-studio="topsky"] .ed-settings,
:root[data-ed-studio="managair"] .ed-settings,
:root[data-ed-studio="enroute"] .ed-settings {
  position: fixed !important; left: 12px; top: 54px; bottom: 228px; width: min(360px, 90vw);
  z-index: 20; background: rgba(11, 20, 32, 0.92); backdrop-filter: blur(18px);
  border: 1px solid rgba(56, 189, 248, 0.3) !important; border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65);
  transform: translateX(-110%); visibility: hidden;
  transition: transform 200ms ease, visibility 0s linear 200ms;
}
:root[data-ed-studio="fusion"] .ed-settings.open,
:root[data-ed-studio="topsky"] .ed-settings.open,
:root[data-ed-studio="managair"] .ed-settings.open,
:root[data-ed-studio="enroute"] .ed-settings.open {
  transform: translateX(0); visibility: visible; transition: transform 200ms ease;
}

:root[data-ed-studio="fusion"] .ed-inspect,
:root[data-ed-studio="topsky"] .ed-inspect,
:root[data-ed-studio="managair"] .ed-inspect,
:root[data-ed-studio="enroute"] .ed-inspect {
  position: fixed !important; right: 12px; top: 54px; bottom: 228px; width: min(360px, 90vw);
  z-index: 20; background: rgba(11, 20, 32, 0.92); backdrop-filter: blur(18px);
  border: 1px solid rgba(56, 189, 248, 0.3) !important; border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65);
  transform: translateX(110%); visibility: hidden;
  transition: transform 200ms ease, visibility 0s linear 200ms;
}
:root[data-ed-studio="fusion"] .ed-inspect.open,
:root[data-ed-studio="topsky"] .ed-inspect.open,
:root[data-ed-studio="managair"] .ed-inspect.open,
:root[data-ed-studio="enroute"] .ed-inspect.open {
  transform: translateX(0); visibility: visible; transition: transform 200ms ease;
}

/* Mode-specific studio refinements */
:root[data-ed-studio="topsky"] .ed-chrono-bay { display: none; }
:root[data-ed-studio="enroute"] .ed-chrono-bay { display: none; }
:root[data-ed-studio="classic"] .ed-ojti-dock,
:root[data-ed-studio="classic"] .ed-chrono-bay,
:root[data-ed-studio="classic"] .ed-drawer-btn { display: none !important; }

/* v3 Lot 1 — Multi-instruction clearance queue chips */
.fcu-queue { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 6px 0 4px; padding: 5px 6px; border-radius: 6px; background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(148, 163, 184, 0.22); }
.q-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; font-family: var(--mono); }
.q-chip.q-fl { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.45); }
.q-chip.q-nav { background: rgba(251, 191, 36, 0.15); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.45); }
.q-chip.q-spd { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.45); }
.q-chip button { all: unset; cursor: pointer; font-size: 12px; line-height: 1; opacity: 0.75; padding: 0 2px; }
.q-chip button:hover { opacity: 1; color: #fff; }
.q-clear { margin-left: auto; background: transparent; border: 1px solid rgba(248, 113, 113, 0.35); color: #fca5a5; border-radius: 4px; padding: 1px 6px; font-size: 11px; cursor: pointer; }
.q-clear:hover { background: rgba(248, 113, 113, 0.2); }

/* v3 Lot 2 — Live CWP VSD dock & What-If CPA pill */
.q-cpa { margin-left: auto; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; font-family: var(--mono); letter-spacing: 0.03em; }
.q-cpa.cpa-ok { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.5); }
.q-cpa.cpa-warn { background: rgba(245, 158, 11, 0.22); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.55); }
.q-cpa.cpa-bad { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.65); }

#t-vsd[aria-pressed="true"] { background: rgba(56, 189, 248, 0.22); border-color: rgba(56, 189, 248, 0.6); color: #7dd3fc; }
.vsd-dock {
  position: absolute; left: 10px; right: 10px; bottom: 10px; height: 185px;
  background: rgba(11, 17, 27, 0.92); backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.28); border-radius: 8px;
  display: flex; flex-direction: column; overflow: hidden; z-index: 18;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.vsd-dock[hidden] { display: none; }
.vsd-hdr {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px;
  background: rgba(15, 23, 42, 0.85); border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-family: var(--mono); font-size: 11px;
}
.vsd-title { font-weight: 700; color: #38bdf8; letter-spacing: 0.04em; }
.vsd-modes { display: inline-flex; gap: 3px; margin-left: auto; }
.vsd-m {
  background: transparent; border: 1px solid rgba(148, 163, 184, 0.28); color: #94a3b8;
  border-radius: 4px; padding: 1px 7px; font-size: 10px; font-family: var(--mono); cursor: pointer;
}
.vsd-m.on { background: rgba(56, 189, 248, 0.22); border-color: #38bdf8; color: #e0f2fe; font-weight: 700; }
.vsd-close { background: transparent; border: none; color: #94a3b8; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
.vsd-close:hover { color: #f8fafc; }
#vsd-canvas { width: 100%; flex: 1; display: block; }

/* v3 Lot 3 — Copyright-Free Professional Themes: Daylight Ops & Slate Amber */
:root[data-ui-theme="daylight"] {
  --bg: #d9e2ec;
  --bg-panel: #eef2f6;
  --bg-card: #ffffff;
  --ink: #0f172a;
  --ink-dim: #475569;
  --line: #b8c7d9;
  --accent: #0f5235;
  --r-bg: #cdd9e5;
  --r-sector-fill: #e2e8f0;
  --r-sector-edge: #475569;
  --r-route: rgba(30, 58, 138, 0.28);
  --r-tma: #1e40af;
  --r-fix: #334155;
  --r-ac-mine: #0f5235;
  --r-ac-other: #1e3a8a;
  --r-selected: #0369a1;
  --r-los: #dc2626;
  --r-stca: #d97706;
}
:root[data-ui-theme="slate"] {
  --bg: #181b20;
  --bg-panel: #20242b;
  --bg-card: #272c35;
  --ink: #f8fafc;
  --ink-dim: #9ca3af;
  --line: #363d49;
  --accent: #e2b96f;
  --r-bg: #1b1e23;
  --r-sector-fill: #22262d;
  --r-sector-edge: #6b7280;
  --r-route: rgba(226, 185, 111, 0.24);
  --r-tma: #e2b96f;
  --r-fix: #9ca3af;
  --r-ac-mine: #f8fafc;
  --r-ac-other: #94a3b8;
  --r-selected: #e2b96f;
  --r-los: #ef4444;
  --r-stca: #f59e0b;
}

/* v3 Lot 3 — Modals (FPL & Vacation) */
.v3-modal-backdrop {
  position: fixed; inset: 0; background: rgba(2, 6, 23, 0.68); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; z-index: 120; padding: 16px;
}
.v3-modal-backdrop[hidden] { display: none; }
.v3-modal-card {
  width: min(640px, 96vw); background: var(--bg-panel, #111827); color: var(--ink, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.28); border-radius: 10px; padding: 16px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); font-family: var(--sans, system-ui);
}
.v3-modal-hdr { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.v3-modal-kicker { display: block; font-family: var(--mono); font-size: 10px; font-weight: 700; color: #38bdf8; letter-spacing: 0.06em; }
.v3-modal-hdr h3 { margin: 2px 0 0; font-size: 17px; }
.v3-modal-hdr h3 small { font-weight: 500; color: var(--ink-dim, #94a3b8); font-size: 13px; margin-left: 6px; }
.v3-x { background: transparent; border: none; color: var(--ink-dim, #94a3b8); font-size: 22px; line-height: 1; cursor: pointer; }
.v3-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.fpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.fpl-cell { background: rgba(15, 23, 42, 0.45); border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 6px; padding: 6px 8px; font-family: var(--mono); font-size: 11px; }
.fpl-cell span { display: block; font-size: 9px; color: var(--ink-dim, #94a3b8); margin-bottom: 2px; }
.fpl-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fpl-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.fpl-field.full { grid-column: 1 / -1; }
.fpl-field span { color: var(--ink-dim, #94a3b8); font-size: 11px; }
.fpl-field input { background: rgba(15, 23, 42, 0.65); color: var(--ink, #f8fafc); border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 6px; padding: 6px 8px; font-family: var(--mono); font-size: 12px; }
.fpl-route-check { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.fpl-tok { font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.fpl-tok.ok { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.45); }
.fpl-tok.bad { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }
.fpl-raw { margin-top: 10px; font-size: 11px; }
.fpl-raw pre { margin: 6px 0 0; padding: 8px; border-radius: 6px; background: rgba(2, 6, 23, 0.65); font-family: var(--mono); font-size: 11px; overflow-x: auto; color: #cbd5e1; }
.fpl-msg { margin-right: auto; font-size: 12px; }
.fpl-msg.err { color: #f87171; }

/* v3 Lot 3 — TimeMachine4D Bar */
.tm4d-bar {
  position: absolute; left: 10px; right: 10px; top: 10px; z-index: 19;
  display: flex; align-items: center; gap: 10px; padding: 6px 12px;
  background: rgba(11, 17, 27, 0.92); backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 114, 182, 0.35); border-radius: 8px;
  font-family: var(--mono); font-size: 11px; color: #f8fafc;
}
.tm4d-bar[hidden] { display: none; }
.tm4d-lbl { font-weight: 700; color: #f472b6; letter-spacing: 0.04em; white-space: nowrap; }
.tm4d-track-wrap { position: relative; flex: 1; display: flex; align-items: center; }
#tm4d-slider { width: 100%; accent-color: #38bdf8; cursor: pointer; }
.tm4d-markers { position: absolute; inset: 0; pointer-events: none; }
.tm-dot { position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; transform: translateX(-50%); }
.tm-dot.stca { background: #f59e0b; }
.tm-dot.los { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.tm4d-clock { min-width: 44px; text-align: center; color: #7dd3fc; font-weight: 700; }
.tm4d-btn { background: rgba(30, 41, 59, 0.85); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 5px; padding: 3px 8px; font-family: var(--mono); font-size: 10px; font-weight: 700; cursor: pointer; }
.tm4d-btn.primary { background: rgba(56, 189, 248, 0.22); border-color: #38bdf8; color: #e0f2fe; }
.tm4d-btn.on { background: rgba(244, 114, 182, 0.22); border-color: #f472b6; color: #fbcfe8; }

/* v3 Lot 3 — Vacation Quick Setup Swatches */
.vac-section { margin: 10px 0; }
.vac-lbl { display: block; font-size: 11px; color: var(--ink-dim, #94a3b8); margin-bottom: 6px; }
.vac-swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.vac-sw { text-align: left; padding: 8px 10px; border-radius: 7px; background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(148, 163, 184, 0.25); color: var(--ink, #f8fafc); cursor: pointer; }
.vac-sw b { display: block; font-size: 12px; }
.vac-sw small { color: var(--ink-dim, #94a3b8); font-size: 10px; }
.vac-sw.on { border-color: #38bdf8; background: rgba(56, 189, 248, 0.16); }
.vac-toggles { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }

.vac-profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vac-prof { text-align: left; padding: 7px 9px; border-radius: 7px; background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(148, 163, 184, 0.25); color: var(--ink, #f8fafc); cursor: pointer; }
.vac-prof b { display: block; font-size: 12px; }
.vac-prof small { color: var(--ink-dim, #94a3b8); font-size: 9.5px; font-family: var(--mono); }
.vac-prof.on { border-color: #34d399; background: rgba(52, 211, 153, 0.16); }


/* ============================================================================
   v3.3 — Full Operational Themes: Daylight Ops & Slate Amber (UI + Radar Scope)
   ============================================================================ */
/* SkyGuard v2.2 Exact Theme 1 — Atlas & Sahara Relief (Dusk-Indigo & Sandstone) */
:root[data-ui-theme="atlas"], :root[data-ui-theme="atlas"][data-theme="light"] {
  --bg: #121722;
  --surface: #181513;
  --surface-2: #241f1b;
  --surface-3: #2c2621;
  --line: #43372c;
  --line-2: #c89d54;
  --ink: #f3ece1;
  --muted: #a89984;
  --faint: #8c7f70;
  --ok: #4ce0b3;
  --accent: #e8b059;
  --accent-ink: #171412;
  --on-bg: #192d27;
  --sel-bg: #302619;
  --primary-hover: #f5ba60;
  --overlay: rgba(18, 23, 34, 0.94);
  --overlay-shell: rgba(24, 21, 19, 0.96);
  --overlay-panel: rgba(24, 21, 19, 0.97);
  --scope: #111a27;
  --scope-sector: #221c17;
  --scope-edge: #5ce6b8;
  --scope-tma: #f0b85a;
  --scope-route: #3b3228;
  --scope-fix: #cdba9e;
  --scope-fix-label: #d2b88c;
  --scope-airport: #5ce6b8;
  --scope-ring: #2a2826;
  --scope-final: #c89d54;
  --scope-final-mark: #e8b059;
  --scope-runway: #f8f3ea;
  --scope-history: #8c7e6d;
  --scope-mva: #6b563c;
  --scope-hold: #e8b059;
  --c-onfreq: #5ce6b8;
  --c-inbound: #f0b85a;
  --c-transferred: #8c7e6d;
  --c-warn: #f59f00;
  --c-selected: #fff8eb;
  --c-stca: #ff5a5f;
  --c-los: #ff3b3b;
  --c-wake: #c099ff;
  --c-measure: #f0b85a;
  --c-monitor: #ffd43b;
  --radar-scope: #111a27;
  --radar-scope-sector: #221c17;
  --radar-scope-edge: #5ce6b8;
  --radar-scope-tma: #f0b85a;
  --radar-scope-route: #3b3228;
  --radar-scope-fix: #cdba9e;
  --radar-scope-fix-label: #d2b88c;
  --radar-scope-airport: #5ce6b8;
  --radar-scope-ring: #2a2826;
  --radar-scope-final: #c89d54;
  --radar-scope-final-mark: #e8b059;
  --radar-scope-runway: #f8f3ea;
  --radar-scope-history: #8c7e6d;
  --radar-scope-mva: #6b563c;
  --radar-scope-hold: #e8b059;
  --radar-c-onfreq: #5ce6b8;
  --radar-c-inbound: #f0b85a;
  --radar-c-transferred: #8c7e6d;
  --radar-c-warn: #f59f00;
  --radar-c-selected: #fff8eb;
  --radar-c-stca: #ff5a5f;
  --radar-c-los: #ff3b3b;
}

/* SkyGuard v2.2 Exact Theme 2 — Alpine Slate (Swiss Matte Anthracite, Chalk-White & Ochre) */
:root[data-ui-theme="skyguide"], :root[data-ui-theme="skyguide"][data-theme="light"], :root[data-ui-theme="slate"], :root[data-ui-theme="slate"][data-theme="light"] {
  --bg: #1b1e23;
  --surface: #1e2126;
  --surface-2: #272b33;
  --surface-3: #2e333c;
  --line: #383e49;
  --line-2: #6c7789;
  --ink: #f4f6f8;
  --muted: #9099a7;
  --faint: #727c8a;
  --ok: #f8fafc;
  --accent: #e2b96f;
  --accent-ink: #181b20;
  --on-bg: #2b313b;
  --sel-bg: #312c23;
  --primary-hover: #ecc987;
  --overlay: rgba(27, 30, 35, 0.95);
  --overlay-shell: rgba(30, 33, 38, 0.97);
  --overlay-panel: rgba(30, 33, 38, 0.98);
  --scope: #1b1e23;
  --scope-sector: #262a30;
  --scope-edge: #e2b96f;
  --scope-tma: #7a889c;
  --scope-route: #343a44;
  --scope-fix: #94a0b2;
  --scope-fix-label: #cbd5e1;
  --scope-airport: #f8fafc;
  --scope-ring: #292e36;
  --scope-final: #768294;
  --scope-final-mark: #e2b96f;
  --scope-runway: #f8fafc;
  --scope-history: #6c7685;
  --scope-mva: #525b68;
  --scope-hold: #e2b96f;
  --c-onfreq: #f8fafc;
  --c-inbound: #e2b96f;
  --c-transferred: #94a3b8;
  --c-warn: #ffd166;
  --c-selected: #e2b96f;
  --c-stca: #f06553;
  --c-los: #ff3b3b;
  --c-wake: #9ec5fe;
  --c-measure: #e2b96f;
  --c-monitor: #ffd166;
  --radar-scope: #1b1e23;
  --radar-scope-sector: #262a30;
  --radar-scope-edge: #e2b96f;
  --radar-scope-tma: #7a889c;
  --radar-scope-route: #343a44;
  --radar-scope-fix: #94a0b2;
  --radar-scope-fix-label: #cbd5e1;
  --radar-scope-airport: #f8fafc;
  --radar-scope-ring: #292e36;
  --radar-scope-final: #768294;
  --radar-scope-final-mark: #e2b96f;
  --radar-scope-runway: #f8fafc;
  --radar-scope-history: #6c7685;
  --radar-scope-mva: #525b68;
  --radar-scope-hold: #e2b96f;
  --radar-c-onfreq: #f8fafc;
  --radar-c-inbound: #e2b96f;
  --radar-c-transferred: #94a3b8;
  --radar-c-warn: #ffd166;
  --radar-c-selected: #e2b96f;
  --radar-c-stca: #f06553;
  --radar-c-los: #ff3b3b;
}

/* SkyGuard v2.2 Exact Theme 3 — Daylight Silver (Daylight ATC Silver-Pearl & Filled Pills)
   Inherits native :root[data-theme="light"] foundation; overrides only the Silver-Pearl palette
   and the few widgets with hardcoded dark backgrounds. */
:root[data-theme="light"][data-ui-theme="itec"],
:root[data-ui-theme="itec"] {
  color-scheme: light;
  --bg: #dce4ec;
  --surface: #ecf1f6;
  --surface-2: #dfe7ef;
  --surface-3: #d2dce7;
  --shell: #ecf1f6;
  --shell-2: #ffffff;
  --shell-line: #9db2c6;
  --shell-text: #152536;
  --shell-muted: #334e68;
  --panel: #eef3f8;
  --panel-2: #e3ebf3;
  --panel-3: #d5e0ec;
  --line: #b7c4d1;
  --line-2: #5c7694;
  --ink: #152536;
  --text: #152536;
  --bright: #0b2545;
  --muted: #3d5266;
  --faint: #52657a;
  --ok: #0f6b43;
  --accent: #164e8f;
  --accent-ink: #ffffff;
  --on-bg: #d4e6f9;
  --sel-bg: #dcebfb;
  --primary-hover: #103b6e;
  --overlay: rgba(236, 241, 246, 0.96);
  --overlay-shell: rgba(236, 241, 246, 0.98);
  --overlay-panel: rgba(244, 248, 252, 0.98);
  --backdrop: rgba(15, 35, 55, 0.42);
  --shadow: 0 4px 14px rgba(15, 35, 55, 0.14);
  --ptt-hover: #0b5233;
  --ptt-live: #b91c1c;
  --heard-live: #7f1d1d;
  --placeholder: #5c7288;
  --strip-stca: #fde8c8;
  --strip-wake: #ebe0fa;
  --strip-los: #fad4d4;
  --strip-mon: #faf0c5;
  --emg-bg: #fad4d4;
  --emg-text: #7f1d1d;
  --scope: #c6d4e1;
  --scope-sector: #dce1e6;
  --scope-edge: #0f6b43;
  --scope-tma: #164e8f;
  --scope-route: #9db0c4;
  --scope-fix: #3e5268;
  --scope-fix-label: #1e3a5f;
  --scope-airport: #0f6b43;
  --scope-ring: #b3c4d4;
  --scope-final: #164e8f;
  --scope-final-mark: #0f6b43;
  --scope-runway: #102a43;
  --scope-history: #627487;
  --scope-mva: #5c7694;
  --scope-hold: #164e8f;
  --c-onfreq: #0f6b43;
  --c-inbound: #164e8f;
  --c-transferred: #627487;
  --c-warn: #b45309;
  --c-selected: #0b2545;
  --c-stca: #c92a2a;
  --c-los: #b91c1c;
  --c-wake: #5b3cc4;
  --c-measure: #164e8f;
  --c-monitor: #b45309;
  --area-p: #b91c1c;
  --area-r: #9a3412;
  --area-d: #854d0e;
  --area-tsa: #5b21b6;
  --radar-scope: #c6d4e1;
  --radar-scope-sector: #dce1e6;
  --radar-scope-edge: #0f6b43;
  --radar-scope-tma: #164e8f;
  --radar-scope-route: #9db0c4;
  --radar-scope-fix: #3e5268;
  --radar-scope-fix-label: #1e3a5f;
  --radar-scope-airport: #0f6b43;
  --radar-scope-ring: #b3c4d4;
  --radar-scope-final: #164e8f;
  --radar-scope-final-mark: #0f6b43;
  --radar-scope-runway: #102a43;
  --radar-scope-history: #627487;
  --radar-scope-mva: #5c7694;
  --radar-scope-hold: #164e8f;
  --radar-c-onfreq: #0f6b43;
  --radar-c-inbound: #164e8f;
  --radar-c-transferred: #627487;
  --radar-c-warn: #b45309;
  --radar-c-selected: #0b2545;
  --radar-c-stca: #c92a2a;
  --radar-c-los: #b91c1c;
  --radar-area-p: #b91c1c;
  --radar-area-r: #9a3412;
  --radar-area-d: #854d0e;
  --radar-area-tsa: #5b21b6;
}

/* Daylight Silver: crisp active controls + light styling for the 4 widgets with hardcoded dark colors */
:root[data-ui-theme="itec"] .clock { color: #0f6b43; }
:root[data-ui-theme="itec"] .toggle.on,
:root[data-ui-theme="itec"] .seg button.on,
:root[data-ui-theme="itec"] .rail .btn.on,
:root[data-ui-theme="itec"] .rail .btn[aria-pressed="true"] {
  background: #164e8f;
  border-color: #103b6e;
  color: #ffffff;
}
:root[data-ui-theme="itec"] #ptt {
  background: #0f6b43;
  border-color: #0b5233;
  color: #ffffff;
}
:root[data-ui-theme="itec"] #t-cpdlc {
  background: #164e8f;
  border-color: #103b6e;
  color: #ffffff;
}
:root[data-ui-theme="itec"] .lastline {
  background: #e6f4ee;
  color: #0f3d28;
  border-color: #86c7ab;
}
:root[data-ui-theme="itec"] .classic-sil-hdr,
:root[data-ui-theme="itec"] .aman-hud-hdr,
:root[data-ui-theme="itec"] .cpdlc-head {
  background: #d5e1ed;
  color: #152536;
  border-bottom-color: #b7c4d1;
}
:root[data-ui-theme="itec"] .sil-list li.is-onfreq .sil-cs { color: #0f6b43; font-weight: 700; }
:root[data-ui-theme="itec"] .sil-list li.is-inbound .sil-cs { color: #164e8f; font-weight: 700; }
:root[data-ui-theme="itec"] .ojti-bar,
:root[data-ui-theme="itec"] .incoord-box {
  background: rgba(236, 241, 246, 0.96);
  color: #152536;
  border-color: #9db2c6;
}
:root[data-ui-theme="itec"] .incoord-row select,
:root[data-ui-theme="itec"] .incoord-row input {
  background: #ffffff;
  color: #152536;
  border-color: #9db2c6;
}
:root[data-ui-theme="itec"] .incoord-row button,
:root[data-ui-theme="itec"] .ojti-pill {
  background: #ffffff;
  color: #152536;
  border-color: #9db2c6;
}

/* Fix horizontal clipping in Settings drawer (#set-panel) across all themes */
#set-panel {
  max-width: min(360px, 94vw);
  overflow-x: hidden !important;
  box-sizing: border-box;
}
#set-panel .field,
#set-panel .pref,
#set-panel fieldset {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
#set-panel select,
#set-panel input[type="text"],
#set-panel input[type="number"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-overflow: ellipsis;
}
#set-panel .pref {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* v3.3 — Airline Logo Card in Selected Aircraft Info Panel */
.fr24-logo-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.fr24-logo-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4px 6px 18px; color: #e2e8f0;
}
.fr24-logo-fallback b { font-family: var(--mono); font-size: 16px; letter-spacing: 0.08em; color: #38bdf8; }
.fr24-logo-fallback span { font-size: 9px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.fr24-logo-img {
  position: absolute; inset: 4px 6px 20px 6px; width: calc(100% - 12px); height: calc(100% - 24px);
  object-fit: contain; background: #cbd5e1; border-radius: 5px; padding: 4px 6px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.22);
  filter: contrast(1.08) saturate(1.1);
  opacity: 0; transition: opacity 160ms ease;
}
.fr24-logo-img.loaded { opacity: 1; }

/* Beginner Guided Mode button & compact 4-step interactive checklist */
.beginner-btn {
  background: #0f6b43 !important;
  border-color: #0b5233 !important;
  color: #ffffff !important;
  font-weight: 600;
}
.beginner-btn:hover { background: #138554 !important; }
.newbie-card {
  position: fixed; left: 14px; bottom: 86px; z-index: 38; width: 270px;
  background: var(--overlay-panel, rgba(14, 25, 30, 0.96)); color: var(--text);
  border: 1px solid var(--accent); border-radius: 8px; box-shadow: var(--shadow);
  font-size: 12px; overflow: hidden;
}
.newbie-card .nb-hdr {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-weight: 700; color: var(--bright);
}
.newbie-card .nb-close {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 4px;
}
.newbie-card .nb-list { list-style: none; margin: 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.newbie-card .nb-list li.done { color: var(--ok); text-decoration: line-through; opacity: 0.8; }
.newbie-card .nb-foot { padding: 5px 10px 7px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); }

/* Draggable FCU control menu header */
.lmenu > header { cursor: grab; user-select: none; }
.lmenu > header:active { cursor: grabbing; }

/* Audio/Voices mute state badges & topbar reminder pill */
.audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 82px;
  justify-content: center;
  padding: 0 10px;
  font: 600 11.5px var(--mono);
  letter-spacing: 0.03em;
}
.audio-toggle.muted,
.audio-toggle:not(.on) {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(239, 68, 68, 0.72);
  color: #fca5a5;
}
:root[data-theme="light"] .audio-toggle.muted,
:root[data-theme="light"] .audio-toggle:not(.on) {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}
.mute-pill {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(239, 68, 68, 0.75);
  color: #fecaca;
  font: 600 11px var(--mono);
  padding: 0 8px;
  white-space: nowrap;
}
.mute-pill:hover {
  background: rgba(220, 38, 38, 0.34);
  border-color: #ef4444;
}
:root[data-theme="light"] .mute-pill {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.fcu-lbl-fl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.fcu-rfl-btn {
  border: 0;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  font: 700 9.5px var(--mono);
  padding: 0 4px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.fcu-rfl-btn:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #e0f2fe;
}
:root[data-theme="light"] .fcu-rfl-btn {
  background: #e0f2fe;
  color: #0369a1;
}
:root[data-theme="light"] .fcu-rfl-btn:hover {
  background: #bae6fd;
  color: #0c4a6e;
}

/* Brand lockup on Welcome / Setup screen (Concept A) */
.dlg-head.brand-head {
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.brand-id {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  min-width: 0;
}
.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: block;
}
.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand-title {
  margin: 0 !important;
  font: 700 19px/1.1 var(--sans) !important;
  letter-spacing: 0.08em;
  color: var(--bright);
}
.brand-sub {
  font: 600 10.5px/1.1 var(--mono);
  letter-spacing: 0.22em;
  color: var(--accent);
}
.brand-sig {
  margin-top: 2px;
  font: 400 10.5px/1.1 var(--sans);
  letter-spacing: 0.03em;
  color: var(--muted);
}
:root[data-theme="light"] .brand-title { color: #0f172a; }
:root[data-theme="light"] .brand-sub { color: #0284c7; }
:root[data-theme="light"] .brand-sig { color: #64748b; }

/* === Option A Rail Menu, Classified Map Layers & Ctrl+K Command Palette === */
.layers-btn, .tools-menu-btn, .cmd-quick-btn { gap: 5px; font-weight: 600; }
.cmd-quick-btn kbd, .tools-pop kbd, .cmd-box kbd {
  font: 600 10px/1 var(--mono); padding: 2px 5px; border-radius: 4px;
  background: rgba(15, 23, 42, 0.55); border: 1px solid var(--border); color: var(--muted);
}
.tools-pop {
  min-width: 255px; padding: 8px; display: none; flex-direction: column; gap: 4px;
}
.tools-pop:popover-open { display: flex; }
.tools-pop h3 {
  margin: 6px 6px 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted);
}
.tools-pop h3:first-child { margin-top: 2px; }
.tool-mi {
  width: 100%; background: transparent; border: 1px solid transparent; border-radius: 7px;
  color: var(--ink); padding: 7px 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; text-align: left;
}
.tool-mi:hover { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.35); }
.tool-mi.on, .tool-mi[aria-pressed="true"] {
  background: rgba(56, 189, 248, 0.18); border-color: var(--accent); color: var(--bright);
}
.tool-mi .tmi-l { display: inline-flex; align-items: center; gap: 8px; }
.tool-mi .tmi-tag {
  font: 600 10px/1 var(--mono); padding: 2px 5px; border-radius: 4px;
  background: rgba(148, 163, 184, 0.14); color: var(--muted);
}

/* Classified Map Layers Popover */
.filters-v4 {
  width: min(350px, 92vw); max-height: 82vh; overflow-y: auto; padding: 10px;
}
.fv4-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.fv4-head h3 { margin: 0; font-size: 13px; }
.fv4-saved {
  font: 600 10.5px/1 var(--mono); padding: 3px 7px; border-radius: 999px;
  background: rgba(52, 211, 153, 0.14); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35);
}
.fv4-presets {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 9px;
}
.fv4-preset {
  justify-content: center; padding: 5px 4px !important; font-size: 11px !important;
}
.fv4-preset.on {
  background: rgba(56, 189, 248, 0.18) !important; border-color: var(--accent) !important; color: var(--bright) !important;
}
.fv4-cat {
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 7px; overflow: hidden;
  background: rgba(15, 23, 42, 0.25);
}
.fv4-cat > summary {
  list-style: none; cursor: pointer; padding: 7px 9px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 600; background: rgba(148, 163, 184, 0.08);
  user-select: none;
}
.fv4-cat > summary::-webkit-details-marker { display: none; }
.fv4-all {
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: transparent; color: var(--muted); border: 1px solid var(--border); cursor: pointer;
}
.fv4-all:hover { color: var(--bright); border-color: var(--accent); }
.fv4-items {
  padding: 6px 9px 8px; display: flex; flex-direction: column; gap: 5px;
}
.fv4-subh {
  margin-top: 4px; font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
}

/* Command Palette (Ctrl+K) */
.cmd-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(3, 7, 15, 0.68); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh;
}
.cmd-backdrop[hidden] { display: none !important; }
.cmd-box {
  width: min(500px, 92vw); background: var(--panel); border: 1px solid var(--accent);
  border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}
.cmd-input-wrap {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, 0.22);
}
.cmd-input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--bright); font-size: 14px; font-family: var(--sans);
}
.cmd-list {
  max-height: 320px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.cmd-item {
  width: 100%; background: transparent; border: none; border-radius: 7px;
  color: var(--ink); padding: 8px 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; text-align: left;
}
.cmd-item:hover, .cmd-item.sel { background: rgba(56, 189, 248, 0.16); color: var(--bright); }
.cmd-cat {
  font: 600 10px/1 var(--mono); text-transform: uppercase; color: var(--muted);
  padding: 2px 6px; border-radius: 4px; background: rgba(148, 163, 184, 0.12);
}
:root[data-theme="light"] .fv4-cat { background: rgba(15, 23, 42, 0.03); }
:root[data-theme="light"] .cmd-box { background: #ffffff; }
:root[data-theme="light"] .cmd-input-wrap { background: #f8fafc; }
:root[data-theme="light"] .cmd-input-wrap input { color: #0f172a; }

/* === Compact VEC Select & Tabbed Settings Panel === */
.vec-select {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: var(--r);
  border: 1px solid var(--shell-line); background: var(--shell-2);
  height: 28px;
}
.vec-select .seg-label { font: 600 10.5px/1 var(--mono); color: var(--shell-muted); }
.vec-select select {
  background: transparent; border: none; color: var(--bright);
  font: 600 11.5px/1 var(--mono); cursor: pointer; outline: none; padding: 2px 2px;
}
.vec-select select option { background: var(--panel); color: var(--text); }
:root[data-theme="light"] .vec-select select { color: #0f172a; }

.set-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin: 6px 0 10px; padding: 3px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line);
}
.set-tab {
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--muted); padding: 6px 4px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; text-align: center; transition: all 0.12s ease; white-space: nowrap;
}
.set-tab:hover { color: var(--bright); background: rgba(255, 255, 255, 0.05); }
.set-tab.on {
  background: rgba(56, 189, 248, 0.18); border-color: var(--accent); color: var(--bright);
}
#set-panel [data-tab-hidden="true"] { display: none !important; }
:root[data-theme="light"] .set-tabs { background: rgba(15, 23, 42, 0.08); }

/* === Collapsible Advanced Options on Startup Dialog (#setup) === */
.setup-adv {
  border: 1px solid var(--line); border-radius: 8px; margin: 10px 0;
  background: rgba(15, 23, 42, 0.25); overflow: hidden;
}
.setup-adv > summary {
  cursor: pointer; padding: 9px 12px; font: 600 12.5px/1.3 var(--sans);
  color: var(--bright); display: flex; align-items: center; justify-content: space-between; gap: 8px;
  list-style: none; user-select: none; background: rgba(148, 163, 184, 0.08);
}
.setup-adv > summary::-webkit-details-marker { display: none; }
.setup-adv > summary::after { content: "▾"; font-size: 13px; color: var(--accent); transition: transform 0.15s; }
.setup-adv[open] > summary::after { transform: rotate(180deg); }
.setup-adv-hint {
  font: 500 10.5px/1 var(--mono); color: var(--muted); margin-left: auto;
}
.setup-adv-body {
  padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 10px;
}
:root[data-theme="light"] .setup-adv { background: rgba(15, 23, 42, 0.04); }

#aero-rwys:not(:empty) { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 12px; width: 100%; margin: 4px 0; }

/* === Top-Bar Google Account Avatar & Admin History === */
.acct-avatar-btn {
  padding: 0 !important; width: 30px; height: 30px; border-radius: 50% !important;
  overflow: hidden; display: inline-grid; place-items: center;
  border: 1.5px solid var(--accent) !important; background: var(--shell-2);
  font: 700 12px/1 var(--sans); color: var(--bright); flex-shrink: 0;
}
.acct-avatar-btn[hidden] { display: none !important; }
.acct-avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-pop { min-width: 260px; padding: 10px; display: none; flex-direction: column; gap: 6px; }
.acct-pop:popover-open { display: flex; }
.acct-head {
  display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px;
  border-bottom: 1px solid var(--line);
}
.acct-av {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: rgba(56, 189, 248, 0.2); color: var(--bright);
  display: grid; place-items: center; font: 700 14px/1 var(--sans); border: 1px solid var(--accent);
}
.acct-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-meta { min-width: 0; }
.acct-meta strong { display: block; font-size: 13px; color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-meta small { display: block; font-size: 11px; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-u-row { cursor: pointer; }
.adm-u-row:hover { background: rgba(56, 189, 248, 0.08); }
.adm-av {
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: inline-grid; place-items: center; background: rgba(56, 189, 248, 0.18);
  color: var(--bright); font: 700 11px/1 var(--sans); border: 1px solid var(--line);
  vertical-align: middle; margin-right: 7px;
}
.adm-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-hist-row td { background: rgba(0, 0, 0, 0.22); padding: 8px 12px !important; }
.adm-hist-list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.adm-hist-list li {
  font: 11px/1.3 var(--mono); padding: 3px 7px; border-radius: 5px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}

/* === Feedback Top-Bar Icon, Modal & Admin Ban / Feedback Tabs === */
.fb-top-btn { position: relative; font-size: 14px; }
.fb-top-btn[hidden] { display: none !important; }
.fb-badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 99px; background: #ef4444; color: #fff;
  font: 700 10px/16px var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--shell);
}
.fb-badge[hidden] { display: none !important; }
.adm-tabs { display: flex; gap: 6px; padding: 10px 16px 0; border-bottom: 1px solid var(--line); }
.adm-tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  padding: 7px 12px; color: var(--muted); font: 600 13px/1.2 var(--sans); cursor: pointer;
}
.adm-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.adm-ban-btn {
  padding: 3px 8px; border-radius: 6px; font: 600 11px/1.2 var(--sans); cursor: pointer;
  border: 1px solid rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.12); color: #fca5a5;
}
.adm-ban-btn:hover { background: rgba(239, 68, 68, 0.24); }
.adm-ban-btn.is-banned {
  border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.14); color: #86efac;
}
.adm-banned-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5; font: 700 10px/1.3 var(--mono); vertical-align: middle;
}
.adm-u-row.is-banned td { opacity: 0.7; }
.fb-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fb-cat {
  padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: 600 12px/1.2 var(--sans); cursor: pointer;
}
.fb-cat.active { border-color: var(--accent); background: rgba(56, 189, 248, 0.18); color: var(--bright); }
.fb-stars { display: inline-flex; gap: 4px; margin-bottom: 10px; }
.fb-star {
  background: none; border: none; font-size: 20px; cursor: pointer; color: var(--muted); padding: 0 2px;
}
.fb-star.on { color: #facc15; }
.fb-textarea {
  width: 100%; min-height: 110px; resize: vertical; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--bright);
  font: 13.5px/1.45 var(--sans); box-sizing: border-box;
}
.fb-card {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 9px;
  background: rgba(15, 23, 42, 0.35);
}
.fb-card.is-new { border-color: rgba(56, 189, 248, 0.55); }
.fb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.fb-card-msg { margin: 6px 0 8px; font-size: 13px; line-height: 1.45; color: var(--bright); white-space: pre-wrap; }
.fb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }

/* === Promo Video Clickable Thumbnail Card (#setup) & Cinema Modal === */
.promo-thumb-card {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 10px 0 8px; padding: 7px 10px 7px 7px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(14, 25, 41, 0.72);
  color: var(--bright); cursor: pointer; text-align: left;
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}
.promo-thumb-card:hover {
  border-color: var(--accent); background: rgba(19, 36, 58, 0.92); transform: translateY(-1px);
}
.promo-thumb-media {
  position: relative; width: 112px; aspect-ratio: 16/9; border-radius: 7px;
  overflow: hidden; flex-shrink: 0; border: 1px solid rgba(56, 189, 248, 0.35); background: #000;
}
.promo-thumb-media img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; }
.promo-play-dot {
  position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(14, 165, 233, 0.92); color: #fff; display: grid; place-items: center;
  font-size: 12px; padding-left: 2px; box-shadow: 0 3px 12px rgba(14, 165, 233, 0.55);
}
.promo-thumb-info { min-width: 0; flex: 1; }
.promo-thumb-info strong { display: block; font: 600 13px/1.25 var(--sans); color: var(--bright); }
.promo-thumb-info small { display: block; margin-top: 2px; font: 11.5px/1.3 var(--sans); color: var(--muted); }
.promo-thumb-badge {
  font: 700 10.5px/1 var(--mono); padding: 4px 7px; border-radius: 5px;
  background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(56, 189, 248, 0.45); color: var(--accent);
}
:root[data-theme="light"] .promo-thumb-card { background: rgba(15, 23, 42, 0.05); }

dialog#promo-video-modal {
  padding: 0; border: 1px solid var(--accent); border-radius: 14px;
  background: #09111d; color: var(--bright); max-width: 960px; width: 95vw;
  overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.78);
}
dialog#promo-video-modal::backdrop {
  background: rgba(4, 9, 16, 0.86); backdrop-filter: blur(6px);
}


/* ============================================================================
 * CLASSIC US (ERAM/STARS-STYLE) THEME — Pure Black Scope & High-Contrast Green/White
 * 100% original house CSS/Canvas palette (FAA public-domain symbology style, no proprietary assets)
 * ============================================================================ */
:root[data-ui-theme="usclassic"] {
  /* Authentic FAA ERAM/STARS Video Map luminance hierarchy: dim neutral-olive map, crisp high-contrast FDBs */
  --bg: #000000;
  --scope: #000000;
  --scope-sector: #030506;
  --scope-edge: #3c4f47;
  --scope-tma: #30454c;
  --scope-route: #182226;
  --scope-fix: #4b5e57;
  --scope-fix-label: #627870;
  --scope-airport: #7b9389;
  --scope-ring: #141e22;
  --scope-final: #344c46;
  --scope-final-mark: #4f6b62;
  --scope-runway: #a3b3bc;
  --scope-history: #485e54;
  --scope-mva: #243c35;
  --scope-hold: #4c665d;
  --scope-class-b: #3b586e;
  --scope-class-c: #524869;
  --scope-class-d: #3c5266;
  --c-onfreq: #4ade80;
  --c-inbound: #94a3b8;
  --c-transferred: #4d5d56;
  --c-selected: #facc15;
  --c-stca: #f59e0b;
  --c-los: #ef4444;
  --c-wake: #c084fc;
  --c-warn: #facc15;
  --c-measure: #4ade80;
  --c-monitor: #fde047;
  --panel: #07090b;
  --panel-2: #0d1114;
  --shell: #06080a;
  --shell-2: #0c1013;
  --line: #1d2a22;
  --text: #e2f5e8;
  --muted: #7f9c88;
  --accent: #4ade80;
}
:root[data-ui-theme="usclassic"] .rail,
:root[data-ui-theme="usclassic"] .panel,
:root[data-ui-theme="usclassic"] .txbar,
:root[data-ui-theme="usclassic"] .hud-card,
:root[data-ui-theme="usclassic"] .aman-hud {
  background: #070a08 !important;
  border-color: #1f3326 !important;
  border-radius: 3px !important;
  backdrop-filter: none !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.75) !important;
}
:root[data-ui-theme="usclassic"] .btn,
:root[data-ui-theme="usclassic"] .tool-btn,
:root[data-ui-theme="usclassic"] .rail button {
  border-radius: 3px !important;
}

/* ============================================================================
 * FLOATING IN-SESSION BETA FEEDBACK / VOTE BADGE (Chantier #4)
 * ============================================================================ */
.ec-beta-pill {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 60;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(8, 12, 16, 0.88);
  border: 1px solid rgba(74, 222, 128, 0.32);
  color: #cbd5e1;
  font: 11.5px/1.2 var(--sans, system-ui, sans-serif);
  opacity: 0.55;
  transition: opacity 220ms ease, border-color 180ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.ec-beta-pill.is-faded { opacity: 0.28; }
.ec-beta-pill:hover, .ec-beta-pill:focus-within { opacity: 1 !important; border-color: rgba(74, 222, 128, 0.7); }
.ec-beta-pill button {
  background: transparent;
  border: none;
  color: #86efac;
  font: 600 11.5px/1 var(--sans, system-ui, sans-serif);
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
}
.ec-beta-pill button:hover { background: rgba(74, 222, 128, 0.14); color: #fff; }
.ec-beta-pill .ec-beta-x { color: #94a3b8; font-weight: 400; padding: 1px 4px; }
@media (max-width: 640px) { .ec-beta-pill { display: none !important; } }

/* BYOK Gemini Flash TTS key input */
.gemini-key-wrap {
  display: grid;
  gap: 6px;
  margin: 4px 0 6px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.45);
}
.gemini-key-wrap[hidden] { display: none !important; }
.gemini-key-row { display: flex; gap: 6px; align-items: center; }
.gemini-key-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.gemini-key-hint { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.gemini-key-hint a { color: #60a5fa; text-decoration: underline; }
.gemini-key-status { font-size: 11.5px; min-height: 14px; color: var(--muted); }

/* Discreet VHF RX indicator on the radio bar */
.rx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(148, 163, 184, 0.65);
  font: 700 10.5px/1 var(--mono, monospace);
  letter-spacing: 0.08em;
  flex: none;
  user-select: none;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.rx-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.45);
  transition: background 140ms ease, box-shadow 140ms ease;
}
.rx-pill.is-pending {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(20, 83, 45, 0.35);
}
.rx-pill.is-pending i {
  background: #4ade80;
  animation: rxPulse 0.9s ease-in-out infinite;
}
.rx-pill.is-live {
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.85);
  background: rgba(21, 128, 61, 0.48);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.32);
}
.rx-pill.is-live i {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
@keyframes rxPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ============================================================================
 * 1-CLICK QUICK RATING (Pill + Setup 2nd visit + Debrief)
 * ============================================================================ */
.ec-qr-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  background: rgba(15, 23, 42, 0.55);
  font-size: 12.5px;
  color: var(--text);
}
.ec-qr-banner[hidden] { display: none !important; }
.ec-qr-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.ec-qr-emojis { display: inline-flex; align-items: center; gap: 3px; }
.ec-qr-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.ec-qr-btn:hover { background: rgba(74, 222, 128, 0.16); border-color: rgba(74, 222, 128, 0.45); transform: scale(1.14); }
.ec-qr-btn.is-chosen { background: rgba(74, 222, 128, 0.22); border-color: #4ade80; }
.ec-qr-note-row { display: inline-flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.ec-qr-input {
  width: 210px;
  max-width: 48vw;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.85);
  color: #f8fafc;
  font: 12px/1.3 var(--sans, system-ui, sans-serif);
}
.ec-qr-input:focus { outline: none; border-color: #4ade80; }
.ec-qr-send {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(74, 222, 128, 0.55);
  background: rgba(21, 128, 61, 0.45);
  color: #dcfce7;
  font: 600 11.5px/1.2 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}
.ec-qr-send:hover { background: rgba(21, 128, 61, 0.72); color: #fff; }
.ec-qr-msg { font-size: 11.5px; color: #4ade80; font-weight: 600; }
.ec-beta-pill.is-rating { opacity: 1 !important; border-color: rgba(74, 222, 128, 0.65); }

/* ERAM / STARS Position Relief Briefing (FAA Check-list) */
.ec-relief-backdrop{position:fixed;top:64px;left:50%;transform:translateX(-50%);z-index:1200;pointer-events:none;width:min(430px,calc(100vw - 24px))}
.ec-relief-card{pointer-events:auto;width:100%;background:rgba(6,13,24,0.95);backdrop-filter:blur(6px);border:1px solid rgba(56,189,248,0.45);border-radius:10px;box-shadow:0 20px 50px rgba(0,0,0,0.65);padding:18px 20px;font-family:var(--mono,'IBM Plex Mono',monospace);color:#e2e8f0}
.ec-relief-kicker{font-size:10px;letter-spacing:.12em;color:#38bdf8;font-weight:700;text-transform:uppercase;margin-bottom:4px}
.ec-relief-title{font-size:16px;font-weight:700;color:#f8fafc;margin:0 0 12px}
.ec-relief-grid{display:grid;grid-template-columns:110px 1fr;gap:7px 10px;font-size:12px;border-top:1px solid rgba(148,163,184,0.18);border-bottom:1px solid rgba(148,163,184,0.18);padding:11px 0;margin-bottom:14px}
.ec-relief-k{color:#94a3b8;text-transform:uppercase;font-size:10px;letter-spacing:.06em;align-self:center}
.ec-relief-v{color:#f1f5f9;font-weight:600}
.ec-relief-v.ok{color:#4ade80}
.ec-relief-actions{display:flex;justify-content:flex-end;gap:8px}
.ec-relief-btn{background:#0284c7;color:#fff;border:0;border-radius:6px;padding:8px 16px;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer;letter-spacing:.04em}
.ec-relief-btn:hover{background:#0ea5e9}
