@font-face{font-family:GameUI;src:url('assets/fonts/ui.woff2');font-weight:400 600;font-display:block}@font-face{font-family:GameUI;src:url('assets/fonts/ui-bold.woff2');font-weight:700 900;font-display:block}@font-face{font-family:GameNum;src:url('assets/fonts/numbers.ttf');font-weight:200 1000;font-display:block}@font-face{font-family:PlatformNum;src:url('assets/fonts/platform-num.woff2');font-weight:600;font-display:block}@font-face{font-family:RoundCN;src:url('assets/fonts/round-cn.woff2');font-weight:800;font-display:block}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{background:#f5e5c7;font-family:GameUI,"PingFang SC",sans-serif;color:#3e3026;touch-action:none;user-select:none;display:flex;justify-content:center}button{border:0;padding:0;background:none;font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:disabled{cursor:default}button:focus-visible{outline:2px solid #613e28;outline-offset:4px}button:active:not(:disabled){transform:scale(.96)}[hidden]{display:none!important}#surface{position:relative;width:100%;height:100%;max-width:600px;overflow:clip;background:#f5e6cb}#app{position:absolute;width:414px;transform-origin:0 0;isolation:isolate;overflow:clip;background:#f7e9d0}#stage{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;outline:none}#top{position:absolute;inset:0;z-index:12;pointer-events:none;font-family:GameUI}#top>button{position:absolute;top:var(--top,70px);width:44px;height:44px;pointer-events:auto}#back{left:12px}#sound{left:358px}#top button img{width:44px;height:44px;display:block}#progress{position:absolute;left:70px;top:var(--top,70px);width:273px;height:49px;overflow:clip;border-radius:8px;background:rgba(59,10,2,.5);color:#fff;pointer-events:auto}.current{position:absolute;inset:0 auto auto 0;width:49px;height:49px;background:rgba(59,10,2,.4);text-align:center}.current b{display:block;font:600 19px/25px PlatformNum,GameUI;margin-top:2px}.current span{font:500 11px/16px GameUI}.stage-window{position:absolute;left:59px;top:5px;width:214px;height:41px;overflow:clip}#stage-track{display:flex;gap:6px;transition:transform .35s ease}.stage-node{position:relative;flex:0 0 63px;height:41px}.stage-node .reward{display:flex;gap:1px;align-items:center;height:20px;color:#fff575;white-space:nowrap;font:600 14px/19px PlatformNum,GameUI}.stage-node img{width:14px;height:14px;object-fit:contain}.stage-node small{display:block;font:500 11px/16px GameUI;margin-top:3px}.stage-node:after{content:'···';position:absolute;left:52px;top:2px;color:#d4bca0;font-size:12px}.stage-node:last-child:after{content:''}.stage-node.done .reward{color:white}.stage-node.done img{display:none}.stage-node.done .reward:before{content:'✓';font:700 13px GameUI;color:#fff575}#hud{position:absolute;inset:0;z-index:6;pointer-events:none}.outlined{color:#fffaeb;-webkit-text-stroke:4px #49372c;paint-order:stroke fill;filter:drop-shadow(0 1px 0 #fffaeb)}#time{position:absolute;left:79px;top:calc(var(--scene-top) + 54px);font:850 25px/35px GameNum;letter-spacing:-1px;font-variant-numeric:tabular-nums}#price{position:absolute;left:289px;top:calc(var(--scene-top) + 60px);width:107px;color:#332a23}#price>b{font:800 16px/22px GameUI;letter-spacing:.5px}#price>div{display:flex;align-items:baseline;justify-content:flex-end;gap:3px;white-space:nowrap;margin-top:7px}#price span{font:500 12px/20px GameUI;margin-right:auto}#price strong{font:700 25px/26px GameNum;letter-spacing:-.6px}#price small{font:500 17px/23px GameUI}#tilt-label{position:absolute;left:26px;bottom:21px;font:700 17px/25px GameUI;-webkit-text-stroke:3px #49372c}#feedback{position:absolute;z-index:8;pointer-events:none;left:0;top:calc(var(--scene-top) + 132px);width:414px;text-align:center;font:850 26px GameNum,GameUI;color:#fff6c8;-webkit-text-stroke:3px #70431c;paint-order:stroke fill;opacity:0}#reward-fly{position:absolute;inset:0;z-index:32;pointer-events:none}.flying-coin{position:absolute;width:28px;height:28px}#loading,#start-screen,#ended{position:absolute;inset:0;z-index:15;text-align:center;pointer-events:none}#loading{background:#f7e9d0}.loading #progress,.loading #hud{display:none}#brand{position:absolute;top:165px;left:114px;width:186px;height:70px}h1{font:800 42px/1.3 GameUI;margin:0;letter-spacing:1px}#loading h1{position:absolute;top:var(--load-title-top,310px);left:0;width:100%}.load-track{position:absolute;left:96px;bottom:216px;width:222px;height:16px;border-radius:12px;background:#fff;overflow:clip;border:0}#load-fill{width:0;height:100%;background:#1da5ff;border-radius:10px;transition:width .1s}#load-progress{position:absolute;left:0;bottom:183px;width:414px;font:750 18px GameNum}#load-message{position:absolute;left:0;bottom:150px;width:414px;font:600 13px/18px GameUI;margin:0}#retry-load{position:absolute;bottom:90px;left:157px;width:100px;height:40px;background:#fff7e5;border-radius:9px;pointer-events:auto}#start-screen h1{position:absolute;left:0;top:calc(var(--scene-top) + 210px);width:100%}#start-screen p{position:absolute;top:calc(var(--scene-top) + 282px);left:0;width:100%;font:500 14px/20px GameUI;margin:0}#start{position:absolute;top:calc(var(--scene-top) + 336px);left:87px;width:240px;height:59px}.art-button{position:relative;font:800 18px GameUI;pointer-events:auto}#ended{top:auto;bottom:69px;height:105px;z-index:18;background:linear-gradient(transparent,#f7e9d0bb)}#continue{width:230px;height:56px;margin-top:6px}.quiet{display:block;width:200px;height:36px;margin:auto;font-size:14px;pointer-events:auto}#modal{position:absolute;inset:0;z-index:30;display:grid;place-items:center;background:rgba(0,0,0,.8);pointer-events:auto}#dialog{position:relative;flex:none;width:300px;height:360px;border-radius:9px;background:#1da5ff;color:#fff}#dialog-coin{position:absolute;left:193px;top:-33px;width:137px;height:123px;object-fit:contain;z-index:1;pointer-events:none}#dialog-kicker{position:absolute;left:16px;top:12px;margin:0;font:600 16px/27px "PingFang SC",GameUI,sans-serif;opacity:.65}#dialog-title{position:absolute;left:16px;top:45px;margin:0;width:268px;font:600 28px/37px "PingFang SC",GameUI,sans-serif;letter-spacing:0}#dialog-title span{display:block;white-space:nowrap}#prize{position:absolute;left:83px;top:112px;width:133px;height:143px;display:flex;align-items:baseline;gap:0;justify-content:center}#prize strong{font:600 119px/143px PlatformNum,GameNum;letter-spacing:0}#prize span{font:700 24px/32px GameUI}#modal-actions{position:absolute;left:16px;top:296px;width:268px;height:48px;display:flex;gap:8px}#modal-actions button{height:48px;border-radius:9px;font:700 18px/24px GameUI;white-space:nowrap}#primary{flex:1;background:#111a2c;color:#fff}#secondary{display:none;background:#fff;color:#7b4300}#close-modal{position:absolute;left:130px;top:376px;width:40px;height:40px}#close-modal img{width:40px;height:40px}#dialog.fail{background:#fddba5;color:#7b4300}#dialog.fail #dialog-kicker{opacity:1}#dialog.fail #secondary{display:block;flex:none;width:107px}#dialog.fail #primary{background:#911300;width:153px;flex:none}#dialog.fail #prize{color:#911300}#dialog.pause{background:#fddba5;color:#7b4300}#dialog.pause #dialog-title{top:45px}#dialog.pause #dialog-coin,#dialog.pause #prize,#dialog.pause #dialog-kicker{display:none}#dialog.pause #secondary{display:block;flex:1}#dialog.pause #primary{background:#911300}#dialog.pause #modal-actions{top:296px}#dialog.browse #prize span{font-size:20px}#dialog.browse #primary:disabled{opacity:.55}#dialog.browse #secondary{display:none}#dialog.browse #dialog-coin{display:none}#modal:focus{outline:none}.boot-error #hud,.boot-error #progress{display:none}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}@media(min-width:601px){#surface{max-width:480px}}

.art-button:before{content:"";position:absolute;left:var(--art-x);top:var(--art-y);width:var(--art-w);height:var(--art-h);background:url(assets/button.webp) center/100% 100% no-repeat;pointer-events:none;z-index:0}.art-button>span{position:relative;z-index:1}

.loading #top{z-index:18}#loading-bowl{position:absolute;left:27px;top:var(--load-bowl-top,432px);width:364px;height:182px;object-fit:contain;pointer-events:none}

/* 方案③：艺术字作为招牌PNG，等比显示，预留手部出场空间。 */
#game-sign{position:absolute;z-index:7;left:7px;top:var(--sign-top,119px);width:400px;height:auto;pointer-events:none}.loading #game-sign{display:none}#start-screen h1{display:none}#start-screen p{top:calc(var(--scene-top) + 100px)}#start{top:calc(var(--scene-top) + 154px)}

/* 手机浏览器已经提供状态栏：使用实际可视高度，避免重复预留。 */
html,body{height:100%;height:100dvh}#surface{height:100%;height:100dvh}

/* v4: approved crayon assets, editable score and help text. */
#price{left:263px;top:calc(var(--scene-top) + 66px);width:130px}#price>div{justify-content:space-between;margin:0;gap:6px;height:25px}#price span{font-size:12px;line-height:25px}#price strong,#target-score{font:800 22px/25px GameNum;letter-spacing:-.5px}#price>div:first-child strong{font-size:18px;color:#8d6341}#price>div:first-child span{color:#8d6341}#start{top:var(--cover-button-top);left:87px}#retry-round{display:none!important}#ended{height:68px}#game-tools{position:absolute;z-index:19;top:calc(var(--scene-top) + 118px);left:16px;display:flex;gap:8px}.loading #game-tools{display:none}#game-tools button{width:40px;height:40px;border:2px solid #64462e;border-radius:50%;background:#fff3d8;box-shadow:1px 2px 0 #ad885c;color:#64462e;font:900 25px GameNum}#game-tools svg{width:23px;height:23px;vertical-align:middle}#help-modal{position:absolute;inset:0;z-index:29;display:grid;place-items:center;background:#302519a8}#help-card{width:330px;padding:35px 30px 23px;background:#fff2d5;border:3px solid #654831;border-radius:22px 15px 23px 16px;box-shadow:inset 0 0 35px #dca86644,5px 6px 0 #3d281633;text-align:center;position:relative}#help-card:before{content:'';position:absolute;top:-12px;left:131px;width:62px;height:22px;background:#efcc76d9;transform:rotate(-4deg);border:1px solid #c39942}#help-title{font:800 27px GameUI;margin:0 0 20px}#help-copy p{font:500 14px/1.65 GameUI;margin:7px 0}#help-continue{height:44px;padding:0 30px;margin-top:18px;background:#4e8a76;color:#fff7df;border:2px solid #3f614d;border-radius:10px;font-weight:800}#urgent-edge{position:absolute;inset:0;pointer-events:none;z-index:20;opacity:0;box-shadow:inset 0 0 35px 8px #e14439a6}.urgent #urgent-edge{animation:urgent-pulse 1s ease-in-out infinite}.urgent #time{color:#ffbd89}@keyframes urgent-pulse{50%{opacity:.7}0%,100%{opacity:.25}}@media(prefers-reduced-motion:reduce){.urgent #urgent-edge{opacity:.3}}

#help-card{height:300px;padding:40px 28px 25px;border:0;border-radius:0;box-shadow:none;background:url(assets/help-panel-v4.png) center/100% 100% no-repeat}#help-card:before{display:none}#help-title{margin-bottom:14px}#help-continue{margin-top:14px}

#help-continue{width:230px;padding:0;margin:14px auto 0;background:none;border:0;border-radius:0;color:#49372c;font:800 18px GameUI}

/* v4.1: score-side controls, optical icon centering, composed paper dialogs. */
#game-tools{left:auto;right:16px;top:calc(var(--scene-top) + 140px);gap:8px}#game-tools button{display:grid;place-items:center;width:42px;height:42px;line-height:1;padding:0;box-shadow:0 2px 0 #ad885c}#game-tools svg{display:block;width:24px;height:24px;vertical-align:initial}
#help-card{width:330px;height:380px;padding:0;background-image:url(assets/help-panel-v412.webp);background-size:100% 100%;text-align:center}#help-title{position:absolute;left:30px;right:30px;top:58px;margin:0;font:800 26px/34px GameUI;color:#613c28;letter-spacing:1px}#help-close{position:absolute;right:28px;top:33px;width:28px;height:28px;display:grid;place-items:center;color:#88644b;z-index:1}#help-close svg{width:24px;height:24px}#help-copy{position:absolute;left:32px;right:32px;top:105px}#help-continue{position:absolute;left:50px;bottom:40px;margin:0;width:230px}.pause-bowl{position:absolute;width:180px;height:90px;object-fit:contain;left:43px;top:-7px}#help-copy .pause-meta{position:absolute;top:86px;left:0;right:0;font:600 12px/18px GameUI;color:#8a6649;margin:0}.pause-meta span{margin-left:20px}.pause-score{position:absolute;top:116px;left:10px;right:10px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.pause-score>div{display:flex;flex-direction:column;gap:2px}.pause-score>div+div{border-left:1px solid #b9916766}.pause-score span{font:500 11px/17px GameUI;color:#88644b}.pause-score strong{font:800 27px/32px GameNum;color:#653c26}.pause-score>div:first-child strong{color:#478e7d}.rule-row{display:flex;align-items:center;gap:12px;height:55px;text-align:left}.rule-row>img{width:45px;height:40px;object-fit:contain}.rule-row>div{flex:1}.rule-row b{font:800 16px/22px GameUI;color:#613c28}#help-copy .rule-row p{font:500 11px/17px GameUI;color:#8a6649;margin:2px 0 0;white-space:nowrap}
#demo-caption{position:absolute;bottom:113px;left:40px;right:40px;padding:9px 8px;border:1px solid #f4ddb4;border-radius:8px;background:#4a3028ec;color:#fff5d9;font:600 14px/20px GameUI;box-shadow:0 2px 0 #53372e55}#start:not([hidden]){animation:start-breathe 1.4s ease-in-out infinite}@keyframes start-breathe{50%{transform:scale(1.045)}}#countdown{position:absolute;inset:0;z-index:24;display:grid;place-items:center;background:#33211659;color:#fff3c5;font:900 100px/1 GameNum;-webkit-text-stroke:6px #674127;paint-order:stroke fill;text-shadow:0 7px 0 #c58a44;pointer-events:none}
#urgent-edge{box-shadow:inset 0 0 48px 16px #e53325d9;background:linear-gradient(90deg,#e5332533,transparent 15%,transparent 85%,#e5332533)}.urgent #urgent-edge{animation:urgent-strong 1.1s ease-in-out infinite}.urgent #stage,.urgent #game-sign{animation:urgent-shake 1.1s linear infinite}.urgent #time{color:#ff9b6a}@keyframes urgent-strong{0%,100%{opacity:.45}50%{opacity:.9}}@keyframes urgent-shake{0%,32%,100%{translate:0 0}6%{translate:-1.5px 1px}12%{translate:1.5px -1px}18%{translate:-1px -.5px}24%{translate:1px .5px}}@media(prefers-reduced-motion:reduce){.urgent #stage,.urgent #game-sign{translate:0 0}.urgent #urgent-edge{opacity:.55}}

#help-title{top:69px}#help-close{top:60px;right:32px}#help-copy{top:112px}.pause-bowl{height:70px;top:0}#help-copy .pause-meta{top:82px}.pause-score{top:108px}.rule-row{height:53px}

#help-copy .rule-row p{font-size:12px;line-height:18px}.rule-row>.rule-icon{position:relative;flex:none;width:45px;height:40px}.rule-icon img{width:45px;height:40px;object-fit:contain}.rule-icon svg{position:absolute;width:22px;height:22px;left:11.5px;top:9px}

/* Text-only rules, aligned with the action button. */
#help-card.rules-card #help-copy{left:50px;right:50px}

.endless #prize strong{font-size:48px;letter-spacing:-1px}.endless #dialog-coin,.endless .pde-result-coin{display:none!important}

/* Continue the scenery behind the canvas at the mobile viewport edge. */
#surface,#app{background:#e5bb80 url(assets/background.webp) center bottom/100% auto no-repeat}

/* Wood texture also covers pixels outside the canvas during viewport resizing. */
html,body,#surface,#app{background-color:#e5bb80;background-image:url(assets/background.webp);background-position:center bottom;background-size:100% auto;background-repeat:no-repeat}
