body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host){width:800px!important;height:450px!important;max-width:100%!important;max-height:100%!important;box-sizing:border-box!important;padding:0!important;border:0!important;border-image:none!important;background:transparent!important;overflow:hidden!important}body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host):not(:modal){left:0!important;top:0!important;right:auto!important;bottom:auto!important;margin:0!important}body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host)>.dialoghead,body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host)>.mw-ml-shop-size{display:none!important}body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host) #dialogbody{padding:0!important;margin:0!important;width:100%!important;height:100%!important;max-height:none!important;overflow:hidden!important;display:block!important}.native-commerce-host{width:100%;height:100%;position:relative}body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host)::before,body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host)::after{display:none!important}
/* Commerce uses an absolute inner frame; pin its body to the sized dialog. */
body.skin-lineagem:has(.game.android-layout) #dialog:has(.native-commerce-host) #dialogbody{position:absolute!important;inset:0!important;box-sizing:border-box!important}
body.skin-lineagem #dialog #dialogbody>.native-commerce-host{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}

/* Auto-delete is a centered dialog; keep the other commerce windows unchanged. */
body.skin-lineagem #dialog:is(#dialog#dialog#dialog):has(.native-commerce-host[data-kind="trash"]):modal{position:fixed!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;margin:0!important;width:min(1100px,calc(100vw - 24px))!important;height:min(650px,calc(100dvh - 24px))!important;max-width:none!important;max-height:none!important;transform:translate(-50%,-50%)!important;transform-origin:center!important}
@media(pointer:coarse),(max-width:900px){body.skin-lineagem #dialog:is(#dialog#dialog#dialog):has(.native-commerce-host[data-kind="trash"]):modal{left:0!important;top:0!important;width:100vw!important;height:100dvh!important;transform:none!important}}

/* r39: the opened deposit window fills the game, not the NPC entry button. */
body.skin-lineagem:has(.game.android-layout) .game #dialog:has(.native-commerce-host[data-kind="warehouse"][data-viewport="game"]){position:absolute!important;inset:0!important;margin:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;transform:none!important;translate:none!important;z-index:100060!important}
