@font-face{font-family:Wcm;src:url('../../fonts/onest-600.woff2') format('woff2');font-display:swap}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:#10251f;color:#f6efda;font-family:Wcm,system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #ffdc60;outline-offset:3px}button:disabled{cursor:default;opacity:.5}#game{max-width:1440px;margin:auto;height:100dvh;display:flex;flex-direction:column;background:#193c30;box-shadow:0 0 80px #0005}header{height:72px;flex-shrink:0;background:#f4eedb;color:#20372a;display:flex;align-items:center;padding:12px 24px;gap:10px;border-bottom:4px solid #b7a477;z-index:2}header a,header button{display:grid;place-items:center;background:#e6dfc9;color:inherit;border:1px solid #b4b196;border-radius:10px;text-decoration:none;width:40px;height:40px;font-size:23px;font-weight:bold}header .brand{flex:1;padding-left:8px}.brand small{font:9px monospace;letter-spacing:2px;color:#697365}.brand h1{font-size:22px;line-height:1;margin:5px 0}main{position:relative;flex:1;min-height:0;overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none}.hud{position:absolute;left:24px;top:20px;display:flex;gap:10px;pointer-events:none}.cash,.branch{display:flex;align-items:center;gap:12px;background:#16372bed;border:1px solid #64816a;border-radius:14px;padding:12px 18px;box-shadow:0 4px 0 #0d281e}.cash small,.branch small{display:block;font-size:9px;letter-spacing:1.5px;color:#a9bca5}.cash strong{font-size:30px;font-variant-numeric:tabular-nums}.coin{width:35px;height:35px;background:#f8d36a;color:#624718;border:3px double #9b7133;border-radius:50%;font-weight:bold;text-align:center;line-height:29px}.branch{flex-direction:column;justify-content:center;gap:3px;padding:10px}.branch strong{font-size:22px;color:#f8d36a}.mission{position:absolute;right:24px;top:20px;max-width:340px;background:#f7f0dfee;border:1px solid #dfd5b9;border-radius:12px;color:#234430;padding:13px 16px;display:flex;gap:12px;box-shadow:0 4px 0 #10271b44;pointer-events:none}.mission .step{width:32px;height:32px;border-radius:50%;background:#e3c473;display:grid;place-items:center;font-weight:bold;flex-shrink:0}.mission strong{font-size:14px}.mission p{margin:4px 0 0;font-size:11px;line-height:1.4;color:#61715d}.bottom{position:absolute;bottom:45px;right:24px;display:flex;align-items:end;gap:12px}.inventory{background:#153c2ef0;border:1px solid #719078;border-radius:12px;padding:12px 16px;min-width:180px}.inventory>span{font-size:10px;letter-spacing:2px;color:#bed0af}.inventory>strong{float:right;font-size:13px}.inventory>div{display:flex;align-items:center;gap:7px;margin:12px 0}.inventory i{display:inline-block;width:18px;height:15px;border:2px solid #a48e59;border-radius:3px;margin-right:10px}.wood-icon{background:#b47b44;transform:rotate(-15deg)}.paper-icon{background:#fff5dc}.book-icon{background:#629c83}progress{height:5px;width:100%;display:block;accent-color:#e3bd56}#shop{min-height:70px;border:1px solid #ffe3a3;border-bottom:5px solid #ae813d;border-radius:12px;background:#f3cd6d;color:#42351d;font-size:14px;font-weight:800;padding:10px 18px}#shop>span{display:block;font-size:24px}#joystick{position:absolute;left:35px;bottom:52px;width:100px;height:100px;background:#efedd622;border:2px solid #f9efc955;border-radius:50%;touch-action:none;box-shadow:inset 0 0 20px #102d2433;user-select:none}#joystick div{position:absolute;left:28px;top:28px;width:40px;height:40px;border-radius:50%;background:#efe4bdc9;border:2px solid #fff6d4;pointer-events:none;box-shadow:0 3px 8px #0003}#controls{position:absolute;left:25px;bottom:13px;font:10px monospace;letter-spacing:1px;color:#d3dfc1;pointer-events:none}#save{position:absolute;right:24px;bottom:15px;font-size:10px;color:#adc9b6}footer{height:30px;padding:7px 24px;background:#10291f;display:flex;justify-content:space-between;flex-shrink:0;font:9px monospace;letter-spacing:1px;color:#a5baa3}#gold{color:#efd27d}#toast{position:absolute;top:135px;left:50%;transform:translateX(-50%);background:#153c2f;color:#fff4cd;padding:10px 18px;border:1px solid #d5b861;border-radius:10px;max-width:85%;text-align:center;pointer-events:none;opacity:0;transition:opacity .2s}#toast.show{opacity:1}.veil{position:absolute;inset:0;display:grid;place-items:center;background:#123528b8;backdrop-filter:blur(7px);z-index:5}.veil[hidden]{display:none}.ticket{width:min(390px,88%);padding:28px;text-align:center;background:#f6efdb;border:1px solid #9c8d63;color:#223e30;border-radius:20px;box-shadow:0 12px 0 #0c211b44}.ticket img{width:100px;height:115px;object-fit:contain;display:block;margin:auto auto 14px}.ticket small{font:9px monospace;letter-spacing:2px}.ticket h2{font-size:24px}.ticket p{font-size:14px;line-height:1.5}.ticket button,.primary{background:#f6d474;color:#30402d;border:1px solid #988246;border-bottom-width:4px;border-radius:8px;padding:12px 18px;font-weight:700}dialog{padding:25px;border:2px solid #a5956d;border-radius:18px;background:#f4eedc;color:#233b2d;width:min(680px,94vw);max-height:85dvh;box-shadow:0 20px 100px #0007}dialog::backdrop{background:#0a211dcc;backdrop-filter:blur(5px)}dialog .close{float:right;border:1px solid #c3b894;border-radius:8px;background:#e6dfca;font-size:24px;width:36px;height:36px}dialog h2{margin:8px 45px 12px 0}dialog p{font-size:13px;line-height:1.6;color:#596950}dialog .eyebrow{font:10px monospace;letter-spacing:2px;color:#877949}.shop-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.upgrade{border:1px solid #c9bea0;border-radius:10px;padding:14px;background:#fffcf1;display:flex;flex-direction:column;gap:7px}.upgrade strong{font-size:14px}.upgrade p{margin:0;min-height:38px;font-size:11px}.upgrade small{font-size:10px;color:#8b7950}.upgrade button{margin-top:auto;border:1px solid #969a6d;background:#dbe3bc;padding:9px;border-bottom-width:3px;border-radius:7px;font-size:12px;font-weight:bold}.upgrade.gold button{background:#f4d477;border-color:#a68d49}.lesson{display:flex;gap:16px;align-items:center;margin:20px 0}.lesson img{width:75px;height:75px;object-fit:contain}.lesson p{margin:5px 0}.danger{color:#a6402c!important}.shop-balance{position:sticky;top:-25px;background:#f4eedc;padding:10px 0;z-index:1;border-bottom:1px solid #d5c9aa}
@media(max-width:650px){header{height:62px;padding:8px 10px;gap:6px}.brand h1{font-size:17px}.brand small{font-size:7px;letter-spacing:1px}header button,header a{width:32px;height:34px;font-size:18px}.hud{left:12px;top:12px;gap:7px}.cash{padding:8px 12px;gap:8px}.cash strong{font-size:23px}.cash small{font-size:8px}.coin{width:27px;height:27px;line-height:21px}.branch{padding:6px 9px}.branch strong{font-size:18px}.mission{top:83px;left:12px;right:12px;max-width:none;padding:9px 12px}.mission strong{font-size:12px}.mission p{font-size:10px}.mission .step{width:27px;height:27px;font-size:11px}.bottom{right:12px;bottom:44px;gap:8px;align-items:stretch;flex-direction:column}.inventory{min-width:150px;padding:10px}.inventory>div{margin:8px 0}.inventory i{margin-right:4px;width:15px;height:13px}#shop{min-height:48px;padding:8px;font-size:12px;display:flex;align-items:center;justify-content:center;gap:7px}#shop>span{font-size:18px}#joystick{left:24px;bottom:70px}#controls{font-size:8px;left:15px;bottom:24px}#save{right:12px;font-size:9px}footer{padding:7px 12px;font-size:7px}#toast{top:148px;width:85%;font-size:12px}.shop-grid{gap:8px}.upgrade{padding:11px}.upgrade strong{font-size:12px}.upgrade p{min-height:48px}dialog{padding:18px}.shop-balance{top:-18px}}

.upgrade button:disabled{opacity:1;background:#e8e6d6;color:#68705b;border-color:#c6c7ab}
#construction{position:absolute;left:50%;bottom:45px;transform:translateX(-50%);width:290px;padding:12px 15px;border:1px solid #f5d185;border-radius:12px;background:#1a4539ed;box-shadow:0 6px 20px #17392c44;color:#fff2cd;pointer-events:none}
#construction[hidden]{display:none}#construction strong,#construction span,#construction small{display:block}#construction strong{font-size:14px}#construction span{font-size:11px;line-height:1.4;margin:6px 0}#construction small{font-size:9px;margin-top:7px;color:#d7ddb7}#construction progress{height:6px}
@media(max-width:650px){#construction{bottom:190px;width:260px;padding:10px 12px}}
/* Compact controls leave the centre of the yard visible on phones. */
.hud,.mission,.bottom{filter:drop-shadow(0 4px 7px #18372322)}
#shuttle{width:auto;min-width:70px;flex-shrink:0;font:700 12px system-ui;padding:8px;border:1px solid #aaa88c;background:#f6e6ac;border-radius:10px;white-space:nowrap}
@media(max-width:650px){#shuttle{position:absolute;right:12px;top:204px;z-index:5}}
#save{background:#173d2dcc;border-radius:5px;padding:4px 7px;color:#e4edce}
#joystick{background:#1e453f50;border-color:#f8edbfa8;box-shadow:inset 0 0 0 8px #e7edc71c,0 5px 16px #13271f30}
@media(max-width:650px){
 .hud{top:10px}.cash{padding:7px 11px}.cash strong{font-size:21px}.branch{padding:5px 9px}
 .mission{top:76px;padding:8px 11px;background:#f8f0dfed}.mission p{margin-top:3px}
 .bottom{bottom:31px;right:12px;gap:6px}.inventory{min-width:143px;padding:9px 11px;background:#153c2ee8}
 .inventory>div{margin:6px 0}.inventory>span{font-size:9px}.inventory>strong{font-size:11px}
 #shop{min-height:43px;box-shadow:0 4px 10px #15352d22}#joystick{bottom:48px;width:100px;height:100px}
 #controls{bottom:11px;background:#173d2d99;padding:4px 7px;border-radius:4px}#save{bottom:5px;font-size:8px}
}
@media(max-height:560px) and (orientation:landscape){header{height:48px}.hud{top:8px;left:12px}.cash{padding:6px 10px}.cash strong{font-size:21px}.mission{top:8px;right:12px;max-width:290px;padding:8px}.bottom{bottom:24px;right:12px}.inventory{padding:8px}#joystick{bottom:32px;left:20px;width:90px;height:90px}#joystick div{left:23px;top:23px}footer{height:22px;padding:5px 14px}}
