/* Core player modules: complete gold frames, black surfaces, live DOM text. */
body .pui-character-window{position:fixed;inset:0;margin:auto;width:min(690px,calc(100vw - 24px));height:auto;max-width:none;max-height:calc(100dvh - 24px);padding:20px;border:3px double var(--pui-gold,#bd9654);border-radius:var(--pui-radius,6px);background:#000;color:var(--pui-text,#f7ead8);box-shadow:0 20px 65px #000b;overflow:auto;font-family:'Noto Sans Thai','Leelawadee UI',Tahoma,sans-serif;font-size:15px;line-height:1.6;scrollbar-width:thin;scrollbar-color:var(--pui-gold,#bd9654) #170c1e;overscroll-behavior:contain;box-sizing:border-box}
.pui-character-window[open]{display:flex;flex-direction:column}.pui-character-window [hidden]{display:none!important}
.pui-character-window::backdrop,.pui-character-pair::backdrop{background:#030104b8}
.pui-character-header{display:flex;align-items:center;gap:16px;padding:0 0 12px;margin:0;border-bottom:1px solid var(--pui-line,#735434);flex:none}.pui-character-header h2{flex:1;margin:0;font-size:24px;line-height:1.4;color:var(--pui-gold-light,#f4d795);text-wrap:balance}
.pui-character-close{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:8px;border:1px solid var(--pui-gold,#bd9654);border-radius:4px;background:#21102b;color:#f4d795;cursor:pointer}.pui-character-close svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.pui-character-close:hover{background:#551b44}
.pui-character-links{display:flex;flex-wrap:wrap;gap:6px;padding:12px 0 16px;flex:none}.pui-character-links button{min-height:38px;padding:5px 10px;border:1px solid #705338;border-radius:4px;background:#160c1e;color:#e9d7ec;font:inherit;font-size:13px;cursor:pointer}.pui-character-links button:hover{background:#341141;border-color:#c18bdc}
.pui-character-content{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain}.pui-character-window button:focus-visible,.pui-character-window input:focus-visible,.pui-character-window select:focus-visible{outline:2px solid #e0a8fa;outline-offset:3px}.pui-character-window button:disabled{color:#aa91ad;opacity:.7;cursor:default}.pui-character-window ::selection{background:#6c246f;color:#fff4db}.pui-character-window input{caret-color:#e0a8fa}
/* The pair shell has no border. Each child owns all four sides of its own frame. */
body #pui-character-pair{position:fixed;inset:0;margin:auto;padding:0;border:0;background:transparent;width:max-content;max-width:calc(100vw - 24px);height:calc(1456 * min(.60px,calc((100dvh - 24px)/1456),calc((100vw - 24px)/2100)));max-height:none;overflow:visible;box-shadow:none}
#pui-character-pair[open]{display:flex;align-items:stretch;gap:0}#pui-character-pair>dialog:not([open]){display:none!important}
body #pui-character-pair #character-frame-dialog{--cf-u:min(.60px,calc((100dvh - 24px)/1456),calc((100vw - 24px)/2100));position:relative;inset:auto;margin:0;flex:none;display:block;width:calc(1088 * var(--cf-u));height:calc(1456 * var(--cf-u));max-height:100%;box-shadow:none;overflow:hidden}
body #pui-character-pair #pui-character-info-dialog{position:relative;inset:auto;margin:0;flex:none;width:min(690px,calc(100vw - 24px - 1088 * min(.60px,calc((100dvh - 24px)/1456),calc((100vw - 24px)/2100))));height:100%;max-height:none;border-radius:0;padding:20px;box-shadow:none}
body #pui-character-pair[data-left-open=false] #pui-character-info-dialog{width:min(690px,calc(100vw - 24px))}
body #pui-character-pair[data-right-open=false]{height:auto}
/* Display-only sheet retains real totals, breakdowns, buffs and equipment labels. */
.pui-character-info #adventure-character-info{display:flex;flex-direction:column;gap:20px;margin:0;padding:0;color:#f7ead8;overflow:visible}.pui-character-info .cs-column{display:contents}.pui-character-info .cs-card{border:0;border-radius:0;padding:0 0 16px;background:none;box-shadow:none;border-bottom:1px solid #674b35}.pui-character-info .cs-card-title{font-size:18px;color:#f4d795;margin:0 0 10px}.pui-character-info .cs-row{font-size:14px;border-color:#382a3b;padding:6px 0}.pui-character-info .cs-row dt,.pui-character-info .cs-row dd small,.pui-character-info .cs-vital-label,.pui-character-info .cs-slot-label,.pui-character-info .cs-xp small,.pui-character-info .cs-help,.pui-character-info .cs-attr-points{color:#ceb7d4}.pui-character-info .cs-row dd,.pui-character-info .cs-profile-name,.pui-character-info .cs-slot-name{color:#fff1db}.pui-character-info .cs-profile-level{color:#f4d795}.pui-character-info .cs-slot-empty .cs-slot-name{color:#b6a0ba}.pui-character-info .cs-chip,.pui-character-info .cs-buff{background:#24162b;color:#e2cce8;border-color:#795382;border-radius:4px;white-space:normal}.pui-character-info .cs-buff i{color:#dcc899}.pui-character-info .cs-bar{background:#29152f;border-color:#5f4269}.pui-character-info .cs-bar>i{background:#8d57ae}.pui-character-info .cs-vital-health .cs-bar>i{background:#b73755}.pui-character-info .cs-vital-mana .cs-bar>i{background:#7854c2}.pui-character-info .cs-vital-stamina .cs-bar>i{background:#c6a04a}.pui-character-info .cs-vital-load .cs-bar>i{background:#917658}.pui-character-info .cs-slot{border-color:#382a3b}.pui-character-info .cs-slot-icon{background:#24152b;color:#cbae7d}.pui-character-info .cs-help summary{color:#e4c494}
.pui-character-info .cs-breakdown-table{font-size:12px}.pui-character-info .cs-breakdown-table th,.pui-character-info .cs-breakdown-table td{border-color:#382a3b;white-space:normal}.pui-character-info .cs-breakdown-table thead th,.pui-character-info .cs-breakdown-table th:first-child{color:#cfb7d5}.pui-character-info .cs-breakdown-table .cs-col-total{color:#fff1db}.pui-character-info .cs-breakdown-table td.cs-zero{color:#907f94}.pui-character-info .cs-breakdown-table td.cs-col-other:not(.cs-zero){color:#e3c695}.pui-character-info .cs-breakdown-table td:not(.cs-col-total)::before{color:#ceb7d4}
.pui-character-record{padding:16px 0 0}.pui-character-record h3{margin:0 0 8px;color:#f4d795;font-size:18px}.pui-character-record dl{margin:0}.pui-character-record dl>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid #382a3b}.pui-character-record dt{color:#ceb7d4}.pui-character-record dd{margin:0;font-variant-numeric:tabular-nums}
.pui-record-since{color:#ceb7d4;font-size:13px}.pui-record-species{list-style:none;margin:14px 0 0;padding:0}.pui-record-species li{display:flex;justify-content:space-between;gap:12px;padding:5px 0}.pui-record-species b{font-weight:500;font-variant-numeric:tabular-nums}
/* Shared frame art remains reusable; content backgrounds are solid black. */
body .pui-module.pui-window.pui-character-window,body .pui-module.pui-window.pui-bag,body .pui-module.pui-popover.pui-bag-details,body .pui-module.pui-window.pui-character-pets,body .pui-module.pui-panel.pui-character-motions{background:#000!important}
body .pui-module.pui-window.pui-character-window,body .pui-module.pui-window.pui-bag,body .pui-module.pui-window.pui-character-pets{border-image-slice:30!important}
/* Attributes are moved as original nodes, including pending points and server actions. */
.pui-character-stats .adventure-stat-right{position:static;display:block;margin:0;padding:0;width:auto;overflow:visible}.pui-character-stats .adventure-attributes,.pui-character-stats .adventure-builds{padding:0;background:none;border:0;box-shadow:none;color:#f7ead8}.pui-character-stats .adventure-attributes>header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;background:none;padding:0 0 18px;color:#d9c2df}.pui-character-stats .adventure-attributes>header h2{display:none}.pui-character-stats .adventure-attributes>header>span{font-size:16px;color:#d9c2df}.pui-character-stats .adventure-attributes>header b{color:#f5dc9e}.pui-character-stats .adventure-attributes>header button{margin-left:auto;min-height:40px;background:#241129;border:1px solid #ae8553;color:#ead1de;font:inherit;padding:5px 10px}
.pui-character-stats .adventure-attribute{position:static;display:grid;grid-template-columns:38px 1fr auto auto;gap:6px 12px;align-items:center;padding:16px 0;border:0;border-bottom:1px solid #624337;background:none;color:#f7ead8}.pui-character-stats .adventure-attribute>strong{font-size:17px;color:#f3d79b}.pui-character-stats .adventure-attribute>span:not(.attribute-effect){font-size:14px;color:#d0bcd6}.pui-character-stats .adventure-attribute>b{font-size:18px;color:#fff1da}.pui-character-stats .attribute-effect,.pui-character-stats .adventure-attribute>small{grid-column:2/-1;color:#d0bcd6;font-size:13px}.pui-character-stats .attribute-controls{display:flex;gap:8px}.pui-character-stats .attribute-step{width:40px;height:40px;background:#311339;border:1px solid #9f7865;color:#f7dfb4;font-size:22px;border-radius:4px}.pui-character-stats .adventure-attribute-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:18px 0 0}.pui-character-stats .attribute-message{flex:1 1 100%;color:#d1b9d7}.pui-character-stats .attribute-message.bad{color:#f4a1b1}.pui-character-stats .attribute-confirm,.pui-character-stats .attribute-cancel{font:inherit;min-height:44px;padding:7px 18px;background:#441746;border:1px solid #be9862;color:#ffe6bd}.pui-character-stats .adventure-stat-note{color:#d1b9d7;font-size:13px}.pui-character-stats .adventure-builds{margin-top:26px;padding-top:16px;border-top:1px solid #624337}.pui-character-stats .adventure-builds h3{font-size:16px;color:#f2d6a0}.pui-character-stats .adventure-builds h3 small{color:#d1b9d7}.pui-character-stats .adventure-builds>div{display:flex;gap:16px;flex-wrap:wrap}.pui-character-stats .adventure-builds>div>span{background:none;border:0;color:#dbc5e0}.pui-character-stats .adventure-builds b{color:#f1d5a0}.pui-character-stats .adventure-builds small{color:#d1b9d7}
.pui-character-profession #adventure-profession{display:block;padding:0;margin:0;background:none;border:0;overflow:visible;color:#f7ead8}.pui-character-profession .adventure-profession-header{background:none;border:0;padding:0 0 18px}.pui-character-profession .adventure-profession-header h2{color:#f4d795;font-size:26px}.pui-character-profession .adventure-profession-header p{color:#d2bcd8}.pui-character-profession .adventure-profession-description,.pui-character-profession .adventure-profession-guidance,.pui-character-profession .adventure-profession-rule{color:#d2bcd8;line-height:1.7}.pui-character-profession .adventure-profession-benefits{border:0;background:none;padding:18px 0}.pui-character-profession .adventure-profession-benefits h3{color:#f4d795}.pui-character-profession .adventure-profession-benefits dl>div{border-color:#654635;color:#eddbef}.pui-character-profession .adventure-profession-benefits dt{color:#d2bcd8}.pui-character-profession .adventure-profession-benefits dd{color:#f7dfb4}
.pui-character-achievements #adventure-achievements,.pui-character-titles #adventure-titles{display:block;position:static;margin:0;padding:0;overflow:visible;background:none;color:#f7ead8}.pui-character-achievements .achievement-card,.pui-character-titles .title-row{background:#160d1d;border:1px solid #63432f;color:#f7ead8;box-shadow:none;border-radius:5px}.pui-character-achievements .achievement-name,.pui-character-titles .title-name{color:#f4d795}.pui-character-achievements .achievement-description,.pui-character-achievements .achievement-condition,.pui-character-achievements .achievement-count,.pui-character-titles .title-description{color:#d3bdd9}.pui-character-achievements .achievement-filter,.pui-character-titles .title-use,.pui-character-achievements .achievement-claim{background:#32143a;border:1px solid #a78050;color:#f7e5cc;min-height:40px}.pui-character-achievements .achievement-filter.active{background:#5a205e;color:#ffecc8}.pui-character-achievements .achievement-chip{background:#25142b;border-color:#7c575e;color:#ebd2de}.pui-character-titles .title-row.is-shown{border-color:#cc9e56;background:#29142c}.pui-character-unavailable{color:#d7bfdc}
/* Bag is its own 8 × 6 desktop module; the character and fixed details columns are absent. */
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]{position:fixed;inset:0;margin:auto;width:min(860px,calc(100vw - 24px));height:auto;max-height:calc(100dvh - 24px);max-width:none;transform:none;padding:20px;border:3px double var(--pui-gold,#bd9654);border-radius:var(--pui-radius,6px);background:#000;color:#f7ead8;box-shadow:0 20px 65px #000b;overflow:auto;box-sizing:border-box}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]::backdrop{background:#030104b8;backdrop-filter:none}
body.adventure-hud #equipment-dialog.pui-bag .equipment-header{position:relative;inset:auto;display:flex;align-items:center;gap:14px;width:auto;height:auto;padding:0 0 12px;margin:0;border-bottom:1px solid #735434;z-index:auto}.pui-bag .equipment-header h2{font-size:26px!important;line-height:1.4!important;color:#f4d795!important;margin:0!important;flex:1}
body.adventure-hud #equipment-dialog.pui-bag #close-equipment{position:static;width:44px;height:44px;clip-path:none;border:1px solid #bd9654;border-radius:4px;box-shadow:none;padding:8px;background:#21102b}.pui-bag #close-equipment .adventure-icon{width:24px!important;height:24px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-inventory{position:static;inset:auto;display:block;height:auto;min-height:0;padding:0;margin:16px 0 0;overflow:visible}.pui-bag .adventure-inventory>.adventure-categories,.pui-bag .adventure-inventory>.adventure-stage,.pui-bag .adventure-inventory>#adventure-item-details{display:none!important}.pui-bag .bag-help,.pui-bag .bag-help-panel{display:none!important}
body.adventure-hud #equipment-dialog.pui-bag .adventure-bag-grid{display:flex;flex-direction:column;margin:0;padding:0;overflow:visible;border:0;background:none;min-width:0}.pui-bag .adventure-grid-tabs{position:static;display:flex!important;height:auto!important;min-height:0!important;flex-wrap:wrap;gap:6px!important;padding:0 0 12px;margin:0!important;overflow:visible!important;border:0!important}.pui-bag .bag-top-tab{flex:1 1 auto;height:42px;min-height:42px;padding:5px 10px;border:1px solid #725339;border-radius:4px;clip-path:none;background:#160c1e;color:#ead5ed;font-size:14px;box-shadow:none}.pui-bag .bag-top-tab.active{background:#501b5a;border-color:#cc8ede;clip-path:none;box-shadow:none;color:#fff0d9}.pui-bag .bag-top-tab .adventure-icon{width:23px;height:23px}
body.adventure-hud #equipment-dialog.pui-bag .adventure-search{position:relative;height:auto;min-height:44px;margin:0 0 14px;gap:12px;display:flex;align-items:center}.pui-bag .adventure-search input{height:44px!important;padding:8px 12px 8px 40px!important;min-width:0;width:100%;font-size:15px!important;background:#140c1b!important;color:#f5e6da!important;border:1px solid #8d6a43!important;border-radius:4px!important}.pui-bag .adventure-search>.adventure-icon{position:absolute;left:0;margin-left:10px!important;width:20px!important;height:20px!important}.pui-bag .adventure-search>span{font-size:14px!important;min-width:70px!important;white-space:nowrap;font-variant-numeric:tabular-nums}
body.adventure-hud #equipment-dialog.pui-bag #adventure-item-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-auto-rows:auto;gap:8px;padding:0;margin:0;overflow:visible;align-content:start;flex:none;width:100%}.pui-bag .adventure-grid-item,.pui-bag .adventure-grid-empty{position:relative;height:auto!important;aspect-ratio:1!important;min-height:0!important;border:1px solid #997341!important;border-radius:4px!important;background:#190e20!important;box-shadow:none!important;clip-path:none!important;overflow:hidden}.pui-bag .adventure-grid-empty{opacity:1!important;background:#0c080e!important;border-color:#56412b!important}.pui-bag .adventure-grid-empty::before{content:none!important}.pui-bag .adventure-grid-item.selected{outline:2px solid #d08ee6!important;outline-offset:-3px!important;filter:none!important}.pui-bag .adventure-grid-item:hover{background:#351443!important}.pui-bag .adventure-grid-item img{width:86%!important;height:86%!important;max-width:86%!important;max-height:86%!important}.pui-bag .adventure-grid-item>span{font-size:14px!important;right:5px!important;bottom:2px!important;color:#fff1dc!important}.pui-bag .adventure-grid-item:focus-visible{outline:3px solid #e0a8fa!important;outline-offset:2px!important}.pui-bag .adventure-empty-note{display:block!important;min-height:0!important;margin:12px 0 0!important;font-size:13px!important;color:#cdb5d3!important;line-height:1.5!important;text-align:left!important}
.pui-bag .bag-potion-disclosure{position:static!important;margin:14px 0 0!important;padding:10px 12px!important;background:#140b1b!important;border:1px solid #614730!important;color:#e7cee8!important;max-height:none!important;overflow:visible!important}.pui-bag .bag-potion-disclosure>summary{font-size:15px!important;min-height:34px;cursor:pointer}.pui-bag .auto-potion{height:auto!important;min-height:0!important;display:flex!important;flex-direction:column;gap:8px!important;border:0!important;background:none!important;padding:8px 0!important;margin:0!important;font-size:14px!important}.pui-bag .auto-potion-head{flex-wrap:wrap!important}.pui-bag .auto-potion-head h3{display:none!important}.pui-bag .auto-potion-row{flex-wrap:wrap!important;gap:10px!important}.pui-bag .auto-potion-switch{font-size:14px!important}.pui-bag .auto-potion select{width:auto!important;min-width:120px!important;min-height:40px!important;font-size:14px!important;background:#1c1023!important;color:#eee0eb!important}.pui-bag .auto-potion-threshold output{font-size:15px!important;min-width:55px!important}.pui-bag .auto-potion-threshold button{width:36px!important;height:36px!important;font-size:20px!important}.pui-bag .auto-potion-status{font-size:12px!important;color:#ccb5d4!important}
body #pui-bag-details-dialog{width:min(450px,calc(100vw - 24px))}.pui-bag-details #adventure-item-details{position:static;display:block;width:auto;min-height:0;max-height:none;padding:16px 0 0;border:0;background:none;color:#f7ead8;overflow:visible;box-shadow:none}.pui-bag-details .adventure-detail-head{position:static;display:flex;gap:15px;padding:0 0 14px}.pui-bag-details .adventure-item-art{flex:none;width:86px;height:90px;background:#24142b;border:1px solid #98713e;border-radius:4px}.pui-bag-details .adventure-item-art img{max-width:90%;max-height:90%;object-fit:contain}.pui-bag-details .adventure-detail-head h3{font-size:21px;color:#f5d8a0;line-height:1.5;margin:0}.pui-bag-details .adventure-detail-head p,.pui-bag-details .adventure-description{color:#d2bad9;font-size:14px;line-height:1.7;position:static}.pui-bag-details .adventure-item-stats>div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid #463044;font-size:14px}.pui-bag-details dt{color:#cfb4d7}.pui-bag-details dd{color:#ffecd0;margin:0;text-align:right;font-variant-numeric:tabular-nums}.pui-bag-details .bag-section-title{font-size:17px;color:#f4d795}.pui-bag-details .bag-refine-line{font-size:14px;color:#d8bcde}.pui-bag-details .adventure-detail-actions{position:static;display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:18px 0 0;background:none}.pui-bag-details .adventure-primary{min-height:44px;padding:8px 14px;font:inherit;font-size:15px;border:1px solid #b68c50;border-radius:4px;background:#491747;color:#ffe4c8}.pui-bag-details .adventure-equipped-status{color:#d9c3e0;font-size:13px}.pui-bag-details .item-compare{color:#ead7ed;background:#160d1b;border-color:#745546}.pui-bag-details .adventure-rarity{background:#36253a;color:#f3deea;font-size:12px;border-radius:4px}
/* Pet ownership/actions and motion feature gate are unchanged. */
body #pet-dialog.pui-character-pets{background:#000;border:3px double #bd9654;color:#f7ead8}.pui-character-pets .pet-frame{background:#000;border:0;box-shadow:none}.pui-character-pets .pet-header{background:none;border-color:#735434;color:#f4d795}.pui-character-pets .pet-sign h2{color:#f4d795}.pui-character-pets .pet-sign small,.pui-character-pets .pet-stat,.pui-character-pets .pet-species{color:#d2bad9}.pui-character-pets .pet-tabs button{background:#190e20;color:#e7d0ec;border-color:#6d5034}.pui-character-pets .pet-tabs button[aria-pressed=true]{background:#50205d;color:#ffebd3}.pui-character-pets .pet-card,.pui-character-pets .pet-choice,.pui-character-pets .pet-abilities{background:#160d1d;border-color:#745334;color:#f7ead8;box-shadow:none}.pui-character-pets .pet-card h3,.pui-character-pets .pet-choice strong{color:#f4d795}.pui-character-pets .pet-primary{background:#501d55;border-color:#bb925a;color:#ffe6cb}.pui-character-pets .pet-secondary{background:#21132b;color:#e9d3ee;border-color:#8d6446}.pui-character-motions{background:#000!important;color:#f7ead8!important;border:3px double #bd9654!important}.pui-character-motions .motion-sets-tab,.pui-character-motions .motion-sets-move{background:#1d1025;color:#ead4ee;border-color:#725338}.pui-character-motions .motion-sets-tab[aria-pressed=true]{background:#4b1a58;border-color:#cd8edd}.pui-character-motions .motion-sets-group{color:#f4d795}.pui-character-motions .motion-sets-note,.pui-character-motions .motion-sets-status{color:#d4bddb}
@media(max-width:700px){body #pui-character-pair{height:calc(100dvh - 16px);max-width:calc(100vw - 16px);width:calc(100vw - 16px);overflow-y:auto;overscroll-behavior:contain}#pui-character-pair[open]{flex-direction:column;align-items:center}body #pui-character-pair #character-frame-dialog{--cf-u:min(.48px,calc((100vw - 16px)/1088));flex:none;max-height:none}body #pui-character-pair #pui-character-info-dialog{width:100%;height:auto;max-height:none;min-height:60dvh;flex:none;padding:16px}.pui-character-info .cs-breakdown-table td:not(.cs-col-total){background:#26182e!important;color:#e7d0ed!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]{padding:14px;max-height:calc(100dvh - 16px);width:calc(100vw - 16px)}body.adventure-hud #equipment-dialog.pui-bag #adventure-item-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.pui-bag .bag-top-tab{font-size:12px;padding:4px 7px;gap:4px}.pui-bag .bag-top-tab .adventure-icon{width:18px;height:18px}.pui-character-header h2{font-size:22px}.pui-character-window{padding:16px}.pui-character-stats .adventure-attribute{grid-template-columns:30px 1fr auto;gap:8px}.pui-character-stats .attribute-controls{grid-column:3;grid-row:1/3}.pui-character-stats .adventure-attribute>b{grid-column:2}.pui-character-stats .attribute-effect{grid-column:2/-1}}
@media(max-height:620px) and (min-width:701px){body #pui-character-pair{height:calc(100dvh - 16px);max-width:calc(100vw - 16px)}body #pui-character-pair #character-frame-dialog{--cf-u:1px;width:48vw;height:100%;display:block;border-image-width:46px 25px 36px;border-radius:0}.pui-paired-character .cf-left{left:22px}.pui-paired-character .cf-right{right:22px}.pui-paired-character .cf-slot{width:90px;grid-template-columns:33px 1fr;column-gap:3px}.pui-paired-character .cf-preview{width:180px;left:calc(50% - 90px)}.pui-paired-character .cf-pedestal{width:180px;left:calc(50% - 90px)}.pui-paired-character .cf-name{left:115px;right:115px;font-size:12px}.pui-paired-character .cf-close{right:24px}.pui-paired-character .cf-caption{display:none}.pui-paired-character .cf-rotation{left:calc(50% - 60px);right:calc(50% - 60px)}body #pui-character-pair #pui-character-info-dialog{width:48vw;padding:14px}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]{max-height:calc(100dvh - 16px);padding:14px;width:min(760px,calc(100vw - 16px))}.pui-bag .adventure-grid-item,.pui-bag .adventure-grid-empty{min-height:52px!important}}
@media(prefers-reduced-motion:reduce){.pui-character-window *,.pui-bag *,.pui-character-pair *{animation:none!important;transition:none!important}}
/* The approved landscape bag and shop use the same desktop module dimensions. */
@media(min-width:1101px) and (min-height:621px){body.adventure-hud #equipment-dialog.pui-module.pui-bag[data-page=bag][open]{width:min(1420px,calc(100vw - 32px));height:min(824px,calc(100dvh - 32px))}}
/* Scoped overrides beat the retired scaled-artboard compact rules. The bag owns
   its flex height, so category controls and footer never consume the item area. */
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag][open]{display:flex;flex-direction:column;height:min(850px,calc(100dvh - 24px));overflow:hidden}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .equipment-header{flex:none}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-inventory{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-bag-grid{flex:1;min-height:0;overflow:hidden}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-grid-tabs{flex:none;display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;height:42px!important;min-height:42px!important;padding:0;margin:0 0 12px!important;gap:6px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-top-tab{flex:1 0 auto!important;width:auto!important;min-width:0!important;height:40px!important;min-height:40px!important;font-size:14px!important;line-height:1.4!important;padding:5px 10px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-top-tab .adventure-icon{display:inline-block!important;width:20px!important;height:20px!important;flex:none}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-search{flex:none;height:44px!important;min-height:44px!important;margin-bottom:12px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-search input{height:44px!important;min-height:44px!important;max-height:44px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .auto-potion select{height:40px!important;min-height:40px!important;max-height:40px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] #adventure-item-grid{flex:1;min-height:0;overflow:auto;grid-template-rows:repeat(6,minmax(44px,1fr));grid-auto-rows:70px;gap:6px}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-grid-item,body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-grid-empty{aspect-ratio:auto!important;min-height:44px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-empty-note{flex:none;max-height:none!important;padding:0!important;font-size:12px!important;margin:8px 0 0!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-potion-disclosure{display:block;flex:none;margin:10px 0 0!important;padding:6px 10px!important;max-height:210px!important;overflow:auto!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-potion-disclosure>summary{display:flex!important;align-items:center;justify-content:space-between;min-height:34px!important;padding:0!important;font-size:14px!important;line-height:1.5!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-potion-disclosure>summary::after{font-size:20px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .auto-potion-track{width:52px!important;height:28px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .auto-potion-track::after{width:20px!important;height:20px!important;left:3px!important;top:3px!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .auto-potion-switch input:checked+.auto-potion-track::after{transform:translateX(24px)!important}
body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]>.equipment-footer{position:static;inset:auto;display:flex!important;flex:none;flex-wrap:wrap;gap:4px 16px;margin:12px 0 0;padding:8px 0 0;border-top:1px solid #735434;background:none;color:#cdb7d3;font-size:12px;line-height:1.5}
.pui-bag-burden{color:#f1d6a3;font-variant-numeric:tabular-nums}.pui-bag-burden[data-over=true]{color:#f5a6b6}
body #pui-character-menu-dialog{width:min(320px,calc(100vw - 24px));padding:16px}.pui-character-menu-list{display:grid;grid-template-columns:1fr;gap:5px;padding-top:12px}.pui-character-menu-list button{min-height:40px;text-align:left;padding:7px 12px;background:#1c1026;color:#ecdae9;border:1px solid #745333;font:inherit}.pui-character-menu-list button:hover:not(:disabled){background:#4b1b56}.pui-character-menu-list [hidden]{display:none!important}
body #adventure-navigation .pui-character-menu-launcher{flex:none;min-width:30px;width:30px;max-width:30px;min-height:36px;padding:5px;background:#21102c;color:#f3d591;border:1px solid #977044;border-radius:4px}.pui-character-menu-launcher svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:700px){body.adventure-hud #equipment-dialog.pui-bag[data-page=bag][open]{height:calc(100dvh - 16px)}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] #adventure-item-grid{grid-template-rows:repeat(8,minmax(44px,1fr));grid-auto-rows:60px}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-top-tab{font-size:12px!important;padding:4px 7px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-top-tab .adventure-icon{display:none!important}}
@media(max-height:620px){body.adventure-hud #equipment-dialog.pui-bag[data-page=bag][open]{height:calc(100dvh - 16px);padding:10px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .equipment-header{padding-bottom:6px}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .equipment-header h2{font-size:22px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-inventory{margin-top:8px}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-grid-tabs{height:36px!important;min-height:36px!important;margin-bottom:6px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-top-tab{height:34px!important;min-height:34px!important;font-size:13px!important;padding:4px 8px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-top-tab .adventure-icon{display:none!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-search{height:36px!important;min-height:36px!important;margin-bottom:6px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-search input{height:36px!important;min-height:36px!important;max-height:36px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] #adventure-item-grid{grid-template-rows:none;grid-auto-rows:52px}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .bag-potion-disclosure{margin-top:6px!important;padding:2px 8px!important;max-height:110px!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag] .adventure-empty-note{display:none!important}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]>.equipment-footer{margin-top:6px;padding-top:4px;font-size:11px}body.adventure-hud #equipment-dialog.pui-bag[data-page=bag]>.equipment-footer small{display:none}}
/* 2026-10-12 pair-close: a window closed inside the pair stays as an invisible, unclickable placeholder of its own size,
   so the window that stays open keeps its exact place (the pair used to re-centre it). The width/height rules for a
   single open window are cancelled for the same reason. Closing both still closes the pair. */
#pui-character-pair[open]>dialog:not([open]){display:block!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}
body #pui-character-pair[open][data-left-open=false] #pui-character-info-dialog{width:min(690px,calc(100vw - 24px - 1088 * min(.60px,calc((100dvh - 24px)/1456),calc((100vw - 24px)/2100))))}
body #pui-character-pair[open][data-right-open=false]{height:calc(1456 * min(.60px,calc((100dvh - 24px)/1456),calc((100vw - 24px)/2100)))}
