.windshield { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.cockpit-shell { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }

.windshield button, .windshield input { pointer-events: auto; touch-action: none; }
.cockpit-screen {
  position: absolute;
  top: 68.9%;
  width: 19.9%;
  height: 21.15%;
  border: 0;
  border-radius: min(.55vw,.9vh);
  overflow: hidden;
  box-shadow: inset 0 0 10px #030609;
  background: #071012;
}
.cockpit-pfd { left: 17.9%; }
.cockpit-nav { left: 40.8%; width: 20.05%; padding: 0; display: grid; grid-template-rows: minmax(13px,14%) minmax(0,1fr); }
.cockpit-efis { left: 64.05%; width: 19.7%; }
.cockpit-screen canvas { display: block; width: 100%; height: 100%; }
.cockpit-nav-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px min(1vw,12px);
  color: #81d3df;
  background: #152930;
  font: 700 clamp(8px,1vw,14px)/1 var(--mono);
  letter-spacing: .085em;
}
.cockpit-nav-caption strong { color: #f4d38a; }
.cockpit-nav:hover .cockpit-nav-caption, .cockpit-nav[aria-expanded="true"] .cockpit-nav-caption { background: #23505e; }
.cockpit-unit {
  position: absolute;
  left: 3.6%;
  bottom: 3%;
  min-height: min(4.4vh,28px);
  border: 1px solid #448092;
  border-radius: 4px;
  color: #b9e4e8;
  background: #14303c;
  padding: 2px min(.55vw,8px);
  font: 650 clamp(7px,.8vw,12px)/1 var(--mono);
}
.cockpit-switch, .cockpit-key {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid #ddc9a37a;
  border-radius: 5px;
  background: #18252b38;
  color: #f4dfb5;
  white-space: nowrap;
}
.cockpit-switch span, .cockpit-key, .cockpit-throttle > span {
  font: 700 clamp(7px,.83vw,12px)/1 var(--mono);
  letter-spacing: .05em;
}
.cockpit-switch span { width: 100%; padding: 3px 2px; background: #17262ae8; text-align: center; border-bottom: 1px solid #0a1215; }
.cockpit-switch:hover, .cockpit-key:hover, .cockpit-gear:hover { background-color: #72bfd439; border-color: #9be2f6; color: #fff4d9; }
.cockpit-switch[aria-pressed="true"] span, .cockpit-key[data-pressed="true"] { color: #b9f9c7; background: #1b4d3e; }
.cockpit-key { display: grid; place-items: center; color: #ecddb7; background: #19292de8; box-shadow: 0 2px 8px #01040666; }
.cockpit-belts, .cockpit-cabin, .cockpit-lights, .cockpit-assist { top: 1.5%; width: 4.9%; height: 6.3%; }
.cockpit-belts { left: 6%; }
.cockpit-cabin { left: 16.2%; }
.cockpit-lights { left: 43.1%; }
.cockpit-assist { left: 70.7%; }
.cockpit-atc { top: 61.6%; left: 69.7%; width: 5.15%; height: 3.25%; min-height: 21px; }
.cockpit-brake { top: 94.7%; left: 26.2%; width: 6.4%; height: 4.15%; min-height: 22px; touch-action: none; }
.cockpit-gear {
  position: absolute;
  left: 87.2%;
  top: 68.6%;
  width: 5.7%;
  height: 18%;
  padding: 0;
  border: 1px solid #bdb8a777;
  border-radius: 6px;
  background: transparent;
}
.gear-lamps {
  position: absolute;
  inset: 11.5% 5% auto;
  height: 17%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 3px;
  border-radius: 8%;
  background: #242829;
}
.gear-lamps i { width: 19%; aspect-ratio: 1; border: 1px solid #787768; border-radius: 50%; background: #31473a; box-shadow: inset 0 1px 5px #0b1010; }
.cockpit-gear[data-status="down"] .gear-lamps i { background: #80ed6f; box-shadow: 0 0 8px #84f47d9c, inset 0 0 3px #f6fff0; }
.cockpit-gear[data-status="transit"] .gear-lamps i { background: #e0aa53; box-shadow: 0 0 7px #eab458a3; }
.gear-slot { position: absolute; left: 32%; top: 38%; width: 40%; height: 56%; border-radius: 4px; background: linear-gradient(90deg,#201e1a,#0f1111,#3a3a34); }
.gear-slot i { position: absolute; top: calc(7% + var(--gear-position,1) * 59%); left: -24%; width: 148%; height: 27%; border-radius: 6px; border: 1px solid #b7b5a4; background: linear-gradient(#e9e1c7,#9f9684 52%,#4d4945); box-shadow: 1px 2px 4px #0a0d10; }
.cockpit-flaps { bottom: 2.1%; left: 82.6%; width: 7.4%; height: 7%; }
.cockpit-throttle { position: absolute; bottom: 2.1%; left: 90.6%; width: 7.3%; min-width: 34px; height: 7%; min-height: 32px; display: grid; grid-template-rows: auto 1fr; pointer-events: auto; padding: 3px; border: 1px solid #c9c0a673; border-radius: 5px; background: #172326dc; }
.cockpit-throttle > span { text-align: center; color: #f4dfb5; }
.cockpit-throttle input { width: 100%; min-width: 0; margin: 0; accent-color: #f2c881; cursor: ew-resize; }
.cockpit-throttle input:disabled { opacity: .52; cursor: default; }

[data-camera="cockpit"] .instrument-deck {
  inset: 13.4% max(var(--safe-right),7%) auto max(var(--safe-left),7%);
}
[data-camera="cockpit"] .readouts { visibility: hidden; }
[data-camera="cockpit"] .phase-strip { display: none; }
[data-camera="cockpit"] .next { top: calc(13.4% + 53px); right: max(var(--safe-right),7%); }
[data-camera="cockpit"] .map-panel { top: calc(13.4% + 59px); left: max(var(--safe-left),7%); }
[data-camera="cockpit"] .right-controls .switches, [data-camera="cockpit"] .right-controls .power { display: none; }
[data-camera="cockpit"] .flap-panel { right: 8vw; bottom: 8vh; }
[data-camera="cockpit"] .cabin-panel { bottom: 38%; right: max(var(--safe-right),6%); }
[data-camera="cockpit"] .subtitle { bottom: 37%; }
[data-camera="cockpit"] .notice { top: 16.8%; }
[data-camera="cockpit"] .course-guide { top: 36%; z-index: 3; }

@media (max-height: 520px), (max-width: 850px) {
  .cockpit-switch span, .cockpit-key, .cockpit-throttle > span { font-size: clamp(6px,1.14vw,9px); }
  .cockpit-belts, .cockpit-cabin, .cockpit-lights, .cockpit-assist { min-height: 27px; }
  .cockpit-throttle { min-height: 26px; }
  [data-camera="cockpit"] .flight-tag, [data-camera="cockpit"] .tool { height: min(37px,10vh); min-height: 30px; }
  [data-camera="cockpit"] .tool { width: max(36px,5vw); }
  [data-camera="cockpit"] .next { top: calc(13.4% + 41px); }
  [data-camera="cockpit"] .map-panel { top: calc(13.4% + 42px); width: min(290px,37vw); }
  [data-camera="cockpit"] .cabin-panel { bottom: 33%; }
  [data-camera="cockpit"] .left-controls .stick { width: clamp(65px,11vw,99px); }
  [data-camera="cockpit"] .subtitle { max-width: 38vw; }
}
