:root{color-scheme:light;--paper:#eee5ce;--ink:#253544;--teal:#387e78;--muted:#64706e;--line:#cec5ac;--gold:#edc66d;font-family:'Atkinson Hyperlegible',sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid #c66348;outline-offset:4px}button{border:2px solid var(--ink);background:transparent;padding:10px 16px;font-weight:700}button:hover{background:#fff6df}button:active{transform:translateY(2px)}[hidden]{display:none!important}#app{max-width:1216px;margin:auto;padding:0 38px}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);font-size:14px}.topbar a{color:var(--ink);text-decoration:none;font-weight:700}.brand{font-family:'Pixelify Sans',monospace;font-size:16px}.topbar button{font-size:12px;padding:6px 11px;border:1px solid #a8a88f}.hero{display:grid;grid-template-columns:.85fr 1.45fr;gap:40px;padding:42px 0 34px;align-items:center}.edition{color:var(--teal);font-weight:700;font-size:14px;margin:0 0 15px}h1{font-family:'Pixelify Sans',monospace;font-size:92px;line-height:.83;letter-spacing:-2px;margin:0 0 24px}.title-dot{color:#c7654c}h2,h3{font-family:'Pixelify Sans',monospace}h2{font-size:26px;line-height:1.1;margin:0}h3{font-size:22px;margin:0 0 8px}.intro{font-weight:700;font-size:23px;line-height:1.25;margin:0 0 13px}.description{color:var(--muted);font-size:15px;line-height:1.5;margin:0}.hero-note{display:flex;align-items:center;gap:13px;font-size:12px;color:#637471;margin-top:23px}.tiny-player{position:relative;width:16px;height:18px;background:#4faaa4;margin-top:12px;box-shadow:inset -4px 0 #387e78}.tiny-player:before{content:'';position:absolute;top:-12px;left:2px;width:12px;height:12px;background:#eac29b;border-top:4px solid #dfb55d}.tiny-player:after{content:'';position:absolute;bottom:-6px;width:6px;height:6px;background:#253544;box-shadow:10px 0 #253544}.preview{position:relative;border:6px solid var(--ink);box-shadow:9px 9px 0 #d6ccb2;transform:rotate(1deg);background:#bea071;overflow:hidden}.preview canvas{display:block;width:100%;height:auto;aspect-ratio:700/430;image-rendering:pixelated}.preview-tag{position:absolute;left:18px;top:18px;padding:8px 12px;background:var(--paper);box-shadow:3px 3px 0 #25354470;display:flex;gap:9px;align-items:center;font-family:'Pixelify Sans',monospace;font-size:19px}.preview-tag i{width:7px;height:7px;background:var(--teal)}.preview-caption{position:absolute;bottom:0;left:0;right:0;background:#253544ed;color:#f4e7bf;font-family:'Pixelify Sans',monospace;font-size:16px;padding:10px 17px;letter-spacing:1px}.choose-heading{display:flex;justify-content:space-between;align-items:center;margin:12px 0 17px}.choose-heading>span{color:var(--muted);font-size:13px}.map-options{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.map-option{padding:0;text-align:left;position:relative;border:2px solid #babaa5;background:#e7dfc8;overflow:hidden}.map-option canvas{display:block;width:100%;height:104px;object-fit:cover;image-rendering:pixelated;filter:saturate(.8)}.map-copy{display:flex;flex-direction:column;padding:13px 17px 15px;gap:3px}.map-copy strong{font-family:'Pixelify Sans',monospace;font-size:23px}.map-copy small{font-weight:400;color:#62706b;font-size:13px}.map-check{display:none;position:absolute;right:12px;top:12px;background:var(--teal);color:white;padding:2px 7px}.map-option.selected{border-color:var(--teal);box-shadow:0 4px 0 var(--teal);background:#f4ecd7}.map-option.selected .map-check{display:block}.map-option.selected canvas{filter:none}.start-row{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:28px 0}.start-row p{margin:0;max-width:620px;font-size:14px}.best{color:var(--teal);font-size:13px!important;margin-top:6px!important}.primary{background:var(--teal);color:#fff5d8;border:2px solid var(--ink);box-shadow:4px 4px 0 var(--ink);font-family:'Pixelify Sans',monospace;font-size:25px;padding:15px 28px;white-space:nowrap}.primary:hover{background:#286b66}.primary:active{box-shadow:1px 1px 0 var(--ink);transform:translate(2px,2px)}.primary span{font-size:17px;margin-left:15px}.how{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:15px 0;font-size:14px}.how summary{cursor:pointer;font-weight:700;width:fit-content}.guide{display:grid;grid-template-columns:repeat(3,1fr);gap:25px;padding-top:22px}.guide p{line-height:1.55;color:#53635f}footer{display:flex;justify-content:space-between;font-size:12px;color:#7a8174;padding:23px 0 27px}footer>span:first-child{font-family:'Pixelify Sans',monospace;letter-spacing:1px}body.playing #app{max-width:1216px}body.playing .topbar{height:52px}.hud{display:flex;align-items:center;gap:34px;padding:18px 4px 16px}.hud>div>span{display:block;color:#66746c;font-size:12px;margin-bottom:2px}.hud strong{font-family:'Pixelify Sans',monospace;font-size:29px;line-height:1}.hud strong small{font:14px 'Atkinson Hyperlegible',sans-serif;color:#7b8275}.health-block{width:170px}.hud progress{display:block;width:100%;height:6px;margin-top:6px}.hud .weapon-block{margin-left:auto;min-width:82px}.hud #weapon{color:var(--teal);font-weight:700}.hud button{font-size:14px;padding:10px 13px}.stage{position:relative;border:5px solid var(--ink);background:#b99a69}.stage>canvas{width:100%;display:block;image-rendering:pixelated;aspect-ratio:896/504;touch-action:none;cursor:crosshair}.stage-info{position:absolute;left:16px;right:16px;top:13px;display:flex;justify-content:space-between;pointer-events:none}.stage-info span{font-family:'Pixelify Sans',monospace;font-size:17px;color:#fff1c9;background:#253544d9;padding:5px 9px}#notice{position:absolute;top:52px;left:50%;transform:translateX(-50%);background:#eee5ceee;padding:7px 15px;font-family:'Pixelify Sans',monospace;font-size:20px;text-align:center;pointer-events:none;white-space:nowrap}#notice:empty{display:none}#pickupPrompt{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);padding:8px 14px;background:var(--paper);border:2px solid var(--ink);font-size:14px;font-weight:700;white-space:nowrap;pointer-events:none}.dodge-meter{position:absolute;left:14px;bottom:15px;font-family:'Pixelify Sans',monospace;font-size:13px;color:#fff2cf;background:#253544d9;padding:6px 8px;width:100px}.dodge-meter progress{display:block;width:100%;height:4px;margin-top:4px}progress{appearance:none;border:0;background:#b7ba9f}progress::-webkit-progress-bar{background:#b7ba9f}progress::-webkit-progress-value{background:var(--teal)}progress::-moz-progress-bar{background:var(--teal)}.dodge-meter progress::-webkit-progress-value{background:#f3cc70}.game-help{display:flex;justify-content:center;gap:22px;padding:18px 0;color:#64726b;font-size:12px}kbd{font:700 12px 'Atkinson Hyperlegible',sans-serif;color:var(--ink)}.overlay{position:absolute;inset:0;background:#25354480;display:grid;place-items:center;padding:15px}.result-box{background:var(--paper);border:4px solid var(--ink);box-shadow:7px 7px 0 #25354477;padding:28px 38px;max-width:430px;text-align:center}.result-box>p:first-child{color:var(--teal);font-size:14px;font-weight:700;margin:0 0 9px}.result-box h2{font-size:52px}.result-box p{font-size:14px;line-height:1.4}.result-box>button{display:block;width:100%;margin-top:14px}.result-box>button:last-child{font-size:14px;border:0;padding:6px}#resultStats{display:flex;gap:45px;justify-content:center;margin:20px 0}#resultStats small{display:block;color:#657368;font-size:12px}#resultStats strong{font-family:'Pixelify Sans',monospace;font-size:34px}.touch-controls{display:none;align-items:center;justify-content:space-between;padding:17px 0;gap:10px;user-select:none;-webkit-user-select:none;touch-action:none}#stick{width:108px;height:108px;flex-shrink:0;border:2px solid #a6ae96;background:#d5d6bc;border-radius:50%;position:relative;touch-action:none}#stick i{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;color:#7a9083;font-size:60px;pointer-events:none}#stickKnob{position:absolute;left:32px;top:32px;width:40px;height:40px;border-radius:50%;background:var(--teal);border:3px solid var(--ink);z-index:1;pointer-events:none}.touch-actions{display:flex;align-items:center;gap:10px}.touch-actions button{height:52px;min-width:55px;padding:5px 9px;background:#e2d8bc;touch-action:none}.touch-actions #touchAttack{width:76px;height:76px;border-radius:50%;background:#c46652;color:#fff1cf;font:700 23px 'Pixelify Sans',monospace;border:3px solid var(--ink);box-shadow:0 4px 0 #8c5147}.auto-note{font-size:11px;color:#718071}.touch-controls button.held{background:#e4b66d!important;transform:translateY(3px)}@media(pointer:coarse){.touch-controls{display:flex}.game-help{display:none}}@media(min-width:900px){body.playing .stage{max-width:min(100%,calc((100dvh - 240px)*1.7778));margin:auto}}@media(max-width:800px){#app{padding:0 24px}.hero{gap:26px;padding:32px 0}.hero-copy h1{font-size:72px}.intro{font-size:20px}.hero-note{font-size:11px}.preview-tag{font-size:15px;left:10px;top:10px}.preview-caption{font-size:12px}.map-copy{padding:12px}.map-copy strong{font-size:20px}.map-options{gap:12px}.start-row p{font-size:13px}.primary{font-size:22px;padding:14px 22px}.guide{grid-template-columns:1fr}.hud{gap:24px}.health-block{width:130px}.game-help{gap:13px}.brand{font-size:12px}}@media(max-width:560px){#app{padding:0 16px}.topbar{height:59px;font-size:12px}.brand{display:none}.hero{grid-template-columns:1fr;gap:24px;padding:26px 0 23px}.hero-copy{position:relative}.hero-copy h1{font-size:76px;margin-bottom:17px}.hero-copy .intro{position:static;font-size:19px;margin:0 0 12px}.hero-copy .description{font-size:14px}.hero-note{display:none}.edition{font-size:12px;margin-bottom:15px}.preview{transform:none;border-width:4px;box-shadow:5px 5px 0 #d6ccb2}.preview canvas{aspect-ratio:700/350;object-fit:cover}.preview-caption{font-size:12px;padding:7px 10px}.preview-tag{font-size:16px}.choose-heading{margin:4px 0 12px}.choose-heading h2{font-size:23px}.choose-heading>span{display:none}.map-options{gap:8px}.map-option canvas{height:70px}.map-copy{padding:9px 7px 11px;min-height:58px}.map-copy strong{font-size:17px;line-height:1.1}.map-copy small{display:none}.map-check{top:6px;right:6px;padding:1px 4px;font-size:12px}.start-row{align-items:stretch;flex-direction:column;gap:17px;padding:22px 0}.primary{padding:15px 20px;font-size:24px}.start-row .primary{width:100%}footer{font-size:10px;gap:10px}.hud{gap:17px;padding:14px 0 12px}.hud>div>span{font-size:10px}.hud strong{font-size:23px}.hud strong small{display:none}.health-block{width:80px}.hud .weapon-block{min-width:47px}.hud button{font-size:14px;padding:8px}.hud button span{display:none}.stage{border-width:3px;margin:0 -10px}.stage>canvas{aspect-ratio:420/390}.stage-info{top:9px;left:8px;right:8px}.stage-info span{font-size:12px;padding:4px 6px}#notice{top:44px;font-size:16px;padding:6px 10px}#pickupPrompt{bottom:14px;left:auto;right:9px;transform:none;font-size:11px;padding:6px 8px}.dodge-meter{left:8px;bottom:13px;width:81px;font-size:11px}.touch-controls{display:flex;padding:17px 0 7px;gap:6px}#stick{width:94px;height:94px}#stickKnob{left:25px;top:25px}.touch-actions{gap:7px}.touch-actions button{min-width:48px;font-size:12px}.touch-actions #touchAttack{width:66px;height:66px;font-size:21px}.auto-note{display:none}.game-help{display:none}.result-box{padding:20px;max-width:310px}.result-box h2{font-size:40px}.result-box>p{font-size:12px}.result-box .primary{font-size:21px;padding:12px}#resultStats{margin:15px 0}.overlay{padding:9px}}@media(max-height:540px) and (orientation:landscape){body.playing .topbar{display:none}.hud{padding:6px 0;gap:20px}.hud strong{font-size:20px}.hud>div>span{font-size:10px}.stage{max-width:calc((100dvh - 100px)*1.77);margin:auto!important}.touch-controls{position:fixed;left:10px;right:10px;bottom:20px;pointer-events:none;z-index:2}.touch-controls>*{pointer-events:auto}.auto-note{display:none}body.playing footer{display:none}.result-box{padding:14px 26px}.result-box h2{font-size:34px}.result-box>p{margin:7px 0}.result-box .primary{font-size:20px;padding:10px}#resultStats{margin:10px 0}}@media(prefers-reduced-motion:reduce){button:active{transform:none}.preview{transform:none}}

.boss-status{display:grid;grid-template-columns:1fr auto;gap:5px 18px;background:#413c50;color:#f9e9cb;padding:9px 14px;margin-bottom:10px;border:2px solid var(--ink)}.boss-status>div{display:flex;gap:15px;align-items:baseline}.boss-status strong{font:700 19px 'Pixelify Sans',monospace}.boss-status span{font-size:12px}.boss-status #bossSummon{color:#e5bdf1;align-self:center}.boss-status progress{grid-column:1/-1;width:100%;height:5px}.boss-status progress::-webkit-progress-value{background:#cd8f93}.boss-status progress::-moz-progress-bar{background:#cd8f93}@media(max-width:560px){.boss-status{padding:7px 9px;gap:5px 8px;margin:0 -7px 8px}.boss-status>div{gap:7px}.boss-status strong{font-size:16px}.boss-status span{font-size:10px}}@media(max-height:540px) and (orientation:landscape){.boss-status{padding:4px 8px;margin-bottom:4px}.boss-status strong{font-size:14px}.boss-status progress{height:3px}.boss-status:not([hidden])+.stage{max-width:calc((100dvh - 145px)*1.77)}}

/* Harvesting and player-built defences. */
.resource-bar{display:flex;align-items:center;gap:10px;margin:0 0 10px;padding:6px 8px;background:#ded7bd;border:1px solid #c4b998;min-height:43px}.resource-bar>strong{font:700 24px 'Pixelify Sans',monospace;min-width:102px;white-space:nowrap}.resource-bar>strong>span:first-child{color:#956b43}.resource-bar small{font:14px 'Atkinson Hyperlegible',sans-serif}.resource-hint{font-size:12px;color:#657068;margin-right:auto}.resource-bar button{padding:5px 12px;min-height:32px;font-size:13px;touch-action:none}.resource-bar kbd,.build-choices kbd{font-size:10px;opacity:.65;margin-left:4px}.resource-bar #buildToggle{background:var(--teal);color:#fff3cf}.resource-bar #buildToggle kbd{color:inherit}.resource-bar #chop.held{background:#e5b86c}.build-panel{border:2px solid var(--ink);background:#f4ecd7;padding:7px 9px;margin-bottom:8px}.build-choices{display:flex;gap:7px}.build-choices button{padding:5px 12px;min-height:42px;font-size:12px}.build-choices button[data-build]{flex:1;text-align:left}.build-choices strong{display:block;font:700 19px 'Pixelify Sans',monospace}.build-choices small{font-size:11px;font-weight:400;white-space:nowrap}.build-choices [aria-pressed=true]{background:#387e78;color:#fff0c7;border-color:#253544}.build-panel p{display:flex;justify-content:space-between;gap:12px;margin:5px 0 0;font-size:12px;line-height:1.2}.build-instruction{color:#69776f}.build-panel .invalid{color:#a14331}button:disabled{opacity:.5;cursor:default}#game{--boss-height:0px;--build-height:0px}.game-help{gap:15px}#notice{max-width:95%;white-space:normal;width:max-content;z-index:1}.overlay{z-index:3}
@media(min-width:900px){body.playing .stage{max-width:min(100%,calc((100dvh - 285px - var(--boss-height) - var(--build-height))*1.7778))}}
@media(max-width:560px){.resource-bar{gap:7px;padding:5px 6px;margin:0 -7px 8px}.resource-bar>strong{font-size:22px;margin-right:auto;min-width:85px}.resource-bar button{padding:6px 10px}.resource-hint,.resource-bar kbd,.build-choices kbd,.build-instruction{display:none}.build-panel{padding:6px;margin:0 -7px 8px}.build-choices{gap:4px}.build-choices button{padding:5px;min-height:42px}.build-choices strong{font-size:15px}.build-choices small{font-size:9px}.build-choices #rotateBuild,.build-choices #placeBuild{font-size:10px;padding:5px}.build-panel p{font-size:11px;min-height:14px}.resource-bar small{font-size:12px}}
@media(max-height:540px) and (orientation:landscape){.resource-bar{margin-bottom:5px;min-height:32px;padding:3px 7px}.resource-bar>strong{font-size:21px}.resource-bar button{min-height:27px;padding:2px 10px}.build-panel{padding:4px 7px;margin-bottom:4px}.build-choices button{min-height:34px;padding:3px 8px}.build-choices strong{font-size:16px}.build-choices small{font-size:10px}.build-panel p{font-size:10px;margin-top:3px}body.playing #game .stage{max-width:calc((100dvh - 140px - var(--boss-height) - var(--build-height))*1.7778)}.touch-controls{bottom:8px}}

#game:has(#bossStatus:not([hidden])){--boss-height:55px}#game:has(#buildPanel:not([hidden])){--build-height:91px}
@media(max-height:540px) and (orientation:landscape){
  #game:not([hidden]){display:grid;grid-template-columns:1fr auto;column-gap:10px;align-items:center}
  #game:has(#bossStatus:not([hidden])){--boss-height:41px}#game:has(#buildPanel:not([hidden])){--build-height:74px}
  .hud{grid-column:1;gap:16px;min-width:0}.hud .health-block{width:100px}.hud .weapon-block{min-width:50px}.hud #pause span{display:none}
  .resource-bar{grid-column:2;gap:6px;margin-bottom:0}.resource-hint,.resource-bar kbd{display:none}.resource-bar>strong{min-width:78px}.resource-bar button{padding:4px 8px}
  .build-panel,.boss-status{grid-column:1/-1}
  body.playing #game .stage{grid-column:1/-1;width:100%;max-width:min(calc(100vw - 370px),calc((100dvh - 65px - var(--boss-height) - var(--build-height))*2));margin-top:4px!important}
  .stage>canvas{aspect-ratio:2}.stage-info{left:7px;right:7px;top:7px}.stage-info span{font-size:11px;padding:3px 5px}
  #notice{font-size:13px;top:32px;padding:4px 7px}.dodge-meter{font-size:10px;left:6px;bottom:6px;padding:4px;width:74px}
  #pickupPrompt{bottom:6px;left:auto;right:6px;transform:none;font-size:10px;padding:4px 6px}
  .touch-actions{gap:6px}.touch-actions button{height:44px;min-width:44px;padding:4px 6px;font-size:11px}.touch-actions #touchAttack{width:64px;height:64px;font-size:20px}
}

.guard-count{font-size:12px;color:#386e61;white-space:nowrap;font-weight:700}
@media(max-width:560px) and (orientation:portrait){.resource-bar{gap:5px}.resource-bar>strong{min-width:70px;margin-right:0}.guard-count{font-size:10px;margin-right:auto}.resource-bar button{padding:6px 8px}.build-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.build-choices strong{font-size:16px}.build-choices small{font-size:10px}.build-choices #rotateBuild,.build-choices #placeBuild{font-size:12px}}
@media(max-height:540px) and (orientation:landscape){.guard-count{font-size:10px}.resource-bar{gap:5px}.resource-bar>strong{min-width:70px}}
