:root{--bg:#f6f8f5;--green:#267455;--green-dark:#18553d;--orange:#ed9c51;--ink:#202c27;--muted:#68776e;--line:#dce5df;--soft:#e9f3eb;font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid #d89439;outline-offset:4px}button:disabled{cursor:default;opacity:.55}[hidden]{display:none!important}header{background:#fff;border-bottom:1px solid var(--line)}.header-inner{max-width:1080px;margin:auto;padding:23px 28px;display:flex;align-items:center;justify-content:space-between;gap:14px}h1{margin:0;font-size:30px;color:var(--green-dark);letter-spacing:-1px}button{border:0;border-radius:10px;min-height:46px;transition:background .16s,transform .16s}button:active{transform:translateY(1px)}.outline{background:#fff;border:1px solid var(--green);color:var(--green-dark);padding:8px 18px;font-weight:650}main{max-width:1000px;margin:auto;padding:28px 24px 20px}.modes{max-width:800px;margin:0 auto 22px;display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #abc6b7;border-radius:13px;overflow:hidden;background:white}.modes button{border-radius:0;background:transparent;color:var(--green-dark);font-size:20px;font-weight:700;min-height:56px}.modes button+button{border-left:1px solid var(--line)}.modes button[aria-pressed=true]{background:var(--green);color:#fff}.panel{background:#fff;border:1px solid #e1e8e3;border-radius:20px;padding:24px 40px 18px;box-shadow:0 3px 9px #193a2605;text-align:center}.progress-row{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:14px}.progress-row span:first-child{color:var(--green);font-weight:700}.progress-track{height:4px;background:#eff3ef;border-radius:3px;margin-top:12px;overflow:hidden}.progress-track span{display:block;background:var(--green);height:100%;transition:width .25s}.equation{font-size:clamp(46px,6vw,70px);font-weight:750;letter-spacing:2px;margin:18px 0 12px;line-height:1.2;font-variant-numeric:tabular-nums}h2{font-size:23px;margin:12px 0 24px}#instruction{color:var(--green-dark);font-weight:650}.frames{display:grid;grid-template-columns:1fr 1fr;gap:50px;max-width:760px;margin:0 auto}.frame-label{font-size:13px;color:var(--muted);text-align:left;margin-bottom:9px}.ten-frame{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,1fr);border:2px solid var(--green);border-radius:10px;overflow:hidden;background:#fbfdfb;aspect-ratio:2.5}.cell{display:grid;place-items:center;border-right:1px solid #9eb9a8;border-bottom:1px solid #9eb9a8;min-height:0}.cell:nth-child(5n){border-right:0}.cell:nth-child(n+6){border-bottom:0}.dot{padding:0;border-radius:50%;min-height:0;width:65%;aspect-ratio:1;display:block;background:var(--green);box-shadow:inset 0 -3px 0 #00000009}.dot.orange{background:var(--orange)}.dot.movable{touch-action:none;cursor:grab}.dot.moved{background:var(--orange)}.dot.dragging{opacity:.2}.drop-ready{background:#dfeee2}.drag-ghost{position:fixed;width:36px;height:36px;background:var(--orange);border-radius:50%;pointer-events:none;z-index:100;box-shadow:0 5px 15px #0002;transform:translate(-50%,-50%)}.helper{color:var(--muted);font-size:15px;margin:16px 0 22px;line-height:1.6}#answer-fields{display:flex;flex-direction:column;align-items:center;gap:16px;margin:14px auto 0}.decomposition{font-size:clamp(23px,3.4vw,34px);font-weight:650;line-height:1.8;white-space:nowrap}.answer-label{display:flex;align-items:center;justify-content:center;gap:10px;font-size:23px;font-weight:600}input{width:64px;height:56px;border:2px solid #9eb9a8;border-radius:9px;text-align:center;font-size:29px;color:var(--green-dark);background:#fcfefc;font-weight:700;appearance:textfield}input::-webkit-inner-spin-button{appearance:none}input:disabled{opacity:1;background:#eff5f0;color:var(--green-dark)}.blank{display:inline-block;width:38px;line-height:1.25;color:var(--green);border-bottom:2px solid #b9cfc0}.feedback{min-height:38px;display:grid;place-items:center;font-size:16px;line-height:1.5;color:var(--green-dark);margin:9px 0;overflow-wrap:anywhere}.feedback.error{color:#99532d}.primary{display:block;width:min(100%,680px);margin:0 auto;background:var(--green);color:#fff;font-size:21px;font-weight:700;min-height:55px;padding:12px 22px}.primary:hover{background:var(--green-dark)}.secondary-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 25px;margin-top:5px}.text-button{background:transparent;color:var(--green);padding:8px 6px;font-weight:600;font-size:15px}.text-button:hover{background:var(--soft)}.learning-note{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--soft);color:var(--green-dark);padding:18px 24px;border-radius:13px;margin-top:17px}.learning-note strong{font-size:18px}.learning-note span{font-size:13px;color:#557161}.storage-note{text-align:center;font-size:12px;color:var(--muted);margin-top:16px}dialog{border:1px solid var(--line);border-radius:18px;padding:26px;width:min(600px,calc(100% - 28px));max-height:85dvh;color:var(--ink)}dialog::backdrop{background:#152b2255;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.dialog-heading h2{margin:0}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:24px 0}.metric{background:var(--bg);border-radius:10px;text-align:center;padding:16px 5px}.metric strong{display:block;font-size:28px;color:var(--green)}.metric span{font-size:12px;color:var(--muted)}.parent-note{line-height:1.8;background:var(--soft);border-radius:10px;padding:15px;font-size:14px}.history{list-style:none;padding:0}.history li{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:12px 0;font-size:13px}.history time{color:var(--muted)}.danger{color:#9b4535}.result{padding:42px 28px}.result h2{font-size:29px;color:var(--green-dark)}.result p{line-height:1.8}.result .primary{max-width:400px;margin-top:25px}.result .text-button{margin-top:10px}.fill-tip{color:var(--muted);font-size:15px;line-height:1.7;margin:0 0 12px}.success-pulse{animation:pulse .45s ease-out}@keyframes pulse{50%{transform:scale(1.025)}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}@media(max-width:600px){.header-inner{padding:17px 16px}h1{font-size:21px;letter-spacing:-.6px}.outline{font-size:14px;padding:7px 11px;min-height:42px}main{padding:18px 12px}.modes{margin-bottom:15px}.modes button{font-size:17px;min-height:49px}.panel{padding:19px 16px 12px;border-radius:16px}.progress-row{font-size:12px}.equation{font-size:52px;margin-top:23px}h2{font-size:20px;margin-bottom:23px}.frames{gap:22px;grid-template-columns:1fr;max-width:270px}.ten-frame{aspect-ratio:2.8}.frame-label{text-align:center;margin-bottom:7px}.dot{width:66%}.helper{font-size:13px;margin:15px 0}.decomposition{font-size:25px}.decomposition input{width:43px;height:47px;font-size:25px}.answer-label{font-size:20px}.answer-label input{width:60px;height:50px}.feedback{font-size:14px;min-height:42px}.primary{font-size:19px;min-height:52px}.secondary-actions{gap:3px 17px}.text-button{font-size:14px}.learning-note{display:block;padding:16px 18px}.learning-note strong,.learning-note span{display:block}.learning-note span{margin-top:6px}.result h2{font-size:25px}.summary-grid{gap:7px}.metric strong{font-size:25px}dialog{padding:20px}.history li{flex-direction:column;gap:4px}}@media(min-width:601px) and (max-height:800px){main{padding-top:18px}.equation{margin:12px 0;font-size:56px}.frames{max-width:640px}.panel{padding-top:18px}h2{margin-bottom:17px}.helper{margin:12px 0}.learning-note{margin-top:12px}}
/* 手机竖屏收紧留白，优先呈现操作区和提交按钮。 */
@media(max-width:600px){.equation{margin:16px 0 10px;font-size:46px}#instruction{margin:10px 0 16px}.frames{max-width:245px;gap:14px}.ten-frame{aspect-ratio:3}.helper{margin:11px 0}.frame-label{margin-bottom:6px}#answer-fields{gap:10px;margin-top:8px}.feedback{min-height:32px;margin:7px 0}.secondary-actions{margin-top:2px}.learning-note{margin-top:13px}}
/* 儿童引导版：每一步一个问题；保留数字、位置和颜色的对应关系。 */
.green-number{color:var(--green)}.orange-number{color:#b8621c}.equation{margin:17px 0;font-size:60px}.step-track{list-style:none;padding:0;display:flex;justify-content:center;gap:30px;margin:20px auto}.step-track li{font-size:14px;display:flex;align-items:center;gap:7px;color:#78867d}.step-track li span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#edf1ee;font-weight:750}.step-track .step-active{color:var(--green-dark);font-weight:700}.step-active span{background:var(--green)!important;color:white}.step-done span{background:#ddf0df!important;color:var(--green)}#instruction{font-size:26px;margin:18px 0 8px}.step-explanation{font-size:17px;color:#56665c;line-height:1.65;margin:0 auto 22px;max-width:640px}.frame-label{font-size:16px;font-weight:650;color:#4e6658}.frames{gap:36px;max-width:720px}.ten-frame{border-width:2px;aspect-ratio:2.5}.empty-space{background:#fff4d8;box-shadow:inset 0 0 0 3px #ffffff}.dot:disabled{opacity:1}.cell{position:relative}.cell button.dot{width:100%;height:100%;aspect-ratio:auto;border-radius:0;background:transparent;box-shadow:none;position:relative;min-height:44px}.cell button.dot::before{content:'';position:absolute;width:64%;aspect-ratio:1;border-radius:50%;background:var(--orange);left:18%;top:50%;transform:translateY(-50%);box-shadow:inset 0 -3px 0 #00000009}.cell button.dot:focus-visible{outline-offset:-4px;border-radius:4px}.cell button.dot:hover:not(:disabled){background:#fff2df}.guided-choices{display:flex;justify-content:center;gap:16px;margin:24px auto 12px}.guided-choices button{min-width:90px;min-height:78px;background:#f1f7f1;border:2px solid #c8ddcc;color:var(--green-dark);font-size:34px;font-weight:750;box-shadow:0 3px 0 #d8e5da}.guided-choices small{display:block;font-size:13px;font-weight:500}.guided-choices button:hover{background:#dff0e1;border-color:var(--green)}.split-model{display:flex;justify-content:center;align-items:center;gap:36px;background:#f4f8f1;border-radius:14px;margin:18px auto;padding:16px;max-width:650px}.number-bond{min-width:150px;font-size:30px;line-height:1.2}.number-bond>strong{display:block}.number-bond>div:last-child{display:flex;justify-content:center;gap:28px}.bond-lines{height:25px;width:70px;border-top:2px solid #d49d60;margin:9px auto 0;transform:perspective(60px) rotateX(35deg);position:relative}.bond-lines:before,.bond-lines:after{content:'';position:absolute;top:-2px;width:2px;height:20px;background:#d49d60;transform:rotate(32deg)}.bond-lines:before{left:4px}.bond-lines:after{right:4px;transform:rotate(-32deg)}.bond-part{font-weight:700;color:#b8621c}.bond-part small{display:block;white-space:nowrap;font-size:12px;font-weight:500;color:#68776e;margin-top:5px}.method-lines{text-align:left}.method-lines p{margin:8px 0;display:flex;gap:15px;align-items:center}.method-lines span{font-size:13px;color:#68776e}.method-lines strong{font-size:23px;white-space:nowrap}.number-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:min(100%,300px);margin:18px auto 6px}.number-pad button{background:#f0f5f0;color:var(--green-dark);font-size:25px;font-weight:700;min-height:50px;border:1px solid #d8e5da}.number-pad button:hover{background:#dfeee0}.number-pad button[data-digit="清空"],.number-pad button[data-digit="退一格"]{font-size:15px}.input-active{border-color:var(--green);background:#eff8e9;box-shadow:0 0 0 3px #2674551c}.split-inputs{display:flex;align-items:center;justify-content:center;gap:14px;font-size:25px}.split-inputs label{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:15px;color:#65776a}.split-inputs label:first-child input{border-color:var(--green)}.split-inputs label:nth-of-type(2) input{border-color:#d59a61}.feedback{font-size:17px;min-height:44px;max-width:640px;margin:8px auto}.primary{min-height:58px}.secondary-actions .text-button{min-height:48px}.learning-note span{font-size:14px}
@media(max-width:600px){.header-inner{padding:15px 14px}h1{font-size:21px}.panel{padding:16px 12px}.equation{font-size:45px;margin:15px 0}.step-track{gap:12px;margin:15px auto}.step-track li{font-size:12px;flex-direction:column;gap:4px}.step-track li span{width:26px;height:26px}#instruction{font-size:22px;line-height:1.4;margin:15px 0 7px}.step-explanation{font-size:15px;line-height:1.7;margin-bottom:18px;max-width:300px}.frames{gap:15px;max-width:250px}.frame-label{font-size:14px;margin-bottom:7px}.ten-frame{aspect-ratio:2.5}.cell button.dot{min-height:44px}.helper{font-size:14px;line-height:1.7;margin:12px 0}.guided-choices{gap:12px;margin:18px auto 10px}.guided-choices button{min-width:74px;min-height:75px;font-size:31px}.split-model{gap:15px;padding:14px 10px;flex-direction:column;margin:16px auto}.number-bond{min-width:160px}.method-lines strong{font-size:22px}.method-lines p{margin:7px 0}.number-pad{max-width:282px;gap:7px}.number-pad button{min-height:50px;font-size:25px}.feedback{font-size:15px;line-height:1.65;min-height:35px;margin:10px auto}.primary{font-size:20px;min-height:55px}.split-inputs{gap:9px;font-size:22px}.split-inputs label{font-size:13px}.learning-note strong{font-size:16px}.learning-note span{font-size:13px}}
.frames.single-frame{grid-template-columns:1fr;max-width:340px}button,input{-webkit-tap-highlight-color:transparent}
@media(max-width:600px){.frames.single-frame{max-width:250px}}
/* 声音与图形为主的儿童入口。 */
.welcome-screen{padding:40px 20px}.welcome-screen h2{font-size:30px;color:var(--green-dark);margin:25px 0 12px}.welcome-screen p{color:var(--muted);font-size:18px;line-height:1.8}.welcome-dots{display:flex;justify-content:center;gap:13px}.welcome-dots span{width:30px;height:30px;border-radius:50%;background:var(--green)}.welcome-dots span:nth-child(n+4){background:var(--orange)}.start-listening{display:flex;flex-direction:column;align-items:center;justify-content:center;width:156px;height:156px;margin:30px auto;background:var(--green);border-radius:50%;color:#fff;box-shadow:0 0 0 12px #e7f1e8}.start-listening svg{width:75px;height:75px}.start-listening span{font-size:22px;font-weight:700}.voice-controls{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}.voice-control{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:9px 14px;border:1px solid #c9dece;background:#fff;color:var(--green-dark);font-weight:700}.voice-control svg{width:28px;height:28px}.voice-control#toggle-sound{width:52px;padding:10px}.voice-controls p{width:100%;margin:2px 0 0;text-align:center;color:#617166;font-size:13px;max-width:650px;line-height:1.65}.voice-speaking #repeat-voice{box-shadow:0 0 0 4px #d8ebdb}.voice-speaking #repeat-voice svg{animation:speaker-breathe 1s ease-in-out infinite}body[data-audio-state=error] #repeat-voice,body[data-audio-state=blocked] #repeat-voice{border:3px solid #d28a3e;background:#fff2d8}.modes button{display:flex;align-items:center;justify-content:center;gap:10px}.modes svg{width:27px;height:27px}.primary,.demo-actions button{display:flex;align-items:center;justify-content:center;gap:12px}.primary svg{width:35px;height:35px}.secondary-actions .text-button{display:flex;align-items:center;justify-content:center;gap:6px}.secondary-actions svg{width:25px;height:25px}.number-pad svg{width:26px;height:26px;vertical-align:middle}.guided-choices strong{font-size:32px}.choice-dots{display:grid;grid-template-columns:repeat(3,7px);justify-content:center;gap:3px;margin:5px auto;min-height:17px}.choice-dots i{width:7px;height:7px;background:var(--green);border-radius:50%}.guided-choices button{padding:10px 15px;min-height:92px}.demo-panel{padding-bottom:26px}.demo-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.demo-heading h2{margin:0;color:var(--green-dark);font-size:23px}.demo-heading>span{font-size:12px;color:var(--muted)}.demo-frames{display:grid;grid-template-columns:1fr 1fr;gap:36px;max-width:720px;margin:25px auto}.demo-caption{font-size:24px;color:var(--green-dark);font-weight:700;min-height:40px;margin:18px 0;line-height:1.5}.demo-method{font-size:23px;line-height:1.7;color:var(--green-dark)}.demo-method p{margin:4px 0}.demo-bond{display:flex;flex-direction:column;line-height:1.3;color:#b8621c}.demo-bond span{font-size:22px}.demo-actions{display:flex;justify-content:center;gap:14px;margin:18px 0}.demo-actions svg{width:26px;height:26px}.demo-flying-dot{position:fixed;width:38px;height:38px;background:var(--orange);border-radius:50%;z-index:200;pointer-events:none}.demo-finger{position:absolute;left:12px;top:20px;color:var(--ink);font-size:33px;line-height:1}.attention-target{outline:4px solid #ecd7a2;outline-offset:4px}.attention-target .empty-space{background:#ffe5a4}#right-frame.attention-target .movable:not(:disabled):first-child:before{box-shadow:0 0 0 4px #ffe5bd}button:disabled{cursor:default}.primary:disabled{opacity:.5}@keyframes speaker-breathe{50%{transform:scale(1.12)}}
@media(max-width:600px){.welcome-screen{padding:35px 15px}.welcome-screen h2{font-size:27px}.welcome-screen p{font-size:16px}.voice-controls{gap:7px;margin-bottom:12px}.voice-control{font-size:14px;padding:8px 10px;gap:6px}.voice-control svg{width:26px;height:26px}.voice-controls p{font-size:12px;max-height:64px;overflow:auto}.modes button{gap:6px;font-size:15px}.modes svg{width:24px;height:24px}.demo-heading h2{font-size:20px}.demo-heading>span{font-size:11px}.demo-frames{grid-template-columns:1fr;max-width:245px;gap:18px}.demo-caption{font-size:22px}.demo-actions{gap:10px}.demo-actions button{min-height:50px}.guided-choices button{padding:9px 14px;min-height:92px}.secondary-actions{gap:5px 15px}.primary svg{width:31px;height:31px}.step-explanation{font-size:14px}.welcome-dots span{width:26px;height:26px}}
@media(prefers-reduced-motion:reduce){.voice-speaking #repeat-voice svg{animation:none}}
