.mobile-joystick[hidden] { display: none !important; }
.battle-active .touch-controls.mobile-gamepad { position: absolute; z-index: 5; inset: 0; display: block; margin: 0; padding: 0; pointer-events: none; }
.battle-active .mobile-gamepad .touch-player { position: static; margin: 0; padding: 0; border: 0; background: transparent; }
.battle-active .mobile-gamepad .touch-player legend, .battle-active .mobile-gamepad .touch-movement { display: none; }
.battle-active .mobile-gamepad .touch-player-buttons { display: contents; }
.battle-active .mobile-gamepad .touch-actions { position: absolute; right: 10px; bottom: 12px; display: block; width: 180px; height: 180px; pointer-events: none; }
.battle-active .mobile-gamepad .touch-button { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 3px; border: 2px solid #d2b575; border-radius: 50%; color: #fff8df; background: radial-gradient(circle at 35% 25%, #46698cdd, #121f35e8 75%); box-shadow: 0 2px 5px #0009, inset 0 0 0 2px #101726; pointer-events: auto; touch-action: none; text-shadow: 0 1px 2px #000; }
.battle-active .mobile-gamepad .touch-button.is-held, .battle-active .mobile-gamepad .touch-button:active { border-color: #fff4b1; background: radial-gradient(circle at 35% 25%, #ffc659, #8d4d1c); box-shadow: 0 0 14px #ffc450a6; }
.gamepad-icon { display: block; font-size: 19px; line-height: 21px; }
.gamepad-caption { display: block; font: 700 7px/10px Arial, sans-serif; }
.battle-active .mobile-gamepad .touch-action-4 { right: 0; bottom: 0; width: 64px; height: 64px; border-width: 3px; background: radial-gradient(circle at 30% 20%, #f9ca6edd, #ad5224eb 70%); }
.touch-action-4 .gamepad-icon { font-size: 29px; line-height: 31px; }
.touch-action-4 .gamepad-caption { font-size: 9px; }
.battle-active .mobile-gamepad .touch-action-0 { right: 0; bottom: 76px; }
.battle-active .mobile-gamepad .touch-action-2 { right: 72px; bottom: 0; }
.battle-active .mobile-gamepad .touch-action-5 { right: 62px; bottom: 62px; border-color: #67c9ff; background: radial-gradient(circle at 30% 20%, #358ed9e6, #153358eb); }
.battle-active .mobile-gamepad .touch-action-6 { right: 4px; bottom: 128px; border-color: #df8dff; background: radial-gradient(circle at 30% 20%, #a344c8e6, #4c225eeb); }
.battle-active .mobile-gamepad .touch-action-8 { right: 60px; bottom: 124px; }
.battle-active .mobile-gamepad .touch-action-7 { right: 120px; bottom: 118px; }
.battle-active .mobile-gamepad .touch-action-9 { right: 124px; bottom: 56px; border-color: #85e7ac; background: radial-gradient(circle at 30% 20%, #429f70de, #19482feb); }
.battle-active .mobile-gamepad .touch-action-10 { right: 128px; bottom: 0; border-color: #85e7ac; background: radial-gradient(circle at 30% 20%, #429f70de, #19482feb); }
.battle-active .mobile-gamepad .touch-action-11 { right: 60px; bottom: 172px; border-color: #ffe28e; background: radial-gradient(circle at 30% 20%, #ae782e, #482449); }
.battle-active .mobile-joystick { position: absolute; bottom: 24px; left: 14px; display: grid; place-items: center; width: 104px; height: 104px; border: 2px solid #e2d5ab91; border-radius: 50%; background: radial-gradient(circle, #15223170 30%, #141c228c 65%, #11151cc7); box-shadow: inset 0 0 0 5px #0005, 0 2px 8px #0007; touch-action: none; user-select: none; pointer-events: auto; outline-offset: 4px; }
.joystick-ring { position: absolute; inset: 12px; border: 1px solid #c8d4d93d; border-radius: 50%; pointer-events: none; }
.joystick-knob { width: 42px; height: 42px; border: 2px solid #f7e9c3; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #8796a1bb, #24303ee8); box-shadow: 0 2px 8px #0009; pointer-events: none; will-change: transform; }
.joystick-hint { position: absolute; top: calc(100% + 5px); left: -10px; width: calc(100% + 20px); color: #e4ebf5; font-size: 8px; text-align: center; text-shadow: 0 1px 4px #000; white-space: nowrap; pointer-events: none; }
.battle-active .has-mobile-gamepad .healing-inventory { bottom: 146px; left: 10px; width: min(220px, 45%); }
.battle-active .has-mobile-gamepad > .arena-note { bottom: auto; top: 90px; left: 20%; right: auto; width: 60%; text-align: center; font-size: 9px; }
@media (max-width: 400px) {
    .battle-active .mobile-joystick { width: 84px; height: 84px; left: 9px; }
    .joystick-knob { width: 36px; height: 36px; }
    .battle-active .mobile-gamepad .touch-actions { right: 6px; }
    .battle-active .has-mobile-gamepad .healing-inventory { bottom: 128px; left: 7px; width: 43%; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .battle-active .mobile-joystick { width: 88px; height: 88px; bottom: 19px; }
    .battle-active .has-mobile-gamepad .healing-inventory { bottom: 128px; width: min(200px, 35%); }
    .battle-active .has-mobile-gamepad > .arena-note { top: 76px; }
}
