/* The character remains fixed while the bag and item details scroll separately. */
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397{width:min(760px,calc(100vw - 16px));height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:900px;min-height:0;background:#eee6d2;color:#263b34;border:1px solid #ac9461;border-radius:18px;overflow:hidden}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397>.immersive-panel-head{min-height:42px;padding:8px 14px;background:#24443f;color:#f7edd1;border-bottom:1px solid #a88d54;flex-shrink:0}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397>.immersive-panel-head h2{font-size:18px;margin:0}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397>.immersive-panel-body{display:flex!important;flex-direction:column;gap:6px;min-height:0;overflow:auto!important;padding:8px!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .s-arsenal-main-tabs264{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;flex:none;margin:0;padding:0;overflow:visible}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .s-arsenal-main-tabs264 button{min-height:44px;min-width:0;padding:6px;border:1px solid #ac9d7e;border-radius:9px;background:#e0d7bf;color:#405449;font-size:11px}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .s-arsenal-main-tabs264 button[aria-selected="true"]{background:#315a4b;color:#fff2ce;border-color:#315a4b}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-tabs-icons{display:none!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .gear397-workspace{display:flex;flex:1 1 auto;flex-direction:column;gap:6px;min-height:0;overflow:hidden}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .dungeon-bag-note265{font-size:11px;line-height:1.3;margin:0;padding:4px 6px;color:#596452;flex:none}
.s397-paperdoll{padding:8px;border:1px solid #b5a17a;border-radius:12px;background:radial-gradient(ellipse at 50% 35%,#e5eddb 0%,#cbd8c3 43%,#dbcfaf 100%);flex:none;min-width:0;box-shadow:inset 0 0 22px #b8b79745}
.s397-identity{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:25px;margin-bottom:5px;color:#294739}
.s397-identity>div{display:flex;align-items:baseline;gap:7px;min-width:0}.s397-identity strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s397-identity small{font-size:10px;white-space:nowrap}.s397-identity>span{font-size:10px;white-space:nowrap}.s397-identity>span>b{font-size:15px}
.s397-paper-grid{display:grid;grid-template-columns:52px minmax(0,1fr)52px;gap:8px;height:clamp(190px,29dvh,252px);min-width:0}
.s397-slot-column{display:grid;grid-template-rows:repeat(4,minmax(44px,1fr));gap:5px;min-width:0}
.s397-equipment-slot{position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:44px;min-width:0;padding:2px!important;border:2px solid #78816f!important;border-radius:8px!important;background:linear-gradient(150deg,#fcf5e2,#c7bca0)!important;color:#344337!important;box-shadow:0 2px 3px #293b3420;cursor:pointer}
.s397-equipment-slot small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;line-height:11px}.s397-equipment-slot .s397-item-art{width:30px;height:29px}.s397-equipment-slot .s397-item-art svg{width:24px;height:24px}
.s397-equipment-slot.is-empty{border-style:dashed!important;opacity:.8}.s397-equipment-slot.is-preview-slot{outline:2px solid #2a8572;outline-offset:2px}.s397-equipment-slot i{position:absolute;right:3px;top:3px;width:5px;height:5px;border-radius:50%;background:#2a6b45}
.s397-equipment-slot.rarity-rare{border-color:#357db4!important}.s397-equipment-slot.rarity-epic{border-color:#9862bc!important}.s397-equipment-slot.rarity-legendary{border-color:#b98827!important;box-shadow:0 0 8px #d4ae5f68}
.s397-character-column{display:grid;grid-template-rows:minmax(0,1fr)44px;gap:5px;min-width:0;min-height:0}.s397-hand-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;min-width:0}.s397-hand-slots .s397-equipment-slot .s397-item-art{height:26px}
.s397-preview-wrap{position:relative;min-height:0;min-width:0;overflow:hidden;border-radius:12px;background:radial-gradient(ellipse at 50% 90%,#8eab8240,transparent 70%)}.s397-preview-wrap canvas{width:100%;height:100%;display:block;outline-offset:-3px;touch-action:pan-y}.s397-preview-mode{position:absolute;left:4px;top:3px;padding:2px 5px;border-radius:5px;background:#f8f1dbbd;color:#375548;font-size:9px;pointer-events:none}.s397-preview-mode.is-trying{background:#265f50;color:#fff4ce}.s397-preview-status{position:absolute;left:5px;right:5px;top:45%;text-align:center;font-size:11px;color:#3b5445;pointer-events:none}
.s397-reset-rotation{position:absolute;right:0;top:0;width:44px;min-height:44px;border:0;background:transparent;color:#3d6050;font-size:25px}.s397-show-equipped{position:absolute;bottom:1px;left:50%;transform:translateX(-50%);min-height:44px;max-width:100%;padding:5px 9px;border:1px solid #697d5f;border-radius:7px;background:#f9efcdeb;color:#314c3f;font-size:10px;white-space:nowrap}
.s397-character-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:5px}.s397-character-stats>span{display:flex;align-items:baseline;justify-content:center;gap:4px;min-width:0;font-size:12px;color:#2b4739}.s397-character-stats small{font-size:9px;color:#536451}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197{display:flex!important;align-items:center;gap:5px;flex:none;margin:0;padding:0;background:none;border:0;min-height:44px}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197 button,#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197 select{min-height:44px;min-width:34px;border-color:#b0a080;background:#e6ddc5;color:#3d5044}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197-filters{display:flex;gap:3px;min-width:0}.sanctuary-arsenal-v397 .arsenal-onebar197-actions{margin-left:auto;min-width:0;display:flex;align-items:center;gap:3px}.sanctuary-arsenal-v397 .arsenal-onebar197-capacity{font-size:11px;white-space:nowrap}.sanctuary-arsenal-v397 .arsenal-onebar197-sort-icon{display:none}.sanctuary-arsenal-v397 .arsenal-onebar197 select{font-size:11px;max-width:76px;padding:4px}.sanctuary-arsenal-v397 .arsenal-offers197{display:none!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .s397-slot-filter{display:flex;align-items:center;justify-content:space-between;flex:none;min-height:32px;padding:0 7px;background:#d3dfc7;border:1px solid #9dae90;border-radius:7px;font-size:12px}.s397-slot-filter button{min-height:44px;min-width:44px;background:transparent;border:0;color:#385c43;font-size:16px}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .equipment-v2-bag{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-auto-rows:max-content!important;align-content:start;gap:5px;flex:1 1 auto;min-height:90px;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;touch-action:pan-y;margin:0;padding:2px 2px 5px}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .equipment-v2-cell{aspect-ratio:1;min-height:52px;height:auto!important;min-width:0;border-radius:9px;background:linear-gradient(145deg,#f7efd9,#d8ccb0);border-width:2px;color:#314b3d;position:relative}.sanctuary-arsenal-v397 .equipment-v2-cell.is-empty{background:#d9d2bd66;opacity:.55}.sanctuary-arsenal-v397 .equipment-v2-cell-art img{max-width:85%;max-height:85%;object-fit:contain}.sanctuary-arsenal-v397 .equipment-v2-cell small{background:#263f35de;color:#f9efd2;border-radius:4px;padding:1px 4px}.sanctuary-arsenal-v397 .equipment-v2-unclaimed{flex:none;min-height:44px;margin:0;background:#ddd3b6;color:#314c3c;border:1px solid #ac9566;border-radius:9px}.sanctuary-arsenal-v397 .equipment-v2-unclaimed small{font-size:10px}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .sanctuary-bag-empty{font-size:12px;line-height:1.35;padding:6px;color:#56634f;flex:none}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-upgrade-panel,#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .s-arsenal-consumables-mount264{overflow:auto;min-height:0;flex:1 1 auto}
.s397-item-art{display:grid;place-items:center;flex:none;overflow:hidden}.s397-item-art img{width:100%;height:100%;object-fit:contain}.s397-item-art svg{width:30px;height:30px}
.s-modal253[data-kind="equipment397"]{align-items:flex-end!important;padding:8px!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}.s397-comparison{display:flex;flex-direction:column;width:min(100%,500px);max-height:86dvh;min-height:0;margin:0 auto;background:#f2ead6;color:#263e33;border:2px solid #a59778;border-radius:16px;box-shadow:0 12px 44px #132b2b75;overflow:hidden;text-align:left}.s397-comparison.rarity-rare{border-color:#477fa7}.s397-comparison.rarity-epic{border-color:#9260ab}.s397-comparison.rarity-legendary{border-color:#bc932e}
.s397-detail-heading{display:flex;align-items:center;gap:9px;padding:12px 10px;background:#e2d6b5;border-bottom:1px solid #b6a57c;flex:none}.s397-detail-heading .s397-item-art{width:46px;height:46px;border:1px solid #ad9564;border-radius:9px;background:#f6efdb}.s397-detail-heading>div{flex:1;min-width:0}.s397-detail-heading small{text-transform:uppercase;letter-spacing:.06em;font-size:10px;color:#5f624b}.s397-detail-heading h3{font-size:18px;line-height:1.2;margin:3px 0;color:#294535;overflow-wrap:anywhere}.s397-detail-heading p{font-size:11px;margin:0;color:#56624e}.s397-close-detail{width:44px;min-height:44px;flex:none;border:0;border-radius:8px;background:#c7b995;color:#304737;font-size:25px}
.s397-detail-scroll{padding:10px 12px;overflow:auto;overscroll-behavior:contain;min-height:0}.s397-compare-cards{display:grid;grid-template-columns:1fr 1fr;gap:7px}.s397-compare-cards>div{display:flex;flex-direction:column;gap:5px;min-width:0;padding:9px;border:1px solid #b7ae91;border-radius:8px;background:#e3ddc8}.s397-compare-cards .is-selected{background:#e0e9d6;border-color:#8ca686}.s397-compare-cards small{font-size:9px;text-transform:uppercase;color:#626a55}.s397-compare-cards strong{font-size:12px;overflow-wrap:anywhere}.s397-compare-cards span{font-size:10px}.s397-verdict{font-size:12px;line-height:1.45;margin:9px 0;color:#3b5441}
.s397-stat-section{margin:9px 0}.s397-stat-section h4,.s397-breakdown h4{font-size:12px;margin:8px 0}.s397-stat-section table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:12px}.s397-stat-section th,.s397-stat-section td{padding:7px 4px;border-bottom:1px solid #c6bfa7;text-align:right;font-variant-numeric:tabular-nums}.s397-stat-section th:first-child{text-align:left;width:28%}.s397-stat-section thead th{font-size:10px;color:#68705b}.s397-positive{color:#247045;font-weight:700}.s397-negative{color:#a14735;font-weight:700}.s397-neutral{color:#687061}.s397-warden-impact{font-size:12px;line-height:1.5;background:#d7e4ce;border-radius:7px;padding:8px}
.s397-item-tags{display:flex;flex-wrap:wrap;gap:5px}.s397-item-tags span{font-size:10px;padding:4px 6px;border:1px solid #b4a582;border-radius:5px}.s397-item-source{font-size:11px;line-height:1.5;color:#59604e;margin:10px 0}.s397-breakdown{border-top:1px solid #b8ad8c;padding-top:5px}.s397-breakdown summary{min-height:44px;display:flex;align-items:center;font-size:12px;font-weight:700;cursor:pointer}.s397-breakdown summary::after{content:'+';margin-left:auto;font-size:18px}.s397-breakdown[open] summary::after{content:'−'}.s397-contributions{list-style:none;margin:5px 0;padding:0;font-size:11px}.s397-contributions li{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid #d2c8ac}.s397-contributions b{text-align:right;font-weight:500}.s397-special-effect{display:flex;flex-direction:column;gap:5px;font-size:12px;padding:8px;background:#e7dcc0;border:1px solid #bba777;border-radius:7px}.s397-special-effect small,.s397-muted{font-size:11px;color:#6f705b;line-height:1.5}
.s397-detail-tools{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.s397-detail-tools button{flex:1 1 40%;min-height:44px;padding:7px;border:1px solid #9d9e7e;border-radius:8px;background:#dce4d0;color:#35543f;font-size:12px}.s397-delete-item{display:block;min-height:44px;margin:5px 0 0 auto;padding:6px 10px;border:0;background:transparent;color:#8e5440;font-size:11px}.s397-equipment-actions{flex:none;position:sticky;bottom:0;padding:10px;background:#e2d7b8;border-top:1px solid #b2a17c}.s397-equipment-actions p{font-size:12px;line-height:1.4;margin:0 0 7px}.s397-restriction{color:#8c4a35}.s397-equip-button{width:100%;min-height:48px;padding:10px;border:1px solid #365c3c;border-radius:9px;background:linear-gradient(#4e7751,#315839);color:#fff3ce;font-size:15px;font-weight:700}.s397-comparison button:disabled{opacity:.5;cursor:not-allowed}.s397-comparison button:focus-visible,.s397-equipment-slot:focus-visible{outline:3px solid #246d76;outline-offset:2px}
@media(max-height:680px){.s397-paperdoll{padding:5px}.s397-paper-grid{height:188px;gap:6px}.s397-slot-column{gap:3px}.s397-identity{min-height:20px;margin-bottom:2px}.s397-character-stats{margin-top:2px}.s397-identity small{display:none}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397>.immersive-panel-body{gap:4px;padding:6px!important}}
@media(max-height:590px){.s397-character-stats{display:none}.s397-paper-grid{height:182px}.s397-slot-column{gap:2px}.s397-identity{min-height:18px}.s397-comparison{max-height:92dvh}}
@media(max-width:360px){.s397-paper-grid{grid-template-columns:46px minmax(0,1fr)46px;gap:5px}.s397-identity strong{max-width:115px}.s397-identity small{display:none}.s397-character-stats>span{gap:2px}.s397-character-stats small{font-size:8px}.sanctuary-arsenal-v397 .arsenal-onebar197 select{max-width:65px}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197 button{min-width:30px;padding:3px}.s397-detail-scroll{padding:8px}.s397-detail-heading h3{font-size:16px}}

#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197 .s397-category-select{min-height:44px;min-width:88px;max-width:118px;flex:1 1 88px;font-size:12px;padding:6px}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197 button{min-width:44px;min-height:44px}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197-capacity{padding:0 3px}

#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397.is-gear397>.immersive-panel-body{overflow:hidden!important}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397.is-upgrade397>.immersive-panel-body>*{flex-shrink:0}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397.is-recycling397 .s397-paperdoll{display:none}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .inventory-recycle-controls button,#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .inventory-recycle-summary button,#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .inventory-recycle-confirm button{min-width:44px;min-height:44px}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .inventory-recycle-controls,#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .inventory-recycle-summary,#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .inventory-recycle-confirm{flex:none}

/* Override older shared panel constraints only for the397 equipment modal. */
#root dialog.s-modal253[data-kind="equipment-panel397"]{padding:8px!important;padding-top:max(8px,env(safe-area-inset-top))!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important;display:grid!important;place-items:center!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397{position:relative!important;inset:auto!important;transform:none!important;display:flex!important;flex-direction:column!important;box-sizing:border-box;width:min(760px,calc(100vw - 20px))!important;max-width:calc(100vw - 20px)!important;height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;max-height:900px!important;overflow:hidden!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397>.immersive-panel-body{flex:1 1 auto;overflow-y:auto!important;overflow-x:hidden!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397.is-gear397>.immersive-panel-body{overflow:hidden!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197-actions button{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .arsenal-onebar197 select{min-height:44px!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .equipment-v2-bag{overflow:auto!important;max-height:none!important;min-height:90px!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .s-arsenal-main-tabs264{padding:0!important}

/* Very short landscape viewports keep every control reachable by outer scrolling. */
@media(max-height:520px){#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397.is-gear397>.immersive-panel-body{overflow-y:auto!important}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .gear397-workspace{flex:none;overflow:visible}#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397 .equipment-v2-bag{height:180px!important;max-height:180px!important;flex:none}}

#root dialog.s-modal253.s-modal253[open][data-kind="equipment397"]{display:grid!important;place-items:end center!important;align-items:end!important;padding:8px!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397>.immersive-panel-head{min-height:56px!important;padding:6px 12px!important;flex:none}
#root .equipment-panel.sanctuary-arsenal-v264.sanctuary-arsenal-v397>.immersive-panel-head>button{min-width:44px!important;min-height:44px!important}

/* Build399: own the equipment surface explicitly, above shared modal rules. */
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-panel.sanctuary-arsenal-v397{background:#0c2029!important;color:#f3ecd9!important;border-color:#9e895d!important;box-shadow:0 14px 48px #0008!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-panel.sanctuary-arsenal-v397>.immersive-panel-head{min-height:52px!important;padding:4px 10px!important;background:#091b23!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-panel.sanctuary-arsenal-v397>.immersive-panel-head h2{font:600 19px/1.2 Georgia,serif!important;color:#f3e7c8!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-panel.sanctuary-arsenal-v397>.immersive-panel-body{padding:8px!important;gap:7px!important;background:#0c2029!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-panel.sanctuary-arsenal-v397.is-gear397>.immersive-panel-body{overflow:hidden!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .s-arsenal-main-tabs264{gap:5px!important;border:0!important;margin:0!important;padding:0!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .s-arsenal-main-tabs264 button{display:flex!important;flex-direction:column!important;gap:2px!important;min-height:44px!important;padding:4px!important;font:600 11px/1.15 system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;border:1px solid #758075!important;border-radius:9px!important;background:#142d36!important;color:#e9dfc5!important;box-shadow:none!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .s-arsenal-main-tabs264 button[aria-selected="true"]{border-color:#d4b779!important;background:#35463b!important;color:#fff0c9!important;box-shadow:inset 0 0 0 1px #d4b77944!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .s-arsenal-main-tabs264 button svg{width:18px!important;height:18px!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .s-arsenal-tab-icon264{font-size:19px!important;line-height:18px!important}
.s397-paperdoll{border-color:#788a76;background:radial-gradient(ellipse at 50% 40%,#789180 0%,#536c5c 52%,#324c43 100%);box-shadow:inset 0 0 20px #142f3922}
.s397-identity,.s397-character-stats>span{color:#fff0cf;text-shadow:0 1px 2px #152d2a80}.s397-identity small,.s397-character-stats small{color:#e0eadc}
.s397-character-stats{margin-top:6px}.s397-character-stats>span{flex-direction:column;align-items:center;gap:0;font-size:13px;line-height:1.15}.s397-character-stats small{font-size:10px;line-height:1.4}
.s397-paper-grid{height:clamp(188px,28dvh,236px)}
.s397-equipment-slot{background:linear-gradient(150deg,#304b48,#172f34)!important;color:#f0e6ca!important;box-shadow:0 2px 3px #0a171c40}
.s397-equipment-slot i{background:#a8dbab;box-shadow:0 0 0 1px #1f4938}.s397-equipment-slot.is-empty{background:#29433e99!important;opacity:.82}
.s397-preview-wrap{background:radial-gradient(ellipse at 50% 90%,#d2dec433,transparent 75%)}.s397-preview-mode{background:#132d31d9;color:#eee6ce}.s397-preview-mode.is-trying{background:#d5bf80;color:#16382f}
.s397-preview-status{color:#fff5dd;background:#10292fdf;border-radius:8px;padding:5px 6px;left:8px;right:8px;line-height:1.35}
.s397-preview-status.is-loading-gear{top:auto;bottom:5px;font-size:10px;padding:3px 5px}.s397-reset-rotation{color:#f1e4bc;text-shadow:0 1px 3px #10292f}
.s397-show-equipped{background:#193b38ed;color:#fff0cc;border-color:#a3a782}.s399-preview-failure{pointer-events:auto;top:32%;display:flex;flex-direction:column;align-items:center;gap:4px}
.s399-retry-preview{min-height:44px;min-width:44px;padding:6px 9px;border:1px solid #bca46d;border-radius:7px;background:#254d45;color:#fff1d0;font-size:11px}
.s399-art-fallback{width:100%;height:100%;display:grid;place-items:center}.s399-art-fallback[hidden]{display:none!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197{gap:5px!important;min-height:44px!important;padding:0!important;margin:0!important;background:transparent!important;border:0!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197 select{box-sizing:border-box!important;min-height:44px!important;min-width:0!important;border:1px solid #8c855f!important;border-radius:8px!important;background:#142d36!important;color:#f1e6c8!important;font:600 11px/1.2 system-ui,sans-serif!important;padding:6px!important;appearance:auto!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197 .s397-category-select{flex:1 1 94px!important;width:94px!important;min-width:70px!important;max-width:132px!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197-actions{display:flex!important;flex:0 0 auto!important;gap:5px!important;margin-left:auto!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197-actions select{width:72px!important;max-width:72px!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197-actions button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;border:1px solid #8c855f!important;border-radius:8px!important;background:#142d36!important;color:#f1e6c8!important;padding:8px!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197-actions .arsenal-offers197{display:none!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197-capacity{font:600 11px/1.2 system-ui,sans-serif!important;color:#e7d7ad!important;padding:0 2px!important}
.s399-bag-legend{flex:none;margin:0;padding:0 2px;color:#bac9bd;font:10px/1.35 system-ui,sans-serif;overflow-wrap:anywhere}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-bag{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important;min-height:90px!important;flex:1 1 auto!important;max-height:none!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell{background:linear-gradient(145deg,#213e49,#102731)!important;color:#ecdfbd!important;box-shadow:inset 0 0 10px #071c2740!important;min-height:56px!important;border-radius:9px!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell.is-empty{background:#142b32!important;opacity:.45!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell small{right:4px!important;bottom:4px!important;font:700 10px/1.1 system-ui,sans-serif!important;padding:2px 3px!important;background:#071b24e6!important;color:#f8edd1!important;border-radius:4px!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell small::before{content:'Lv ';font-size:8px;font-weight:500}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell .gear-delta-arrow{left:4px!important;right:auto!important;bottom:4px!important;top:auto!important;font-size:11px!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell .arsenal-new-dot197{width:auto!important;height:auto!important;left:4px!important;top:4px!important;padding:1px 4px!important;line-height:12px!important;border-radius:4px!important;background:#e4c879!important;box-shadow:none!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell .arsenal-new-dot197::after{content:'NEW';font:800 8px/12px system-ui,sans-serif;color:#25372a;display:block}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-cell.is-new::after{display:none!important}
:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .dungeon-bag-note265,:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .sanctuary-bag-empty{color:#c1d0c4!important}

/* Details share the Bag palette; an equipped item has one compact stat summary. */
.s397-comparison{background:#10262e;color:#f1ead5;border-color:#9b875e}.s397-detail-heading{background:#19353a;border-color:#776e50}.s397-detail-heading h3{color:#ffedc2}.s397-detail-heading small,.s397-detail-heading p{color:#bdcdbf}.s397-detail-heading .s397-item-art{background:#27433f;border-color:#a28a57}.s397-close-detail{background:#284942;color:#f3e7c6}
.s397-detail-scroll{font-size:12px}.s397-compare-cards>div{background:#19333b;border-color:#657366;color:#eee6cf}.s397-compare-cards .is-selected{background:#27483f;border-color:#9bb58e}.s397-compare-cards small{color:#bdcdbb}.s397-verdict{color:#d4e2ca}
.s397-stat-section table{font-size:13px}.s397-stat-section th,.s397-stat-section td{border-color:#506356}.s397-stat-section thead th{color:#b8cbbb;font-size:11px}.s397-stat-section th:first-child{width:35%}.s397-positive{color:#91e3ab}.s397-negative{color:#ffa996}.s397-neutral{color:#bdc7b4}
.s397-warden-impact{background:#294a3d;color:#e0edda}.s397-item-tags span{border-color:#71816b;color:#d8e3ce}.s397-item-source{color:#bdcdb9}.s397-breakdown{border-color:#687759}.s397-contributions li{border-color:#415d4f}.s397-special-effect{background:#2e4232;border-color:#84916a}.s397-special-effect small,.s397-muted{color:#bdccb8}.s397-detail-tools button{background:#23463e;border-color:#829374;color:#f1ebd2}.s397-delete-item{color:#f3b5a1}
.s397-equipment-actions{background:#19382f;border-color:#7c8a64}.s397-restriction{color:#ffc2aa}.s397-equip-button{background:linear-gradient(#446e46,#315439);border-color:#8ca46c;color:#fff1ce}.s399-equipped-status{display:inline-block;margin:0 0 4px;padding:3px 8px;border:1px solid #78986c;border-radius:5px;background:#2a503d;color:#dff0c9;font-size:11px;font-weight:600}
@media(max-width:480px){:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-bag{grid-template-columns:repeat(4,minmax(0,1fr))!important}.s397-identity small{font-size:10px}.s397-equipment-slot small{font-size:9px}}
@media(max-width:360px){:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .arsenal-onebar197-actions select{width:64px!important;max-width:64px!important}.s397-identity small{display:none}.s397-character-stats>span{font-size:12px}}
@media(max-height:680px){.s397-paper-grid{height:188px}.s397-paperdoll{padding:5px}.s397-character-stats{margin-top:3px}}
@media(max-height:520px){:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-panel.sanctuary-arsenal-v397.is-gear397>.immersive-panel-body{overflow-y:auto!important}:is(#root,body) dialog.s-modal253[data-kind="equipment-panel397"] .equipment-v2-bag{height:180px!important;max-height:180px!important;flex:none!important}}
.s399-retry-gear{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);width:max-content;max-width:100%;min-height:44px;padding:4px 7px;border:1px solid #bca46d;border-radius:7px;background:#183b36ed;color:#fff0c9;font-size:10px}
