:root{--slot:46px;--inv-text:#302f2b;--inv-bg:#c8c5ba;--inv-edge:#52554d}.inventory-dialog{color:var(--inv-text);background:var(--inv-bg);border:4px solid #252f30;box-shadow:inset 3px 3px #eeebdf,inset -3px -3px #898a7d,0 18px 70px #0008;border-radius:2px;padding:18px;width:min(1020px,calc(100vw - 24px));max-height:calc(100dvh - 28px);font:14px ui-monospace,Consolas,monospace;overflow:auto}.inventory-dialog::backdrop{background:#0b1829a8}.inventory-heading{display:flex;justify-content:space-between;gap:14px;align-items:center;border-bottom:2px solid #a4a598;padding-bottom:12px;margin-bottom:16px}.inventory-heading h2{font-size:21px;margin:0}.inventory-heading>div{display:flex;gap:8px}.inventory-dialog button,.inventory-dialog input,.inventory-dialog select{font:inherit;width:auto;margin:0;border-radius:1px}.inventory-dialog button{color:#292f2d;background:#ddd9cb;border:2px solid;border-color:#f3f0e5 #777e75 #777e75 #f3f0e5;padding:8px;cursor:pointer;box-shadow:inset 0 0 0 1px #aaa99a}.inventory-dialog button:hover{background:#eee7cc}.inventory-dialog button:disabled{opacity:.55;cursor:default}.inventory-dialog button:focus-visible,.inventory-hotbar button:focus-visible{outline:3px solid #a36330;outline-offset:2px}.inventory-body{display:grid;grid-template-columns:246px minmax(0,1fr);gap:22px}.inventory-dialog.book-hidden .inventory-body{grid-template-columns:1fr}.recipe-book{border-right:2px solid #a4a598;padding-right:16px}.recipe-book input[type=search],.recipe-book select{width:100%;padding:9px;background:#ebe8dd;color:#333;border:2px inset #8e9486;margin-bottom:9px}.recipe-book .craftable-filter{display:flex;flex-direction:row;align-items:center;gap:8px;margin:9px 0 12px;font-size:12px;color:#444}.recipe-list{display:grid;gap:6px;max-height:470px;overflow:auto;padding:3px}.inventory-dialog .recipe-card{display:grid;grid-template-columns:34px 1fr;align-items:center;gap:1px 7px;text-align:left;background:#bdbfb2;min-height:52px;padding:5px}.recipe-card canvas{grid-row:1/3}.recipe-card small{font-size:10px;color:#5b5c50;margin:0}.recipe-card.recipe-ready{background:#d7dfbf;border-color:#ecf2dc #7a8c68 #7a8c68 #ecf2dc}.recipe-card.recipe-chosen{box-shadow:inset 0 0 0 2px #a06e30}.inventory-work{min-width:0}.inventory-work h3{font-size:14px;margin:13px 0 9px}.crafting-top{display:flex;gap:24px;align-items:center;min-height:180px}.player-paperdoll{width:110px;height:154px;background:#82907c;box-shadow:inset 2px 2px #5d695b,inset -2px -2px #e2e3d1;display:flex;align-items:center;justify-content:center;flex-shrink:0}.player-paperdoll span{width:35px;height:49px;background:#cf6554;position:relative;box-shadow:0 41px 0 -4px #293f57}.player-paperdoll span:before{content:'';position:absolute;top:-35px;left:2px;width:31px;height:33px;background:linear-gradient(#604c36 20%,#f0c69b 20%,#f0c69b 65%,#463c35 65%,#463c35 73%,#f0c69b 73%)}.crafting-row{display:flex;align-items:center;gap:14px}.crafting-grid{display:grid;gap:4px}.inventory-dialog .item-slot{position:relative;width:var(--slot);height:var(--slot);padding:4px;background:#92978c;border:2px solid;border-color:#646d61 #e8e8d9 #e8e8d9 #646d61;display:flex;align-items:center;justify-content:center;box-shadow:none;flex-shrink:0}.inventory-dialog .item-slot:hover{background:#bdc2ad}.item-icon{width:32px;height:32px;image-rendering:pixelated;display:block;flex-shrink:0}.stack-count{position:absolute;bottom:1px;right:3px;color:white;font:bold 14px ui-monospace,Consolas,monospace;text-shadow:1px 1px #26352b,-1px -1px #26352b;pointer-events:none}.craft-arrow{font:28px system-ui;color:#777e72}.inventory-dialog .craft-result{width:58px;height:58px;background:#aab09d}.inventory-dialog .craft-result:disabled{opacity:1}.craft-status{font-size:11px;color:#555e50;max-width:310px;margin:10px 0}.inventory-dialog #return-grid{font-size:11px;padding:4px 7px}.bag-grid{display:grid;grid-template-columns:repeat(9,var(--slot));gap:4px}.bag-hotbar{display:grid;grid-template-columns:repeat(10,var(--slot));gap:4px}.inventory-help{font-size:11px;line-height:1.6;color:#5f6455;margin:12px 0}.held-item{display:flex;gap:8px;align-items:center;font-size:11px;min-height:30px}.held-item button{font-size:11px;flex-shrink:0}.recipe-detail{background:#d9d8c8;border:1px solid #9caa8d;padding:12px;margin:12px 0}.recipe-detail strong{display:block;margin-bottom:9px}.recipe-detail p{font-size:11px;color:#635e4c}.recipe-ingredients{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}.recipe-ingredients>span{display:flex;gap:3px;align-items:center;font-size:11px;padding:3px 5px;background:#c6c8b7}.recipe-ingredients .item-icon{width:24px;height:24px}.ingredient-missing{color:#8b3f34}.ingredient-have{color:#405a37}.inventory-reserves p{font-size:11px;color:#5f6455}.inventory-dialog .reserve-button{display:inline-flex;align-items:center;gap:7px;font-size:12px;margin:4px}.inventory-hotbar{position:fixed;z-index:5;bottom:16px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(10,50px);gap:3px;padding:5px;background:#17232bcb;border:2px solid #475950;border-radius:3px}.inventory-hotbar .item-slot{position:relative;width:50px;height:50px;padding:6px;background:#48574fe6;border:2px solid;border-color:#748474 #263d35 #263d35 #748474;border-radius:0;margin:0;color:#fff}.inventory-hotbar .item-slot.selected{border:3px solid #f5df9c;background:#6e7355;box-shadow:0 0 0 1px #f9efc4}.inventory-hotbar .item-icon{width:32px;height:32px}.slot-number{position:absolute;top:0;left:2px;font:9px ui-monospace,monospace;color:#e0e7d3;text-shadow:1px 1px #26352b}.inventory-toast{position:fixed;bottom:86px;left:50%;transform:translateX(-50%);z-index:20;background:#14232ce8;color:#fff0b9;max-width:90vw;text-align:center;padding:10px 16px;border-radius:4px;font:13px system-ui}.inventory-toast:empty{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.inventory-dialog [hidden],.inventory-hotbar[hidden]{display:none!important}@media(max-width:1000px){:root{--slot:40px}.inventory-dialog{width:calc(100vw - 16px);padding:13px}.inventory-body{grid-template-columns:205px minmax(0,1fr);gap:16px}.crafting-top{gap:16px}.player-paperdoll{width:80px}.item-icon{width:29px;height:29px}}@media(max-width:760px){:root{--slot:clamp(27px,7.8vw,43px)}.inventory-body{display:flex;flex-direction:column-reverse;gap:12px}.recipe-book{border-right:0;border-top:2px solid #a4a598;padding:12px 0 0}.recipe-list{grid-template-columns:repeat(2,1fr);max-height:240px}.inventory-heading h2{font-size:17px}.inventory-heading button{font-size:11px;padding:7px}.crafting-top{gap:17px;min-height:160px}.player-paperdoll{width:65px;height:120px}.crafting-row{gap:10px}.crafting-grid{gap:3px}.inventory-dialog .craft-result{width:45px;height:45px}.bag-grid,.bag-hotbar{gap:3px}.item-icon{width:24px;height:24px}.bag-hotbar{grid-template-columns:repeat(10,minmax(0,1fr))}.bag-hotbar .item-slot{width:100%}.inventory-hotbar{grid-template-columns:repeat(10,minmax(0,1fr));width:calc(100vw - 14px);max-width:542px;gap:2px;padding:4px;bottom:9px}.inventory-hotbar .item-slot{width:100%;height:42px;padding:4px}.inventory-hotbar .item-icon{width:27px;height:27px}.inventory-hotbar .stack-count{font-size:11px}.inventory-toast{bottom:68px}.crafting-top h3{font-size:12px}.craft-status{font-size:10px}}

/* Keep the complete backpack and hotbar visible while browsing a recipe. */
.recipe-list{max-height:calc(100dvh - 280px)}.inventory-dialog.has-recipe .recipe-list{max-height:calc(100dvh - 405px)}.recipe-book .recipe-detail{padding:9px;margin:5px 0 10px}.recipe-book .recipe-detail strong{font-size:12px}.recipe-book .recipe-detail button{font-size:11px;padding:5px}.recipe-book .recipe-ingredients{gap:4px}.recipe-book .recipe-ingredients>span{font-size:10px;padding:2px}.recipe-book .recipe-ingredients .item-icon{width:20px;height:20px}@media(max-width:760px){.recipe-list,.inventory-dialog.has-recipe .recipe-list{max-height:240px}}
