*{box-sizing:border-box}html,body,#app{margin:0;width:100%;height:100%;overflow:hidden}body{font-family:system-ui,-apple-system,sans-serif;background:#f9efd9;color:#72432d;overscroll-behavior:none;touch-action:none}#app{display:flex;flex-direction:column;position:relative;background:radial-gradient(ellipse at 50% 40%,#fffaf0,#faefd9 68%,#f5e6ca);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}header{height:76px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px clamp(12px,4vw,40px);background:linear-gradient(#ffe28a,#f8bc46);box-shadow:0 3px #d99133,0 5px 10px #b2782640}button{font:inherit;cursor:pointer;border:0;touch-action:manipulation}header button,#help{width:48px;height:48px;border-radius:13px;background:linear-gradient(#bd742d,#9d531c);color:#fff;font-weight:900;font-size:30px;box-shadow:inset 0 2px 2px #fff6,0 3px #85451b}.level,.acorn-count{background:#a85c24;color:#fff2cf;border:3px solid #fff0ad;border-radius:24px;padding:8px 16px;font-weight:900;font-size:18px;letter-spacing:.03em;box-shadow:inset 0 2px 3px #7e3d1a66}.acorn-count{background:#fff0bd;color:#94501d;border-color:#e7a441;min-width:67px;text-align:center}main{position:relative;flex:1;min-height:0}canvas{display:block;width:100%;height:100%;touch-action:none}#help{position:absolute;right:clamp(14px,4vw,36px);bottom:24px;border-radius:50%;background:linear-gradient(#ffdf77,#e9a31b);color:#965013;border:3px solid #fff5cf}#hint{position:absolute;bottom:max(22px,4%);left:50%;transform:translate(-50%);white-space:nowrap;padding:11px 20px;border:2px solid #caa071;border-radius:16px;background:#fffaf1e8;color:#956548;font-weight:700;font-size:clamp(14px,2.1vw,18px);pointer-events:none;transition:opacity .4s}#hint.off{opacity:0}#celebrate{position:absolute;top:0;right:0;bottom:0;left:0;background:#9f633d50;display:grid;place-items:center}#celebrate[hidden]{display:none}.card{width:min(82vw,370px);text-align:center;border:5px solid #fff1bb;border-radius:30px;padding:28px;background:linear-gradient(#fff0c8,#ffd58a);box-shadow:0 10px #d39251,0 18px 30px #6e442d66}.stars{font-size:40px;color:#eea20c;text-shadow:0 2px #fff}h1{margin:10px 0;color:#a64a25;font-size:36px;text-shadow:0 2px white}p{font-size:20px;font-weight:700;margin:0 0 22px}#next{background:linear-gradient(#79cf34,#44a91d);border:3px solid #eaffbd;box-shadow:0 4px #318216;color:#fff;border-radius:14px;padding:12px 28px;font-size:20px;font-weight:900}button:focus-visible{outline:3px solid #395e9c;outline-offset:4px}@media(max-width:400px){.level,.acorn-count{font-size:14px;padding:7px 10px}header button{width:42px;height:42px}}@media(max-height:500px){header{height:58px;padding-top:5px;padding-bottom:5px}header button{width:42px;height:42px}#hint,#help{bottom:8px}}header #treasure{width:auto;min-width:76px;height:auto;font-size:18px;background:#fff0bd;color:#94501d;border:3px solid #e7a441;border-radius:24px;box-shadow:inset 0 2px 3px #7e3d1a33;padding:8px 13px}#hint{max-width:70vw;white-space:normal;text-align:center}#surprise{position:absolute;top:14%;left:50%;transform:translate(-50%);width:min(85vw,330px);padding:20px;text-align:center;border:4px solid #fff4c7;border-radius:24px;background:linear-gradient(#fff3ca,#ffd982);box-shadow:0 8px #d9944b,0 12px 28px #85533355;color:#a14e23;pointer-events:none}#surprise[hidden]{display:none}#surprise strong,#surprise small{display:block}#surprise strong{font-size:24px}#surprise small{font-size:16px;font-weight:800}#surprise span{font-size:28px}@media(max-width:400px){header #treasure{min-width:58px;padding:7px;font-size:14px}#hint{font-size:14px;max-width:62vw}}
