:root{--paper:#eee5d1;--paper-light:#f8f2e4;--ink:#39352d;--muted:#8b816e;--faint:#c4b89d;--green:#64754e;--green-dark:#4b5a38;--gold:#dab469;--rust:#aa6246;--line:rgba(81,66,42,.2);--serif:Georgia,'Times New Roman',serif;--sans:'Trebuchet MS',ui-rounded,system-ui,sans-serif}

*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden}
body{background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:14px;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background-image:url('assets/parchment.jpg');background-size:430px 215px;opacity:.2;mix-blend-mode:multiply;z-index:-1}
button,a,input{touch-action:manipulation}
button{font:inherit;color:inherit;cursor:pointer}
button{border:none;background:none}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--green);outline-offset:5px}
button:disabled{opacity:.45}
button img{pointer-events:none}
a{color:inherit}
img{display:block;user-select:none;-webkit-user-drag:none}
button,header,.stage,.resource,.bottom-dock{user-select:none;-webkit-user-select:none}
[hidden]{display:none!important}
.symbol-defs{position:absolute;width:0;height:0;overflow:hidden}
svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;fill:none}
h1,h2,h3,p{margin:0}
button{transition:background .15s,opacity .15s,box-shadow .15s}
button:active:not(.clip-button):not(.golden-clip):not(:disabled){transform:translateY(1px)}
.shell{height:100vh;height:100dvh;width:min(1360px,100%);margin:auto;padding:0 38px;display:flex;flex-direction:column;position:relative}
.shell:before{content:"";position:absolute;top:17px;left:19px;right:19px;bottom:15px;border:1px solid rgba(100,75,40,.1);border-radius:11px 17px 12px 9px;pointer-events:none;z-index:-1}
.topbar{height:96px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand>img{width:24px;height:44px;object-fit:contain;transform:rotate(-9deg)}
.brand>span{font-family:var(--serif);font-size:24px;letter-spacing:2.2px;font-weight:700}
.brand small{display:block;font-family:var(--sans);font-size:10px;letter-spacing:1.1px;font-weight:400;color:var(--muted);margin-top:3px}
.header-actions{display:flex;gap:9px}
.icon-button{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%}
.icon-button:hover{background:rgba(121,97,53,.09)}
.header-actions .icon-button{color:#706953}
.layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);gap:34px}
.shell.has-shop .layout{grid-template-columns:minmax(0,1fr) 350px}
.playfield{display:flex;align-items:center;flex-direction:column;min-height:0;position:relative;padding-top:24px}
.chapter-line{display:flex;gap:7px;align-items:center;color:#918268;font-size:9px;letter-spacing:1.9px;flex-shrink:0;font-weight:700}
.tiny-star{font-size:15px;color:#ba9251;margin-right:4px}
.chapter-dash{width:18px;height:1px;background:#c4b697;margin:0 2px}
.scoreboard{text-align:center;margin-top:23px;flex-shrink:0}
.score-label{color:#8b7e65;font-size:11px;letter-spacing:.3px}
h1{font-family:var(--serif);font-weight:400;font-size:clamp(66px,6.2vw,90px);line-height:1.07;letter-spacing:-3px;font-variant-numeric:tabular-nums;padding:3px 10px;color:#38382e}
.production-label{height:19px;font-size:11px;color:#8b816e;margin-top:7px}
.production-label.active{color:var(--green)}
.production-label.active:before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--green);margin-right:6px;vertical-align:2px;animation:status-pulse 2s infinite}
.goal{display:block;width:224px;max-width:80%;padding:0;margin-top:17px;flex-shrink:0;text-align:left}
.goal-text{display:flex;justify-content:space-between;gap:12px;color:#92866f;font-size:9px}
.goal-track{display:block;height:3px;background:#d9ceb5;margin-top:7px;overflow:hidden;border-radius:6px}
.goal-track>span{display:block;width:0;height:100%;background:var(--green);transition:width .3s}
.stage{position:relative;flex:1;min-height:230px;width:100%;max-width:820px;display:flex;align-items:center;justify-content:center;isolation:isolate}
.sunwash{position:absolute;top:50%;left:50%;width:340px;height:300px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,rgba(238,211,141,.43),rgba(229,206,147,.19) 50%,transparent 71%);z-index:-2}
.orbit{position:absolute;width:270px;height:265px;border:1px solid rgba(146,113,59,.13);border-radius:47% 53% 49% 51%;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-19deg);pointer-events:none}
.orbit-two{width:300px;height:220px;transform:translate(-50%,-50%) rotate(26deg);border-style:dashed;opacity:.5}
.doodle{position:absolute;color:#ad925f;font-family:var(--serif);pointer-events:none;font-size:23px;opacity:.8}
.doodle-one{top:25%;left:calc(50% - 133px);animation:twinkle 6s infinite}
.doodle-two{top:65%;left:calc(50% + 115px);font-size:30px;animation:twinkle 6s 2s infinite}
.doodle-three{top:23%;left:calc(50% + 120px);font-size:20px;transform:rotate(15deg);opacity:.4}
.clip-button{position:relative;width:210px;max-height:100%;height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;touch-action:none;cursor:pointer;z-index:3;padding:0;outline-offset:3px!important;border-radius:45%}
.clip-button>img{position:relative;width:auto;height:210px;max-height:75%;object-fit:contain;transform:rotate(8deg);will-change:transform;filter:drop-shadow(1px 4px 0 rgba(67,52,32,.07));animation:idle-bob 5s ease-in-out infinite}
.clip-button:hover>img{filter:drop-shadow(2px 7px 0 rgba(67,52,32,.1))}
.clip-button.pressing>img{animation:none;transform:rotate(4deg) scale(.94)}
.clip-button.popped>img{animation:clip-bounce .24s cubic-bezier(.2,.8,.2,1)}
.clip-shadow{position:absolute;width:85px;height:13px;bottom:35px;background:#695030;opacity:.13;border-radius:50%;filter:blur(3px)}
.tap-label{font-family:var(--serif);font-size:20px;color:#4b4436;font-style:italic;margin-top:16px;transition:color .2s}
.clip-button:hover .tap-label{color:var(--green)}
.combo{position:absolute;top:calc(50% + 126px);left:50%;transform:translateX(-50%);white-space:nowrap;display:flex;align-items:center;gap:8px;font-size:10px;opacity:0;transition:opacity .2s;color:var(--green)}
.combo.visible{opacity:1}
.combo>b{font-size:12px}
.combo-dots{display:flex;gap:3px}
.combo-dots i{width:4px;height:8px;display:block;border-radius:3px;background:#cfc5ac;transform:rotate(12deg)}
.combo-dots i.active{background:var(--green)}
.combo.hot{color:#ae8040}
.combo.hot .combo-dots i.active{background:#bd9245}
.tap-footer{display:flex;flex-direction:column;align-items:center;gap:8px;flex-shrink:0;padding:6px 0 21px}
.click-strength{display:flex;align-items:center;justify-content:center;gap:5px;font-size:11px;font-weight:700;color:#746a55}
.click-strength img{height:15px;width:10px;object-fit:contain}
.tap-hint{font-size:10px;color:#a0947e;letter-spacing:.1px}
.resources{width:100%;display:flex;gap:0;max-width:700px;flex-shrink:0;border-top:1px solid var(--line);padding:21px 0 10px;margin-top:0}
.resource{flex:1;min-width:0;padding:0 13px;position:relative;display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap;border-right:1px solid var(--line)}
.resource:last-child{border:none}
.resource>img{width:42px;height:39px;object-fit:contain}
.resource>span:not(.resource-detail){display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.resource small{font-size:9px;letter-spacing:.2px;color:#93876f}
.resource strong{font-size:18px;font-family:var(--serif);font-weight:400;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap}
.resource-detail{width:100%;font-size:8px;color:#a19780;margin-top:2px;text-align:center;white-space:nowrap}
.resource:hover{background:rgba(156,132,78,.05);border-radius:7px}
.wire-resource>img{width:38px}
.mini-plus{display:inline-flex;width:11px;height:11px;border:1px solid #a99770;border-radius:50%;align-items:center;justify-content:center;margin-left:3px;font-size:10px;color:#87713c}
.wire-resource.low strong,.wire-resource.low .resource-detail{color:var(--rust)}
.wire-warning{background:#f3dbc1;border:1px dashed #b78660;color:#8a5636;font-size:11px;padding:8px 14px;border-radius:6px;position:absolute;bottom:98px;z-index:10}
.workshop-scene{position:absolute;width:210px;bottom:7px;left:-3px;pointer-events:none;animation:appear .6s both;z-index:1}
.workshop-art{width:100%;height:auto}
.workshop-label{display:flex;justify-content:center;align-items:center;gap:5px;font-size:8px;letter-spacing:.2px;color:#938365;margin-top:4px}
.workshop-label i{width:4px;height:4px;border-radius:50%;background:#7d9562}
.smoke-puff{position:absolute;top:2%;left:36%;width:36px;height:auto;opacity:0;animation:smoke 5s ease-out infinite}
.companion{position:absolute;bottom:12px;right:15px;width:130px;z-index:4;animation:appear .6s both}
.companion button{width:100%;padding:0;display:flex;align-items:center;flex-direction:column}
.companion img{max-height:100px;max-width:120px;object-fit:contain;animation:pip-bob 4s ease-in-out infinite}
.companion button:hover img{filter:brightness(1.04)}
.pip-name{font-size:8px;letter-spacing:2px;margin-top:6px;color:#887b65;display:flex;align-items:center;gap:6px}
.pip-name i{font-style:normal;letter-spacing:0;background:#d4ccb6;color:#615b4c;border-radius:50%;height:14px;width:14px;display:inline-flex;align-items:center;justify-content:center;font-size:8px}
.pip-speech{position:absolute;bottom:calc(100% + 6px);right:0;min-width:106px;max-width:155px;width:max-content;font-family:var(--serif);font-style:italic;font-size:12px;line-height:1.3;background:#fbf4e0;padding:10px 12px;border:1px solid #a59877;border-radius:10px 12px 8px 9px;box-shadow:1px 2px 0 #b9ab8b24;transform:rotate(2deg);transition:opacity .4s}
.pip-speech:after{content:"";position:absolute;right:37px;bottom:-5px;width:8px;height:8px;border-right:1px solid #a59877;border-bottom:1px solid #a59877;background:#fbf4e0;transform:rotate(45deg)}
.golden-clip{position:absolute;top:2%;right:10%;width:76px;z-index:12;animation:gold-wiggle 1.6s ease-in-out infinite;padding:0}
.golden-clip img{width:100%;height:87px;object-fit:contain;filter:drop-shadow(0 0 15px #efc66677)}
.golden-clip>span:not(.gold-timer){font-size:8px;color:#98733a;white-space:nowrap;display:block}
.gold-timer{display:block;height:2px;background:#cba454;margin:6px auto 0;width:70%}
.drawer{margin:28px 0 12px;padding:26px 24px 16px;background:rgba(250,245,230,.67);border:1px solid rgba(151,128,85,.35);border-radius:8px 13px 9px 6px;box-shadow:3px 4px 0 rgba(168,149,112,.1);display:flex;flex-direction:column;min-height:0;position:relative;animation:appear .4s ease-out;align-self:stretch}
.drawer:before,.drawer:after{content:"";position:absolute;width:3px;height:3px;border:1px solid #b4a17d;border-radius:50%;top:9px;left:9px}
.drawer:after{left:auto;right:9px;bottom:9px;top:auto}
.drawer-heading{display:flex;justify-content:space-between;align-items:center}
.eyebrow{font-size:8px;font-weight:700;letter-spacing:1.7px;color:#a18c66}
.drawer-heading h2{font-family:var(--serif);font-size:26px;font-weight:400;margin-top:7px;letter-spacing:-.5px}
.panel-tabs{display:flex;gap:17px;border-bottom:1px solid var(--line);margin:22px 0 10px;flex-shrink:0}
.panel-tabs button{padding:0 0 11px;color:#9a8d73;font-size:11px;position:relative}
.panel-tabs button.selected{color:#514c3b;font-weight:700}
.panel-tabs button.selected:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#6f7b55}
.new-dot{display:inline-block;width:4px;height:4px;background:#b79746;border-radius:50%;vertical-align:3px;margin-left:3px}
.panel-content{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:#cabea1 transparent}
.upgrade{display:grid;grid-template-columns:49px minmax(0,1fr) auto;gap:9px;align-items:center;padding:17px 0;border-bottom:1px solid var(--line)}
.upgrade img{width:47px;height:52px;object-fit:contain}
.upgrade h3{font-family:var(--serif);font-size:15px;font-weight:400;line-height:1.2}
.upgrade h3 span{font-family:var(--sans);font-size:8px;color:#ad9c7c;margin-left:5px}
.upgrade p{font-size:9px;color:#a09278;line-height:1.55;margin-top:5px}
.buy-button{font-size:10px;white-space:nowrap;padding:8px 8px;border:1px solid #9ba582;background:#e3e8cf;border-radius:5px 7px 5px 4px;color:#556044;box-shadow:0 2px 0 #bdc6a7;min-width:56px;line-height:1.2}
.buy-button:not(:disabled):hover{background:#d4dfb9}
.buy-button:not(:disabled):active{box-shadow:0 0 0 #bdc6a7;transform:translateY(2px)!important}
.buy-button:disabled{opacity:.7;background:#e9e2d1;border-color:#d5c9ae;color:#b3a68c;box-shadow:0 2px 0 #dad1bd}
.upgrade.next-upgrade{opacity:.6;grid-template-columns:28px 1fr;gap:12px;padding:20px 0}
.upgrade.next-upgrade svg{width:20px;color:#9b8b6e}
.drawer-note{font-family:var(--serif);font-style:italic;font-size:11px;text-align:center;color:#aa9a7d;flex-shrink:0;padding-top:18px}
.footnote{height:50px;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;font-size:8px;color:#a39780;letter-spacing:.15px}
.footnote>span{display:flex;align-items:center;gap:5px}
.footnote>span>i{display:inline-block;width:4px;height:4px;border-radius:50%;background:#87956a;opacity:.75}
.footnote .desktop-key{font-size:7px;letter-spacing:1px}
.mobile-only,.drawer-handle,.bottom-dock{display:none}
.scrim{position:fixed;inset:0;z-index:35;background:rgba(54,46,29,.32);backdrop-filter:blur(2px)}
.demo-banner{background:#776d56;color:#fff6df;font-size:10px;padding:8px;flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:20px;letter-spacing:.2px;border-radius:0 0 8px 8px}
.demo-banner span{font-size:17px;line-height:.7}
.toast{position:fixed;left:50%;top:100px;transform:translateX(-50%);max-width:min(420px,calc(100% - 28px));width:max-content;padding:16px 22px 16px 15px;background:#f8efda;border:1px solid #a79b7a;border-radius:8px 13px 8px 10px;z-index:75;box-shadow:3px 4px 0 rgba(83,67,40,.13);display:flex;gap:12px;align-items:center;animation:toast-in .35s cubic-bezier(.2,1,.3,1)}
.toast-symbol{color:#b0883b;flex-shrink:0}
.toast-symbol svg{width:28px;height:28px;fill:#d9ba7544}
.toast strong{font-family:var(--serif);font-weight:400;font-size:17px;display:block}
.toast p{font-size:10px;color:#938264;margin-top:5px;line-height:1.5}
.modal{max-width:min(570px,calc(100% - 26px));width:550px;max-height:calc(100dvh - 50px);padding:22px 28px 30px;color:var(--ink);background:#f4ecd8;border:1px solid #a08e69;border-radius:13px 10px 15px 9px;box-shadow:5px 6px 0 #2b261422;overflow-y:auto;scrollbar-width:thin}
.modal::backdrop{background:#342c1b70;backdrop-filter:blur(3px)}
.modal-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
.modal-heading .icon-button{width:32px;height:32px}
.modal h2{font-family:var(--serif);font-size:31px;font-weight:400;margin:0 0 13px;letter-spacing:-.6px}
.modal p{font-size:12px;line-height:1.7;color:#8b7a5f}
.modal .intro{margin-bottom:20px}
.settings-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);padding:16px 0}
.settings-row strong{font-size:12px;font-weight:400}
.settings-row small{font-size:10px;color:#95866b;display:block;margin-top:5px;line-height:1.5}
.toggle{width:39px;height:22px;padding:3px;border-radius:30px;border:1px solid #c5b99b;background:#d5cbb7;flex-shrink:0;display:flex;align-items:center}
.toggle:after{content:"";width:14px;height:14px;border-radius:50%;background:#f7f0dd;box-shadow:0 1px 2px #0002;transition:transform .2s}
.toggle[aria-checked=true]{background:#7c8961;border-color:#6f7f50}
.toggle[aria-checked=true]:after{transform:translateX(16px)}
.text-action{font-size:11px;color:#716747;text-decoration:underline;text-underline-offset:3px;padding:12px 0}
.button-row{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;background:var(--green);color:#fff8e8;border:1px solid var(--green-dark);border-radius:7px 10px 6px 8px;box-shadow:0 3px 0 #404e30;padding:12px 22px;font-size:12px;min-height:44px}
.primary-button:hover{background:#71815a}
.primary-button svg{width:16px}
.danger{color:#a16244}
.demo-list{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.demo-item{display:flex;align-items:center;gap:16px;text-align:left;padding:9px;border:1px solid var(--line);border-radius:7px;min-height:70px}
.demo-item:hover{background:#e9dfc7}
.demo-item img{width:65px;height:65px;object-fit:contain}
.demo-item h3{font-family:var(--serif);font-size:16px;font-weight:400}
.demo-item p{font-size:10px;margin-top:3px}
.demo-item svg{margin-left:auto;width:16px}
.journey-item{padding:14px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px}
.journey-number{font-family:var(--serif);font-size:18px;min-width:62px;color:#aa9671}
.journey-item.done .journey-number{color:var(--green)}
.journey-item h3{font-size:12px;font-weight:400}
.journey-item p{font-size:10px}
.journey-item>svg{margin-left:auto;width:16px;color:var(--green);flex-shrink:0}
.journey-item.locked{opacity:.45}
.market-summary{display:flex;justify-content:center;align-items:center;gap:14px;margin:15px 0 12px}
.market-summary img{width:62px;height:64px;object-fit:contain}
.price-control{display:flex;align-items:center;justify-content:space-between;padding:18px 5px}
.price-number{text-align:center}
.price-number strong{font-family:var(--serif);font-size:34px;font-weight:400;font-variant-numeric:tabular-nums}
.price-number small{display:block;font-size:9px;color:#a18e6f;margin-top:4px}
.stepper{border:1px solid #b3a07c;background:#efe4c9;border-radius:5px;width:36px;height:37px;font-size:22px;box-shadow:0 2px 0 #d3c4a5}
.data-line{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-top:1px solid var(--line);font-size:10px;color:#9b8969}
.data-line strong{font-weight:400;color:#5b5942;font-variant-numeric:tabular-nums}
.advice{font-family:var(--serif);font-size:13px;font-style:italic;line-height:1.6;color:#9b8664;padding:15px 3px;text-align:center}
.market-caption{font-size:10px;color:#a08c6b;line-height:1.6;margin-top:12px}
.ai-portrait{height:130px;display:flex;align-items:center;justify-content:center;margin:10px 0}
.ai-portrait img{max-height:128px;max-width:170px;object-fit:contain;animation:pip-bob 4s ease-in-out infinite}
.ai-name{text-align:center;font-family:var(--serif);font-size:23px;font-weight:400}
.ai-tagline{text-align:center;font-family:var(--serif);font-size:12px;font-style:italic;color:#9a8769;margin:8px 0 18px;line-height:1.5}
.ai-levels{display:flex;align-items:center;justify-content:center;gap:8px;margin:13px 0}
.ai-levels i{width:7px;height:7px;border:1px solid #b3a383;border-radius:50%;position:relative}
.ai-levels i.active{background:#7c8d60;border-color:#748454}
.ai-levels i:not(:last-child):after{content:"";position:absolute;width:8px;height:1px;background:#cabea5;top:2px;left:6px}
.ai-next{padding:16px 0;border-top:1px solid var(--line);margin-top:14px}
.ai-next h3{font-family:var(--serif);font-size:16px;font-weight:400;margin-bottom:5px}
.ai-next p{font-size:10px;color:#9b8c70;line-height:1.7;margin-bottom:13px}
.ai-next .buy-button{display:block;width:100%;min-height:40px;font-size:12px}
.ai-next small{display:block;color:#a3947a;font-size:9px;margin-top:8px;text-align:center}
.setting-section{margin-top:14px}
.chapter-postcard{width:100%;height:138px;object-fit:cover;border-radius:8px;object-position:center 48%;margin:5px 0 20px;filter:saturate(.7)}
.end-illustration{height:150px;width:100%;object-fit:contain;margin:0 0 15px}
.small-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:17px 0 23px}
.small-stat{border:1px solid var(--line);padding:13px;border-radius:8px}
.small-stat strong{font-family:var(--serif);font-size:24px;font-weight:400;display:block}
.small-stat span{font-size:9px;color:#9a8a6b}
#fx{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:60}
.float-label{position:fixed;pointer-events:none;z-index:61;color:#526241;font-family:var(--serif);font-weight:700;will-change:transform,opacity;font-size:21px;animation:float-up .9s ease-out forwards}
.float-label.coin-label{color:#a68037;font-size:15px}
.hold-glow .sunwash{background:radial-gradient(ellipse,rgba(229,184,83,.5),rgba(229,206,147,.2) 50%,transparent 71%)}
body.reduced-motion *,body.reduced-motion *:before,body.reduced-motion *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.install-note{padding:12px 0;color:#988669;font-size:10px;line-height:1.7}
.save-warning{color:#ac6748!important}

@keyframes idle-bob{0%,100%{transform:translateY(0) rotate(8deg)}
50%{transform:translateY(-7px) rotate(10deg)}
}
@keyframes pip-bob{0%,100%{transform:translateY(0) rotate(-2deg)}
50%{transform:translateY(-4px) rotate(1deg)}
}
@keyframes clip-bounce{0%{transform:scale(.88) rotate(2deg)}
48%{transform:scale(1.06) rotate(12deg)}
100%{transform:scale(1) rotate(8deg)}
}
@keyframes status-pulse{50%{opacity:.35}
}
@keyframes twinkle{0%,100%{opacity:.3;scale:.8}
50%{opacity:.85;scale:1.1}
}
@keyframes smoke{0%{opacity:0;transform:translateY(0) scale(.6)}
20%{opacity:.35}
100%{opacity:0;transform:translate(-15px,-40px) scale(1.4)}
}
@keyframes appear{from{opacity:0;transform:translateY(9px)}
to{opacity:1;transform:translateY(0)}
}
@keyframes toast-in{from{opacity:0;translate:0 -14px}
to{opacity:1;translate:0 0}
}
@keyframes gold-wiggle{0%,100%{transform:rotate(-8deg) translateY(0)}
50%{transform:rotate(7deg) translateY(-8px)}
}
@keyframes float-up{0%{transform:translate(-50%,-20%);opacity:1}
80%{opacity:1}
100%{transform:translate(-50%,-95px);opacity:0}
}

@media(min-width:900px) and (max-height:780px){.topbar{height:76px}
.playfield{padding-top:17px}
.scoreboard{margin-top:15px}
h1{font-size:64px}
.goal{margin-top:12px}
.stage{min-height:195px}
.clip-button{height:220px}
.clip-button>img{height:169px}
.orbit{width:235px;height:220px}
.orbit-two{width:260px;height:200px}
.sunwash{height:240px}
.tap-label{font-size:18px;margin-top:10px}
.clip-shadow{bottom:29px}
.combo{top:calc(50% + 105px)}
.tap-footer{padding-bottom:15px;gap:5px}
.resources{padding-top:15px}
.workshop-scene{width:175px}
.companion{right:2px;width:115px}
.companion img{max-height:83px}
.drawer{margin-top:20px;padding:20px}
.drawer-heading h2{font-size:24px}
.panel-tabs{margin-top:17px}
.upgrade{padding:14px 0}
.footnote{height:38px}
}

@media(max-width:1100px) and (min-width:900px){.shell{padding:0 25px}
.shell.has-shop .layout{grid-template-columns:minmax(0,1fr) 310px;gap:22px}
.drawer{padding:20px 18px}
.workshop-scene{width:145px}
.companion{width:105px;right:0}
.companion img{max-height:82px}
.resource{padding:0 5px;gap:5px}
.resource>img{width:33px}
.resource strong{font-size:16px}
.orbit{width:220px}
.orbit-two{width:230px}
.pip-speech{font-size:10px;min-width:84px;max-width:114px}
}

@media(max-width:899px),(max-height:480px) and (orientation:landscape){.shell{padding:0 19px;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.shell:before{display:none}
.topbar{height:71px}
.brand>span{font-size:21px;letter-spacing:1.6px}
.brand small{font-size:8px;letter-spacing:.8px;margin-top:3px}
.brand>img{width:21px;height:38px}
.header-actions{gap:1px}
.icon-button{width:36px;height:40px}
.header-actions svg{width:19px;height:19px}
.layout,.shell.has-shop .layout{display:flex;min-height:0;gap:0}
.playfield{padding-top:19px;flex:1;width:100%}
.chapter-line{font-size:8px;letter-spacing:1.4px;gap:5px}
.tiny-star{font-size:13px;margin-right:3px}
.chapter-dash{width:12px}
.scoreboard{margin-top:18px}
.score-label{font-size:10px}
h1{font-size:73px;line-height:1.05;letter-spacing:-2.5px}
.production-label{font-size:10px;margin-top:5px;height:15px}
.goal{margin-top:15px;width:195px}
.goal-text{font-size:8px}
.goal-track{margin-top:6px;height:3px}
.stage{min-height:170px;max-width:600px}
.sunwash{width:300px;height:280px}
.clip-button{height:240px;width:180px}
.clip-button>img{height:176px}
.tap-label{font-size:20px;margin-top:13px}
.clip-shadow{bottom:29px;width:71px;height:9px}
.orbit{width:228px;height:223px}
.orbit-two{width:256px;height:190px}
.doodle-one{left:calc(50% - 111px);font-size:20px}
.doodle-two{left:calc(50% + 99px);font-size:25px}
.doodle-three{left:calc(50% + 103px);font-size:17px}
.combo{top:calc(50% + 110px);font-size:9px;gap:6px}
.combo>b{font-size:10px}
.combo-dots i{height:7px;width:3px}
.tap-footer{padding:5px 0 19px;gap:7px}
.click-strength{font-size:10px}
.tap-hint{font-size:9px}
.resources{padding:15px 0 7px;gap:0}
.resource{padding:0 5px;gap:6px}
.resource>img{width:29px;height:31px}
.resource strong{font-size:17px}
.resource small{font-size:8px}
.resource-detail{font-size:7px;letter-spacing:-.1px;margin-top:1px}
.wire-resource>img{width:27px}
.workshop-scene{width:132px;left:-11px;bottom:1px}
.workshop-label{font-size:6px;margin-top:0}
.companion{width:91px;right:-9px;bottom:3px}
.companion img{max-width:88px;max-height:71px}
.pip-name{font-size:6px;letter-spacing:1.3px;margin-top:3px;gap:4px}
.pip-name i{font-size:6px;width:12px;height:12px}
.pip-speech{font-size:10px;max-width:111px;min-width:86px;padding:8px;bottom:calc(100% + 3px);right:3px}
.pip-speech:after{right:28px}
.smoke-puff{width:25px}
.bottom-dock{display:flex;gap:8px;padding:14px 0 4px;align-items:stretch;flex-shrink:0;min-height:65px}
.dock-main{background:var(--green);border:1px solid #4c5c3c;box-shadow:0 3px 0 #425033;border-radius:8px 11px 7px 9px;min-height:45px;display:flex;align-items:center;justify-content:center;gap:9px;color:#fff7e1;flex:1;font-size:10px;padding:8px}
.dock-main svg{width:17px;height:17px}
.dock-main b{font-size:8px;font-weight:400;background:#ffffff26;border-radius:50%;width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center}
.dock-secondary{display:flex;flex-direction:column;align-items:center;justify-content:center;width:53px;gap:3px;color:#827558;font-size:8px;border:1px solid #b3a17d77;border-radius:7px 9px 7px 6px;background:#ede2c9}
.dock-secondary svg{width:18px;height:18px}
.footnote{height:27px;font-size:7px;justify-content:center;gap:25px}
.desktop-key{display:none!important}
.drawer{display:none;position:fixed;bottom:0;left:0;right:0;top:auto;max-height:81dvh;height:auto;min-height:400px;margin:0;padding:13px 25px calc(18px + env(safe-area-inset-bottom));z-index:40;border-radius:20px 20px 0 0;background:#f5eddc;box-shadow:0 -5px 30px #31230915;overflow:hidden}
.drawer.open{display:flex;animation:drawer-up .3s cubic-bezier(.2,.7,.3,1)}
.drawer:before,.drawer:after{display:none}
.drawer-handle{display:block;width:30px;height:3px;background:#cabea2;border-radius:3px;margin:0 auto 17px;flex-shrink:0}
.mobile-only{display:inline-flex}
.drawer-heading h2{font-size:27px}
.eyebrow{font-size:8px}
.panel-tabs{margin:20px 0 3px;gap:27px}
.panel-tabs button{font-size:12px;padding-bottom:12px;min-height:30px}
.panel-content{max-height:58dvh;flex:1}
.upgrade{padding:16px 0;grid-template-columns:53px minmax(0,1fr) auto;gap:12px}
.upgrade h3{font-size:17px}
.upgrade p{font-size:10px}
.upgrade img{width:50px;height:50px}
.buy-button{padding:10px 12px;font-size:11px;min-height:38px;min-width:69px}
.drawer-note{padding-top:14px;font-size:11px}
.toast{top:82px;padding:13px 15px;gap:10px}
.toast strong{font-size:16px}
.toast p{font-size:10px}
.toast-symbol svg{width:24px;height:24px}
.golden-clip{right:1%;width:64px;top:0}
.golden-clip img{height:72px}
.golden-clip>span:not(.gold-timer){font-size:7px}
.wire-warning{bottom:84px;font-size:10px;max-width:90%;padding:8px 13px}
.modal{padding:18px 22px 25px;max-height:calc(100dvh - 36px)}
.modal h2{font-size:29px}
.modal p{font-size:11px}
.price-control{padding:15px}
.data-line{font-size:11px}
.ai-portrait{height:106px}
.ai-portrait img{max-height:103px}
.ai-tagline{margin-bottom:13px}
.ai-next{margin-top:12px}
.ai-next h3{font-size:17px}
.ai-next p{font-size:11px}
.ai-next .buy-button{min-height:44px}
.demo-banner{font-size:9px;padding:7px}
.resources.two .resource{flex:0 1 50%}
.resource-detail{min-height:9px}
}

@media(max-width:899px) and (max-height:740px){.topbar{height:60px}
.playfield{padding-top:12px}
.chapter-line{font-size:7px}
.scoreboard{margin-top:11px}
h1{font-size:57px}
.score-label{font-size:9px}
.production-label{font-size:9px;margin-top:3px}
.goal{margin-top:10px}
.stage{min-height:157px}
.clip-button{height:200px}
.clip-button>img{height:146px}
.tap-label{font-size:18px;margin-top:10px}
.clip-shadow{bottom:22px}
.orbit{width:195px;height:180px}
.orbit-two{width:220px;height:160px}
.sunwash{width:250px;height:220px}
.combo{top:calc(50% + 90px);font-size:8px}
.doodle-one{left:calc(50% - 96px)}
.doodle-two{left:calc(50% + 87px)}
.doodle-three{left:calc(50% + 90px)}
.tap-footer{padding:5px 0 12px;gap:4px}
.tap-hint{font-size:8px}
.resources{padding-top:12px;padding-bottom:5px}
.resource strong{font-size:15px}
.resource>img{width:25px;height:27px}
.resource-detail{font-size:6.5px}
.bottom-dock{padding-top:9px;min-height:57px}
.dock-main{min-height:43px}
.footnote{height:23px;font-size:6px}
.workshop-scene{width:110px}
.companion{width:74px;right:-6px}
.companion img{max-width:70px;max-height:57px}
.pip-speech{font-size:9px;padding:6px;min-width:75px;max-width:92px}
.pip-name{font-size:5px}
.wire-warning{bottom:72px}
.demo-banner{padding:6px;font-size:8px}
}

@media(max-width:899px) and (max-height:610px){.topbar{height:51px}
.brand>span{font-size:19px}
.brand small{display:none}
.playfield{padding-top:8px}
.scoreboard{margin-top:6px}
h1{font-size:44px}
.chapter-line{font-size:6px;letter-spacing:1px}
.goal{margin-top:7px;width:175px}
.stage{min-height:125px}
.clip-button{height:156px;width:140px}
.clip-button>img{height:114px}
.clip-shadow{bottom:17px}
.tap-label{font-size:15px;margin-top:7px}
.orbit{width:163px;height:147px}
.orbit-two{width:179px;height:135px}
.sunwash{width:210px;height:180px}
.doodle{font-size:17px}
.doodle-one{left:calc(50% - 79px)}
.doodle-two{left:calc(50% + 69px)}
.doodle-three{left:calc(50% + 70px)}
.combo{top:calc(50% + 73px);font-size:7px;gap:4px}
.tap-footer{padding-bottom:7px;gap:3px}
.click-strength{font-size:9px}
.tap-hint{font-size:7px}
.resources{padding-top:9px}
.resource strong{font-size:14px}
.resource small{font-size:7px}
.resource>img{width:22px;height:24px}
.resource-detail{display:none}
.workshop-scene{width:91px;left:-9px;bottom:0}
.workshop-label{display:none}
.companion{width:65px;bottom:0}
.companion img{max-height:47px;max-width:65px}
.pip-speech{font-size:8px;min-width:65px;max-width:82px;padding:5px;right:0}
.golden-clip{width:48px}
.golden-clip img{height:54px}
.bottom-dock{padding-top:8px;min-height:52px}
.dock-main{min-height:39px;font-size:9px;gap:5px}
.dock-main svg{width:15px}
.dock-secondary{width:44px;font-size:7px}
.dock-secondary svg{height:16px}
.footnote{height:19px}
.drawer{min-height:330px;max-height:88dvh}
.drawer-handle{margin-bottom:9px}
.drawer-heading h2{font-size:24px}
.panel-tabs{margin-top:14px}
.upgrade{padding:12px 0}
.wire-warning{bottom:56px;font-size:8px;padding:6px 10px}
}

@media(max-width:360px){.shell{padding-left:13px;padding-right:13px}
.brand>span{font-size:18px}
.header-actions .icon-button{width:31px}
.chapter-line{letter-spacing:1px;gap:4px}
.resource{gap:4px;padding:0 4px}
.resource strong{font-size:14px}
.resource small{font-size:7px}
.dock-main{font-size:9px}
.drawer{padding-left:20px;padding-right:20px}
.workshop-scene{width:90px;left:-6px}
.companion{right:-4px}
.pip-speech{max-width:85px;min-width:70px}
.upgrade{grid-template-columns:43px 1fr auto;gap:7px}
.upgrade img{width:42px}
.upgrade h3{font-size:16px}
.buy-button{min-width:62px;padding:9px}
.modal{padding:16px 18px 22px}
}

@media(max-height:480px) and (orientation:landscape){.shell{padding:0 25px}
.topbar{height:48px}
.layout{overflow:hidden}
.playfield{padding-top:8px;display:grid;grid-template-columns:1fr 1.2fr;grid-template-rows:18px 76px 28px minmax(0,1fr);column-gap:16px;align-items:center;justify-items:center}
.chapter-line{grid-column:1;grid-row:1;font-size:6px;letter-spacing:1px}
.scoreboard{grid-column:1;grid-row:2;margin:0}
h1{font-size:47px}
.goal{grid-column:1;grid-row:3;margin:0}
.stage{grid-column:2;grid-row:1/5;height:100%;min-height:0}
.tap-footer{display:none}
.resources{grid-column:1;grid-row:4;padding:8px 0;align-self:center}
.resource-detail{display:none}
.resource>img{display:none}
.resource small{font-size:7px}
.resource strong{font-size:15px}
.clip-button{height:175px}
.clip-button>img{height:128px}
.tap-label{font-size:16px}
.combo{top:calc(50% + 85px)}
.orbit{width:176px;height:170px}
.orbit-two{width:189px;height:140px}
.workshop-scene{width:87px;left:-5px;bottom:0}
.companion{width:56px;right:-7px;bottom:0}
.companion img{max-height:47px;max-width:55px}
.pip-speech{display:none}
.bottom-dock{padding:6px 0 0;min-height:45px;justify-content:center}
.dock-main{max-width:240px;min-height:35px}
.dock-secondary{width:64px;min-height:35px;flex-direction:row;gap:5px}
.footnote{height:20px}
.drawer{left:auto;right:0;width:360px;top:0;max-height:100dvh;border-radius:15px 0 0 15px;min-height:0}
.panel-content{max-height:none}
.drawer-handle{display:none}
.drawer-heading h2{font-size:23px}
.drawer-heading .eyebrow{font-size:7px}
.panel-tabs{margin-top:13px}
.drawer-note{display:none}
.upgrade{padding:10px 0}
.toast{top:51px}
.wire-warning{bottom:0;font-size:8px;left:0}
.demo-banner{height:19px;padding:3px}
}

@keyframes drawer-up{from{transform:translateY(100%)}
to{transform:translateY(0)}
}

@media(prefers-reduced-motion:reduce){body:not(.allow-motion) *,body:not(.allow-motion) *:before,body:not(.allow-motion) *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* Compact desktop windows retain the same scene without clipping the resource row. */
@media(min-width:900px) and (min-height:481px) and (max-height:680px){
.topbar{height:58px}
.brand>span{font-size:21px}
.brand small{font-size:8px}
.playfield{padding-top:11px}
.chapter-line{font-size:7px;letter-spacing:1.4px}
.scoreboard{margin-top:9px}
.score-label{font-size:9px}
h1{font-size:48px;line-height:1.03}
.production-label{height:14px;font-size:9px;margin-top:3px}
.goal{margin-top:10px;width:198px}
.goal-text{font-size:8px}
.goal-track{margin-top:5px}
.stage{min-height:145px}
.clip-button{height:175px;width:165px}
.clip-button>img{height:125px}
.tap-label{font-size:17px;margin-top:9px}
.clip-shadow{bottom:20px}
.orbit{width:192px;height:172px}
.orbit-two{width:210px;height:150px}
.sunwash{height:220px;width:240px}
.combo{top:calc(50% + 84px);font-size:8px}
.doodle-one{left:calc(50% - 95px)}
.doodle-two{left:calc(50% + 86px)}
.doodle-three{left:calc(50% + 90px)}
.tap-footer{padding:5px 0 12px;gap:4px}
.click-strength{font-size:9px}
.tap-hint{font-size:8px}
.resources{padding:11px 0 8px}
.resource>img{width:30px;height:28px}
.resource strong{font-size:16px}
.resource small{font-size:8px}
.resource-detail{font-size:7px}
.workshop-scene{width:132px;bottom:0}
.workshop-label{font-size:7px}
.companion{width:96px;bottom:0}
.companion img{max-height:63px;max-width:92px}
.pip-speech{font-size:10px;max-width:120px;min-width:90px;padding:7px}
.pip-name{font-size:7px;margin-top:3px}
.drawer{margin:14px 0 8px;padding:18px}
.drawer-heading h2{font-size:23px}
.panel-tabs{margin-top:15px}
.upgrade{padding:11px 0}
.upgrade h3{font-size:14px}
.upgrade p{font-size:8px}
.upgrade img{height:42px;width:41px}
.upgrade{grid-template-columns:42px minmax(0,1fr) auto}
.footnote{height:26px}
.drawer-note{font-size:10px;padding-top:12px}
.wire-warning{bottom:78px;font-size:9px;padding:7px 12px}

}
