/* Supplied Work B+C raster assets: nine-slice panels, unscaled square icons. */
#equipment-workspace,#hud-items.bc-tray{--bc-text:#e5eee8;--bc-muted:#aec6ca;color:var(--bc-text);font-family:inherit;box-sizing:border-box;pointer-events:auto}
body:not(.playing) #equipment-workspace,body:not(.playing) #hud-items.bc-tray{display:none!important}
#equipment-workspace[hidden]{display:none!important}
body.playing #hud-items.bc-tray{position:fixed;z-index:44;display:block;padding:6px;width:56px;border:0;border-radius:0;box-shadow:none;background:none;border-image:url('assets/equipment-bc/tray.webp') 16 fill / 16px / 0 stretch;overflow:visible;backdrop-filter:none}
body.playing #hud-items.bc-tray summary{display:block;list-style:none;padding:0;min-height:44px;height:44px;position:relative}
#hud-items.bc-tray summary::-webkit-details-marker{display:none}
#hud-items.bc-tray #hud-item-content{display:none}
#equipment-workspace{position:fixed;z-index:45;width:264px;height:220px;padding:6px 12px;display:flex;flex-direction:column;gap:4px;border:0;border-image:url('assets/equipment-bc/panel.webp') 16 fill / 16px / 0 stretch;background:none;box-shadow:none;font-size:12px}
#equipment-workspace[data-mode=unit]{border-image-source:url('assets/equipment-bc/unit-panel.webp')}
#equipment-workspace[data-mode=info]{border-image-source:url('assets/equipment-bc/info-card.webp')}
#equipment-workspace[data-mode=forge],#equipment-workspace[data-mode=confirm]{border-image-source:url('assets/equipment-bc/workbench.webp')}
#bc-heading{height:44px;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:4px;color:#e5eee8}
#bc-heading strong{font-size:12px;line-height:1.25;overflow-wrap:anywhere}
#bc-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#91aab3 #102638;padding:4px 0}
#bc-content p{margin:6px 0;font-size:12px;line-height:1.5}#bc-content small{color:#aec6ca;font-size:11px}
#bc-actions{display:flex;gap:6px;align-items:center;min-height:44px;flex-shrink:0;margin:0;padding:0;background:none;border:0}
#equipment-workspace .bc-button,#hud-items.bc-tray .bc-button{position:relative;box-sizing:border-box;flex-shrink:0;min-width:44px;min-height:44px;height:44px;padding:0 9px;color:#e5eee8;border:0;border-radius:0;background:none;border-image:url('assets/equipment-bc/button.webp') 10 fill / 10px / 0 stretch;box-shadow:none;font-size:12px;line-height:1.2;touch-action:manipulation}
#equipment-workspace .bc-button:has(.bc-action-art),#hud-items.bc-tray .bc-button:has(.bc-action-art){width:44px;padding:0;border-image:none}
.bc-action-art{display:block;width:44px;height:44px;pointer-events:none;object-fit:contain}
#equipment-workspace .bc-button:disabled{border-image-source:url('assets/equipment-bc/button-disabled.webp');color:#81999e;opacity:.6;cursor:default}
#equipment-workspace button:focus-visible,#hud-items.bc-tray button:focus-visible{outline:2px solid #ffd36b;outline-offset:2px}
#equipment-workspace .bc-button[data-bc-action=confirm]{border-image-source:url('assets/equipment-bc/button-primary.webp')}
#hud-items.bc-tray #item-inventory{display:flex;flex-direction:column;gap:4px;padding:4px 0;margin:0;width:44px;height:192px;max-height:192px;overflow-x:hidden;overflow-y:auto;scrollbar-width:none;touch-action:pan-y}
#equipment-workspace .bc-slot,#hud-items.bc-tray .bc-slot{position:relative;flex:0 0 44px;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;padding:6px;border:0;border-radius:0;background:var(--slot-art) center/44px 44px no-repeat;box-shadow:none;overflow:visible;touch-action:manipulation}
#equipment-workspace .bc-slot:disabled{opacity:1;cursor:default}
.bc-slot .gear-icon{width:30px!important;height:30px!important;max-width:30px;max-height:30px;object-fit:contain;pointer-events:none;image-rendering:pixelated}
.bc-slot.selected::after{content:'';position:absolute;inset:-4px;background:url('assets/equipment-bc/selection.webp') center/100% 100%;pointer-events:none}
.bc-badge{position:absolute;right:-2px;bottom:-1px;min-width:24px;height:18px;padding:0 3px;line-height:18px;background:url('assets/equipment-bc/badge.webp') center/100% 100%;color:#e5eee8;font-size:10px;pointer-events:none}
#hud-item-summary{position:absolute;right:1px;bottom:0;min-width:18px;font-size:11px;color:#e5eee8;text-shadow:1px 1px #102638}
#bc-tools{position:absolute;right:64px;bottom:0;display:flex;gap:4px}#bc-bag-pages{display:flex;justify-content:center;gap:4px;min-height:44px}
#bc-bag-pages [data-bc-action=previous],#bc-page{display:none}
#hud-items.bc-tray[data-expanded=false] #item-inventory,#hud-items.bc-tray[data-expanded=false] #bc-tools,#hud-items.bc-tray[data-expanded=false] #bc-bag-pages{display:none}
#hud-items.bc-tray:not([data-mode=bag]) #bc-tools{display:none}
.bc-unit-slots{display:flex;gap:12px;padding:4px 0}.bc-caption{color:#ffd36b}.bc-empty{font-size:11px;line-height:1.3;color:#aec6ca;padding:6px 0}
.bc-info-title{display:flex;align-items:center;gap:8px}.bc-info-title .gear-icon{width:40px;height:40px;object-fit:contain}
.bc-targets{display:grid;grid-template-columns:1fr 1fr;gap:5px}.bc-target,.bc-recipe{min-height:44px;border:1px solid #456879;border-radius:5px;background:#25465c;color:#e5eee8;display:flex;align-items:center;gap:4px;padding:2px 4px;text-align:left;font-size:11px;touch-action:manipulation}
.bc-target img,.bc-recipe .gear-icon{width:34px;height:34px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}.bc-target small,.bc-recipe small{display:block}
.bc-recipes{display:grid;gap:4px}.bc-recipe{width:100%}.bc-recipe.ready{border-color:#8fd9ab}.bc-recipe.ready::after{content:'✓';margin-left:auto;color:#8fd9ab;padding:4px}
.bc-formula{display:flex;align-items:center;justify-content:space-between;gap:2px;padding:4px 0}.bc-ingredient{text-align:center;position:relative}.bc-ingredient small{display:block;line-height:18px}.bc-ingredient.missing small{color:#e6b3b3!important}.bc-ingredient.ready small{color:#8fd9ab!important}.bc-arrow{width:20px;height:32px;object-fit:contain;pointer-events:none}.bc-extra{display:flex;flex-direction:column;gap:4px}
.bc-complete .bc-formula{animation:bc-link .12s ease-out}.bc-complete .bc-formula>.bc-slot{animation:bc-result .18s .12s ease-out}.bc-complete #bc-heading strong::after{content:' ✓';color:#8fd9ab;animation:bc-check .2s .3s both}
@keyframes bc-link{50%{filter:brightness(1.5)}}@keyframes bc-result{50%{transform:scale(1.1)}}@keyframes bc-check{from{opacity:0}to{opacity:1}}
@media(max-width:1100px) and (max-height:780px),(pointer:coarse) and (max-height:740px){
 #equipment-workspace{width:248px;padding:6px 10px;gap:2px}
 body.playing #hud-items.bc-tray{padding:6px 10px;border-image-source:url('assets/equipment-bc/panel.webp')}
 body.playing #hud-items.bc-tray summary{width:44px}
 #hud-items.bc-tray #item-inventory{display:grid;grid-template-columns:repeat(4,44px);grid-auto-rows:44px;gap:4px 12px;width:224px;height:96px;max-height:96px;padding:4px 0}
 #bc-tools{right:10px;top:6px;bottom:auto;gap:4px}#bc-bag-pages{justify-content:space-between;margin-top:4px}#bc-bag-pages [data-bc-action=previous]{display:block}#bc-page{display:block;line-height:44px;font-size:11px}
 #hud-items.bc-tray:not([data-mode=bag])[data-expanded=true]{visibility:hidden}
 #hud-items.bc-tray:not([data-mode=bag]) #bc-tools{display:flex}
 body.bc-workspace-open #hud-left{visibility:hidden;pointer-events:none}
 #equipment-workspace .bc-button{font-size:11px;padding:0 8px}#bc-actions{gap:4px}
 /* Reuse the real dock and XP controls; only give the bench its 44px touch height. */
 body.playing .footer-head,body.playing .bench,body.playing .bench-slot{height:44px;min-height:44px}
 body.playing #hud-bottom,body.playing.hud-combat:not(.hud-shop-open) #hud-bottom{width:calc(100% - 16px);max-width:none}
 body.playing .footer-head{width:100%}
 body.playing .deploy-button{height:44px;min-height:44px}
 body.playing #hud-shop-controls{flex-shrink:0}
 body.playing .bench{overflow-x:auto;justify-content:initial}.bench-slot{flex:1 0 44px}
}
@media(prefers-reduced-motion:reduce){.bc-complete *{animation:none!important}}
body.reduce-fx .bc-complete *{animation:none!important}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
/* Override legacy details bottom anchors in both open and closed states. */
body.playing #hud-items.bc-tray,body.playing #hud-items.bc-tray[open]{bottom:auto;height:auto;max-height:none}
#equipment-workspace .bc-button:has(.bc-action-art),#hud-items.bc-tray .bc-button:has(.bc-action-art){border-image:url('assets/equipment-bc/button.webp') 10 fill / 10px / 0 stretch}
@media(max-width:1100px) and (max-height:780px),(pointer:coarse) and (max-height:740px){body.playing #battle-btn.deploy-button{height:44px!important;min-height:44px!important}}
@media(max-width:1100px) and (max-height:780px),(pointer:coarse) and (max-height:740px){body.playing #hud-items.bc-tray{padding:4px 10px}#bc-tools{top:4px}#hud-items.bc-tray #item-inventory{height:92px;max-height:92px;padding:0}#bc-bag-pages{margin-top:4px}}
@media(max-width:1100px) and (max-height:389px),(pointer:coarse) and (max-height:389px){#hud-items.bc-tray #item-inventory{height:44px;max-height:44px}}
/* Existing item pixels only; the supplied Work slot owns its frame and tier dots. */
#equipment-workspace .bc-slot .gear-icon,#hud-items.bc-tray .bc-slot .gear-icon{border:0;border-radius:0;background:none;box-shadow:none}
#equipment-workspace .bc-slot .gear-icon small,#hud-items.bc-tray .bc-slot .gear-icon small{display:none}
