/* Touch HUD: top-edge essentials, lower-corner controls, clear aiming area. */
#mobileMenuToggle[hidden],#mobileTools[hidden],#mobileToolsBackdrop[hidden],#screenNotice[hidden]{display:none!important}
#mobileToolsBackdrop{position:absolute;inset:0;width:100%;height:100%;z-index:204;background:transparent;border:0;pointer-events:auto;touch-action:none}
#screenNotice{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(66px + var(--safe-bottom));max-width:min(420px,62%);padding:7px 10px;color:#f2e5c7;background:#102532eb;border:1px solid #b8c9bb55;border-radius:6px;font-size:12px;line-height:1.4;text-align:center;pointer-events:none;z-index:205}
.touch-ui .mobile-playing .top{padding:calc(6px + var(--safe-top)) calc(10px + var(--safe-right)) 0 calc(10px + var(--safe-left));gap:6px}
.touch-ui .mobile-playing .stat{min-width:0;padding:4px 8px;border-radius:5px;backdrop-filter:none}
.touch-ui .mobile-playing .stat:first-child{flex:0 0 104px;max-width:104px;padding-right:8px}
.touch-ui .mobile-playing .stat:last-child{margin-left:auto;width:118px;text-align:right}
.touch-ui .mobile-playing .stat b{font-size:17px;line-height:20px;white-space:nowrap}
.touch-ui .mobile-playing .stat span{font-size:9px;letter-spacing:.04em}
.touch-ui .mobile-playing #hpBar{height:3px;margin-top:2px}
.touch-ui .mobile-playing.mobile-match .stat:nth-child(2){display:none}
.touch-ui .mobile-playing:not(.mobile-match) .stat:nth-child(2){max-width:calc(100% - 234px);background:transparent;text-align:center}
.touch-ui .mobile-playing:not(.mobile-match) .stat:nth-child(2) b{font-size:12px;overflow:hidden;text-overflow:ellipsis}
.touch-ui #gameViewport.mobile-playing #miniPanel{left:calc(10px + var(--safe-left));top:calc(68px + var(--safe-top));transform:none;width:66px;padding:3px;border-radius:5px}
.touch-ui .mobile-playing #minimap{width:58px;height:58px}
.touch-ui .mobile-playing #miniPanel small,.touch-ui .mobile-playing #mapName,.touch-ui .mobile-playing #arenaHud,.touch-ui .mobile-playing #statusText{display:none}
.touch-ui .mobile-playing #weaponInfo{top:calc(51px + var(--safe-top));right:calc(10px + var(--safe-right));max-width:125px;padding:2px 5px;background:transparent;font-size:10px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.touch-ui .mobile-playing #weaponName{font-weight:500}
.touch-ui .mobile-playing #weaponProgress{height:2px}
#mobileMenuToggle{position:absolute;right:calc(10px + var(--safe-right));top:calc(73px + var(--safe-top));height:44px;min-width:48px;max-width:85px;padding:6px 9px;z-index:40;pointer-events:auto;border:1px solid #bacbb477;border-radius:6px;background:#142b35b8;color:#f1f0e5;font:12px system-ui;touch-action:manipulation}
#mobileTools{position:absolute;right:calc(10px + var(--safe-right));top:calc(8px + var(--safe-top));width:300px;max-width:calc(100% - 20px - var(--safe-left) - var(--safe-right));max-height:calc(100% - 16px - var(--safe-top) - var(--safe-bottom));overflow:auto;overscroll-behavior:contain;touch-action:pan-y;z-index:205;padding:12px;background:#10232cf5;color:#f1f1e8;border:1px solid #8aa6a4;border-radius:10px}
#mobileTools header{display:flex;align-items:center;justify-content:space-between;gap:8px}
#mobileToolsNote{font-size:11px;color:#aec5c2;margin:6px 0 10px}
#mobileToolsGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#mobileTools button{min-width:44px;min-height:44px;border:1px solid #7f9f9d;border-radius:6px;background:#24414b;color:#f1f1e8;font:13px system-ui;padding:7px 8px;touch-action:manipulation;cursor:pointer}
#mobileTools #armoryButton,#mobileTools #screenBtn,#mobileTools #soundBtn,#mobileTools #roomButton,#mobileTools #soloTools,#mobileTools #zoomControls,#mobileTools .language-switch{position:static;inset:auto;width:auto;max-width:none;height:auto;margin:0;transform:none;z-index:auto}
#mobileTools #roomButton:not([hidden]),#mobileTools #screenBtn,#mobileTools #soundBtn{display:block}
#mobileTools #soloTools{display:contents}#mobileTools #soloTools[hidden],#mobileTools [hidden]{display:none!important}
#mobileTools #trainingTools{grid-column:1/-1;margin:0;display:flex;flex-wrap:wrap;gap:6px;padding:0;background:none}
#mobileTools #trainingTools button{flex:1 1 44%}#mobileTools #targetResult{width:100%;margin:0}
#mobileTools #zoomControls{grid-column:1/-1;display:flex;align-items:center;gap:8px}
#mobileTools #viewMode{display:block;margin-right:auto;font-size:12px}
#mobileTools #zoomControls button{width:48px;height:44px;font-size:24px}
.mobile-language-slot{grid-column:1/-1}
#mobileTools .language-switch{display:flex;align-items:center;padding:4px 8px;border-radius:6px}
#mobileTools .language-switch select{flex:1;max-width:none;min-height:36px;font-size:13px}
.touch-ui .mobile-playing #audioPanel{position:absolute;top:calc(8px + var(--safe-top));left:auto;right:calc(10px + var(--safe-right));width:280px;max-height:calc(100% - 16px - var(--safe-top) - var(--safe-bottom));z-index:50;background:#102532fa}
.touch-ui .mobile-playing #rotateHint{display:none}
.touch-ui .mobile-playing #roundLoadout{top:calc(86px + var(--safe-top))!important;max-width:calc(100% - 172px);width:max-content!important;max-height:calc(100% - 160px);overflow:auto;padding:7px 10px!important}
.touch-ui .mobile-playing #roundLoadout h2{font-size:12px!important}
.touch-ui .mobile-playing #roundLoadout p{font-size:10px!important;max-width:300px}
.touch-ui .mobile-playing #roundLoadout button{min-height:44px;max-width:100%;margin:4px 4px 0 0;padding:7px 12px}
.touch-ui .mobile-playing #movementHint{top:auto;bottom:calc(72px + var(--safe-bottom));max-width:38%;font-size:11px}
.touch-ui .mobile-playing #respawnBanner{max-width:55%;padding:8px 12px;font-size:15px;top:30%}
.touch-ui .mobile-playing #hitText{font-size:15px}
.touch-ui .mobile-playing #hint{display:none}
.touch-ui .mobile-playing:has(#armory:not([hidden])) #mobileMenuToggle,.touch-ui .mobile-playing:has(#soloPauseMenu:not([hidden])) #mobileMenuToggle{visibility:hidden}
.touch-ui #gameViewport:has(#overlay:not(.hidden)) #fieldUI{visibility:hidden}
.touch-ui .mobile-playing.portrait #miniPanel{top:calc(101px + var(--safe-top))!important}
.touch-ui .mobile-playing.portrait #weaponInfo{top:calc(49px + var(--safe-top))}
.touch-ui .mobile-playing.portrait #mobileMenuToggle{top:calc(101px + var(--safe-top))}
.touch-ui .mobile-playing.portrait #roundLoadout{top:calc(154px + var(--safe-top))!important;max-width:calc(100% - 28px)}
@media(max-height:360px){
 .touch-ui .mobile-playing #movePad{width:110px;height:110px;left:calc(12px + var(--safe-left))}
 .touch-ui .mobile-playing #knob{left:29px;top:29px}
 .touch-ui .mobile-playing #sprintBtn{left:calc(132px + var(--safe-left));width:48px;height:48px}
 .touch-ui .mobile-playing #miniPanel{width:54px!important;top:calc(64px + var(--safe-top))!important}
 .touch-ui .mobile-playing #minimap{width:46px;height:46px}
 .touch-ui .mobile-playing #stanceControls{left:calc(80px + var(--safe-left));bottom:auto;top:calc(76px + var(--safe-top))}
 .touch-ui .mobile-playing #stanceControls button{min-width:40px;min-height:40px;font-size:11px}
}
@media(max-width:430px){
 .touch-ui .mobile-playing .stat:first-child{flex-basis:80px;max-width:80px}
 .touch-ui .mobile-playing .stat:last-child{width:94px}
 .touch-ui .mobile-playing .stat b{font-size:15px}
 .touch-ui .mobile-playing #movePad{width:112px;height:112px;left:10px}
 .touch-ui .mobile-playing #knob{left:30px;top:30px}
 .touch-ui .mobile-playing #sprintBtn{left:calc(15px + var(--safe-left));bottom:calc(145px + var(--safe-bottom));width:50px;height:50px}
 .touch-ui .mobile-playing #stanceControls{bottom:calc(205px + var(--safe-bottom));left:calc(10px + var(--safe-left));gap:3px}
 .touch-ui .mobile-playing #stanceControls button{min-width:40px;min-height:42px;font-size:11px}
 .touch-ui .mobile-playing #aimBtn{right:calc(18px + var(--safe-right));bottom:calc(180px + var(--safe-bottom))}
 .touch-ui .mobile-playing:not(.mobile-match) .stat:nth-child(2){max-width:calc(100% - 184px)}
}

.touch-ui .mobile-playing #multiplayerStatus{display:none}
.touch-ui .mobile-playing #multiplayerStatus[data-notice=alert]{display:block;top:calc(88px + var(--safe-top));max-width:52%;white-space:normal;font-size:11px;line-height:1.4;text-align:center}
.touch-ui .mobile-playing #armory header{padding-right:0}
.touch-ui .mobile-playing .tailcat-room-panel.collapsed{visibility:hidden;pointer-events:none}
.touch-ui .mobile-playing .tailcat-room-panel:not(.collapsed){top:calc(8px + var(--safe-top));bottom:calc(8px + var(--safe-bottom));right:calc(8px + var(--safe-right));max-width:calc(100% - 16px - var(--safe-left) - var(--safe-right))}
.touch-ui .mobile-playing .tailcat-panel-bar button{min-height:44px;min-width:60px}
.touch-ui .mobile-playing .tailcat-panel-bar{height:48px;min-height:48px}
@media(max-height:360px){.touch-ui .mobile-playing #stanceControls{top:calc(88px + var(--safe-top))}}
@media(max-width:350px){.touch-ui .mobile-playing #matchSummaryButton{min-width:0;width:112px;max-width:112px;left:calc(50% - 7px);font-size:10px;padding:3px 4px}}
.touch-ui .mobile-playing .top{align-items:flex-start}
.touch-ui .mobile-playing .stat{height:44px}
.touch-ui .mobile-playing .stat span{display:block;line-height:10px}
.touch-ui .mobile-playing .stat b{line-height:20px}
.touch-ui .mobile-playing #hpBar{height:2px;margin-top:2px}
.touch-ui .mobile-playing #weaponInfo{top:calc(54px + var(--safe-top))}
