#welcome.game-menu {
  height: 100%;
  height: 100dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: #081831;
}
.game-menu .menu-airspace img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  transform: none;
  mask-image: none;
  filter: none;
}
.game-menu .menu-airspace::after {
  background: linear-gradient(0deg,#06142ff5 1%,#06142fbd 22%,transparent 47%,transparent 72%,#06142f75);
}
.menu-console {
  min-height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: calc(58px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right))
    max(12px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
}
.game-menu .menu-identity,
#welcome.game-menu .menu-actions,
.game-menu .menu-best {
  position: static;
  inset: auto;
  transform: none;
  text-align: center;
}
.game-menu .menu-identity { width: min(65vw, 340px); }
.game-menu .menu-logo { margin: 0; width: 100%; height: auto; max-height: min(23vh,190px); }
.game-menu .menu-identity > span { margin-top: 4px; }
#welcome.game-menu .menu-actions { margin-top: auto; width: min(100%,360px); }
.game-menu .menu-best { margin: 0; }
body.manual-flight:not(.playing) .topbar {
  height: auto;
  min-height: 54px;
  padding: calc(7px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right))
    7px max(14px,env(safe-area-inset-left));
  pointer-events: none;
}
body.manual-flight:not(.playing) .top-actions { pointer-events: auto; margin-left: auto; }

@media (min-aspect-ratio:6/5) {
  .game-menu .menu-airspace::after {
    background: linear-gradient(90deg,#06142fea 1%,#081b3adf 22%,#0a1e3e65 46%,transparent 70%),
      linear-gradient(0deg,#05122778,transparent 27%);
  }
  .game-menu .menu-airspace img { object-position: 84% 50%; }
  .menu-console {
    justify-content: center;
    align-items: flex-start;
    width: min(58vw,690px);
    gap: clamp(12px,2vh,26px);
    padding: max(45px,env(safe-area-inset-top)) clamp(24px,5vw,132px) max(22px,env(safe-area-inset-bottom))
      max(clamp(26px,7vw,168px),env(safe-area-inset-left));
  }
  .game-menu .menu-identity,
  #welcome.game-menu .menu-actions { width: min(100%,394px); }
  .game-menu .menu-logo { max-height: min(25vh,220px); }
  #welcome.game-menu .menu-actions { margin-top: 0; gap: 9px; }
  .game-menu .menu-best { align-self: stretch; max-width: 394px; }
  body.manual-flight:not(.playing) .topbar {
    padding-right: max(clamp(16px,3vw,72px),env(safe-area-inset-right));
  }
}
@media (min-aspect-ratio:6/5) and (max-height:580px) {
  .menu-console {
    width: min(55vw,460px);
    padding: max(12px,env(safe-area-inset-top)) clamp(12px,3vw,35px) max(12px,env(safe-area-inset-bottom))
      max(clamp(14px,4vw,50px),env(safe-area-inset-left));
    gap: 8px;
  }
  .game-menu .menu-logo { max-height: min(26vh,108px); }
  .game-menu .menu-identity > span { font-size: 9px; }
  #welcome.game-menu .menu-actions { gap: 5px; }
  #welcome.game-menu #start { min-height: 44px; font-size: 20px; padding: 6px 10px; }
  #welcome.game-menu #resume { min-height: 40px; padding: 6px 10px; }
  #open-hangar { min-height: 42px; }
  .menu-actions .app-download { margin: 0; }
}
@media (max-aspect-ratio:6/5) and (max-height:670px) {
  .menu-console { padding-top: calc(44px + env(safe-area-inset-top)); gap: 7px; }
  .game-menu .menu-logo { max-height: 18vh; }
  #welcome.game-menu #start { min-height: 48px; }
  #open-hangar { min-height: 44px; }
}

#flight-loader {
  max-height: 100%;
  overflow-y: auto;
  background: radial-gradient(ellipse at 50% 5%,#1e3d66,#08182c 64%,#060f20);
}
#flight-loader .loader-card { margin: auto; width: min(100%,390px); }
#flight-loader .loader-mark { width: 116px; height: 116px; margin-bottom: 15px; }
#flight-loader .loader-mark img { width: 86px; height: 86px; }
#flight-loader h2 { margin-bottom: 19px; }
#flight-progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 0 0 13px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  color: #f3c978;
  background: #25405e;
  accent-color: #f3c978;
}
#flight-progress::-webkit-progress-bar { background: #25405e; }
#flight-progress::-webkit-progress-value { background: linear-gradient(90deg,#a26930,#f3c978); transition: width .2s ease; }
#flight-progress::-moz-progress-bar { background: linear-gradient(90deg,#a26930,#f3c978); }
#flight-loader .loader-actions button { background: #f3c978; border-color: #f3c978; color: #172b42; }
#flight-loader .loader-actions #load-back { background: #122b48; border-color: #46637f; color: #e5edf6; }
#flight-loader .loader-actions #load-lite { background: #153550; border-color: #62829f; color: #eef4fc; }
@media (max-height:420px) {
  #flight-loader { padding: 10px 18px; }
  #flight-loader .loader-mark { width: 68px; height: 68px; margin-bottom: 8px; }
  #flight-loader .loader-mark img { width: 50px; height: 50px; }
  #flight-loader h2 { margin: 6px 0 12px; font-size: 24px; }
  #flight-loader p { margin-bottom: 10px; }
}
@media (prefers-reduced-motion:reduce) {
  #flight-progress::-webkit-progress-value { transition: none; }
}
dialog.compat-modal {
  position: fixed;
  inset: 0;
  z-index: 910;
  max-height: 85vh;
  box-shadow: 0 0 0 150vmax #050e20d9;
}
body.flight-lite .map-panel, body.flight-lite .compass-wrap { display: none; }
body.flight-lite #world canvas { width: 100%; height: 100%; display: block; }
