:root {
  color-scheme: dark;
  --bg: #0a1018; --bar: #0e1621; --panel: #111b28; --raised: #182536;
  --line: #26364a; --dim-line: #1e2b3b; --text: #edf3fc; --muted: #a7b6cb;
  --accent: #6eaafa; --accent-strong: #397ce9; --mint: #61dcb4;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button, select, input[type="checkbox"], input[type="range"] { cursor: pointer; }
button, select, input[type="number"] { color: var(--text); }
button:disabled { opacity: .44; cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #9bc9ff; outline-offset: 3px; }
button { background: none; border: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-icon] svg { width: 1.18em; height: 1.18em; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); font-size: .875rem; }
.topbar, .workspace { max-width: 1920px; margin-inline: auto; }
.topbar { height: 67px; background: var(--bar); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 26px; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-icon { background: #3474dc; border-radius: 9px; width: 39px; height: 39px; font-size: 1.28rem; color: white; }
.brand strong { display: block; font-weight: 760; font-size: 1.02rem; letter-spacing: .16em; line-height: 1.14; }
.brand-period { color: var(--accent); }
.brand small { color: var(--muted); display: block; font: .675rem var(--mono); letter-spacing: .095em; margin-top: 4px; }
.header-meta { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: .83rem; white-space: nowrap; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; background: var(--mint); border-radius: 50%; flex: none; box-shadow: 0 0 8px #61dcb452; }
.topbar.is-paused .status-dot { background: #f7bd6e; box-shadow: none; }
.separator { width: 1px; height: 19px; background: var(--line); margin-inline: 6px; }
#clock { font: .81rem var(--mono); color: var(--text); }
.workspace { display: grid; grid-template-columns: 82px minmax(0, 1fr); min-height: calc(100dvh - 67px); }
.navigation { background: #0e1621; border-right: 1px solid var(--dim-line); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 16px 6px; }
.nav-main { display: grid; gap: 7px; }
.nav-button { width: 100%; min-height: 62px; display: grid; place-content: center; justify-items: center; gap: 7px; border-radius: 8px; padding: 6px 2px; color: var(--muted); font-size: .675rem; font-weight: 620; border: 1px solid transparent; }
.nav-button [data-icon] { font-size: 1.13rem; }
.nav-button:hover, .icon-button:hover { background: var(--raised); color: var(--text); }
.nav-button.active { color: #a5caff; border-color: #244978; background: #162c48; }
main { min-width: 0; padding: 25px clamp(16px, 2.1vw, 38px) 0; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.intro-main { flex: 1 1 auto; min-width: 0; }
.intro-title { display: flex; align-items: center; flex-wrap: wrap; column-gap: 16px; row-gap: 4px; }
#operations-airport { width: min(295px, 100%); }
main:not([data-view="overview"]) #operations-airport,
main[data-view="overview"] :is(#airport-picker, #live-3d),
main[data-view="overview"][data-source="live"] .comms-panel { display: none; }
.eyebrow { color: var(--accent); font: 600 .72rem var(--mono); letter-spacing: .095em; display: flex; align-items: center; gap: 8px; }
.eyebrow-divider { width: 3px; height: 3px; background: var(--muted); border-radius: 50%; }
h1 { font-size: clamp(1.66rem, 2.55vw, 2.63rem); letter-spacing: -.047em; line-height: 1.16; margin: 6px 0; font-weight: 720; }
.intro p { line-height: 1.45; color: var(--muted); }
.intro-controls { min-width: 0; max-width: 100%; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
#departure-cockpit { max-width: 100%; }
#departure-status:not(:empty) { margin-top: 8px; text-align: right; font-size: .875rem; }
.button, .icon-button, select, input[type="number"] { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: #172435; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; line-height: 1.15; font-size: .875rem; font-weight: 640; }
.button:hover:not(:disabled), .button[aria-pressed="true"] { background: #243b56; border-color: #5076a1; }
.button-outline { background: transparent; }
.button-primary { color: #fff; background: #2862c6; border-color: #427bd8; }
.button-primary:hover:not(:disabled) { background: #3475e5; }
.icon-button { color: var(--muted); width: 37px; min-width: 37px; padding: 0; display: inline-grid; place-content: center; }
select, input[type="number"] { padding: 6px 10px; font-size: .875rem; min-width: 0; max-width: 100%; }
select { appearance: none; padding-right: 29px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b5c5dc' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 17px; }
.metrics article { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); padding: 12px 14px; min-width: 0; }
.metric-icon { width: 39px; height: 39px; border-radius: 8px; font-size: 1.045rem; }
.metric-icon.sky { color: #9cc6ff; background: #1a3558; }
.metric-icon.mint { color: #80e7c6; background: #153c39; }
.metric-icon.gold { color: #f3c37d; background: #423521; }
.metric-icon.violet { color: #cebbff; background: #322b52; }
.metrics article div { min-width: 0; }
.metrics article div > span { color: var(--muted); display: block; font-size: .82rem; white-space: nowrap; }
.metrics strong { display: block; font-size: 1.22rem; line-height: 1.2; font-weight: 700; margin-top: 2px; }
#time-display[data-real] { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
#time-display-label { white-space: normal; line-height: 1.12; }
#daylight-status { color: #afbde0; display: block; margin-top: 2px; font-size: .72rem; }
#daylight-status[data-phase="day"] { color: #efd18e; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 345px); align-items: stretch; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
.scene-panel { display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; gap: 8px; min-height: 53px; border-bottom: 1px solid var(--dim-line); }
.panel-head h2 { display: flex; align-items: center; gap: 9px; font-size: .985rem; font-weight: 670; }
.panel-head h2 [data-icon] { color: var(--accent); }
.panel-head select { min-height: 33px; }
.panel-toolbar { display: flex; align-items: center; gap: 7px; }
.panel-toolbar .panel-toggle { min-width: 27px; width: 27px; min-height: 29px; border-color: transparent; background: transparent; }
.panel.is-collapsed { align-self: start; }
.panel.is-collapsed > :not(.panel-head) { display: none; }
.panel.is-collapsed .panel-head { border-bottom: 0; }
.panel.is-collapsed .panel-toggle svg { transform: rotate(180deg); }
#main[data-view-size="compact"] .scene-frame { height: 320px; }
#main[data-view-size="large"] .scene-frame { height: clamp(390px, 67vh, 800px); }
#main[data-view-size="compact"] .radar-field { height: 190px; }
#main[data-view-size="large"] .radar-field { height: clamp(275px, 49vh, 520px); }
#main .scene-frame:is(:fullscreen, .is-expanded) { position: fixed; inset: 0; height: 100%; width: 100%; margin: 0; }
body.scene-expanded { overflow: hidden; }
.scene-frame.is-expanded { z-index: 300; }
#fullscreen-cameras { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; min-width: 0; pointer-events: auto; }
#fullscreen-cameras select { max-width: 100%; }
.scene-frame { isolation: isolate; position: relative; height: clamp(330px, 44vh, 580px); flex: 1 0 auto; background: linear-gradient(163deg, #83afcb, #c3ccd0 46%, #51604d 47%, #344434); }
#gl-canvas, #radar-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.viewport-top, .viewport-bottom { position: absolute; inset-inline: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 2; }
.viewport-top { top: 12px; align-items: flex-start; }
.viewport-bottom { bottom: 11px; align-items: end; }
.viewport-badge, #view-hint, .viewport-button { color: white; background: #0b1522e8; border: 1px solid #98b0cc65; border-radius: 6px; }
.viewport-badge { display: flex; align-items: center; gap: 7px; padding: 7px 9px; font: .72rem var(--mono); letter-spacing: .035em; }
.compass { width: 39px; height: 39px; border-radius: 50%; border: 1px solid #98b0cc85; background: #0b1522df; display: grid; place-items: center; position: relative; font: .66rem var(--mono); }
.compass span { position: absolute; top: 2px; }
.compass b { height: 23px; width: 2px; margin-top: 4px; background: linear-gradient(var(--accent) 50%, #fff 50%); border-radius: 3px; }
#view-hint { display: inline-flex; align-items: center; gap: 6px; padding: 7px 8px; font-size: .76rem; }
.view-buttons { display: flex; gap: 6px; pointer-events: auto; }
.view-buttons .icon-button { background: #101b29eb; color: #ebf5ff; border-color: #778ba2; }
.scene-notice { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #101b29ee; padding: 12px 17px; border: 1px solid var(--line); border-radius: 8px; max-width: 90%; text-align: center; }
#scene-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.scene-label { position: absolute; transform: translate(-50%, -115%); background: #101d2dde; color: #eaf2fe; border: 1px solid #7090b4; padding: 4px 7px; border-radius: 4px; font: 600 .72rem var(--mono); white-space: nowrap; }
.scene-label.selected { color: #fff; background: #2456a8; border-color: #8bb4f6; }
.viewport-button { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 3; white-space: nowrap; }
.scene-footer, .radar-footer { min-height: 35px; padding: 7px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font: .725rem var(--mono); }
.scene-footer span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.scene-footer [data-icon] { color: var(--accent); }
.counter, .frequency { background: #1a2d45; color: #acd0ff; border-radius: 5px; padding: 4px 7px; font: .75rem var(--mono); }
.traffic-panel { display: flex; flex-direction: column; }
.segmented { display: inline-flex; gap: 3px; background: #0d1520; border: 1px solid var(--dim-line); padding: 3px; border-radius: 7px; }
.traffic-panel > .segmented { margin: 11px 12px 3px; }
.segmented button { display: inline-flex; flex: 1; justify-content: center; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; border-radius: 5px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: #203552; color: #d5e8ff; }
.segmented button:hover { color: #fff; }
.flight-list { list-style: none; margin: 0; padding: 6px 12px; flex: 1; max-height: 278px; overflow: auto; }
.flight-list li + li { margin-top: 4px; }
.flight-row { width: 100%; border-radius: 6px; padding: 7px 8px; color: var(--text); border: 1px solid transparent; display: grid; grid-template-columns: 31px minmax(0,1fr) auto; text-align: left; align-items: center; gap: 8px; min-height: 43px; }
.flight-row:hover { background: #19293b; }
.flight-row.selected { background: #172c47; border-color: #2c4f7e; }
.flight-symbol { width: 30px; height: 30px; border-radius: 6px; background: #1e3550; color: #a9ccfd; }
.flight-identity { min-width: 0; display: grid; gap: 1px; }
.flight-identity strong { font: 650 .82rem var(--mono); overflow: hidden; text-overflow: ellipsis; }
.flight-identity small { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flight-status { color: #bdcce0; background: #263447; padding: 3px 6px; border-radius: 5px; font-size: .68rem; text-align: center; }
.flight-status.air { color: #89e6ca; background: #183b39; }
.flight-status.warn { color: #f5cd92; background: #423421; }
.selection { background: #0e1723; padding: 11px 13px; border-top: 1px solid var(--line); }
.selection-header { display: flex; align-items: center; justify-content: space-between; }
.selection-header small { display: block; font: .665rem var(--mono); color: var(--muted); margin-bottom: 3px; }
.selection-header strong { font: 650 .96rem var(--mono); }
.selection-header .icon-button { min-height: 33px; width: 33px; min-width: 33px; }
.flight-data { margin: 9px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.flight-data div + div { border-left: 1px solid var(--line); padding-left: 8px; }
.flight-data dt { font-size: .72rem; color: var(--muted); }
.flight-data dd { margin: 2px 0 0; font: .82rem var(--mono); }
.atc-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.atc-actions:not(:empty), #selected-live:not([hidden]) { margin-top: 8px; }
.atc-actions .button { min-height: 30px; padding: 5px 7px; font-size: .72rem; }
.radar-field { height: 216px; position: relative; background: #091a20; }
.radar-range { position: absolute; top: 11px; left: 12px; pointer-events: none; font: .75rem var(--mono); color: #9eeed3; }
.radar-range small { display: block; margin-top: 4px; color: #a1bdba; font-size: .65rem; }
.radar-tools { position: absolute; top: 8px; right: 8px; display: grid; gap: 4px; }
.radar-tools .icon-button { min-height: 28px; min-width: 29px; width: 29px; background: #122a31; color: #b6e4db; }
.radar-footer { min-height: 35px; border-top: 1px solid var(--dim-line); flex-wrap: wrap; }
.radar-footer select { min-height: 32px; }
.source-tabs button { min-height: 27px; }
.source-tabs .status-dot { width: 6px; height: 6px; }
.comms-options { padding: 8px 13px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--dim-line); }
.comms-options label, .inline-label { display: flex; align-items: center; gap: 6px; font-size: .79rem; color: var(--muted); }
.comms-options .icon-button { min-height: 30px; min-width: 31px; width: 31px; }
.comms-options .icon-button[aria-pressed="true"] { color: #82e9bd; border-color: #528776; }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); }
.atc-log { padding: 4px 12px 10px; max-height: 208px; overflow-y: auto; scrollbar-color: #344e68 transparent; }
.atc-msg { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; padding: 8px 0; border-bottom: 1px solid var(--dim-line); }
.atc-time, .atc-sender { font: .725rem var(--mono); }
.atc-time { color: var(--muted); }
.atc-sender { color: #92bcf7; font-weight: 640; }
.atc-msg p { grid-column: 2; color: #cbd8ea; font-size: .82rem; line-height: 1.4; }
.app-footer { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .75rem; padding: 15px 0 17px; }
.welcome-panel { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 26px; margin-bottom: 14px; padding: 15px 56px 15px 18px; border: 1px solid #375b80; border-radius: 10px; background: #132437; }
.welcome-panel strong { display: block; font-size: clamp(1rem, 1.55vw, 1.4rem); line-height: 1.35; }
.welcome-panel p { margin-top: 6px; font-size: clamp(.89rem, 1.2vw, 1.08rem); color: #c4d6ed; }
.welcome-close { position: absolute; top: 8px; right: 8px; }
main:not([data-view="overview"]) .welcome-panel { display: none; }
.stats-page { width: min(900px, calc(100% - 32px)); margin: 32px auto; }
.stats-page h1 { margin-block: 12px 20px; }
.stats-page a { color: #a9cdff; }
.stats-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(145px,100%),1fr)); gap: 10px; }
.stats-totals div { padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.stats-totals dd { margin: 6px 0 0; font-size: 1.65rem; font-weight: 700; }
.stats-periods { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 20px 12px; }
.stats-periods a { padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.stats-periods [aria-current] { background: var(--raised); border-color: var(--accent); }
.stats-table { width: 100%; border-collapse: collapse; text-align: left; }
.stats-table caption { text-align: left; padding-block: 8px; color: var(--muted); }
.stats-table :is(th,td) { padding: 9px 11px; border-bottom: 1px solid var(--line); }
@media (max-width: 740px) { .welcome-panel { grid-template-columns: 1fr; } }
.pilot-panel { grid-column: 1 / -1; }
.pilot-controls, .flight-pad { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 12px; }
.pilot-controls label { display: grid; gap: 4px; color: var(--muted); font-size: .83rem; }
.pilot-controls label:has(#throttle) { grid-template-columns: 1fr auto; }
.pilot-controls input[type="range"] { grid-column: 1 / -1; }
#pilot-report { margin: 0 12px 12px; }
.flight-pad .button, #touch-move button { touch-action: none; user-select: none; }
main[data-view="radar"] .radar-panel { grid-column: 1; grid-row: 1; }
main[data-view="radar"] .traffic-panel { grid-column: 2; grid-row: 1; }
main[data-view="radar"] .radar-field { height: clamp(340px, 55vh, 630px); }
main[data-view="radar"] .scene-panel { display: none; }
main[data-view="radar"] .comms-panel { grid-column: 1 / -1; }
main[data-view="flight"] .pilot-panel { grid-row: 2; }
#touch-move { position: absolute; z-index: 3; left: 12px; bottom: 55px; display: grid; justify-items: center; gap: 4px; }
#touch-move button { color: #fff; background: #12223be8; border: 1px solid #91b0d6; border-radius: 6px; width: 39px; height: 36px; }
dialog { width: min(520px, calc(100% - 24px)); max-height: 90dvh; color: var(--text); background: var(--panel); border: 1px solid #48617d; border-radius: 12px; padding: 0; }
dialog::backdrop { background: #050b14b5; }
dialog header { padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
dialog h2 { font-size: 1.2rem; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 17px; }
.settings-fields label:not(.inline-label) { display: grid; gap: 4px; align-content: start; }
.settings-fields label { color: var(--muted); font-size: .875rem; }
.help-list { margin: 0; padding: 15px 18px 19px; }
.help-list div + div { margin-top: 12px; }
.help-list dt { font-weight: 650; }
.help-list dd { margin: 3px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.empty-list { color: var(--muted); padding: 10px 5px; font-size: .875rem; }
@media (max-width: 1100px) {
  .dashboard { grid-template-columns: minmax(0,1fr) minmax(260px, 305px); gap: 12px; }
  .metrics { gap: 8px; }
  .metrics article { padding-inline: 9px; gap: 7px; }
}
@media (max-width: 850px) {
  .workspace { display: block; }
  .navigation { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--dim-line); padding: 5px 12px; }
  .nav-main { display: flex; gap: 4px; }
  .nav-button { padding: 6px 10px; min-height: 43px; display: flex; gap: 6px; align-items: center; width: auto; font-size: .78rem; }
  .navigation .settings { margin-left: auto; }
  main { padding-top: 18px; }
}
@media (max-width: 660px) {
  .topbar { height: 56px; padding-inline: 12px; gap: 8px; }
  .brand { gap: 7px; }
  .brand-icon { width: 33px; height: 33px; }
  .brand strong { font-size: .91rem; }
  .brand small { font-size: .57rem; }
  .header-meta .status-dot, #engine-state, .header-meta .separator { display: none; }
  #clock { font-size: .67rem; }
  .topbar .icon-button { width: 34px; min-width: 34px; min-height: 34px; }
  .navigation { padding-inline: 6px; gap: 3px; }
  .nav-main { flex: 1; }
  .nav-button { flex: 1; padding: 5px 4px; flex-direction: column; font-size: .66rem; gap: 4px; justify-content: center; white-space: nowrap; }
  .navigation .settings { flex: 0 1 auto; }
  main { padding-inline: 10px; }
  .intro { flex-wrap: wrap; margin-bottom: 14px; gap: 10px; }
  .intro-main { flex-basis: 100%; }
  .intro-title { margin-bottom: 7px; }
  .intro p { font-size: .91rem; }
  .intro-actions { justify-content: flex-start; }
  #departure-status:not(:empty) { text-align: left; }
  .intro-actions .button { min-height: 36px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
  .metrics article { padding: 8px; }
  .metric-icon { width: 34px; height: 34px; }
  .metrics article div > span { font-size: .75rem; white-space: normal; }
  .metrics strong { font-size: 1rem; }
  .dashboard { grid-template-columns: minmax(0,1fr); }
  main[data-view] .dashboard > .panel { grid-column: 1; grid-row: auto; }
  main[data-view="radar"] .radar-panel { grid-row: 1; }
  main[data-view="flight"] .pilot-panel { grid-row: 2; }
  .scene-frame { height: clamp(255px, 48vh, 410px); }
  .traffic-panel .flight-list { max-height: 255px; }
  .radar-field, main[data-view="radar"] .radar-field { height: 250px; }
  .panel-head { padding-inline: 10px; }
  .panel-head h2 { font-size: .9rem; gap: 5px; }
  .source-tabs button { font-size: .71rem; padding-inline: 5px; }
  .app-footer { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .navigation .settings span:last-child { display: none; }
  .navigation .settings { padding-inline: 9px; }
  .radar-panel .panel-head { flex-wrap: wrap; }
  .settings-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

.cockpit-overlay { position: absolute; inset: 0; pointer-events: none; }
.deck-texture { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-frame.is-window-view::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 8px #1c222bf0, inset 0 0 32px 14px #121b25cc; border-radius: 10% / 17%; }
.flight-reticle { position: absolute; top: 47%; left: 50%; width: 82px; height: 18px; transform: translate(-50%, -50%); border-bottom: 2px solid #8bffbf; border-inline: 2px solid #8bffbf; opacity: .82; filter: drop-shadow(0 1px 3px #112617); }
.cockpit-strip { position: absolute; left: 50%; bottom: 53px; transform: translateX(-50%); display: flex; gap: 14px; justify-content: center; padding: 9px 12px; max-width: 96%; width: max-content; background: #081521e8; border: 1px solid #7da2b0; border-radius: 7px; color: #a5f3cb; font: .78rem var(--mono); }
.cockpit-strip div { display: grid; gap: 3px; }
.cockpit-strip span { color: #b5c3d1; font-size: .66rem; }
.cockpit-strip div[data-attitude] { min-width: 45px; }
.cockpit-strip [data-horizon] { position: relative; display: block; overflow: hidden; height: 20px; width: 49px; background: #365e89; border: 1px solid #87a9b2; border-radius: 3px; }
.cockpit-strip [data-horizon]::before { content: ""; position: absolute; width: 85px; height: 26px; top: 9px; left: -18px; background: #70552e; border-top: 1px solid #f5eee0; transform: translateY(var(--pitch, 0px)) rotate(var(--bank, 0deg)); }
.cockpit-strip [data-horizon]::after { content: ""; position: absolute; width: 22px; top: 9px; left: 12px; border-top: 1px solid #9fffb9; }
.radar-footer-actions, #airport-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.live-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.live-toolbar #airport-select { max-width: min(300px, 64vw); }
.live-toolbar #airport-search { min-height: 38px; }
.live-source-note { color: var(--muted); font-size: .79rem; }
.aircraft-menu { position: absolute; z-index: 150; width: max-content; min-width: min(215px, calc(100% - 16px)); max-width: calc(100% - 16px); padding: 6px; border: 1px solid #3b536f; border-radius: 9px; background: #111e2e; box-shadow: 0 12px 26px #040a13bb; }
.aircraft-menu strong { display: block; padding: 6px 9px; color: #abc8ed; font: 700 .8rem var(--mono); }
.aircraft-menu button { display: block; width: 100%; min-height: 38px; padding: 8px 9px; text-align: left; border-radius: 6px; }
.aircraft-menu button:hover, .aircraft-menu button:focus-visible { background: #223953; }
.radar-footer-actions .button, .metar-tools .button { min-height: 29px; font-size: .74rem; }
#airport-search { width: 129px; min-height: 32px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--raised); }
.metar-tools, .station-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 13px; border-top: 1px solid var(--dim-line); color: var(--muted); font-size: .78rem; }
.metar-tools output:not(:empty) { flex-basis: 100%; font: .78rem/1.45 var(--mono); overflow-wrap: anywhere; }
.station-tools select { min-height: 32px; }
.flight-details { margin-top: 8px; color: var(--muted); font-size: .78rem; }
.flight-details summary { cursor: pointer; min-height: 23px; }
.flight-details dl { margin: 2px 0 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.flight-details dt, .flight-details dd { margin: 0; }
.flight-details dd { color: var(--text); overflow-wrap: anywhere; }
.reference-link { color: #a6cdff; }
#livery-control { display: flex; align-items: center; gap: 8px; }
#livery-color { width: 39px; height: 25px; padding: 0; cursor: pointer; }
.mission-panel { grid-column: 1 / -1; }
.mission-panel ul { list-style: none; padding: 0 14px; color: var(--muted); }
.mission-panel li { padding: 5px 0; }
.mission-panel li.done { color: var(--mint); }
.live-label { background: #11273cea; border-color: #588ab0; }
.scene-frame.is-live { background: #132433; }
#gl-canvas:focus-visible { outline-offset: -3px; }
.scene-label { pointer-events: none; }
main[data-view="radar"][data-live3d="true"] .scene-panel { display: flex; grid-column: 1; grid-row: 1; }
main[data-view="radar"][data-live3d="true"] .radar-panel { grid-row: 2; grid-column: 1 / -1; }
.runway-use { font: .72rem var(--mono); }
@media (max-width: 660px) {
    main[data-view="radar"][data-live3d="true"] .traffic-panel { grid-row: 3; }
    #airport-picker { flex: 1 1 100%; }
    #airport-picker input, .live-toolbar #airport-select { flex: 1 1 142px; max-width: 100%; min-width: 0; }
    .panel-toolbar { gap: 3px; }
    .panel-toolbar .panel-toggle { min-width: 24px; width: 24px; }
    .scene-panel .panel-head:has(#service-camera-target:not([hidden]), #live-camera:not([hidden])) { flex-wrap: wrap; }
    #live-camera { max-width: 150px; }
    #service-camera-target { max-width: 117px; }
    .cockpit-strip { flex-wrap: wrap; gap: 6px 9px; }
}
@media (max-width: 410px) { .cockpit-strip { gap: 8px; font-size: .66rem; } }
.cockpit-overlay.is-observing :is([data-sim-instrument], [data-attitude], .flight-reticle) { display: none; }
.cockpit-overlay.is-observing .instrument-panel { display: none; }
.cockpit-overlay:not(.is-observing) .cockpit-strip { display: none; }
.instrument-panel { position: absolute; z-index: 3; inset: auto 13px 7px; max-width: 790px; margin-inline: auto; border: 1px solid #456479; border-radius: 8px; background: #0e1c28f5; box-shadow: 0 6px 24px #0008; }
.instrument-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 2px 5px; pointer-events: auto; }
.instrument-actions button, .instrument-actions summary { min-height: 26px; padding: 3px 7px; border-radius: 5px; border: 1px solid #456177; background: #182d3e; white-space: nowrap; font-size: .71rem; }
.instrument-actions button[aria-pressed="true"] { background: #24534c; }
#cockpit-destination, .scene-frame:has(.cockpit-overlay:not([hidden])) #fullscreen {
  border-color: #ffdd64;
  color: #fff0a8;
  box-shadow: 0 0 0 1px #ffdd6470;
}
@media (prefers-reduced-motion: no-preference) {
  #cockpit-destination, .scene-frame:has(.cockpit-overlay:not([hidden])) #fullscreen[aria-pressed="false"] {
    animation: cockpit-highlight 2.2s ease-in-out infinite;
  }
}
@keyframes cockpit-highlight {
  0%, 100% { box-shadow: 0 0 0 1px #ffdd6470; }
  50% { box-shadow: 0 0 0 2px #ffdd64, 0 0 10px #ffcb5faa; }
}
.instrument-actions output { margin-right: auto; color: #93d8d5; font: 700 .71rem var(--mono); }
.instrument-actions details { position: relative; }
.instrument-actions summary { list-style: none; cursor: pointer; }
.avionics-controls { position: absolute; z-index: 10; right: 0; bottom: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 9px; width: min(275px, 76vw); background: #102334; border: 1px solid #527187; border-radius: 8px; box-shadow: 0 10px 28px #0008; }
.avionics-controls label { display: grid; gap: 3px; color: #bed3df; font: .71rem var(--mono); }
.avionics-controls input { width: 100%; min-height: 29px; border: 1px solid #4b6677; border-radius: 5px; padding: 3px 6px; color: #d5f2ee; background: #172e40; font: .82rem var(--mono); }
.avionics-controls small { grid-column: 1 / -1; font-size: .68rem; color: #b1c4d2; }
#cockpit-instruments { display: block; width: 100%; }
.scene-frame:has(.instrument-panel:not([hidden])) .viewport-bottom { inset: 53px 12px auto auto; }
.scene-frame:has(.instrument-panel:not([hidden])) #view-hint { display: none; }
.scene-frame:has(.instrument-panel:not([hidden])) .view-buttons .icon-button { min-width: 31px; width: 31px; height: 31px; }
#journey-open { min-height: 32px; }
#exit-navigation {
  position: absolute;
  inset: 52px auto auto 13px;
  z-index: 4;
  min-height: 34px;
  padding: 5px 9px;
  color: #fff0d8;
  border-color: #d4a16d;
  background: #241b1aed;
  font-size: .76rem;
}
#journey-map { position: absolute; z-index: 4; inset: 91px 12px auto auto; width: min(290px,calc(100% - 24px)); background: #0b1829ed; color: #e3edf5; border: 1px solid #647c92; border-radius: 8px; }
#journey-map summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: center; padding: 6px 8px; font: .72rem var(--mono); }
#journey-map summary::after { content: '+'; color: #aed8dd; }
#journey-map[open] summary::after { content: '−'; }
#journey-map canvas { display: block; width: 100%; height: 118px; touch-action: none; cursor: grab; }
.map-tools { display: flex; align-items: center; gap: 3px; padding: 3px 6px; font: .69rem var(--mono); }
.map-tools output { margin-right: auto; }
.map-tools button { font: inherit; font-size: 1rem; min-width: 25px; height: 25px; border: 1px solid #577087; border-radius: 4px; }
#journey-form { display: grid; gap: 10px; padding: 12px 16px 16px; }
.journey-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pilot-shortcuts { margin: 3px 12px 14px; color: var(--muted); font-size: .78rem; }
@media (max-width: 550px) {
    #main .scene-frame:has(.instrument-panel:not([hidden])):not(:fullscreen, .is-expanded) { min-height: clamp(380px, 56vh, 464px); }
    .instrument-panel { inset-inline: 5px; bottom: 5px; }
    .instrument-actions { gap: 3px; padding-inline: 4px; }
    .instrument-actions :is(button,summary) { padding-inline: 4px; font-size: .65rem; min-height: 28px; }
    .instrument-actions output { font-size: .62rem; }
    .instrument-actions details { position: static; }
    .avionics-controls { right: 5px; bottom: 100%; }
    #exit-navigation { left: 8px; }
    #journey-map { width: min(235px,calc(100% - 19px)); inset: 88px 8px auto auto; }
    #journey-map canvas { height: 88px; }
}
