.dungeon-touch,.dungeon-rotate{display:none}#dungeon-fullscreen{min-height:44px}
#dungeon-shell:fullscreen{max-width:none;width:100%;height:100%;padding:0;background:#090c10;overflow:hidden}
#dungeon-shell.mobile-game{--touch-blue:#65c8ff;--touch-red:#ff7c79;position:fixed!important;inset:0!important;z-index:1000;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none;margin:0!important;padding:0!important;background:#090c10;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none}
body:has(.mobile-game:not([hidden])){overflow:hidden;overscroll-behavior:none}
.mobile-game .dungeon-heading{position:absolute;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);z-index:8;margin:0;padding:7px;display:block;width:auto}.mobile-game .dungeon-heading>div:first-child{display:none}.mobile-game .dungeon-toolbar{width:auto;gap:5px}.mobile-game .dungeon-toolbar button{min-width:42px;min-height:40px;padding:6px 9px;font-size:11px;border-radius:12px;background:#101923bb;border:1px solid #ffffff33}.mobile-game #dungeon-fullscreen{font-size:22px;padding:2px}
.mobile-game .dungeon-layout,.mobile-game .dungeon-play-column{display:block!important;position:relative;width:100%!important;height:100%!important;min-height:0;margin:0;padding:0}.mobile-game .dungeon-arena{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;border:0;border-radius:0;box-shadow:none}.mobile-game .dungeon-arena canvas{inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important}.mobile-game .dungeon-journal,.mobile-game .dungeon-instructions,.mobile-game>.scoreboard,.mobile-game .dpad,.mobile-game #dungeon-attack{display:none!important}
.mobile-game .dungeon-hud{top:calc(env(safe-area-inset-top,0px) + 9px);left:calc(env(safe-area-inset-left,0px) + 12px);right:auto;gap:5px;max-width:48%;flex-direction:column}.mobile-game .health-card{width:145px;padding:6px 9px;background:#101923b3;border-color:#ffffff22;backdrop-filter:none}.mobile-game .health-card>div:first-child,.mobile-game .health-card b{font-size:11px}.mobile-game .health-track{margin-top:5px;height:5px}.mobile-game .wave-card{max-width:210px;text-align:left;padding:0 3px;background:none;border:0;backdrop-filter:none;text-shadow:0 1px 4px #000}.mobile-game .wave-card small{font-size:10px}.mobile-game .wave-card>span{font-size:11px}
.mobile-game .dungeon-touch{display:block;position:absolute;inset:0;z-index:3;pointer-events:none}.mobile-game .stick-zone{position:absolute;top:0;bottom:0;width:50%;height:100%;pointer-events:auto;touch-action:none;overflow:hidden}.mobile-game .move-zone{left:0}.mobile-game .aim-zone{right:0}.stick-ring{display:none;position:absolute;width:100px;height:100px;margin:-50px;border:2px solid var(--touch-blue);background:#2aa9ff20;border-radius:50%;box-shadow:0 0 0 5px #65c8ff12;pointer-events:none}.aim-zone .stick-ring{border-color:var(--touch-red);background:#ff55551c;box-shadow:0 0 0 5px #ff7c7912}.stick-ring i{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px;border-radius:50%;background:#65c8ff99;border:2px solid #c5edffcc}.aim-zone .stick-ring i{background:#ff666699;border-color:#ffd4d4cc}.engaged .stick-ring{display:block}
.mobile-game .combat-controls{position:absolute;bottom:calc(env(safe-area-inset-bottom,0px) + 24px);right:calc(env(safe-area-inset-right,0px) + 24px);margin:0;z-index:4;pointer-events:none}.mobile-game .combat-actions{display:flex;gap:14px;flex-wrap:nowrap;align-items:flex-end}.mobile-game .combat-actions button{pointer-events:auto;display:flex;flex-direction:column;gap:1px;width:58px;height:58px;min-height:58px;border-radius:50%;padding:4px;font-size:9px;line-height:1.1;font-weight:700;box-shadow:0 3px 0 #0006,0 0 0 3px #0002;touch-action:none}.mobile-game #dungeon-burst{background:#d49b26d9;border:2px solid #ffe48c;color:#fff9df}.mobile-game #dungeon-dodge{background:#278dc4d9;border:2px solid #98e0ff;color:#eafaff;transform:translateY(-12px)}.mobile-game .combat-actions span{font-size:11px;font-weight:700}.mobile-game button:disabled{opacity:.45;filter:saturate(.3)}
.mobile-game .dungeon-banner{top:18%;font-size:12px;max-width:60%;padding:6px 12px;z-index:4}.mobile-game .dungeon-overlay{z-index:6;padding:52px 20px 12px}.mobile-game .dungeon-overlay>div{max-height:100%;overflow:auto}.mobile-game:has(.dungeon-overlay:not([hidden])) .dungeon-touch,.mobile-game:has(.dungeon-overlay:not([hidden])) .combat-controls{visibility:hidden}.touch-guide{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:300px;padding:12px;background:#111c24db;border:1px solid #ffffff33;border-radius:12px;color:#fff;text-align:center;font-size:13px;line-height:1.6;pointer-events:none}.touch-guide[hidden]{display:none}
.mobile-game .dungeon-rotate:not([hidden]){position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;text-align:center;background:#0c1420f5;color:#fff;padding:30px}.dungeon-rotate>div>span{font-size:64px;color:#65c8ff}.dungeon-rotate h2{font-size:25px;margin:12px 0}.dungeon-rotate p{font-size:15px;line-height:1.6;color:#c4d5e3}.dungeon-rotate button{min-height:48px}
@media(max-height:360px){.mobile-game .combat-controls{bottom:12px;right:16px}.mobile-game .combat-actions button{width:50px;height:50px;min-height:50px}.mobile-game .health-card{width:130px}.mobile-game .dungeon-toolbar button{min-height:36px}}

/* Ability buttons stay above the two touch surfaces and acknowledge contact. */
.mobile-game .combat-controls{z-index:7}.mobile-game .combat-actions button{width:66px;height:66px;min-height:66px;font-size:11px}.mobile-game .combat-actions span{font-size:15px}.mobile-game .combat-actions button:active{filter:brightness(1.4);box-shadow:0 0 0 4px #ffffff66}.mobile-game:has(.dungeon-overlay:not([hidden])) .combat-controls{visibility:hidden}.pause-potion{padding:12px;margin:12px auto;border:1px solid #de9b7d77;border-radius:12px;background:#251e27}.pause-potion h3{margin:0 0 6px}.pause-potion button{min-height:48px;padding:12px 20px!important}.pause-potion #potion-help{font-size:12px}.mobile-game .dungeon-overlay .actions button,.mobile-game #resume-run{min-height:44px}

.mobile-game #dungeon-burst{position:relative;overflow:visible}.mobile-game #dungeon-burst #burst-status{font-size:9px}.burst-knob{display:none;pointer-events:none}.burst-aiming .burst-knob{display:block;position:absolute;inset:8px;border-radius:50%;border:2px solid #fff4c0;background:#ffe18b44;box-shadow:0 0 0 8px #ffcc3322}.mobile-game #dungeon-burst.burst-aiming{outline:3px solid #ffe18b;outline-offset:5px;background:#b57b1b99}

/* Quick healing stays in the same thumb cluster as the other abilities. */
.mobile-game #dungeon-heal{display:flex!important;order:-1;width:58px;height:58px;min-height:58px;background:#b83d68e6;border:2px solid #ffc2d8;color:#fff1f6;transform:translateY(-12px)}.mobile-game #dungeon-heal #potion-status{font-size:18px;line-height:1;font-weight:800}.mobile-game #dungeon-heal:disabled{opacity:.5}.mobile-game #dungeon-heal:not(:disabled){box-shadow:0 3px 0 #0006,0 0 0 3px #ff8bb133}
