/* Flight HUD: targets above, speech in the middle, aircraft above bottom progress. */
#target { top:calc(22% + var(--approach,0)*15%); }
#aircraftStatus,#voiceReadout { visibility:hidden; }
.in-flight #aircraftStatus,.in-flight #voiceReadout { visibility:visible; }
#encounterUI,.formation-mode #encounterUI { top:54px;left:18px;right:78px; }
#voiceReadout { position:absolute;z-index:3;left:6%;right:6%;top:61%;transform:translateY(-50%);text-align:center;pointer-events:none; }
#voiceReadout #mic { font-size:clamp(13px,1.9vw,17px);line-height:1.5; }
#voiceReadout #heard { font-size:clamp(17px,2.3vw,24px);line-height:1.4;margin-top:9px;min-height:1.4em;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden; }
#voiceReadout #hint { position:static;font-size:13px;line-height:1.5;margin-top:5px;color:#9fb7d1; }
#voiceReadout #hint:empty { display:none; }
#aircraftStatus { position:absolute;z-index:3;right:18px;bottom:calc(max(160px,18%) - 74px);width:min(38%,230px);pointer-events:none;text-align:right; }
#aircraftStatus .flight-meta { position:static;inset:auto;display:flex;align-items:flex-end;gap:6px; }
#aircraftStatus #shipLevel { font-size:clamp(12px,1.8vw,17px);line-height:1.4;letter-spacing:0; }
#aircraftStatus #combo { font-size:12px;height:auto;min-height:17px; }
#aircraftStatus .charge-track { width:96px;max-width:100%; }
#aircraftStatus #battlePanel { position:static;inset:auto;display:block;width:100%;margin-top:7px; }
#aircraftStatus #weaponReadout { font-size:11px;line-height:1.5;margin:0;color:#a6bdd5; }
#aircraftStatus .chain-weapons { display:none; }
.flight-progress { position:absolute;z-index:3;bottom:max(14px,env(safe-area-inset-bottom));left:18px;right:18px;pointer-events:none;opacity:0; }
.in-flight .flight-progress { opacity:1; }
.flight-progress .health-stack { width:100%;font-size:12px; }
.flight-progress .health-stack b { font-size:12px;margin-bottom:6px; }
.flight-progress .health-track { height:6px; }
.flight-progress #dots { display:flex;width:100%;gap:6px;margin-top:12px; }
.flight-progress #dots i { flex:1;min-width:0;width:auto;height:4px; }
#exit { z-index:4;top:58px;right:14px;bottom:auto;font-size:12px; }
#supplyDrops { display:none; }
.word-enemy { --card-width:min(var(--reading-width,180px),68vw);left:clamp(calc(var(--card-width)/2 + 18px),var(--enemy-x,50%),calc(100% - var(--card-width)/2 - 18px));top:calc(var(--enemy-y,22%) + var(--approach,0)*2.5%);width:var(--card-width);max-width:none;min-height:88px;padding:9px 13px 10px;border-radius:19px 7px 19px 7px; }
.word-enemy b { font-size:clamp(20px,4.7vw,30px);line-height:1.15; }
.word-enemy span { font-size:12px;margin-top:4px; }
.word-enemy small { font-size:10px;line-height:1.25; }
.word-enemy .enemy-hp { font-size:9px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:5px; }
.word-enemy:before,.word-enemy:after { width:9px;height:28px;top:22px; }
.word-enemy:before { left:-9px; }.word-enemy:after { right:-9px; }
/* Home. Account IDs and learning state are unchanged. */
#overlay > .card { width:min(100%,380px);max-height:calc(100dvh - 90px);overflow:auto; }
#profileSummary { font-size:16px;line-height:1.65;color:#c3d5ea;margin:14px 0 18px; }
#hangarButton,#recordsButton { font-size:18px;font-weight:600;padding:10px 12px; }
.home-foot { gap:14px;margin-top:10px; }
#localNote,#loadoutSummary { display:none!important; }
#siteFiling { position:absolute;bottom:max(10px,env(safe-area-inset-bottom));left:12px;right:12px;text-align:center;margin:0;line-height:1.4; }
@media (max-height:700px) and (orientation:portrait) {
 .word-enemy { top:calc(var(--compact-y,20%) + var(--approach,0)*2%);min-height:72px;padding:6px 11px 7px; }
 .word-enemy b { font-size:21px; }.word-enemy span { font-size:11px;margin-top:2px; }.word-enemy small { font-size:9px; }.word-enemy .enemy-hp { font-size:8px;margin-bottom:3px; }
 #aircraftStatus { bottom:65px; }
 #voiceReadout { top:61%; }
 #voiceReadout #hint { font-size:12px; }
 #overlay > .card { max-height:calc(100dvh - 70px); }
}
@media (orientation:landscape) and (max-height:599px) {
 #target { left:30%;top:calc(30% + var(--approach,0)*9%);width:47%; }
 #voiceReadout { left:48%;right:4%;top:38%; }
 #voiceReadout #hint { position:static; }
 #aircraftStatus { right:18px;bottom:71px;width:28%; }
 .word-enemy { --card-width:min(var(--reading-width,180px),34vw);left:clamp(calc(var(--card-width)/2 + 18px),calc(var(--enemy-x,50%)*.6),calc(62% - var(--card-width)/2 - 18px));top:calc(21% + var(--lane)*23% + var(--approach,0)*2%);min-height:70px;padding:5px 12px; }
 .word-enemy b { font-size:21px; }.word-enemy span { font-size:10px;margin-top:1px; }.word-enemy small { font-size:9px;margin-top:1px; }.word-enemy .enemy-hp { margin-bottom:2px; }
 #encounterUI,.formation-mode #encounterUI { left:34%;right:24%;top:25px; }
}
@media (max-height:600px) and (orientation:portrait) {
 .word-enemy { top:calc(var(--short-y,20%) + var(--approach,0)*1.5%);min-height:58px;padding:5px 10px; }
 .word-enemy b { font-size:20px; }.word-enemy span { font-size:10px;margin-top:2px; }.word-enemy small { display:none; }.word-enemy .enemy-hp { font-size:8px;margin-bottom:2px; }
}
#profileSummary { display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap; }
#accountInline { font:inherit;color:#d9ffb0;background:none;border:0;padding:4px 0;cursor:pointer; }
#accountInline:focus-visible { outline:2px solid #bfff83;outline-offset:4px;border-radius:4px; }
#target { left:calc(50% + var(--strafe-x,0px));width:min(82%,640px); }
.word-enemy { left:clamp(calc(var(--card-width)/2 + 18px),calc(var(--enemy-x,50%) + var(--strafe-x,0px)),calc(100% - var(--card-width)/2 - 18px)); }
@media (orientation:landscape) and (max-height:599px) {
 #target { left:calc(30% + var(--strafe-x,0px));width:47%; }
 .word-enemy { left:clamp(calc(var(--card-width)/2 + 18px),calc(var(--enemy-x,50%)*.6 + var(--strafe-x,0px)),calc(62% - var(--card-width)/2 - 18px)); }
}
.word-enemy {
 --lane-min:calc(var(--card-width)/2 + 18px);
 --lane-max:calc(100% - var(--card-width)/2 - 18px);
 --lane-center:clamp(var(--lane-min),var(--enemy-x,50%),var(--lane-max));
 left:clamp(var(--lane-min),calc(var(--lane-center) + var(--strafe-x,0px)),var(--lane-max));
}
@media (orientation:landscape) and (max-height:599px) {
 .word-enemy {
  --lane-max:calc(62% - var(--card-width)/2 - 18px);
  --lane-center:clamp(var(--lane-min),calc(var(--enemy-x,50%)*.6),var(--lane-max));
 }
}

/* Tablets keep one centered flight lane in both orientations. */
@media (min-width:700px) and (min-height:600px) {
 body { display:flex;justify-content:center; }
 #game { width:min(100%,600px);height:100dvh;box-shadow:0 0 80px #0008; }
 #target { top:calc(26% + var(--approach,0)*12%);padding:32px 10% 28px; }
 #word { font-size:clamp(32px,5vw,56px); }
 #voiceReadout { top:61%;left:7%;right:7%; }
 #voiceReadout #heard { font-size:24px; }
 #aircraftStatus { bottom:calc(max(160px,18%) - 74px);width:36%; }
 .word-enemy { --card-width:min(var(--reading-width,180px),260px); }
 .word-enemy { padding:8px 13px; }
 .word-enemy b { font-size:28px; }
 .word-enemy span { font-size:11px;margin-top:3px; }
 .word-enemy .enemy-hp { font-size:8px; }
 #overlay > .card { max-height:calc(100dvh - 90px); }
 .record-card,.hangar-card,.account-card { max-height:calc(100dvh - 64px);overflow-y:auto; }
}
