/* Manual combat reversal tool. Kept independent from item rows and SPECIAL. */
#game-screen.rem-battle--phase4 .breach-drive-btn {
  position: absolute;
  z-index: 24;
  left: 11px;
  bottom: calc(112px + env(safe-area-inset-bottom));
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid rgba(94, 159, 190, .7);
  border-radius: 50%;
  color: #9db6c4;
  background:
    linear-gradient(145deg, rgba(31, 61, 84, .96), rgba(5, 13, 26, .98)),
    #071222;
  box-shadow: 0 0 0 4px rgba(2, 8, 18, .68), inset 0 0 0 2px rgba(147, 238, 255, .05);
  font: 900 10px/1 var(--fac-display, monospace);
  letter-spacing: .08em;
  white-space: pre-line;
  pointer-events: auto;
  transition: transform .12s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

#game-screen.rem-battle--phase4 .breach-drive-btn::before {
  content: "RIFT";
  position: absolute;
  top: 11px;
  left: 0;
  right: 0;
  color: rgba(161, 217, 237, .68);
  font-size: 6px;
  letter-spacing: .18em;
}

#game-screen.rem-battle--phase4 .breach-drive-btn:disabled { opacity: 1; }
#game-screen.rem-battle--phase4 .breach-drive-btn.ready {
  border-color: #92f4ff;
  color: #ecffff;
  background: linear-gradient(145deg, #146179, #0b2847 62%, #151d44);
  box-shadow: 0 0 0 4px rgba(2, 8, 18, .68), 0 0 18px rgba(94, 227, 255, .56), inset 0 0 18px rgba(109, 242, 255, .23);
  animation: breach-ready-pulse 1.1s ease-in-out infinite;
}

#game-screen.rem-battle--phase4 .breach-drive-btn.active {
  border-color: #e5fcff;
  color: #ffffff;
  background: linear-gradient(145deg, #277b9a, #303c9b 65%, #10234f);
  box-shadow: 0 0 0 4px rgba(2, 8, 18, .68), 0 0 25px rgba(116, 242, 255, .8), inset 0 0 20px rgba(205, 255, 255, .32);
}

#game-screen.rem-battle--phase4 .breach-drive-btn:active:not(:disabled) { transform: scale(.93); }
#game-screen.rem-battle--phase4.breach-active .rem-battle-vignette { animation: none !important; opacity: .24; }
#game-screen.rem-battle--phase4.breach-active .dust-fill { background: linear-gradient(90deg, #61dbff, #d7fbff) !important; }
#game-screen.rem-battle--phase4 .hud-bottom.hud-dust-charged .dust-gauge { border-color: #8df1ff !important; box-shadow: 0 0 12px rgba(83, 221, 255, .42); }

@keyframes breach-ready-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@media (max-width: 430px) {
  #game-screen.rem-battle--phase4 .breach-drive-btn { width: 64px; height: 64px; bottom: calc(118px + env(safe-area-inset-bottom)); font-size: 9px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  #game-screen.rem-battle--phase4 .breach-drive-btn { left: 10px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 58px; height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  #game-screen.rem-battle--phase4 .breach-drive-btn.ready { animation: none; }
}
