.management-modal,.inventory-modal{width:min(1120px,96vw);max-height:94dvh;overflow:auto;background:#f8ecd5;border:1px solid #cda875;border-radius:14px;box-shadow:0 24px 80px #10261f99;padding:22px;color:#34493e}.inventory-modal{width:min(900px,96vw)}.management-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.management-head small{display:block;color:#9a7143;font-size:9px;letter-spacing:2.2px;text-transform:uppercase;font-weight:700}.management-head h2{font-size:27px;margin-top:5px}.management-money{display:flex;align-items:center;gap:9px}.management-money span{background:#e7d2ad;padding:9px 13px;border-radius:20px;font-size:12px;font-weight:700}.management-money button{width:38px;height:38px;border-radius:50%;background:#dfc9a9;color:#405246}.management-room{display:grid;grid-template-columns:1.65fr 1fr;gap:15px}.order-wall,.delivery-bench{min-height:330px;border-radius:9px;padding:15px;position:relative;overflow:hidden}.order-wall{background:linear-gradient(#31564b18,#31564b09),url('/assets/workshop.webp') 60% 35%/cover}.order-wall:after{content:'';position:absolute;left:3%;right:3%;top:82px;height:2px;background:#9c7046;box-shadow:0 2px 3px #26190e88}.delivery-bench{background:linear-gradient(#f6e8cded,#e0bc85ed),url('/assets/workshop.webp') center 73%/cover}.section-label{position:relative;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:10px;color:#fff7e8;text-shadow:0 2px 8px #122a22}.delivery-bench .section-label{color:#3c5245;text-shadow:none}.section-label strong{font:600 17px Lora}.section-label small{font-size:9px}.order-string{display:flex;align-items:flex-start;gap:10px;position:relative;z-index:2;margin-top:27px;overflow-x:auto;padding:0 4px 14px;min-height:230px}.order-slip{position:relative;flex:0 0 185px;min-height:220px;background:#fff8e9;border:1px solid #caa773;border-radius:3px;padding:19px 11px 11px;box-shadow:4px 8px 14px #17291f40;transform:rotate(-1deg);display:flex;flex-direction:column}.order-slip:nth-child(even){transform:rotate(1.3deg);margin-top:6px}.order-slip.status-ready{background:#edf0dc;border-color:#839f75}.order-pin{position:absolute;top:-8px;left:50%;width:13px;height:20px;border-radius:5px;background:#a95738;box-shadow:0 2px 4px #352217;z-index:3}.order-number{position:absolute;top:7px;right:8px;font:700 10px Lora;color:#ae8a5d}.order-copy small{font-size:8px;letter-spacing:1.2px;text-transform:uppercase;color:#9c7247}.order-copy strong{display:block;font:600 17px Lora;color:#325344;margin:7px 0}.order-copy p{font-size:9px;line-height:1.6;color:#786a55}.order-controls{display:flex;gap:5px;flex-wrap:wrap;margin-top:auto}.order-controls button{background:#e1d1b6;color:#564c3d;min-height:32px;padding:5px 8px;border-radius:4px;font-size:9px}.order-controls .accept,.order-controls .select{background:#315b4e;color:#fff7e8;flex:1 1 100%}.order-controls .deliver{background:#ba7938;color:#fff;flex:1 1 100%}.ready-products{display:flex;flex-direction:column;gap:9px;margin-top:14px}.ready-product{width:100%;min-height:100px;display:flex;align-items:center;gap:10px;background:#fff5df;border:2px solid transparent;border-radius:8px;padding:8px;color:#405348;text-align:left}.ready-product.selected{border-color:#b8793e;background:#fff0cc;box-shadow:0 0 0 3px #e9c78688}.ready-product img{width:110px;height:75px;object-fit:contain;filter:drop-shadow(0 6px 4px #73572a44)}.ready-product span{min-width:0}.ready-product strong{display:block;font:600 14px Lora}.ready-product small{display:block;font-size:8px;line-height:1.55;margin-top:5px;color:#806e54}.management-empty{font-size:11px;line-height:1.8;color:#766b5a;background:#fff5ddc9;padding:12px;border-radius:6px}.inventory-chest{margin-top:15px;border-radius:9px;background:#5a3b25;color:#fff1d8;border:1px solid #8a5c34;overflow:hidden}.inventory-chest summary{padding:13px 17px;cursor:pointer;font-weight:700;font-size:12px}.inventory-chest[open] summary{border-bottom:1px solid #8e6846}.stock-room{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:14px;background:#ead8b7;color:#364d40}.stock-drawer{background:#f9eed8;border:1px solid #ceb184;border-radius:7px;padding:10px}.stock-drawer header strong{font:600 15px Lora;display:block}.stock-drawer header small{font-size:8px;color:#8b765b}.stock-cells{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:9px}.stock-cell{display:flex;align-items:center;gap:7px;border-radius:5px;background:#e8d6b8;padding:7px;min-height:54px}.stock-cell.empty{opacity:.62;background:#e8ded0}.stock-icon{font-size:20px;color:#9c6938}.stock-cell span:nth-child(2){min-width:0}.stock-cell b,.stock-cell small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stock-cell b{font-size:9px}.stock-cell small{font-size:8px;color:#8a7357;margin-top:3px}.stock-cell button{margin-left:auto;background:#315b4e;color:white;border-radius:4px;padding:5px;min-width:38px;font-size:8px;line-height:1.1}.stock-cell button small{color:#e9e0c9;margin-top:2px}.inventory-chest footer,.inventory-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 15px;font-size:9px}.inventory-chest footer button,.inventory-footer button{background:#ba7938;color:white;padding:8px 11px;border-radius:5px}.inventory-note{font-size:11px;line-height:1.7;background:#ead8b7;border-left:3px solid #b8783d;padding:10px 13px;margin-bottom:12px}.inventory-modal .stock-room{padding:0;background:transparent}.inventory-footer{padding:14px 0 0}.inventory-footer span{color:#80725d}.management-modal button:focus-visible,.inventory-modal button:focus-visible{outline:3px solid #efbd60;outline-offset:2px}
@media(max-width:760px){.management-modal,.inventory-modal{width:100%;max-height:96dvh;padding:13px}.management-head h2{font-size:20px}.management-money span{font-size:10px;padding:7px}.management-room{grid-template-columns:1fr}.order-wall{min-height:300px}.order-slip{flex-basis:165px;min-height:205px}.delivery-bench{min-height:170px}.ready-products{display:grid;grid-template-columns:1fr 1fr}.ready-product{display:block}.ready-product img{width:100%;height:65px}.stock-room{grid-template-columns:1fr}.stock-cells{grid-template-columns:repeat(2,1fr)}.section-label{align-items:flex-start}.section-label small{max-width:150px;text-align:right}.inventory-chest footer,.inventory-footer{align-items:flex-start;flex-direction:column}}
@media(max-height:500px) and (min-width:700px){.management-modal{height:96dvh;padding:10px}.management-head{margin-bottom:7px}.management-room{grid-template-columns:1.8fr 1fr}.order-wall,.delivery-bench{min-height:250px}.order-slip{min-height:175px;flex-basis:170px}.inventory-chest{margin-top:7px}.inventory-chest summary{padding:7px 12px}.ready-product{min-height:80px}.ready-product img{height:55px}}

.product-preview{display:block;width:110px;flex:0 0 110px}.ready-product-canvas{display:block;width:110px;height:75px;object-fit:contain;filter:drop-shadow(0 6px 4px #73572a44)}
.stock-prop{width:28px;height:28px;object-fit:contain;filter:drop-shadow(0 3px 2px #6c482b55)}.rain-stock{display:flex;align-items:center;gap:9px;margin:0 14px 8px;padding:8px 11px;background:#d8e0d8;color:#395a52;border-radius:6px;font-size:9px;line-height:1.5}.rain-stock img{width:42px;height:30px;object-fit:contain}
@media(max-width:760px){.product-preview,.ready-product-canvas{width:100%}.ready-product-canvas{height:65px}}
@media(max-height:500px) and (min-width:700px){.ready-product-canvas{height:55px}}

/* Kho là một cảnh chơi: vật liệu nằm trên kệ, giỏ ở tiền cảnh và phiếu giá được ghim riêng. */
.warehouse-game{position:relative;width:min(1180px,97vw);height:min(820px,95dvh);overflow:hidden;border:1px solid #c5945f;border-radius:13px;background:url('/assets/scenes/storage.webp') center/cover no-repeat;box-shadow:0 25px 90px #071b1588;color:#fff6df}.warehouse-shade{position:absolute;inset:0;background:linear-gradient(#183c2fb8 0 14%,#1b33283b 36%,#261b1385 100%);pointer-events:none}.warehouse-hud{position:absolute;z-index:5;top:0;left:0;right:0;min-height:88px;padding:16px 20px;display:flex;justify-content:space-between;align-items:center;background:linear-gradient(#173c32e8,#173c3200)}.warehouse-hud small{font-size:9px;letter-spacing:2px;text-transform:uppercase;color:#edc986}.warehouse-hud h2{font-size:25px;margin-top:5px;text-shadow:0 3px 13px #12231d}.warehouse-hud .management-money span{color:#31483e;background:#f2dfbc}.warehouse-hud .management-money button{background:#f2dfbc;color:#315246}.warehouse-camera{position:absolute;z-index:6;top:93px;left:18px;display:flex;gap:7px}.warehouse-camera button{min-height:40px;padding:8px 13px;border-radius:22px;border:1px solid #dfc18b;background:#244e42dd;color:#fff1d3;font-size:10px;box-shadow:0 5px 13px #10291f55}.warehouse-camera button.active{background:#c28543;color:#fff;transform:translateY(-2px)}.warehouse-game>.rain-stock{position:absolute;z-index:8;top:144px;left:18px;margin:0;background:#244b45e8;color:#fff}.warehouse-shelf{position:absolute;z-index:3;top:148px;left:4%;right:4%;bottom:252px;display:grid;grid-template-columns:repeat(5,minmax(115px,1fr));align-items:end;gap:10px;padding:18px 25px 12px;border-bottom:18px solid #6d3f22;background:linear-gradient(180deg,#0f291b25,#5d321f7d);box-shadow:inset 0 -4px #bd8651,0 8px 15px #1c100a88}.warehouse-shelf:before{content:'';position:absolute;left:0;right:0;bottom:31%;height:13px;background:#714123;box-shadow:inset 0 3px #b77842,0 4px 6px #24160c77}.material-pile{position:relative;z-index:2;align-self:end;min-height:138px;padding:0 3px 34px;border:0;background:transparent;color:#fff;filter:drop-shadow(0 8px 5px #170e0877)}.material-pile:hover,.material-pile.selected{transform:translateY(-7px) scale(1.04);filter:drop-shadow(0 10px 7px #170e08aa)}.material-pile>img{display:block;width:100%;height:100px;object-fit:contain;pointer-events:none}.material-tag{position:absolute;left:50%;bottom:1px;transform:translateX(-50%) rotate(-1deg);min-width:92px;background:#f6e5c4;color:#503e2d;padding:5px 8px;border:1px solid #bd9769;border-radius:2px;font:600 10px Lora;box-shadow:2px 3px 5px #2d1c1177}.material-tag small{display:block;font:500 8px 'Be Vietnam Pro';color:#9b6840;margin-top:2px}.material-count{position:absolute;right:1px;top:4px;background:#21463adf;border:1px solid #e2c389;border-radius:14px;padding:4px 7px;font-size:8px;color:#fff;white-space:nowrap}.material-examine{position:absolute;z-index:9;left:50%;bottom:252px;transform:translateX(-50%);width:min(430px,72%);min-height:100px;display:flex;align-items:center;gap:10px;background:#fff1d9f2;color:#354b40;border:1px solid #d1a977;border-radius:9px 9px 0 0;padding:9px 12px;box-shadow:0 -9px 24px #24170f55}.material-examine>img{width:95px;height:75px;object-fit:contain}.material-examine div{flex:1}.material-examine small,.material-examine strong{display:block}.material-examine small{font-size:8px;color:#a06e3e;text-transform:uppercase;letter-spacing:1px}.material-examine strong{font:600 17px Lora;margin:3px 0}.material-examine p{font-size:9px;line-height:1.4;color:#76634e}.material-examine button{background:#2d5c4d;color:#fff7df;border-radius:6px;padding:10px 12px;font-size:10px}.warehouse-foreground{position:absolute;z-index:7;left:0;right:0;bottom:0;height:252px;display:grid;grid-template-columns:1.3fr .72fr;gap:16px;padding:25px 24px 14px;background:linear-gradient(#744523ee,#422718f7),url('/assets/workshop.webp') center bottom/cover;box-shadow:inset 0 10px 12px #2b170d66}.warehouse-basket{position:relative;min-height:150px;padding:15px 18px 12px 120px;display:flex;align-content:flex-start;align-items:flex-start;gap:8px;flex-wrap:wrap;border:3px dashed #d8ad6b;border-radius:13px;background:#26180e73}.warehouse-basket:before{content:'';position:absolute;left:12px;bottom:7px;width:100px;height:115px;background:url('/assets/props/7.webp') center/contain no-repeat;filter:sepia(.5) drop-shadow(0 8px 5px #160c07)}.empty-basket{align-self:center;font-size:10px;line-height:1.6;color:#e9cc98}.basket-bundle{position:relative;display:flex;align-items:center;gap:4px;background:#f5e0b9;color:#493b2d;border-radius:5px;padding:5px 7px;min-height:58px;max-width:155px}.bundle-art{position:relative;width:55px;height:45px;display:block}.bundle-art img{position:absolute;width:43px;height:43px;object-fit:contain;left:0;top:0}.bundle-art img:nth-child(2){left:6px;top:2px}.bundle-art img:nth-child(3){left:12px;top:4px}.bundle-art img:nth-child(4){left:18px;top:6px}.basket-bundle strong,.basket-bundle small{display:block}.basket-bundle strong{font-size:9px}.basket-bundle small{font-size:7px;color:#8a6b45;margin-top:3px}.warehouse-receipt{position:absolute;right:26px;bottom:52px;width:240px;min-height:155px;background:#fff8e7;color:#594b3a;padding:20px 15px 12px;transform:rotate(1deg);box-shadow:4px 7px 12px #26160d66}.receipt-pin{position:absolute;top:-7px;left:50%;width:13px;height:20px;background:#a44e31;border-radius:5px}.warehouse-receipt>small{display:block;text-align:center;font-size:8px;letter-spacing:1.5px;color:#9b7147;margin-bottom:8px}.warehouse-receipt p{display:flex;justify-content:space-between;padding:3px 0;border-bottom:1px dotted #d6c4a6;font-size:8px}.warehouse-receipt>div{display:flex;justify-content:space-between;margin-top:8px;font-size:11px}.warehouse-receipt em{display:block;margin-top:7px;font-size:7px;color:#8b7a63}.warehouse-actions{position:absolute;left:24px;right:24px;bottom:12px;display:flex;justify-content:space-between;pointer-events:none}.warehouse-actions button{pointer-events:auto;padding:10px 13px;border-radius:6px;background:#e0bd7e;color:#493823;font-size:9px}.warehouse-actions .checkout{margin-left:auto;margin-right:255px;background:#2c5b4c;color:#fff7e3;font-weight:700}.quick-stock{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;padding:12px;background:#ead8b7;color:#364d40}.quick-bin{min-height:70px;display:flex;align-items:center;gap:8px;background:linear-gradient(#774828,#52301e);color:#fff0d1;border:1px solid #9f6f42;border-radius:5px;padding:8px}.quick-bin img{width:55px;height:52px;object-fit:contain}.quick-bin strong,.quick-bin small{display:block}.quick-bin strong{font:600 12px Lora}.quick-bin small{font-size:7px;line-height:1.4;margin-top:4px;color:#dac59e}

/* Kiện giao tới: người chơi tháo dây rồi đặt từng món vào đúng hòm. */
.crate-scene{background-image:linear-gradient(#17382f55,#1c120a66),url('/assets/scenes/storage.webp')}.delivery-crate{position:absolute;z-index:5;left:50%;top:51%;width:min(560px,70%);height:340px;transform:translate(-50%,-50%);display:grid;place-items:center}.crate-box{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 22px 18px #170d08aa)}.crate-knot{position:absolute;width:56px;height:56px;border-radius:50%;background:#b5793c;color:white;border:4px solid #e1bd78;font-size:25px;box-shadow:0 5px 10px #24140b88}.knot-0{left:26%;top:36%}.knot-1{left:45%;top:48%}.knot-2{right:25%;top:33%}.delivery-crate.open .crate-box{transform:translateY(48px) rotate(-4deg);opacity:.65}.unpacked-materials{position:absolute;z-index:3;left:5%;right:5%;top:9%;display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.shipment-item{width:125px;background:transparent;color:#fff1d0;filter:drop-shadow(0 10px 7px #160d08aa)}.shipment-item.selected{transform:translateY(-10px) scale(1.07)}.shipment-item img{width:115px;height:100px;object-fit:contain}.shipment-item span{display:block;background:#274c40e8;border-radius:15px;padding:5px;font-size:9px}.crate-instruction{position:absolute;z-index:7;left:50%;top:78%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:#fff1d9;color:#405247;padding:10px 14px;border-radius:8px;font-size:10px;box-shadow:0 8px 20px #24150e66}.crate-instruction button{background:#2c5a4b;color:#fff6df;padding:8px 11px;border-radius:5px}.crate-bins{position:absolute;z-index:6;left:3%;right:3%;bottom:18px;display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.crate-bins button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:84px;border:2px solid #b7864f;background:#4a2c1be8;color:#fff0d0;border-radius:8px}.crate-bins img{width:58px;height:60px;object-fit:contain}.crate-bins strong,.crate-bins small{display:block}.crate-bins span{font:600 12px Lora;text-align:left}.crate-bins small{font:400 7px 'Be Vietnam Pro';color:#d8bf94;margin-top:4px}

@media(max-width:760px){.warehouse-game{width:100%;height:96dvh;border-radius:8px}.warehouse-hud{padding:11px 12px;min-height:76px}.warehouse-hud h2{font-size:18px;max-width:210px}.warehouse-camera{top:78px;left:8px;right:8px;overflow-x:auto}.warehouse-camera button{white-space:nowrap;padding:7px 10px}.warehouse-game>.rain-stock{top:124px;left:8px}.warehouse-shelf{top:125px;left:2%;right:2%;bottom:300px;grid-template-columns:repeat(2,1fr);overflow-y:auto;align-items:start;padding:35px 12px 12px}.warehouse-shelf:before{display:none}.material-pile{min-height:120px}.material-pile>img{height:85px}.material-examine{left:4px;right:4px;bottom:300px;transform:none;width:auto;min-height:88px}.material-examine>img{width:68px;height:63px}.material-examine p{display:none}.warehouse-foreground{height:300px;display:block;padding:13px 10px}.warehouse-basket{height:156px;padding:10px 8px 8px 78px;overflow:auto}.warehouse-basket:before{width:70px;height:90px}.basket-bundle{max-width:130px}.warehouse-receipt{right:9px;bottom:45px;width:168px;min-height:116px;padding:15px 10px 8px}.warehouse-receipt p{font-size:7px}.warehouse-actions{left:10px;right:10px;bottom:7px}.warehouse-actions .checkout{margin-right:174px;padding:8px}.warehouse-actions button{font-size:8px;padding:7px}.quick-stock{grid-template-columns:1fr 1fr}.quick-bin{min-height:60px}.delivery-crate{width:93%;height:290px;top:43%}.crate-bins{grid-template-columns:1fr 1fr;bottom:10px}.crate-bins button{min-height:62px}.crate-bins img{width:45px;height:45px}.crate-instruction{top:64%;white-space:nowrap}.shipment-item{width:92px}.shipment-item img{width:85px;height:72px}}
@media(max-height:520px) and (min-width:700px){.warehouse-game{height:97dvh}.warehouse-hud{min-height:58px;padding:7px 15px}.warehouse-hud h2{font-size:19px}.warehouse-camera{top:58px}.warehouse-shelf{top:102px;bottom:165px}.material-pile{min-height:100px;padding-bottom:26px}.material-pile>img{height:72px}.material-examine{bottom:165px;min-height:70px}.material-examine>img{height:53px}.warehouse-foreground{height:165px;padding:12px}.warehouse-basket{min-height:103px;padding:8px 8px 8px 90px}.warehouse-basket:before{width:75px;height:85px}.warehouse-receipt{bottom:34px;width:215px;min-height:116px;padding-top:13px}.warehouse-actions{bottom:5px}.warehouse-actions .checkout{margin-right:225px}.delivery-crate{height:230px;top:47%}.crate-bins button{min-height:56px}.crate-bins img{height:42px}.crate-instruction{top:69%}}

/* Bố cục phối cảnh: vật liệu nằm trực tiếp trên các tầng kệ của ảnh, giỏ và hòm là đồ vật ở tiền cảnh. */
.warehouse-camera{top:112px;left:18px;flex-direction:column;width:118px}.warehouse-camera button{border-radius:3px;min-height:44px;background:linear-gradient(#80502e,#5c361f);border:1px solid #c58b50;box-shadow:inset 0 1px #d6a66e,3px 5px 8px #1d100988;text-align:left;font:600 11px Lora}.warehouse-camera button.active{background:linear-gradient(#b6783d,#8b552d);transform:translateX(7px)}.warehouse-shelf{display:block;left:12%;right:29%;top:142px;bottom:78px;padding:0;border:0;background:transparent;box-shadow:none;overflow:visible}.warehouse-shelf:before{display:none}.material-pile{position:absolute;width:190px;height:182px;min-height:0;padding:0 0 38px;align-self:auto}.material-pile:nth-child(1){left:2%;top:2%}.material-pile:nth-child(2){left:30%;top:10%}.material-pile:nth-child(3){left:58%;top:1%}.material-pile:nth-child(4){left:16%;top:47%}.material-pile:nth-child(5){left:48%;top:50%}.material-pile>img{height:145px;filter:drop-shadow(0 13px 8px #160c0788)}.material-tag{min-width:125px;padding:7px 10px;font-size:14px}.material-tag small{font-size:11px}.material-count{right:4px;top:5px;font-size:11px;padding:5px 8px}.warehouse-foreground{height:220px;padding:0;background:linear-gradient(0deg,#311c12d9,#4b291aa8 58%,transparent);display:block;pointer-events:none}.warehouse-basket{pointer-events:auto;position:absolute;left:39%;bottom:16px;width:330px;height:155px;min-height:0;padding:22px 18px 16px 88px;border:0;border-radius:18px 18px 45% 45%;background:repeating-linear-gradient(76deg,#ad7440 0 6px,#d49c5a 7px 12px,#8b572f 13px 16px);box-shadow:inset 0 0 0 7px #704324,0 14px 18px #160c0788;overflow:auto}.warehouse-basket:before{left:8px;bottom:25px;width:82px;height:94px;background:url('/assets/crafting/materials/14.webp') center/contain no-repeat;filter:drop-shadow(0 8px 5px #160c07)}.warehouse-basket:after{content:'';position:absolute;left:16%;right:16%;top:-34px;height:65px;border:9px solid #8a562f;border-bottom:0;border-radius:50% 50% 0 0;pointer-events:none}.basket-bundle{z-index:2}.warehouse-receipt{pointer-events:auto;right:22px;bottom:25px;width:188px;min-height:142px;padding:18px 13px 10px}.warehouse-receipt p{font-size:11px}.warehouse-receipt>div{font-size:13px}.warehouse-receipt em{font-size:9px}.warehouse-actions{pointer-events:none;inset:0}.warehouse-actions .checkout{position:absolute;pointer-events:auto;right:218px;bottom:18px;margin:0;min-height:46px;padding:11px 16px;font-size:11px}.emergency-chest{position:absolute;pointer-events:auto;left:22px;bottom:12px!important;width:135px;height:116px;padding:0!important;background:transparent!important;color:#fff1cf!important}.emergency-chest img{display:block;width:118px;height:88px;object-fit:contain;filter:drop-shadow(0 9px 7px #160c07aa)}.emergency-chest span{display:block;margin-top:-8px;background:#4e2c1de6;border:1px solid #ae7b48;border-radius:3px;padding:6px;font:600 10px Lora}.empty-basket{position:relative;z-index:2;font-size:11px}.quick-stock{grid-template-columns:repeat(4,1fr);background:linear-gradient(#734526,#4f2e1d)}.quick-bin{background:transparent;border:0}.inventory-chest footer button{min-height:44px}

.crate-scene .delivery-crate{left:38%;top:50%;width:min(610px,62%);height:390px}.crate-scene .crate-bins{left:auto;right:2.5%;top:16%;bottom:4%;width:24%;display:flex;flex-direction:column;gap:9px}.crate-scene .crate-bins button{flex:1;min-height:0;justify-content:flex-start;padding:8px 12px;background:linear-gradient(90deg,#5f3823ed,#3d2418e8)}.crate-scene .crate-bins img{width:85px;height:75px}.crate-scene .crate-bins span{font-size:14px}.crate-instruction{left:38%;top:auto;bottom:18px;font-size:12px}.shipment-item{width:155px}.shipment-item img{width:150px;height:125px}.shipment-item span{font-size:11px}

@media(max-width:760px){.warehouse-camera{top:78px;left:8px;right:8px;width:auto;flex-direction:row;overflow-x:auto}.warehouse-camera button{min-height:42px;white-space:nowrap}.warehouse-camera button.active{transform:translateY(2px)}.warehouse-shelf{display:grid;left:2%;right:2%;top:128px;bottom:205px;grid-template-columns:repeat(2,1fr);gap:6px;overflow-y:auto;padding:28px 8px 8px;align-items:start}.material-pile,.material-pile:nth-child(n){position:relative;left:auto;top:auto;width:100%;height:135px;padding-bottom:30px}.material-pile>img{height:102px}.material-tag{min-width:98px;font-size:11px;padding:5px}.material-tag small{font-size:9px}.material-count{font-size:9px}.warehouse-foreground{height:205px}.warehouse-basket{left:27%;bottom:8px;width:185px;height:128px;padding:14px 8px 8px 50px}.warehouse-basket:before{width:50px;height:65px}.warehouse-basket:after{top:-24px;height:45px;border-width:6px}.basket-bundle{max-width:108px;padding:4px}.bundle-art{width:38px}.bundle-art img{width:34px;height:34px}.warehouse-receipt{right:7px;bottom:9px;width:120px;min-height:105px;padding:13px 7px 6px}.warehouse-receipt p{font-size:7px}.warehouse-receipt>div{font-size:9px}.warehouse-receipt em{font-size:6px}.warehouse-actions .checkout{right:130px;bottom:8px;min-height:42px;padding:8px;font-size:8px}.emergency-chest{left:5px;width:85px;height:90px}.emergency-chest img{width:78px;height:65px}.emergency-chest span{font-size:8px}.crate-scene .delivery-crate{left:40%;top:38%;width:75%;height:260px}.crate-scene .crate-bins{left:2%;right:2%;top:auto;bottom:7px;width:auto;height:170px;display:grid;grid-template-columns:1fr 1fr}.crate-scene .crate-bins button{min-height:72px}.crate-scene .crate-bins img{width:52px;height:48px}.crate-scene .crate-bins span{font-size:11px}.crate-instruction{left:40%;bottom:177px;font-size:9px}.shipment-item{width:95px}.shipment-item img{width:90px;height:75px}}
@media(max-height:520px) and (min-width:700px){.warehouse-camera{top:56px;left:8px;width:105px}.warehouse-camera button{min-height:33px;font-size:9px}.warehouse-shelf{left:11%;right:27%;top:72px;bottom:15px}.material-pile,.material-pile:nth-child(n){width:135px;height:112px;padding-bottom:25px}.material-pile:nth-child(1){left:2%;top:0}.material-pile:nth-child(2){left:28%;top:5%}.material-pile:nth-child(3){left:55%;top:0}.material-pile:nth-child(4){left:15%;top:48%}.material-pile:nth-child(5){left:46%;top:50%}.material-pile>img{height:86px}.material-tag{min-width:95px;font-size:10px;padding:4px}.material-tag small{font-size:8px}.material-count{font-size:8px}.warehouse-foreground{height:120px}.warehouse-basket{left:42%;bottom:5px;width:250px;height:93px;padding:8px 6px 6px 65px}.warehouse-basket:before{width:58px;height:64px;bottom:13px}.warehouse-basket:after{top:-20px;height:38px;border-width:5px}.warehouse-receipt{width:164px;min-height:92px;bottom:6px;padding:11px 8px 5px}.warehouse-receipt p{font-size:7px}.warehouse-receipt>div{font-size:9px}.warehouse-receipt em{font-size:6px}.warehouse-actions .checkout{right:178px;bottom:6px;min-height:36px;padding:6px;font-size:8px}.emergency-chest{left:8px;bottom:3px!important;width:85px;height:90px}.emergency-chest img{width:80px;height:66px}.crate-scene .delivery-crate{left:38%;height:230px}.crate-scene .crate-bins{top:12%;bottom:3%}.crate-scene .crate-bins img{width:58px;height:48px}.crate-instruction{left:38%;bottom:7px}}

/* Final spatial pass: use the generated dry storeroom and make the foreground a real basket. */
.overlay:has(.warehouse-game){position:fixed;inset:0;padding:0;background:#132e26;backdrop-filter:none;align-items:stretch}
.warehouse-game,.crate-scene{width:100vw;height:100dvh;border:0;border-radius:0;box-shadow:none;background-image:linear-gradient(#17382f30,#1c120a38),url('/assets/crafting/store.webp')}
.warehouse-shade{background:linear-gradient(#173c328f 0 12%,transparent 34%,#24150d5e 100%)}
.material-pile:nth-child(1){top:10%}.material-pile:nth-child(2){top:8%}.material-pile:nth-child(3){top:10%}.material-pile:nth-child(4){top:48%}.material-pile:nth-child(5){top:49%}
.material-pile:before{content:'';position:absolute;z-index:-1;left:15%;right:15%;bottom:34px;height:18px;border-radius:50%;background:#1e120b66;filter:blur(5px);transform:perspective(100px) rotateX(68deg)}
.material-count{right:10%;top:auto;bottom:39px;transform:translateY(-100%);box-shadow:0 3px 7px #160c0766}
.warehouse-basket{left:42%;bottom:6px;width:315px;height:195px;padding:66px 42px 25px;background:url('/assets/crafting/materials/14.webp') center/contain no-repeat;border:0;border-radius:0;box-shadow:none;overflow:visible;align-items:center;justify-content:center}
.warehouse-basket:before{content:'';left:16%;right:16%;bottom:22px;width:auto;height:48%;background:#1b0d086e;border-radius:50%;filter:blur(7px);box-shadow:inset 0 12px 17px #0f0806aa}
.warehouse-basket:after{display:none}
.basket-bundle{max-width:112px;min-height:64px;padding:2px;background:transparent;color:#fff2d6;text-shadow:0 2px 5px #1b0d08;filter:drop-shadow(0 5px 4px #1b0d08aa)}
.basket-bundle .bundle-art{width:70px;height:58px}
.basket-bundle .bundle-art img{width:58px;height:58px}
.basket-bundle>span:last-child{position:absolute;left:50%;bottom:-10px;transform:translateX(-50%);min-width:86px;padding:3px 5px;background:#f1d7a9;color:#513923;text-shadow:none;border:1px solid #aa7847;border-radius:2px}
.basket-bundle small{display:none}
.empty-basket{padding:7px 10px;background:#3d2417d9;border:1px solid #bd8b55;border-radius:3px;text-align:center;color:#ffe7b9;text-shadow:0 2px 4px #160c07}
.warehouse-actions .checkout{right:214px}
.checkout-short{display:none}
.crate-scene .crate-bins button{background:linear-gradient(90deg,#5f38238c,#3d24184d);border-color:#c89a638f;box-shadow:inset 0 -2px #2a170d66,0 5px 14px #1a0f0944}

@media(max-width:760px){.material-pile:nth-child(n){top:auto;left:auto}.warehouse-basket{left:82px;bottom:52px;width:170px;height:132px;padding:43px 22px 18px}.warehouse-basket:before{bottom:16px}.material-pile:before{bottom:29px}.material-count{right:4%;bottom:32px}.warehouse-receipt{right:5px;bottom:55px;width:132px;min-height:108px}.warehouse-actions .checkout{left:8px;right:8px;bottom:5px;width:auto;min-height:44px;margin:0;padding:10px;font-size:11px}.checkout-full{display:none}.checkout-short{display:inline}.emergency-chest{left:4px;bottom:55px!important;width:82px;height:90px}.basket-bundle{max-width:80px}.basket-bundle .bundle-art{width:48px;height:42px}.basket-bundle .bundle-art img{width:42px;height:42px}.basket-bundle>span:last-child{min-width:70px;font-size:8px}}
@media(max-height:520px) and (min-width:700px){.warehouse-basket{left:42%;bottom:0;width:220px;height:118px;padding:40px 24px 14px}.warehouse-basket:before{bottom:10px}.material-pile:before{bottom:24px}.material-count{right:2%;bottom:27px}.warehouse-actions .checkout{right:174px}.basket-bundle{min-height:45px}.basket-bundle .bundle-art{width:44px;height:38px}.basket-bundle .bundle-art img{width:38px;height:38px}}

/* Purchases commit at checkout; opening the crate is optional feedback. */
.warehouse-mobile-title{display:none}.warehouse-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px}.warehouse-return{min-height:44px;padding:8px 12px;border:1px solid #d6b373;border-radius:5px;background:#315b4ee8;color:#fff5dc;font:600 11px Lora;box-shadow:0 5px 12px #14271f55}.warehouse-hud .management-money button{width:44px;height:44px}.crate-commit-note{position:absolute;z-index:9;top:96px;left:50%;transform:translateX(-50%);width:min(530px,68vw);padding:8px 13px;border:1px solid #d6b373;border-radius:5px;background:#264e42e8;color:#fff5d8;text-align:center;box-shadow:0 6px 16px #1b120b55}.crate-commit-note strong,.crate-commit-note span{display:block}.crate-commit-note strong{font:600 12px Lora}.crate-commit-note span{margin-top:3px;font-size:9px;line-height:1.45;color:#ead8b7}
@media(max-width:760px){.warehouse-hud>div:first-child{max-width:135px}.warehouse-desktop-title{display:none}.warehouse-mobile-title{display:inline}.warehouse-header-actions{gap:4px}.warehouse-return{min-height:44px;padding:6px 7px;font-size:9px;line-height:1.2;max-width:96px}.warehouse-hud .management-money{gap:4px}.warehouse-hud .management-money span{padding:7px 8px;font-size:9px}.warehouse-hud .management-money button{width:44px;height:44px}.crate-commit-note{top:79px;width:calc(100% - 16px);padding:6px 8px}.crate-commit-note strong{font-size:10px}.crate-commit-note span{font-size:8px}}
@media(max-height:520px) and (min-width:700px){.warehouse-return{min-height:38px;padding:6px 9px;font-size:9px}.warehouse-hud .management-money button{width:38px;height:38px}.crate-commit-note{top:58px;width:min(500px,66vw);padding:5px 10px}.crate-commit-note strong{font-size:10px}.crate-commit-note span{font-size:7px}}

