/* Original Work frames/panels; icons remain separate real inventory objects. */
body.gear40 .gear40-slot{background:transparent url('assets/crafting-ui/assets/frames/finished-default.webp') center/100% 100% no-repeat!important;border:0!important;box-shadow:none!important}
body.gear40 .gear40-material{background-image:url('assets/crafting-ui/assets/frames/material-default.webp')!important;border-radius:50%!important}
body.gear40 .gear40-slot.craft-ready{background-image:url('assets/crafting-ui/assets/frames/finished-craftable.webp')!important}
body.gear40 .gear40-material.craft-ready{background-image:url('assets/crafting-ui/assets/frames/material-craftable.webp')!important}
body.gear40 .gear40-slot[aria-pressed=true]{outline:2px solid #91ffdb;outline-offset:-3px}
body.gear40 .gear40-slot img{image-rendering:auto!important}
body.gear40 #equipment-workspace.gear40-book{background:#102c3a url('assets/crafting-ui/assets/panels/book-pc.webp') center/100% 100% no-repeat!important;display:flex!important;flex-direction:column;overflow:hidden!important}
body.gear40 #equipment-workspace.gear40-book #bc-heading{display:flex!important;flex-direction:row;flex:0 0 44px;justify-content:flex-start}
body.gear40 #equipment-workspace.gear40-book #bc-heading button{display:block!important;position:static!important;flex:0 0 44px}
body.gear40 #equipment-workspace.gear40-book #bc-heading [data-dock=full],body.gear40 #equipment-workspace.gear40-book #bc-heading [data-dock=codex]{display:none!important}
body.gear40 #bc-heading [data-dock=gear40-catalog]{display:block!important;font-size:11px}
body.gear40 #equipment-workspace.gear40-book #bc-content{display:grid!important;grid-template-columns:minmax(0,1fr) 190px;grid-template-rows:minmax(0,1fr);gap:8px;align-items:start;padding:4px 8px!important;width:100%;box-sizing:border-box}
body.gear40 .gear40-chart{min-width:0;max-height:100%;overflow:auto;overscroll-behavior:contain}
body.gear40 .gear40-matrix{display:grid;grid-template-columns:repeat(9,44px);grid-auto-rows:44px;gap:2px;justify-content:center;width:max-content;margin:auto}
body.gear40 .gear40-axis{display:grid;place-items:center;background:#173948;border-radius:6px}
body.gear40 .gear40-axis img{width:32px;height:32px;object-fit:contain}
body.gear40 #equipment-workspace.gear40-book #craft-detail{position:static;grid-template-columns:1fr;max-height:100%;overflow:auto;padding:5px;box-sizing:border-box;font-size:13px}
body.gear40 #equipment-workspace.gear40-book #craft-detail>div{gap:5px}
body.gear40 #equipment-workspace.gear40-book #bc-actions{flex:0 0 20px;height:20px!important;font-size:10px}
body.gear40 .gear40-needed{display:flex;gap:6px}
body.gear40 .gear40-needed>span{display:flex;align-items:center;gap:2px}
body.gear40 .gear40-needed img{width:26px;height:26px;object-fit:contain}
body.gear40 .gear40-pair{position:absolute;bottom:0;right:1px;font:8px monospace;color:#e2f1ed;background:#102c3a}
body.gear40 .gear40-materials{display:grid;grid-template-columns:repeat(8,44px);gap:2px;margin-bottom:4px}
body.gear40 .gear40-results{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:44px;gap:2px;justify-items:center}
@media(min-width:1101px) and (max-height:800px){
 body.gear40 .gear40-matrix{grid-template-columns:repeat(9,34px);grid-auto-rows:34px}
 body.gear40 #equipment-workspace.gear40-book .gear40-matrix .dock-slot{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important}
 body.gear40 .gear40-axis img{width:26px;height:26px}
}
@media(max-width:1100px) and (orientation:landscape){
 body.gear40 #equipment-workspace.gear40-book{display:grid!important;grid-template-columns:44px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 16px!important;gap:2px;background-image:url('assets/crafting-ui/assets/panels/book-mobile-landscape.webp')!important}
 body.gear40 #equipment-workspace.gear40-book #bc-heading{grid-area:1/1/3/2!important;display:flex!important;flex-direction:column;align-items:center;height:auto!important;overflow:auto}
 body.gear40 #equipment-workspace.gear40-book .dock-heading-title{display:none!important}
 body.gear40 #equipment-workspace.gear40-book #bc-content{grid-area:1/2!important;grid-template-columns:366px minmax(0,1fr);gap:5px;padding:0!important;overflow:hidden!important}
 body.gear40 #equipment-workspace.gear40-book #craft-detail{font-size:11px;line-height:1.35;border:0}
 body.gear40 #equipment-workspace.gear40-book #craft-detail strong{font-size:13px}
 body.gear40 #equipment-workspace.gear40-book #craft-detail>button{justify-self:end}
 body.gear40 #equipment-workspace.gear40-book #bc-actions{grid-area:2/2!important;height:16px!important;padding:0;font-size:9px;justify-content:center}
 body.gear40 .gear40-chart{padding:0;overflow:hidden}
}

body.gear40 #equipment-workspace.gear40-book .gear40-chart .dock-slot{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;flex:none!important}
body.gear40 #equipment-workspace.gear40-book #bc-content{align-content:start!important}
body.gear40 #equipment-workspace.gear40-book .gear40-chart{grid-column:1!important;grid-row:1!important}
body.gear40 #equipment-workspace.gear40-book #craft-detail{grid-column:2!important;grid-row:1!important;align-self:start!important;min-width:0!important;width:auto!important}
@media(min-width:1101px) and (max-height:800px){body.gear40 #equipment-workspace.gear40-book .gear40-matrix .dock-slot{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important}}

body.gear40.equipment-xp #equipment-workspace.gear40-book[data-mode=codex] #bc-content{display:grid!important;padding:4px 8px!important;overflow:hidden!important}
@media(max-width:1100px) and (orientation:landscape){body.gear40.equipment-xp #equipment-workspace.gear40-book[data-mode=codex] #bc-content{padding:0!important}}

body.gear40 .gear40-slot .gear-icon,body.gear40 .gear40-axis .gear-icon{width:100%!important;height:100%!important;display:grid!important;place-items:center!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
body.gear40 .gear40-slot .gear-icon>small,body.gear40 .gear40-axis .gear-icon>small,body.gear40 .gear40-needed .gear-icon>small{display:none!important}
body.gear40 #equipment-workspace.gear40-book .gear40-axis .gear-icon img{max-width:26px!important;max-height:26px!important}

body.gear40 #equipment-workspace [data-item],body.gear40 #equipment-workspace [data-equip-id]{touch-action:none!important}
