/* Shared forest visual language: every generated UI surface uses these tokens. */
@font-face{font-family:ForestPlay;src:url('../assets/fonts/ZCOOLKuaiLe-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
:root{--forest-ink:#704423;--forest-muted:#886442;--forest-gold:#ffc957;--forest-cream:#fff3d4;--forest-leaf:#86b547;--forest-title:'ForestPlay','Microsoft YaHei',sans-serif}
body{color:var(--forest-ink);text-rendering:optimizeLegibility}.home-panel h2,.result h2,.home-panel button,.character-card span,.row-copy strong,.level-path>strong,.tool-label,.praise strong{font-family:var(--forest-title);font-weight:400}.home-panel h2{font-size:30px;letter-spacing:2px}.home-panel button.mini-action{font-size:15px}.home-panel button.home-confirm{font-size:21px}.row-copy strong{font-size:19px}.row-copy small{font-size:12px;line-height:1.6;color:var(--forest-muted)}.home-panel p{line-height:1.75}.balance,.count,.goal-inner strong,.level-value,.moves-value,.record-score,.profile-stats b,.level-node,.painted-tool b{font-family:var(--forest-title);font-weight:400;font-variant-numeric:tabular-nums}.home-wallet .balance{font-size:3.3cqw}.home-wallet .heart-timer{font-family:'Microsoft YaHei',sans-serif;font-size:2.2cqw;font-weight:700}.art-icon{width:42px;height:42px;object-fit:contain;vertical-align:middle;pointer-events:none;filter:drop-shadow(0 2px 1px #8b532018)}.row-icon{position:relative;display:grid;place-items:center;min-width:42px}.row-icon>img:not(.art-icon){width:48px;height:48px;object-fit:contain}.wallet-summary{display:flex!important;justify-content:center;align-items:center;gap:5px;font-size:16px!important;font-family:var(--forest-title)}.wallet-summary .art-icon{width:26px;height:26px}.wallet-summary .art-icon:not(:first-child){margin-left:12px}.home-panel button.panel-close{width:46px;height:46px;min-height:46px;border:0;background:transparent;box-shadow:none;padding:0;right:9px;top:12px}.panel-close .art-icon{width:46px;height:46px}.sign-day>b{height:46px;display:grid;place-items:center}.sign-day .art-icon{width:42px;height:42px}.sign-day .painted-tool{width:44px;height:44px}.sign-day .painted-tool b{width:15px;height:15px;font-size:10px;right:3px;bottom:3px}.sign-day.today{box-shadow:inset 0 2px #fffff0,0 3px #9ab84f}.heart-display{display:flex;justify-content:center;gap:6px;letter-spacing:0;padding:10px 0}.heart-display .art-icon{width:42px;height:42px}.unearned{filter:grayscale(1);opacity:.32}.art-stars{display:inline-flex;align-items:center;justify-content:center;gap:3px}.art-stars>.art-icon{width:46px;height:46px;filter:drop-shadow(0 3px 1px #ae772b40)}.stars .art-icon{width:12cqw;height:12cqw}.stars{text-shadow:none;font-size:0}.rank-number{position:absolute;bottom:-3px;right:0;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#825128;border:1px solid #ffe8b5;color:#fff6db;font-family:var(--forest-title);font-size:13px;font-style:normal}.sound-toggle{border:0;background:transparent;box-shadow:none}.sound-toggle .art-icon{width:100%;height:100%}.result{background:radial-gradient(ellipse at 45% 20%,#fffcef,#f6dfb6);border-color:#bc8448;box-shadow:inset 0 0 0 2px #fff1d0,0 5px #82512d,0 15px 35px #1c30185c}.result h2{color:#ffedb4;paint-order:stroke fill;-webkit-text-stroke:3px #8b552b;text-shadow:0 3px #a47336;font-size:8cqw}.result button{font-family:var(--forest-title);font-weight:400;border-radius:18px;background:radial-gradient(ellipse at top,#fff1a6,#ffd362 48%,#f4a72d);border:2px solid #bc8133;color:#704022;box-shadow:inset 0 2px #fff7c9,inset 0 -3px #e48e22,0 3px #9e6b2d}.result .secondary{background:linear-gradient(#d5eab0,#9bc86d);border-color:#719d41;color:#3d6328;box-shadow:inset 0 2px #edfacd,0 3px #648b38}.result-kicker{font-size:clamp(10px,2.5cqw,13px);color:#8b6037}.result p{font-size:clamp(12px,3cqw,16px);line-height:1.65}.result-stats{color:#815b36}.result-stats strong{font-family:var(--forest-title);font-weight:400}.toast,.home-toast{background:linear-gradient(#a16d3d,#84532f);border:2px solid #e1b47a;box-shadow:inset 0 1px #f9d49b55,0 3px #664024;color:#fff4d6;line-height:1.5}.companion>div{background:linear-gradient(110deg,#fffaed,#f5e3c2);border-color:#e6cfa4;box-shadow:inset 0 2px #fffaf1,0 2px #b38a4933}.instruction{color:#7b4f2e}.tool-label{font-size:clamp(11px,3.1cqw,15px);text-shadow:1px 0 #77502a,-1px 0 #77502a,0 1px #77502a,0 -1px #77502a}.praise strong{font-size:6cqw;paint-order:stroke fill;-webkit-text-stroke:2px #9b5f2e;text-shadow:0 3px #905327}.score-ribbon{background:#fff2d4d9;border:1px solid #d6b479;border-radius:12px;padding:3px 10px;color:#85572e;text-shadow:none}.balance{paint-order:stroke fill;-webkit-text-stroke:.4px #304857}.home-panel .character-card{font-size:15px}.character-card span{color:#754823}.level-node{background:radial-gradient(ellipse at 45% 18%,#fff7c9,#ffd360 55%,#eca22d);box-shadow:inset 0 2px #fffce5,0 5px #986933}.profile-stats{border:1px solid #e5c68b;box-shadow:inset 0 2px #fff8df}.profile-stats b{color:#779a39}.panel-footer{font-variant-numeric:tabular-nums}.home-panel button:disabled{box-shadow:inset 0 1px #fff9e3;opacity:.72}.home-panel button:focus-visible{outline:3px solid #609039;outline-offset:3px}@media(max-width:360px){.home-panel h2{font-size:28px}.home-panel button.mini-action{font-size:13px}.row-copy strong{font-size:17px}.heart-display .art-icon{width:36px;height:36px}.row-copy small{font-size:11px}}@media(prefers-reduced-motion:reduce){.art-icon{animation:none}}
/* Monster scene rebuilt on the user's exact 864×1536 reference illustration. */
.reference-game:before{background-image:url('../assets/game-reference.webp')}.reference-game:after{display:none}.reference-game .companion,.reference-game .score-ribbon,.reference-game .hud-art,.reference-game .tools-art,.reference-game .tool-label{display:none}.reference-game .hud{inset:0;height:100%;pointer-events:none}.reference-hud .level-value,.reference-hud .moves-value{font-family:'Comic Sans MS','Arial',sans-serif;font-weight:900;paint-order:stroke fill;-webkit-text-stroke:1cqw #86400f;color:#ffda69;text-shadow:0 -.2cqw #fff4be,0 .55cqw #ac661e;line-height:1;box-shadow:none;background:linear-gradient(105deg,#bb7e3e,#c28a47 55%,#bd813d);border-radius:5px;font-size:10.5cqw}.reference-hud .level-value{left:9%;top:8.1%;width:11.7%;height:4.9%}.reference-hud .moves-value{left:81.2%;top:9.55%;width:12%;height:4.25%;font-size:9.4cqw}.reference-hud .goal-inner{position:absolute;left:34.7%;top:8.6%;width:34.1%;height:6.2%;background:none;padding:0;box-shadow:none;border:0;display:block;overflow:visible}.reference-goal{position:absolute;width:30%;height:100%;top:0}.reference-goal-0{left:0}.reference-goal-1{left:35%}.reference-goal-2{left:70%}.reference-goal img{width:100%;height:85%;opacity:0;object-fit:contain}.reference-goal strong{position:absolute;bottom:2%;right:0;width:39%;aspect-ratio:1;border-radius:50%;background:#8d542b;border:1px solid #fce1b055;display:grid;place-items:center;font-family:'Comic Sans MS','Microsoft YaHei',sans-serif;font-size:3.1cqw;font-weight:900;color:#fff7e8;text-shadow:0 1px #73401c;line-height:1}.reference-goal .goal-done{background:#709842;color:#ffffdd}.reference-hud.low-moves .moves-value{color:#ffbd81}.reference-game .play-area{top:24.55%;left:2.32%;width:95.84%}.reference-game .board{aspect-ratio:828/782;border:2px solid #d3a663;border-radius:3.4%;background:linear-gradient(135deg,#ffefd0,#f0d6a5);box-shadow:inset 0 2px 1px #fff9e5,0 3px 0 #c99750,0 7px 10px #8d764228;overflow:hidden}.reference-game .cells,.reference-game .pieces,.reference-game .particles{inset:1.1%}.reference-game .cells{gap:.8%}.reference-game .cell{border-radius:19%;background:linear-gradient(140deg,#fff9e9 4%,#f9eddb 55%,#f1dfbe);box-shadow:inset 0 2px 1px #fffdf3,inset 0 -2px 3px #d6b98955,0 1px 1px #c9ac7966}.reference-game .cell i{display:none}.reference-game .tile img{width:103%;height:103%;max-width:none;max-height:none;position:relative;z-index:1;filter:drop-shadow(0 3px 1.5px #9b70454a) saturate(1.03)}.reference-game .tile:after{content:'';position:absolute;left:18%;right:18%;bottom:7%;height:12%;border-radius:50%;background:radial-gradient(ellipse,#9d72405c,#b38b4428 55%,transparent 75%);filter:blur(1px);pointer-events:none}.reference-game .tile:before{z-index:2;border-radius:19%}.reference-game .tile.group-ready img{filter:drop-shadow(0 3px 2px #a7773459) saturate(1.03) brightness(1.025)}.reference-game .tile.suggested:before{border-color:#dba94470;background:#fff0ac14;animation:hint 1.7s ease-in-out infinite}.reference-game .tools{inset:0;height:100%;width:100%;pointer-events:none}.reference-game .tools .pause,.reference-game .tools .tool{pointer-events:auto;top:84.1%;height:10.2%;border-radius:22%}.reference-game .tools .pause{left:2.2%;top:85.5%;width:12.9%;height:7.3%;border-radius:50%}.reference-game .tools .tool{width:18.1%}.reference-game .tools .tool-hammer{left:21.4%}.reference-game .tools .tool-bomb{left:41.4%}.reference-game .tools .tool-rainbow{left:61.4%}.reference-game .count{font-family:'Comic Sans MS','Arial',sans-serif;font-weight:900;right:1%;bottom:0;width:35%;font-size:4.7cqw;border:1px solid #efd2a1;background:#8c532b;box-shadow:inset 0 1px #b0784855,0 2px 2px #71452325}.reference-game .tool.selected{outline:2px solid #ffe8a3;outline-offset:2px;box-shadow:0 0 12px #ffc744a8;transform:translateY(-2px)}.reference-game .tool:disabled{filter:none;opacity:.55}.reference-game .toast{top:77.4%;font-size:clamp(12px,3cqw,17px);white-space:normal;text-align:center}.pause-navigation{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:20px;font-size:clamp(12px,3cqw,16px)}.pause-navigation a{color:#725029;text-underline-offset:3px;min-height:28px;display:grid;place-items:center}.pause-navigation .pause-audio{width:auto;font-family:'Microsoft YaHei',sans-serif;font-size:clamp(12px,2.5cqw,15px);background:none;box-shadow:none;border:0;padding:0;color:#725029}.reference-game .result .stars .art-icon{width:12cqw;height:12cqw}@media(prefers-reduced-motion:reduce){.reference-game .tile.suggested:before{animation:none}}
.reference-hud .level-value{background:url('../assets/ui/level-wood.png') center/100% 100% no-repeat;font-size:9.6cqw;font-family:'Arial',sans-serif;font-weight:900;-webkit-text-stroke:.8cqw #8b4818;paint-order:stroke fill;color:#ffe381;text-shadow:0 -.2cqw #fff7c9,0 .35cqw #b26d25}.reference-hud .moves-value{background:url('../assets/ui/moves-wood.png') center/100% 100% no-repeat;font-family:'Arial',sans-serif;font-weight:900;font-size:9cqw;-webkit-text-stroke:.8cqw #8b4818;paint-order:stroke fill;color:#ffe381;text-shadow:0 -.2cqw #fff7c9,0 .35cqw #b26d25}.reference-goal strong{font-family:'Arial',sans-serif;font-weight:900;border:0;box-shadow:none;background:#88522c;font-size:3.15cqw;width:36%;bottom:0;right:3%}.reference-goal-0 strong{transform:translateX(-4px)}.reference-goal-1 strong{transform:translateX(-1px)}.reference-game .count{font-family:'Arial',sans-serif;font-weight:900;font-size:4.7cqw;border:0;box-shadow:none;background:#87502b;right:2.2%;bottom:.3%;width:33.5%}.reference-game .tools .tool:disabled:before{content:'';position:absolute;inset:0;background:#efe2c280;border-radius:22%;pointer-events:none}
.reference-hud .level-value,.reference-hud .moves-value{font-size:0;-webkit-text-stroke:0;text-shadow:none;display:flex;align-items:center;justify-content:center;border-radius:4px;overflow:visible}.reference-hud .level-value{left:9%;top:8.1%;width:11.7%;height:4.9%;background-image:url('../assets/ui/level-wood.png')}.reference-hud .moves-value{left:81.2%;top:9.55%;width:12%;height:4.25%}.gold-number-art{display:flex;height:91%;align-items:center;justify-content:center;gap:1px;filter:drop-shadow(0 1px 0 #85512630)}.gold-number-art img{height:100%;width:auto;object-fit:contain;display:block;min-width:0}.reference-hud .moves-value .gold-number-art{height:98%;max-width:100%}.reference-hud.low-moves .moves-value .gold-number-art{filter:drop-shadow(0 0 2px #ed753b70)}
/* The elf mode reuses every scene measurement and interaction from monster mode. */
.elf-game .goal-inner:before{content:'';position:absolute;left:-6%;right:-9%;top:-4%;bottom:-14%;background:linear-gradient(105deg,#fae8c4,#fae7c2 55%,#f8e3bc);border-radius:10px;mask-image:linear-gradient(to right,transparent,#000 4%,#000 96%,transparent),linear-gradient(to bottom,transparent,#000 6%,#000 94%,transparent);mask-composite:intersect;pointer-events:none}.elf-game .reference-goal img{opacity:1;width:100%;height:92%;position:relative;z-index:1;filter:drop-shadow(0 2px 1px #9f764137)}.elf-game .reference-goal strong{z-index:2}
.game-back{position:absolute;left:2.8%;top:16.6%;z-index:6;display:flex;align-items:center;justify-content:center;gap:3px;width:clamp(84px,21cqw,132px);height:clamp(44px,8cqw,64px);padding:3px 9px 3px 3px;border:2px solid #ae793d;border-radius:30px;background:linear-gradient(#e4b778,#bf874d);box-shadow:inset 0 2px #ffe3ac,0 3px #83542d,0 5px 8px #65502b26;text-decoration:none;color:#fff5d8;font-family:var(--forest-title);font-size:clamp(16px,4.3cqw,24px);line-height:1;text-shadow:0 2px #8a542c;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .12s,box-shadow .12s}.game-back .art-icon{width:clamp(34px,7cqw,50px);height:clamp(34px,7cqw,50px);filter:none;flex-shrink:0}.game-back:hover{background:linear-gradient(#edc38a,#cc985e)}.game-back:active{transform:translateY(2px);box-shadow:inset 0 2px #ffe3ac,0 1px #83542d}.game-back:focus-visible{outline:3px solid #fff1a3;outline-offset:3px}@media(prefers-reduced-motion:reduce){.game-back{transition:none}}
/* Stable character families: pastel recognition cues travel with each piece. */
.reference-game .tile .role-wash{position:absolute;inset:1px;border-radius:18%;background:radial-gradient(ellipse at 50% 20%,#fffff4b0,var(--role-light) 95%);box-shadow:inset 0 1px 1px #fffff1,inset 0 -2px 2px color-mix(in srgb,var(--role-accent) 30%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--role-accent) 48%,#fff4d8);pointer-events:none;z-index:0}.reference-game .tile img{width:99%;height:99%;filter:drop-shadow(0 3px 1.5px #9b704545)}.reference-game .tile:after{z-index:0;background:radial-gradient(ellipse,color-mix(in srgb,var(--role-ink) 25%,transparent),transparent 75%)}.reference-game .tile.group-ready img{filter:drop-shadow(0 3px 1.5px #9b704545) brightness(1.025)}.reference-game .reference-goal strong{background:var(--role-ink);box-shadow:0 0 0 1px var(--role-light)}.reference-game .reference-goal strong.goal-done{background:#709842}.home-panel button.character-card[data-role]{background:radial-gradient(ellipse at top,#fffdf2,var(--role-light));border-color:color-mix(in srgb,var(--role-accent) 65%,#e0c395);box-shadow:inset 0 2px #fffdf2,0 3px color-mix(in srgb,var(--role-accent) 50%,#c8a671)}
