@media (max-width:760px) {
 #menu .campaign .wordmark { font-size:16px; letter-spacing:0; }
}
/* The current task and its markers remain readable while the player searches. */
#hud.routine-info .mission-hud, #hud.routine-info #mission-steps,
#hud.routine-info #objective-markers { opacity:1; }
#hud #hud-objective { color:#e1f5bc; }
#hud #mission-steps .active { color:#edffc4; border-bottom:2px solid #d6ed94; padding-bottom:3px; }
#hud #objective-markers .current-objective { color:#f0ffd4; font-weight:bold; text-shadow:0 1px 4px #000,0 0 8px #000; }
#hud #objective-markers .current-objective i { border-width:2px; }
@media (min-width:651px) {
 /* Keep attack warnings beside the optics panel, clear of vision buttons. */
 #hud:not(.touch) #incoming { top:126px; right:calc(2.3vw + 146px); max-width:160px; }
 #hud:not(.touch) #airframe-hit { top:176px; right:calc(2.3vw + 146px); max-width:180px; white-space:normal; line-height:1.35; }
 #hud:not(.touch) #flight-toast { bottom:max(24%,132px); }
}
@media (min-width:651px) and (max-height:480px) {
 /* Compact desktop camera controls leave the tactical map unobstructed. */
 #hud:not(.touch) #optics { padding:5px; }
 #hud:not(.touch) #optics .optics-row { margin:3px 0 0; gap:3px; }
 #hud:not(.touch) #optics .optics-row button { height:24px; min-height:24px; padding:2px; }
 #hud:not(.touch) #optics .optics-label { font-size:8px; line-height:10px; padding:0; }
 #hud:not(.touch) #optics .altitude-label { margin-top:3px; }
 #hud:not(.touch) #reset-view { display:none; }
}
@media (max-width:650px) and (orientation:portrait) {
 #hud #flight-toast { bottom:330px; max-width:calc(100vw - 28px); }
}

/* Keep combat and the reticle visible while short messages appear at the edge. */
#hud #flight-toast {
 left:16px; bottom:20%; transform:none;
 max-width:min(270px,28vw); padding:7px 10px;
 background:#07100ec4; font-size:11px; line-height:1.3; text-align:left;
 pointer-events:none;
}
#hud #incoming {
 left:auto; right:16px; top:20%; transform:none;
 align-items:flex-end; padding:6px 10px;
 background:#120f06b8; pointer-events:none;
}
#hud #airframe-hit {
 left:auto; right:16px; top:15%; transform:none;
 padding:5px 9px; background:#3a170eb8; font-size:10px;
 pointer-events:none;
}
#hud #radio-subtitle {
 left:16px; bottom:28%; transform:none;
 width:min(300px,30vw); padding:7px 10px;
 background:#07100ebd; font-size:10px; line-height:1.35;
 pointer-events:none;
}
@media (max-width:650px) {
 #hud #flight-toast { left:10px; bottom:34%; max-width:45vw; padding:5px 7px; font-size:9px; }
 #hud #radio-subtitle { left:10px; bottom:44%; width:45vw; padding:5px 7px; font-size:9px; }
 #hud #incoming { right:10px; top:17%; max-width:45vw; padding:4px 7px; }
 #hud #airframe-hit { right:10px; top:12%; max-width:45vw; white-space:normal; font-size:9px; }
}

/* Touch flight deck: two thumb pads with clear central sightlines. */
.touch-device #menu .hangar-content { padding-bottom:100px; scroll-padding-bottom:100px; }
.touch-device #menu .mission-row { min-height:44px; }
.touch-device #menu .deploy-area { position:fixed; left:26%; right:0; bottom:0; z-index:5; padding:12px max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) 16px; background:#09150ff5; border-top:1px solid #60734c; }
.touch-device #menu .deploy-area button { width:100%; min-height:48px; height:48px; font-size:20px; }
.touch-device #menu .deploy-area > span { display:none; }
@media (max-width:650px) and (orientation:portrait) {
 .touch-device #menu .deploy-area { left:0; }
}
#touch-tools, #touch-hint { display:none; }
#hud.touch { --touch-top:max(8px,env(safe-area-inset-top)); --touch-left:max(14px,env(safe-area-inset-left)); --touch-right:max(14px,env(safe-area-inset-right)); --touch-bottom:max(14px,env(safe-area-inset-bottom)); }
#hud.touch .keyboard-help, #hud.touch #vision, #hud.touch #sensor-telemetry, #hud.touch #heavy-budget { display:none; }
#hud.touch button, #hud.touch #joystick { touch-action:none; -webkit-tap-highlight-color:transparent; }
#hud.touch #joystick, #hud.touch #touch-fire { display:flex; align-items:center; justify-content:center; position:absolute; width:100px; height:100px; bottom:var(--touch-bottom); border-radius:50%; pointer-events:auto; background:#08140eb8; border:1px solid #b9d59a99; }
#hud.touch #joystick { left:var(--touch-left); }
#hud.touch #touch-fire { right:var(--touch-right); flex-direction:column; gap:0; padding:0; color:#e0f4b4; }
#hud.touch #joystick > div { width:42px; height:42px; border:1px solid #c7e59c; border-radius:50%; background:#b4d78233; }
#hud.touch #joystick span, #hud.touch #touch-fire > span { position:absolute; bottom:10px; font-size:9px; letter-spacing:.02em; }
#hud.touch .aim-thumb { display:flex; align-items:center; justify-content:center; width:42px; height:42px; border:1px solid #c7e59c66; border-radius:50%; background:#b4d78222; margin-bottom:8px; }
#hud.touch .aim-thumb svg { width:25px; height:25px; }
#hud.touch #touch-fire.held { background:#294026dd; box-shadow:0 0 0 3px #c5e69a33; }
#hud.touch .weapon-panel { left:calc(var(--touch-left) + 118px); right:calc(var(--touch-right) + 118px); bottom:var(--touch-bottom); width:auto; gap:5px; grid-template-columns:repeat(4,minmax(0,1fr)); }
#hud.touch .weapon { min-height:58px; padding:6px; font-size:11px; line-height:1.2; }
#hud.touch .weapon b { display:none; }
#hud.touch .weapon > span { min-width:0; overflow-wrap:normal; }
#hud.touch .weapon small { font-size:8px; }
#hud.touch .radar-panel { left:auto; right:var(--touch-right); bottom:calc(var(--touch-bottom) + 112px); width:100px; transform:none; }
#hud.touch .radar-panel canvas { display:none; }
#hud.touch #evade { min-height:44px; width:100%; padding:5px; font-size:10px; }
#hud.touch #touch-tools { display:flex; position:absolute; top:calc(var(--touch-top) + 58px); right:var(--touch-right); gap:6px; }
#hud.touch #touch-tools button { min-width:72px; min-height:44px; padding:8px; font-size:10px; background:#07130fe0; }
#hud.touch #touch-camera[aria-expanded=true] { border-color:#d8f1b0; color:#d8f1b0; }
#hud.touch #optics { display:none; }
#hud.touch.optics-open #optics { display:block; top:auto; right:calc(var(--touch-right) + 116px); bottom:calc(var(--touch-bottom) + 78px); width:212px; padding:8px; background:#07130ff5; backdrop-filter:none; }
#hud.touch #optics .optics-row { gap:5px; margin:0 0 5px; }
#hud.touch #optics .optics-row button { height:44px; min-height:44px; padding:2px; }
#hud.touch #optics .optics-label { line-height:12px; padding-bottom:4px; }
#hud.touch #optics .altitude-row { grid-template-columns:44px 1fr 44px; margin-bottom:0; }
#hud.touch #reset-view { display:none; }
#hud.touch #altitude-readout { font-size:9px; }
#hud.touch #waypoint { bottom:calc(var(--touch-bottom) + 74px); max-width:calc(100vw - 280px); font-size:10px; white-space:normal; padding:4px 9px; }
#hud.touch #touch-hint { display:block; position:absolute; bottom:calc(var(--touch-bottom) + 110px); left:50%; transform:translateX(-50%); max-width:calc(100vw - 290px); margin:0; padding:5px 8px; font-size:10px; text-align:center; color:#e0edce; background:#07130fc9; }
#hud.touch #touch-hint[hidden] { display:none; }
#hud.touch #flight-toast { bottom:calc(var(--touch-bottom) + 162px); max-width:36vw; width:auto; }
#hud.touch #radio-subtitle { bottom:calc(var(--touch-bottom) + 162px); width:min(300px,40vw); }
#hud.touch #incoming { top:118px; right:var(--touch-right); max-width:120px; font-size:10px; }
#hud.touch #airframe-hit { top:112px; }
#hud.touch .flight-head { top:var(--touch-top); left:var(--touch-left); right:var(--touch-right); }
#hud.touch .airframe { grid-template-columns:auto 68px 44px; min-height:44px; padding:4px; gap:8px; }
#hud.touch .airframe .meter { width:68px; }
#hud.touch #pause { width:44px; height:44px; min-height:44px; padding:10px; }
#hud.touch .mission-hud { max-width:calc(100% - 230px); padding:4px 6px; }
#hud.touch .mission-hud .wordmark { display:none; }
#hud.touch .mission-hud h2 { margin:0 0 4px; font-size:12px; }
#hud.touch .mission-hud p { max-width:none; font-size:12px; }
#hud.touch .mission-progress { margin-top:6px; font-size:9px; }
#hud.touch #mission-steps { top:104px; left:var(--touch-left); font-size:8px; }

