/* Readable menu type at desktop and compact sizes. */
/* Let routine readouts recede while preserving actionable warnings and controls. */
#hud .mission-hud, #hud #mission-steps, #hud #objective-markers,
#hud #sensor-telemetry, #hud .keyboard-help, #hud #heavy-budget,
#hud #radio-subtitle { transition: opacity .35s ease; }
#hud #sensor-telemetry { opacity:.58; }
#hud .keyboard-help, #hud #heavy-budget { opacity:.5; }
#hud.routine-info .mission-hud, #hud.routine-info #mission-steps { opacity:.65; }
#hud.routine-info #objective-markers { opacity:.62; }
#hud #radio-subtitle.active.subdued { opacity:.42; }
#hud #radio-subtitle.active:hover, #hud #radio-subtitle.active:focus-within { opacity:1; }
#hud .mission-hud:hover, #hud .mission-hud:focus-within { opacity:1; }
@media (prefers-reduced-motion:reduce) {
  #hud .mission-hud, #hud #mission-steps, #hud #objective-markers,
  #hud #sensor-telemetry, #hud .keyboard-help, #hud #heavy-budget,
  #hud #radio-subtitle { transition:none; }
}
#damage-markers > .health-frame {
  position: absolute; transform: translate(-50%, -50%); padding: 0;
  border: 1px solid var(--health-color); background: transparent;
  box-shadow: inset 0 0 0 1px #07100a88; color: var(--health-color);
}
.health-frame b, #damage-markers .health-frame small {
  position: absolute; right: -1px; top: 100%; padding: 3px 5px;
  margin: 0; background: #06100deb; font-size: 12px; line-height: 1.3;
}
#damage-markers .health-frame small { top: calc(100% + 21px); font-size: 8px; }
.health-frame i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(to right, var(--health-color) var(--remaining), #101a14aa var(--remaining));
}
#target-damage, #target-health { display: none; }
#menu .mission-row strong { font-size: clamp(13px, 1.2vw, 18px); white-space: normal; }
#menu .mission-copy p { font-size: 15px; line-height: 1.6; }
#menu #briefing-objectives { font-size: 13px; line-height: 1.6; }
#menu #reward-preview { font-size: 12px !important; }
#menu #aircraft-use, #menu .aircraft-caption p { font-size: 13px; line-height: 1.5; }
#menu #aircraft-stats { font-size: 12px; }
#menu #aircraft-stats b { font-size: 14px; }
#menu .aircraft-caption > span, #menu .upgrade-heading,
#menu .deploy-area > span, #menu .upgrade-row small { font-size: 11px; }
#menu .aircraft-option, #menu .upgrade-row { font-size: 14px; }
#menu .upgrade-row strong { font-size: 12px; }
#menu .aircraft-caption { max-width: 390px; }
#menu .campaign { overflow-y: auto; pointer-events: auto; touch-action: pan-y; }
#menu .campaign nav { flex: 1 0 auto; }
#menu .campaign > * { flex-shrink: 0; }
@media (min-width: 651px) {
  #menu .hangar-content { overflow-y: auto; pointer-events: auto; touch-action: pan-y; }
  #menu .aircraft-preview { min-height: 350px; flex-shrink: 0; }
  #menu .briefing { flex-shrink: 0; }
}
@media (max-width: 1000px), (max-height: 600px) {
  #menu .mission-copy p { font-size: 13px; }
  #menu #briefing-objectives { font-size: 12px; }
  #menu #aircraft-use, #menu .aircraft-caption p { font-size: 12px; }
  #menu #aircraft-stats { font-size: 11px; }
  #menu .aircraft-caption { max-width: 320px; }
}
@media (max-width: 650px) and (orientation: portrait) {
  #menu .aircraft-preview { min-height: 330px; }
  #menu .aircraft-caption { max-width: 280px; }
  #menu .aircraft-option { font-size: 12px; }
}
#settings-dialog .audio-channel { display:grid; grid-template-columns: 1fr minmax(90px,1.4fr) 3.5em; gap:12px; align-items:center; }
#settings-dialog .audio-channel input { width:100%; min-width:0; accent-color:#b4d77c; }
#settings-dialog .audio-channel output { text-align:right; font-size:14px; font-variant-numeric:tabular-nums; }
#settings-dialog { max-height:90dvh; overflow:auto; }
#hud .weapon-panel { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:min(620px,calc(100vw - 235px)); gap:5px; bottom:32px; }
#hud .weapon { min-width:0; min-height:76px; padding:10px 8px; border-color:#667a5666; border-radius:3px; background:linear-gradient(150deg,#152016ed,#06100ceb); }
#hud .weapon.selected { background:linear-gradient(150deg,#2b3825ef,#121d10ed); border-color:#c6e394; box-shadow:inset 0 3px #c6e394; }
#hud .weapon b { border:1px solid #84907177; border-radius:3px; width:19px; height:22px; flex-shrink:0; text-align:center; font-size:13px; }
#hud .weapon small { font-size:8px; white-space:normal; }
#hud #heavy-budget { grid-column:1/-1; padding:6px 8px; background:#08110dcc; letter-spacing:.08em; }
#hud #radio-subtitle { bottom:148px; }
#hud #vision { right:2.3vw; top:78px; width:auto; padding:0; display:flex; gap:4px; background:none; border:0; }
#vision button { display:flex; align-items:center; gap:6px; padding:7px 8px; font-size:10px; min-height:35px; background:#07120fe8; border-color:#63735a; }
#vision button[aria-pressed=true] { border-color:#c6e394; color:#e4f8b5; box-shadow:inset 0 -2px #c6e394; }
.vision-sample { display:block; width:19px; height:19px; border-radius:50%; border:1px solid #99aa86; background:radial-gradient(ellipse at 55% 55%,#cbffac 0 13%,#518b30 16% 36%,#07150c 74%); }
.vision-sample.white { background:radial-gradient(ellipse at 55% 55%,#fff 0 13%,#929292 16% 36%,#171717 74%); }
.vision-sample.heat { background:radial-gradient(ellipse at 55% 55%,#fff4b0 0 13%,#ff5321 17% 32%,#5235ae 44%,#09142c 75%); }
#hud #optics { top:124px; }
#hud .altitude-row { grid-template-columns:25px 1fr 25px; }
#hud #altitude-readout { font-size:9px; white-space:nowrap; }
@media(max-width:1000px) { #hud .weapon-panel { width:calc(100vw - 185px); } #hud .weapon { font-size:9px; min-height:67px; gap:5px; padding:7px 5px; } #hud #vision button { font-size:9px; padding:5px; } }
@media(pointer:coarse) and (orientation:landscape) { #hud.touch .weapon-panel { left:144px; width:calc(100vw - 290px); bottom:20px; } #hud.touch .weapon { min-height:64px; } #hud.touch .radar-panel { bottom:115px; right:14px; } }
@media(max-width:650px) and (orientation:portrait) { #hud .weapon-panel,#hud.touch .weapon-panel { left:12px; right:12px; bottom:145px; width:auto; gap:3px; } #hud .weapon { flex-direction:column; gap:4px; min-height:92px; font-size:8px; } #hud .weapon small { font-size:7px; } #hud #radio-subtitle { bottom:270px; } #hud #vision { top:143px; right:12px; } #vision .vision-sample { width:15px; height:15px; } #hud #vision button { gap:4px; font-size:8px; } #hud #optics { top:192px; } }
#hud #sensor-telemetry { bottom:137px; }
#hud #waypoint { bottom:163px; }
#hud #radio-subtitle { bottom:201px; }
#hud #flight-toast { bottom:274px; }
@media(max-height:550px) and (min-width:651px) { #hud #sensor-telemetry { bottom:130px; font-size:8px; } #hud #waypoint { bottom:151px; } #hud #radio-subtitle { bottom:188px; max-width:42vw; } #hud #flight-toast { bottom:240px; } }
@media(max-width:650px) and (orientation:portrait) { #hud #sensor-telemetry { bottom:269px; font-size:7px; max-width:96vw; white-space:normal; text-align:center; } #hud #waypoint { bottom:295px; } #hud #radio-subtitle { bottom:333px; } #hud #flight-toast { bottom:414px; } }
#menu .aircraft-preview { flex:0 0 auto; min-height:0; height:clamp(230px,35vh,430px); background-size:cover; background-repeat:no-repeat; background-position:center; }
/* Four compact, equally sized touch targets; never clip a heavy weapon. */
@media (pointer:coarse), (max-width:650px) {
  #hud .weapon-panel, #hud.touch .weapon-panel { grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; }
  #hud .weapon, #hud.touch .weapon { flex-direction:column; align-items:stretch; min-height:54px; padding:5px 4px; gap:2px; font-size:8px; line-height:1.2; letter-spacing:0; overflow:hidden; }
  #hud .weapon > span { min-width:0; white-space:normal; overflow-wrap:anywhere; }
  #hud .weapon b { display:none; }
  #hud .weapon small { font-size:7px; margin-top:2px; min-height:8px; }
  #hud .payload-rounds, #hud #rounds { margin-top:3px!important; gap:3px; height:7px; }
  #hud .payload-rounds i, #hud #rounds i { height:7px; }
  #hud #heavy-budget { font-size:7px; padding:3px 4px; text-align:center; }
}
@media (pointer:coarse) and (orientation:landscape) {
  #hud.touch .weapon-panel { left:max(124px,env(safe-area-inset-left)); width:calc(100vw - 248px); bottom:max(12px,env(safe-area-inset-bottom)); }
}
#menu #aircraft-stage { inset:0; }
#menu #aircraft-list { position:static; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; padding:10px 22px; background:#08110e; flex-shrink:0; }
#menu .aircraft-option { height:46px; min-height:46px; }
#menu .aircraft-caption { position:static; display:grid; grid-template-columns:1fr 1.05fr; gap:4px 28px; max-width:none; min-width:0; width:auto; padding:16px 24px 20px; background:#0b150ff2; text-shadow:none; pointer-events:auto; flex-shrink:0; }
#menu .aircraft-caption > span { display:none; }
#menu .aircraft-caption h2 { grid-column:1; grid-row:1; font-size:24px; margin:0; }
#menu #aircraft-role { grid-column:1; grid-row:2; }
#menu #aircraft-use { grid-column:1; grid-row:3; margin-top:5px; }
#menu #aircraft-stats { grid-column:2; grid-row:1 / span 3; align-self:center; margin:0; padding:0; border:0; }
@media(max-width:650px) { #menu .aircraft-preview { height:240px; } #menu .aircraft-caption { padding:14px 18px; grid-template-columns:1fr; gap:7px; } #menu #aircraft-stats { grid-column:1; grid-row:4; padding-top:8px; } #menu #aircraft-list { padding:9px 12px; gap:5px; } #menu .aircraft-option { font-size:10px; } }
