.weapon-fx-canvas {
  position: absolute;
  z-index: 7;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.weapon-fx-ready > .shot-beams { opacity: 0; }
.weapon-muzzle { position: absolute; left: 49%; top: 8%; width: 2px; height: 2px; pointer-events: none; visibility: hidden; }
.enemy-zone .weapon-muzzle { top: auto; bottom: 8%; }
.weapon-sound-button { min-width: 32px; }
/* Installation highlights live inside the actual module bay, above its artwork. */
.online-game .ship-visual .layer.is-installing {
  opacity: 1;
  --install-color: #69e4ff;
}
.online-game .ship-visual .layer.is-installing-armor {
  --install-color: #ffe09a;
}
.ship-visual .defense-install-fx {
  position: absolute;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  clip-path: polygon(31% 3%, 69% 3%, 93% 25%, 93% 75%, 69% 97%, 31% 97%, 7% 75%, 7% 25%);
  color: var(--install-color);
  box-shadow: inset 0 0 9px 3px currentColor;
  animation: defenseInstallFrame 900ms ease-out both;
  animation-delay: var(--install-delay, 0ms);
}
.ship-visual .defense-install-fx::before {
  content: "";
  position: absolute;
  inset: -100% 0;
  background: linear-gradient(transparent 43%, currentColor 49%, #fff 50%, currentColor 51%, transparent 57%);
  animation: defenseInstallScan 700ms ease-out both;
  animation-delay: var(--install-delay, 0ms);
}
.ship-visual .layer.is-installing.is-install-revealed:not(.empty)::before {
  animation: defenseInstallArt 620ms ease-out both;
  animation-delay: var(--install-art-delay, 0ms);
}
@keyframes defenseInstallFrame {
  0% { opacity: 0; }
  18%, 40% { opacity: 0.95; }
  100% { opacity: 0; }
}
@keyframes defenseInstallScan {
  0% { transform: translateY(-35%); opacity: 0; }
  15% { opacity: 0.8; }
  80% { opacity: 0.5; }
  100% { transform: translateY(35%); opacity: 0; }
}
@keyframes defenseInstallArt {
  0% { opacity: 0; filter: brightness(2.4); }
  35% { opacity: 1; filter: brightness(1.6); }
  100% { opacity: 1; filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ship-visual .defense-install-fx {
    animation: none;
    opacity: 0.55;
  }
  .ship-visual .defense-install-fx::before { display: none; }
  .ship-visual .layer.is-installing.is-install-revealed:not(.empty)::before {
    animation: none;
  }
}
