/* Start screen, first step, wide screens: the passport (with "Your last flight") stands outside the start card on
   the left and "Now boarding" on the right, as tall quiet panels, so the two simulator cards keep their full height.
   The elements stay where airshow_passport_page.js and airshow_loading.js put them (inside #startup-root); only
   their boxes move, out of the flow and past the card's edge. Narrower screens and phones keep them in the card.
   The height limit leaves room for a browser info bar on a 1536x864 laptop screen (window about 638px tall). */
@media (min-width: 1424px) and (min-height: 560px) {
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-shell:has(> .startup-root.startup-game-step:not(.startup-language-step)) {
    overflow: visible;
  }

  /* The panels: dark glass like the start card, no colour of their own. */
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding {
    position: absolute;
    inset: 0 auto;
    z-index: 2;
    width: 196px;
    height: fit-content;
    margin: auto 0;
    box-sizing: border-box;
  }
  /* On arrival the passport rises into place after a beat, and "Now boarding" just behind it. */
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line {
    animation: startup-side-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 450ms both;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line {
    right: calc(100% + 22px);
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding {
    left: calc(100% + 22px);
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(8, 12, 22, 0.55);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
    color: #f2f6ff;
    text-align: center;
  }

  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight {
    width: 100%;
    margin: 0;
  }

  /* Passport: the book, the name and the stamps, one under the other. */
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry {
    order: -1;
    min-height: 300px;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry:hover,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry:focus-visible,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight:hover,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight:focus-visible {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(8, 12, 22, 0.7);
  }
  /* The cover in miniature instead of the small book; cover and crest equally see-through. */
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry .spr-book {
    display: none;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry .spr-cover {
    display: block;
    width: 96px;
    height: 128px;
    margin-bottom: 6px;
    opacity: 0.84;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
    transition: opacity 150ms ease, transform 150ms ease;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry:hover .spr-cover,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry:focus-visible .spr-cover {
    transform: translateY(-2px);
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry > b {
    font-size: 17px;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry .spr-meta {
    flex-direction: column;
    gap: 2px;
    font-size: 13.5px;
    white-space: normal;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-entry .spr-meta span + span::before {
    content: none;
  }

  /* "Your last flight", under the passport. */
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight {
    gap: 4px;
    padding: 16px 14px;
    font-size: 13.5px;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight .startup-my-flight-callsign {
    max-width: 100%;
    font-size: 16px;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight .startup-my-flight-go {
    margin: 4px 0 0;
  }

  /* Now boarding: kicker, flight, route and phase stacked, the key across the bottom. */
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding {
    min-height: 300px;
    animation: startup-side-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-icon {
    width: 40px;
    height: 40px;
    color: #9fdfff;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-text {
    flex: 0 0 auto;
    width: 100%;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-kicker {
    margin: 0 0 8px;
    color: rgba(242, 246, 255, 0.62);
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-flight {
    font-size: 14px;
    color: rgba(242, 246, 255, 0.82);
    white-space: normal;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-flight b {
    display: block;
    margin: 0 0 4px;
    font-size: 18px;
    color: #fff;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding .startup-route-plane {
    color: #9fdfff;
    opacity: 0.8;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-line {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(242, 246, 255, 0.62);
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding[data-state="loading"] .startup-boarding-flight {
    color: rgba(242, 246, 255, 0.62);
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-btn {
    width: 100%;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-btn:hover:not(:disabled),
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding-btn:focus-visible {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.18);
  }
}

/* Under 640px the left column (passport, "Your last flight", boarding calls) is taller than the window at its usual
   632px, so "Your last flight" keeps to its text. Its 260px basis is a width, meant for the row inside the card. */
@media (min-width: 1424px) and (min-height: 560px) and (max-height: 639.98px) {
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-my-flight {
    flex: 0 0 auto;
  }
  /* The boarding calls line now sits beside the card, so its text wraps inside the panel's width instead of over the card. */
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-calls-line {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 10px;
    width: 100%;
    margin: 0;
    text-align: center;
  }
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line > .startup-calls-line .startup-calls-go {
    flex: 0 1 auto;
    margin-left: 0;
  }
}

@keyframes startup-side-rise {
  from { opacity: 0; transform: translateY(44px); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-passport-line,
  html:not(.airshow-mobile-runtime) #loading-overlay .startup-root.startup-game-step .startup-boarding {
    animation: none;
  }
}
