
:root{color-scheme:dark;font-family:Trebuchet MS,system-ui,sans-serif;color:#fff4d6;background:#0b201e}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at top,#28564a,#0b201e 70%)}button,a{touch-action:manipulation}button{font:inherit;min-height:44px;border:1px solid #698c70;border-radius:12px;color:#fff3d6;background:#224b40;padding:9px 14px;cursor:pointer;font-weight:700}button:hover{background:#346552}button:focus-visible,a:focus-visible{outline:3px solid #ffc965;outline-offset:3px}button:disabled{opacity:.5;cursor:default}button.primary{background:#ffc15a;color:#352714;border-color:#ffd98e;box-shadow:0 4px 22px #ffad4b22}button.danger{background:#713d34}main{position:relative;max-width:1200px;margin:auto;min-height:100dvh;padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column}header{display:flex;align-items:center;gap:10px;height:82px;flex-shrink:0}header a{display:flex;min-height:44px;align-items:center;color:#c9ddbd;text-decoration:none;padding:8px}.wordmark{flex:1;font-family:Georgia,serif;font-size:23px;letter-spacing:2px}.wordmark small{display:block;font:9px system-ui;letter-spacing:3px;color:#bbccaa;padding-top:4px}.hud{display:flex;gap:12px;align-items:center;padding:10px 16px;background:#173a31;border:1px solid #527057;border-radius:14px;font-weight:bold;min-height:48px}.hud span:first-child{flex:1;color:#f6d48b}.world{position:relative;flex:1;min-height:240px;height:calc(100dvh - 300px);max-height:620px;overflow:hidden;border-radius:20px;margin-top:12px;border:1px solid #638465;box-shadow:0 22px 55px #0005}canvas{width:100%;height:100%;display:block;background:#143e35}.caption{position:absolute;bottom:10px;left:12px;right:12px;text-align:center;padding:8px;border-radius:10px;background:#092820e8;font-size:12px;color:#e0e6c2;pointer-events:none}.controls{padding:12px 0}.types{display:flex;align-items:center;gap:8px;margin-bottom:9px}.types button[aria-pressed=true]{border-color:#ffd37f;background:#4e5c36}.types span{margin-left:auto;font-size:12px;color:#c7d5ad}.pads{display:grid;grid-template-columns:repeat(6,1fr);gap:7px}.pads button{font-size:12px;min-height:52px;padding:6px 4px}.pads button small{display:block;color:#c4d3b4;font-size:10px;margin-top:3px}.overlay{position:fixed;inset:0;display:grid;place-items:center;background:#071b18ad;backdrop-filter:blur(7px);z-index:3;padding:18px}.overlay[hidden]{display:none}.dialog{background:linear-gradient(140deg,#244c3d,#102d27);border:1px solid #a9ad76;border-radius:26px;width:min(520px,100%);max-height:calc(100dvh - 36px);padding:30px;box-shadow:0 30px 100px #0008;display:flex;flex-direction:column;overflow:hidden}.eyebrow{font-size:10px;letter-spacing:3px;color:#f2ca7e}h1{font-family:Georgia,serif;font-size:44px;font-weight:400;margin:16px 0;color:#ffdda3}#dialog-copy{overflow:auto;line-height:1.65;font-size:15px;color:#d6e2c7}#dialog-copy p{margin:0 0 14px}#dialog-copy ul{padding-left:20px}.dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.dialog-actions button{flex:1;white-space:nowrap}#notice{position:fixed;bottom:15px;left:50%;transform:translateX(-50%);background:#e4c67a;color:#20372d;padding:9px 18px;border-radius:12px;pointer-events:none;z-index:4;max-width:90%;text-align:center}#notice:empty{display:none}@media(max-width:600px){header{height:66px;gap:5px}.wordmark{font-size:16px;letter-spacing:1px}.wordmark small{font-size:7px;letter-spacing:1px}header button{font-size:11px;padding:7px}.hud{font-size:11px;gap:9px;padding:10px}.world{min-height:220px;height:calc(100dvh - 325px);margin-top:8px}.pads{grid-template-columns:repeat(3,1fr);gap:6px}.pads button{min-height:46px}.types{gap:6px}.types button{font-size:11px;padding:7px}.types span{display:none}.dialog{padding:22px}h1{font-size:36px}.caption{font-size:10px;bottom:7px}.controls{padding:8px 0}}@media(max-height:500px) and (min-width:620px){main{padding-right:240px}header{height:58px}.wordmark{font-size:17px}.hud{min-height:40px;padding:7px}.world{height:calc(100dvh - 120px);min-height:170px;margin-top:8px}.controls{position:absolute;right:12px;top:70px;width:210px}.types{flex-wrap:wrap}.types span{display:none}.pads{grid-template-columns:repeat(2,1fr)}.dialog{padding:18px}.dialog h1{font-size:28px;margin:9px 0}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}
@media(max-width:360px){header a{font-size:12px;padding:5px;min-width:44px}.wordmark{font-size:13px;letter-spacing:0;min-width:0}.wordmark small{display:none}header button{padding:6px;font-size:10px;min-width:44px}}
/* Bound the forest to the viewport; canvas bitmap dimensions never size flex tracks. */
main{height:100dvh;min-height:0;overflow:hidden}.world{flex:1 1 0;height:auto;min-height:0;max-height:none}canvas{position:absolute;inset:0;width:100%;height:100%}.hud,.controls{flex-shrink:0}
@media(max-width:600px){.world{height:auto;min-height:0}}
@media(max-height:500px) and (min-width:620px){.world{height:auto;min-height:0}.controls{position:absolute}}
.dialog-portal{display:flex;align-items:center;justify-content:center;min-height:44px;flex-shrink:0;margin-top:9px;color:#d2dfbd;font-size:12px;text-decoration:none;border-radius:10px}.dialog-portal:hover{background:#ffffff0a}.dialog-actions,.eyebrow,.dialog h1{flex-shrink:0}
@media(max-height:500px) and (min-width:620px){.dialog-portal{margin-top:3px}.dialog-actions{margin-top:10px}}
