#bs-touch[hidden], #bs-touch [hidden] { display:none!important; }
#bs-touch { position:fixed;inset:0;z-index:12;pointer-events:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none; }
#bs-touch button,#bs-touch .bs-pad { touch-action:none;pointer-events:auto; }
#bs-touch button { position:absolute;display:grid;place-content:center;min-width:44px;min-height:44px;padding:5px;border:1px solid #b8dbcf88;border-radius:50%;color:#f2fae7;background:#0b202bba;font:600 12px/1.2 system-ui;box-shadow:0 2px 12px #0005; }
#bs-touch button.held,#bs-touch button[aria-pressed=true] { background:#d8f176;color:#142014;border-color:#efffba; }
#bs-touch small { font:10px/1.3 system-ui; }
.bs-pad { position:absolute;bottom:0;height:64%; }
.bs-pad span { position:absolute;bottom:100px;color:#e0efe5aa;font:9px monospace;pointer-events:none; }
.bs-move { left:0;width:44%; }
.bs-move span { left:20px;bottom:90px; }
.bs-move i { position:absolute;bottom:24px;left:40px;width:54px;height:54px;border:2px solid #b9e1c888;border-radius:50%;background:#183e4c66;pointer-events:none; }
.bs-aim { right:0;width:56%; }
.bs-aim span { right:18px;bottom:205px; }
#bs-touch .bs-pause { top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));border-radius:12px;font-size:20px; }
#bs-touch .bs-tools { left:max(12px,env(safe-area-inset-left));bottom:218px;border-radius:12px; }
#bs-touch .bs-use { left:max(12px,env(safe-area-inset-left));bottom:146px;width:62px;height:62px; }
#bs-touch .bs-lock { right:103px;bottom:124px;border-radius:16px;min-width:70px; }
#bs-touch .bs-fire { right:max(12px,env(safe-area-inset-right));bottom:94px;width:82px;height:82px;background:#244838cc; }
#bs-touch .bs-jump { right:max(12px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));width:66px;height:66px; }
#bs-touch .bs-dash { right:88px;bottom:max(14px,env(safe-area-inset-bottom));width:56px;height:56px; }
#bs-touch .bs-special { right:154px;bottom:max(14px,env(safe-area-inset-bottom));width:56px;height:56px;font-size:10px; }
#bs-touch .bs-toolbox { position:absolute;inset:60px 14px auto;max-height:calc(100dvh - 88px);overflow:auto;padding:16px;border:1px solid #98b8a9;border-radius:16px;background:#0b202bf5;pointer-events:auto;color:#f2fae7;font:14px/1.4 system-ui; }
.bs-toolbox p { margin:8px 0 12px; }.bs-toolbox>div {display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
#bs-touch .bs-toolbox button { position:static;min-height:56px;border-radius:12px; }
#bs-touch.tools-open>.bs-pad,#bs-touch.tools-open>button { pointer-events:none;opacity:.25; }
.bs-touch-playing #game-canvas { touch-action:none; }
.bs-touch-playing #music-toggle,.bs-touch-playing .hud-hints,.bs-touch-playing .team-hud,.bs-touch-playing #hud-trait,.bs-touch-playing #hud-mods { display:none; }
.bs-touch-playing #hud { padding:8px 12px; }
.bs-touch-playing .hud-top { top:max(8px,env(safe-area-inset-top));left:12px;right:68px; }
.bs-touch-playing .hud-mission { max-width:60%; }.bs-touch-playing .hud-mission h2{font-size:16px;}.bs-touch-playing .hud-mission small{font-size:9px;}
.bs-touch-playing #hud .hud-score { margin:0;font-size:18px; }
.bs-touch-playing .hud-bottom { top:76px;bottom:auto;left:12px;right:12px;align-items:flex-start; }
.bs-touch-playing .player-id {display:none}.bs-touch-playing .player-hud{gap:0;max-width:52%;}.bs-touch-playing .health-track{width:125px}.bs-touch-playing #hud-player-name{font-size:12px}
.bs-touch-playing .ammo-hud{font-size:11px;max-width:44%;}.bs-touch-playing #hud-ammo{font-size:26px}.bs-touch-playing .cooldowns{font-size:9px}
.bs-touch-playing .hud-context { bottom:auto;top:150px;max-width:75%;font-size:11px; }
.bs-touch-playing #tutorial-hint { top:160px;bottom:auto;left:12px;max-width:230px;padding:8px;font-size:10px;pointer-events:none; }
.bs-touch-playing #tutorial-hint p { font-size:10px; }.bs-touch-playing #tutorial-hint strong{font-size:12px;}
.bs-touch-playing #hud-boss { top:122px;width:45%; }.bs-touch-playing .kill-feed{top:140px;right:12px;font-size:10px;}
@media(pointer:coarse) and (max-width:1100px){ .screen{padding:20px 16px!important;padding-top:max(20px,env(safe-area-inset-top))!important}.screen button,.dialog button{min-height:44px}.screen input,.screen select{font-size:16px!important}.dialog{max-height:85dvh;overflow:auto;max-width:calc(100vw - 24px)} }
@media(max-height:450px){ .bs-touch-playing #tutorial-hint{display:none}.bs-touch-playing .hud-bottom{top:44px}.bs-touch-playing .hud-context{top:106px}.bs-touch-playing #hud-boss{top:80px}#bs-touch .bs-tools{bottom:205px}#bs-touch .bs-use{bottom:136px} }
.bs-touch-playing .hud-top {position:absolute;gap:8px;}
.bs-touch-playing .mission-hud {min-width:0;max-width:66%;padding:8px 10px;}
.bs-touch-playing #hud-title {font-size:16px;}.bs-touch-playing #hud-objective {font-size:9px;max-height:26px;overflow:hidden;margin:5px 0;}
.bs-touch-playing #hud-chapter,.bs-touch-playing .mission-progress {display:none;}
.bs-touch-playing .hud-score {padding:8px 6px;}.bs-touch-playing #hud-score {font-size:20px;letter-spacing:0;}.bs-touch-playing #hud-combo {font-size:7px;letter-spacing:0;}
.bs-touch-playing .player-hud {min-width:0;padding:8px;}.bs-touch-playing #hud-vitals{font-size:8px;letter-spacing:0;}
@media(max-height:450px){.bs-touch-playing .mission-hud{padding:5px 8px}.bs-touch-playing #hud-objective{display:none}.bs-touch-playing .hud-score{padding:4px}.bs-touch-playing .hud-bottom{top:58px}.bs-touch-playing .player-hud{padding:5px}.bs-touch-playing .hud-context{top:126px}}
@media(max-height:450px){#bs-touch .bs-tools{left:128px;bottom:14px}#bs-touch .bs-use{bottom:110px}.bs-touch-playing .hud-bottom{top:48px}.bs-touch-playing .ammo-hud{padding:5px 8px}.bs-touch-playing #hud-cooldowns{font-size:8px}.bs-touch-playing #hud-weapon{font-size:8px}.bs-touch-playing #hud-ammo{font-size:22px}}
.bs-touch-playing .ammo-hud {min-width:0;overflow:hidden;box-sizing:border-box;}
.bs-touch-playing .weapon-meter {width:100%;min-width:0;max-width:100%;}
.bs-touch-playing .weapon-meter>span {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media(max-height:450px){#bs-touch .bs-aim>span{display:none}}
@media(pointer:coarse) and (max-width:1100px){
 #cinematic .cine-caption{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));max-height:65dvh!important;overflow:auto;padding:12px;}
 #cinematic .cine-caption>p{font-size:16px!important}#cinematic .cine-controls{position:static;flex-wrap:wrap;justify-content:flex-start;gap:6px;margin-top:10px;}
 #cinematic .cine-controls>span{flex-basis:100%}#cinematic .cine-controls button{height:auto;min-height:44px!important;min-width:44px;padding:8px 10px;font-size:11px;}
 .cine-key-hint{display:none}.guide-card{max-height:88dvh;max-width:calc(100vw - 24px);padding:18px;}.guide-card footer{flex-direction:column;align-items:stretch;gap:10px}.guide-card footer button{min-height:48px;}
 body:has(#cinematic:not([hidden])) #music-toggle{display:none;}
}

/* Offset the entire thumb cluster together around iPhone notches and the home bar. */
#bs-touch {--bs-left:max(12px,env(safe-area-inset-left,0px));--bs-right:max(12px,env(safe-area-inset-right,0px));--bs-bottom:env(safe-area-inset-bottom,0px);}
#bs-touch .bs-pause,#bs-touch .bs-fire,#bs-touch .bs-jump {right:var(--bs-right);}
#bs-touch .bs-dash {right:calc(var(--bs-right) + 76px);}
#bs-touch .bs-special {right:calc(var(--bs-right) + 142px);}
#bs-touch .bs-jump,#bs-touch .bs-dash,#bs-touch .bs-special {bottom:max(14px,var(--bs-bottom));}
#bs-touch .bs-lock {right:calc(var(--bs-right) + 91px);bottom:calc(124px + var(--bs-bottom));}
#bs-touch .bs-fire {bottom:calc(94px + var(--bs-bottom));}
#bs-touch .bs-use {left:var(--bs-left);bottom:calc(146px + var(--bs-bottom));}
#bs-touch .bs-tools {left:var(--bs-left);bottom:calc(218px + var(--bs-bottom));}
#bs-touch .bs-move i {left:calc(var(--bs-left) + 28px);bottom:calc(24px + var(--bs-bottom));}
@media(max-height:450px){#bs-touch .bs-tools{left:128px;bottom:max(14px,var(--bs-bottom));}#bs-touch .bs-use{bottom:calc(100px + var(--bs-bottom));}}