@media (orientation:landscape) and (max-height:500px) {
 #hud.touch #mission-steps { display:none; }
 #hud.touch .mission-hud p { font-size:11px; }
 #hud.touch #flight-toast, #hud.touch #radio-subtitle { bottom:calc(var(--touch-bottom) + 120px); font-size:9px; }
}
@media (orientation:landscape) and (max-width:700px) {
 #hud.touch #joystick, #hud.touch #touch-fire { width:88px; height:88px; }
 #hud.touch .weapon-panel { left:calc(var(--touch-left) + 100px); right:calc(var(--touch-right) + 100px); gap:3px; }
 #hud.touch .weapon { padding:4px 3px; font-size:8px; }
 #hud.touch .weapon small { font-size:6px; }
 #hud.touch .radar-panel { width:88px; bottom:calc(var(--touch-bottom) + 100px); }
 #hud.touch .airframe { grid-template-columns:auto 40px 44px; font-size:10px; gap:5px; }
 #hud.touch .airframe .meter { width:40px; }
 #hud.touch .mission-hud { max-width:calc(100% - 180px); }
 #hud.touch.optics-open #optics { width:200px; right:calc(var(--touch-right) + 100px); }
}
@media (orientation:portrait) {
 #hud.touch .flight-head { display:block; }
 #hud.touch .airframe { position:absolute; right:0; top:0; }
 #hud.touch .mission-hud { max-width:100%; padding:60px 0 0; }
 #hud.touch .mission-hud p { max-width:100%; font-size:11px; }
 #hud.touch #mission-steps { display:none; }
 #hud.touch #touch-tools { top:calc(var(--touch-top) + 143px); }
 #hud.touch .weapon-panel { left:var(--touch-left); right:var(--touch-right); bottom:calc(var(--touch-bottom) + 120px); }
 #hud.touch .weapon { min-height:62px; padding:5px 4px; font-size:9px; }
 #hud.touch .weapon small { font-size:7px; }
 #hud.touch .radar-panel { left:50%; right:auto; bottom:calc(var(--touch-bottom) + 27px); width:100px; transform:translateX(-50%); }
 #hud.touch #waypoint { bottom:calc(var(--touch-bottom) + 193px); max-width:calc(100vw - 28px); font-size:10px; }
 #hud.touch #touch-hint { bottom:calc(var(--touch-bottom) + 231px); max-width:calc(100vw - 28px); width:max-content; }
 #hud.touch #flight-toast, #hud.touch #radio-subtitle { bottom:calc(var(--touch-bottom) + 276px); max-width:62vw; width:auto; font-size:10px; }
 #hud.touch #incoming { top:calc(var(--touch-top) + 197px); }
 #hud.touch.optics-open #optics { right:var(--touch-right); bottom:auto; top:calc(var(--touch-top) + 195px); width:212px; }
}
@media (orientation:portrait) and (max-width:350px) {
 #hud.touch #joystick, #hud.touch #touch-fire { width:84px; height:84px; }
 #hud.touch .radar-panel { width:90px; bottom:calc(var(--touch-bottom) + 20px); }
}

