/* Touch adds controls only. HUD panels use the common stage. */
.gamepad{--pad-left:146px;--pad-right:248px;--pad-unit:46px;--mobile-combat-height:150px;--mobile-edge:14px}
.gamepad #touch-controls .movement{position:absolute;left:calc(16px + env(safe-area-inset-left));bottom:calc(20px + env(safe-area-inset-bottom));width:var(--pad-left);height:var(--pad-left);display:block;border-radius:50%;background:radial-gradient(circle,#25384130 20%,#101e2a33 65%,#a8c4cf1c 66%,#1526311c 69%,transparent 70%)}
.gamepad #touch-controls .vertical-movement{display:contents}
.gamepad #touch-controls button,.gamepad #mobile-actions .action-slot{position:absolute;display:grid;place-items:center;width:var(--pad-unit);height:var(--pad-unit);min-width:0;min-height:0;padding:0;border:1px solid #d5e7ed65;border-radius:50%;background:linear-gradient(145deg,#98b7c333,#0c172d70);box-shadow:inset 0 1px 2px #ffffff24,0 3px 10px #0003;backdrop-filter:blur(2px);color:#edf6f7;touch-action:none;overflow:hidden;pointer-events:auto;filter:none;user-select:none;-webkit-touch-callout:none}
.gamepad #touch-controls button.held,.gamepad #mobile-actions button.held{background-color:#bdd6d955;border-color:#f0e4ae;box-shadow:inset 0 0 12px #ffffff26,0 0 12px #b8d9e330}
.gamepad #touch-controls .movement button{font:20px/1 system-ui;text-shadow:0 1px 2px #0008}
.gamepad .movement [data-input=up]{top:0;left:calc(50% - var(--pad-unit)/2)}
.gamepad .movement [data-input=down]{bottom:0;left:calc(50% - var(--pad-unit)/2)}
.gamepad .movement [data-input=left]{left:0;top:calc(50% - var(--pad-unit)/2)}
.gamepad .movement [data-input=right]{right:0;top:calc(50% - var(--pad-unit)/2)}
.gamepad #mobile-actions{position:absolute;right:calc(16px + env(safe-area-inset-right));bottom:calc(20px + env(safe-area-inset-bottom));width:var(--pad-right);height:208px;pointer-events:none}
.gamepad #mobile-actions .pad-attack{width:78px;height:78px;right:57px;bottom:25px;border-color:#efce9299;background:linear-gradient(145deg,#ceb87b38,#1321309c);box-shadow:inset 0 0 0 4px #e2cea316,0 4px 14px #0004}
.gamepad #mobile-actions .pad-attack img{inset:20%;width:60%;height:60%}
.gamepad #mobile-actions .pad-jump{right:0;bottom:0;width:58px;height:58px}
.gamepad #mobile-actions .pad-jump .action-icon{inset:18%;width:64%;height:64%}
.gamepad #mobile-actions [data-mobile-skill="0"]{right:0;bottom:72px}
.gamepad #mobile-actions [data-mobile-skill="1"]{right:40px;bottom:136px}
.gamepad #mobile-actions [data-mobile-skill="2"]{right:104px;bottom:136px}
.gamepad #mobile-actions [data-mobile-skill="3"]{right:148px;bottom:72px}
.gamepad #mobile-actions .pad-potion.hp{left:0;bottom:138px;border-color:#dc9b937a}
.gamepad #mobile-actions .pad-potion.mp{left:0;bottom:74px;border-color:#96c8ee80}
.gamepad #mobile-actions .pad-pickup{left:0;bottom:12px;width:46px;height:46px}
.gamepad #mobile-actions kbd{display:none}
.gamepad #mobile-actions .pad-art{position:absolute;inset:10%;pointer-events:none}
.gamepad #mobile-actions .pad-art img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.gamepad #mobile-actions .pad-art .content-skill-art{display:block;width:100%;height:100%}
.gamepad #mobile-actions .pad-empty{position:absolute;inset:0;display:grid;place-items:center;font:22px system-ui;color:#c6d9dc80}
.gamepad #mobile-actions .pad-label{position:absolute;bottom:3px;left:0;right:0;font:600 12px/1 system-ui;text-align:center;color:#f5f8ef;text-shadow:0 1px 3px #000;pointer-events:none}
.gamepad #mobile-actions .pad-potion .pad-art{inset:12% 20% 22%}
.gamepad #mobile-actions .pad-potion.mp .action-icon{filter:hue-rotate(170deg)}
.gamepad #mobile-actions .quick-count{right:3px;top:2px;font-size:12px;padding:0 3px}
.gamepad #mobile-actions .cooldown{inset:0;border-radius:50%}
.gamepad #mobile-actions .unavailable .pad-art{opacity:.35;filter:grayscale(.75)}
.gamepad #mobile-actions .pickup-icon{font-size:24px;padding-bottom:10px}
.gamepad #mobile-actions .pickup-caption{font-size:12px;bottom:5px}

