:root{--bg:#f3f7f4;--paper:#fffefa;--ink:#29433e;--muted:#627b72;--green:#36786c;--deep:#205f56;--mint:#e8f3ed;--line:#d6e3dc;--gold:#a9792f;--serif:'Yu Mincho','Hiragino Mincho ProN','Noto Serif CJK JP',serif;font-family:'Yu Gothic','Hiragino Kaku Gothic ProN','Noto Sans CJK JP',sans-serif;color-scheme:light;font-size:16px}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:radial-gradient(ellipse at 12% 0,#fffbee,transparent 46%),var(--bg);line-height:1.75}button,input,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button,input{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button,a{transition:background .18s,box-shadow .18s,transform .18s}button:focus-visible,input:focus-visible,a:focus-visible,summary:focus-visible,[role=button]:focus-visible{outline:3px solid #bc9144;outline-offset:4px}a{color:inherit;text-decoration:none}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}h1,h2,h3,p{margin:0}strong,b{font-weight:600}.shell{width:min(1200px,calc(100% - 36px));margin:0 auto;padding-bottom:24px}.top-nav{display:flex;justify-content:center;align-items:center;gap:10px;padding:13px 0}.top-nav a{display:inline-flex;gap:8px;align-items:center;justify-content:center;min-height:38px;padding:5px 17px;border:1px solid #aac2b8;border-radius:11px;background:#ffffffd9;font-size:14px;box-shadow:0 2px 7px #284f3f06}.icon{width:18px;height:18px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}.brand{text-align:center;color:var(--muted);font-size:12px;letter-spacing:.1em;margin:1px 0 5px}.page-title{display:flex;align-items:center;justify-content:center;gap:13px;flex-wrap:wrap}.page-title h1{font:500 clamp(23px,2.5vw,30px)/1.5 var(--serif)}.number{font:400 30px/1 Georgia,serif;color:#6a9587}.stars{font-size:13px;letter-spacing:.06em;border:1px solid #dbcead;border-radius:20px;padding:1px 10px;background:#fffaed;color:#856630}.lesson-nav{display:flex;gap:7px;justify-content:center;margin:12px 0 17px}.lesson-nav a{display:flex;align-items:center;justify-content:center;width:38px;min-height:32px;border:1px solid var(--line);border-radius:8px;background:#ffffff99;font-size:14px;position:relative}.lesson-nav a[aria-current=page]{background:var(--green);border-color:var(--green);color:#fff}.lesson-nav a.done::after{content:'✓';font-size:10px;position:absolute;right:-3px;top:-7px;border-radius:50%;background:#e9edd9;color:#6c733f;width:15px;text-align:center}.layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(325px,1fr);grid-template-rows:auto 1fr;gap:15px;align-items:start}.panel{background:var(--paper);border:1px solid var(--line);border-radius:19px;box-shadow:0 8px 27px #30574709;min-width:0}.problem-panel{grid-column:2;grid-row:1;padding:19px 23px}.panel-label{font-size:13px;letter-spacing:.08em;color:var(--green);margin-bottom:7px}.problem{font-size:16px;line-height:1.95}.ask{font-size:16px;font-weight:600;line-height:1.8;border-left:3px solid #8cb5a0;padding-left:12px;margin-top:11px}.work-panel{grid-column:2;grid-row:2;padding:17px 23px}.model-panel{grid-column:1;grid-row:1/span 2;padding:17px 18px 14px}.model-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.model-top h2{font-size:15px;font-weight:500}.quiet-button{background:none;border:0;font-size:13px;padding:3px 6px;color:var(--muted)}.stage{border-radius:15px;border:1px solid #d4e3db;background:radial-gradient(ellipse at 50% 30%,#fffef7 0,#f0f6f0 72%);overflow:hidden;position:relative}.stage svg{display:block;width:100%;height:auto;max-height:440px;user-select:none}.stage text{font-family:'Yu Gothic','Hiragino Kaku Gothic ProN',sans-serif;fill:var(--ink);font-size:17px}.stage .label-small{font-size:14px;fill:var(--muted)}.stage .label-main{font-size:19px;font-weight:500}.stage .muted{fill:var(--muted)}.stage .stone{transition:opacity .25s,transform .5s,fill .3s}.stage .clickable{cursor:pointer}.stage .clickable:hover .stone-face{filter:brightness(1.06)}.stage .clickable:focus{outline:none}.stage .clickable:focus-visible .stone-face{stroke:#a98029;stroke-width:3}.stage .hit{fill:transparent}.stage .fade{opacity:.22}.stage .piece{transition:transform .65s ease,opacity .4s}.stage .ghost{stroke:#a4bdb0;stroke-width:1.3;stroke-dasharray:3 4;fill:#fffefa80}.stage-note{padding:8px 12px;border-top:1px solid #dce7df;background:#ffffff72;font-size:13px;line-height:1.6;text-align:center;color:var(--muted);min-height:39px}.model-controls{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-top:11px}.btn{border:1px solid #b5cdc0;background:#fff;border-radius:10px;padding:7px 12px;font-size:14px;line-height:1.6;min-height:39px;display:inline-flex;gap:6px;align-items:center;justify-content:center;white-space:normal}.btn:hover:not(:disabled){background:#eff6ef}.btn.selected{background:#e0eee5;border-color:#76a28a;color:var(--deep)}.btn.primary{color:#fff;background:var(--green);border-color:var(--green)}.btn.primary:hover{background:var(--deep)}.btn.gold{border-color:#ddc89e;background:#fff8e6;color:#876226}.instruction{margin-top:10px;min-height:43px;font-size:14px;line-height:1.7;color:var(--muted)}.readout{padding:8px 13px;margin-top:9px;border-radius:10px;background:#edf5ef;display:flex;gap:10px;align-items:baseline;justify-content:space-between;font-size:14px;min-height:42px}.readout strong{font-weight:500;color:var(--deep);font-size:20px;white-space:nowrap;font-variant-numeric:tabular-nums}.readout .small{font-size:14px;color:var(--muted)}.answer-title{display:block;font-size:15px;font-weight:500;margin-bottom:9px}.answer-line{display:flex;gap:9px;align-items:center}.answer-line input{width:110px;min-width:0;height:43px;border:1px solid #aac5b5;border-radius:9px;background:#fff;text-align:center;font-size:21px;font-variant-numeric:tabular-nums}.answer-line .btn{flex:1}.answer-line input[aria-invalid=true]{background:#fff7e7;border-color:#c69d55}.feedback{font-size:14px;line-height:1.7;min-height:27px;margin-top:7px;color:#896631}.feedback.good{color:var(--deep)}.support{border-top:1px solid var(--line);margin-top:8px;padding-top:11px}.hint-header{display:flex;align-items:center;justify-content:space-between;gap:9px}.hint-count{font-size:12px;color:var(--muted)}.hint-box{background:#fff8e7;border:1px solid #e6d9b7;border-radius:10px;padding:9px 12px;font-size:14px;line-height:1.8;margin-top:9px}.hint-box p+p{margin-top:6px}.hint-box .old-hint{color:#7a775f}.reward{display:flex;align-items:center;gap:12px;border:1px solid #e1d4af;border-radius:12px;background:linear-gradient(120deg,#fbf1d866,#e7f1e64d);padding:9px 12px;margin:10px 0;animation:reward-in .5s ease-out}.medal{width:52px;height:52px;flex-shrink:0;border:3px double #b69755;border-radius:50%;display:grid;place-items:center;font:24px Georgia,serif;background:#e9ca7140;color:#937433;opacity:.8}.reward b{font-size:16px;color:#77602e}.reward p{font-size:13px;color:var(--muted)}.solution{margin-top:11px;border-top:1px solid var(--line);font-size:14px;line-height:1.85}.solution summary{padding:10px 0;cursor:pointer;color:var(--deep);font-size:14px}.solution ol{padding-left:23px;margin:4px 0 12px}.solution li+li{margin-top:7px}.takeaway{border-left:3px solid #a1b99d;padding:8px 11px;background:#edf3e9;margin:10px 0}.next-row{display:flex;justify-content:space-between;gap:12px;padding-top:12px;margin-top:14px;border-top:1px solid var(--line)}.next-row a{font-size:14px}.footer{text-align:center;font-size:12px;color:#819087;margin:15px 0 0}.stepper{display:flex;align-items:center;justify-content:center;gap:12px;margin-right:9px}.stepper .btn{width:39px;padding:4px;font-size:21px}.stepper output{min-width:76px;text-align:center;font-size:14px}.stepper output b{font-size:20px;font-weight:500}.intro-head{text-align:center;padding:13px 0 20px}.intro-head h1{font:500 35px/1.5 var(--serif);letter-spacing:.12em}.intro-head p{font-size:15px;color:var(--muted);margin:7px auto 0}.toc-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.toc-card{display:grid;grid-template-columns:145px minmax(0,1fr) 20px;align-items:center;gap:17px;background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:14px 19px 14px 12px;box-shadow:0 5px 19px #33514406;min-height:146px}.toc-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px #33514410;border-color:#9dbdae}.toc-card svg{width:145px;height:116px;overflow:visible}.toc-card h2{font:500 19px/1.65 var(--serif);margin:4px 0 5px}.toc-meta{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}.toc-meta b{font:20px Georgia,serif;color:#6f9586}.toc-card p{font-size:13px;line-height:1.7;color:var(--muted)}.toc-card .go{font-size:23px;color:#7aa18e}.toc-note{margin:18px 0 0;padding:12px 17px;border-left:3px solid #a1bda7;color:var(--muted);font-size:14px}.corner-mark{font-size:13px!important;fill:#80551e!important}.skip-link{position:absolute;top:-80px;left:20px;background:#fff;padding:10px;z-index:10}.skip-link:focus{top:10px}@keyframes reward-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:900px) and (max-height:800px){.shell{width:min(1160px,calc(100% - 28px))}.top-nav{padding:9px 0}.brand{margin:0 0 3px}.page-title h1{font-size:25px}.lesson-nav{margin:9px 0 12px}.stage svg{max-height:365px}.problem-panel{padding:15px 20px}.problem{font-size:15px;line-height:1.85}.ask{font-size:15px}.work-panel{padding:14px 20px}.model-panel{padding:14px}.instruction{min-height:24px}.footer{margin-top:9px}}
@media(max-width:850px),(max-aspect-ratio:3/4){.shell{width:min(660px,calc(100% - 24px))}.layout{display:flex;flex-direction:column;gap:11px}.panel{width:100%}.problem-panel{order:0;padding:12px 17px}.model-panel{order:1;padding:13px 14px}.work-panel{order:2;padding:13px 17px}.panel-label{display:none}.problem{font-size:15px;line-height:1.8}.ask{font-size:15px;line-height:1.7;margin-top:7px}.page-title{gap:8px}.page-title h1{font-size:23px}.number{font-size:27px}.brand{font-size:12px;letter-spacing:.03em}.lesson-nav{margin:9px 0 12px}.top-nav{padding:10px 0}.stage svg{max-height:360px}.model-top{margin-bottom:6px}.instruction{min-height:0}.model-controls{margin-top:8px}.toc-grid{grid-template-columns:1fr}.toc-card{grid-template-columns:125px minmax(0,1fr) 17px;min-height:133px}.toc-card svg{width:125px;height:100px}.toc-card h2{font-size:19px}.intro-head{padding:10px 0 17px}.intro-head h1{font-size:31px}.intro-head p{font-size:14px}.footer{margin-top:13px}}
@media(max-width:480px){.shell{width:calc(100% - 18px);padding-bottom:14px}.top-nav a{font-size:13px;min-height:33px;padding:4px 14px}.top-nav{padding:8px 0}.page-title h1{font-size:20px}.page-title{gap:7px}.stars{font-size:12px;padding:0 7px}.number{font-size:23px}.brand{font-size:12px;letter-spacing:0}.lesson-nav{gap:6px;margin:8px 0 10px}.lesson-nav a{min-height:28px;width:32px;font-size:13px}.layout{gap:9px}.panel{border-radius:14px}.problem-panel{padding:10px 14px}.problem,.ask{font-size:14px;line-height:1.8}.model-panel{padding:10px}.model-top h2{font-size:14px}.stage svg{max-height:280px}.model-controls{gap:6px}.btn{font-size:13px;min-height:36px;padding:6px 10px;border-radius:8px}.stage-note{font-size:12px;min-height:32px;padding:6px 8px}.instruction{font-size:13px;margin-top:7px}.readout{margin-top:6px;padding:5px 10px;min-height:35px;font-size:13px}.readout strong{font-size:18px}.work-panel{padding:11px 14px}.answer-title{font-size:14px;margin-bottom:6px}.answer-line input{height:38px;width:94px;font-size:20px}.answer-line .btn{min-height:38px}.feedback{min-height:21px;font-size:13px;margin-top:5px}.support{margin-top:5px;padding-top:8px}.hint-box{font-size:13px}.solution{margin-top:7px}.solution summary{padding:7px 0}.next-row{margin-top:8px;padding-top:8px}.next-row a{font-size:13px}.toc-card{grid-template-columns:103px minmax(0,1fr) 12px;gap:10px;padding:10px 12px 10px 8px}.toc-card svg{width:103px;height:92px}.toc-card h2{font-size:17px}.toc-card p{font-size:12px}.toc-meta{font-size:12px;gap:7px}.toc-note{font-size:13px;padding:8px 12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(min-width:851px) and (max-aspect-ratio:3/4){.shell{width:min(880px,calc(100% - 50px))}.stage svg{max-height:630px}.page-title h1{font-size:29px}.problem,.ask{font-size:22px}.problem-panel{padding:18px 26px}.btn{min-height:46px;font-size:18px}.instruction,.answer-title{font-size:16px}.work-panel{padding:18px 26px}.brand{font-size:14px}}

/* Keep the answer controls within reach on small phones. */
.feedback:empty{display:none}
@media(max-width:480px){.stage svg{max-height:224px}.edge-word{display:none}.model-controls{gap:4px}.model-controls .btn{padding:6px 8px}.instruction{margin-top:6px}.stage-note{padding:5px 8px;min-height:29px}.readout{margin-top:5px}.page-title h1{font-size:19px}.brand{font-size:12px}.model-top{margin-bottom:5px}.top-nav{padding:6px 0}.support{margin-top:8px}.answer-line{margin-bottom:5px}}
@media(max-width:480px){.stage svg{max-height:206px}.stage .label-main{font-size:26px}.stage .label-small{font-size:21px}}
@media(max-width:480px){.brand{line-height:1.5}.lesson-nav{margin:6px 0 8px}.stage-note{line-height:1.45}.instruction{line-height:1.55}.model-top h2{line-height:1.5}}

/* Connect the movable diagram to the child's written arithmetic. */
.notebook{border:1px solid #b9ccbd;border-radius:12px;margin-bottom:14px;background:#fbfcf7}
.notebook>summary{cursor:pointer;padding:10px 12px;color:var(--deep);font-size:15px;font-weight:500}
.notebook>summary span{float:right;font-size:13px;color:var(--muted);font-weight:400}
.nb-body{padding:0 13px 14px}.nb-intro{font-size:14px;color:var(--muted);line-height:1.65;border-top:1px solid var(--line);padding-top:10px}
.nb-heading{display:flex;gap:9px;align-items:flex-start;margin:16px 0 10px}.nb-heading>span{font-size:13px;white-space:nowrap;color:#8c7136;background:#f7efd9;border-radius:6px;padding:1px 7px}.nb-heading h3{font-size:16px;font-weight:600;line-height:1.55}
.nb-numbers{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:9px}.nb-numbers>div{flex:1;min-width:85px;display:flex;flex-direction:column;border-left:3px solid #6e9c88;background:#ecf4ed;border-radius:0 7px 7px 0;padding:7px 9px}.nb-numbers b{font-size:24px;font-weight:500;line-height:1.35;font-variant-numeric:tabular-nums}.nb-numbers span{font-size:14px;line-height:1.55}.nb-show{font-size:14px;min-height:35px;padding:5px 10px}
.nb-words{font-size:15px;line-height:1.75;margin:12px 0;padding:8px 0;border-block:1px solid #d8e2d7;overflow-wrap:anywhere}
.nb-form label{font-size:14px;display:block;margin-bottom:5px}.nb-form input{width:100%;min-width:0;background:#fff;border:1px solid #9cbca9;border-radius:8px;font-size:20px;height:44px;padding:6px 10px;letter-spacing:.03em}.nb-form input::placeholder{font-size:14px;color:#738178;letter-spacing:0}
.nb-keys{display:flex;gap:5px;margin-top:7px}.nb-keys button{flex:1;border:1px solid #cad8cf;border-radius:6px;background:#fff;min-height:34px;font-size:19px;padding:0}.nb-keys button:hover{background:#e9f3eb}
.nb-check{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.nb-check .btn{font-size:14px;padding:6px 9px}.nb-message{font-size:14px;line-height:1.7;color:#8b652e;margin-top:9px;overflow-wrap:anywhere}.nb-message:empty{display:none}.nb-message.good{color:var(--deep)}
.nb-help{margin-top:10px;padding:10px 12px;background:#fff6df;border:1px solid #e4d3a6;border-radius:8px;font-size:14px;line-height:1.75}.nb-example{font-size:19px;font-weight:500;margin:7px 0;overflow-wrap:anywhere}.nb-help p+p{margin-top:7px}
.nb-nav{display:flex;justify-content:space-between;gap:7px;margin-top:14px}.nb-nav .btn{font-size:14px;padding:6px 9px}
.nb-summary{border-top:1px solid #c5d5c7;margin-top:15px;padding-top:13px;font-size:14px}.nb-summary h3{font-size:15px;font-weight:600}.nb-summary ol{padding-left:22px}.nb-summary li{margin:8px 0}.nb-summary li span,.nb-summary li strong{display:block}.nb-summary li strong{font-size:18px;font-weight:500;overflow-wrap:anywhere}.nb-talk{border-left:3px solid #ba9d58;background:#f7f0dc;padding:8px 10px;margin:12px 0}.nb-summary>.btn{margin-top:10px}
.readout strong.goal{font-size:14px;white-space:normal;text-align:right;line-height:1.5}
@media(min-width:851px) and (min-aspect-ratio:3/4){.model-panel{position:sticky;top:12px}}
@media(max-width:480px){.notebook{margin-bottom:10px}.notebook>summary{padding:8px 10px;font-size:14px}.nb-body{padding:0 10px 12px}.nb-numbers{gap:5px}.nb-numbers>div{min-width:75px;padding:6px}.nb-numbers b{font-size:23px}.nb-numbers span{font-size:14px}.nb-check .btn,.nb-nav .btn{min-height:38px}.nb-intro{font-size:14px}}

.practice-toc-entry{margin-top:22px;border:1px solid #b4c9b9;border-radius:15px;padding:17px 20px;background:#fffdf5}.practice-toc-entry h2{font:500 21px/1.6 var(--serif)}.practice-toc-entry p{font-size:14px;color:var(--muted);margin:5px 0 12px}.practice-toc-entry .pdf-links{display:flex;gap:8px;flex-wrap:wrap}.practice-toc-entry .btn.primary{font-size:15px}
