/* ID scopes override the legacy desktop portal's fixed two-column rules. */
@media(max-width:700px){
 html[data-shell-theme] body #panel-games .gamecards{display:flex!important;flex-direction:column!important;gap:12px!important}
 html:has(#panel-games) body{min-width:0!important;width:100%!important;padding:8px!important;overflow-x:hidden!important}
 html[data-shell-theme] body #panel-games, html[data-shell-theme] body #panel-gacha, html[data-shell-theme] body #petAquarium{min-width:0!important;max-width:100%!important}
 html[data-shell-theme] body #panel-games .game{display:flex!important;flex-direction:column!important;gap:12px!important;padding:12px!important;min-width:0!important}
 html[data-shell-theme] body #panel-games .game>*{min-width:0!important;max-width:100%!important}
 html[data-shell-theme] body #panel-games .game .gamevisual{width:100%!important;height:210px!important;min-height:180px!important;grid-row:auto!important;margin:0!important}
 html[data-shell-theme] body #panel-games .throw-stage{height:100%!important;min-height:0!important;width:100%!important}
 html[data-shell-theme] body #panel-games .throw-canvas{max-width:100%!important;max-height:170px!important;object-fit:contain}
 html[data-shell-theme] body #panel-games .gametop{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 html[data-shell-theme] body #panel-games .quickbets, html[data-shell-theme] body #panel-games .choices{display:flex!important;flex-wrap:wrap!important;gap:7px!important}
 html[data-shell-theme] body #panel-games button, html[data-shell-theme] body #panel-gacha button, html[data-shell-theme] body #petAquarium button{min-height:44px!important;touch-action:manipulation}
 html[data-shell-theme] body #panel-games :is(input,select), html[data-shell-theme] body #panel-gacha :is(input,select), html[data-shell-theme] body #petAquarium :is(input,select){font-size:16px!important;max-width:100%!important;min-width:0!important}
 html[data-shell-theme] body #panel-games .inputwrap button{min-width:56px!important;white-space:nowrap!important;flex:none!important}
 html[data-shell-theme] body #panel-games .result{padding:12px!important;overflow-wrap:anywhere!important}
 html[data-shell-theme] body #panel-games .practicebar{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important}
 html[data-shell-theme] body #panel-gacha .gacha-interaction{display:flex!important;flex-direction:column!important;min-width:0!important;gap:12px!important;padding:12px!important}
 html[data-shell-theme] body #panel-gacha .gacha-machine{width:100%!important;max-width:280px!important;height:290px!important;min-width:0!important;flex:none!important}
 html[data-shell-theme] body #gachaCanvas{max-width:100%!important;max-height:100%!important;object-fit:contain}
 html[data-shell-theme] body #panel-gacha .gacha-copy{min-width:0!important;padding:12px!important;width:100%!important}
 html[data-shell-theme] body #panel-gacha .collection-heading-mini{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 html[data-shell-theme] body #collectionInventory{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html[data-shell-theme] body #collectionInventory .inventory-card{display:flex!important;flex-direction:column!important;align-items:stretch!important;min-width:0!important;padding:12px!important;gap:8px!important}
 html[data-shell-theme] body #collectionInventory .inventory-art{align-self:center!important;max-width:100%!important}
 html[data-shell-theme] body #collectionInventory .inventory-copy{min-width:0!important;overflow-wrap:anywhere!important}
 html[data-shell-theme] body #collectionInventory .inventory-copy h4{font-size:14px!important;line-height:1.4!important}
 html[data-shell-theme] body #collectionInventory .inventory-copy p{font-size:12px!important}
 html[data-shell-theme] body #panel-gacha .desk-subtabs, html[data-shell-theme] body #panel-games .desk-subtabs{display:flex!important;flex-wrap:nowrap!important;gap:7px!important;max-width:100%!important;overflow-x:auto!important;padding-bottom:5px!important}
 html[data-shell-theme] body #panel-gacha .desk-subtabs button, html[data-shell-theme] body #panel-games .desk-subtabs button{flex:none!important;white-space:nowrap!important}
 html[data-shell-theme] body #petAquarium .aquarium-toolbar, html[data-shell-theme] body #petAquarium .aquarium-footer{display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:10px!important}
 html[data-shell-theme] body #petAquarium .tank-scene{min-height:160px!important}
 html[data-shell-theme] body #petAquarium .fish-care-shop{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 html[data-shell-theme] body #fishCareMessage{overflow-wrap:anywhere!important}
 html:has(#panel-games) body dialog[open]{max-width:calc(100vw - 20px)!important;width:min(470px,calc(100vw - 20px))!important;max-height:calc(100dvh - 24px)!important;padding:16px!important;overflow:auto!important;overscroll-behavior:contain}
}
@media(max-width:360px){#collectionInventory{grid-template-columns:minmax(0,1fr)!important}}
