/* One proportionate illustrated frame, scoped to the bag. Live content stays separate. */
body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-module.pui-bag[data-page=bag][open]{
 border:0!important;
 border-image:none!important;
 border-radius:0!important;
 background:transparent!important;
 box-shadow:none!important;
 isolation:isolate;
}
/* Percent padding is based on inline size; author the insets against the fixed module height. */
body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-module.pui-bag[data-page=bag][open]{
 --bag-art-height:var(--bag-height);
 padding:calc(var(--bag-art-height)*.13) calc(var(--bag-art-height)*.0837379) calc(var(--bag-art-height)*.108)!important;
}
body.adventure-hud #pui-bag-character-pair #equipment-dialog.pui-module.pui-bag[data-page=bag][open]{--bag-art-height:var(--pair-height)}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]::before{
 content:"";display:block;position:absolute;inset:7% 5% 5%;z-index:-1;pointer-events:none;
 background:linear-gradient(#21132beb,#21132bf0),url('/assets/ui/player-surfaces-v1/royal-hall.webp') center/cover no-repeat;
 clip-path:polygon(4% 0,96% 0,100% 4%,100% 95%,95% 100%,5% 100%,0 95%,0 4%);
}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]::after{
 content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
 background:url('/assets/ui/bag-frame-v2/frame.b1018fc0bf97.webp') center/100% 100% no-repeat;
 /* Frame perimeter only: exclude the complete central opening and generated low-alpha haze. */
 clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,10.5% 13.8%,10.5% 88.4%,89.5% 88.4%,89.5% 13.8%,10.5% 13.8%);
}
body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-bag[data-page=bag]>.equipment-header{
 position:absolute!important;inset:5.6% 7% auto!important;width:86%;height:7%;min-height:0!important;
 padding:0!important;border:0!important;background:none!important;z-index:3;cursor:grab;
}
body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-bag[data-page=bag]>.equipment-header h2{
 position:absolute;inset:0 24%;display:grid;place-items:center;margin:0!important;padding:0!important;
 border:0!important;font-size:24px!important;line-height:1.3!important;text-align:center;color:#ffe4a3!important;
}
body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-bag[data-page=bag] #close-equipment{
 position:absolute;inset:50% 0 auto auto;translate:0 -50%;width:40px;height:40px;padding:7px;
 background:#1b0e25;border:1px solid #d7ae60;border-radius:3px;box-shadow:inset 0 0 0 2px #130b18;
}
body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-bag[data-page=bag] .adventure-inventory{position:relative;z-index:2;margin-top:6px}
body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-bag[data-page=bag]>.equipment-footer{position:relative;z-index:2;margin:0!important;padding:0!important;border:0!important;height:16px;min-height:0;line-height:16px;white-space:nowrap;overflow:hidden;font-size:11px}
@media(max-width:600px) and (min-height:621px){
 body.adventure-hud #pui-bag-character-pair #equipment-dialog.pui-module.pui-bag[data-page=bag][open]{--bag-art-height:calc(var(--portrait-width)*1.194203)}
}
@media(max-height:620px),(max-width:600px){
 body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-bag[data-page=bag]>.equipment-header h2{font-size:17px!important}
 body.adventure-hud :is(#game,#pui-bag-character-pair) #equipment-dialog.pui-bag[data-page=bag] #close-equipment{width:30px;height:30px;padding:4px}
}