/* Full Launch: the menu fits the publisher frame; no scrolling panels. */
@media (orientation:landscape) {
 #menu { grid-template-columns:23% minmax(0,1fr); overflow:hidden; }
 #menu .campaign { padding:clamp(10px,2vh,24px) 1.6vw; overflow:hidden; }
 #menu .campaign h1 { font-size:clamp(17px,2.1vw,30px); margin:0 0 1.5vh; }
 #menu .rail-title { padding:1vh 0; margin:0; }
 #menu .campaign nav { flex:1 1 0; min-height:0; display:flex; flex-direction:column; gap:4px; }
 #menu .mission-row { flex:1 1 0; min-height:0; max-height:52px; padding:3px 8px; gap:8px; }
 #menu .mission-row strong { font-size:clamp(11px,1.1vw,16px); }
 #menu .rail-foot { margin:8px 0; font-size:10px; }
 #menu .campaign .text-button { min-height:28px; padding:5px 0; }
 #menu .hangar-content { display:grid; grid-template-rows:minmax(0,1fr) clamp(34px,6vh,52px) clamp(80px,13vh,112px) max-content; height:100%; min-height:0; overflow:hidden; padding:0; }
 #menu .aircraft-preview { height:auto; min-height:0; }
 #menu #aircraft-list { padding:3px 16px; gap:5px; }
 #menu .aircraft-option { height:100%; min-height:0; font-size:clamp(10px,1vw,14px); padding:3px; }
 #menu .aircraft-caption { padding:6px 18px; gap:2px 18px; grid-template-columns:1.1fr 1fr; }
 #menu .aircraft-caption h2 { font-size:clamp(16px,2vw,24px); }
 #menu #aircraft-role,#menu #aircraft-use { font-size:clamp(10px,1vw,13px); line-height:1.25; margin:0; }
 #menu #aircraft-stats { font-size:clamp(10px,1vw,12px); }
 #menu #aircraft-stats b { font-size:12px; }
 #menu .briefing { min-height:0; padding:10px 18px 12px; gap:6px 18px; grid-template-columns:minmax(0,1fr) minmax(155px,32%); }
 #menu .mission-copy h2 { margin:0 0 5px; font-size:clamp(20px,2.6vw,34px); }
 #menu .mission-copy p { margin:4px 0; font-size:clamp(11px,1vw,14px); line-height:1.35; }
 #menu #briefing-objectives { font-size:clamp(10px,.95vw,12px); line-height:1.3; gap:5px 10px; }
 #menu #reward-preview { font-size:10px!important; margin:5px 0; }
 #menu .upgrade-area { padding-top:5px; }
 #menu .upgrade-heading { font-size:10px; margin-bottom:3px; }
 #menu .upgrade-row { min-height:24px; height:clamp(24px,3.6vh,34px); font-size:11px; padding:2px 0; grid-template-columns:65px 1fr 24px 55px; gap:5px; }
 #menu .upgrade-row strong { font-size:11px; }
 #menu .deploy-area { position:static; padding:0; border:0; background:none; gap:6px; }
 #menu .deploy-area button { width:100%; height:clamp(44px,8vh,70px); min-height:44px; font-size:clamp(20px,2.4vw,30px); }
 #menu .deploy-area > span { display:block; font-size:9px; line-height:1.3; }
}
@media (orientation:landscape) {
 body.touch-device #menu .hangar-content { padding:0; scroll-padding:0; }
 body.touch-device #menu .deploy-area { position:static; padding:0; background:none; border:0; }
 body.touch-device #menu .deploy-area button { height:44px; min-height:44px; }
 body.touch-device #menu .campaign nav { display:none; }
 body.touch-device #menu .mobile-missions { display:flex; flex-direction:column; gap:8px; margin:14px 0; }
 body.touch-device #menu .mobile-missions select { width:100%; min-width:0; min-height:44px; font-size:11px; }
 body.touch-device #menu .rail-foot { margin-top:auto; }
}
@media (orientation:portrait) {
 #menu { display:flex; flex-direction:column; overflow:hidden; }
 #menu .campaign { padding:10px 14px; gap:6px; overflow:hidden; }
 #menu .campaign h1 { font-size:20px; margin:0; }
 #menu .campaign nav,#menu .rail-title,#menu .rail-foot { display:none; }
 #menu .mobile-missions { display:flex; margin:0; }
 #menu .mobile-missions select { min-height:36px; }
 #menu .hangar-content,body.touch-device #menu .hangar-content { display:grid; flex:1; min-height:0; height:auto; padding:0; overflow:hidden; grid-template-rows:minmax(40px,1fr) 38px 130px auto; }
 #menu .aircraft-preview { height:auto; min-height:0; }
 #menu #aircraft-list { padding:3px 12px; }
 #menu .aircraft-option { height:32px; min-height:32px; padding:2px; }
 #menu .aircraft-caption { padding:5px 14px; gap:2px; }
 #menu .aircraft-caption h2 { font-size:19px; }
 #menu #aircraft-role,#menu #aircraft-use { font-size:10px; margin:0; line-height:1.2; }
 #menu #aircraft-stats { padding:2px 0 0; font-size:10px; }
 #menu #aircraft-stats b { font-size:11px; }
 #menu .briefing { padding:7px 14px 10px; min-height:0; gap:6px; }
 #menu .mission-copy h2 { font-size:22px; margin:0; }
 #menu .mission-copy p { font-size:11px; line-height:1.3; margin:4px 0; }
 #menu #briefing-objectives { font-size:10px; line-height:1.3; gap:3px 8px; }
 #menu #reward-preview { font-size:10px!important; margin:4px 0; }
 #menu .upgrade-area { padding-top:4px; }
 #menu .upgrade-heading { margin:0; font-size:10px; }
 #menu .upgrade-row { min-height:24px; font-size:11px; padding:2px 0; }
 #menu .deploy-area,body.touch-device #menu .deploy-area { position:static; padding:0; border:0; background:none; }
 #menu .deploy-area button,body.touch-device #menu .deploy-area button { height:44px; min-height:44px; font-size:22px; }
 #menu .deploy-area > span { display:none; }
}
@media (orientation:portrait) and (max-height:700px) {
 #menu .mission-copy #mission-description,#menu #aircraft-use { display:none; }
 #menu .hangar-content,body.touch-device #menu .hangar-content { grid-template-rows:minmax(35px,1fr) 36px 100px auto; }
}

