/* SPACE_EMPIRE_SN041_COMBAT_LAYOUT — zones HUD stables + verrouillage explicite */
#fhWeaponLock.locked{border-color:rgba(99,240,181,.62);color:#a8ffd5;box-shadow:0 0 20px rgba(75,225,166,.12),inset 0 0 14px rgba(75,225,166,.05)}
#fhWeaponLock.selected{border-color:rgba(255,198,101,.38);color:#ffd693}

/* Desktop : chaque famille de commandes possède sa propre ligne. */
@media (min-width:901px){
  .fh-modebar{top:calc(66px + var(--safe-t));z-index:18}
  .fh-voice036{top:calc(102px + var(--safe-t));z-index:17}
  .fh-flight{bottom:calc(18px + var(--safe-b));z-index:16}
  .fh-science040{bottom:calc(72px + var(--safe-b));z-index:16;flex-wrap:nowrap;white-space:nowrap}
  .fh-abilities{bottom:calc(112px + var(--safe-b));z-index:15}
  .fh-prompt{bottom:calc(166px + var(--safe-b));z-index:20}
  .fh-keys{bottom:calc(14px + var(--safe-b));max-width:min(650px,34vw);line-height:1.25;row-gap:3px;z-index:13}
  .fh-radar{z-index:14}
}

/* Le bloc scientifique reste compact : pas de largeurs qui poussent sur la barre des capacités. */
.fh-science040 span{white-space:nowrap}
.fh-science040 #fhVelocity{min-width:150px;text-align:center}
.fh-science040 #fhFireState{min-width:96px;text-align:center}
.fh-science040 #fhWeaponLock{min-width:112px;text-align:center}

/* Écrans desktop moins hauts : conserver l'ordre vertical en comprimant les écarts. */
@media (min-width:901px) and (max-height:780px){
  .fh-voice036{top:calc(96px + var(--safe-t))}
  .fh-science040{bottom:calc(62px + var(--safe-b))}
  .fh-abilities{bottom:calc(98px + var(--safe-b))}
  .fh-prompt{bottom:calc(140px + var(--safe-b))}
  .fh-science040 span{padding:5px 8px;font-size:9px}
}

/* Largeurs intermédiaires : réduire la légende plutôt que superposer les commandes. */
@media (min-width:901px) and (max-width:1280px){
  .fh-keys{max-width:26vw;font-size:9px;gap:3px 8px}
  .fh-science040{gap:4px}
  .fh-science040 span{padding:6px 8px;font-size:9px}
}

/* Mobile/tactile : télémétrie au-dessus des contrôles, sans masquer le bouton de tir. */
@media (max-width:900px){
  .fh-science040{left:50%;right:auto;bottom:calc(244px + var(--safe-b));max-width:78vw;transform:translateX(-50%);justify-content:center;z-index:13}
  .fh-science040 #fhVelocity{min-width:0}
  .fh-science040 #fhWeaponLock{min-width:0}
  .fh-voice036{z-index:15}
}
