*{box-sizing:border-box} :root{font-family:monospace;color:#26372b;background:#17251c}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at top,#314b36,#17251c 75%);padding:12px;display:flex;justify-content:center;image-rendering:pixelated}.game{width:min(900px,100%);display:flex;flex-direction:column;gap:12px}.topbar,.controls,.upgrades{background:#f1e9cf;border:4px solid #26372b;box-shadow:5px 5px 0 #101a13;padding:12px}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:10px}.brand-icon{font-size:38px}.brand h1{font-size:20px;margin:0;letter-spacing:2px}.brand small,.resource small{display:block;font-size:9px;letter-spacing:2px;color:#72806b}.resources{display:flex;gap:18px}.resource{text-align:center;min-width:50px}.resource span{font-size:19px}.resource strong{display:block;font-size:19px}.world{height:clamp(210px,32dvh,290px);position:relative;overflow:hidden;border:4px solid #26372b;background:linear-gradient(#8ac5d0 0%,#b6d6bd 67%,#739c56 68%);box-shadow:5px 5px 0 #101a13}.sun{position:absolute;right:12%;top:12%;font-size:35px;color:#f9d875}.cloud{position:absolute;color:#fff;font-size:42px;opacity:.7}.cloud1{left:15%;top:14%}.cloud2{left:60%;top:24%}.mountains{position:absolute;bottom:27%;width:100%;height:80px;background:#789c7b;clip-path:polygon(0 100%,15% 10%,30% 100%,50% 0,75% 100%,90% 25%,100% 100%)}.ground{position:absolute;bottom:0;height:28%;width:100%;background:#6e9b50;border-top:5px solid #456b3b}.forest{position:absolute;bottom:23%;left:34%;display:flex;gap:12px;align-items:flex-end;z-index:2}.tree-placeholder{font-size:50px;filter:drop-shadow(3px 4px 0 #315c37)}.tree{font-size:42px;animation:grow .4s ease-out}@keyframes grow{from{transform:scale(.1)}to{transform:scale(1)}}.cabin{position:absolute;z-index:3;left:7%;bottom:19%;width:110px;height:105px}.roof{position:absolute;top:0;left:-8px;width:126px;height:47px;background:#75462f;clip-path:polygon(50% 0,100% 100%,0 100%);border-bottom:5px solid #513321}.cabin-body{position:absolute;bottom:0;width:110px;height:67px;background:#bd8850;border:5px solid #75462f}.door{position:absolute;bottom:0;left:38px;width:29px;height:42px;background:#68442f;border:3px solid #513321}.window{position:absolute;right:7px;top:10px;width:20px;height:20px;background:#8ed3dc;border:3px solid #68442f}.smoke{position:absolute;right:-12px;top:-20px;color:#fff;font-size:24px;animation:float 2s infinite}@keyframes float{50%{transform:translateY(-10px);opacity:.4}}.worker{position:absolute;z-index:4;bottom:21%;left:23%;text-align:center;animation:work 1s infinite alternate}.worker-head{font-size:38px}.worker-label{white-space:nowrap;font-size:9px;background:#f1e9cf;padding:2px 5px;border:2px solid #26372b}.worker.chopping{animation:chop .3s infinite alternate}@keyframes chop{to{transform:rotate(-12deg) translateX(5px)}}.world-caption{position:absolute;bottom:5px;right:8px;z-index:5;font-size:9px;letter-spacing:1px;color:#f8f3d9;text-shadow:1px 1px #26372b}.controls,.upgrades{display:flex;flex-direction:column;gap:12px}.section-heading{display:flex;justify-content:space-between;align-items:center}.section-heading h2{font-size:15px;margin:0 0 4px}.section-heading p{font-size:10px;margin:0;color:#78806b}.level{background:#355d3c;color:#fff;padding:7px;font-size:10px}.actions{display:flex;flex-wrap:wrap;gap:6px}.actions button{flex:1 1 0;min-width:0}.actions button,.upgrade{font:inherit;color:#26372b;background:#d9cfaa;border:3px solid #526346;padding:10px;cursor:pointer;text-align:left;box-shadow:3px 3px 0 #9b956f;display:flex;flex-direction:column;gap:4px}.actions button span{font-size:21px}.actions button strong{font-size:12px}.actions button small{font-size:10px;color:#637254}.actions .primary{background:#b7d19b}.actions button:active,.upgrade:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #9b956f}.production{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:6px}.production div{background:#e3dac0;border:2px solid #c6bd9e;padding:7px;display:flex;flex-direction:column;gap:4px}.production span{font-size:9px}.production strong{font-size:15px}.production small{font-size:8px;color:#78806b}.production strong.pos{color:#2e7d32}.production strong.neg{color:#b3261e}.upgrade-list{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.upgrade{position:relative;min-height:68px}.upgrade strong{font-size:11px}.upgrade span{font-size:10px;color:#65735a}.upgrade em{font-size:10px;font-style:normal;font-weight:bold;color:#795a2c}.upgrade:disabled{opacity:.48;cursor:not-allowed;filter:grayscale(.6)}.fences{position:absolute;bottom:3%;left:34%;right:2%;display:flex;gap:6px;align-items:flex-end;z-index:3;pointer-events:none;color:#f8f3d9;font-size:10px;text-shadow:1px 1px #26372b}.fence{flex:0 0 28px;height:22px;border-left:4px solid #75462f;border-right:4px solid #75462f;background:linear-gradient(#bd8850 0 18%,transparent 18% 55%,#bd8850 55% 73%,transparent 73%)}.teaser{grid-column:1/-1;display:flex;flex-direction:column;gap:6px;justify-content:center;min-height:68px;padding:10px;border:3px dashed #526346;background:#e3dac0}.teaser strong{font-size:11px}.teaser div:not(.bar){font-size:14px;letter-spacing:2px;word-break:break-all}.teaser span{font-size:10px;color:#65735a}.teaser .bar{height:10px;border:2px solid #526346;background:#c6bd9e}.teaser .bar i{display:block;height:100%;background:#355d3c}.badges{position:absolute;top:6px;left:6px;display:flex;flex-wrap:wrap;gap:4px;max-width:70%;z-index:6}.badge{font-size:15px;line-height:1;background:rgba(241,233,207,.85);border:2px solid #26372b;padding:2px 3px}.pulse{animation:pulse .5s 4}@keyframes pulse{50%{transform:scale(1.45)}}.actions #sell{background:#e7c97a}.actions #sell:disabled{opacity:.5;cursor:not-allowed}.actions #sellWood{background:#e7c97a}.actions #sellWood:disabled{opacity:.5;cursor:not-allowed}.actions button{padding:6px 3px;align-items:center;text-align:center;gap:2px}.actions button strong{font-size:9px;line-height:1.15}.actions button small{font-size:9px;line-height:1.1}.actions .lbl{font-style:normal}.actions button span{font-size:20px}.actions #craft{background:#d9b9a0}.actions #craft:disabled{opacity:.5;cursor:not-allowed}.actions #sellFurn{background:#e7c97a}.actions #sellFurn:disabled{opacity:.5;cursor:not-allowed}.dev{display:none;position:fixed;left:6px;bottom:6px;z-index:60;flex-wrap:wrap;gap:4px;max-width:270px;padding:6px;background:rgba(16,26,19,.92);border:2px solid #63735f;font:10px monospace;color:#c4d0b7}.dev.on{display:flex}.dev b{width:100%;font-weight:normal;letter-spacing:1px}.dev button{font:inherit;padding:3px 5px;background:#26372b;color:#f1e9cf;border:1px solid #63735f;cursor:pointer}.worker.sleepy .worker-head::after,.worker.dozing .worker-head::after{content:"💤";font-size:16px;position:absolute;margin:-8px 0 0 -6px}.crew.sleepy span,.crew.dozing span{position:relative}.crew.sleepy span::after,.crew.dozing span::after{content:"💤";font-size:12px;position:absolute;top:-8px;right:-4px}.world.hit{animation:shake .5s}.world.hit::after{content:"";position:absolute;inset:0;background:rgba(224,60,40,.25);pointer-events:none;z-index:9}@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}.topbar{flex-wrap:wrap}.attn{flex:1 1 100%;position:relative;border:2px solid #526346;background:#e3dac0;padding:4px 8px;font-size:11px;cursor:help;overflow:hidden}.attn i{position:absolute;left:0;bottom:0;height:3px;background:#355d3c;width:0}.attn.s1{background:#f1dfa8}.attn.s2{background:#efc9a0}.attn.s3{background:#e9a89e}.page{display:flex;flex-direction:column;gap:12px;animation:pagein .3s}@keyframes pagein{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:none}}
.tabs{display:flex;gap:6px;flex:1 1 100%}.tabs button{flex:1;font:inherit;font-size:11px;padding:4px;border:2px solid #526346;background:#d9cfaa;color:#26372b;cursor:pointer}.tabs button.on{background:#355d3c;color:#fff}.dot{font-style:normal;color:#d32f2f}
.topbar[data-w="field"] .resource[data-w="forest"],.topbar[data-w="forest"] .resource[data-w="field"]{display:none}
.fieldworld{background:linear-gradient(#a8d8ea 0%,#d6ecc9 58%,#8fbf5a 59%)}
.fhills{position:absolute;bottom:26%;width:100%;height:70px;background:#9bc58a;clip-path:polygon(0 100%,0 40%,20% 10%,45% 45%,70% 5%,100% 40%,100% 100%)}
.fgrass{position:absolute;bottom:0;width:100%;height:30%;background:#7fb04f;border-top:5px solid #5d8c3a}
.barn{position:absolute;left:5%;bottom:24%;font-size:62px;z-index:3}
.flock{position:absolute;left:22%;right:3%;bottom:6%;display:flex;flex-wrap:wrap-reverse;align-items:flex-end;gap:4px;max-height:78%;z-index:4;font-size:30px;overflow:hidden}
.flock span{animation:bob 1s infinite alternate}.flock .more{font-size:12px;align-self:center;color:#26372b;background:rgba(241,233,207,.8);padding:2px 4px;animation:none}
.fcrew{position:absolute;bottom:30%;left:14%;display:flex;gap:2px;z-index:4;font-size:26px}.fcrew span{animation:bob .8s infinite alternate;position:relative}.fcrew.dozing span::after{content:"💤";font-size:12px;position:absolute;top:-10px;right:-6px}
.actions button:disabled{opacity:.5;cursor:not-allowed}.actions #fSellWool,.actions #fSellYarn,.actions #fSellSwe{background:#e7c97a}.actions #fSpin,.actions #fKnit{background:#d8b98c}
.toggles{display:flex;flex-wrap:wrap;gap:8px}.tlabel{font-style:normal;font-size:10px;align-self:center;color:#78806b}.toggles button.on{border-color:#2e7d32;background:#cfe3c4}.toggles button.off{border-color:#b3261e;background:#eac9c4}.toggles button{font:inherit;font-size:10px;color:#26372b;background:#d9cfaa;border:2px solid #526346;padding:6px 8px;cursor:pointer}.actions #cut{background:#d8b98c}.actions #cut:disabled{opacity:.5;cursor:not-allowed}.cabin{transform-origin:left bottom}.cabin[data-s="1"]{transform:scale(1.1)}.cabin[data-s="2"]{transform:scale(1.2)}.cabin[data-s="3"]{transform:scale(1.3)}.flag{display:none;position:absolute;top:-34px;left:52px;font-size:20px}.cabin[data-s="2"] .flag,.cabin[data-s="3"] .flag{display:block}.crew{position:absolute;bottom:7%;left:30%;display:flex;gap:2px;z-index:4;font-size:26px}.crew span{animation:bob .8s infinite alternate}@keyframes bob{to{transform:translateY(-4px)}}.tree.oak{font-size:52px}.actions #panic{flex:1 1 100%;background:#e07a6a;animation:alarm .5s infinite alternate}@keyframes alarm{to{filter:brightness(1.25)}}footer{display:flex;justify-content:space-between;align-items:center;color:#c4d0b7;font-size:10px;padding:2px 4px}footer button{background:transparent;color:#c4d0b7;border:1px solid #63735f;padding:5px;font:inherit;cursor:pointer}.toast{max-width:92vw;text-align:center;position:fixed;bottom:15px;left:50%;transform:translateX(-50%);background:#26372b;color:#fff;padding:10px 15px;border:2px solid #a6c88d;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}@media(max-width:640px){.actions{gap:4px}.actions:is([data-n="5"],[data-n="6"],[data-n="7"]) :is(.lbl,small){display:none}}@media(max-width:520px){body{padding:7px}.topbar{align-items:flex-start;flex-direction:column}.resources{width:100%;justify-content:space-around}.world{height:220px}.upgrade-list{grid-template-columns:1fr}.production span{font-size:8px}.production div{padding:5px}.brand h1{font-size:18px}.brand{display:none}.topbar{padding:6px}}@media(max-height:700px) and (min-width:521px){.game{gap:7px}.world{height:clamp(150px,25dvh,210px)}.topbar,.controls,.upgrades{padding:8px}.upgrade{min-height:55px;padding:7px}}
/* hidden must win over display rules such as .tabs{display:flex} */
[hidden]{display:none!important}

.amb{font-size:12px;white-space:nowrap}.amb input{width:80px;vertical-align:middle}

.cooling{opacity:.5;cursor:not-allowed}
.actions button{position:relative}.actions button .chk{position:absolute;top:2px;right:3px;font-size:9px;line-height:1;padding:2px 3px;background:#cfe3c4;border:1px solid #2e7d32;color:#26372b;cursor:pointer}.actions button .chk:not(.on){background:#eac9c4;border-color:#b3261e}
.page>.production{position:sticky;top:var(--tb,70px);z-index:19;background:#f1e9cf;border:4px solid #26372b;box-shadow:5px 5px 0 #101a13;padding:6px;margin-bottom:12px}
.ovp{display:flex;align-items:center;gap:6px}.ovbar{display:inline-block;width:110px;height:8px;border:2px solid #63735f;background:#17251c}.ovbar b{display:block;height:100%;background:#8fbf5a}.ovp em{font-style:normal}
.production>.attn{grid-column:1/-1}
.ugroup{grid-column:1/-1;font-size:10px;letter-spacing:2px;color:#72806b;border-bottom:2px solid #c6bd9e;padding:6px 2px 2px;margin-top:4px}.ugroup:first-child{margin-top:0}

.cabin{width:clamp(90px,17vw,150px);height:auto;aspect-ratio:160/120}.cabin .house{display:block;width:100%;height:100%;overflow:visible}.puff{fill:#fff;opacity:0;animation:puff 3s infinite}@keyframes puff{0%{opacity:.75;transform:translateY(0)}100%{opacity:0;transform:translateY(-22px)}}
.page>.production{display:flex;flex-wrap:wrap}.page>.production>div{flex:1 1 120px;min-width:0}.page>.production>.attn{flex:1 1 100%}
.world-caption{display:flex;gap:14px}

.forest{display:block;left:34%;right:3%;height:90px;bottom:23%}
.forest .tree{position:absolute;transform-origin:50% 100%;animation:none;line-height:1;filter:drop-shadow(2px 3px 0 #315c37)}
.forest .tree.s{font-size:22px}
.forest .tree.m{font-size:42px}
.forest .tree.more{right:0;left:auto;bottom:0;font-size:14px;color:#f8f3d9;text-shadow:1px 1px #26372b;filter:none}
.forest .tree.sprout{animation:sprout .6s ease-out both}
.forest .tree.grow{animation:growup 1s ease-out both}
.forest .tree.fall{animation:fall .8s ease-in forwards}
@keyframes sprout{from{transform:scale(0)}to{transform:scale(1)}}
@keyframes growup{from{transform:scale(.45)}to{transform:scale(1)}}
@keyframes fall{0%{transform:rotate(0);opacity:1}70%{transform:rotate(85deg) translateX(6px);opacity:1}100%{transform:rotate(90deg) translateX(10px);opacity:0}}

.crew{gap:12px;align-items:flex-end}.cgroup{display:flex;flex-direction:column;align-items:center;gap:1px}.cgroup>div:first-child{display:flex;gap:2px}
.plabel{white-space:nowrap;font-size:9px;font-style:normal;background:#f1e9cf;color:#26372b;padding:1px 4px;border:2px solid #26372b;animation:none!important}
.fences{align-items:flex-end}.fences .plabel{align-self:center;margin-right:4px}
.crew .plabel::after{content:none!important}
.crew{bottom:11%}.fences{bottom:2%}

.barn{width:clamp(90px,17vw,150px);aspect-ratio:160/120;font-size:0;left:3%;bottom:24%}.barn .house{display:block;width:100%;height:100%;overflow:visible}
.fcrew{gap:10px;align-items:flex-end;bottom:12%;left:12%}.fcrew .plabel::after{content:none!important}.fcrew.dozing .cgroup>div span::after{content:"💤"}
.flock .plabel{align-self:flex-end;font-size:9px;animation:none}
.allauto{font:inherit;font-size:10px;color:#26372b;background:#d9cfaa;border:2px solid #526346;padding:5px 8px;cursor:pointer;align-self:center}.allauto:hover{background:#cfe3c4}.brand .allauto{margin-left:8px}
.topbar[data-w="bees"] .resource[data-w="forest"],.topbar[data-w="bees"] .resource[data-w="field"],.topbar[data-w="forest"] .resource[data-w="bees"],.topbar[data-w="field"] .resource[data-w="bees"]{display:none}
.beesworld{background:linear-gradient(#ffe9a8 0%,#fff2c6 58%,#b8d36a 59%)}
.swarm span:not(.plabel):not(.more){animation:fly 1.6s ease-in-out infinite alternate;display:inline-block}
@keyframes fly{from{transform:translate(0,0) rotate(-6deg)}to{transform:translate(8px,-10px) rotate(8deg)}}
.beesworld .fgrass{background:#9dbd4e;border-top-color:#7a9a35}

.tabwrap{flex:1;display:flex;gap:5px;align-items:center}.tabwrap[hidden]{display:none}.tabwrap input{margin:0;width:17px;height:17px;cursor:pointer;accent-color:#355d3c;flex:none}.tabwrap input[hidden]{display:none}.tabwrap button{flex:1}
.cap{display:flex;align-items:center;gap:6px;font-size:9px;color:#78806b;margin:-2px 0 8px}.cap i{flex:1;max-width:280px;height:5px;border:1px solid #8d8468;background:#e3dac0}.cap b{display:block;height:100%;background:#8fbf5a}.cap em{font-style:normal}.cap.full b{background:#d9822b}.cap.full em{color:#b3261e}
.tabwrap .allauto{padding:0;border:0;background:none;font-size:inherit}

.topbar[data-w="corp"] .resource[data-w="forest"],.topbar[data-w="corp"] .resource[data-w="field"],.topbar[data-w="corp"] .resource[data-w="bees"],.topbar[data-w="forest"] .resource[data-w="corp"],.topbar[data-w="field"] .resource[data-w="corp"],.topbar[data-w="bees"] .resource[data-w="corp"]{display:none}
.corpworld{background:linear-gradient(#b8d4e8 0%,#dfeaf2 58%,#8f9aa6 59%)}.corpworld .fgrass{background:#8f9aa6;border-top-color:#6b7580}
.production>div{position:relative}.production .chk{position:absolute;top:2px;right:3px;font-size:9px;line-height:1;padding:2px 3px;background:#cfe3c4;border:1px solid #2e7d32;color:#26372b;cursor:pointer}.production .chk:not(.on){background:#eac9c4;border-color:#b3261e}
.tabs>.allauto{margin:0 6px 0 0;width:18px;height:18px;padding:0;border:0;background:none;cursor:pointer;accent-color:#355d3c;align-self:center;flex:none}.tabs>.allauto[hidden]{display:none}
.section-heading .cap{margin:0;align-self:center;flex:1;max-width:420px;justify-content:flex-end}.section-heading .cap i{max-width:200px}
