@import url('./local-fonts.css');
:root{font-family:Kidmons,'Arial Rounded MT Bold',Arial,sans-serif;color:#245282;background:#c9f1ff;font-synthesis:none;--accent:#1aa6dd;--scene:#e1f9b3}
*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;color:inherit;font-weight:800;border:0;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.45;cursor:default}button:focus-visible{outline:4px solid #e746ac;outline-offset:3px}[hidden]{display:none!important}.sr-only{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;padding:0!important;border:0!important}
#app{height:100dvh;min-height:320px;overflow:hidden;background:linear-gradient(135deg,#d7f7ff,var(--scene))}.stage{position:relative;height:100%;width:100%;overflow:hidden}.scene-wrap{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 85%,#d8f6a4,#baf0df 36%,#b5e8ff 73%,#8cdaff);overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.home-art{display:none}.loading{position:absolute;inset:0;display:grid;place-content:center;background:var(--scene);z-index:5}.symbol{width:38px;height:38px;display:block;flex-shrink:0;pointer-events:none}
.floating-tools{position:absolute;top:14px;right:14px;z-index:6;display:flex;gap:9px}.tool{width:49px;height:49px;display:grid;place-items:center;padding:9px;background:#ffffffee;color:#2773b5;border:3px solid #fff;border-radius:50%;box-shadow:0 4px 0 #409dd075;touch-action:manipulation}.tool .symbol{width:29px;height:29px}.tool:hover{background:#e3f7ff}.tool:active{transform:translateY(3px);box-shadow:0 1px 0 #409dd075}.tool.run,.tool.next{background:#65c925;color:#fff;box-shadow:0 4px 0 #359826}.tool[aria-pressed=true]{background:#ffdf69;color:#945c1b}
.hud{position:absolute;left:20px;top:22px;z-index:3;pointer-events:none}.progress{display:flex;gap:6px;align-items:center;height:16px;margin-bottom:19px}.progress i{display:block;width:16px;height:16px;background:#fff9;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 0 #69aad055}.progress i.done{background:#ffc62e;border-color:#fff}.progress i.done::after{content:'★';font-size:13px;line-height:11px;color:#b5750f;display:block;text-align:center}
#goal{display:flex;align-items:center;gap:9px;background:#fffffff0;border:4px solid #fff;border-radius:24px;box-shadow:0 4px 0 #80bdd34d;padding:8px 15px;min-height:60px;max-width:300px}#goal b{font-size:31px;line-height:1.15;white-space:nowrap}#goal>span:not(.fraction-picture):not(.dot-goal){font-size:28px}.dot-goal{display:grid;grid-template-columns:repeat(4,9px);gap:4px}.dot-goal i{width:9px;height:9px;background:#ffaf1c;border-radius:3px}.fraction-picture{display:flex;gap:3px;height:29px;width:100px}.fraction-picture i{flex:1;background:#e4d9c5;border:2px solid #c5b492;border-radius:3px}.fraction-picture i.filled{background:#59ce61;border-color:#3baf45}
.bottom{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);z-index:4;pointer-events:none;max-width:calc(100% - 20px)}.controls{display:flex;justify-content:center;gap:9px;pointer-events:auto}.controls:empty{display:none}.queue{display:flex;justify-content:center;gap:4px;margin-bottom:10px;max-width:100%;flex-wrap:wrap;pointer-events:auto}.queue span{display:grid;place-content:center;width:29px;height:29px;background:#fff;border:2px solid #eb60b6;color:#8f3291;border-radius:8px;font-size:21px;line-height:1}
#gesture-hint{position:absolute;left:50%;bottom:27px;transform:translateX(-50%);display:flex;align-items:center;gap:13px;background:#fffffff0;border:4px solid #fff;border-radius:50px;padding:9px 20px;box-shadow:0 4px 0 #64a4c349;pointer-events:none;z-index:3;color:#287caf}#gesture-hint .symbol:first-child{animation:slide-hand 1.6s ease-in-out infinite}.playing:has(.controls:not(:empty)) #gesture-hint{bottom:90px}@keyframes slide-hand{50%{transform:translateX(10px) rotate(-12deg)}}
#celebration{display:none;position:absolute;left:50%;top:24%;transform:translate(-50%,-50%);font-size:75px;color:#ffd129;text-shadow:0 5px #db9209,0 -3px white;white-space:nowrap;pointer-events:none;z-index:4}.playing[data-feedback=good] #celebration{display:block;animation:stars-pop .6s ease-out}.playing[data-feedback=retry] canvas{animation:try-again .35s ease-in-out}@keyframes stars-pop{from{scale:.1;opacity:0}70%{scale:1.12}to{scale:1;opacity:1}}@keyframes try-again{25%{translate:-5px}75%{translate:5px}}
.home .stage{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(360px,1fr)}.home .scene-wrap{position:relative;grid-column:1;grid-row:1;border:5px solid #fff;border-left:0;border-top:0;border-radius:0 0 45px 0}.home .home-art{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.home canvas{visibility:hidden}.intro{grid-column:2;grid-row:1;align-self:center;padding:55px 38px 30px;max-width:600px;width:100%}.intro h1{margin:0}.game-logo{display:block;max-width:100%;width:440px;height:165px;object-fit:contain;margin:auto}.mode-list{display:grid;gap:13px;margin:24px 0}.mode{display:flex;align-items:center;gap:15px;min-height:66px;background:#fff;border:3px solid #fff;border-radius:21px;padding:10px 15px;box-shadow:0 4px 0 #aacdde;font-size:18px;line-height:1.2;text-align:left}.mode>.symbol{width:37px;height:37px;color:var(--accent)}.mode.selected{border-color:var(--accent);box-shadow:0 4px 0 color-mix(in srgb,var(--accent) 70%,#14568c)}.best{margin-left:auto;color:#e6a711;font-size:14px}.primary{display:inline-grid;place-items:center;background:linear-gradient(#86dc30,#53bb1c);color:#fff;border:4px solid #fff;border-radius:25px;box-shadow:0 5px 0 #348e22;padding:13px 22px;min-width:77px;min-height:65px}.primary .symbol{width:38px;height:38px}.play-button{display:grid;margin:25px auto 0;width:115px;height:77px;border-radius:40px}.play-button .symbol{width:46px;height:46px;fill:currentColor}.secondary{display:inline-grid;place-items:center;background:#e3f6ff;border:3px solid #fff;border-radius:24px;box-shadow:0 4px 0 #96c8e2;padding:14px 24px}
.overlay{position:absolute;inset:0;z-index:8;display:grid;place-items:center;padding:20px;background:#26759d75;backdrop-filter:blur(7px)}.modal{width:min(480px,100%);max-height:100%;overflow:auto;padding:28px;text-align:center;border:6px solid #fff;background:linear-gradient(#e8faff,#fff4cf);border-radius:35px;box-shadow:0 10px 0 #216d9a35}.modal h2{font-size:25px;margin:0 0 20px;display:flex;gap:10px;justify-content:center;align-items:center}.modal p{font-size:17px;line-height:1.5;color:#47719c}.modal small{display:block;margin-bottom:20px;color:#587797}.help-demo{display:flex;gap:17px;justify-content:center;align-items:center;margin:24px 0}.help-demo .symbol{width:65px;height:65px}.help-demo .symbol:first-child{animation:slide-hand 1.6s ease-in-out infinite}.material-guide{display:flex;justify-content:center;gap:12px;margin:24px 0}.material-guide>div{display:grid;justify-items:center;gap:6px;font-size:14px}.stars{font-size:62px;letter-spacing:5px;color:#ffca25;text-shadow:0 4px #e19a19}.finish-count{display:flex;justify-content:center;align-items:center;gap:15px;font-size:36px;color:#30984c;margin:20px 0}.modal-actions{display:flex;justify-content:center;gap:18px}
@media(max-width:700px){.floating-tools{top:12px;right:12px;gap:7px}.tool{width:44px;height:44px;padding:7px}.tool .symbol{width:27px;height:27px}.hud{top:24px;left:12px}.progress{gap:4px;margin-bottom:20px}.progress i{width:12px;height:12px}.progress i.done::after{font-size:9px;line-height:8px}#goal{padding:6px 10px;border-width:3px;min-height:49px;gap:6px;max-width:240px;border-radius:20px}#goal .symbol{width:29px;height:29px}#goal b{font-size:26px}.fraction-picture{width:76px;height:26px}.dot-goal{grid-template-columns:repeat(4,7px);gap:3px}.dot-goal i{width:7px;height:7px}.controls{gap:6px}.bottom{bottom:14px}.controls .tool{width:40px;height:40px}.controls .tool .symbol{width:25px;height:25px}.queue{gap:3px}.queue span{width:23px;height:25px;font-size:18px}#gesture-hint .symbol{width:29px;height:29px}#gesture-hint{padding:7px 15px;gap:9px;bottom:20px}#celebration{font-size:56px}.home .stage{display:flex;flex-direction:column;overflow:auto}.home .scene-wrap{flex:0 0 40%;min-height:225px;border-right:0;border-radius:0 0 30px 30px}.home .home-art{object-position:center 47%}.intro{padding:10px 22px 27px;align-self:stretch;max-width:none}.game-logo{height:107px;max-width:340px}.mode-list{gap:9px;margin:12px 0 18px}.mode{font-size:16px;min-height:50px;padding:7px 12px;gap:10px;border-radius:18px}.mode>.symbol{width:29px;height:29px}.play-button{width:95px;height:65px;min-height:0;margin:18px auto 0;padding:8px}.play-button .symbol{width:39px;height:39px}.modal{padding:22px}.modal h2{font-size:23px}.modal p{font-size:15px}.help-demo .symbol{width:51px;height:51px}.material-guide{gap:10px}.material-guide>div{font-size:12px}.stars{font-size:46px}}
@media(max-height:500px) and (min-width:600px){.home .stage{display:grid;grid-template-columns:1fr 1fr}.home .scene-wrap{min-height:0}.intro{padding:45px 25px 8px}.game-logo{height:82px}.mode-list{gap:7px;margin:7px 0 11px}.mode{min-height:36px;padding:4px 10px;font-size:14px}.mode>.symbol{width:25px;height:25px}.play-button{height:52px;width:90px;min-height:0;margin:12px auto 0;padding:6px}.play-button .symbol{width:31px;height:31px}.floating-tools{top:10px;right:10px}.tool{width:40px;height:40px;padding:6px}.tool .symbol{width:26px;height:26px}.hud{top:14px;left:14px}.progress{margin-bottom:12px}#goal{min-height:44px;padding:4px 9px}#goal b{font-size:24px}#goal .symbol{width:29px;height:29px}.bottom{bottom:10px}#gesture-hint{left:130px;bottom:15px}.playing:has(.controls:not(:empty)) #gesture-hint{bottom:15px}.queue{margin-bottom:5px}#celebration{font-size:55px}.modal{padding:14px}.modal h2{margin-bottom:5px}.modal p{font-size:13px;margin:5px}.help-demo{margin:10px}.help-demo .symbol{width:40px;height:40px}.material-guide{margin:10px}.material-guide .symbol{width:25px;height:25px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
