/* Shared game options: usable in narrow touch layouts without covering play. */
.wpu-gameplay-controls { margin: 14px 0 0; padding: 10px 14px; border: 1px solid currentColor; border-color: #8a9dad55; border-radius: 14px; color: inherit; font: 13px/1.45 system-ui,sans-serif; text-align: left; }
.wpu-gameplay-controls legend { padding: 0 6px; font-weight: 650; }
.wpu-gameplay-controls label { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-height: 40px; }
.wpu-gameplay-controls select { max-width: 190px; min-height: 38px; border-radius: 8px; border: 1px solid #8a9dad88; padding: 4px 8px; background: #122437; color: #fff; font: inherit; }
.wpu-gameplay-controls input[type=checkbox] { flex-shrink: 0; width: 20px; height: 20px; }
.wpu-gameplay-controls label:last-child { justify-content: flex-start; }
#pauseMenu { max-height: calc(100dvh - 32px); overflow-y: auto; }
#p3dPause .pause-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
#p3dPause .wpu-gameplay-controls { margin: 0 20px 16px; }
#battleOverlay .battle-party { display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#battleOverlay .battle-party[hidden] { display: none; }
#battleOverlay .battle-party button { min-height: 48px; padding: 8px 12px; text-align: left; border: 1px solid #9fc0d877; border-radius: 12px; background: #17364b; color: #fff; font: 600 13px/1.3 system-ui,sans-serif; }
#battleOverlay .battle-party button small { display: block; font-weight: 400; opacity: .85; }
#battleOverlay .battle-party button:disabled { opacity: .42; cursor: not-allowed; }
#battleOverlay .battle-party button:focus-visible, .wpu-gameplay-controls :focus-visible { outline: 3px solid #70d5ff; outline-offset: 2px; }
html[data-reduced-motion=true] #encounterFlash { display: none !important; }
html[data-reduced-motion=true] #battleOverlay .move-vfx { visibility: hidden !important; }
html[data-reduced-motion=true] #battleOverlay .attack,
html[data-reduced-motion=true] #battleOverlay .hit { animation: none !important; }
html[data-reduced-motion=true] #battleOverlay .battle-stage,
html[data-reduced-motion=true] .pause-card { animation: none !important; transition-duration: .08s !important; }
@keyframes wpu-partner-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
#battleOverlay .ally-img.switch-in { animation: wpu-partner-in .36s ease-out; }
html[data-reduced-motion=true] #battleOverlay .ally-img.switch-in { animation-duration: .06s; }
#pauseMenu .pause-menu-container { max-height: calc(100dvh - 32px); overflow-y: auto; }

/* Touch actions belong to the world, never on top of a pause-menu control. */
html.wpu-gameplay-paused #mobile-buttons,
html.wpu-gameplay-paused #mobile-move-joystick,
html.wpu-gameplay-paused #mobile-touch-indicator {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
