:root{font-family:ui-rounded,'Hiragino Maru Gothic ProN','Hiragino Sans',sans-serif;color:#345451;background:#f4f0dc;color-scheme:light;--ink:#345451;--mint:#61bcab;--gold:#edbd59;--paper:#fffdf3}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100svh;background:radial-gradient(ellipse at 50% 0,#fffdf4 0,#f3f0dc 75%);overscroll-behavior:none}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;border:0}button:disabled{cursor:default}button:focus-visible{outline:4px solid #497d9c;outline-offset:4px}button > svg{width:100%;height:100%;display:block;pointer-events:none}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}#app{max-width:1040px;min-height:100svh;margin:0 auto;padding:10px 26px 18px;position:relative;isolation:isolate}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px}.icon-button{width:46px;height:46px;flex:none;padding:12px;border-radius:50%;background:#fffdf1;box-shadow:0 3px 0 #dcdcc5}.settings{display:flex;align-items:center;gap:12px}.parent-button{width:30px;height:40px;padding:8px;background:transparent;box-shadow:none;opacity:.65}.course-label{display:flex;align-items:center;gap:12px;font-size:16px;font-weight:700}.course-symbol{display:grid;place-items:center;width:42px;height:42px;font-size:31px;border-radius:15px;background:#dcebdd;color:#547966}.course-level{font-size:13px;border-radius:12px;background:#fffdf0;padding:5px 12px}.menu-screen{position:relative;max-width:830px;margin:20px auto 0;text-align:center}.menu-screen h1{font-size:31px;font-weight:800;letter-spacing:.06em;margin:8px 0 25px}.operation-menu{display:grid;grid-template-columns:1fr 1fr;gap:20px}.operation-button{position:relative;min-height:176px;background:#fffdf4;border-radius:30px;box-shadow:0 7px 0 #dcdcc3;display:flex;align-items:center;gap:20px;padding:23px 30px;text-align:left}.operation-button:hover{transform:translateY(-2px)}.operation-tile{width:87px;height:87px;display:grid;place-items:center;font-size:66px;border-radius:24px;background:var(--tint);color:var(--tone);font-weight:600;line-height:1}.operation-copy{display:flex;flex-direction:column;gap:9px}.operation-copy b{font-size:22px}.operation-example{font-size:27px;color:#80917b;white-space:nowrap}.level-menu{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.level-button{display:flex;flex-direction:column;align-items:center;gap:13px;min-height:270px;padding:22px 12px;background:#fffdf3;border-radius:28px;box-shadow:0 7px 0 #dcdcc3}.level-button:hover{background:#fff6da;transform:translateY(-2px)}.steps{display:flex;align-items:flex-end;justify-content:center;gap:5px;height:68px;position:relative}.steps i{display:block;width:25px;background:#a9cdb5;border-radius:6px 6px 3px 3px}.steps i:nth-child(1){height:25px}.steps i:nth-child(2){height:45px}.steps i:nth-child(3){height:65px}.level-button[data-difficulty='medium'] .steps i{background:#e9c77f}.level-button[data-difficulty='high'] .steps i{background:#b8a7d5}.level-button b{font-size:29px}.level-caption{font-size:15px;color:#758a76}.level-example{font-size:25px;white-space:nowrap}.five-promise{display:flex;flex-direction:column;align-items:center;margin:27px 0 10px;color:#76927c;gap:8px}.five-promise>span{font-size:27px;letter-spacing:7px}.five-promise p{font-size:19px;margin:0;font-weight:700}.flag{font-size:37px;color:#daa84e;vertical-align:middle}.back-menu{position:absolute;left:0;top:0}.progress-area{display:flex;justify-content:center;align-items:center;gap:28px;min-height:72px;margin:0 0 12px}.progress{display:flex;align-items:center;gap:9px;position:relative}.progress:before{content:'';position:absolute;left:15px;right:20px;height:3px;top:21px;background:#d8dec6;z-index:-1}.progress-step{width:42px;height:42px;border:3px solid #d9dfc7;border-radius:50%;background:#f5f3e4;display:grid;place-items:center;font-size:20px;font-weight:750;color:#9ba990}.progress-step.done{background:#71b6a0;border-color:#71b6a0;color:white}.progress-step.current{background:#f6d382;border-color:#dcb45d;color:#756038;box-shadow:0 0 0 5px #f3d68f40}.progress-flag{font-size:38px;color:#beaf7c;margin-left:5px;line-height:1}.remaining{font-size:19px;white-space:nowrap;color:#768774;margin:0}.remaining strong{font-size:30px;color:#6a856d;margin:0 6px}.question-panel{position:relative;height:330px;border-radius:34px;background:radial-gradient(ellipse at 50% 85%,#fffef4,#e3efe3 90%);box-shadow:0 7px 0 #d6dfc2;overflow:hidden}.equation{position:relative;z-index:2;pointer-events:none;display:flex;align-items:center;justify-content:center;gap:18px;padding-top:18px;font-weight:800;font-size:55px;font-variant-numeric:tabular-nums;line-height:1.15}.equation .math-sign{font-size:.66em;color:#94a48a;font-weight:500}.equation .question-number{color:#d49f3d}.equation .answer-number{color:#4eac96}.repeat-button{position:absolute;z-index:5;right:17px;top:17px;background:#fffdf1bd}.help-button{position:absolute;left:16px;bottom:16px;width:42px;height:42px;z-index:5;background:#fffdf1bd}.help-button:disabled{opacity:.35}.stage{position:relative;height:245px;display:flex;align-items:center;justify-content:center;z-index:2}.operation-view{width:82%;height:215px;transition:transform .45s,opacity .4s}.operation-view svg{width:100%;height:100%;display:block}.stage.revealing .operation-view{animation:diagramReveal .65s ease-out}.result-layout{display:flex;align-items:center;justify-content:center;gap:10px;width:91%;height:100%}.result-layout .operation-view{width:65%;height:195px}.result-character{width:200px;height:232px;position:relative;flex:none;animation:resultPop .5s ease-out}.result-character > .course-character{width:100%;height:100%}.result-check{position:absolute;bottom:18px;right:4px;width:35px;height:35px;background:#6bb497;border:4px solid #fffcdf;border-radius:50%;display:grid;place-items:center;color:white;font-size:24px;font-weight:800}.choices{display:flex;justify-content:center;gap:24px;max-width:760px;margin:24px auto 0}.answer-card{width:220px;height:214px;background:#fffdf5;box-shadow:0 6px 0 #dbdbc4;border-radius:27px;position:relative;padding:17px 12px 7px;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s;isolation:isolate}.answer-card:before{content:'';position:absolute;inset:9px;border:2px dashed #e9e6d2;border-radius:21px;z-index:-1}.answer-card:hover:not(:disabled){background:#fff6d7;transform:translateY(-2px)}.answer-card:active:not(:disabled){transform:translateY(3px)}.answer-card > .course-character{height:185px;max-width:190px;overflow:visible}.answer-label{position:absolute;left:14px;top:11px;font-size:29px;font-weight:800;color:#748a75;z-index:3;line-height:1}.answer-card.correct{background:#def0d7;box-shadow:0 6px 0 #accba8}.answer-card.correct:before{border:3px solid #91bf94}.answer-card.faded{opacity:.35}.answer-card.wrong{background:#fff0d2;animation:gentleWiggle .3s ease-in-out}.answer-check{position:absolute;right:12px;top:10px;font-size:26px;font-weight:800;color:#4f9e7b}.bottom-bar{height:77px;margin:15px auto 0;display:flex;align-items:center;justify-content:center}.next-button{height:61px;width:96px;padding:17px 26px;border-radius:23px;background:#efc162;box-shadow:0 6px 0 #caa250}.next-button:disabled{opacity:.4}.next-button > svg{animation:invite 2.2s ease-in-out infinite}.end-screen{text-align:center;display:flex;align-items:center;flex-direction:column;justify-content:center;min-height:calc(100svh - 105px);position:relative;padding:15px 0 30px}.finish-symbol{font-size:65px;line-height:1;color:#c6a24e;position:relative;width:105px;height:100px;border-radius:50%;background:#f7e4b5;display:grid;place-items:center;animation:resultPop .5s ease-out}.finish-symbol span{position:absolute;bottom:-2px;right:0;font-size:24px;background:#76b59b;color:white;border:4px solid #fff9e4;width:38px;height:38px;border-radius:50%;display:grid;place-items:center}.end-screen h1{font-size:40px;letter-spacing:.06em;margin:20px 0 8px}.finish-count{font-size:30px;margin:0;color:#7fa087;font-weight:800}.finish-cast{height:215px;width:250px;margin:0 auto 12px}.finish-cast > .course-character{width:100%;height:100%}.end-actions{display:flex;justify-content:center;gap:20px;width:100%;max-width:540px}.end-button{min-height:100px;min-width:130px;flex:1;display:flex;align-items:center;justify-content:center;gap:12px;padding:15px 20px;background:#edc66e;box-shadow:0 6px 0 #c7a559;border-radius:24px}.end-button.secondary{background:#dae8d7;box-shadow:0 6px 0 #b7c7ae}.end-button>span{display:block;width:43px;height:43px;flex:none}.end-button b{font-size:17px}.end-button > svg{width:43px;height:43px}.resume-screen{position:absolute;inset:0;background:#f7f3e7f7;z-index:20;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:24px;padding:25px;backdrop-filter:blur(8px)}.resume-mark{font-size:40px;color:#d3b56f}.resume-screen p{font-size:24px;font-weight:700;margin:0}.play-button{width:108px;height:85px;padding:22px 30px;border-radius:28px;background:#efc266;box-shadow:0 7px 0 #c8a152}#confetti{position:absolute;inset:0;z-index:6;pointer-events:none}#confetti i{position:absolute;width:9px;height:14px;left:var(--x);top:var(--y);background:var(--color);border-radius:4px;animation:confetti 1.2s ease-out forwards}dialog{border:0;border-radius:27px;background:#fffaf0;color:var(--ink);padding:30px;max-width:calc(100vw - 24px);max-height:90svh;box-shadow:0 15px 60px #34544a44}dialog::backdrop{background:#39534770;backdrop-filter:blur(4px)}.parent-dialog{width:650px;font-size:14px;line-height:1.8}.parent-dialog h1{font-size:22px;margin:22px 0}.parent-dialog table{border-collapse:collapse;width:100%;font-size:12px}.parent-dialog th,.parent-dialog td{border-bottom:1px solid #dddcc6;padding:8px 5px;text-align:left}.close-button{position:absolute;right:12px;top:12px;width:38px;height:38px;padding:10px}.text-button{padding:12px 18px;border-radius:13px;background:#e9d5a6;min-height:48px}.text-button.secondary{background:#e5e9da}.leave-dialog{width:410px;text-align:center}.leave-dialog p{font-weight:700;font-size:20px}.leave-actions{display:flex;gap:18px}.leave-actions .end-button{min-height:85px;min-width:100px}.leave-actions svg{width:40px;height:40px}
@keyframes invite{0%,100%{transform:translateX(0)}50%{transform:translateX(4px)}}@keyframes resultPop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@keyframes diagramReveal{from{transform:scale(.94);opacity:.5}to{transform:scale(1);opacity:1}}@keyframes gentleWiggle{0%,100%{transform:rotate(0)}33%{transform:rotate(-3deg)}66%{transform:rotate(3deg)}}@keyframes confetti{to{transform:translate(var(--dx),130px) rotate(200deg);opacity:0}}
@media(max-width:700px){#app{padding:7px 12px 12px}.topbar{height:57px;gap:8px}.icon-button{width:40px;height:40px;padding:10px}.settings{gap:5px}.parent-button{width:25px;height:36px;padding:6px}.course-label{font-size:14px;gap:7px}.course-symbol{width:35px;height:35px;font-size:26px;border-radius:12px}.course-level{font-size:12px;padding:4px 9px}.menu-screen{margin-top:15px}.menu-screen h1{font-size:25px;margin-bottom:23px}.operation-menu{gap:16px}.operation-button{min-height:165px;padding:15px 8px;flex-direction:column;gap:10px;border-radius:25px;text-align:center}.operation-tile{width:64px;height:64px;font-size:48px;border-radius:20px}.operation-copy{gap:5px}.operation-copy b{font-size:18px}.operation-example{font-size:23px}.level-menu{gap:11px}.level-button{min-height:247px;padding:20px 5px;gap:12px;border-radius:24px}.steps{gap:3px;height:58px}.steps i{width:17px}.steps i:nth-child(1){height:22px}.steps i:nth-child(2){height:38px}.steps i:nth-child(3){height:55px}.level-button b{font-size:26px}.level-caption{font-size:12px}.level-example{font-size:19px}.five-promise{margin-top:28px}.five-promise>span{font-size:24px;letter-spacing:3px}.five-promise p{font-size:17px}.back-menu{top:-3px;width:36px;height:36px;padding:9px}.progress-area{min-height:72px;margin-bottom:6px;gap:5px;flex-direction:column}.progress{gap:7px}.progress:before{top:16px}.progress-step{width:33px;height:33px;font-size:16px;border-width:2px}.progress-step.current{box-shadow:0 0 0 3px #f3d68f40}.progress-flag{font-size:31px;margin-left:3px}.remaining{font-size:14px;line-height:1.1}.remaining strong{font-size:20px}.question-panel{height:270px;border-radius:28px;box-shadow:0 6px 0 #d6dfc2}.equation{font-size:39px;gap:10px;padding-top:18px}.repeat-button{right:10px;top:10px;width:33px;height:33px;padding:8px}.help-button{left:10px;bottom:10px;width:36px;height:36px;padding:9px}.stage{height:209px}.operation-view{width:94%;height:180px}.result-layout{gap:0;width:94%}.result-layout .operation-view{width:61%;height:165px}.result-character{width:124px;height:192px}.result-check{bottom:21px;right:0;width:27px;height:27px;font-size:18px;border-width:3px}.choices{margin-top:20px;gap:12px}.answer-card{width:calc(50% - 6px);height:187px;padding:14px 4px 6px;border-radius:24px}.answer-card > .course-character{height:166px;max-width:158px}.answer-card:before{inset:7px;border-radius:19px}.answer-label{left:11px;top:10px;font-size:26px}.answer-check{right:10px;top:9px;font-size:23px}.choices.three{gap:9px}.choices.three .answer-card{width:calc((100% - 18px)/3);height:168px;padding:22px 2px 4px}.choices.three .answer-card > .course-character{height:135px;max-width:110px}.choices.three .answer-label{font-size:24px;left:9px}.choices.three .answer-check{font-size:19px;right:8px}.bottom-bar{height:69px;margin-top:12px}.next-button{width:88px;height:57px;padding:15px 24px}.end-screen{min-height:calc(100svh - 80px);padding:10px 0 30px}.finish-symbol{width:90px;height:85px;font-size:55px}.end-screen h1{font-size:34px;margin-top:19px}.finish-count{font-size:27px}.finish-cast{width:210px;height:205px;margin-bottom:15px}.end-actions{gap:14px}.end-button{min-height:111px;min-width:0;padding:15px 8px;flex-direction:column;gap:8px;border-radius:23px}.end-button b{font-size:15px}.end-button>span{width:36px;height:36px}.end-button > svg{width:36px;height:36px}.parent-dialog{padding:28px 18px;font-size:13px}.parent-dialog table{font-size:11px}.parent-dialog th,.parent-dialog td{padding:8px 3px}.leave-actions .end-button{min-width:90px;min-height:80px}}
@media(max-width:360px){.equation{font-size:34px;gap:8px}.level-example{font-size:16px}.level-caption{font-size:11px}.course-label{font-size:12px}.course-level{padding:4px 6px}.choices.three .answer-card > .course-character{height:122px}.choices.three .answer-card{height:154px}}
@media(orientation:portrait) and (max-height:740px){.progress-area{min-height:65px}.question-panel{height:228px}.stage{height:172px}.operation-view{height:150px}.result-layout .operation-view{height:145px}.result-character{height:166px;width:112px}.choices{margin-top:18px}.answer-card{height:155px}.answer-card > .course-character{height:143px}.choices.three .answer-card{height:145px}.choices.three .answer-card > .course-character{height:118px}.bottom-bar{height:59px;margin-top:10px}.next-button{height:52px}.finish-cast{height:150px}.end-screen h1{margin-top:13px}.operation-button{min-height:142px}.five-promise{margin-top:20px}}
@media(orientation:landscape) and (max-height:560px){#app{max-width:none;padding:4px 15px 12px}.topbar{height:51px}.menu-screen{margin:0 auto;max-width:880px}.menu-screen h1{font-size:23px;margin:0 0 15px}.operation-menu{grid-template-columns:repeat(4,1fr);gap:14px}.operation-button{min-height:165px;flex-direction:column;padding:14px 6px;gap:7px;text-align:center}.operation-tile{width:64px;height:64px;font-size:49px}.operation-copy{gap:5px}.operation-copy b{font-size:18px}.operation-example{font-size:23px}.five-promise{margin-top:16px;flex-direction:row;justify-content:center;gap:18px}.five-promise>span{font-size:24px;letter-spacing:4px}.five-promise p{font-size:16px}.level-menu{max-width:660px;margin:auto;gap:20px}.level-button{min-height:175px;display:grid;grid-template-columns:70px 1fr;gap:6px;padding:17px}.steps{grid-column:1;grid-row:1/4;gap:4px;height:64px}.steps i{width:17px}.level-button b{font-size:27px}.level-caption{font-size:12px}.level-example{font-size:20px}.back-menu{top:-5px}.game-screen{display:grid;grid-template-columns:minmax(280px,1fr) 330px;grid-template-rows:46px 1fr 63px;column-gap:18px;min-height:calc(100svh - 70px)}.progress-area{grid-column:2;grid-row:1;margin:0;min-height:43px;gap:7px;flex-direction:row}.progress{gap:5px}.progress-step{width:28px;height:28px;font-size:14px;border-width:2px}.progress:before{top:13px}.progress-flag{font-size:28px;margin-left:0}.remaining{font-size:11px}.remaining strong{font-size:17px;margin:0 2px}.question-panel{grid-column:1;grid-row:1/4;height:max(240px,calc(100svh - 73px));align-self:start;border-radius:28px}.equation{font-size:39px;gap:12px;padding-top:16px}.stage{height:calc(100% - 65px)}.operation-view{width:95%;height:220px}.result-layout{width:95%;gap:0}.result-layout .operation-view{width:64%;height:200px}.result-character{width:120px;height:195px}.choices{grid-column:2;grid-row:2;margin:10px 0 0;gap:12px;align-self:center}.answer-card{width:159px;height:171px;padding:17px 3px 5px}.answer-card > .course-character{height:150px}.choices.three{gap:8px}.choices.three .answer-card{width:104px;height:163px;padding:20px 2px 4px}.choices.three .answer-card > .course-character{height:135px;max-width:100px}.answer-label{font-size:26px;left:11px;top:10px}.choices.three .answer-label{font-size:24px;left:9px}.bottom-bar{grid-column:2;grid-row:3;height:60px;margin:0}.next-button{height:51px;width:80px;padding:13px 23px}.repeat-button{width:33px;height:33px;padding:8px;top:11px;right:11px}.end-screen{min-height:calc(100svh - 70px);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:90px 55px 1fr;padding:5px 35px 15px;column-gap:30px}.finish-symbol{grid-column:1;grid-row:1;justify-self:center;width:80px;height:78px;font-size:50px}.end-screen h1{grid-column:1;grid-row:2;font-size:32px;margin:5px 0}.finish-count{grid-column:1;grid-row:3;align-self:start;font-size:24px}.finish-cast{grid-column:2;grid-row:1/3;width:165px;height:155px;margin:0;justify-self:center}.end-actions{grid-column:1/3;grid-row:3;align-self:end;max-width:520px;justify-self:center;gap:20px}.end-button{min-height:75px;padding:12px 17px;flex-direction:row;gap:12px}.end-button b{font-size:15px}.resume-screen{gap:13px}.resume-mark{display:none}.play-button{width:90px;height:70px;padding:18px 26px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
/* Four answers stay large enough to tap: a row on desktop, a grid on phones. */
.choices.four{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.choices.four .answer-card{width:100%;min-width:0}
.choices.four .answer-card > .course-character{max-width:100%}
.bottom-bar{display:none}
@media(max-width:700px){
 .choices.four{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .choices.four .answer-card{height:160px;padding:12px 8px 5px}
 .choices.four .answer-card > .course-character{height:140px;max-width:145px}
}
@media(orientation:portrait) and (max-height:740px){
 .choices.four .answer-card{height:124px;padding:9px 8px 4px}
 .choices.four .answer-card > .course-character{height:110px;max-width:130px}
}
@media(orientation:portrait) and (max-height:640px){
 .question-panel{height:190px}
 .equation{font-size:34px;padding-top:12px}
 .stage{height:139px}
 .operation-view,.result-layout .operation-view{height:125px}
 .result-character{height:135px;width:95px}
 .choices.four .answer-card{height:max(96px,calc((100svh - 370px)/2));padding:6px 8px 3px}
 .choices.four .answer-card > .course-character{height:90px;max-height:100%;max-width:110px}
 .choices.four .answer-label{font-size:23px}
}
@media(orientation:landscape) and (max-height:560px){
 .choices.four{grid-column:2;grid-row:2/4;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 0;align-self:start}
 .choices.four .answer-card{height:max(96px,calc((100svh - 140px)/2));padding:6px 8px 3px}
 .choices.four .answer-card > .course-character{height:118px;max-height:100%;max-width:130px}
 .choices.four .answer-label{font-size:24px}
}

.voice-note{font-size:11px;color:#687d69;margin:10px 0 12px;text-align:center}