.gamepad #touch-controls .movement{position:absolute;left:calc(16px + env(safe-area-inset-left));bottom:calc(20px + env(safe-area-inset-bottom));width:var(--pad-left);height:var(--pad-left);display:block;border-radius:50%;background:radial-gradient(circle,#25384130 20%,#101e2a33 65%,#a8c4cf1c 66%,#1526311c 69%,transparent 70%)}
.gamepad #touch-controls .movement button{font:20px/1 system-ui;text-shadow:0 1px 2px #0008}
.gamepad #touch-controls .movement{pointer-events:auto;touch-action:none}
.gamepad #touch-controls .movement::after{content:'';position:absolute;left:50%;top:50%;width:38%;height:38%;border:1px solid #d4e5ed70;border-radius:50%;background:#7693a342;box-shadow:inset 0 1px 8px #ffffff18;transform:translate(calc(-50% + var(--stick-x,0px)),calc(-50% + var(--stick-y,0px)));pointer-events:none;opacity:.45}
.gamepad #touch-controls .movement.dragging::after{opacity:1}
.gamepad #touch-controls .movement{left:calc(var(--mobile-edge) + env(safe-area-inset-left));bottom:calc(var(--mobile-edge) + env(safe-area-inset-bottom));width:var(--pad-left);height:var(--pad-left);background:radial-gradient(circle,#14201966 0 58%,#d2c69f26 59% 60%,transparent 61%)}
.gamepad #touch-controls .movement::after{width:34%;height:34%;border-color:#d2c69f65;background:#293b31ad;box-shadow:inset 0 1px 3px #ddd3a821;opacity:.7}
.gamepad #touch-controls button,.gamepad #mobile-actions .action-slot{width:var(--pad-unit);height:var(--pad-unit);border:1px solid #cbbd906b;border-radius:50%;background:#15221cba!important;box-shadow:inset 0 1px 2px #dfd5b122,0 2px 6px #0005;backdrop-filter:none}
.gamepad #touch-controls button.held{background:#566148e8!important;border-color:#efdc9f;filter:none;transform:scale(.96)}
.gamepad #mobile-actions{right:calc(var(--mobile-edge) + env(safe-area-inset-right));bottom:calc(var(--mobile-edge) + env(safe-area-inset-bottom));width:var(--pad-right);height:var(--mobile-combat-height)}
.gamepad #mobile-actions .pad-attack{width:76px;height:76px;right:66px;bottom:0;border:2px solid #b9a46a;background:#3a3925d9!important;box-shadow:inset 0 0 0 4px #e1c98415,0 3px 10px #0005}
.gamepad #mobile-actions .pad-jump{width:58px;height:58px;right:0;bottom:0;border-color:#d0c8a5}
.gamepad #mobile-actions [data-mobile-skill]{bottom:104px}
.gamepad #mobile-actions [data-mobile-skill="0"]{right:0}
.gamepad #mobile-actions [data-mobile-skill="1"]{right:54px}
.gamepad #mobile-actions [data-mobile-skill="2"]{right:108px}
.gamepad #mobile-actions [data-mobile-skill="3"]{right:162px}
.gamepad #mobile-actions .pad-potion.hp{left:0;right:auto;bottom:52px;width:44px;height:44px;border-color:#a76957}
.gamepad #mobile-actions .pad-potion.mp{left:50px;right:auto;bottom:52px;width:44px;height:44px;border-color:#637e9b}
.gamepad #mobile-actions .pad-pickup{left:0;right:auto;bottom:0;width:44px;height:44px}
.gamepad #mobile-actions .pad-swap{left:50px;right:auto;bottom:0;width:44px;height:44px;font-size:26px}.gamepad #mobile-actions .pad-swap[hidden]{display:none}
.gamepad #mobile-actions .pad-art{inset:8px;overflow:hidden;border-radius:50%}
.gamepad #mobile-actions .pad-art .content-skill-art{border-radius:50%}
.gamepad #mobile-actions .pad-potion .pad-art{inset:5px 10px 12px}
.gamepad #mobile-actions .pad-label{font-size:12px;bottom:3px}
.gamepad #mobile-actions .pad-skill[data-item=""]{border-style:dashed;background:#121b164d!important}
.gamepad #mobile-actions .pad-skill[data-item=""] .pad-label{display:none}
.gamepad #mobile-actions .quick-empty{font:22px/1 system-ui;color:#d9d2b366}
.gamepad #mobile-actions .quick-count{font-size:12px;line-height:12px;top:0;right:0;background:#0a110dc9;border-radius:6px}
