/* Only touch-capable coarse-pointer devices use these controls and HUD rules. */
.tb-touch-button[hidden],#tb-touch-hint[hidden]{display:none!important}
.tb-touch-button{position:fixed;z-index:75;min-width:76px;min-height:48px;border:2px solid #81e5f0;border-radius:14px;background:#12344eeb;color:#f3fbff;font:700 15px system-ui;touch-action:none;user-select:none;-webkit-user-select:none}
#tb-mobile-h{right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));width:138px}
#tb-mobile-pause{right:max(10px,env(safe-area-inset-right));bottom:calc(68px + env(safe-area-inset-bottom));width:88px}
#tb-touch-hint{position:fixed;right:max(10px,env(safe-area-inset-right));bottom:calc(124px + env(safe-area-inset-bottom));font:10px system-ui;color:#dcf8ff;text-shadow:0 2px 4px #000;z-index:32;pointer-events:none}
html.tb-touch #canvas-container canvas{touch-action:none;user-select:none;-webkit-user-select:none}
html.tb-touch #game-ui{padding:8px!important;padding-top:max(8px,env(safe-area-inset-top))!important}
html.tb-touch #game-ui>div:first-child>div:first-child>div:first-child{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px!important;padding:8px!important;max-width:calc(100% - 90px);margin:0!important}
html.tb-touch #game-ui>div:first-child>div:first-child>div:first-child>div{margin:0!important;min-width:0}
html.tb-touch #game-ui>div:first-child>div:first-child>div:first-child>div.w-px{display:none}
html.tb-touch #game-ui .text-xs{font-size:9px!important;letter-spacing:0!important}
html.tb-touch #score-val,html.tb-touch #high-score-val,html.tb-touch #weapon-mode{font-size:14px!important;line-height:1.3!important;overflow-wrap:anywhere}
html.tb-touch #stage-reward-hud{font-size:10px!important}
html.tb-touch #stage-display{font-size:13px!important}html.tb-touch #timer-display{font-size:18px!important}
html.tb-touch #game-ui>div:first-child>div:first-child>div:last-child{padding:7px!important;max-width:82px}
html.tb-touch #neon-side-hud{top:105px!important;left:max(8px,env(safe-area-inset-left))!important;min-width:0!important;width:180px;padding:6px!important}
html.tb-touch #neon-side-hud>div{font-size:9px!important}html.tb-touch #gold-count-display{font-size:20px!important}
html.tb-touch #ammo-floating-hud{left:max(8px,env(safe-area-inset-left))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;padding:7px 10px!important;width:160px;max-width:40vw}
html.tb-touch #ammo-floating-hud .text-xs{font-size:9px!important}html.tb-touch #ammo-display{font-size:26px!important}
html.tb-touch #tb-life-hud{bottom:calc(94px + env(safe-area-inset-bottom))!important;left:max(8px,env(safe-area-inset-left))!important;width:175px!important;padding:6px!important;font-size:10px!important}
html.tb-touch #game-ui>div:last-child{width:calc(100% - 340px)!important;align-self:center;margin-bottom:0!important}html.tb-touch #game-ui>div:last-child>div{padding:6px!important}
html.tb-touch #boss-hp-container{max-width:55vw}
html.tb-touch #demo-custom-hud{max-width:72vw;font-size:12px!important}
@media(orientation:portrait){html.tb-touch #tb-touch-hint{max-width:180px;text-align:right}html.tb-touch #game-ui>div:first-child>div:first-child>div:first-child{grid-template-columns:repeat(2,minmax(0,1fr))}html.tb-touch #neon-side-hud{top:160px!important}html.tb-touch #game-ui>div:last-child{width:calc(100% - 32px)!important;margin-bottom:155px!important}}
html.tb-touch #tb-life-hud{bottom:calc(102px + env(safe-area-inset-bottom))!important}
html.tb-touch #toast-message{top:82px!important;right:max(8px,env(safe-area-inset-right))!important;left:auto!important;transform:none!important;width:calc(100% - 220px);max-width:360px;font-size:11px!important;line-height:1.4;padding:6px 9px!important}
html.tb-touch #demo-opening-hint{top:128px!important;right:8px!important;left:auto!important;transform:none!important;width:calc(100% - 220px);max-width:360px;font-size:12px!important;line-height:1.4;padding:6px 9px!important}
html.tb-touch #demo-custom-hud{width:100%;max-width:none!important}
html.tb-touch #demo-top-label{top:8px!important;right:8px!important;font-size:16px!important;padding:6px 9px!important}
html.tb-touch #demo-custom-hud>div:nth-child(2){bottom:8px!important;left:180px!important;transform:none!important;width:calc(100% - 340px)!important;padding:8px!important}
html.tb-touch #demo-goal-label,html.tb-touch #demo-goal-progress{font-size:12px!important;line-height:1.35!important}
