/* Continuous map: road and nodes share one normalized 1000 × 1200 coordinate space. */
.game-icon{width:1.6em;height:1.6em;flex-shrink:0;vertical-align:middle}
.equation{min-width:0;white-space:normal;overflow-wrap:anywhere}
#app.stage-mode{max-width:none;width:100%;padding:0!important}
.adventure-map{min-height:100dvh;padding:18px 16px 32px;background:linear-gradient(#63cefb44,#a6e56b33),url('garden.png') center top/cover fixed}
.map-header{max-width:1050px;margin:auto;display:grid;grid-template-columns:70px minmax(0,600px) 140px;justify-content:center;align-items:start;gap:20px}
.map-home{width:62px;height:62px;border:4px solid white;border-radius:20px;background:linear-gradient(#45c9ff,#0585df);box-shadow:0 6px #08619e;color:white;font-size:38px}
.map-wood-sign,.map-title-ribbon,.map-footer{background:repeating-linear-gradient(0deg,transparent 0 24px,#71391822 25px 27px),linear-gradient(#bc8043,#8e4f28);border:5px solid #754019;box-shadow:inset 0 3px #e2a868,0 6px #53321c,0 12px 20px #25412726;color:#fff8e9;text-shadow:0 2px #633218}
.map-wood-sign{padding:12px 24px;border-radius:24px;text-align:center}.map-wood-sign b{display:block;font:600 clamp(30px,4.5vw,56px) 'Fredoka',sans-serif}.map-wood-sign small{font-size:18px;font-weight:700}
.map-star-total{background:#fff8dc;border:4px solid white;border-radius:34px;padding:14px 10px;text-align:center;color:#593d29;font-size:21px;font-weight:700;box-shadow:0 5px #64b1c4}.map-star-total span{color:#f7b51a;text-shadow:0 2px #bc740c;font-size:30px}
.garden-map{max-width:1120px;margin:24px auto 0;position:relative;isolation:isolate}
.map-title-ribbon{width:fit-content;max-width:90%;margin:0 auto;font-size:19px;padding:10px 24px;border-radius:16px;text-align:center}
.path-area{--row-height:190px;position:relative;height:calc(var(--row-height)*6);margin-top:20px}
.road-layer,.stage-nodes{position:absolute;inset:0;width:100%;height:100%}.road-layer{overflow:visible;pointer-events:none;z-index:0}.road-layer path{fill:none;stroke-linecap:round;stroke-linejoin:round}.road-edge{stroke:#c69346;stroke-width:44}.road-fill{stroke:#ffdd91;stroke-width:34}.road-dashes{stroke:#e5b261;stroke-width:5;stroke-dasharray:9 21}
.stage-stop{--node:86px;position:absolute;left:var(--x);top:calc(var(--row-height)*(var(--row) + .5));width:var(--node);height:var(--node);transform:translate(-50%,-50%);z-index:2}
.map-node{width:100%;height:100%;border:6px solid #fffdf5;border-radius:50%;background:linear-gradient(#ffe76d,#ffbb25);box-shadow:inset 0 3px #fff5be,0 7px #b97820,0 12px 15px #314c4430;color:#84420b;position:relative;font:600 38px 'Fredoka',sans-serif}
.map-node.locked{background:linear-gradient(#b4b6ae,#8a8e87);color:white;box-shadow:inset 0 3px #d2d3c8,0 7px #61675f,0 12px 15px #314c4430;opacity:1;text-shadow:0 2px #565952}
.map-node.milestone{background:linear-gradient(#ffe998,#e8b659);color:#724216;box-shadow:inset 0 3px #fff5be,0 7px #ad812f,0 12px 15px #314c4430}
.stage-stop.current .map-node{outline:6px solid #34c7f6;outline-offset:5px;box-shadow:0 0 0 15px #ffffff7a,0 9px #b97820;transform:scale(1.08)}
.node-lock{position:absolute;right:-7px;bottom:-6px;width:29px;height:29px;border:3px solid white;border-radius:50%;background:#5e655f;color:#fff6da;display:grid;place-items:center}.node-lock .game-icon{width:17px;height:17px}
.node-stars{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);display:flex;gap:0;white-space:nowrap;filter:drop-shadow(0 2px #925e2299)}
.star{width:32px;height:32px;overflow:visible}.star path{fill:#fff8d8;stroke:#d49327;stroke-width:2.4;stroke-linejoin:round}.star.earned path{fill:#ffcb30;stroke:#c67a13}.stage-stop.locked .star path{fill:#e8eadfaa;stroke:#8c9e7c}.stage-stop.current .star{width:35px;height:35px}
.map-hedgehog{position:absolute;bottom:calc(100% + 13px);left:50%;width:80px;height:65px;transform:translateX(-50%);pointer-events:none}.map-hedgehog img{height:100%;width:100%;object-fit:contain}.speech{position:absolute;left:65%;top:-10px;padding:5px 9px;background:white;border-radius:16px;color:#694834;font-size:13px;font-weight:800;white-space:nowrap;box-shadow:0 3px #395c3722}
.milestone-gift{position:absolute;right:-9px;top:-15px;width:37px;height:39px;color:#d23736;background:#fff8d9;border:3px solid white;border-radius:11px;display:grid;place-items:center;pointer-events:none;box-shadow:0 3px #b77c35}.milestone-gift>.game-icon{width:29px;height:29px;stroke-width:2.5}.milestone-gift>span{position:absolute;right:-15px;top:-22px;color:white;background:#1ca8f3;border:3px solid white;border-radius:50%;padding:4px;box-shadow:0 3px #337ea1}.milestone-gift>span .game-icon{width:22px;height:22px}
.milestone-caption{position:absolute;top:calc(100% + 46px);left:50%;transform:translateX(-50%);width:142px;text-align:center;background:#fff9df;border:3px solid white;border-radius:14px;padding:4px 5px;font-size:13px;line-height:1.35;color:#71491e;box-shadow:0 3px #66874744}
.map-footer{max-width:740px;margin:14px auto 0;border-radius:20px;padding:12px 16px;text-align:center}.map-footer>span{font-size:18px;font-weight:700}.owned-powers{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:8px 0}.owned-powers>span{display:flex;align-items:center;gap:6px;background:#fff7db;color:#67442b;text-shadow:none;border-radius:12px;padding:7px 10px;font-size:14px}.map-footer small{font-size:13px}.storage-notice{text-align:center;background:#fff8d5;color:#724d19;padding:10px}
@media(max-width:700px){.adventure-map{padding:12px 6px 24px}.map-header{grid-template-columns:46px minmax(0,1fr) 86px;gap:7px}.map-home{width:44px;height:44px;font-size:28px;border-width:3px;border-radius:14px}.map-wood-sign{padding:9px 5px;border-width:3px;border-radius:18px}.map-wood-sign b{font-size:29px}.map-wood-sign small{font-size:12px}.map-star-total{font-size:15px;padding:7px 3px;border-width:3px}.map-star-total span{font-size:21px}.map-title-ribbon{font-size:14px;padding:7px 12px;border-width:3px}.path-area{--row-height:164px;margin-top:24px}.stage-stop{--node:clamp(44px,12vw,70px)}.map-node{border-width:4px;font-size:28px}.node-lock{width:22px;height:22px;border-width:2px;right:-4px;bottom:-4px}.node-lock .game-icon{width:14px;height:14px}.stage-stop.current .map-node{outline-width:4px;outline-offset:3px;box-shadow:0 0 0 10px #fff8,0 5px #b97820}.star,.stage-stop.current .star{width:clamp(17px,4.8vw,25px);height:clamp(17px,4.8vw,25px)}.node-stars{top:calc(100% + 7px)}.milestone-caption{top:calc(100% + 36px);width:clamp(58px,19vw,104px);padding:4px 1px;font-size:11px;border-width:2px;border-radius:9px;overflow-wrap:anywhere}.milestone-gift{width:25px;height:25px;right:-4px;top:-12px;border-width:2px;border-radius:7px}.milestone-gift>.game-icon{width:20px;height:20px}.milestone-gift>span{right:-8px;top:-17px;padding:3px;border-width:2px}.milestone-gift>span .game-icon{width:16px;height:16px}.map-hedgehog{width:58px;height:50px;bottom:calc(100% + 10px)}.speech{font-size:11px;left:60%;top:-8px;padding:4px 6px}.map-footer{margin:0 7px;padding:10px}.map-footer>span{font-size:16px}.owned-powers>span{font-size:12px}.map-footer small{font-size:12px}}
/* Artwork polish shares existing scene assets; reference storyboards are never rendered. */
body{background:linear-gradient(#99dbf922,#ace17622),url('garden.png') center/cover fixed}
.art-home{background:linear-gradient(#65cbef22,#6bc65a11),url('garden.png') center/cover}
.art-home:before{opacity:.18}.home-logo h1{line-height:1.16;letter-spacing:-1px}.home-hedgehog{transform:none;width:clamp(120px,21vw,200px);height:100%;font-size:0}.home-hedgehog img{width:100%;height:100%;object-fit:contain}.home-quill{left:37%}.home-logo{padding-inline:38px}
#app:not(.playing):not(.stage-mode) .modes{display:block}#app:not(.playing):not(.stage-mode) .modes button:nth-child(2){background:linear-gradient(#ff81b7,#e53a86)}#app:not(.playing):not(.stage-mode) .modes button:nth-child(3){background:linear-gradient(#59beff,#1687db)}
.garden-map{background:linear-gradient(#a6e37bd9,#76cc5eb8),url('garden.png') center bottom/cover;border-radius:35px;padding:14px 0 0;box-shadow:0 8px 35px #497e3733}
.countdown-page{position:relative;min-height:100dvh;border:0;border-radius:0;background:linear-gradient(#78d2f933,#aff08022),url('garden.png') center/cover;padding:24px;gap:20px}
.countdown-card{position:relative;padding:20px 28px;background:#fff8dfed;border:5px solid #fffdf1;box-shadow:0 9px #bca578,0 14px 30px #31644230;max-width:530px}.countdown-card strong{font-size:clamp(90px,17vw,155px);line-height:1.2}.countdown-card p{font-size:22px}.countdown-card small{font-size:15px}.count-cancel{position:absolute;top:15px;left:15px;z-index:3;padding:10px 14px;background:#fff7dc;border:3px solid white;box-shadow:0 4px #8dba9b}.count-art{display:flex;align-items:center;justify-content:center;height:110px;gap:25px;margin:10px}.count-art img{height:110px;width:130px;object-fit:contain}.count-balloons{display:flex;align-items:center;gap:4px;height:90px}.count-balloons i{display:block;width:37px;height:50px;border:2px solid #fff9;border-radius:50%;background:radial-gradient(ellipse at 30% 25%,#fff9 0 13%,transparent 17%),#ff84b1;box-shadow:inset -5px -6px #bc2d5630}.count-balloons i:nth-child(2){background-color:#ffd051;align-self:flex-start}.count-balloons i:nth-child(3){background-color:#63cfff}.count-opposite{gap:10px;padding:14px}.count-opposite .countdown-card{padding:8px;max-width:500px}.count-opposite .countdown-card:nth-of-type(2){transform:rotate(180deg);order:-1}.count-opposite .stage-title{padding:5px}.count-opposite .stage-title b{font-size:24px}.count-opposite .stage-title small{font-size:12px}.count-opposite .count-number{font-size:72px}.count-opposite .count-art{height:55px;margin:0}.count-opposite .count-art img{height:55px}.count-opposite .count-balloons{display:none}.count-opposite .countdown-card p{font-size:16px}.count-opposite .countdown-card small{font-size:12px}
.game-nav{max-width:1100px;margin:0 auto 15px}.game-nav>span{color:#fff8df;background:repeating-linear-gradient(0deg,transparent 0 17px,#793d1922 18px 20px),linear-gradient(#bb8247,#955725);border:3px solid #794b25;border-radius:13px;box-shadow:0 4px #754321;padding:8px 17px;font-weight:800;text-shadow:0 2px #6e401b}.game-nav button{background:linear-gradient(#60ccff,#1496e5);color:white;border:3px solid white;box-shadow:0 4px #126ca9}
.board{background:linear-gradient(#d8f6ffe8,#fffbeadd);border:4px solid white;border-radius:25px;box-shadow:0 7px #578f6377,0 14px 30px #39674426}.player-head b{background:#c0e9ff;border:2px solid white;border-radius:12px;padding:5px 10px;color:#256893}.player-1 .player-head b{background:#ffd3e4;color:#9d3f6b}.arena{background:linear-gradient(#a9e5fa11,#cbf3a344),url('garden.png') center 77%/cover;border:2px solid #fff8;height:145px}.question-row{background:linear-gradient(#fff4cc,#f6ddb0);border:3px solid #b98854;box-shadow:inset 0 0 0 3px #fff5d4,0 3px #af7b42;border-radius:15px;padding:10px 13px}.equation{color:#60381f;font-size:clamp(22px,2.9vw,36px)}.timer{background:#fffbe9;border:3px solid white;box-shadow:0 3px #b9ae75;color:#27767b}.timer.frozen{background:#bcf0ff;color:#147ba0;box-shadow:0 0 0 4px #89dbff77}.time-track{background:#f5e6bc;height:8px;border:1px solid #bda26b}.time-track div{background:linear-gradient(#71d8b7,#32ad79)}
.answer{background:#fffdf0;border-color:#d5c896;box-shadow:inset 0 2px 5px #81643712;height:49px}.keypad button{background:linear-gradient(#ffffff66,transparent 50%),var(--key);border:3px solid #fff9;box-shadow:inset 0 2px #fff9,0 4px #9a8c7866,0 6px 7px #5b684622;font-weight:600;color:#604857}.keypad button:active{transform:translateY(3px);box-shadow:inset 0 2px #fff9,0 1px #9a8c7866}.shoot{background:linear-gradient(#73df65,#25ac42);border:3px solid #edffcc;box-shadow:inset 0 2px #fff7,0 5px #238631;color:white;text-shadow:0 2px #267e35;font-size:25px;padding:7px}.player-footer{color:#615d4c}.game-help{background:#fff5cdbb;border-radius:15px;padding:6px 14px;width:fit-content;margin:15px auto;color:#4d6240}
.balloons{right:8px;top:12px;width:69%;gap:6px 5px;justify-content:center;align-content:flex-start}.balloon{display:block;position:relative;flex:0 0 30px;width:30px;height:40px;font-size:0!important;line-height:1;filter:none;border-radius:49% 49% 45% 45%;background:radial-gradient(ellipse at 29% 25%,#ffffffaa 0 13%,transparent 19%),linear-gradient(115deg,hsl(var(--hue,330deg) 86% 77%),hsl(var(--hue,330deg) 75% 59%));border:1.5px solid #fff9;box-shadow:inset -4px -4px 0 #653e6520,0 3px 4px #45734920;margin-bottom:9px}.balloon:after{content:'';position:absolute;bottom:-5px;left:11px;border-left:3px solid transparent;border-right:3px solid transparent;border-bottom:5px solid hsl(var(--hue,330deg) 72% 65%)}.balloon i{position:absolute;left:50%;top:100%;width:1px;height:14px;background:#65827d}.pop-balloon{position:absolute!important;right:20%;top:0;animation:balloonBurst .55s ease-out forwards!important;z-index:4}.spike{width:42px;height:8px;left:90px;bottom:45px;background:linear-gradient(#d6b27a,#744629);clip-path:polygon(0 0,100% 50%,0 100%,12% 50%);font-size:0;transform-origin:center}.hit .spike{animation:quillFlight .4s ease-out}.burst{color:#ffcf37}.miss .question-row{animation:shake .28s}.miss .feedback{color:#ab4141}.spawn .balloon:last-child{animation:balloonSpawn .5s ease-out}.protected .arena,.shield-active .arena{box-shadow:inset 0 0 0 5px #7fcfff88,0 0 15px #9ee7ff}.protected .feedback{color:#1e749a}.power-flash .power-bar{animation:powerGlow .4s}.ai-thinking{padding:28px 0}.ai-thinking img{width:135px;height:135px;object-fit:contain}.ai-thinking p{font-size:18px}.power-bar{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin:15px 0 6px}.power-bar button{flex:1;min-width:65px;max-width:125px;display:flex;flex-direction:column;align-items:center;gap:3px;background:linear-gradient(#ecfcff,#b8e6fc);border:3px solid white;box-shadow:0 4px #66a9c7;padding:7px 4px;color:#246587}.power-bar button .game-icon{width:28px;height:28px}.power-bar button span{font-size:12px;font-weight:700}.power-bar button b{font-size:12px}.power-bar button:disabled{opacity:.6;background:#dce5dc;box-shadow:0 2px #a4b5a7;filter:grayscale(.7)}.power-status{text-align:center;min-height:18px;font-size:12px;color:#257593}
#app.stage-result{max-width:850px;padding:20px}.stage-complete{position:relative;isolation:isolate;text-align:center}.stage-win-art{display:flex;align-items:center;justify-content:center;gap:10px;margin:14px 0}.stage-win-art img{width:145px;height:145px;object-fit:contain}.result-stars{display:flex;align-items:center}.result-stars .star{width:70px;height:70px;animation:starIn .6s backwards}.result-stars .star:nth-child(2){width:85px;height:85px;animation-delay:.15s}.result-stars .star:nth-child(3){animation-delay:.3s}.stage-result-card{background:#fff8e5ed;border:5px solid #b8844d;border-radius:25px;padding:20px 26px;box-shadow:inset 0 0 0 4px #fffdf2,0 7px #825528,0 16px 28px #3b713d33}.stage-result-card h2{font-size:30px;color:#b97317;margin:0}.stage-result-card p{margin:8px 0;font-size:15px}.stage-result-card>.metrics{background:#f1f5e3;border-radius:18px;padding:15px 6px;margin:15px 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.stage-result-card .metrics b{color:#4f8c65}.stage-result-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:12px}.stage-result-actions button{min-height:50px}.stage-result-actions .primary{background:linear-gradient(#65d961,#24af41);color:white;border:3px solid #fff9;box-shadow:0 4px #348845}.secondary{background:linear-gradient(#71d3ff,#21a9e4);color:white;border:3px solid white;box-shadow:0 4px #1881b3;padding:10px 22px;font-weight:700}.reward-reveal{display:flex;gap:15px;align-items:center;justify-content:center;padding:15px;margin:18px 0;background:linear-gradient(#fff1af,#ffdf72);border:3px solid white;border-radius:20px;animation:starIn .6s;box-shadow:0 5px #d3a143}.reward-reveal>.game-icon{width:58px;height:58px;color:#e78a16}.reward-reveal b,.reward-reveal strong,.reward-reveal small{display:block}.reward-reveal strong{font-size:25px;color:#aa6018}.result{position:relative;isolation:isolate;background:#fff9e7ed;border-color:#b88b59;overflow:hidden}.celebration img{height:130px;width:130px;object-fit:contain}.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:-1}.confetti i{position:absolute;left:calc(var(--i)*5%);top:-20px;width:9px;height:16px;background:var(--color);transform:rotate(25deg);animation:confettiFall 3.2s ease-out forwards;animation-delay:calc(var(--i)*.04s)}.stats-tabs{display:flex;gap:8px;justify-content:center;margin:14px 0}.stats-tabs button{padding:8px 12px;background:#d8f1df;min-height:44px}.all-complete{width:100%;font-size:20px!important;font-weight:800;color:#c38220}
@keyframes quillFlight{0%{opacity:1;transform:translate(0,0) rotate(-15deg)}100%{opacity:1;transform:translate(180px,-55px) rotate(-15deg)}}@keyframes balloonBurst{0%,45%{opacity:1;transform:scale(1)}70%{opacity:1;transform:scale(1.35)}100%{opacity:0;transform:scale(.05)}}@keyframes balloonSpawn{from{opacity:0;transform:scale(.1)}70%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes powerGlow{50%{filter:brightness(1.25)}}@keyframes starIn{from{opacity:0;transform:scale(.2) rotate(-20deg)}70%{transform:scale(1.1)}to{opacity:1;transform:scale(1)}}@keyframes confettiFall{to{transform:translateY(700px) rotate(340deg);opacity:0}}
@media(min-width:701px) and (max-height:850px){.board{padding:10px 18px}.arena{height:100px}.hedgehog{width:95px;height:95px}.balloon{flex-basis:26px;width:26px;height:33px;margin-bottom:4px}.balloons{gap:5px}.balloon i{height:10px}.question-row{padding:5px 9px}.timer{height:42px;width:48px}.feedback{min-height:23px;margin:5px 0 3px}.keypad button{height:44px}.answer{height:43px}.shoot{margin-top:11px;padding:4px}.player-footer{margin-top:9px}.power-bar{margin:10px 0 4px}.power-bar button{padding:4px}.power-bar button .game-icon{height:23px}.stage-playing .arena{height:82px}.stage-playing .power-status{min-height:16px}.game-help{margin-top:10px}.ai-thinking{padding:25px 0}.ai-thinking img{width:100px;height:100px}}
@media(max-width:700px){.home-logo{padding-inline:0}.home-logo h1{line-height:1.2}.home-scene{height:120px}.home-hedgehog{width:135px}.game-nav>span{font-size:12px;padding:6px 8px}.board{padding:11px}.question-row{padding:7px 9px}.timer{width:47px;height:44px}.arena{height:117px}.hedgehog{width:97px;height:97px}.balloon{flex-basis:24px;width:24px;height:31px;margin-bottom:7px}.balloon:after{left:8px}.balloon i{height:11px}.balloons{width:67%;gap:5px 4px}.keypad button{height:46px}.answer{height:44px}.shoot{margin-top:12px;padding:4px}.feedback{min-height:23px;margin:6px 0 3px;font-size:13px}.player-footer{margin-top:10px}.boards.side .balloons,.opposite .balloons{width:66%;gap:4px 3px}.boards.side .balloon,.opposite .balloon{flex-basis:17px;width:17px;height:24px;margin-bottom:5px;border-width:1px}.boards.side .balloon:after,.opposite .balloon:after{left:5px}.boards.side .balloon i,.opposite .balloon i{height:8px}.boards.side .question-row{padding:5px 3px}.boards.side .keypad button{height:44px}.boards.side .shoot{font-size:22px}.boards.side .player-head b{display:block;padding:4px}.boards.side .arena{height:94px}.opposite .question-row{padding:3px}.opposite .player-head b{padding:3px 5px}.opposite .arena{height:100%;min-height:87px;max-height:170px}.opposite .hedgehog{width:65px;height:65px}.opposite .keypad button{height:44px}.opposite .player-footer{margin-top:5px}.opposite .balloons{top:9px;right:4px}.opposite .shoot{font-size:20px}.opposite .timer{height:28px;width:30px}.power-bar{gap:4px;margin-top:12px}.power-bar button{min-width:51px;padding:5px 2px;border-width:2px}.power-bar button span{font-size:10px}.power-bar button .game-icon{width:24px;height:24px}.power-bar button b{font-size:10px}.power-status{font-size:11px;min-height:16px}.stage-playing .arena{height:98px}.stage-result-card{padding:17px 12px}.stage-result-card .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.stage-win-art img{width:100px;height:100px}.result-stars .star{width:49px;height:49px}.result-stars .star:nth-child(2){width:59px;height:59px}#app.stage-result{padding:12px}.stage-result-actions{gap:10px}.stage-result-actions .secondary{font-size:14px;padding:8px 12px}.stage-result-card h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}.pop-balloon,.confetti{display:none}}
