#controlChoice{color:#e8f1ff;background:#121c2c;border:2px solid #5ac8ff;border-radius:18px;font:inherit;width:min(540px,92vw);padding:28px;box-shadow:0 24px 90px #0009}#controlChoice::backdrop{background:#030815db}#controlChoice h2{font-size:26px;margin:0 0 12px}#controlChoice p{line-height:1.5;color:#b5c7df}.control-options{display:grid;grid-template-columns:1fr 1fr;gap:14px}.control-options button{font:inherit;color:#e9f6ff;background:#1c3048;border:2px solid #427aa0;border-radius:12px;padding:24px 12px;text-align:left}.control-options b{display:block;font-size:23px;margin-bottom:12px}.control-options span{font-size:13px;line-height:1.5}.control-options button:focus-visible{outline:3px solid #ffcf69;outline-offset:3px}
#touchLayer[hidden],#touchPads[hidden],#touchPause[hidden],#touchExit[hidden],#touchExtra[hidden],#touchSkip[hidden]{display:none!important}#touchLayer{position:fixed;inset:0;z-index:5;pointer-events:none;color:#eef6ff;font:12px 'Courier New',monospace}#touchLayer button{pointer-events:auto;touch-action:none;font:inherit;color:#f0f8ff;border:2px solid #6184a6;background:#122137ed;user-select:none;-webkit-user-select:none}#touchLayer button:focus-visible{outline:3px solid #ffcf69}#touchTop{position:absolute;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#09121be8;border:1px solid #3c5a70;border-radius:12px;padding:8px}#touchHealth{min-width:100px;flex:1}#touchHealth>div{height:6px;background:#253649;margin-top:5px;border-radius:4px;overflow:hidden}#touchHPFill{display:block;height:100%;background:#7fe07f}#touchAmmo{padding:9px;border-radius:8px;max-width:210px}#touchMenu{padding:10px;border-radius:8px}#touchMatch{flex:1;min-width:100px;color:#aee5ff;font-size:11px}#touchStatus,#touchBuffs{width:100%;font-size:10px;color:#ffdc8e}#touchStatus:empty,#touchBuffs:empty{display:none}.touch-stick{position:absolute;width:126px;height:126px;bottom:max(24px,env(safe-area-inset-bottom));border:2px solid #8ad4ff8f;border-radius:50%;background:radial-gradient(circle,#36537580,#0c19298f);touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none}.touch-stick i{position:absolute;left:50%;top:50%;width:48px;height:48px;border-radius:50%;border:2px solid #9cdeff;background:#5084a7ab;transform:translate(-50%,-50%);pointer-events:none}.touch-stick span{position:absolute;bottom:10px;width:100%;text-align:center;font-size:10px;color:#b7d5ed;pointer-events:none}#touchMove{left:24px}#touchAim{right:24px}.touch-skill{position:absolute;bottom:170px;right:32px;width:64px;height:64px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.touch-skill b{font-size:10px;max-width:56px;overflow:hidden}.touch-skill small{font-size:9px;color:#b7e6ff}#touchQ{right:162px;bottom:90px}#touchE{right:142px;bottom:163px}#touchF{right:66px;bottom:183px}#touchLayer button:disabled{border-color:#475969;color:#8298b3;background:#111a28ed}#touchFire{position:absolute;right:166px;bottom:20px;width:76px;height:64px;border-radius:22px;border-color:#ffcb69;background:#513a1aed;font-weight:bold}#touchMelee{position:absolute;left:172px;bottom:30px;width:80px;min-height:52px;border-radius:16px;font-size:11px}#touchPause{position:absolute;inset:30% 15% auto;display:flex;justify-content:center;gap:10px;background:#09121bf0;padding:20px;border-radius:14px}#touchPause button,#touchExit,#touchExtra,#touchSkip{padding:12px;border-radius:10px}#touchExit{position:absolute;left:50%;top:60%;transform:translateX(-50%)}#touchExtra{position:absolute;left:172px;bottom:94px}#touchSkip{position:absolute;left:12px;top:115px}.mobile-play #wrap{touch-action:none}.mobile-play .panel{max-height:96dvh}.mobile-play .tab{padding:10px;letter-spacing:0}.mobile-play #touchLayer{overscroll-behavior:none}
@media(max-width:600px){.touch-stick{width:108px;height:108px;bottom:20px}#touchMove{left:12px}#touchAim{right:12px}#touchMelee{left:14px;bottom:143px;width:74px}#touchQ{right:133px;bottom:66px}#touchE{right:119px;bottom:139px}#touchF{right:43px;bottom:164px}.touch-skill{width:58px;height:58px}#touchFire{right:129px;bottom:0;width:72px;height:56px}#touchExtra{left:93px;bottom:143px}#touchTop{font-size:10px}#touchMatch{font-size:9px}.mobile-play .panel{width:98vw;padding:10px}.control-options button{padding:18px 10px}}

#touchScorePanel{position:relative;pointer-events:auto}#touchScorePanel summary{padding:10px;border:1px solid #6184a6;border-radius:8px;cursor:pointer;touch-action:manipulation}#touchScores{position:absolute;right:0;top:100%;background:#09121bf5;border:1px solid #6184a6;padding:12px;white-space:pre;max-height:40vh;overflow:auto;min-width:210px;font-size:11px}.touch-skill b{white-space:normal;overflow-wrap:anywhere;text-align:center}
/* Keep controls clear of phone home indicators and landscape notches. */
#touchMove{left:max(24px,env(safe-area-inset-left))}#touchAim{right:max(24px,env(safe-area-inset-right))}
@media(max-width:600px){#touchMove{left:max(12px,env(safe-area-inset-left));bottom:calc(20px + env(safe-area-inset-bottom))}#touchAim{right:max(12px,env(safe-area-inset-right));bottom:calc(20px + env(safe-area-inset-bottom))}#touchFire{bottom:calc(8px + env(safe-area-inset-bottom))}#touchQ{bottom:calc(74px + env(safe-area-inset-bottom))}#touchE{bottom:calc(147px + env(safe-area-inset-bottom))}#touchF{bottom:calc(172px + env(safe-area-inset-bottom))}#touchMelee{bottom:calc(151px + env(safe-area-inset-bottom))}}

/* Larger thumb targets around the aim stick, with each skill's own palette. */
#touchLayer .touch-skill{padding:2px;width:80px;height:80px;gap:2px;border-width:3px;box-shadow:0 3px 12px #0008;background-image:linear-gradient(#08122199,#08122199)}
#touchLayer .touch-skill b{font-size:11px;max-width:72px;line-height:1.1;color:#fff}
#touchLayer .touch-skill small{font-size:10px;color:#fff}
.touch-icon{font-size:24px;font-weight:bold;line-height:1}
#touchLayer .touch-skill:disabled{opacity:.62}#touchLayer .touch-skill:active:not(:disabled){transform:scale(.94);filter:brightness(1.35)}
#touchQ{right:170px;bottom:88px}#touchE{right:150px;bottom:180px}#touchF{right:54px;bottom:208px}
@media(max-width:600px){
 #touchLayer .touch-skill{width:72px;height:72px}#touchLayer .touch-skill b{max-width:64px;font-size:10px}.touch-icon{font-size:23px}
 #touchQ{right:max(142px,calc(env(safe-area-inset-right) + 130px));bottom:calc(74px + env(safe-area-inset-bottom))}
 #touchE{right:max(134px,calc(env(safe-area-inset-right) + 122px));bottom:calc(162px + env(safe-area-inset-bottom))}
 #touchF{right:max(44px,calc(env(safe-area-inset-right) + 32px));bottom:calc(190px + env(safe-area-inset-bottom))}
 #touchFire{right:138px;width:76px}
}
/* Keep optional home actions behind one thumb-friendly menu. */
#mobileMenuToggle{display:none}
.mobile-play #mobileMenuToggle{display:inline-block;margin-left:auto;font:700 13px 'Courier New',monospace;min-height:44px;padding:10px 14px;color:#eaf6ff;background:#20334a;border:1px solid #76b7e0;border-radius:9px;order:10}
.mobile-play #walletPanel>button,.mobile-play .tabs>[data-tab="shop"],.mobile-play .account-bar>#signOutBtn,.mobile-play .btnrow>#sndBtn,.mobile-play .btnrow>#musBtn,.mobile-play .btnrow>#musicStyleBtn{display:none!important}
.mobile-play #ui[data-page="home"] .tabs{display:none}
#mobileMenuDialog{box-sizing:border-box;width:min(420px,94vw);max-height:90dvh;overflow:auto;background:#101c2d;color:#edf6ff;border:2px solid #70b4df;border-radius:16px;padding:18px;font:14px/1.5 'Courier New',monospace}
#mobileMenuDialog::backdrop{background:#030914b8}#mobileMenuDialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}#mobileMenuDialog h2{margin:0;font-size:20px}
#mobileMenuDialog button{font:700 13px 'Courier New',monospace;min-height:46px;padding:12px;color:#eaf6ff;background:#243953;border:1px solid #6c93b7;border-radius:9px;cursor:pointer;letter-spacing:0}
#mobileMenuActions{display:grid;grid-template-columns:1fr 1fr;gap:10px}#mobileMenuActions button{width:100%;margin:0}#mobileMenuActions button[hidden]{display:none!important}#mobileMenuActions #feedbackBtn{width:100%;height:auto;gap:7px}#mobileMenuActions #feedbackBtn::after{content:'FEEDBACK'}
#mobileFullscreen{width:100%;margin-top:14px}#mobileDisplayStatus{font-size:12px;color:#b9e4ff}#mobileDisplayStatus:empty{display:none}#mobileInstallHelp{margin-top:14px;font-size:12px;color:#bfd0e6}#mobileInstallHelp summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:#fff;font-weight:bold}#mobileMenuDialog :focus-visible{outline:3px solid #ffcc55;outline-offset:2px}

#controlLayoutEditor{position:fixed;inset:0;margin:0;box-sizing:border-box;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;background:#0b1529f5;color:#eaf6ff;padding:0;font:14px 'Courier New',monospace;overflow:hidden;touch-action:none}#controlLayoutEditor header{position:absolute;z-index:2;top:8px;left:12px;right:12px;pointer-events:none}#controlLayoutEditor h2{font-size:20px;margin:8px 0}#controlLayoutEditor p{font-size:12px;margin:6px 0}#controlLayoutEditor header button{pointer-events:auto;font:700 13px 'Courier New',monospace;min-height:44px;padding:10px 18px;margin:5px 8px 0 0;border:1px solid #76b7e0;border-radius:8px;background:#20334a;color:white}#controlLayoutEditor #layoutSave{background:#236b50}#layoutPreview{position:absolute;inset:0;pointer-events:none}#layoutPreview .layout-copy{pointer-events:none}#layoutPreview [data-control]{pointer-events:auto;cursor:grab;touch-action:none;box-shadow:0 0 0 4px #66d5ff55}#editControlLayout{width:100%;margin-top:14px}

.layout-sizing{display:flex;align-items:center;gap:12px;flex-wrap:wrap;pointer-events:auto;width:fit-content;background:#0b1529ed;padding:8px;border-radius:8px}.layout-sizing label{font-size:12px;white-space:nowrap}.layout-sizing select{font:inherit;color:#eaf6ff;background:#20334a;border:1px solid #76b7e0;border-radius:6px;padding:8px}.layout-sizing input{width:160px;height:28px;accent-color:#ffcf69;touch-action:pan-x}.layout-sizing output{color:#ffcf69;font-weight:bold}#layoutPreview .layout-selected{box-shadow:0 0 0 4px #ffcf69,0 0 22px #ffcf6955}

/* Compact, independently positioned HUD: no full-width panel over the arena. */
#touchTop{inset:0;display:block;background:none;border:0;padding:0;border-radius:0;pointer-events:none}
.touch-health,.touch-match,.touch-ammo{box-sizing:border-box;position:absolute;top:max(10px,env(safe-area-inset-top));height:46px;padding:7px 10px;background:#09121bc9;border:1px solid #64839a80;border-radius:8px;font:12px 'Courier New',monospace;box-shadow:0 2px 7px #0004}
#touchHealth{left:max(10px,env(safe-area-inset-left));width:128px;min-width:0;flex:none}
.touch-health b{display:block;font-size:12px;white-space:nowrap;color:#f2fff6}
.touch-health-track,#touchHealth>div{height:5px;background:#263747;margin-top:7px;border-radius:3px;overflow:hidden}
.touch-health-fill,#touchHPFill{display:block;height:100%;background:#83eea2;transition:width .12s linear}
.low-health .touch-health-fill{background:#ff5a67!important}.low-health{border-color:#ff5a67}
#touchMatch{left:calc(50% - 60px);width:120px;min-width:0;text-align:center;color:#eff8ff;font-size:12px;flex:none}
.touch-match b{display:block;font-size:18px;line-height:19px;white-space:nowrap}.touch-match small{display:block;font-size:9px;line-height:12px;color:#c4ddec;white-space:nowrap}
#touchLayer #touchAmmo{right:max(10px,env(safe-area-inset-right));width:122px;height:46px;padding:5px 8px;max-width:none;background:#09121bc9;border:1px solid #64839a80;font:12px 'Courier New',monospace}
.touch-ammo b{display:block;font-size:19px;line-height:21px;white-space:nowrap}.touch-ammo small{display:block;font-size:9px;line-height:12px;color:#c4ddec;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#touchMenu{position:absolute;right:max(10px,env(safe-area-inset-right));top:calc(max(10px,env(safe-area-inset-top)) + 52px);width:44px;height:44px;padding:0;background:#09121ba6!important;font-size:18px!important;border-width:1px!important}
#touchScorePanel{position:absolute;right:calc(max(10px,env(safe-area-inset-right)) + 50px);top:calc(max(10px,env(safe-area-inset-top)) + 52px)}
#touchScorePanel summary{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;background:#09121ba6;font-size:22px;list-style:none}#touchScorePanel summary::-webkit-details-marker{display:none}
#touchScores{top:calc(100% + 6px);max-width:calc(100vw - 80px);white-space:pre-wrap}
#touchStatus{position:absolute;top:calc(max(10px,env(safe-area-inset-top)) + 53px);left:50%;transform:translateX(-50%);width:auto;max-width:40vw;text-align:center;background:#09121bc9;padding:5px 7px;border-radius:5px;line-height:1.4}
#touchBuffs{position:absolute;top:calc(max(10px,env(safe-area-inset-top)) + 52px);left:max(10px,env(safe-area-inset-left));width:128px;line-height:1.5;color:#f6dd9c;text-shadow:0 1px 3px #000}
@media(max-width:600px){#touchHealth{width:106px;padding:7px 8px}.touch-health b{font-size:10px}#touchMatch{left:calc(50% - 50px);width:100px;padding:6px 3px}#touchLayer #touchAmmo{width:110px}.touch-match small{font-size:8px}#touchBuffs{width:106px}}
#controlLayoutEditor header{top:112px;left:50%;right:auto;transform:translateX(-50%);width:min(490px,94vw)}
#controlLayoutEditor header details{background:#0b1529e8;border:1px solid #54718c;border-radius:10px;padding:6px 10px}
#controlLayoutEditor header summary{pointer-events:auto;cursor:pointer;min-height:30px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#c5e4ff}
#controlLayoutEditor h2{font-size:16px;margin:3px 0}#controlLayoutEditor p{font-size:10px;margin:4px 0}
#controlLayoutEditor header button{padding:6px 12px;margin-top:3px}#controlLayoutEditor .layout-sizing{padding:4px;gap:6px}#controlLayoutEditor .layout-sizing input{width:110px}

.mobile-view-zoom{display:flex;flex-direction:column;gap:6px;margin-top:12px;padding:10px 12px;background:#101c2dde;border:1px solid #557b98;border-radius:9px;color:#edf6ff;font:12px 'Courier New',monospace;pointer-events:auto;box-sizing:border-box}
.mobile-view-zoom span{display:flex;justify-content:space-between;gap:15px;font-weight:bold}.mobile-view-zoom output{color:#ffcf69}.mobile-view-zoom input{width:100%;height:30px;margin:0;accent-color:#80d6ff;touch-action:pan-x}.mobile-view-zoom small{font-size:10px;color:#bfd6e8}
#touchPause{flex-wrap:wrap;max-height:65dvh;overflow:auto;top:20%;padding:12px}
#touchPause .mobile-view-zoom{flex-basis:100%;max-width:340px;margin-top:0}
#touchExit{top:auto;bottom:max(14px,env(safe-area-inset-bottom))}

/* Stop browser pinch/pan while fighting, including the common joystick ancestor. */
body.mobile-combat,body.mobile-combat #touchLayer,body.mobile-combat #touchPads{touch-action:none;overscroll-behavior:none}
body.mobile-combat{-webkit-user-select:none;user-select:none}
/* One shared, readable settings panel for mouse and touch. */
#settingsDialog{box-sizing:border-box;width:min(520px,94vw);max-height:90dvh;overflow:auto;padding:20px;background:#101c2d;color:#edf6ff;border:2px solid #70b4df;border-radius:16px;font:14px/1.5 'Courier New',monospace}
#settingsDialog::backdrop{background:#030914bb}#settingsDialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}#settingsDialog h2{margin:0;font-size:22px}#settingsDialog h3{color:#8ed7ff;font-size:14px;margin:0 0 12px}#settingsDialog section{border-top:1px solid #334d68;padding:18px 0}#settingsDialog header{margin-bottom:16px}#settingsDialog button,#settingsDialog select{font:700 13px 'Courier New',monospace;min-height:44px;padding:10px 12px;color:#edf6ff;background:#20334a;border:1px solid #76b7e0;border-radius:8px;cursor:pointer}#settingsDialog select{display:block;width:100%;margin-top:8px}#settingsDialog section>button{display:block;width:100%;margin-top:8px}#settingsDialog p{font-size:12px;color:#bbccdf;margin:10px 0 0}#settingsDialog [hidden]{display:none!important}#settingsDialog :focus-visible{outline:3px solid #ffe28a;outline-offset:2px}#settingsDialog .mobile-view-zoom{display:block;margin:0 0 14px}.mobile-play .btnrow>#settingsBtn{display:none!important}
/* Objective-only modes suppress redundant score widgets on touch devices. */
#touchMatch[hidden],#touchScorePanel[hidden]{display:none!important}

/* The aiming pad becomes the recall button while Disc is away. */
.disc-controls #touchAim{border:3px solid #8bf1ff;background:#153042bb;}
.disc-controls #touchAim>span{font-size:11px;font-weight:bold;color:#e5fcff;}
.disc-controls #touchAim.recall-pad{display:flex;align-items:center;justify-content:center;background:linear-gradient(#296981,#123345);box-shadow:inset 0 3px 0 #c7faff55,0 5px 0 #06141e,0 0 16px #67ddff44;}
.disc-controls #touchAim.recall-pad>i{display:none;}
.disc-controls #touchAim.recall-pad>span{position:static;font-size:14px;letter-spacing:1px;}
.disc-controls #touchAim.recall-pad:active{box-shadow:inset 0 3px 9px #0009,0 1px 0 #06141e;filter:brightness(1.25);}
.disc-controls #touchAim.returning-pad{opacity:.6;}
#touchLayer .touch-skill{border:3px solid var(--skill-color,#8bdcff);background-image:linear-gradient(#ffffff22,#07101dcc);box-shadow:inset 0 3px 0 #ffffff44,0 5px 0 #050b15,0 7px 14px #0009;cursor:pointer;}
#touchLayer .touch-skill .touch-icon{font-size:28px;text-shadow:0 2px 3px #000;}
#touchLayer .touch-skill b{font-weight:900;text-shadow:0 1px 2px #000;}
#touchLayer .touch-skill small{border-radius:8px;padding:2px 5px;background:#050c18bb;font-weight:bold;}
#touchLayer .touch-skill:active:not(:disabled){box-shadow:inset 0 3px 9px #0009,0 1px 0 #050b15;filter:brightness(1.3);}
#touchLayer .touch-skill:disabled{opacity:.48;filter:saturate(.5);box-shadow:inset 0 2px 6px #0008;}

#touchLesson{position:absolute;top:76px;left:50%;transform:translateX(-50%);width:min(420px,calc(100vw - 24px));box-sizing:border-box;padding:12px;background:#101a2bf2;border:2px solid #87dbb2;border-radius:8px;color:#fff;font:15px/1.4 'Courier New',monospace;pointer-events:none}
#touchLesson[hidden]{display:none}#touchLesson strong{color:#99efbe}#touchLesson p{margin:6px 0}#touchLessonGoal{color:#ffda82;font-size:13px}#touchLesson progress{display:block;width:100%;height:6px;margin-top:7px;accent-color:#99efbe}
@media(max-height:500px){#touchLesson{top:58px;width:min(400px,55vw);font-size:13px;padding:8px}#touchLessonGoal{font-size:12px}#touchLesson p{margin:4px 0}}

/* Keep the lesson action beneath translated instructions instead of covering them. */
#touchLesson #touchSkip{position:static;display:block;margin:8px 0 0 auto;padding:7px 10px;min-height:34px;pointer-events:auto;font-size:12px}
