/* Reference inventory artwork and live inventory controls share the same artboard. */
body.adventure-hud #equipment-dialog[data-page="bag"]{--bag-ink:#f9efdd;--bag-muted:#c4baca;position:fixed;left:50%;top:50%;right:auto;bottom:auto;inset:auto;margin:0;width:1672px;height:941px;max-width:none;max-height:none;padding:0;border:0;border-radius:0;background:url('../assets/ui/bag-reference-v2/frame.37c4d10c3079.webp') center/100% 100% no-repeat;color:var(--bag-ink);box-shadow:none;overflow:visible;transform:translate(-50%,-50%) scale(var(--bag-scale,1));transform-origin:center;font-family:'Noto Sans Thai','Leelawadee UI',Tahoma,sans-serif}
body.adventure-hud #equipment-dialog[data-page="bag"]{left:50%;top:50%}
body.adventure-hud #equipment-dialog[data-page="bag"]::before,#equipment-dialog[data-page="bag"] .equipment-header h2::after{content:none;display:none;background:none}
body.adventure-hud #equipment-dialog[data-page="bag"]::backdrop{background:#08071338;backdrop-filter:blur(5px)}
#equipment-dialog[data-page="bag"] [hidden]{display:none!important}
#equipment-dialog[data-page="bag"] .equipment-header{position:absolute;top:55px;left:225px;right:52px;width:auto;height:75px;background:none;border:0;border-radius:0;box-shadow:none;padding:0;z-index:5}
#equipment-dialog[data-page="bag"] .equipment-header:after,#equipment-dialog[data-page="bag"] .adventure-title-bag{display:none}
#equipment-dialog[data-page="bag"] .equipment-header h2{display:block;margin:0;font-size:calc(44px * var(--bag-text,1));line-height:75px;color:#ffe7ae;font-weight:600;text-shadow:0 2px 5px #0008}
body.adventure-hud #equipment-dialog[data-page="bag"] #close-equipment{position:absolute;top:-9px;right:0;width:81px;height:80px;border:0;background:#161422;color:#ffe4a4;box-shadow:inset 0 0 0 2px #d6a861,inset 0 0 0 6px #28202c;clip-path:polygon(15% 0,85% 0,100% 15%,100% 85%,85% 100%,15% 100%,0 85%,0 15%);border-radius:0}
#equipment-dialog[data-page="bag"] #close-equipment .adventure-icon{width:48px;height:48px}
#equipment-dialog[data-page="bag"]>.adventure-navigation,#equipment-dialog[data-page="bag"]>.character,#equipment-dialog[data-page="bag"]>.equipment-footer{display:none!important}
#equipment-dialog[data-page="bag"] .adventure-inventory{position:absolute;inset:146px 44px 80px 49px;display:grid;grid-template-columns:193px 357px 610px 419px;height:auto;padding:0;gap:0;min-height:0}
#equipment-dialog[data-page="bag"] .adventure-categories{display:flex;flex-direction:column;gap:10px;padding:11px 9px 0 0;background:none;border:0;overflow:visible}
#equipment-dialog[data-page="bag"] .adventure-categories button{position:relative;height:72px;min-height:72px;flex:none;padding:0 19px;gap:18px;justify-content:flex-start;border:0;border-bottom:1px solid #65516c55;border-radius:0;background:none;box-shadow:none;color:#f5eafa;font-size:calc(23px * var(--bag-text,1));font-weight:400;white-space:nowrap;clip-path:polygon(6% 0,94% 0,100% 14%,100% 86%,94% 100%,6% 100%,0 86%,0 14%)}
#equipment-dialog[data-page="bag"] .adventure-categories button.active{background:linear-gradient(110deg,#591065,#2b1039);box-shadow:inset 0 0 0 2px #e98ee6,inset 0 0 0 5px #70297d;color:#fff3db;filter:drop-shadow(0 1px 7px #c461e455)}
#equipment-dialog[data-page="bag"] .adventure-icon{stroke:#f6d797;fill:#f6d797;fill-opacity:.22;stroke-width:1.7}
#equipment-dialog[data-page="bag"] .adventure-categories .adventure-icon{width:43px;height:43px;flex:none}
#equipment-dialog[data-page="bag"] .adventure-stage{padding:0;background:none;display:block;min-height:0;overflow:visible}
#equipment-dialog[data-page="bag"] .equipment-character{display:block;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;background:none;border:0;box-shadow:none}
#equipment-dialog[data-page="bag"] .equipment-character strong{position:absolute;top:57px;left:0;right:0;display:block;text-align:center;font-size:calc(23px * var(--bag-text,1));color:#fff0d4;font-weight:400}
#equipment-dialog[data-page="bag"] .equipment-character strong:before{content:'';display:inline-block;width:22px;height:17px;margin-right:10px;background:#f6d797;clip-path:polygon(0 0,25% 40%,50% 0,75% 40%,100% 0,85% 100%,15% 100%)}
#equipment-dialog[data-page="bag"] .equipment-character canvas{position:absolute;left:0;top:70px;width:357px!important;height:560px!important;max-width:none!important;max-height:none!important;aspect-ratio:auto;filter:drop-shadow(0 7px 6px #07040c99)}
#equipment-dialog[data-page="bag"] #equipment-preview{display:none}
#equipment-dialog[data-page="character"] .bag-reference-preview,#equipment-dialog[data-page="character"] .bag-stage-title,#equipment-dialog[data-page="character"] .bag-rotate,#equipment-dialog[data-page="character"] .bag-slot-placeholder,#equipment-dialog[data-page="character"] .bag-help,#equipment-dialog[data-page="character"] .bag-help-panel{display:none!important}
#equipment-dialog[data-page="bag"] .equipment-character small,#equipment-dialog[data-page="bag"] .adventure-stage-caption{display:none}
.bag-stage-title{position:absolute;left:0;right:0;top:11px;margin:0;text-align:center;font-size:calc(29px * var(--bag-text,1));font-weight:500;color:#f6d797}
.bag-stage-title:after{content:'';display:block;width:65%;height:1px;margin:5px auto 0;background:#ceab6a}
#equipment-dialog[data-page="bag"] .adventure-wear-slots{display:block;position:absolute;inset:0;pointer-events:none}
#equipment-dialog[data-page="bag"] .adventure-wear-slot,#equipment-dialog[data-page="bag"] .bag-slot-placeholder{position:absolute;width:74px;height:88px;margin:0;border:0;border-radius:0;background:url('../assets/ui/bag-reference-v2/cell.svg') center/100% 100%;display:grid;place-items:center;color:#726c7e;box-shadow:none;pointer-events:auto}
#equipment-dialog[data-page="bag"] .adventure-wear-slot .adventure-icon,#equipment-dialog[data-page="bag"] .bag-slot-placeholder svg{width:42px;height:42px;opacity:.5}
#equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="head"]{left:15px;top:135px}
#equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="body"]{left:15px;top:230px}
#equipment-dialog[data-page="bag"] .bag-slot-placeholder[data-slot="legs"]{left:15px;top:325px}
#equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="feet"]{left:15px;top:420px}
#equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="weapon"]{right:15px;top:135px}
#equipment-dialog[data-page="bag"] .bag-slot-placeholder[data-slot="neck"]{right:15px;top:230px}
#equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="bag"]{right:15px;top:325px}
#equipment-dialog[data-page="bag"] .bag-slot-placeholder[data-slot="ring"]{right:15px;top:420px}
#equipment-dialog[data-page="bag"] .adventure-wear-slot.equipped{filter:drop-shadow(0 0 2px #e9c27899)}
#equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="weapon"].equipped{box-shadow:inset 0 0 0 2px #eaa2ee;filter:drop-shadow(0 0 6px #ca65d488)}
#equipment-dialog[data-page="bag"] .adventure-wear-slot img{max-width:90%;max-height:90%;object-fit:contain}
.bag-rotate{position:absolute;bottom:18px;left:78px;right:78px;display:flex;justify-content:space-between}
.bag-rotate button{width:66px;height:52px;background:linear-gradient(#221926,#110e19);border:1px solid #b58d53;clip-path:polygon(18% 0,82% 0,100% 50%,82% 100%,18% 100%,0 50%);color:#f8dda0;font-size:calc(40px * var(--bag-text,1));line-height:1}
#equipment-dialog[data-page="bag"] .adventure-bag-grid{padding:0 12px 0 8px;border:0;min-height:0}
#equipment-dialog[data-page="bag"] .adventure-grid-tabs{height:58px;min-height:58px;margin:0 0 9px;justify-content:flex-start;gap:0;border-bottom:1px solid #62566b66;color:#f8ecdf;overflow:hidden}
#equipment-dialog[data-page="bag"] .adventure-grid-tabs>span{display:none}
.bag-top-tab{height:52px;min-width:0;flex:1;border:0;border-right:1px solid #64556855;background:none;color:#f6ebde;display:flex;gap:7px;align-items:center;justify-content:center;font:400 17px 'Noto Sans Thai',sans-serif;padding:0 4px;white-space:nowrap}
.bag-top-tab .adventure-icon{width:30px;height:30px;flex:none}
.bag-top-tab.active{background:linear-gradient(#612390,#321043);box-shadow:inset 0 0 0 2px #b870f0,inset 0 0 0 5px #43145d;clip-path:polygon(7% 0,93% 0,100% 14%,100% 86%,93% 100%,7% 100%,0 86%,0 14%)}
#equipment-dialog[data-page="bag"] .adventure-search{height:46px;min-height:46px;gap:13px;margin:0 0 12px}
#equipment-dialog[data-page="bag"] .adventure-search input{height:44px;font-size:calc(20px * var(--bag-text,1));border:1px solid #cbaa67;border-radius:0;background:#11131ed9;color:#f9eddf;padding:6px 8px 6px 48px;caret-color:#e5b3ff;box-shadow:none}
#equipment-dialog[data-page="bag"] .adventure-search input::placeholder{color:#b9afc1}
#equipment-dialog[data-page="bag"] .adventure-search>.adventure-icon{width:28px;height:28px;margin-left:13px}
#equipment-dialog[data-page="bag"] .adventure-search>span{font-size:calc(20px * var(--bag-text,1));min-width:77px;color:#f4edee}
#equipment-dialog[data-page="bag"] .adventure-item-grid{flex:1;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:89px;gap:8px;overflow:auto;padding:3px 15px 4px 0;align-content:start;scrollbar-width:thin;scrollbar-color:#d8b77b #151321}
#equipment-dialog[data-page="bag"] .adventure-grid-item,#equipment-dialog[data-page="bag"] .adventure-grid-empty{height:100%;aspect-ratio:auto;overflow:hidden;outline:0;border:0;border-radius:0;background:url('../assets/ui/bag-reference-v2/cell.svg') center/100% 100%;box-shadow:none;min-height:0;color:#eee4d4}
#equipment-dialog[data-page="bag"] .adventure-grid-empty{opacity:.48}
#equipment-dialog[data-page="bag"] .adventure-grid-empty:before{content:'';position:absolute;inset:28%;background:url('../assets/ui/bag-reference-v2/empty.svg') center/contain no-repeat;opacity:.34}
#equipment-dialog[data-page="bag"] .adventure-grid-item.selected{box-shadow:inset 0 0 0 2px #f3a5dc,inset 0 0 0 5px #b458ac;filter:drop-shadow(0 0 5px #e579d788)}
#equipment-dialog[data-page="bag"] .adventure-grid-item img{max-width:87%;max-height:87%;width:87%;height:87%;object-fit:contain}
#equipment-dialog[data-page="bag"] .adventure-grid-item>span{position:absolute;right:9px;bottom:4px;font-size:calc(19px * var(--bag-text,1));color:#fff5e0;text-shadow:0 1px 3px #000}
#equipment-dialog[data-page="bag"] .adventure-grid-item>i{position:absolute;right:6px;top:3px;width:21px;height:25px;border-radius:4px;background:#f7d074;color:#302038;font:600 17px 'Noto Sans Thai',sans-serif;box-shadow:none}
#equipment-dialog[data-page="bag"] .adventure-grid-item>i:after{content:'E';position:absolute;inset:0;background:#f7d074;text-align:center}
#equipment-dialog[data-page="bag"] .adventure-empty-note{min-height:44px;margin:0;text-align:center;font-size:calc(17px * var(--bag-text,1));line-height:1.45;color:#d1c7d8;display:flex;align-items:center;justify-content:center}
#equipment-dialog[data-page="bag"] .auto-potion{height:142px;min-height:142px;margin:0 -5px 0;padding:13px 18px 10px;background:#13111dd9;border:1px solid #b49559;border-radius:0;box-shadow:none;color:#f5ecdf;font-size:calc(18px * var(--bag-text,1));display:grid;grid-template-rows:38px 52px 20px;gap:2px}
#equipment-dialog[data-page="bag"] .auto-potion-head{flex-wrap:nowrap}
#equipment-dialog[data-page="bag"] .auto-potion-head h3{font-size:calc(23px * var(--bag-text,1));color:#f6d797;font-weight:500}
#equipment-dialog[data-page="bag"] .auto-potion-switch{min-height:38px;gap:10px;font-size:calc(19px * var(--bag-text,1))}
#equipment-dialog[data-page="bag"] .auto-potion-track{width:59px;height:31px;border:1px solid #b2a7bf;background:#252330;box-shadow:inset 0 2px 5px #0008;border-radius:18px}
#equipment-dialog[data-page="bag"] .auto-potion-track:after{width:23px;height:23px;top:3px;left:3px}
#equipment-dialog[data-page="bag"] .auto-potion-switch input:checked+.auto-potion-track{background:#7025aa}
#equipment-dialog[data-page="bag"] .auto-potion-switch input:checked+.auto-potion-track:after{transform:translateX(27px)}
#equipment-dialog[data-page="bag"] .auto-potion-row{flex-wrap:nowrap;gap:14px}
#equipment-dialog[data-page="bag"] .auto-potion-threshold button{width:42px;height:45px;font-size:calc(27px * var(--bag-text,1));background:#26212d;color:#f7d88d;border:1px solid #ba945b;border-radius:7px}
#equipment-dialog[data-page="bag"] .auto-potion-threshold output{min-width:87px;font-size:calc(21px * var(--bag-text,1));color:#f9ece8}
#equipment-dialog[data-page="bag"] .auto-potion select{flex:1;width:0;min-height:45px;background:#17141f;color:#faf0e9;border:1px solid #817089;border-radius:4px;font-size:calc(18px * var(--bag-text,1))}
#equipment-dialog[data-page="bag"] .auto-potion-status{margin:0;font-size:calc(15px * var(--bag-text,1));color:#c9bace}
#equipment-dialog[data-page="bag"] .adventure-details{position:relative;display:flex;flex-direction:column;min-height:0;padding:14px 18px 78px 22px;border:0;border-radius:0;background:none;box-shadow:none;overflow:auto;scrollbar-width:thin;scrollbar-color:#d8b77b #151321}
#equipment-dialog[data-page="bag"] .adventure-detail-head{display:flex;flex-direction:row;align-items:flex-start;gap:17px;padding:0 0 18px;border-bottom:1px solid #c2a46888}
#equipment-dialog[data-page="bag"] .adventure-item-art{display:grid;width:113px;height:138px;flex:none;border:0;border-radius:0;background:url('../assets/ui/bag-reference-v2/cell.svg') center/100% 100%;box-shadow:none}
#equipment-dialog[data-page="bag"] .adventure-item-art img{width:90%;height:90%;max-width:90%;max-height:90%;object-fit:contain;transform:none}
#equipment-dialog[data-page="bag"] .adventure-detail-head h3{font-size:calc(26px * var(--bag-text,1));line-height:1.35;font-weight:500;color:#f7dda5;margin:1px 0 9px;overflow-wrap:anywhere}
#equipment-dialog[data-page="bag"] .adventure-detail-head p{font-size:calc(21px * var(--bag-text,1));color:#ece3f0;margin:0 0 8px}
#equipment-dialog[data-page="bag"] .adventure-rarity{font-size:calc(18px * var(--bag-text,1));padding:2px 13px;color:#2b2631;background:#beb9bf;border-radius:18px}
#equipment-dialog[data-page="bag"] .adventure-equipped-status{display:block;font-size:calc(20px * var(--bag-text,1));color:#a5d88e;margin:9px 0 0}
.bag-section-title{margin:12px 0 5px;color:#f4d58f;font-size:calc(22px * var(--bag-text,1));line-height:1.35;font-weight:500}
#equipment-dialog[data-page="bag"] .adventure-item-stats{margin:0;flex:none}
#equipment-dialog[data-page="bag"] .adventure-item-stats>div{font-size:calc(20px * var(--bag-text,1));line-height:1.4;padding:8px 0;border-bottom:1px solid #75607166;gap:8px}
#equipment-dialog[data-page="bag"] .adventure-item-stats dt{color:#e7dde9;min-width:0}
#equipment-dialog[data-page="bag"] .adventure-item-stats dd{color:#fae6a5;font-size:calc(20px * var(--bag-text,1))}
.bag-refine-line{padding:12px 0;border-top:1px solid #c2a46888;border-bottom:1px solid #c2a46888;display:flex;justify-content:space-between;gap:12px;font-size:calc(20px * var(--bag-text,1));color:#ecd08e;margin-top:14px}
#equipment-dialog[data-page="bag"] .adventure-description{display:block;font-size:calc(21px * var(--bag-text,1));line-height:1.5;color:#e9dfe8;margin:0 0 10px}
#equipment-dialog[data-page="bag"] .adventure-detail-actions{position:sticky;bottom:-69px;left:auto;right:auto;display:flex;gap:14px;flex:none;margin-top:auto;padding:14px 0 0;background:#14111de8;z-index:2}
#equipment-dialog[data-page="bag"] .adventure-primary{flex:1;min-height:64px;padding:7px 8px;font-size:calc(24px * var(--bag-text,1));border:1px solid #edc989;border-radius:0;background:linear-gradient(#292333,#15131f);color:#fff2e8;box-shadow:inset 0 0 0 3px #3e3547;clip-path:polygon(6% 0,94% 0,100% 16%,100% 84%,94% 100%,6% 100%,0 84%,0 16%);white-space:normal}
#equipment-dialog[data-page="bag"] .adventure-primary:first-child{background:linear-gradient(#8d155e,#460c48);box-shadow:inset 0 0 0 2px #f2a6db,inset 0 0 0 5px #b36c9c}
#equipment-dialog[data-page="bag"] button:disabled{opacity:.55;cursor:default}
#equipment-dialog[data-page="bag"] button:focus-visible,#equipment-dialog[data-page="bag"] input:focus-visible,#equipment-dialog[data-page="bag"] select:focus-visible{outline:3px solid #ffe6a5;outline-offset:2px}
#equipment-dialog[data-page="bag"] button:hover:not(:disabled){filter:brightness(1.15)}
#equipment-dialog[data-page="bag"] ::selection{background:#9a50c6;color:#fff9e9}
.bag-help{position:absolute;left:143px;top:24px;width:32px;height:32px;border:1px solid #d9cfd9;border-radius:50%;background:none;color:#e9dfe8;font-size:calc(23px * var(--bag-text,1));line-height:1}
.bag-help-panel{position:absolute;left:190px;top:58px;width:490px;padding:20px;background:#171120;color:#eee2eb;border:1px solid #bc9455;line-height:1.7;font-size:calc(19px * var(--bag-text,1));z-index:10}
@media(max-height:560px),(max-width:900px){
 #equipment-dialog[data-page="bag"] .adventure-categories button{height:106px;min-height:106px;padding:0;justify-content:center}
 #equipment-dialog[data-page="bag"] .adventure-categories button span:not(.adventure-icon){display:none}
 #equipment-dialog[data-page="bag"] .adventure-categories .adventure-icon{width:68px;height:68px}
 #equipment-dialog[data-page="bag"] .adventure-grid-tabs{min-height:82px;height:82px;overflow-x:auto;flex:none}
 #equipment-dialog[data-page="bag"] .bag-top-tab{height:80px;font-size:calc(28px * var(--bag-text,1));min-width:106px;flex:none}
 #equipment-dialog[data-page="bag"] .bag-top-tab .adventure-icon{display:none}
 #equipment-dialog[data-page="bag"] .adventure-search{height:75px;min-height:75px}
 #equipment-dialog[data-page="bag"] .adventure-search input{height:72px;font-size:calc(31px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-search>span{font-size:calc(28px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-item-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:108px;gap:8px}
 #equipment-dialog[data-page="bag"] .adventure-grid-item>span{font-size:calc(29px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-empty-note{font-size:calc(28px * var(--bag-text,1));min-height:65px}
 #equipment-dialog[data-page="bag"] .auto-potion{height:208px;min-height:208px;grid-template-rows:64px 76px 40px;padding:10px}
 #equipment-dialog[data-page="bag"] .auto-potion-head h3{font-size:calc(31px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .auto-potion-switch{min-height:64px;font-size:calc(31px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .auto-potion-row{gap:7px}
 #equipment-dialog[data-page="bag"] .auto-potion-threshold button{width:88px;height:76px;font-size:calc(40px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .auto-potion-threshold output{min-width:88px;font-size:calc(31px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .auto-potion select{min-height:76px;font-size:calc(28px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .auto-potion-status{font-size:calc(26px * var(--bag-text,1));line-height:1.3}
 #equipment-dialog[data-page="bag"] .adventure-details{padding-bottom:110px}
 #equipment-dialog[data-page="bag"] .adventure-item-art{width:103px;height:125px}
 #equipment-dialog[data-page="bag"] .adventure-detail-head{gap:10px}
 #equipment-dialog[data-page="bag"] .adventure-detail-head h3{font-size:calc(34px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-detail-head p,#equipment-dialog[data-page="bag"] .adventure-equipped-status{font-size:calc(29px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-rarity{font-size:calc(28px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-item-stats>div,#equipment-dialog[data-page="bag"] .adventure-item-stats dd,.bag-refine-line{font-size:calc(30px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-description,.bag-section-title{font-size:calc(31px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-primary{min-height:106px;font-size:calc(31px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-detail-actions{gap:8px;bottom:-102px}
 .bag-rotate button{width:106px;height:106px;font-size:calc(56px * var(--bag-text,1))}
 .bag-rotate{left:64px;right:64px;bottom:1px}
}

/* Review B1/B2/R2: display preferences preserve artboard bounds and reachable controls. */
body.adventure-hud #equipment-dialog[data-page="bag"]{--bag-touch:calc(44px / var(--bag-scale,1));--bag-text:var(--ui-zoom,1)}
html[data-ui-text] body.adventure-hud #equipment-dialog[data-page="bag"][open]>*{zoom:1}
html[data-ui-text] body.adventure-hud #equipment-dialog[data-page="bag"] .bag-help{left:calc(165px * var(--bag-text,1))}
html[data-ui-text] #equipment-dialog[data-page="bag"] .adventure-grid-tabs{overflow-x:auto}
html[data-ui-text] #equipment-dialog[data-page="bag"] .bag-top-tab{flex:none;width:max-content;min-width:120px;padding:0 10px}
body.adventure-hud #equipment-dialog[data-page="bag"] .bag-help{width:max(32px,var(--bag-touch));height:max(32px,var(--bag-touch));top:16px;border:1px solid #f3d69c;background:#191221;color:#ffe9b8;font-size:25px;box-shadow:none}
#equipment-dialog[data-page="bag"] :is(.adventure-categories button,.bag-top-tab,.adventure-primary,.auto-potion-threshold button,.auto-potion select,.bag-rotate button,.adventure-search input){min-height:var(--bag-touch)}
#equipment-dialog[data-page="bag"] :is(.adventure-wear-slot,.auto-potion-threshold button,.bag-rotate button){min-width:var(--bag-touch)}
body.adventure-hud #equipment-dialog[data-page="bag"] #close-equipment{width:max(81px,var(--bag-touch));height:max(80px,var(--bag-touch))}
#equipment-dialog[data-page="bag"] .auto-potion-switch{min-height:var(--bag-touch)}
#equipment-dialog[data-page="bag"] .bag-top-tab{font-size:calc(17px * var(--bag-text,1))}
#equipment-dialog[data-page="bag"] #chat-box:not(.chat-open):not(.chat-focus){display:none}
#equipment-dialog[data-page="bag"] #chat-box{position:absolute;left:49px;bottom:82px;width:550px;max-width:none;max-height:580px;overflow:auto;padding:16px;gap:9px;background:#171021fa;border:1px solid #c9a368;border-radius:5px;color:#fff4dd;font-size:calc(14px / var(--bag-scale,1));box-shadow:0 9px 18px #08050e99;z-index:30}
#equipment-dialog[data-page="bag"] #chat-box .chat-log{height:180px;max-height:180px;font-size:inherit}
#equipment-dialog[data-page="bag"] #chat-box :is(button,input,select){font-size:calc(12px / var(--bag-scale,1));min-height:var(--bag-touch)}
#equipment-dialog[data-page="bag"] #chat-box .chat-head{gap:7px}
#equipment-dialog[data-page="bag"] #chat-box .chat-close{display:block;min-width:var(--bag-touch);color:#ffe7b1;background:#302036}
#equipment-dialog[data-page="bag"] #chat-box .chat-form{flex-wrap:wrap;gap:7px}
#equipment-dialog[data-page="bag"] #chat-box .chat-input{flex:1 1 70%;height:var(--bag-touch)}
#equipment-dialog[data-page="bag"] #chat-box :is(.chat-emoji-button,.chat-send){min-width:var(--bag-touch)}
html[data-ui-contrast="high"] body.adventure-hud #equipment-dialog[data-page="bag"] :is(p,small,span,dt){color:#fff4dc;opacity:1}
@media(max-height:560px),(max-width:900px){
 #equipment-dialog[data-page="bag"] .adventure-grid-tabs{height:114px;min-height:114px}
 #equipment-dialog[data-page="bag"] .bag-top-tab{height:106px;font-size:calc(28px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-search{height:116px;min-height:116px}
 #equipment-dialog[data-page="bag"] .auto-potion{height:276px;min-height:276px;grid-template-rows:106px 106px 40px}
 #equipment-dialog[data-page="bag"] .auto-potion-head{gap:6px}
 #equipment-dialog[data-page="bag"] .auto-potion-switch{font-size:calc(25px * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="head"]{top:130px}
 #equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="body"]{top:247px}
 #equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="feet"]{top:481px}
 #equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="weapon"]{top:130px}
 #equipment-dialog[data-page="bag"] .adventure-wear-slot[data-slot="bag"]{top:364px}
 #equipment-dialog[data-page="bag"] .bag-slot-placeholder[data-slot="neck"]{top:247px}
 #equipment-dialog[data-page="bag"] .bag-slot-placeholder[data-slot="legs"]{top:364px}
 #equipment-dialog[data-page="bag"] .bag-slot-placeholder[data-slot="ring"]{top:481px}
 #equipment-dialog[data-page="bag"] .adventure-wear-slot{height:max(88px,var(--bag-touch));width:max(74px,var(--bag-touch))}
}

/* Comfort revision: bounded plate, one desktop navigation and separated text groups. */
#equipment-dialog[data-page="bag"] .equipment-header h2{font-size:calc(38px * var(--bag-text,1))}
#equipment-dialog[data-page="bag"] .adventure-categories button{font-size:calc(18px * var(--bag-text,1));padding:0 12px;gap:10px}
#equipment-dialog[data-page="bag"] .adventure-categories .adventure-icon{width:32px;height:32px}
#equipment-dialog[data-page="bag"] .bag-stage-title{font-size:calc(25px * var(--bag-text,1));line-height:1.5}
#equipment-dialog[data-page="bag"] .equipment-character strong{top:70px;font-size:calc(20px * var(--bag-text,1));line-height:1.5}
#equipment-dialog[data-page="bag"] .adventure-grid-tabs{display:none}
#equipment-dialog[data-page="bag"] .adventure-search{margin-bottom:18px}
#equipment-dialog[data-page="bag"] .adventure-empty-note{display:block;flex:none;min-height:0;padding:12px 12px 16px;font-size:calc(16px * var(--bag-text,1));line-height:1.6;text-align:left;white-space:normal;overflow-wrap:anywhere}
#equipment-dialog[data-page="bag"] .bag-potion-disclosure{display:contents}
#equipment-dialog[data-page="bag"] .bag-potion-disclosure>summary{display:none}
#equipment-dialog[data-page="bag"] .auto-potion{height:auto;min-height:174px;flex:none;margin:0;padding:16px 18px;grid-template-rows:auto auto auto;gap:12px}
#equipment-dialog[data-page="bag"] .auto-potion-head{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:8px;white-space:normal}
#equipment-dialog[data-page="bag"] .auto-potion-head h3{margin:0;font-size:calc(20px * var(--bag-text,1));line-height:1.5}
#equipment-dialog[data-page="bag"] .auto-potion-switch{justify-self:start;min-width:0;max-width:100%;font-size:calc(17px * var(--bag-text,1));line-height:1.5;white-space:normal;gap:12px}
#equipment-dialog[data-page="bag"] .auto-potion-track{flex:none}
#equipment-dialog[data-page="bag"] .auto-potion-switch>span:last-child{display:block;min-width:0;white-space:normal;overflow-wrap:anywhere}
#equipment-dialog[data-page="bag"] .auto-potion-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:16px}
#equipment-dialog[data-page="bag"] .auto-potion-threshold{gap:8px}
#equipment-dialog[data-page="bag"] .auto-potion-threshold output{min-width:64px;font-size:calc(19px * var(--bag-text,1));line-height:1.5}
#equipment-dialog[data-page="bag"] .auto-potion select{width:100%;min-width:0;padding:6px 10px;font-size:calc(16px * var(--bag-text,1));line-height:1.5}
#equipment-dialog[data-page="bag"] .auto-potion-status{font-size:calc(14px * var(--bag-text,1));line-height:1.5;white-space:normal;overflow-wrap:anywhere}
#equipment-dialog[data-page="bag"] .adventure-details{padding:20px 24px 24px}
#equipment-dialog[data-page="bag"] .adventure-detail-head{gap:18px;padding-bottom:22px}
#equipment-dialog[data-page="bag"] .adventure-detail-head>div:last-child{min-width:0}
#equipment-dialog[data-page="bag"] .adventure-item-art{width:96px;height:118px}
#equipment-dialog[data-page="bag"] .adventure-detail-head h3{font-size:calc(23px * var(--bag-text,1));line-height:1.5;margin-bottom:12px}
#equipment-dialog[data-page="bag"] .adventure-detail-head p,#equipment-dialog[data-page="bag"] .adventure-equipped-status{font-size:calc(18px * var(--bag-text,1));line-height:1.5}
#equipment-dialog[data-page="bag"] .adventure-item-stats>div,#equipment-dialog[data-page="bag"] .adventure-item-stats dd,.bag-refine-line{font-size:calc(18px * var(--bag-text,1));line-height:1.6}
#equipment-dialog[data-page="bag"] .adventure-item-stats>div{padding:10px 0;gap:16px}
#equipment-dialog[data-page="bag"] .adventure-description{font-size:calc(18px * var(--bag-text,1));line-height:1.6;white-space:normal;overflow-wrap:anywhere}
#equipment-dialog[data-page="bag"] .bag-section-title{font-size:calc(20px * var(--bag-text,1));line-height:1.5;margin:20px 0 10px}
#equipment-dialog[data-page="bag"] .adventure-detail-actions{bottom:0;padding-top:20px;gap:16px}
#equipment-dialog[data-page="bag"] .adventure-primary{font-size:calc(20px * var(--bag-text,1));line-height:1.5;padding:10px 12px}
@media(max-width:1100px),(max-height:620px){
 body.adventure-hud #equipment-dialog[data-page="bag"] .bag-help{top:calc(-12px / var(--bag-scale,1))}
 body.adventure-hud #equipment-dialog[data-page="bag"] #close-equipment{top:calc(-12px / var(--bag-scale,1));width:var(--bag-touch);height:var(--bag-touch)}
 #equipment-dialog[data-page="bag"] .adventure-grid-tabs{display:flex;height:var(--bag-touch);min-height:var(--bag-touch);margin-bottom:12px;overflow-x:auto;flex:none}
 #equipment-dialog[data-page="bag"] .bag-top-tab{height:var(--bag-touch);min-width:var(--bag-touch);width:max-content;flex:none;font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1));padding:0 16px;line-height:1.5}
 #equipment-dialog[data-page="bag"] .bag-top-tab .adventure-icon{display:none}
 #equipment-dialog[data-page="bag"] .adventure-bag-grid{overflow:auto;scrollbar-width:thin;scrollbar-color:#d8b77b #151321}
 #equipment-dialog[data-page="bag"] .adventure-search{height:var(--bag-touch);min-height:var(--bag-touch);margin-bottom:12px}
 #equipment-dialog[data-page="bag"] .adventure-search input{height:var(--bag-touch);font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-search>span{font-size:calc(12px / var(--bag-scale,1) * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-item-grid{min-height:var(--bag-touch);grid-auto-rows:max(108px,var(--bag-touch))}
 #equipment-dialog[data-page="bag"] .adventure-empty-note{font-size:calc(12px / var(--bag-scale,1) * var(--bag-text,1));line-height:1.5;max-height:calc(44px / var(--bag-scale,1));overflow:auto;padding:8px 12px}
 #equipment-dialog[data-page="bag"] .bag-potion-disclosure{display:block;flex:none;border:1px solid #a58954;background:#13111d;margin-top:8px}
 #equipment-dialog[data-page="bag"] .bag-potion-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;min-height:var(--bag-touch);padding:8px 16px;box-sizing:border-box;font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1));line-height:1.5;color:#f6d797}
 #equipment-dialog[data-page="bag"] .bag-potion-disclosure>summary::after{content:'+';font-size:calc(22px / var(--bag-scale,1));line-height:1;flex:none}
 #equipment-dialog[data-page="bag"] .bag-potion-disclosure[open]>summary::after{content:'−'}
 #equipment-dialog[data-page="bag"] .auto-potion{border:0;min-height:0;height:auto;gap:16px;padding:16px}
 #equipment-dialog[data-page="bag"] .auto-potion-head h3{display:none}
 #equipment-dialog[data-page="bag"] .auto-potion-switch{font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1));gap:16px}
 #equipment-dialog[data-page="bag"] .auto-potion-track{width:calc(52px / var(--bag-scale,1));height:calc(28px / var(--bag-scale,1))}
 #equipment-dialog[data-page="bag"] .auto-potion-track:after{width:calc(20px / var(--bag-scale,1));height:calc(20px / var(--bag-scale,1));left:calc(3px / var(--bag-scale,1));top:calc(3px / var(--bag-scale,1))}
 #equipment-dialog[data-page="bag"] .auto-potion-switch input:checked+.auto-potion-track:after{transform:translateX(calc(24px / var(--bag-scale,1)))}
 #equipment-dialog[data-page="bag"] .auto-potion-row{grid-template-columns:minmax(0,1fr);gap:16px}
 #equipment-dialog[data-page="bag"] .auto-potion-threshold{justify-content:flex-start}
 #equipment-dialog[data-page="bag"] .auto-potion-threshold button{width:var(--bag-touch);height:var(--bag-touch);font-size:calc(20px / var(--bag-scale,1))}
 #equipment-dialog[data-page="bag"] .auto-potion-threshold output{font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1));min-width:var(--bag-touch)}
 #equipment-dialog[data-page="bag"] .auto-potion select{font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1));height:var(--bag-touch)}
 #equipment-dialog[data-page="bag"] .auto-potion-status{font-size:calc(12px / var(--bag-scale,1) * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-detail-head{flex-wrap:wrap;gap:12px}
 #equipment-dialog[data-page="bag"] .adventure-detail-head h3{font-size:calc(17px / var(--bag-scale,1) * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-detail-head p,#equipment-dialog[data-page="bag"] .adventure-equipped-status,#equipment-dialog[data-page="bag"] .adventure-description,#equipment-dialog[data-page="bag"] .adventure-item-stats>div,#equipment-dialog[data-page="bag"] .adventure-item-stats dd,.bag-refine-line{font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .bag-section-title{font-size:calc(15px / var(--bag-scale,1) * var(--bag-text,1))}
 #equipment-dialog[data-page="bag"] .adventure-primary{font-size:calc(14px / var(--bag-scale,1) * var(--bag-text,1));min-height:var(--bag-touch)}
}
