/* Shared by primary sheets only. Item pickers, context menus, confirmations and notices keep their own geometry. */
:root{--main-panel-viewport-ready:1}
dialog[data-main-panel-viewport][open]{box-sizing:border-box!important;height:var(--main-panel-height)!important;min-height:0!important;max-height:none!important;translate:0 var(--main-panel-shift-y,0px)}
dialog[data-main-panel-viewport] [data-main-panel-actions]{top:var(--main-panel-actions-top)!important}
/* The generic round buttons belong at the game edge, outside the central sheet. */
dialog[data-main-panel-viewport] [data-main-panel-fixed-actions]{position:absolute!important;left:var(--main-panel-actions-left)!important;right:auto!important}
#panel[data-main-panel-viewport]:has(>[data-main-panel-fixed-actions]){overflow:visible}
#panel[data-main-panel-viewport] #panelBody{min-height:0;flex:1}
#panel[data-main-panel-viewport].apk-window #apkContent{min-height:0}
#nativeTopupNpc[data-main-panel-viewport] :is(.topup-information,.topup-history){bottom:0;max-height:none}
#nativeLuuEscort[data-main-panel-viewport] .luu-escort-content{min-height:0;overflow:auto}

/* A longer viewport reveals more native rows; it does not enlarge row fonts.
   Only primary sheets expand. Pickers and purchase confirmations keep their
   own frames, while their parent list remains scrollable behind them. */
#playerInspectionDialog{width:540px;max-width:none;transform:translate(-50%,-50%) scale(var(--main-panel-peer-scale,1))}
#panel.apk-window[data-main-panel-viewport][data-menu-kind=inventory][data-inventory-stage=list] #itemList{flex:1;min-height:0;max-height:none}
#panel[data-main-panel-viewport][data-menu-kind=inventory] #itemDetails.native-inventory-inspection{max-height:none}
#npcWarehouse[data-main-panel-viewport] .npc-shop-scroll{flex:1;min-height:0;max-height:none}
#npcShop[data-main-panel-viewport] .npc-shop-money,#xuMall[data-main-panel-viewport] .xu-mall-money{position:sticky;top:0;z-index:2}