/* 1.9.16 first-flight tutorial coach. It takes the slot of the mission-steps strip while it is active. */
#tutorial { position:absolute; left:calc(2.3vw + 13px); top:156px; width:min(330px,44vw); box-sizing:border-box; padding:10px 12px 11px; background:rgba(5,12,7,.92); border:1px solid #52604e; border-left:3px solid var(--acid); pointer-events:none; }
#tutorial[hidden] { display:none; }
.tutorial-head { display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:9px; letter-spacing:.08em; color:var(--muted); }
#hud #tutorial-skip { pointer-events:auto; min-width:0; min-height:0; width:auto; height:auto; padding:3px 9px; border:1px solid #52604e; background:transparent; color:var(--muted); font:inherit; font-size:9px; letter-spacing:.08em; cursor:pointer; }
#hud #tutorial-skip:hover, #hud #tutorial-skip:focus-visible { border-color:var(--acid); color:var(--acid); }
#tutorial-title { display:block; margin:7px 0 4px; font-family:"Black Ops One",sans-serif; font-weight:400; font-size:15px; letter-spacing:.02em; text-transform:uppercase; color:var(--acid); }
#tutorial-text { margin:0; font-size:12px; line-height:1.5; color:var(--text); }
#tutorial-text b { font-weight:inherit; color:#edffc4; }
#tutorial kbd { display:inline-block; min-width:9px; margin:0 2px; padding:0 5px; border:1px solid var(--acid); border-radius:3px; background:#101c10; color:#edffc4; font:inherit; font-size:11px; line-height:1.45; text-align:center; }
.tutorial-foot { display:flex; align-items:center; gap:10px; min-height:12px; margin-top:8px; font-size:10px; color:#dce6d0; white-space:nowrap; }
#tutorial-meter { flex:1; }
#tutorial-meter[hidden] { display:none; }
#tutorial.advance { animation:tutorial-advance .45s ease-out; }
@keyframes tutorial-advance { from { border-left-color:#fff; background:rgba(44,66,32,.96); transform:translateX(-8px); } to { transform:none; } }
#hud[data-tutorial] #mission-steps, #hud[data-tutorial] #touch-hint { display:none; }
#hud[data-tutorial="vesper"] #weapon-2, #hud[data-tutorial="escort"] #weapon-3, #hud[data-tutorial="escort"] #weapon-4, #hud[data-brief="flares"] #evade, #hud[data-brief="vesper"] #weapon-2, #hud.touch[data-brief="move"] #joystick, #hud.touch[data-brief="aim"] #touch-fire, #hud.touch[data-brief="defenses"] #touch-fire { animation:tutorial-pulse 1.1s ease-in-out infinite; }
/* the control a briefing is about stays lit above the dimmed screen */
#hud[data-brief="flares"] #evade, #hud[data-brief="vesper"] #weapon-2, #hud.touch[data-brief="move"] #joystick, #hud.touch[data-brief="aim"] #touch-fire, #hud.touch[data-brief="defenses"] #touch-fire { z-index:41; }
@keyframes tutorial-pulse { 50% { box-shadow:0 0 0 2px var(--acid), 0 0 14px rgba(204,237,129,.55); } }
@media (prefers-reduced-motion:reduce) { #tutorial.advance, #tutorial-brief, #hud[data-tutorial] .weapon, #hud[data-brief] .weapon, #hud[data-brief] #evade { animation:none; } }
/* 1.9.17 tutorial briefing: one instruction, read with the world frozen behind it, dismissed by its button. */
#tutorial-brief { position:absolute; left:50%; top:46%; transform:translate(-50%,-50%); z-index:40; width:min(500px,88vw); box-sizing:border-box; padding:22px 28px 16px; text-align:center; background:rgba(5,12,7,.97); border:1px solid var(--acid); box-shadow:0 0 0 200vmax rgba(1,5,2,.58), 0 18px 60px rgba(0,0,0,.6); pointer-events:auto; animation:brief-in .22s ease-out; }
#tutorial-brief[hidden] { display:none; }
@keyframes brief-in { from { opacity:0; transform:translate(-50%,-46%); } }
#brief-step { display:block; font-size:11px; letter-spacing:.16em; color:var(--muted); }
#brief-title { display:block; margin:8px 0 14px; font-family:"Black Ops One",sans-serif; font-weight:400; font-size:30px; line-height:1.1; letter-spacing:.02em; text-transform:uppercase; color:var(--acid); }
#brief-keys { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:0 0 14px; }
#brief-keys[hidden] { display:none; }
#brief-keys kbd { min-width:22px; padding:9px 13px; border:2px solid var(--acid); border-radius:7px; background:#101c10; color:#edffc4; font:inherit; font-size:18px; font-weight:600; line-height:1; letter-spacing:.04em; box-shadow:0 3px 0 #2f3d2a; }
#brief-text { margin:0 auto 18px; max-width:30em; font-size:17px; line-height:1.5; color:var(--text); }
#hud #brief-go { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:220px; min-height:52px; height:auto; padding:0 28px; border:0; background:var(--acid); color:#0b1408; font:inherit; font-size:17px; font-weight:700; letter-spacing:.08em; cursor:pointer; pointer-events:auto; }
#hud #brief-go:hover, #hud #brief-go:focus-visible { background:#edffc4; outline:2px solid #fff; outline-offset:3px; }
#brief-hint { display:block; margin-top:9px; font-size:11px; letter-spacing:.06em; color:var(--muted); }
#hud #brief-skip { display:block; width:auto; min-width:0; min-height:0; height:auto; margin:12px auto 0; padding:4px 8px; border:0; background:none; color:var(--muted); font:inherit; font-size:11px; letter-spacing:.06em; text-decoration:underline; cursor:pointer; pointer-events:auto; }
#hud #brief-skip:hover, #hud #brief-skip:focus-visible { color:var(--acid); }
@media (max-height:520px) {
 #tutorial-brief { top:50%; padding:12px 20px 10px; width:min(520px,78vw); }
 #brief-title { margin:4px 0 8px; font-size:21px; }
 #brief-keys { margin-bottom:8px; } #brief-keys kbd { padding:6px 10px; font-size:14px; }
 #brief-text { margin-bottom:10px; font-size:14px; line-height:1.4; }
 #hud #brief-go { min-height:42px; font-size:15px; } #hud #brief-skip { margin-top:6px; }
}
@media (max-width:480px) { #brief-title { font-size:24px; } #brief-text { font-size:15px; } #tutorial-brief { padding:18px 18px 12px; } }
@media (max-width:1000px) {
 #tutorial { top:126px; left:calc(2.3vw + 7px); width:min(290px,44vw); padding:7px 10px 8px; }
 #tutorial-title { margin:5px 0 3px; font-size:13px; }
 #tutorial-text { font-size:11px; line-height:1.4; }
 .tutorial-foot { margin-top:6px; }
}
#hud.touch #tutorial { left:var(--touch-left,10px); top:104px; }
@media (orientation:landscape) and (max-height:500px) {
 #hud.touch #tutorial { top:76px; width:min(300px,40vw); }
}
@media (orientation:portrait) {
 #hud.touch #tutorial { top:202px; left:10px; right:10px; width:auto; padding:6px 10px 7px; }
 #hud.touch #tutorial-title { margin:4px 0 2px; font-size:12px; }
 #hud.touch #tutorial-text { font-size:10.5px; line-height:1.35; }
 #hud.touch .tutorial-foot { margin-top:4px; min-height:10px; }
}
/* Short portrait phones: the card takes the mission header's place so the reticle stays clear. */
@media (orientation:portrait) and (max-height:700px) {
 #hud.touch[data-tutorial] #hud-mission, #hud.touch[data-tutorial] #hud-objective, #hud.touch[data-tutorial] .mission-progress { display:none; }
 #hud.touch[data-tutorial] #touch-tools { top:calc(var(--touch-top) + 50px); }
 #hud.touch #tutorial { top:114px; }
}
/* 1.9.16 limited flares */
#hud #evade.empty { border-color:#f0a577; color:#f0a577; }

/* 1.9.16 objectives: finished stages are struck out, remaining targets are listed and highlighted. */
#hud #mission-steps span.done { text-decoration:line-through; text-decoration-thickness:1px; opacity:.6; }
#objective-list { position:absolute; left:calc(2.3vw + 13px); top:186px; display:flex; flex-direction:column; gap:3px; padding:6px 9px; background:#081108a8; font-size:10px; letter-spacing:.04em; color:#edffc4; text-shadow:0 1px 4px #000; pointer-events:none; }
#objective-list:empty { display:none; }
#objective-list b { font-weight:inherit; color:var(--acid); margin-left:4px; }
#objective-list span.done { color:#a6d393; opacity:.55; text-decoration:line-through; }
#objective-list span.active { color:#b0ecff; }
#hud[data-tutorial] #objective-list { display:none; }
@media (max-width:1000px) { #objective-list { top:152px; left:calc(2.3vw + 7px); font-size:9px; gap:2px; padding:5px 7px; } }
#hud.touch #objective-list { display:none; }
#hud #objective-markers > span.hunt i { border-width:2px; border-color:#f4ffd9; background:#cced8155; box-shadow:0 0 0 0 rgba(204,237,129,.9); animation:hunt-pulse 1.25s ease-out infinite; }
#hud #objective-markers > span.hunt { color:#f4ffd9; }
@keyframes hunt-pulse { 0% { box-shadow:0 0 0 0 rgba(204,237,129,.85); } 100% { box-shadow:0 0 0 16px rgba(204,237,129,0); } }
#hud #objective-markers > span.edge { transform:translate(-50%,-50%); flex-direction:row; gap:6px; padding:3px 8px; background:#06100cd9; border:1px solid #cced8188; font-size:9px; }
#hud #objective-markers > span.edge b { display:inline-block; font-size:10px; color:var(--acid); }
@media (prefers-reduced-motion:reduce) { #hud #objective-markers > span.hunt i { animation:none; } }

/* 1.9.16 tracking points: a marked target carries a boxed tag, as on a surveillance feed. */
#hud #objective-markers > span:not(.edge) { flex-direction:column-reverse; gap:3px; }
#hud #objective-markers > span:not(.edge) i { width:18px; height:18px; transform:none; border:1.5px solid #ff7b66; background:transparent; }
#hud #objective-markers > span em { font-style:normal; padding:1px 5px 2px; background:#c93b2bd9; color:#fff; font-size:8px; letter-spacing:.07em; text-shadow:none; }
#hud #objective-markers > span.edge em { background:none; padding:0; color:inherit; font-size:inherit; }
#hud #objective-markers > span.intel i { border-color:#b7e9f4; border-radius:50%; }
#hud #objective-markers > span.intel em { background:#1f6b7ad9; }
#hud #objective-markers > span.current-objective i { border-width:2.5px; border-color:#ffb2a3; }
#hud #objective-markers > span.hunt i { border-color:#ffd0c6; background:#ff7b6630; box-shadow:0 0 0 0 rgba(255,123,102,.9); animation-name:hunt-pulse-red; }
@keyframes hunt-pulse-red { 0% { box-shadow:0 0 0 0 rgba(255,123,102,.85); } 100% { box-shadow:0 0 0 16px rgba(255,123,102,0); } }

/* 1.9.18: the phase tabs and the target checklist flow under the mission header. They sat at fixed offsets
   (156 px and 186 px) and the header's stats line ran over them whenever it was taller (CrazyGames review of
   05/10/2026, mission 2). */
#hud #mission-steps, #hud.touch #mission-steps { position:static; top:auto; left:auto; right:auto; margin-top:8px; width:max-content; max-width:100%; flex-wrap:wrap; }
#hud #objective-list, #hud.touch #objective-list { position:static; top:auto; left:auto; right:auto; margin-top:5px; width:max-content; max-width:100%; }
#hud #objective-list:empty { display:none; }

/* 1.10.0: the Performance-mode offer on the pause menu and the debrief, once the device has stayed slow. */
.perf-tip{margin:.9rem 0 0;font-size:.8rem;line-height:1.35;opacity:.9;text-align:center}
.perf-tip .perf-mode{display:block;width:100%;margin-top:.45rem}
/* 1.10.0: daily op button above DEPLOY (beats the big DEPLOY button rules at every size). */
#menu .deploy-area #daily-op,body.touch-device #menu .deploy-area #daily-op,.touch-device #menu .deploy-area #daily-op{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:1px;width:100%;height:auto;min-height:40px;margin:0 0 6px;padding:5px 10px;text-align:left;border:1px solid #d6ed94;background:rgba(214,237,148,.08);color:#edffc4;font:600 12px/1.2 inherit;font-size:12px;letter-spacing:.06em;cursor:pointer}
#menu .deploy-area #daily-op.hidden{display:none!important}
#menu .deploy-area #daily-op span{display:block;font-size:12px;line-height:1.2}
#menu .deploy-area #daily-op small{display:block;font-size:10px;line-height:1.2;opacity:.8;letter-spacing:.03em}
#menu .deploy-area #daily-op:disabled{border-color:rgba(214,237,148,.35);background:transparent;opacity:.75;cursor:default}
/* 1.10.0: Campaign 2 heading in the mission rail. */
#menu .rail-title.campaign-two{margin-top:10px}
#menu .rail-title.campaign-two small{display:block;margin-top:2px;font-size:10px;letter-spacing:.04em;text-transform:none;opacity:.7}
/* 1.11.0: rewarded supply drop (hangar only, never in flight). Cyan, so it never reads as an upgrade row or as the
   acid-green DEPLOY / daily op; the video icon says it is an ad. It sits under the upgrades, except on touch screens
   in landscape, where that column has no height to spare (640x360 already scrolls) and the rail, which shows the
   mission dropdown there, has room. */
#menu .supply-drop,body.touch-device #menu .supply-drop{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:1px;width:100%;height:auto;min-height:32px;margin:6px 0 0;padding:4px 10px;text-align:left;border:1px solid rgba(120,214,230,.75);background:rgba(120,214,230,.07);color:#d6f6fb;font:600 11px/1.2 inherit;font-size:11px;letter-spacing:.06em;cursor:pointer}
#menu .supply-drop.hidden,#menu #supply-drop-rail{display:none!important}
#menu .supply-drop span{display:flex;align-items:center;gap:6px;font-size:11px;line-height:1.2}
#menu .supply-drop span svg{width:14px;height:14px;flex:none}
#menu .supply-drop small{display:block;font-size:9px;line-height:1.2;opacity:.8;letter-spacing:.03em}
#menu .supply-drop:disabled{border-color:rgba(120,214,230,.3);background:transparent;opacity:.7;cursor:default}
@media (orientation:landscape){
 body.touch-device #menu #supply-drop{display:none!important}
 body.touch-device #menu #supply-drop-rail:not(.hidden){display:flex!important;margin:0 0 10px;min-height:40px}
 body.touch-device #menu #supply-drop-rail span{font-size:10px}
}
/* 1.11.1: the debrief must fit the game frame (CrazyGames review of 14/10/2026: the 1.11.0 debrief, with the WATCH AD
   offer, an unlock line and the Performance tip, ran to 710 px and showed the browser's scrollbar in any frame under
   about 740 px). Under 800 px of height the card drops its icon and tightens every gap; under 640 px it goes tighter
   still, and the tip's button sits beside its text. Any dialog that still has to scroll (small phones) uses the
   game's own thin scrollbar, never the browser's. */
dialog{scrollbar-width:thin;scrollbar-color:#607356 #0b140e}
dialog::-webkit-scrollbar{width:8px}
dialog::-webkit-scrollbar-track{background:#0b140e}
dialog::-webkit-scrollbar-thumb{background:#607356;border-radius:4px;border:2px solid #0b140e}
#debrief #reward-status:empty{display:none}
#debrief .perf-tip{margin:10px 0 0}
#debrief .perf-tip .perf-mode{margin-top:5px;min-height:40px;padding:8px 12px}
@media (max-height:799px){
 #debrief{padding:18px 24px}
 #debrief .result-mark{display:none}
 #debrief h2{font-size:27px;margin:0 0 6px}
 #debrief #result-subtitle{margin:0 0 4px;line-height:1.5}
 #debrief #result-stars{font-size:21px;margin:2px 0 8px;letter-spacing:6px}
 #debrief #result-stats{padding:9px 0;margin-bottom:8px;gap:8px}
 #debrief #result-stats strong{font-size:19px}
 #debrief #result-stats span{margin-top:3px}
 #debrief #unlocks{margin:0 0 9px;line-height:1.4}
 #debrief .result-actions{gap:7px}
 #debrief .result-actions button{min-height:38px;padding:7px 12px}
 #debrief .result-actions .primary{min-height:42px;font-size:15px}
 #debrief #reward{margin-top:0;min-height:44px;padding:6px 12px;line-height:1.2}
 #debrief #reward small{margin-top:3px}
 #debrief #reward-status{margin:8px 0 0}
 #debrief .perf-tip{margin:8px 0 0;font-size:12px}
 #debrief .perf-tip .perf-mode{margin-top:4px;min-height:34px;padding:6px 10px;font-size:12px}
}
@media (max-height:639px){
 #debrief{padding:12px 20px}
 #debrief h2{font-size:22px;margin:0 0 3px}
 #debrief #result-subtitle{margin:0 0 2px;font-size:12px}
 #debrief #result-stars{font-size:18px;margin:0 0 5px}
 #debrief #result-stats{padding:6px 0;margin-bottom:6px;gap:6px}
 #debrief #result-stats strong{font-size:17px}
 #debrief #result-stats span{margin-top:2px;font-size:8px}
 #debrief #unlocks{margin:0 0 6px;font-size:11px;line-height:1.35}
 #debrief .result-actions{gap:5px}
 #debrief .result-actions button{min-height:34px;padding:5px 10px;font-size:11px}
 #debrief .result-actions .primary{min-height:38px;font-size:14px}
 #debrief #reward{min-height:40px;padding:4px 10px}
 #debrief #reward small{margin-top:2px;font-size:9px}
 #debrief #reward-status{margin:6px 0 0;font-size:11px}
 #debrief .perf-tip{display:flex;align-items:center;justify-content:center;gap:8px;margin:6px 0 0;font-size:11px}
 #debrief .perf-tip .perf-mode{display:inline-block;width:auto;margin:0;min-height:30px;padding:4px 10px;font-size:11px}
}
@media (max-height:639px) and (min-width:651px) and (max-width:1000px){
 #debrief #result-stats{grid-template-columns:repeat(4,1fr);gap:6px}
}

/* ======== Update 1 (1.12): messages at the edges, the centre kept clear, floating touch controls ========
   Players: "so many messages pop up they cover the gaming area". Every message now has its own edge slot:
   critical alerts (low signal, incoming fire, airframe hit) share one stack in the right column, the one toast
   line sits in the left column (desktop: above the weapons), General Ward's subtitles have their own band, and
   the old centred CHAIN counter is part of the score line. */
#hud #combo { display:none; }
#hud #alerts { position:absolute; display:flex; flex-direction:column; align-items:flex-end; gap:5px; pointer-events:none;
 top:17%; right:max(10px,env(safe-area-inset-right)); width:min(220px,45vw); }
#hud #alerts > #link-warning, #hud #alerts > #incoming, #hud #alerts > #airframe-hit { position:static; left:auto; right:auto; top:auto; transform:none; margin:0; max-width:100%; box-sizing:border-box; }
#hud #alerts > #incoming:not(.active), #hud #alerts > #airframe-hit:not(.active) { display:none; }
#hud #alerts > #link-warning { padding:6px 10px; font-size:11px; line-height:1.35; text-align:right; }
#hud #alerts > #incoming { padding:5px 10px; gap:2px; }
#hud #alerts > #airframe-hit { white-space:normal; line-height:1.35; }
@media (min-width:651px) {
 #hud:not(.touch) #alerts { top:126px; right:calc(max(2.3vw,env(safe-area-inset-right)) + 146px); width:200px; }
}
/* toast: one line (two on a large desktop window), left column; each message is its own line */
#hud #flight-toast { display:flex; flex-direction:column; gap:4px; left:max(16px,env(safe-area-inset-left)); }
#hud #flight-toast > span { display:block; }
#hud #flight-toast > span.critical { color:#ffd9a8; }
#hud #flight-toast > span + span { padding-top:4px; border-top:1px solid #cced8133; }
@media (min-width:651px) {
 /* the radio box sits a full two-line toast above the toast, so the two never meet (they touched at 720p) */
 #hud:not(.touch) #radio-subtitle { left:max(16px,env(safe-area-inset-left)); bottom:calc(max(24%,132px) + 92px); }
}

/* ---- touch ---- */
#hud.touch { --pad:100px; }
#hud.touch #joystick, #hud.touch #touch-fire { pointer-events:none; opacity:.5; transition:opacity .15s; }
#hud.touch #joystick.floating, #hud.touch #touch-fire.floating, #hud.touch #touch-fire.held { opacity:1; }
#hud.touch #touch-fire { background:#08140eb8; }
#hud.touch #touch-fire > span, #hud.touch #joystick > span { font-size:10px; white-space:nowrap; }
#hud.touch .weapon small { font-size:10px; }
#hud.touch #touch-fire.cancel { border-color:#ff8a6b; background:#3a170ed9; color:#ffd2c2; }
#hud.touch #touch-fire.cancelled { box-shadow:0 0 0 3px #ff8a6b66; }
#hud #aim-cancel { position:absolute; z-index:6; padding:12px 16px; min-width:92px; text-align:center; font-size:12px; font-weight:600; letter-spacing:.08em; color:#ffd2c2; background:#1d0d08e6; border:1px dashed #ff8a6b; border-radius:6px; pointer-events:none; }
#hud #aim-cancel.armed { border-style:solid; background:#5a1d10f2; color:#fff; box-shadow:0 0 0 3px #ff8a6b55; }
#hud #aim-cancel[hidden], #hud #fire-button[hidden], #rotate-prompt[hidden] { display:none; }
#hud #fire-button { position:absolute; z-index:4; display:none; }
#hud.touch #fire-button:not([hidden]) { display:flex; align-items:center; justify-content:center; right:calc(var(--touch-right) + var(--pad) + 14px); bottom:calc(var(--touch-bottom) + var(--pad) + 24px); width:68px; height:68px; min-height:68px; padding:0; border-radius:50%; border:2px solid #d6ed94; background:#2a3a1fdd; color:#edffc4; font-size:13px; font-weight:700; letter-spacing:.08em; touch-action:none; }
#hud.touch #fire-button.held { background:#d6ed94; color:#0b1408; }
#altitude-pad { display:none; }
#hud.touch #altitude-pad { display:flex; align-items:center; gap:4px; position:absolute; left:var(--touch-left); bottom:calc(var(--touch-bottom) + var(--pad) + 24px); pointer-events:none; }
#hud.touch #altitude-pad button { width:48px; height:48px; min-height:48px; padding:0; font-size:16px; line-height:1; background:#07130fe0; border:1px solid #b9d59a99; color:#e0f4b4; pointer-events:auto; touch-action:none; }
#hud.touch #altitude-pad button.held { background:#294026; border-color:#d8f1b0; }
#hud.touch #altitude-pad button:disabled { opacity:.35; }
#hud.touch #alt-readout { min-width:40px; text-align:center; font-size:10px; color:#dce9c6; text-shadow:0 1px 3px #000; }
/* FLARES: a 48 px target, 24 px clear of the aim pad */
#hud.touch .radar-panel { left:auto; right:var(--touch-right); bottom:calc(var(--touch-bottom) + var(--pad) + 24px); width:var(--pad); transform:none; }
#hud.touch #evade { min-height:48px; height:48px; font-size:10px; }
/* CAMERA is for turning the view now: zoom is a pinch, altitude has its own buttons */
#hud.touch #optics .optics-row:nth-child(2), #hud.touch #optics .altitude-label, #hud.touch #optics .altitude-row { display:none; }
#hud.touch.optics-open #optics { width:180px; right:calc(var(--touch-right) + var(--pad) + 96px); bottom:calc(var(--touch-bottom) + 78px); }
/* the alert stack: the right column, between the vision/camera buttons and FLARES */
#hud.touch #alerts { top:calc(var(--touch-top) + 110px); right:var(--touch-right); width:min(230px,34vw); gap:4px; }
#hud.touch #alerts > #incoming { flex-direction:row; gap:8px; padding:3px 8px; max-width:100%; font-size:10px; }
#hud.touch #alerts > #incoming strong { font-size:11px; letter-spacing:.1em; }
#hud.touch #alerts > #incoming span { font-size:10px; letter-spacing:.04em; }
#hud.touch #alerts > #airframe-hit { padding:3px 8px; font-size:10px; }
#hud.touch #alerts > #link-warning { padding:3px 8px; font-size:10px; }
/* the toast: left column under the mission header; General Ward above the altitude buttons */
#hud.touch #flight-toast { top:calc(var(--touch-top) + 64px); bottom:auto; left:var(--touch-left); max-width:min(320px,38vw); width:auto; padding:5px 8px; font-size:11px; line-height:1.3; }
#hud.touch #radio-subtitle { top:auto; left:var(--touch-left); bottom:calc(var(--touch-bottom) + var(--pad) + 84px); width:min(320px,38vw); max-width:none; padding:5px 8px; font-size:10px; line-height:1.35; }
#hud.touch #radio-subtitle > span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; overflow:hidden; }
#hud.touch #radio-subtitle .radio-heading { margin-bottom:2px; }
#hud.touch #command-voice { display:none; }
#hud.touch #waypoint { bottom:calc(var(--touch-bottom) + 66px); }
#hud.touch #touch-hint { bottom:calc(var(--touch-bottom) + 106px); }
/* on the first flight the tutorial card owns the left column: the toast moves above the waypoint and the
   subtitles step aside (the card says what matters) */
#hud.touch[data-tutorial] #flight-toast { left:50%; right:auto; top:auto; bottom:calc(var(--touch-bottom) + 98px); transform:translateX(-50%); max-width:min(360px,52vw); text-align:center; }
#hud.touch[data-tutorial] #radio-subtitle { display:none; }
/* readable on a small phone: nothing under 10 px, every touch target 44 px */
#hud.touch .mission-progress, #hud.touch #altitude-readout, #hud.touch .tutorial-head, #hud.touch .airframe { font-size:10px; }
#hud.touch #objective-markers > span em { font-size:10px; }
#hud.touch #objective-markers > span.edge { font-size:10px; }
#hud.touch #damage-markers small { display:none; }
#hud.touch #tutorial-skip { min-height:44px; min-width:64px; padding:0 14px; font-size:11px; }
#hud.touch #brief-skip { min-height:44px; padding:10px 18px; font-size:12px; }
#hud.touch #brief-go { min-height:48px; }
#hud.touch #pause { min-width:44px; }
@media (orientation:landscape) and (max-width:700px) {
 #hud.touch { --pad:88px; }
 #hud.touch .weapon { padding:4px 3px; font-size:10px; }
 #hud.touch .radar-panel { width:var(--pad); bottom:calc(var(--touch-bottom) + var(--pad) + 24px); }
}
@media (orientation:landscape) and (max-height:380px) {
 #hud.touch #radio-subtitle > span { -webkit-line-clamp:3; }
}
@media (orientation:portrait) {
 #hud.touch .weapon { font-size:10px; }
 #hud.touch .radar-panel { left:50%; right:auto; bottom:calc(var(--touch-bottom) + 27px); transform:translateX(-50%); width:100px; }
 #hud.touch #altitude-pad { left:auto; right:var(--touch-right); bottom:calc(var(--touch-bottom) + 200px); flex-direction:column; gap:2px; }
 #hud.touch #altitude-pad button { width:52px; }
 #hud.touch #fire-button:not([hidden]) { right:calc(var(--touch-right) + 60px); bottom:calc(var(--touch-bottom) + 200px); }
 #hud.touch #waypoint { bottom:calc(var(--touch-bottom) + 196px); max-width:calc(100vw - 2 * var(--touch-left) - 130px); }
 #hud.touch #touch-hint { left:var(--touch-left); transform:none; bottom:calc(var(--touch-bottom) + 232px); max-width:calc(100vw - var(--touch-left) - var(--touch-right) - 70px); text-align:left; }
 /* NIGHT / CAMERA move up beside the airframe readout: the band under the mission header is for messages */
 #hud.touch #touch-tools, #hud.touch[data-tutorial] #touch-tools { top:var(--touch-top); left:var(--touch-left); right:auto; }
 #hud.touch #touch-tools button { min-width:62px; padding:6px; }
 #hud.touch #alerts { top:calc(var(--touch-top) + 120px); width:min(160px,42vw); }
 #hud.touch #flight-toast { top:calc(var(--touch-top) + 120px); max-width:calc(100vw - var(--touch-left) - var(--touch-right) - min(160px,42vw) - 10px); }
 #hud.touch #radio-subtitle { left:var(--touch-left); bottom:calc(var(--touch-bottom) + 262px); width:calc(100vw - var(--touch-left) - var(--touch-right) - 70px); }
 #hud.touch #radio-subtitle > span { -webkit-line-clamp:3; }
 #hud.touch[data-tutorial] #flight-toast { bottom:calc(var(--touch-bottom) + 262px); max-width:calc(100vw - 2 * var(--touch-left)); }
 #hud.touch #tutorial { left:var(--touch-left); right:var(--touch-right); }
 #hud.touch.optics-open #optics { left:var(--touch-left); right:auto; top:calc(var(--touch-top) + 196px); bottom:auto; }
}
@media (orientation:portrait) and (max-width:350px) {
 #hud.touch { --pad:84px; }
}
/* portrait phones: the battlefield is a narrow slice; offered once per session in the hangar and the climb */
#rotate-prompt { position:fixed; z-index:30; left:50%; top:38%; transform:translate(-50%,-50%); width:min(300px,84vw); box-sizing:border-box; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 18px 14px; text-align:center; background:#07130ff2; border:1px solid var(--acid,#cced81); box-shadow:0 18px 60px #000a; }
#rotate-prompt strong { font-family:"Black Ops One",sans-serif; font-weight:400; font-size:20px; line-height:1.15; color:var(--acid,#cced81); text-transform:uppercase; }
#rotate-prompt strong::before { content:"\21BB"; display:block; font-size:34px; margin-bottom:6px; }
#rotate-prompt span { font-size:13px; line-height:1.4; color:#dce6d0; }
#rotate-prompt button { min-height:44px; padding:0 18px; font-size:12px; letter-spacing:.08em; }
body:not(.touch-device) #settings-dialog .touch-only { display:none; }
/* the launch caption wraps on a phone (it carries "TAP TO SKIP" there) */
.touch-device #cinematic-caption { white-space:normal; width:max-content; max-width:calc(100vw - 32px); box-sizing:border-box; }
.touch-device #cinematic-caption span { font-size:11px; line-height:1.4; }
/* desktop: the key reminder sits under the weapon row (it ran over it at 1280x720) */
#hud:not(.touch) .keyboard-help { bottom:3px; padding:2px 10px; font-size:9px; line-height:1.3; }
/* short portrait phones: the tutorial card takes the header's place, so the alert stack waits below it */
@media (orientation:portrait) and (max-height:700px) {
 #hud.touch[data-tutorial] #alerts { top:calc(var(--touch-top) + 236px); }
}
/* small desktop windows (embedded frames on laptops): a narrower alert stack hugging the optics panel, and the
   decorative sensor line and reload summary give their room back so the waypoint sits just above the weapons */
@media (min-width:651px) and (max-width:1100px) {
 #hud:not(.touch) #alerts { right:calc(max(2.3vw,env(safe-area-inset-right)) + 140px); width:150px; }
 #hud:not(.touch) #alerts > * { font-size:10px; }
 #hud:not(.touch) #alerts > #incoming { padding:4px 8px; }
 #hud:not(.touch) #alerts > #incoming strong { font-size:11px; letter-spacing:.1em; }
 #hud:not(.touch) #alerts > #incoming span { font-size:9px; }
}
@media (min-width:651px) and (max-width:900px) {
 #hud:not(.touch) #alerts { width:130px; }
}
@media (min-width:651px) and (max-height:620px) {
 #hud:not(.touch) #sensor-telemetry, #hud:not(.touch) #heavy-budget { display:none; }
 #hud:not(.touch) #waypoint { bottom:108px; }
}
@media (orientation:landscape) and (max-width:700px) {
 #hud.touch #flight-toast { max-width:min(300px,32vw); }
 #hud.touch #radio-subtitle { width:min(300px,34vw); }
}
@media (orientation:portrait) {
 #hud.touch #alerts > #incoming { flex-direction:column; align-items:flex-end; gap:1px; }
}
/* tablets in landscape keep the phase tabs under the mission header: the toast goes below them */
@media (orientation:landscape) and (min-height:501px) {
 #hud.touch #flight-toast { top:calc(var(--touch-top) + 104px); }
}
/* portrait: the first-sortie controls reminder gives way to General Ward's subtitles (they share the band) */
@media (orientation:portrait) {
 #hud.touch #radio-subtitle.active ~ #touch-hint { display:none; }
}
#hud[data-brief] #touch-hint { display:none; }
/* short desktop windows (under 620 px): the subtitles sit lower, at most three lines, and the target checklist folds
   away while they show (the objective line and the count stay) */
@media (min-width:651px) and (max-height:620px) {
 #hud:not(.touch) #radio-subtitle { bottom:calc(max(24%,132px) + 76px); width:min(300px,34vw); }
 #hud:not(.touch) #radio-subtitle > span { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
 #hud.radio-on:not(.touch) #objective-list { display:none; }
}
/* narrow portrait phones: a slimmer airframe readout and camera buttons share the top row */
@media (orientation:portrait) and (max-width:370px) {
 #hud.touch .airframe { grid-template-columns:auto 36px 44px; gap:5px; }
 #hud.touch .airframe .meter { width:36px; }
 #hud.touch #touch-tools button { min-width:54px; padding:4px; }
}
@media (min-width:651px) and (max-height:440px) {
 #hud.radio-on:not(.touch) #mission-steps { display:none; }
}
#hud.touch #mission-steps { font-size:10px; }

/* 1.13.0: a pilot with a cleared mission knows the keys. The legend goes and the optics panel folds to its
   heading (click it to open); the keys, the wheel and right-drag keep working either way. Desktop only. */
#hud.seasoned:not(.touch) .keyboard-help { display:none; }
#hud.seasoned:not(.touch) #optics .optics-label:first-child { cursor:pointer; padding:2px 0; }
#hud.seasoned:not(.touch) #optics .optics-label:first-child::after { content:" \25B8"; }
#hud.seasoned.optics-full:not(.touch) #optics .optics-label:first-child::after { content:" \25BE"; }
#hud.seasoned:not(.touch):not(.optics-full) #optics > :not(:first-child) { display:none; }
