#woodDialog{width:min(800px,calc(100vw - 20px));max-width:none}
#woodDialog p{margin:6px 0;color:#57462d}
#woodDialog #woodWhere[data-short=true]{color:#84462b}
.wood-menu{display:grid;grid-template-columns:minmax(145px,1fr) minmax(0,2.25fr);gap:9px;margin-top:10px}
.wood-recipes,.wood-product,.wood-sites section{min-width:0;padding:10px;border:1px solid #b99e72;border-radius:13px;background:#fff6e4}
.wood-recipes{display:grid;align-content:start;gap:6px;background:#efe0bd}
.wood-recipes button{display:flex;align-items:center;gap:6px;text-align:left;line-height:1.15}
#woodDialog button[aria-pressed=true],#woodMake{background:#62734b;color:#fff9e6;border-color:#4e6440}
.wood-recipes img,.wood-cost img{width:39px;height:33px;object-fit:contain}
.wood-art,.wood-cost,.wood-buttons,.wood-quantity{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.wood-art{flex-wrap:nowrap;margin-bottom:10px}
.wood-art img{width:105px;height:81px;object-fit:contain}
.wood-art h3{margin:0}
.wood-cost,.wood-notice{padding:8px;border:1px solid #c5af86;border-radius:9px;background:#f1e3c6}
.wood-notice{background:#e8edcf;color:#455535}
.wood-cost p{margin:0!important}
.wood-buttons,.wood-quantity{margin:8px 0}
.wood-quantity input{width:8ch;min-height:42px;border-radius:8px;border:1px solid #b09973;background:#fffdf5;color:#493920;padding:5px;font:inherit}
.wood-sites{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.wood-sites small,.wood-sites strong{display:block}
.wood-sites strong{margin-bottom:5px}
.wood-sites section>button{margin-top:3px}
#woodDialog button:disabled{opacity:.55;cursor:default}
@media(max-width:600px){
 .wood-menu{grid-template-columns:1fr}.wood-recipes{grid-template-columns:repeat(3,minmax(0,1fr));padding:6px}
 .wood-recipes button{justify-content:center;flex-direction:column;text-align:center;font-size:.79rem;min-width:0}
 .wood-art img{width:82px;height:68px}
}
@media(max-width:380px){.wood-sites{grid-template-columns:1fr}}

#chestPlacement{position:fixed;z-index:10;left:50%;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(445px,calc(100vw - 16px));padding:8px 12px;border:1px solid #b09562;border-radius:13px;background:#fff1d6;color:#503a24;box-shadow:0 3px 20px #402f2477}
#chestPlacement[hidden],#chestPlacement button[hidden]{display:none!important}
#chestPlacement p{margin:4px 0 7px;color:#59452d;font-size:.87rem}
#chestPlacement p[data-invalid=true]{color:#8b362e}
.chest-placement-actions{display:flex;gap:5px;flex-wrap:wrap}
#chestPlacement button{min-height:40px;padding:5px 9px;border:1px solid #ad936a;border-radius:8px;background:#eee0bf;color:#483825;font:inherit;cursor:pointer}
#chestPlacement [data-chest-confirm]{background:#5b7145;color:#fff3d8}
.chest-placing .stage-dock,.chest-placing .adv-top{visibility:hidden}
.chest-placing #treeCanvas{cursor:crosshair}
#stageNavigation .stage-pet-return{background:#68764e;color:#fff6df;font-weight:700}
@media(orientation:landscape){#chestPlacement{top:max(8px,env(safe-area-inset-top));bottom:auto}}
.wood-ingredient {display:flex;gap:6px;align-items:center;min-width:min(100%,152px)}
.wood-ingredient img {flex:none}
.device-finished {margin-top:10px;padding:9px;border:1px solid #c5af86;border-radius:10px;background:#fff2d2;color:#493724}
.device-finished h3,.device-finished p {margin:3px 0}
.device-finished img {width:34px;height:32px;object-fit:contain}
#kitchenView>.device-finished {margin-inline:auto;max-width:900px}
dialog.stage4-dialog[data-s4-view=furnace] {width:min(850px,calc(100% - 18px));max-width:none}
.furnace-grid {display:grid;grid-template-columns:1fr 1fr;gap:12px}
.furnace-recipes {display:grid;gap:6px}
.furnace-grid h3 {margin-top:0}
.furnace-grid .s4-queue li {margin:3px 0;padding:5px}
@media(max-width:560px){.furnace-grid {grid-template-columns:1fr}}

.device-finished nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.device-finished nav button[aria-pressed=true]{background:#dce7b4;border-color:#788a52;color:#394529}
.device-finished button{min-height:44px}
.device-finished .device-stock{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:6px}
.device-stock li{display:flex;align-items:center;gap:8px;padding:4px 7px;background:#fff9e8;border:1px solid #dbc7a1;border-radius:8px}
.device-stock img{flex:none}
.device-stock span{flex:1;overflow-wrap:anywhere}
.recipe-cook-dialog{width:min(660px,calc(100% - 20px));max-width:none;max-height:90dvh;overflow:auto}
.recipe-cook-dialog>.device-finished{margin-bottom:10px}
.recipe-cook-dialog>.device-finished p,.legacy-device-pickup p{color:#57442c}
dialog.legacy-device-pickup{width:min(650px,calc(100% - 18px));max-width:none}
.legacy-pickup-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0;padding:8px;border:1px solid #dbc7a1;border-radius:8px}
.legacy-pickup-row label{flex:1 0 100%}
.legacy-pickup-row select{flex:1;min-width:110px;min-height:40px;border-radius:7px;border:1px solid #ae9370;background:#fff9e8;color:#4a3722}
