/* Espaço da mochila no celular: cabeçalho compacto e prioridade para os itens. */
html.touch-device #hud #inv{width:min(1040px,calc(var(--mobile-vw) - 68px - var(--sl) - var(--sr)))!important;padding:8px!important}
html.touch-device #inv>.title{height:44px;min-height:44px;box-sizing:border-box;margin:0 0 6px;padding:0 0 5px;gap:5px;font-size:18px}
html.touch-device #inv>.title::before,html.touch-device #inv>.title>.dim{display:none}
html.touch-device #inv>.title :is(.inv-close,.mob-close){width:40px;min-width:40px;height:40px;min-height:40px}
html.touch-device.mhud2 #inv>#mq-wallet{position:absolute;top:8px;right:56px;max-width:calc(100% - 190px);height:34px;max-height:none;zoom:1!important;margin:0;gap:6px;flex-wrap:nowrap}
html.touch-device.mhud2 #inv>#mq-wallet #wallet{box-sizing:border-box;min-width:82px;width:auto;height:34px;padding:3px 6px;border-width:4px;gap:5px;flex:0 1 auto}
html.touch-device #inv #mq-wallet .wallet-bone{width:18px;height:18px;flex-shrink:0}
html.touch-device #inv #mq-wallet .wallet-value{font-size:16px;white-space:nowrap}
html.touch-device.mhud2 #inv>#mq-wallet #cash-shop-open{box-sizing:border-box;width:clamp(130px,22vw,190px);min-width:130px;height:34px;min-height:34px;padding:2px 5px;border-width:4px;gap:5px;flex:0 1 auto}
html.touch-device #inv #mq-wallet #cash-shop-open .cash-gem{width:18px;height:18px;min-width:18px;background-size:18px;font-size:0}
html.touch-device #inv #mq-wallet #cash-shop-open :is(.cash-caption,.wallet-label){display:none}
html.touch-device #inv #mq-wallet #cash-shop-open b{font-size:16px;white-space:nowrap}
html.touch-device #inv #mq-wallet #cash-shop-open .cash-enter{font-size:14px!important;padding:2px 5px;min-width:0}
html.touch-device #inv .inv-cols{grid-template-columns:clamp(200px,31%,280px) minmax(0,1fr)!important;gap:8px}
html.touch-device #inv .inv-left{padding-right:8px}
html.touch-device #inv .eqwrap{gap:4px;align-items:center}
html.touch-device #inv .eq{width:44px;height:44px;box-sizing:border-box;flex:none}
html.touch-device #inv .eq img{max-width:36px;max-height:36px}
html.touch-device #inv .preview{max-width:116px;padding:3px}
html.touch-device #inv #statline{width:100%;box-sizing:border-box;margin:7px 0 0;gap:4px}
html.touch-device #inv .inv-stat{padding:4px 2px;gap:2px}
html.touch-device #inv .inv-stat span{font-size:10px}
html.touch-device #inv .inv-stat b{font-size:16px}
html.touch-device #inv .inv-right{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:26px minmax(94px,1fr) auto;gap:5px 7px;align-items:stretch}
html.touch-device #inv .inv-right>.title2{grid-column:1;grid-row:1;margin:0;align-self:center;font-size:18px}
html.touch-device #inv .inv-right>#bag-capacity{grid-column:2;grid-row:1;align-self:center;width:auto!important;max-width:100%;padding:0;border:0;box-shadow:none;background:none;font:12px/1.2 Txt,Arial,sans-serif;text-align:right;white-space:nowrap}
html.touch-device #inv .inv-right>#bag-scroll-area{grid-column:1/-1;grid-row:2;min-height:94px}
html.touch-device #inv .inv-right>#bag-actions{grid-column:1/-1;grid-row:3;margin:0;padding:5px;max-height:82px;box-sizing:border-box}
html.touch-device #inv .inv-right>#bag-actions.bag-actions-empty{display:none!important}
html.touch-device #hud #inv .inv-right #bag-scroll-area #bag{--cell:46px;max-height:none;height:100%;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));grid-auto-rows:46px}
@media(orientation:portrait){
 html.touch-device #hud #inv{width:calc(var(--mobile-vw) - var(--L) - var(--R))!important}
 html.touch-device.mhud2 #inv>#mq-wallet{position:static;max-width:100%;height:34px;margin:0 0 7px;justify-content:space-between}
 html.touch-device.mhud2 #inv>#mq-wallet #wallet{min-width:100px;flex:1}
 html.touch-device.mhud2 #inv>#mq-wallet #cash-shop-open{width:auto;flex:1}
 html.touch-device #inv .inv-cols{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:clamp(175px,27vh,220px) minmax(0,1fr);gap:8px}
 html.touch-device #inv .inv-left{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(110px,.8fr);gap:8px;padding:0;overflow-y:auto}
 html.touch-device #inv .eqwrap{min-width:0;justify-content:center}
 html.touch-device #inv .preview{min-width:50px;max-width:100px}
 html.touch-device #inv #statline{grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;margin:0;gap:4px}
 html.touch-device #inv .inv-stat{min-height:44px;box-sizing:border-box}
 html.touch-device #inv .inv-stat span{font-size:10px}
}
@media(orientation:portrait) and (max-width:359px){
 html.touch-device #inv .inv-left{grid-template-columns:minmax(0,1fr)}
 html.touch-device #inv #statline{grid-template-columns:repeat(3,minmax(0,1fr))}
 html.touch-device #inv .inv-cols{grid-template-rows:190px minmax(0,1fr)}
 html.touch-device #inv .inv-right>#bag-capacity{font-size:10px}
}
