/* Solo and room play share the same touch targets and responsive positions. */
body[data-mobile-controls=true]:not([data-controller=true]) :is(#touchMove,#onlineMove){display:block;position:fixed;left:max(20px,env(safe-area-inset-left));bottom:max(44px,env(safe-area-inset-bottom));width:144px;height:144px;max-width:none;border:3px solid #d9f4ffb8;border-radius:50%;background:#082f578c;touch-action:none;user-select:none;z-index:4}
body[data-mobile-controls=true] :is(#touchThumb,#onlineThumb){display:block;position:absolute;left:41px;top:41px;width:56px;height:56px;border:3px solid white;border-radius:50%;background:#5bb6e5bb;pointer-events:none}
body[data-mobile-controls=true]:not([data-controller=true]) :is(#fire,#jump,#touchInteract,#onlineFire,#onlineJump,#onlineInteract){display:flex;position:fixed;align-items:center;justify-content:center;flex-direction:column;z-index:4;width:76px;height:76px;min-width:76px;min-height:76px;padding:6px;border:3px solid white;border-radius:50%;font-size:15px;font-weight:800;touch-action:none;right:max(20px,env(safe-area-inset-right));bottom:max(44px,env(safe-area-inset-bottom))}
body[data-mobile-controls=true]:not([data-controller=true]) :is(#fire,#onlineFire){bottom:132px;background:#a84227}
body[data-mobile-controls=true]:not([data-controller=true]) :is(#jump,#onlineJump){background:#2baa24}
body[data-mobile-controls=true]:not([data-controller=true]) :is(#touchInteract,#onlineInteract){right:108px;background:#176ca2}
body.playing[data-mobile-controls=true]:not([data-controller=true]) #touch{display:block}
body[data-controller=true] #touch,body[data-mobile-controls=false] #touch{display:none!important}
body[data-mobile-controls=true] :is(#inventoryHud,#inventory){position:fixed;top:64px;right:12px;bottom:auto;left:auto;width:344px;max-width:calc(100vw - 24px);max-height:none;overflow:visible;background:#091b34ed;border:2px solid #86afdc;border-radius:10px;padding:2px;pointer-events:auto}
body[data-mobile-controls=true] :is(#inventoryBar,#inventorySlots){display:contents}
body[data-mobile-controls=true] :is(#inventoryHud,#inventory){display:grid;grid-template-columns:repeat(7,minmax(44px,1fr));gap:4px}
body[data-mobile-controls=true] :is(#inventoryHud,#inventory) button{min-width:44px;min-height:44px;height:44px;padding:1px;font-size:9px;overflow-wrap:anywhere}
@media(max-width:600px){body[data-mobile-controls=true] :is(#inventoryHud,#inventory){width:200px;grid-template-columns:repeat(4,minmax(44px,1fr))}}
@media(max-width:500px){body[data-mobile-controls=true]:not([data-controller=true]) :is(#touchMove,#onlineMove){width:128px;height:128px}body[data-mobile-controls=true] :is(#touchThumb,#onlineThumb){left:33px;top:33px}body[data-mobile-controls=true] :is(#inventoryHud,#inventory){top:68px}}
