:root {
  color-scheme: dark;
  font-family: "Aptos", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #edf3ef;
  --muted: #afc2c6;
  --amber: #f7bd65;
  --sky: #83d8ee;
  --navy: #142731;
  --stroke: #bbdce539;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --safe-left: max(26px, env(safe-area-inset-left));
  --safe-right: max(26px, env(safe-area-inset-right));
  --safe-top: max(22px, env(safe-area-inset-top));
  --safe-bottom: max(24px, env(safe-area-inset-bottom));
  color: var(--ink);
  background: #13242d;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { overscroll-behavior: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .44; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--sky); outline-offset: 4px; }
[hidden] { display: none !important; }

.app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(162deg,#59889e,#a3bdbe 48%,#758568 49%,#4a6859);
  -webkit-user-select: none;
  user-select: none;
}
.world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene-transition { position: absolute; z-index: 2; inset: 0; pointer-events: none; background: #c2d8da; opacity: 0; }
.scene-transition[data-active="true"] { animation: reveal-landscape .59s ease-out both; }
@keyframes reveal-landscape { from { opacity: .92; } to { opacity: 0; } }
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #0a202b6a 0, transparent 25%, transparent 66%, #1024306e 100%);
}
.app[data-mode="menu"] .vignette, .app[data-mode="loading"] .vignette {
  background:
    linear-gradient(90deg,#132731f5 0,#162b35df 25%,#18323e62 47%,transparent 75%),
    linear-gradient(180deg, #14273169 0,transparent 24%,transparent 69%,#1528347a 100%);
}

.dispatch { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left); }
.dispatch-header { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 830; font-style: italic; letter-spacing: -.045em; }
.wingmark { width: 31px; height: 29px; display: inline-block; position: relative; flex: none; }
.wingmark::before, .wingmark::after { content: ""; position: absolute; inset: 0; }
.wingmark::before { background: var(--amber); clip-path: polygon(91% 6%, 62% 42%, 23% 72%, 3% 74%, 36% 58%, 71% 19%); }
.wingmark::after { background: var(--sky); clip-path: polygon(101% 25%, 79% 62%, 44% 88%, 16% 94%, 61% 64%, 84% 31%); }
.dispatch-main { display: flex; align-items: center; margin-left: clamp(10px, 5vw, 83px); }
.dispatch-card { margin-bottom: min(5vh, 44px); width: min(100%, 516px); padding: 17px 0 6px; }
.dispatch-flight { margin: 0 0 19px; color: var(--sky); font: 660 11px/1.4 var(--mono); letter-spacing: .16em; }
.dispatch-flight > span:last-child { color: #c2d4d7; margin-left: 14px; font-weight: 540; letter-spacing: .06em; }
.signal { display: inline-block; width: 6px; height: 6px; border-radius: 100%; background: var(--sky); vertical-align: 2px; box-shadow: 0 0 9px #83d8ee8a; }
.dispatch h1 { margin: 0; font-size: clamp(38px, 5.35vw, 82px); font-weight: 790; line-height: .99; letter-spacing: -.072em; text-wrap: balance; }
.route-pickers { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; align-items: end; margin-top: 27px; }
.route-picker { display: grid; align-content: start; gap: 7px; min-width: 0; }
.route-picker > span, .fleet-pickers legend { color: #b7ced4; font: 650 10px/1.2 var(--mono); letter-spacing: .11em; }
.route-picker strong { color: var(--sky); margin-right: 4px; }
.route-picker select {
  width: 100%; min-width: 0; min-height: 45px; color: var(--ink); padding: 8px;
  border-radius: 6px; border: 1px solid #abcbd86c; background-color: #18323eea; font-weight: 700;
}
.route-picker select:hover { border-color: var(--sky); }
.swap-route { width: 42px; height: 45px; padding: 0; font-size: 23px; color: var(--amber); }
.swap-route:hover { background: #315263; }
.fleet-pickers { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.fleet-pickers legend { margin-bottom: 8px; }
.fleet-pickers > div { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.fleet-option { display: block; position: relative; cursor: pointer; }
.fleet-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fleet-option > span { display: flex; align-items: center; justify-content: flex-start; gap: 7px; min-height: 42px; padding: 6px 10px; border: 1px solid #8bb2ba6b; border-radius: 6px; background: #173341e0; font-weight: 720; white-space: nowrap; }
.fleet-option i { display: block; flex: none; width: 13px; height: 9px; transform: skewX(-24deg); background: var(--livery); border-radius: 2px; }
.fleet-option input:checked + span { border-color: var(--livery); background: #274856; box-shadow: inset 0 -2px var(--livery); }
.fleet-option input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 3px; }
.dispatch-facts { margin: 15px 0 21px; color: #d2dfdf; font-size: 13px; line-height: 1.35; }
.dispatch-facts span { width: 4px; height: 4px; margin: 0 8px; border-radius: 50%; display: inline-block; vertical-align: 3px; background: #9ebac3; }
.dispatch-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; }
.primary {
  border: 1px solid #fbd194;
  border-radius: 7px;
  background: var(--amber);
  color: #202c29;
  min-height: 48px;
  padding: 13px 16px;
  font-weight: 760;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 27px;
  text-align: left;
}
.primary:hover:not(:disabled), .small-primary:hover:not(:disabled) { background: #ffd68d; }
.primary span { font: 580 20px/1 var(--mono); }
.quiet { min-height: 42px; padding: 10px 13px; border-radius: 7px; border: 1px solid #a9c5cd59; background: #172c37a6; font-weight: 650; }
.quiet:hover { background: #2c4753; }
.loading { max-width: 420px; margin: 14px 0 0; color: #d5e4e6; font-size: 13px; }
.dispatch-foot { display: flex; align-items: center; gap: 10px; color: #d5e1df; font: 600 10px/1 var(--mono); letter-spacing: .12em; margin: 0 0 3px 4px; }
.foot-divider { width: 18px; height: 1px; background: #bbd4d778; }
.history-link { padding: 9px 12px; min-height: 40px; font-size: 13px; }
.history-link span { color: var(--amber); margin-left: 5px; font-family: var(--mono); }

.hud { position: absolute; inset: 0; pointer-events: none; }
.hud button, .hud input, .stick, .map-panel, .cabin-panel { pointer-events: auto; }
.glass {
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: #122633e8;
  box-shadow: 0 7px 22px #07121c24;
}
.instrument-deck { position: absolute; z-index: 4; inset: var(--safe-top) var(--safe-right) auto var(--safe-left); display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.flight-tag { display: flex; align-items: center; gap: 8px; justify-self: start; padding: 7px 11px 7px 9px; height: 55px; }
.flight-tag .wingmark { width: 28px; height: 26px; }
.flight-tag div { display: grid; gap: 3px; }
.flight-tag strong { font: 730 17px/1.1 var(--mono); white-space: nowrap; }
.flight-tag strong span { color: var(--amber); }
.flight-tag small { color: var(--muted); font: 530 8px/1.1 var(--mono); letter-spacing: .075em; white-space: nowrap; }
.readouts { display: flex; justify-content: center; height: 55px; padding: 6px 2px; }
.readouts div { display: grid; grid-template-columns: auto auto; grid-template-rows: auto 1fr; align-items: baseline; align-content: center; gap: 2px 5px; min-width: 112px; padding: 2px 12px 0; }
.readouts div + div { border-left: 1px solid #abcbd833; }
.readouts div:last-child { min-width: 85px; }
.readouts span { grid-column: 1 / -1; font: 600 9px/1.2 var(--mono); color: #b4cdda; letter-spacing: .065em; }
.readouts strong { font: 650 24px/1 var(--mono); font-variant-numeric: tabular-nums; justify-self: start; }
.readouts small { justify-self: end; font-size: 10px; color: var(--muted); }
.utility { display: flex; gap: 7px; justify-content: flex-end; }
.tool { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; }
.tool:hover, .tool[aria-pressed="true"], .tool[aria-expanded="true"] { border-color: #8bcadb; background: #1e4052f4; }
.camera-icon { width: 19px; height: 13px; border: 1.7px solid currentColor; border-radius: 3px; display: block; position: relative; }
.camera-icon::before { content: ""; position: absolute; width: 7px; height: 7px; border: 1.4px solid currentColor; border-radius: 50%; top: 1.3px; left: 4.3px; }
.camera-icon::after { content: ""; position: absolute; top: -4px; left: 5px; background: currentColor; width: 6px; height: 3px; border-radius: 1px; }
.pause-icon { border-inline: 3px solid currentColor; height: 15px; width: 10px; }
.map-icon { position: relative; border: 1.5px solid currentColor; border-radius: 2px; width: 18px; height: 14px; transform: skewY(-9deg); }
.map-icon::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; right: 4px; border-inline: 1px solid currentColor; }

.phase-strip {
  position: absolute; z-index: 3; display: flex; padding: 6px 8px; gap: 0; margin: 0;
  left: 50%; top: calc(var(--safe-top) + 63px); transform: translateX(-50%); list-style: none;
  border-radius: 5px; background: #172c37d9; white-space: nowrap;
}
.phase-strip li { position: relative; padding: 4px 10px; color: #b9c9d0; font-size: 10px; line-height: 1; }
.phase-strip li + li { border-left: 1px solid #b8cbd234; }
.phase-strip li[aria-current="step"] { color: #ffcf84; font-weight: 800; }
.phase-strip li[aria-current="step"]::after { content: ""; position: absolute; bottom: -6px; height: 2px; left: 8px; right: 8px; background: var(--amber); border-radius: 6px; }
.phase-strip li[data-done="true"] { color: #9ac8ce; }

.next { position: absolute; z-index: 4; top: calc(var(--safe-top) + 69px); right: var(--safe-right); width: min(269px, 29vw); padding: 13px 14px 14px; border-inline-start: 2px solid var(--sky); }
.next-label { display: flex; align-items: center; gap: 6px; margin: 0 0 7px; color: var(--sky); font: 650 9px/1.1 var(--mono); letter-spacing: .09em; }
.next-label span { width: 5px; height: 5px; border-radius: 100%; background: var(--sky); }
.next h2 { font-size: 16px; line-height: 1.18; margin: 0 0 5px; letter-spacing: -.02em; }
.next > p:not(.next-label) { color: #c6d6da; font-size: 12px; line-height: 1.42; margin: 0; }
.small-primary { padding: 8px 10px; border: 1px solid #f5ca8a; border-radius: 5px; background: var(--amber); color: #13252c; font-size: 12px; font-weight: 750; min-height: 36px; }
.next button { width: 100%; margin-top: 10px; }
#skip-cruise { border-color: #8fd0e3; background: #75c7e1; }
#skip-cruise:hover { background: #9fe3f2; }
.notice, .subtitle { position: absolute; z-index: 7; left: 50%; transform: translateX(-50%); margin: 0; }
.notice { top: calc(var(--safe-top) + 108px); padding: 9px 12px; color: #ffd18d; font-size: 12px; line-height: 1.25; max-width: min(39vw,390px); text-align: center; }
.subtitle { bottom: calc(var(--safe-bottom) + 104px); max-width: min(40vw, 535px); width: 100%; padding: 9px 12px; border-left: 2px solid var(--amber); }
.subtitle span { color: var(--amber); font: 650 9px/1.2 var(--mono); letter-spacing: .14em; }
.subtitle p { margin: 3px 0 0; font-size: clamp(11px,1.2vw,15px); line-height: 1.37; }
.course-guide { position: absolute; left: 50%; top: 35%; color: #dafffc; width: 104px; height: 12px; transform: translateX(-50%); display: grid; place-items: center; opacity: .72; }
.course-guide::before { content: ""; position: absolute; width: 104px; height: 1px; background: linear-gradient(90deg,transparent,#d9fff7bb 32%,#d9fff7bb 68%,transparent); }
.course-guide span { width: 9px; height: 9px; position: relative; border: 1px solid #e4fff6; transform: rotate(45deg); background: #315c69c2; }
#route-course { position: absolute; top: 17px; letter-spacing: .08em; white-space: nowrap; color: #f7fff9; text-shadow: 0 1px 4px #0e2936; font: 700 10px/1.2 var(--mono); }

.controls { position: absolute; z-index: 5; inset: auto var(--safe-right) var(--safe-bottom) var(--safe-left); display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.left-controls, .right-controls { display: flex; position: relative; align-items: flex-end; gap: 9px; }
.left-controls { flex-direction: column; align-items: center; }
.right-controls { gap: 10px; }
.stick {
  position: relative; display: grid; place-items: center; width: clamp(85px,12.1vw,153px); aspect-ratio: 1;
  flex: none; border-radius: 50%; border: 1px solid #e0f2ee74; touch-action: none;
  background: radial-gradient(circle at 50% 53%,#3555629c 0,#162d38a6 55%,#17303bce);
  box-shadow: inset 0 0 0 5px #d0e0d60c,0 7px 19px #06121d44;
}
.stick::before { content: ""; position: absolute; inset: 22%; border: 1px solid #c5e3e23d; border-radius: 50%; }
.stick-h, .stick-v { position: absolute; background: #c5e3e249; pointer-events: none; }
.stick-h { left: 9%; right: 9%; height: 1px; }
.stick-v { top: 9%; bottom: 9%; width: 1px; }
.stick-knob { display: block; width: 37%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; border: 1px solid #d7e7e9a6; background: radial-gradient(circle at 39% 29%,#94b8c5,#345b70 65%,#2c495a); box-shadow: 0 4px 7px #0c162966; }
.keyhint { color: #d6e3e6; font: 610 9px/1.2 var(--mono); letter-spacing: .055em; text-shadow: 0 1px 3px #051929; }
.keyhint i { color: var(--amber); font-style: normal; }
.switches { display: flex; align-items: flex-end; gap: 6px; }
.control-button { display: grid; gap: 4px; min-width: 77px; min-height: 49px; padding: 7px 9px; text-align: left; white-space: nowrap; border-radius: 7px; border: 1px solid #d1e7e65c; background: #142a37eb; box-shadow: 0 3px 12px #08192322; }
.control-button:hover, .control-button[aria-expanded="true"] { border-color: #a6e0ec; background: #284b5ce8; }
.control-button[data-pressed="true"] { border-color: var(--amber); background: #7e5723ef; }
.control-button strong { font-size: 12px; line-height: 1.15; }
.control-button small { color: #b4d1d9; font-size: 9px; line-height: 1.15; }
.control-button[data-lit="true"] small { color: #f7ce8d; }
.mobile-brake { display: none; }
.power { height: clamp(131px, 22vh, 205px); width: 65px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 5px 7px; }
.power > strong { color: #c8d7dc; font: 650 9px/1 var(--mono); letter-spacing: .12em; }
.power output { color: var(--sky); font: 650 15px/1 var(--mono); }
.power input {
  appearance: none; -webkit-appearance: none; writing-mode: vertical-lr; direction: rtl; display: block; width: 36px; min-height: 45px; height: 100%; margin: 1px 0; background: transparent; cursor: ns-resize; touch-action: none;
}
.power input::-webkit-slider-runnable-track { width: 8px; min-height: 100%; border-radius: 5px; border: 1px solid #a4c7d257; background: linear-gradient(to top,#76d2ec var(--throttle,0%),#0c1c28 var(--throttle,0%)); }
.power input::-webkit-slider-thumb { appearance: none; height: 17px; width: 25px; margin-left: -9px; border: 1px solid #ecf4f2; border-radius: 5px; background: linear-gradient(#e9eeec,#84a5ad); box-shadow: 0 2px 5px #0717219e; }
.power input::-moz-range-track { width: 8px; min-height: 100%; border-radius: 5px; border: 1px solid #a4c7d257; background: #0c1c28; }
.power input::-moz-range-progress { width: 8px; border-radius: 5px; background: var(--sky); }
.power input::-moz-range-thumb { height: 16px; width: 23px; border: 1px solid #ecf4f2; border-radius: 5px; background: linear-gradient(#e9eeec,#84a5ad); }
.power .keyhint { font-size: 9px; color: #c4d6d9; }

.cabin-panel, .map-panel, .flap-panel { z-index: 6; }
.cabin-panel { position: absolute; right: calc(var(--safe-right) + 76px); bottom: calc(var(--safe-bottom) + 58px); width: min(316px, 39vw); padding: 12px; }
.map-panel { position: absolute; top: calc(var(--safe-top) + 105px); left: var(--safe-left); width: min(366px, 44vw); padding: 12px; }
.panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.panel-top h2 { margin: 2px 0 0; font-size: 15px; line-height: 1.15; letter-spacing: -.02em; }
.panel-top p { color: #c6d7de; margin: 4px 0 0; font-size: 11px; }
.close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #ccdee335; background: #244253; border-radius: 5px; font-size: 19px; line-height: 1; flex: none; }
.close:hover { background: #376373; }
.seatmap { display: grid; gap: 4px; margin: 9px 0 10px; padding: 6px; border-radius: 6px; background: #0a1a23aa; }
.seat-row { display: grid; grid-template-columns: repeat(var(--seat-columns,20),minmax(0,1fr)); gap: 3px; }
.seat-row:nth-child(2) { margin-bottom: 3px; }
.seat { height: 5px; border-radius: 2px; background: #335566; }
.seat[data-occupied="true"] { background: #83c6d3; }
.cabin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.panel-button { display: grid; gap: 4px; text-align: left; min-height: 42px; padding: 7px; border: 1px solid #b6d6e356; background: #203c4b; border-radius: 5px; }
.panel-button:hover:not(:disabled) { background: #2c5161; }
.panel-button strong { font-size: 11px; }
.panel-button small { font-size: 9px; color: #bed4de; }
.panel-button[aria-pressed="true"] small { color: var(--amber); }
.announce { width: 100%; margin-top: 8px; }
.map-panel canvas { display: block; width: 100%; margin-top: 6px; aspect-ratio: 660 / 290; background: #0c202c; border-radius: 5px; }
.map-footer { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: space-between; margin-top: 8px; font-size: 10px; color: #bcd5dd; }
.map-footer span { font-family: var(--mono); }
.map-footer b { color: var(--amber); }
.map-footer strong { color: #e5f5f4; }
.map-course { margin: 6px 0 0; color: var(--sky); font-size: 11px; line-height: 1.25; }
.flap-panel { position: absolute; bottom: 55px; right: 80px; display: grid; width: 136px; padding: 4px; }
.flap-panel button { background: transparent; text-align: left; padding: 8px; border: 0; border-radius: 4px; font-size: 12px; min-height: 31px; }
.flap-panel button:hover { background: #345a6c; }
.flap-panel button[aria-pressed="true"] { background: #284b5c; color: var(--amber); }

.modal-shade { position: absolute; z-index: 12; inset: 0; display: grid; place-items: center; padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left); background: #0d2032a0; backdrop-filter: blur(5px); }
.modal { width: min(440px,100%); max-height: 100%; overflow: auto; padding: clamp(16px,3.3vw,28px); background: #142b37; border-color: #a9d9e66b; box-shadow: 0 22px 60px #03131a69; }
.eyebrow { margin: 0 0 8px; color: var(--sky); font: 650 10px/1.2 var(--mono); letter-spacing: .12em; }
.modal h2 { margin: 0 0 14px; font-size: clamp(23px,4.1vw,33px); line-height: 1.02; letter-spacing: -.05em; }
.modal-copy { margin: 8px 0 13px; color: #cddce0; font-size: 13px; line-height: 1.45; }
.modal .primary, .modal .quiet { width: 100%; margin-top: 10px; }
.toggle-list { display: grid; gap: 6px; }
.toggle-list label { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 6px 9px; min-height: 41px; border: 1px solid #a4cad63b; border-radius: 5px; font-size: 13px; background: #203b49; cursor: pointer; }
.toggle-list input { margin: 0; width: 17px; height: 17px; accent-color: var(--amber); }
.shortcut-copy { margin: 13px 0; color: #b4d0d8; font-size: 11px; line-height: 1.5; }
.stars { color: var(--amber); font-size: 28px; font-weight: 700; letter-spacing: .09em; }
.result-list { display: grid; gap: 4px; margin: 11px 0; }
.result-list div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #90b2bd42; font-size: 13px; }
.result-list dd { font-family: var(--mono); margin: 0; white-space: nowrap; color: var(--amber); }
.history-list { padding: 0; list-style: none; max-height: 38vh; overflow: auto; margin: 0 0 12px; }
.history-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; color: #ccdde2; font-size: 12px; border-bottom: 1px solid #90b2bd42; }
.history-list li strong { color: var(--amber); }
.orientation { display: none; }
.no-script { position: absolute; inset: auto 20px 20px; padding: 18px; background: #152836; }

@media (max-width: 920px), (max-height: 550px) {
  :root { --safe-left: max(12px,env(safe-area-inset-left)); --safe-right: max(12px,env(safe-area-inset-right)); --safe-top: max(10px,env(safe-area-inset-top)); --safe-bottom: max(12px,env(safe-area-inset-bottom)); }
  .instrument-deck { gap: 7px; }
  .flight-tag, .readouts { height: 46px; }
  .flight-tag { padding: 6px 7px; }
  .flight-tag strong { font-size: 14px; }
  .readouts { padding: 4px 1px; }
  .readouts div { min-width: 83px; padding: 1px 7px; gap: 2px 4px; }
  .readouts div:last-child { min-width: 63px; }
  .readouts strong { font-size: 20px; }
  .readouts span { font-size: 8px; }
  .readouts small { font-size: 9px; }
  .tool { width: 41px; height: 41px; }
  .utility { gap: 5px; }
  .phase-strip { top: calc(var(--safe-top) + 52px); padding: 4px; }
  .phase-strip li { padding: 3px 6px; font-size: 9px; }
  .phase-strip li[aria-current="step"]::after { bottom: -4px; }
  .next { top: calc(var(--safe-top) + 51px); padding: 8px 9px; width: min(210px, 29vw); }
  .next-label { font-size: 8px; margin-bottom: 5px; }
  .next h2 { font-size: 13px; margin-bottom: 4px; }
  .next > p:not(.next-label) { font-size: 10px; }
  .small-primary { min-height: 33px; padding: 6px 7px; font-size: 10px; }
  .next button { margin-top: 6px; }
  .notice { top: calc(var(--safe-top) + 84px); }
  .map-panel { top: calc(var(--safe-top) + 58px); }
  .cabin-panel { right: calc(var(--safe-right) + 60px); bottom: calc(var(--safe-bottom) + 50px); width: min(270px,41vw); }
  .control-button { min-width: 59px; padding: 6px 7px; min-height: 43px; }
  .control-button strong { font-size: 11px; }
  .control-button small { font-size: 8px; }
  .power { width: 53px; gap: 4px; }
  .flap-panel { right: 65px; bottom: 49px; }
  .subtitle { bottom: calc(var(--safe-bottom) + 55px); max-width: 36vw; }
  .dispatch-card { margin-bottom: 0; }
}
@media (max-height: 500px) {
  .dispatch { grid-template-rows: 37px 1fr auto; }
  .dispatch-header { min-height: 35px; }
  .dispatch h1 { font-size: clamp(33px,6vw,57px); }
  .dispatch-flight { margin-bottom: 10px; }
  .route-pickers { margin-top: 14px; }
  .fleet-pickers { margin-top: 11px; }
  .fleet-pickers legend { margin-bottom: 5px; }
  .dispatch-facts { margin: 9px 0 11px; }
  .dispatch-card { padding: 5px 0; }
  .dispatch-foot { font-size: 8px; }
  .modal .primary, .modal .quiet { min-height: 40px; }
  .control-button { align-content: center; }
  .stick { width: clamp(80px,12vw,105px); }
}
@media (max-height: 380px) and (orientation: landscape) {
  .dispatch { grid-template-rows: 32px minmax(0,1fr) auto; }
  .dispatch-header { min-height: 32px; }
  .dispatch h1 { font-size: clamp(29px,5.2vw,43px); }
  .dispatch-flight { margin-bottom: 6px; }
  .route-pickers { margin-top: 9px; }
  .route-picker { gap: 5px; }
  .route-picker select, .swap-route { min-height: 38px; height: 38px; }
  .fleet-pickers { margin-top: 8px; }
  .fleet-option > span { min-height: 34px; }
  .dispatch-facts { margin: 7px 0 8px; }
  .dispatch-actions .primary, .dispatch-actions .quiet { min-height: 40px; padding-block: 7px; }
}
@media (max-height: 290px) and (orientation: landscape) {
  .dispatch-main { align-items: flex-start; overflow-y: auto; padding: 0 5px 5px 0; }
}
@media (pointer: coarse), (max-width: 710px) {
  .left-controls { gap: 6px; }
  .keyhint, .power .keyhint, .desktop-brake { display: none; }
  .mobile-brake { display: grid; place-items: center; min-width: 69px; min-height: 44px; font-size: 11px; touch-action: none; }
  .tool { width: 44px; height: 44px; }
  .hud:has(.cabin-panel:not([hidden])) .next { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .scene-transition[data-active="true"] { animation-duration: 0s; } }
@media (orientation: portrait) and (max-width: 650px) {
  .dispatch-main { align-items: flex-end; padding-bottom: 8vh; margin-left: 8px; }
  .dispatch-card { max-width: min(100%, 380px); }
  .dispatch h1 { font-size: clamp(35px,10vw,56px); }
  .dispatch .route-pickers { margin-top: 21px; }
  .app[data-mode="menu"] .vignette, .app[data-mode="loading"] .vignette { background: linear-gradient(0deg,#122630ee 8%,#132c3bc7 36%,#12232a00 64%); }
  .app[data-mode="flight"] .orientation { display: grid; gap: 7px; place-content: center; justify-items: center; position: absolute; z-index: 15; inset: 0; background: #142b37eb; text-align: center; }
  .orientation > span { color: var(--amber); font-size: 32px; line-height: 1; }
  .orientation > small { color: var(--muted); }
}
