/* Approved Emerald Noir graphic skin. Shared Equipment/Forge board; fitted grid/input remain in their owning modules. */
.equipment-modal:has(.gear-main-bust){--noir-ink:#050906;--noir-green:#102213;--noir-gold:#c3a15b;--noir-ivory:#f4e8c6}
.equipment-modal:has(.gear-main-bust) .sheet{position:relative;background:radial-gradient(ellipse at 30% 0,#18271555,transparent 65%),#050906;border-color:#9b783c;border-radius:12px;box-shadow:inset 0 0 0 3px #020403,inset 0 0 0 4px #c5a25735,0 20px 65px #000b;color:var(--noir-ivory)}
.equipment-modal:has(.gear-main-bust) .sheet::after,.equipment-modal:has(.gear-main-bust) :is(.gear-main,.gear-picker,.gear-inspector,.gear-skills)::after{content:'';position:absolute;inset:0;z-index:5;pointer-events:none;border:14px solid transparent;border-image-source:url('ui/emerald-noir/frame-v1.webp');border-image-slice:9.5%;border-image-repeat:stretch}
.equipment-modal:has(.gear-main-bust) .sheet::after{border-width:13px}
.equipment-modal:has(.gear-main-bust) :is(.gear-main,.gear-picker,.gear-inspector,.gear-skills){position:relative;isolation:isolate;background:radial-gradient(ellipse at 50% 0,#23371930,transparent 70%),repeating-linear-gradient(115deg,#c8d6aa02 0 1px,transparent 1px 4px),#050a07;border:1px solid #9b7b3d88;border-radius:10px;box-shadow:inset 0 0 0 3px #020604,inset 0 0 0 4px #bfa35f20}
.equipment-modal:has(.gear-main-bust) :is(.gear-main,.gear-picker,.gear-inspector,.gear-skills){top:auto;right:auto;bottom:auto;left:auto}
.equipment-modal:has(.gear-main-bust) .sheet-head{background:transparent!important;border-color:#b99b534f}
.equipment-modal:has(.gear-main-bust) .sheet-head h2{font-family:Georgia,'Times New Roman',serif;color:#f5e8c2;font-size:26px;letter-spacing:.2px;text-shadow:0 2px 3px #000}
.equipment-modal:has(.gear-main-bust) .eyebrow{color:#c4a460}
.equipment-modal:has(.gear-main-bust) .gear-section-title{color:#e3c478;text-shadow:0 1px 2px #000;letter-spacing:1.2px}
.equipment-modal:has(.gear-main-bust) .gear-main-bust .gear-art-stage{background:radial-gradient(ellipse at 50% 35%,#2d4623,#132313 60%,#080f09);border-radius:6px}
.equipment-modal:has(.gear-main-bust) .gear-main-bust .gear-art-stage::before{background:linear-gradient(180deg,transparent,#07100766 65%,#050b07d9)}
.equipment-modal:has(.gear-main-bust) :is(.gear-slot,.inventory-cell){border-radius:7px!important}
.equipment-modal:has(.gear-main-bust) :is(.gear-slot,.inventory-cell)::before{background:linear-gradient(140deg,#e8cc7f,#8e672b 28%,#c49b46 58%,#5d421e 80%,#d0aa58)}
.equipment-modal:has(.gear-main-bust) :is(.gear-slot,.inventory-cell)::after{inset:1.5px;background:radial-gradient(ellipse at 45% 25%,#142613,#08120a 70%,#040906);box-shadow:inset 0 0 0 1px #d4b86c22,inset 0 2px 5px #000b}
.equipment-modal:has(.gear-main-bust) .inventory-cell.empty-cell::before{opacity:.57}
.equipment-modal:has(.gear-main-bust) :is(.gear-slot.focused,.inventory-cell.selected)::before{background:linear-gradient(145deg,#fff3b7,#d9aa3f 35%,#ffec91 60%,#bd8230)}
.equipment-modal:has(.gear-main-bust) :is(.gear-slot.focused,.inventory-cell.selected){box-shadow:0 0 9px #e7b64e80!important}
.equipment-modal:has(.gear-main-bust) :is(.gear-slot.focused,.inventory-cell.selected)::after{background:radial-gradient(ellipse at 45% 25%,#26391b,#101e0d 70%,#080d05)}
.equipment-modal:has(.gear-main-bust) .gear-hero h3{font-family:Georgia,'Times New Roman',serif;color:#fff0cc;font-size:18px;text-shadow:0 2px 4px #000}
.equipment-modal:has(.gear-main-bust) .gear-hero-hint{display:inline-block;padding:3px 10px;border:1px solid #b6944b;border-radius:5px;background:linear-gradient(#243118,#091207);color:#f5d68e;box-shadow:inset 0 0 0 1px #020601,0 2px 4px #0006}
.equipment-modal:has(.gear-main-bust) .gear-all-stats{background:linear-gradient(140deg,#0c1309,#030705);border-color:#a084435e;border-radius:5px;box-shadow:inset 0 0 0 1px #b4994f16}
.equipment-modal:has(.gear-main-bust) .gear-stat-table>div{border-color:#b29c5226}
.equipment-modal:has(.gear-main-bust) .gear-stat-table span{color:#d8d2b4}
.equipment-modal:has(.gear-main-bust) .gear-stat-table b{color:#e8c779}
.equipment-modal:has(.gear-main-bust) .gear-stat-table b.stat-preview-up{color:#86ed9b}
.equipment-modal:has(.gear-main-bust) .gear-stat-table b.stat-preview-down{color:#ff8c7e}
.equipment-modal:has(.gear-main-bust) .inventory-slots{border-color:#8c753c8c;background:#030805}
.equipment-modal:has(.gear-main-bust) .gear-inspector h3{font-family:Georgia,'Times New Roman',serif;color:#f6e5bb;text-shadow:0 1px 3px #000}
.equipment-modal:has(.gear-main-bust) .gear-inspector p{color:#d6d1b6}
.equipment-modal:has(.gear-main-bust) :is(.gear-compare,.detail-item-stats){border-color:#ad8d444d}
.equipment-modal:has(.gear-main-bust) .gear-inspector h4{color:#dabb70}
.equipment-modal:has(.gear-main-bust) :is(.single-item-details,.gear-detail-scroll)>.gear-compare{flex-shrink:0;margin-top:8px;padding:7px 0}
.equipment-modal:has(.gear-main-bust) :is(.single-item-details,.gear-detail-scroll)>h4{flex-shrink:0;margin:9px 0 4px}
.equipment-modal:has(.gear-main-bust) .single-item-details .gear-option{padding:5px 8px;margin:4px 0}
.equipment-modal:has(.gear-main-bust) .gear-option{border-color:#9b81413f;background:linear-gradient(90deg,#151d0c,#060c07);border-radius:4px;color:#9eaa8c}
.equipment-modal:has(.gear-main-bust) .detail-item{background:linear-gradient(140deg,#101a0d,#040906);border-color:#967b3b55}
.equipment-modal:has(.gear-main-bust) :is(input,select){background:#040b06;border-color:#8d783d80;color:#eae3c6;border-radius:5px;box-shadow:inset 0 2px 4px #0007}
.equipment-modal:has(.gear-main-bust) button{background:linear-gradient(#192312,#060d07);border-color:#92753780;color:#e5d9b5;border-radius:5px;box-shadow:inset 0 0 0 1px #c9a65814}
.equipment-modal:has(.gear-main-bust) button:hover:not(:disabled){background:linear-gradient(#2d3b1a,#101c0b);border-color:#e4c36d}
.equipment-modal:has(.gear-main-bust) button.gold{background:linear-gradient(#344322,#11200b);border-color:#d3b265;color:#ffe3a0}
.equipment-modal:has(.gear-main-bust) .gear-equip{background-color:#0c1b09;background-image:url('ui/emerald-noir/button-v1.webp');background-repeat:no-repeat;background-size:104% 214%;background-position:50% 49%;border-color:#b99b52;border-radius:7px;box-shadow:0 2px 5px #0009;font-family:Georgia,'Times New Roman',serif;font-size:18px;line-height:1.1;padding:8px;letter-spacing:1px;color:#ffe8b3;text-shadow:0 2px 2px #000}
.equipment-modal:has(.gear-main-bust) .gear-equip:hover:not(:disabled){background-image:url('ui/emerald-noir/button-v1.webp');background-color:#15270e;filter:brightness(1.12)}
.equipment-modal:has(.gear-main-bust) .gear-equip:disabled{opacity:.6;filter:saturate(.5)}
@media(max-height:820px){.equipment-modal:has(.gear-main-bust) .gear-equip{font-size:16px;line-height:1.1;padding:8px}}
@media(min-width:1200px) and (min-height:820px){.equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art,.equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art img{height:140px}.equipment-modal:has(.gear-main-bust) .gear-inspector h3{font-size:27px}}
@media(max-height:820px){.equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art,.equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art img{height:85px}.equipment-modal:has(.gear-main-bust) :is(.single-item-details,.gear-detail-scroll)>p{font-size:9.5px;line-height:1.4}.equipment-modal:has(.gear-main-bust) .single-item-details .gear-option{font-size:9px;padding:3px 7px;margin:2px 0}.equipment-modal:has(.gear-main-bust) :is(.single-item-details,.gear-detail-scroll)>.gear-compare{padding:5px 0;margin-top:5px}.equipment-modal:has(.gear-main-bust) .single-item-details .gear-compare div{margin:2px 0}.equipment-modal:has(.gear-main-bust) :is(.single-item-details,.gear-detail-scroll)>h4{margin:6px 0 3px}}
@media(max-width:1100px){.equipment-modal:has(.gear-main-bust) .gear-hero h3{font-size:13px}.equipment-modal:has(.gear-main-bust) .gear-hero-hint{padding:2px 5px}}
@media(max-width:700px){.equipment-modal:has(.gear-main-bust) .sheet-head h2{font-size:18px}.equipment-modal:has(.gear-main-bust) :is(.gear-main,.gear-picker,.gear-inspector,.gear-skills)::after{border-width:6px}.equipment-modal:has(.gear-main-bust) .sheet::after{border-width:7px}.equipment-modal:has(.gear-main-bust) :is(.gear-slot,.inventory-cell){border-radius:4px!important}.equipment-modal:has(.gear-main-bust) .gear-hero h3{font-size:9px}.equipment-modal:has(.gear-main-bust) .gear-hero-hint{padding:1px 2px;font-size:7px}.equipment-modal:has(.gear-main-bust) .gear-equip{font-size:10px;letter-spacing:0}}

/* Typography and controls follow the approved painted Equipment board. The grid
   still owns its fitted cell dimensions; these surfaces never resize on hover. */
.equipment-modal:has(.gear-main-bust){--noir-serif:Georgia,'Times New Roman',serif}
.equipment-modal:has(.gear-main-bust) .sheet-head>div:first-child{display:flex;align-items:center;gap:22px;min-width:0}
.equipment-modal:has(.gear-main-bust) .sheet-head .eyebrow{display:flex;align-items:center;gap:10px;white-space:nowrap;border-right:1px solid #bc984b66;padding-right:22px;font:600 11px var(--noir-serif);letter-spacing:1.3px}
.equipment-modal:has(.gear-main-bust) .sheet-head .eyebrow::before{content:'';display:block;width:28px;height:28px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23c99e48' d='M29 2C14 2 4 9 5 23 16 26 27 15 29 2Z'/%3E%3Cpath d='M2 30 25 6M8 24l1-11m5 5 10-2M18 14V7' fill='none' stroke='%2353411a' stroke-width='1.5'/%3E%3Cpath d='M2 30 25 6' fill='none' stroke='%23f1cf77' stroke-width='1.2'/%3E%3C/svg%3E") center/contain no-repeat;filter:drop-shadow(0 1px 1px #000)}
.equipment-modal:has(.gear-main-bust) .sheet-head h2{margin:4px 0;font-weight:600}
.equipment-modal:has(.gear-main-bust) #close-panel{font:30px/1 var(--noir-serif);width:36px;height:36px;padding:0;border:2px solid #b58b36;border-radius:5px;color:#f1cf79;box-shadow:inset 0 0 0 2px #030a04,0 2px 4px #000}
.equipment-modal:has(.gear-main-bust) .gear-section-title{font:600 19px/1.1 var(--noir-serif);letter-spacing:.25px;padding:2px 7px 9px;min-height:29px;gap:8px;border-bottom:1px solid #ad8c3938;margin-bottom:8px;background:linear-gradient(90deg,#b9a04e0b,transparent 80%)}
.equipment-modal:has(.gear-main-bust) .gear-section-title>span{font:11px/1.2 var(--noir-serif);letter-spacing:0;color:#ded6b6;text-shadow:none;text-align:right}
.equipment-modal .compact-equipment:not(.forge-workspace) > :is(.gear-main,.gear-picker,.gear-inspector) > .gear-section-title > span{font-weight:700}
.equipment-modal:has(.gear-main-bust) .gear-all-stats{padding:7px 9px 5px;border:1px solid #947c3b66;box-shadow:inset 0 0 0 2px #0008;border-radius:8px}
.equipment-modal:has(.gear-main-bust) .gear-all-stats>.gear-section-title{font-size:17px;padding:0 0 7px;margin-bottom:3px;min-height:24px;background:none}
.equipment-modal:has(.gear-main-bust) .gear-stat-table>div{font:13px/1.15 var(--noir-serif);min-height:21px}
.equipment-modal:has(.gear-main-bust) .gear-stat-table b{font:600 14px/1.15 var(--noir-serif);font-variant-numeric:tabular-nums}
.equipment-modal:has(.gear-main-bust) .gear-hero h3{font-size:23px;margin-bottom:7px}
.equipment-modal:has(.gear-main-bust) .gear-hero-hint{font:600 13px/1.2 var(--noir-serif);padding:5px 16px;border:1px solid #c9a24d;box-shadow:inset 0 0 0 1px #030703,inset 0 0 0 2px #a7863733,0 2px 4px #000;background:linear-gradient(#29351a,#061107);color:#f7dda0}
.equipment-modal:has(.gear-main-bust) .inventory-toolbar{gap:9px;margin-bottom:10px}
.inventory-toolbar #gear-kind{flex:none;width:min(9rem,38%);min-width:0;margin:0;padding:4px;font-size:clamp(9px,1vw,13px)}
.equipment-modal:has(.gear-main-bust) .inventory-toolbar [data-gear-all]{flex:none;position:relative;font:600 14px/1 var(--noir-serif);padding:9px 28px 9px 12px;border:1px solid #ba9344;box-shadow:inset 0 0 0 1px #010602,inset 0 0 0 2px #b2924444,0 2px 3px #0009;border-radius:6px;background:linear-gradient(#26301b,#060d07)}
.equipment-modal:has(.gear-main-bust) [data-gear-all]::after{content:'';position:absolute;right:11px;top:calc(50% - 2px);border:5px solid transparent;border-top-color:#d9b75f;border-bottom:0;filter:drop-shadow(0 1px 1px #000)}
.equipment-modal:has(.gear-main-bust) #gear-search{min-width:0;flex:1;font:14px/1.2 var(--noir-serif);height:34px;padding:6px 9px 6px 33px;border:1px solid #897c4a;border-radius:6px;color:#f0e5c3;background:#040b06 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23b49751' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E") no-repeat 9px center;background-size:18px;box-shadow:inset 0 1px 4px #0009}
.equipment-modal:has(.gear-main-bust) #gear-search::placeholder{color:#b5b099;opacity:1}
.equipment-modal:has(.gear-main-bust) :is(button,input):focus-visible{outline:2px solid #ffe3a0;outline-offset:2px}
.equipment-modal:has(.gear-main-bust) .gear-pagination{gap:6px;align-items:center}
.equipment-modal:has(.gear-main-bust) .gear-pagination button{min-width:30px;min-height:29px;padding:3px 8px;font:600 17px/1 var(--noir-serif);border:1px solid #a88b48;box-shadow:inset 0 0 0 1px #010602,inset 0 0 0 2px #bca05922,0 2px 3px #000}
.equipment-modal:has(.gear-main-bust) .gear-pagination button.gold,.equipment-modal:has(.gear-main-bust) [data-stat-page].gold{color:#fff0be;border-color:#f1ce78;background:linear-gradient(#69501b,#211a08);box-shadow:inset 0 0 0 1px #080b03,inset 0 0 0 2px #e7bf5e55,0 0 5px #c99e4944}
.equipment-modal:has(.gear-main-bust) .gear-pagination small{font:12px var(--noir-serif);color:#d8d0ae}
.equipment-modal:has(.gear-main-bust) [data-stat-page]{font:600 12px/1 var(--noir-serif);min-width:24px;min-height:22px;padding:3px 5px;border:1px solid #9c8244}
.equipment-modal:has(.gear-main-bust) .gear-inspector :is(p,.gear-compare,.detail-item-stats){font-family:var(--noir-serif);font-size:14px;line-height:1.35}
.equipment-modal:has(.gear-main-bust) .gear-inspector :is(h4,.gear-compare>small){font:600 14px/1.2 var(--noir-serif);color:#e3bf67}
.equipment-modal:has(.gear-main-bust) .item-skill-heading{font:600 14px/1.3 var(--noir-serif);color:#edca79}
.equipment-modal:has(.gear-main-bust) .item-skill-kind{color:#e0bd67;font-family:var(--noir-serif)}
.equipment-modal:has(.gear-main-bust) .gear-inspector .badge{font:600 14px/1 var(--noir-serif);padding:4px 8px;border:1px solid #c09c4d;border-radius:4px;box-shadow:inset 0 0 0 1px #030803;color:#ffe2a0;background:linear-gradient(#293019,#070e05);vertical-align:middle}
.equipment-modal:has(.gear-main-bust) .gear-option{font:13px/1.2 var(--noir-serif);border:1px solid #8a7c444f;box-shadow:inset 0 0 0 1px #0008}
.equipment-modal:has(.gear-main-bust) .gear-option span{color:#e7c986;font:600 13px var(--noir-serif)}
.equipment-modal:has(.gear-main-bust) .gear-option[class*="opt-r"]{border-color:#c59f48;background:linear-gradient(90deg,#58471955,#18200b 70%,#0a1006);color:#f6d98e}
.equipment-modal:has(.gear-main-bust) .gear-option>small{font-size:0;display:block;width:13px;height:16px;opacity:.65;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'%3E%3Cpath d='M4 8V5a4 4 0 0 1 8 0v3' fill='none' stroke='%23c1bb97' stroke-width='2'/%3E%3Crect x='2' y='8' width='12' height='11' rx='2' fill='%23c1bb97'/%3E%3Cpath d='M8 12v4' stroke='%23081007' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat}
.equipment-modal:has(.gear-main-bust) .gear-option[class*="opt-r"]>small{background:none;opacity:1;font-size:0}
.equipment-modal:has(.gear-main-bust) .gear-option[class*="opt-r"]>small::after{content:'✓';font:600 18px/16px var(--noir-serif);color:#f4d176}
.equipment-modal:has(.gear-main-bust) button.gear-equip{min-height:44px;font-size:22px;text-transform:uppercase;letter-spacing:.4px;background:#0c1b09 url('ui/emerald-noir/button-v1.webp') no-repeat 50% 49%/104% 214%;border-color:#d0af5c}
.equipment-modal:has(.gear-main-bust) button.gear-equip:hover:not(:disabled){background:#15270e url('ui/emerald-noir/button-v1.webp') no-repeat 50% 49%/104% 214%}
.equipment-modal:has(.gear-main-bust) .gear-equip:disabled{opacity:.8;color:#bdba9f;filter:saturate(.45)}
@media(max-height:900px), (max-width:1100px){
 .equipment-modal:has(.gear-main-bust) .sheet-head .eyebrow{font-size:9px;padding-right:14px;letter-spacing:.8px}
 .equipment-modal:has(.gear-main-bust) .sheet-head>div:first-child{gap:14px}
 .equipment-modal:has(.gear-main-bust) .gear-section-title{font-size:16px;min-height:24px;margin-bottom:6px;padding-bottom:6px}
 .equipment-modal:has(.gear-main-bust) .gear-section-title>span{font-size:9px}
 .equipment-modal:has(.gear-main-bust) .gear-all-stats>.gear-section-title{font-size:14px;min-height:20px}
 .equipment-modal:has(.gear-main-bust) .gear-stat-table>div{font-size:11px;min-height:18px}
 .equipment-modal:has(.gear-main-bust) .gear-stat-table b{font-size:12px}
 .equipment-modal:has(.gear-main-bust) .gear-inspector :is(p,.gear-compare,.detail-item-stats){font-size:11px;line-height:1.3}
 .equipment-modal:has(.gear-main-bust) .gear-inspector :is(h4,.gear-compare>small),.equipment-modal:has(.gear-main-bust) .item-skill-heading{font-size:12px}
 .equipment-modal:has(.gear-main-bust) .gear-option{font-size:11px}
 .equipment-modal:has(.gear-main-bust) button.gear-equip{min-height:36px;font-size:18px}
 .equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art,.equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art img{height:105px}
}
@media(max-height:820px){
 .equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art,.equipment-modal:has(.gear-main-bust) .single-item-details .gear-detail-art img{height:85px}
}
@media(max-width:1100px){
 .equipment-modal:has(.gear-main-bust) .gear-hero h3{font-size:16px}
 .equipment-modal:has(.gear-main-bust) .gear-hero-hint{font-size:11px;padding:4px 8px}
 .equipment-modal:has(.gear-main-bust) .gear-section-title{font-size:13px;padding-left:2px;padding-right:2px}
 .equipment-modal:has(.gear-main-bust) .gear-all-stats>.gear-section-title{font-size:12px}
 .equipment-modal:has(.gear-main-bust) .inventory-toolbar{gap:5px}
 .equipment-modal:has(.gear-main-bust) .inventory-toolbar [data-gear-all]{font-size:11px;padding-left:7px;padding-right:23px}
 .equipment-modal:has(.gear-main-bust) #gear-search{font-size:11px}
}
@media(max-width:700px){
 .equipment-modal:has(.gear-main-bust) .sheet-head>div:first-child{display:block}
 .equipment-modal:has(.gear-main-bust) .sheet-head .eyebrow{border:0;padding:0;font-size:7px;gap:4px}
 .equipment-modal:has(.gear-main-bust) .sheet-head .eyebrow::before{width:17px;height:17px}
 .equipment-modal:has(.gear-main-bust) .gear-section-title{font-size:11px;min-height:20px;gap:3px}
 .equipment-modal:has(.gear-main-bust) .gear-section-title>span{font-size:8px}
 .equipment-modal:has(.gear-main-bust) .gear-all-stats{padding:5px}
 .equipment-modal:has(.gear-main-bust) .gear-all-stats>.gear-section-title{font-size:10px}
 .equipment-modal:has(.gear-main-bust) .gear-stat-table>div{font-size:8px;min-height:15px}
 .equipment-modal:has(.gear-main-bust) .gear-stat-table b{font-size:9px}
 .equipment-modal:has(.gear-main-bust) .gear-hero h3{font-size:10px}
 .equipment-modal:has(.gear-main-bust) .gear-hero-hint{font-size:8px;padding:2px 4px}
 .equipment-modal:has(.gear-main-bust) button.gear-equip{font-size:12px;min-height:30px}
}
@media(max-width:900px){
 .equipment-modal:has(.gear-main-bust) .gear-pagination{gap:3px;flex-wrap:nowrap}
 .equipment-modal:has(.gear-main-bust) .gear-pagination button{min-width:19px;min-height:23px;padding:2px 4px;font-size:12px}
 .equipment-modal:has(.gear-main-bust) .gear-pagination small{font-size:8px;white-space:nowrap}
 .equipment-modal:has(.gear-main-bust) .inventory-toolbar [data-gear-all]{font-size:10px;padding:6px 22px 6px 7px}
 .equipment-modal:has(.gear-main-bust) #gear-search{height:28px;font-size:10px;padding-left:27px;background-size:14px}
}

/* Shared cell dimensions, independent of each page's column/panel width.
   Keep each page's existing layout and pagination; a wide panel fits more cells. */
:root{--inventory-item-size:72px}
:is(.bag-grid,.trade-inventory-grid){grid-template-columns:repeat(auto-fill,var(--inventory-item-size))!important;grid-auto-rows:var(--inventory-item-size);gap:3px;align-content:start}
:is(.bag-grid,.trade-inventory-grid)>.trade-item-icon{box-sizing:border-box;width:var(--inventory-item-size);height:var(--inventory-item-size);min-height:var(--inventory-item-size)!important;max-height:var(--inventory-item-size);aspect-ratio:1;align-self:start;justify-self:start;padding:4px}
:is(.bag-grid,.trade-inventory-grid)>.trade-item-icon img{width:100%;height:100%;object-fit:contain}
@media(max-width:700px){:is(.bag-grid,.trade-inventory-grid)>.trade-item-icon{padding:1px}}

/* Equipment bag sockets match Market Seller's simple one-pixel frame.
   Worn sockets and the panel's authored gold frame keep their own treatment. */
.equipment-modal:has(.gear-main-bust) .gear-picker .inventory-cell{border:1px solid #a28b4e55!important;border-radius:4px!important;background:var(--inventory-item-background)!important;box-shadow:inset 0 1px 0 #ead89c13!important}
.equipment-modal:has(.gear-main-bust) .gear-picker .inventory-cell::before,.equipment-modal:has(.gear-main-bust) .gear-picker .inventory-cell::after{display:none}
.equipment-modal:has(.gear-main-bust) .gear-picker .inventory-cell.selected{border-color:#f0ce7f!important;box-shadow:inset 0 0 12px #d3b87533!important}
.equipment-modal:has(.gear-main-bust) .gear-picker button.inventory-cell:hover:not(:disabled){border-color:var(--relic-gold-bright)!important;background:linear-gradient(180deg,#344839,#1b2b21)!important;box-shadow:inset 0 1px 0 #f9e4b826,0 0 10px #c6a35e15!important}

/* The stat page renderer marks the current page with aria-pressed / .on. */
.equipment-modal .gear-stat-pages button[aria-pressed="true"]{color:#fff0be;border-color:#f1ce78;background:linear-gradient(#69501b,#211a08);box-shadow:inset 0 0 0 1px #080b03,inset 0 0 0 2px #e7bf5e55,0 0 5px #c99e4944}
.equipment-modal .gear-stat-pages button[aria-pressed="false"]{background:linear-gradient(#192312,#060d07);border-color:#a88b48;color:#e5d9b5;box-shadow:inset 0 0 0 1px #010602,inset 0 0 0 2px #bca05922,0 2px 3px #000}

/* Shared Equipment/Forge board: the stats-page controls remain visible on phones. */
.equipment-modal .forge-workspace>.gear-inspector>.gear-section-title>span{font-weight:700}
.equipment-modal .gear-all-stats .gear-stat-pages{display:inline-flex;flex:none;margin-left:auto}
@media(max-width:650px){.equipment-modal .gear-all-stats>.gear-section-title{flex-wrap:wrap}}
@media(max-height:550px){
 body.touch-ui .equipment-modal .compact-equipment:has(.gear-main-bust){--gear-cell:clamp(12px,5vh,22px)}
 body.touch-ui .equipment-modal .compact-equipment .gear-main-bust .gear-art-stage{height:auto;flex:1;min-height:0}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-hero h3{font-size:12px;line-height:1.1;margin-bottom:2px}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-hero-hint{font-size:9px;padding:2px 5px}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-character-caption{bottom:8px}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-all-stats{margin-top:4px;padding:3px 5px}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-all-stats>.gear-section-title{font-size:11px;min-height:18px;padding-bottom:2px;margin-bottom:2px}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-stat-table{gap:1px 8px}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-stat-table>div{font-size:9px;min-height:11px;line-height:1.1}
 body.touch-ui .equipment-modal:has(.gear-main-bust) .gear-stat-table b{font-size:10px;line-height:1.1}
 .equipment-modal:has(.gear-main-bust) .forge-center{gap:3px}
 .equipment-modal:has(.gear-main-bust) .forge-center>.gear-section-title{font-size:12px;min-height:20px;padding-bottom:3px;margin-bottom:2px}
 .equipment-modal:has(.gear-main-bust) .forge-center>.gear-section-title>span{font-size:8px}
 .equipment-modal:has(.gear-main-bust) .forge-scene{--forge-fixed-height:45px;height:45px;min-height:45px;max-height:45px;flex:0 0 45px}
 .equipment-modal:has(.gear-main-bust) .forge-selected-slot{width:38px;height:38px;padding:3px}
 .equipment-modal:has(.gear-main-bust) .forge-target-name{font-size:11px;line-height:1.1;min-height:25px}
 .equipment-modal:has(.gear-main-bust) .forge-target-name span{font-size:9px;margin-top:1px}
 .equipment-modal:has(.gear-main-bust) .forge-inline-preview{padding:3px 5px}
 .equipment-modal:has(.gear-main-bust) .forge-inline-preview>div{font-size:8px;line-height:10px}
 .equipment-modal:has(.gear-main-bust) .forge-cost{font-size:10px;padding:2px 5px;gap:2px}
 .equipment-modal:has(.gear-main-bust) :is(.forge-enhance,.forge-reroll){font-size:10px;padding:5px;min-height:25px}
}

/* Standalone Inventory fits complete standard-size rows/columns to its filters. */
.bag-modal:has(.bag-workspace) .sheet{height:var(--bag-sheet-height,94dvh)}
.bag-workspace .bag-grid{position:relative;grid-template-columns:repeat(var(--bag-columns,6),var(--inventory-item-size))!important;grid-template-rows:repeat(var(--bag-rows,5),var(--inventory-item-size));grid-auto-rows:var(--inventory-item-size);align-content:start;gap:3px;overflow:hidden}
.bag-workspace .trade-item-icon{overflow:hidden}
.bag-workspace>.gear-inspector{grid-column:2;grid-row:1}
.bag-workspace .trade-item-icon img{display:block}
.bag-workspace .trade-item-icon>b{font-size:clamp(6px,calc(var(--inventory-item-size) * .15),10px)}
.bag-workspace .trade-item-icon>small{font-size:clamp(6px,calc(var(--inventory-item-size) * .16),11px)}
.bag-workspace .bag-empty-cell{pointer-events:none;background:#08100c!important;border:1px solid #a28b4e55!important;border-radius:4px!important;box-shadow:inset 0 1px 0 #ead89c13!important}
.bag-workspace .bag-empty-cell::before,.bag-workspace .bag-empty-cell::after{display:none}
.bag-empty-message{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;margin:0;text-align:center;text-shadow:0 1px 3px #000}

/* Equipment owns both socket dimensions and numeric typography. Shared with Forge. */
.equipment-modal .compact-equipment{--gear-level-font:9px;--gear-level-line:10px;--gear-count-font:10px;--gear-count-line:11px;--gear-side-offset:6px}
.equipment-modal .compact-equipment :is(.gear-main-bust .gear-slot,.gear-picker .inventory-cell){box-sizing:border-box;width:var(--gear-cell);min-width:var(--gear-cell);max-width:var(--gear-cell);height:var(--gear-cell);min-height:var(--gear-cell);max-height:var(--gear-cell);flex-shrink:0}
.equipment-modal .compact-equipment :is(.gear-slot-art .gear-item-level,.inventory-cell .inventory-level){font-size:var(--gear-level-font);line-height:var(--gear-level-line);font-weight:600}
.equipment-modal .compact-equipment :is(.gear-slot-art .gear-item-count,.inventory-cell .inventory-count){font-size:var(--gear-count-font);line-height:var(--gear-count-line);font-weight:600}
.equipment-modal .compact-equipment .inventory-cell .inventory-count{color:#fff}
.equipment-modal .compact-equipment .gear-main-bust .gear-art-side{transform:translateY(var(--gear-side-offset))}
.gear-flip-details [data-gear-detail-flip]{cursor:pointer}
.equipment-modal .compact-equipment .gear-flip-details{overflow:hidden}
.gear-flip-details>.gear-section-title,.gear-detail-actions{flex:none}
.gear-detail-scroll{flex:1 1 0;min-height:0;min-width:0;overflow:auto;overflow-wrap:anywhere;scrollbar-width:thin;scrollbar-color:#8e713c #0a130d}
.gear-detail-actions{padding-top:8px}
.equipment-modal:has(.gear-main-bust) .gear-detail-actions>button.gear-equip{margin-top:0;border:0;box-shadow:none}
.gear-detail-summary{display:grid;grid-template-columns:clamp(52px,6vw,88px) minmax(0,1fr);align-items:center;gap:10px;padding:4px 0 10px;margin-bottom:9px;border-bottom:1px solid #b99b5238}
:is(.equipment-modal:has(.gear-main-bust),.bag-modal,.equip-pack-results,.explorer-detail) .gear-detail-summary .gear-detail-art{height:auto;aspect-ratio:1;margin:0;min-height:0;border:1px solid #a8884e;border-radius:5px;background:radial-gradient(ellipse,#24392a,#0a140e)}
:is(.equipment-modal:has(.gear-main-bust),.bag-modal,.equip-pack-results,.explorer-detail) .gear-detail-summary .gear-detail-art img{height:100%;width:100%;padding:5px;object-fit:contain}
:is(:is(.equipment-modal:has(.gear-main-bust),.bag-modal) .gear-inspector,.bag-modal .market-details,.explorer-detail) .gear-detail-heading h3{font-size:clamp(13px,1vw,16px);line-height:1.25;margin:0 0 5px}
.gear-detail-meta{display:grid;gap:2px;font-size:12px;line-height:1.3;color:#eee0b9}
.gear-detail-meta small{font-size:.84em;color:#dabb70}
.explorer-detail .explorer-summary{overflow-wrap:anywhere}
.explorer-ownership{font-size:9px;color:#cbb988}
/* The first three stats fill the left column before the right column starts. */
:is(.gear-compare,.trade-detail-stats,.explorer-stats).item-detail-stats{display:block}
:is(.gear-compare,.trade-detail-stats,.explorer-stats).item-detail-stats:has(>div:nth-of-type(4)){
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px
}
.item-detail-stats:has(>small){--item-stat-first-row:2}
.item-detail-stats>small{grid-column:1/-1;grid-row:1}
.item-detail-stats>div{min-width:0;overflow-wrap:anywhere}
.item-detail-stats>div:nth-of-type(-n+3){grid-column:1}
.item-detail-stats>div:nth-of-type(n+4):nth-of-type(-n+6){grid-column:2}
.item-detail-stats>div:nth-of-type(3n+1):nth-of-type(-n+6){grid-row:calc(var(--item-stat-first-row,1) + 0)}
.item-detail-stats>div:nth-of-type(3n+2):nth-of-type(-n+6){grid-row:calc(var(--item-stat-first-row,1) + 1)}
.item-detail-stats>div:nth-of-type(3n):nth-of-type(-n+6){grid-row:calc(var(--item-stat-first-row,1) + 2)}
.item-detail-stats>div:nth-of-type(n+7){grid-column:1/-1}
.item-detail-stats dd{flex:none}

body.touch-ui .equipment-modal:where(:not(.desktop-equipment-layout)) .gear-inspector .gear-detail-heading h3{font-size:14px!important}
body.touch-ui.m-narrow .equipment-modal .gear-detail-scroll{flex:0 1 auto;max-block-size:50dvh}
.gear-flip-details [data-gear-detail-flip][role="button"]:focus-visible{outline:1px solid #f3d183;outline-offset:3px}
.gear-flip-hint{color:#d8bd7b;font-size:11px;text-align:center;margin:3px 0;flex:none}
.gear-flip-overlay{position:fixed;z-index:10000;perspective:1200px;background:#050a07;border-radius:10px;overflow:hidden;pointer-events:none}
.gear-flip-overlay>.gear-inspector{backface-visibility:hidden;transform-origin:center;overflow:hidden}
.gear-flip-outgoing{animation:gear-detail-out 720ms ease-in-out both}
.gear-flip-incoming{animation:gear-detail-in 720ms ease-in-out both}
.gear-flip-card-back{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse,#1b321c,#050a07 75%);backface-visibility:hidden;animation:gear-detail-back 720ms ease-in-out both}
.gear-flip-card-back img{width:78%;height:90%;object-fit:contain;filter:drop-shadow(0 8px 12px #000a)}
.equipment-modal:has(.gear-main-bust) .forge-center>.forge-target-name{min-height:0;margin:2px 0;line-height:1.2;font-weight:600;letter-spacing:.5px}
.equipment-modal .forge-center .forge-enhance{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:5px;flex:none;line-height:1.15;white-space:nowrap}
.forge-button-resources{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:nowrap;font-size:.9em;line-height:1.15;white-space:nowrap}
.forge-material-cost{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.forge-material-cost img{width:14px;height:18px;object-fit:contain;border-radius:2px;filter:drop-shadow(0 1px 2px #0008)}
.equipment-modal .forge-center .forge-reroll{flex:none}
.equipment-modal:has(.gear-main-bust) .forge-center :is(.forge-enhance,.forge-reroll){--forge-button-height:38px;position:relative;isolation:isolate;overflow:hidden;height:var(--forge-button-height);min-height:0;background:none;border-color:transparent;border-radius:6px;box-shadow:none;color:#ffedba;text-shadow:0 1px 2px #000;padding:0 calc(var(--forge-button-height) * .63) 0 calc(var(--forge-button-height) * .92);font-weight:600}
/* The art is 1024 × 341. Scale both end pieces with the height; stretch only the middle. */
.equipment-modal:has(.gear-main-bust) .forge-center :is(.forge-enhance,.forge-reroll)::before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:-55% 0;border-image:var(--forge-button-art) 0 110 0 155 fill / 0 calc(var(--forge-button-height) * .677) 0 calc(var(--forge-button-height) * .955) stretch}
.equipment-modal:has(.gear-main-bust) .forge-center .forge-enhance{--forge-button-art:url('ui/emerald-noir/enchant-v1.webp')}
.equipment-modal:has(.gear-main-bust) .forge-center .forge-reroll{--forge-button-art:url('ui/emerald-noir/reroll-v1.webp')}
.equipment-modal:has(.gear-main-bust) .forge-center :is(.forge-enhance,.forge-reroll):hover:not(:disabled){background:none;filter:brightness(1.15);border-color:transparent;box-shadow:none}
.equipment-modal:has(.gear-main-bust) .forge-center :is(.forge-enhance,.forge-reroll):disabled{filter:saturate(.25);opacity:.45}
@media(max-width:650px){
 .equipment-modal:has(.gear-main-bust) .forge-center .forge-enhance{font-size:8px;gap:2px}
 .forge-button-resources{gap:2px}.forge-material-cost{gap:1px}.forge-material-cost img{width:7px;height:9px}
}
@media(max-height:550px){
 .equipment-modal:has(.gear-main-bust) .forge-center>.gear-section-title>span{display:none}
 .equipment-modal:has(.gear-main-bust) .forge-center :is(.forge-enhance,.forge-reroll){--forge-button-height:26px}
 .equipment-modal:has(.gear-main-bust) .forge-center .forge-enhance{gap:4px;font-size:9px}
 .equipment-modal .forge-center .forge-button-resources{font-size:9px;gap:4px}
 .equipment-modal .forge-center .forge-material-cost{gap:2px}
 .equipment-modal .forge-center .forge-material-cost img{width:10px;height:13px}
}
@keyframes gear-detail-out{0%{transform:rotateY(0);opacity:1}26%,100%{transform:rotateY(90deg);opacity:0}}
@keyframes gear-detail-back{0%,25%{transform:rotateY(-90deg);opacity:0}43%,57%{transform:rotateY(0);opacity:1}75%,100%{transform:rotateY(90deg);opacity:0}}
@keyframes gear-detail-in{0%,74%{transform:rotateY(-90deg);opacity:0}100%{transform:rotateY(0);opacity:1}}
@media(max-width:650px){
 .equipment-modal .compact-equipment{--gear-level-font:6px;--gear-level-line:7px;--gear-count-font:6px;--gear-count-line:7px;--gear-side-offset:3px}
}
