/* Surface addon: preserve the approved alpha gold frame and native character layers. */
body #character-frame-dialog,
body #pui-character-pair #character-frame-dialog,
body #pui-character-bag-pair #character-frame-dialog{
 background:transparent!important;
 box-shadow:none!important;
}
/* The polygon follows the straight manufactured inner rails of the approved frame.
   Outside that opening, no backplate is painted. Pedestal/canvas/frame remain z1/z2/z4. */
#character-frame-dialog>.cf-scene{
 position:absolute;
 inset:0;
 z-index:0;
 pointer-events:none;
 background:linear-gradient(#20112a18,#20112a30),url('/assets/ui/player-surfaces-v1/royal-hall.webp') center/cover no-repeat;
 clip-path:polygon(7% 8.5%,93% 8.5%,93% 77%,91.7% 83%,88% 88%,82.5% 92%,17.5% 92%,12% 88%,8.3% 83%,7% 77%);
}
#character-frame-dialog>.cf-name{
 background:#20132ded;
 color:#fff5df;
 border-bottom-color:#bf9757;
 text-shadow:0 1px 2px #08050d;
}
#character-frame-dialog>.cf-caption{
 padding:2px 6px;
 background:#20132ded;
 color:#f6e4bf;
}
/* Scoped character/commerce windows use a quieter lit texture for readable live text.
   padding-box and slices WITHOUT fill let the game show through the frame's outer corners. */
body .pui-module.pui-window.pui-surface-royal,
body .pui-module.pui-popover.pui-surface-royal{
 background:linear-gradient(#21132bea,#21132bee),url('/assets/ui/player-surfaces-v1/royal-hall.webp') center/cover no-repeat!important;
 background-clip:padding-box!important;
 border-image-slice:70!important;
 box-shadow:none!important;
}
body .pui-module.pui-window.pui-character-window.pui-surface-royal,
body .pui-module.pui-window.pui-bag.pui-surface-royal,
body .pui-module.pui-window.pui-character-pets.pui-surface-royal{
 border-image-slice:30!important;
}
/* A native dialog remains hidden while closed, including short touch displays. */
body #character-frame-dialog:not([open]){display:none!important}
