/* The hangar is arranged like a screen-printed arcade cabinet: marquee above controls. */
.mast { background: #172629; border-bottom: 1px solid #52645f; }
.mast-inner { width: var(--frame); height: 61px; margin: auto; display: flex; align-items: center; gap: 12px; }
.brand, .command, .pilot-record { display: inline-flex; align-items: center; }
.brand { margin-right: auto; gap: 11px; background: none; border: 0; padding: 0; text-align: left; }
.brand img { width: 48px; height: 38px; background: #efcf8f; clip-path: polygon(0 0,100% 0,100% 70%,50% 100%,0 70%); }
.brand b, .brand small { display: block; }
.brand b { font: 400 21px/1.1 var(--display); letter-spacing: .05em; }
.brand small { color: var(--sun); font: 7px/1.7 var(--pixel); }
.pilot-record { gap: 9px; margin-right: 8px; color: var(--sun); }
.pilot-record span { color: var(--muted); font: 8px var(--pixel); }
.pilot-record b { font: 12px var(--pixel); }
.pilot-record i { width: 20px; }
.command { gap: 6px; padding: 7px 12px; min-height: 35px; border: 1px solid #64756c; background: transparent; font-size: 13px; }
.command i { width: 16px; height: 16px; }
.command:hover, .command[aria-current] { border-color: var(--sun); color: var(--sun); }
.command-deck {
    width: var(--frame);
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0,1.12fr) minmax(0,1fr);
    gap: 0;
    padding: clamp(12px,2vh,22px) 0;
}
.poster {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    grid-column: 1 / -1;
    height: clamp(290px, calc(100svh - 314px), 650px);
    background: #f1dfb3 url("art/alpine.webp") center 48% / cover;
    border: 2px solid #0e1d20;
    box-shadow: inset 0 0 0 1px #ffedb6;
}
.poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(92deg,#ffebbf73,transparent 65%),
        radial-gradient(#342a2224 .7px,transparent .9px) 0 0 / 4px 4px;
    pointer-events: none;
}
.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 5px;
    background: repeating-linear-gradient(115deg,var(--ink) 0 11px,#e2b664 11px 18px);
    border-top: 1px solid var(--ink);
}
#hangar-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.poster-title {
    position: absolute;
    z-index: 1;
    left: 6%;
    top: 46%;
    transform: translateY(-50%) rotate(-5deg);
    width: max-content;
    pointer-events: none;
}
.poster h1 {
    color: #fff5ce;
    font: 400 clamp(72px,min(8.4vw,13.4vh),153px)/.97 var(--display);
    letter-spacing: -.06em;
    -webkit-text-stroke: .078em var(--ink);
    paint-order: stroke fill;
    text-shadow: -.025em .045em 0 var(--ink), -.055em .08em 0 var(--ink), -.085em .11em 0 var(--ink);
}
.poster h1 span, .poster h1 strong { display: block; }
.poster h1 strong { position: relative; margin: -.015em 0 .035em .16em; color: var(--flare); font-size: 1.49em; font-weight: 400; }
.title-kicker {
    display: inline-block;
    white-space: nowrap;
    margin: 8px 0 0 11%;
    padding: 8px 12px 7px;
    background: var(--ink);
    color: var(--sun);
    font: clamp(8px,.85vw,13px)/1.1 var(--pixel);
    box-shadow: 4px 3px 0 #e46846;
}
.flyby { position: absolute; left: 48%; right: 6%; top: 8%; bottom: 11%; display: grid; place-items: center; }
.formation { position: absolute; isolation: isolate; inset: 5% 4.5%; transform: rotate(37deg); }
#poster-plane { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 5px #20281f65); }
.wing-trail, .engine-flare { position: absolute; z-index: -1; top: 55%; height: 112%; width: 3px; background: linear-gradient(#fffbe6c9,#fff9da88,transparent); }
.wing-trail.left { left: 16%; } .wing-trail.right { right: 16%; }
.engine-flare { top: 72%; left: 49%; width: 5%; background: linear-gradient(#fff9ddcb,#fff7d751,transparent); clip-path: polygon(0 0,100% 0,45% 100%); }
.pilot-tag {
    position: absolute;
    right: 3%;
    bottom: 5.5%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 20px 8px 17px;
    color: var(--cream);
    background: #192a2bed;
    border-left: 5px solid var(--sun);
    transform: skew(-7deg);
}
.pilot-tag i { color: var(--sun); width: 31px; height: 31px; }
.pilot-tag small { display: block; font: bold 11px var(--mono); color: #edca80; }
.pilot-tag strong { font: 400 29px/1.2 var(--display); }
#plane-role { margin-left: 8px; color: #d0d7c6; font-size: 12px; white-space: nowrap; }
.fleet, .dispatch { min-width: 0; background: #1b2e32; border: 1px solid #53665f; padding: 17px clamp(13px,1.8vw,28px) 19px; }
.fleet { border-right: 0; }
.fleet .section-bar, .dispatch .section-bar { margin-bottom: 12px; }
#fleet-count { font: 9px var(--pixel); color: var(--sun); }
#fleet-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.fleet-card { min-width: 0; display: block; padding: 0; border: 1px solid #617069; background: #253b3d; color: var(--cream); text-align: left; }
.craft-art { display: grid; place-items: center; position: relative; isolation: isolate; height: clamp(51px,8.7vh,88px); background: repeating-linear-gradient(-56deg,#acc1ac08 0 1px,transparent 1px 7px),#364c4b; }
.craft-art img { position: absolute; inset: 10% 13%; width: 74%; height: 80%; object-fit: contain; transform: rotate(27deg); filter: drop-shadow(1px 3px 1px #0c1a1980); }
.pick-key, .player-flag { position: absolute; top: 5px; z-index: 1; font: 7px/1 var(--pixel); }
.pick-key { left: 5px; color: #d7e0ce; }
.player-flag { display: none; right: 0; top: 0; padding: 5px; background: var(--ink); color: var(--sun); }
.craft-caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 4px; padding: 4px 8px 6px; }
.craft-caption strong { font: 400 20px/1.3 var(--display); }
.craft-caption small { font: 11px/1.4 var(--sans); color: var(--muted); }
.fleet-card:hover { border-color: var(--cream); }
.fleet-card[aria-pressed=true] { border-color: var(--sun); box-shadow: 0 0 0 1px var(--sun); color: var(--ink); background: var(--sun); }
.fleet-card[aria-pressed=true] .craft-art { background: repeating-linear-gradient(-56deg,#f8d07866 0 1px,transparent 1px 7px),#dac490; }
.fleet-card[aria-pressed=true] .craft-caption small, .fleet-card[aria-pressed=true] .pick-key { color: #413b29; }
.fleet-card[aria-pressed=true] .player-flag { display: block; }
#mode-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.mode { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 4px; border: 1px solid #6a7a70; color: #e0e2cc; background: #273e40; }
.mode i { width: 18px; height: 18px; }
.mode strong { font: 400 19px var(--display); }
.mode:hover { color: white; border-color: white; }
.mode[aria-pressed=true] { border-color: var(--sun); color: var(--sun); box-shadow: inset 0 -3px var(--sun); background: #3a4033; }
.sortie-line { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 13px; }
#mode-brief { color: #c1cbbd; font-size: 13px; max-width: 12em; }
.launch { flex: 1; max-width: 68%; min-height: 52px; padding: 6px 14px; background: linear-gradient(120deg,transparent 81%,#ffad732e 81% 87%,transparent 87% 89%,#ffad732e 89% 95%,transparent 95%),var(--flare); }
.launch span { margin-right: auto; font-size: 30px; }
.launch kbd { color: #312d24; }
@media (prefers-reduced-motion: no-preference) {
    .formation { animation: bank 7s ease-in-out infinite alternate; }
    #poster-plane.reveal { animation: arrive .32s ease-out; }
    @keyframes bank { to { transform: translate(3px,-7px) rotate(39deg); } }
    @keyframes arrive { from { opacity: .45; transform: translateY(13px); } }
}
@media (max-width: 900px) {
    .mast-inner { gap: 8px; }
    .mode strong { font-size: 16px; }
    .craft-caption { flex-direction: column; }
    .launch kbd { display: none; }
}
@media (max-width: 680px) and (orientation: portrait) {
    :root { --frame: calc(100% - 20px); }
    .mast-inner { height: 49px; gap: 6px; }
    .brand { gap: 5px; }
    .brand img { width: 29px; height: 26px; }
    .brand b { font-size: 16px; } .brand small { font-size: 5px; }
    .pilot-record { gap: 4px; margin: 0; } .pilot-record span, #open-settings span { display: none; }
    .pilot-record i { width: 15px; } .pilot-record b { font-size: 9px; }
    .command { min-height: 32px; padding: 4px 7px; font-size: 12px; }
    .command-deck { grid-template-columns: minmax(0,1fr); padding: 8px 0; }
    .poster { height: clamp(240px,calc(100svh - 365px),530px); background-position: 62% center; }
    .poster-title { left: 5%; top: 35%; }
    .poster h1 { font-size: clamp(45px,12.5vw,75px); }
    .title-kicker { font-size: 6px; margin-top: 4px; padding: 5px 7px; }
    .flyby { left: 37%; right: 0; top: 24%; bottom: 12%; }
    .pilot-tag { right: 4%; bottom: 5%; padding: 4px 9px; gap: 6px; }
    .pilot-tag i { width: 19px; height: 19px; }
    .pilot-tag small { font-size: 9px; } .pilot-tag strong { font-size: 21px; }
    #plane-role { font-size: 10px; }
    .fleet,.dispatch { padding: 10px 12px 13px; }
    .fleet { border-right: 1px solid #53665f; border-bottom: 0; }
    .section-bar h2 { font-size: 20px; }
    .section-bar h2 i { width: 17px; height: 17px; }
    .fleet .section-bar,.dispatch .section-bar { margin-bottom: 8px; }
    #fleet-options { gap: 6px; }
    .craft-art { height: 48px; } .craft-caption { padding: 3px 5px; }
    .craft-caption strong { font-size: 17px; }
    .mode { min-height: 38px; gap: 4px; }
    .sortie-line { margin-top: 8px; } .launch { min-height: 42px; padding-block: 3px; }
    .launch span { font-size: 24px; } #mode-brief { font-size: 12px; }
}
@media (max-height: 540px) and (orientation: landscape) {
    :root { --frame: calc(100% - 24px); }
    .mast-inner { height: 38px; } .brand img { width: 29px; height: 25px; }
    .brand b { font-size: 15px; } .brand small { font-size: 5px; }
    .command { min-height: 28px; padding: 2px 7px; }
    .command-deck { padding: 5px 0; }
    .poster { height: max(145px,calc(100svh - 185px)); background-position: 50% 52%; }
    .poster h1 { font-size: clamp(38px,10.2vh,63px); }
    .title-kicker { font-size: 6px; padding: 4px 7px; }
    .pilot-tag { padding: 3px 9px; } .pilot-tag strong { font-size: 18px; }
    .fleet,.dispatch { padding: 6px 10px; }
    .section-bar h2 { font-size: 18px; }
    .fleet .section-bar,.dispatch .section-bar { margin-bottom: 5px; }
    .craft-art { height: 39px; } .craft-caption { padding: 1px 4px; }
    .craft-caption strong { font-size: 15px; } .craft-caption small { font-size: 10px; }
    .mode { min-height: 31px; } .sortie-line { margin-top: 5px; }
    .launch { min-height: 35px; padding-block: 2px; } .launch span { font-size: 21px; }
}
