/* Flight controls sit over the world; the customer phone retains its own space. */
.world-controls > .navigation-toggle {
  width: auto;
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c4bfb5;
  border-radius: 5px;
  background: #f8f6f0ed;
  color: var(--ink);
  font: 500 10px var(--body);
  white-space: nowrap;
  backdrop-filter: blur(12px);
}
.world-controls > .navigation-toggle:hover { transform: none; border-color: var(--orange); }
.navigation-toggle svg, .flight-intro-cta svg, .flight-telemetry svg, .flight-move svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.navigation-toggle[aria-pressed="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.flight-intro-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 17px;
  padding: 14px 0;
  background: transparent;
  color: #58544d;
  font-size: 11px;
  vertical-align: middle;
}
.flight-intro-cta svg { color: var(--orange); }
.flight-intro-cta:hover { color: var(--orange); }
.flight-mode .intro, .flight-mode .stage-caption { visibility: hidden; pointer-events: none; opacity: 0; }
.flight-mode .intro > * { pointer-events: none; }
.flight-mode .world { inset: 0; }
.flight-mode .scene-container { touch-action: none; }
.flight-mode .scene-container canvas { outline-offset: -5px; }
.flight-mode .world-controls > span, .flight-mode .scene-detail { display: none; }
.flight-mode .world-controls { z-index: 19; }
.flight-mode .world-controls > #reset-view { background: #f8f6f0ed; backdrop-filter: blur(12px); }
.flight-hud { position: absolute; inset: 0; z-index: 13; pointer-events: none; }
.flight-heading {
  position: absolute;
  top: 29px;
  left: 4.5%;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 24px;
  color: var(--ink);
}
.flight-heading strong { font: 500 13px var(--display); letter-spacing: -.3px; }
.flight-mode-dot { width: 5px; height: 5px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 4px #ff5a1f12; }
.flight-telemetry { display: inline-flex; align-items: center; gap: 5px; color: #81776c; font-size: 8px; margin-left: 12px; font-variant-numeric: tabular-nums; }
.flight-compass { display: inline-flex; transition: transform .15s linear; }
.flight-telemetry svg { width: 13px; height: 13px; }
.flight-stations {
  position: absolute;
  left: 4.5%;
  top: 65px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d6d1c5;
  border-radius: 7px;
  background: #f8f6f0e8;
  backdrop-filter: blur(12px);
  pointer-events: auto;
  box-shadow: 0 3px 20px #3b302706;
}
.flight-stations button {
  min-height: 37px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border-radius: 4px;
  font-size: 10px;
  transition: background .18s, color .18s;
}
.flight-stations button > span { font-size: 7px; color: #aa8771; }
.flight-stations button:hover:not(:disabled), .flight-stations button:focus-visible { background: var(--ink); color: var(--paper); }
.flight-stations button:disabled { opacity: .3; }
.flight-help { position: absolute; left: 4.5%; bottom: 89px; display: flex; gap: 15px; color: #716b62; font-size: 8px; align-items: center; }
.flight-help > span { display: flex; align-items: center; gap: 3px; }
.flight-help kbd { padding: 3px 4px; border: 1px solid #c7c1b6; border-radius: 3px; background: #f8f6f0d9; font: 8px var(--body); min-width: 15px; text-align: center; }
.flight-help .flight-look-hint { margin-left: 2px; }
.flight-status { position: absolute; left: 4.5%; top: 122px; font-size: 8px; color: #8a7e72; }
.flight-hud.is-moving .flight-mode-dot { background: #647854; }
.flight-touch-controls { display: none; }
.navigation-announcement { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.flight-move { touch-action: none; user-select: none; -webkit-user-select: none; }
.flight-move[aria-pressed="true"] { background: var(--orange); color: white; border-color: var(--orange); }

@media (pointer: coarse) {
  .flight-help { display: none; }
  .flight-touch-controls { display: block; position: absolute; left: 4.5%; bottom: 88px; width: 210px; height: 148px; }
  .flight-pad { position: absolute; left: 0; top: 0; width: 132px; height: 132px; border: 1px solid #d1cabd; border-radius: 50%; background: #f7f4ecb8; backdrop-filter: blur(12px); pointer-events: auto; }
  .flight-pad-center { position: absolute; inset: 48px; display: grid; place-items: center; opacity: .6; }
  .flight-pad-center img { width: 18px; height: 18px; }
  .flight-pad .flight-move { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: #514c42; padding: 0; }
  .flight-pad .flight-move[aria-pressed="true"] { background: var(--orange); color: white; }
  .flight-forward { left: 43px; top: 0; }
  .flight-back { left: 43px; bottom: 0; }
  .flight-left { top: 43px; left: 0; }
  .flight-right { top: 43px; right: 0; }
  .flight-back svg { transform: rotate(180deg); }
  .flight-left svg { transform: rotate(-90deg); }
  .flight-right svg { transform: rotate(90deg); }
  .flight-altitude { position: absolute; left: 158px; top: 7px; display: flex; flex-direction: column; gap: 5px; pointer-events: auto; }
  .flight-altitude > span { font-size: 6px; letter-spacing: 1px; color: #887e70; text-align: center; margin-bottom: 2px; }
  .flight-altitude button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #cfc6b7; background: #f8f6f0e8; backdrop-filter: blur(12px); display: grid; place-items: center; }
  .flight-altitude button[aria-pressed="true"] { color: white; background: var(--orange); border-color: var(--orange); }
  .flight-touch-hint { position: absolute; bottom: -7px; left: 4px; color: #847a6c; font-size: 7px; white-space: nowrap; }
  .flight-status { display: none; }
}

@media (max-width: 1150px) {
  .world-controls > .navigation-toggle { font-size: 9px; padding: 0 9px; gap: 6px; height: 31px; }
  .flight-heading, .flight-stations, .flight-help, .flight-status { left: 4%; }
  .flight-heading { top: 24px; }
  .flight-stations { top: 59px; }
  .flight-stations button { padding: 0 10px; gap: 6px; }
  .flight-status { top: 114px; }
  .flight-help { bottom: 79px; gap: 10px; }
}

@media (max-width: 800px) {
  .flight-intro-cta { font-size: 10px; gap: 6px; margin-left: 14px; padding: 12px 0; }
  .flight-intro-cta svg { width: 16px; height: 16px; }
  .world-controls > .navigation-toggle { font-size: 8px; height: 28px; padding: 0 9px; }
  body:not(.started):not(.flight-mode) .world-controls > span { display: none; }
  .flight-mode .world, .flight-mode.started .world { inset: 0; }
  .flight-mode .venue-picker, .flight-mode.started .venue-picker { top: 16px; right: 5%; bottom: auto; }
  .flight-mode .world-controls, .flight-mode.started .world-controls { top: 116px; left: 5%; bottom: auto; gap: 8px; }
  .flight-mode .world-controls > .mobile-restart { display: none; }
  .flight-heading { top: 20px; left: 5%; height: 24px; gap: 7px; }
  .flight-heading strong { font-size: 10px; letter-spacing: -.2px; }
  .flight-telemetry { display: none; }
  .flight-stations { left: 5%; right: 5%; top: 60px; gap: 2px; padding: 3px; }
  .flight-stations button { flex: 1; min-width: 0; min-height: 41px; justify-content: center; gap: 4px; padding: 0 4px; font-size: 8px; }
  .flight-stations button > span { display: none; }
  .flight-help { display: none; }
  .flight-status { display: none; }
  .flight-touch-controls { display: block; position: absolute; left: 5%; right: 5%; bottom: 76px; width: auto; height: 132px; }
  .flight-mode.started .flight-touch-controls { top: 156px; bottom: auto; height: 124px; }
  .flight-pad { position: absolute; left: 0; top: 0; width: 124px; height: 124px; border: 1px solid #d1cabd; border-radius: 50%; background: #f7f4ecb8; backdrop-filter: blur(12px); pointer-events: auto; }
  .flight-pad-center { position: absolute; inset: 45px; display: grid; place-items: center; opacity: .6; }
  .flight-pad-center img { width: 17px; height: 17px; }
  .flight-pad .flight-move { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: #514c42; padding: 0; }
  .flight-pad .flight-move[aria-pressed="true"] { background: var(--orange); color: white; }
  .flight-forward { left: 39px; top: 0; }
  .flight-back { left: 39px; bottom: 0; }
  .flight-left { top: 39px; left: 0; }
  .flight-right { top: 39px; right: 0; }
  .flight-back svg { transform: rotate(180deg); }
  .flight-left svg { transform: rotate(-90deg); }
  .flight-right svg { transform: rotate(90deg); }
  .flight-altitude { position: absolute; left: auto; right: 0; top: 5px; display: flex; flex-direction: column; gap: 5px; pointer-events: auto; }
  .flight-altitude > span { font-size: 6px; letter-spacing: 1px; color: #887e70; text-align: center; margin-bottom: 2px; }
  .flight-altitude button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #cfc6b7; background: #f8f6f0e8; backdrop-filter: blur(12px); display: grid; place-items: center; }
  .flight-altitude button[aria-pressed="true"] { color: white; background: var(--orange); border-color: var(--orange); }
  .flight-touch-hint { position: absolute; bottom: -7px; left: 4px; color: #847a6c; font-size: 7px; white-space: nowrap; }
  .flight-mode.started .flight-touch-hint { display: none; }
  .flight-mode.phone-expanded .flight-hud { display: none; }
  .flight-mode.phone-expanded .world-controls { display: none; }
}

@media (max-width: 420px) {
  .flight-heading strong { font-size: 9px; }
  .flight-heading { gap: 6px; }
  .flight-mode .venue-picker button { font-size: 8px; }
  .flight-mode .venue-picker button small { display: none; }
  .flight-intro-cta { margin-left: 12px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .flight-compass, .flight-stations button { transition: none; }
}
