@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;700;900&family=Fraunces:opsz,wght@9..144,900&display=swap');
:root{--ink:#251810;--cream:#f7edda;--paper:#d9a85f;--paper2:#bf7c39;--orange:#ef6c32;--green:#4f794d;--blue:#5b8690;--shadow:#160d08;--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#1d120d;color:var(--ink);font-family:'DM Sans',system-ui,sans-serif;overflow-x:hidden}button,input{font:inherit}button{cursor:pointer;color:inherit}.grain{position:fixed;inset:0;z-index:20;pointer-events:none;opacity:.07;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E")}.screen{display:none;min-height:100svh}.screen.active{display:flex}.home{position:relative;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:36px 24px 24px;background:radial-gradient(circle at 50% 35%,#f7d487 0,#e89a4b 31%,#a94d2e 72%,#693124 100%);overflow:hidden}.home:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 80px,rgba(74,34,16,.07) 81px 83px);mix-blend-mode:multiply}.brand,.lede,.home button,.home-badges{position:relative;z-index:2}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.22em}.brand h1{margin:6px 0 12px;font:900 clamp(52px,14vw,95px)/.76 'Fraunces',serif;text-transform:uppercase;letter-spacing:-.055em;color:#fff5df;text-shadow:0 7px 0 rgba(85,35,20,.22)}.brand em{color:#502519;font-style:normal;font-size:.88em}.lede{font:700 18px/1.35 'DM Sans';margin:10px 0 22px;color:#fff4df}.hero-box{position:relative;width:240px;height:180px;margin:-2px auto 8px;filter:drop-shadow(0 18px 15px rgba(65,22,10,.3))}.hero-box:before{content:"";position:absolute;left:28px;right:28px;bottom:8px;height:120px;background:linear-gradient(105deg,#bc7135,#e4a454);border-radius:4px 4px 14px 14px;box-shadow:inset -18px 0 rgba(112,56,26,.15)}.box-flap{position:absolute;bottom:112px;width:105px;height:55px;background:#e5a85b}.box-flap.left{left:18px;clip-path:polygon(10% 0,100% 18%,90% 100%,0 80%)}.box-flap.right{right:18px;clip-path:polygon(0 18%,90% 0,100% 80%,10% 100%)}.tape{position:absolute;left:105px;bottom:8px;width:30px;height:120px;background:rgba(246,216,145,.6)}.sun{position:absolute;width:110px;height:110px;border-radius:50%;background:#ffd77a;left:65px;top:0;box-shadow:0 0 80px #ffe79d}.milky{position:absolute;width:86px;height:70px;border-radius:48% 52% 43% 44%;background:radial-gradient(circle at 68% 24%,#fff9e9 0 34%,#e9d4b1 65%,#bf956c);box-shadow:inset -8px -8px rgba(99,61,35,.13),0 8px 12px rgba(60,28,14,.2)}.hero-box .milky{left:77px;top:50px;transform:rotate(-4deg)}.milky:before,.milky:after{content:"";position:absolute;top:-10px;width:26px;height:28px;border-radius:50%;background:#dab98d;box-shadow:inset 0 0 0 7px #efb8a9}.milky:before{left:8px}.milky:after{right:8px}.milky i{position:absolute;right:16px;top:22px;width:9px;height:11px;border-radius:50%;background:#24140e;box-shadow:-31px 1px #24140e}.milky b{position:absolute;right:-6px;top:38px;width:18px;height:13px;border-radius:50%;background:#e99d86}.milky span{position:absolute;right:6px;top:50px;width:19px;height:4px;border-radius:50%;background:#9b674c;transform:rotate(-5deg)}.primary{border:0;border-radius:7px;padding:17px 22px;background:var(--ink);color:#fff6df;font-weight:900;letter-spacing:.04em;box-shadow:0 6px 0 rgba(42,20,11,.35);min-width:250px}.primary span{float:right}.text-btn{border:0;background:none;text-decoration:underline;font-weight:700;padding:13px}.hidden{display:none!important}.home .text-btn{color:#fff}.home-badges{display:flex;gap:20px;margin-top:23px;font-size:10px;font-weight:900;letter-spacing:.12em;color:#5e2b1c}.game{flex-direction:column;background:#2a1b13;height:100svh;overflow:hidden}.topbar{height:66px;flex:0 0 auto;background:#f7edd9;display:grid;grid-template-columns:42px 1fr auto 42px;align-items:center;gap:8px;padding:8px 12px;border-bottom:3px solid #b27d45}.topbar small{display:block;font-size:8px;font-weight:900;letter-spacing:.16em;color:#93632f}.topbar input{width:min(52vw,360px);border:0;background:transparent;font:900 18px 'Fraunces';padding:2px 0;outline:none}.icon-btn{border:0;background:#ead4ae;border-radius:50%;width:38px;height:38px;font-size:24px;font-weight:900}.score{text-align:right;padding-right:8px}.score span{font-weight:900}.brief{background:#fcce67;display:flex;align-items:center;gap:10px;padding:8px 14px;font-size:11px;border-bottom:2px solid #be7d37}.brief b{text-transform:uppercase}.brief span{flex:1}.brief button{border:0;background:transparent;font-size:20px}.stage-wrap{position:relative;flex:1;min-height:0;background:#1f1511}.stage{display:block;width:100%;height:100%;touch-action:none}.toast{position:absolute;top:12px;left:50%;transform:translate(-50%,-12px);opacity:0;background:#251810;color:#fff5df;border-radius:99px;padding:9px 15px;font-weight:800;font-size:12px;transition:.25s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0)}.editor{flex:0 0 auto;background:#f7edda;padding:7px 10px calc(9px + var(--safe-bottom));display:grid;grid-template-columns:1fr auto;gap:7px;border-top:3px solid #b27d45}.history{grid-column:1/-1;display:flex;gap:6px}.history button{border:1px solid #c9ab7c;background:#ead9b9;border-radius:7px;padding:6px 11px;font-size:10px;font-weight:900}.palette{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.tool{position:relative;min-width:64px;border:2px solid transparent;border-radius:9px;background:#e5cfaa;padding:4px 5px 5px;font-size:9px;font-weight:900}.tool.selected{border-color:#e35f2e;background:#fff4db;transform:translateY(-2px)}.tool .glyph{display:block;font-size:25px;line-height:28px}.tool .count{position:absolute;right:3px;top:3px;border-radius:10px;background:#2b1c13;color:white;padding:1px 5px;font-size:8px}.run-btn{border:0;border-radius:9px;background:#e8612e;color:#fff8e8;display:grid;grid-template-columns:30px auto;grid-template-rows:auto auto;align-items:center;padding:7px 12px;text-align:left;box-shadow:0 4px 0 #a13a1c}.run-btn span{grid-row:1/3;font-size:23px}.run-btn b{font-size:12px}.run-btn small{font-size:8px}.running{background:#f7edda;padding:10px calc(14px + var(--safe-bottom));text-align:center}.secondary{border:2px solid #5f4028;background:#ead4ac;border-radius:8px;padding:10px 22px;font-weight:900}.run-hud{position:absolute;right:12px;top:12px;display:flex;gap:5px}.run-hud button{border:0;border-radius:8px;background:rgba(31,20,14,.86);color:white;padding:10px 13px;font-weight:900}.result{position:relative;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px 22px;background:radial-gradient(circle at 50% 30%,#f8da82,#df8d3f 50%,#9f452c)}.result .close{position:absolute;right:16px;top:16px}.result h2{font:900 clamp(42px,12vw,75px)/.9 'Fraunces';margin:8px 0 18px;color:#fff5dd;text-shadow:0 6px rgba(87,35,20,.2)}.result-milky{position:relative;width:150px;height:115px}.result-milky .milky{left:30px;top:15px;width:100px;height:82px}.burst{position:absolute;font-size:50px;color:#fff1a0;right:0;top:-10px}.stars{font-size:38px;letter-spacing:8px;color:#fff1a0;text-shadow:0 3px #9e4c27}.result p{font-weight:700;color:#fff5e5}.stats{display:flex;width:min(360px,95vw);justify-content:space-around;margin:10px 0 24px;border-block:1px solid rgba(68,29,18,.3);padding:13px}.stats b,.stats small{display:block}.stats b{font:900 22px 'Fraunces'}.stats small{font-size:8px;letter-spacing:.15em;font-weight:900}.result .text-btn{color:#fff}.focus-visible,button:focus-visible,input:focus-visible{outline:4px solid #fff18a;outline-offset:2px}@media(min-width:760px){.game{max-width:1180px;margin:auto;box-shadow:0 0 90px #000}.editor{grid-template-columns:1fr auto;padding:12px 20px}.palette{justify-content:center}.tool{min-width:82px}.home{min-height:100vh}.hero-box{transform:scale(1.12);margin:5px 0 20px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
