/* Ajustes de dimensão e rolagem: os controles e as artes continuam os mesmos. */
html.touch-device{--mobile-vw:100vw;--mobile-vh:100dvh;--mobile-top:0px;--mobile-left:0px}
html.touch-device :is(.game-window,.lc-box,#sndpanel,#player-menu){box-sizing:border-box;max-width:calc(var(--mobile-vw) - 20px)!important;max-height:calc(var(--mobile-vh) - 20px)!important;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;zoom:1!important;-webkit-overflow-scrolling:touch}
html.touch-device .game-dialog{inset:var(--mobile-top) auto auto var(--mobile-left);width:var(--mobile-vw);height:var(--mobile-vh);padding:10px;overflow:hidden;place-items:center}
html.touch-device .game-window{min-width:0;min-height:0}
html.touch-device .game-window :is(.game-content,table){max-width:100%;min-width:0}
html.touch-device #hud #inv{position:fixed!important;left:calc(var(--mobile-left) + var(--L))!important;top:calc(var(--mobile-top) + var(--T))!important;right:auto!important;bottom:auto!important;transform:none!important;translate:none!important;zoom:1!important;box-sizing:border-box;width:min(820px,calc(var(--mobile-vw) - 96px - var(--sl) - var(--sr)))!important;height:calc(var(--mobile-vh) - var(--T) - var(--B))!important;max-height:calc(var(--mobile-vh) - var(--T) - var(--B))!important;display:flex;flex-direction:column;overflow:hidden!important;min-width:0;min-height:0;--cell:44px}
html.touch-device #hud #inv.hidden{display:none!important}
html.touch-device #inv>.title,html.touch-device #inv>#mq-wallet{flex:0 0 auto}
html.touch-device #inv>.title{min-height:36px;margin-bottom:4px;padding-bottom:4px}
html.touch-device #inv>.title :is(.inv-close,.mob-close){width:36px;height:36px;min-height:36px;min-width:36px}
html.touch-device.mhud2 #inv>#mq-wallet{zoom:.75;max-height:55px;margin:0 0 5px}
html.touch-device #inv>.title{cursor:default}
html.touch-device #inv .inv-cols{flex:1 1 0;min-height:0;min-width:0;grid-template-columns:minmax(180px,.9fr) minmax(240px,1fr)!important;align-items:stretch;overflow:hidden;gap:10px}
html.touch-device #inv .inv-left{min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding-right:8px}
html.touch-device #inv .eqwrap{min-width:0;gap:4px}
html.touch-device #inv .preview{flex:1;min-width:0;max-width:120px;margin:0;padding:4px}
html.touch-device #inv :is(#dollprev,#dollimg){width:100%!important;height:auto!important;max-width:120px}
html.touch-device #inv .inv-right{position:static;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden}
html.touch-device #inv .inv-right>#bag-capacity{width:100%!important;min-width:0;white-space:normal;font-size:13px;line-height:1.25;padding:5px 7px;flex:0 0 auto}
html.touch-device #inv .inv-right #bag{--cell:44px;width:100%;flex:1 1 0;min-height:44px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:var(--cell);align-content:start;-webkit-overflow-scrolling:touch}
html.touch-device #inv #bag .b{width:100%;height:var(--cell);touch-action:none}
html.touch-device #inv .inv-right #bag-actions{flex:0 0 auto;min-height:0;max-height:110px;max-height:min(110px,28vh);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;margin-top:5px}
html.touch-device #inv #equipment-sets{max-height:none}
html.touch-device #character-menu{inset:var(--mobile-top) auto auto var(--mobile-left);width:var(--mobile-vw);height:var(--mobile-vh);padding:8px;overflow:hidden;zoom:1!important;place-items:center;box-sizing:border-box}
html.touch-device #character-menu .cw-frame{width:min(1040px,100%)!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-height:0;zoom:1!important;overflow:hidden!important;border-width:16px;border-image-width:16px;transform:none!important}
html.touch-device #character-menu .cw-head{flex:0 0 auto;min-width:0;margin:0;gap:6px;align-items:center}
html.touch-device #character-menu .cw-tabs{flex:1;min-width:0;overflow-x:auto;touch-action:pan-x}
html.touch-device #character-menu .cw-tabs button{flex-shrink:0}
html.touch-device #character-menu .cw-body{flex:1 1 0;min-height:0;min-width:0;overflow:hidden;grid-template-columns:minmax(140px,.32fr) minmax(0,1fr);gap:10px;padding-top:10px}
html.touch-device #character-menu .cw-main{min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
html.touch-device #character-menu .cw-hero{display:flex;flex-direction:column;min-height:0;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain}
html.touch-device #character-menu .cw-arch{min-height:135px;height:150px;flex-shrink:0}
html.touch-device #character-menu .cw-foot{flex:0 0 auto;max-height:65px;overflow-y:auto;touch-action:pan-y}
html.touch-device #character-menu :is(.cw-detail,.cw-loadout){min-width:0}
@media(orientation:portrait){
 html.touch-device #hud #inv{width:calc(var(--mobile-vw) - var(--L) - var(--R))!important;height:calc(var(--mobile-vh) - var(--T) - var(--B) - 78px)!important;max-height:calc(var(--mobile-vh) - var(--T) - var(--B) - 78px)!important}
 html.touch-device #inv .inv-cols{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(120px,.7fr) minmax(160px,1fr)}
 html.touch-device #inv .inv-left{border-right:0;padding-right:0}
 html.touch-device #character-menu .cw-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(125px,.5fr) minmax(0,1fr)}
 html.touch-device #character-menu .cw-hero{display:grid;grid-template-columns:130px minmax(0,1fr);gap:7px}
 html.touch-device #character-menu .cw-arch{grid-row:1/5;height:150px}
 html.touch-device #character-menu .cw-sheet{grid-column:1/-1}
}
