:root{color-scheme:light;--ink:#193b42;--green:#24654f;--line:#cbdcd1;--cream:#fffaf0}*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--ink);font:18px/1.5 system-ui,-apple-system,sans-serif}main{max-width:1060px;margin:0 auto;padding:24px;border:1px solid var(--line);border-radius:24px;background:#f8fbf6}h1{font-size:clamp(1.45rem,5vw,2rem);line-height:1.2;margin:0 0 14px}h2{font-size:1.35rem;margin:10px 0}p{margin:12px 0}button,select{font:inherit;color:inherit}button{min-height:48px;min-width:48px;background:white;border:2px solid #8da99e;border-radius:12px;padding:10px 16px;font-weight:700;cursor:pointer;line-height:1.3}button:hover{background:#e8f4e9}button:disabled{opacity:.55;cursor:default}button[aria-pressed=true],.primary{background:var(--green);color:white;border-color:var(--green)}button:focus-visible,select:focus-visible,svg:focus-visible{outline:3px solid #145b9d;outline-offset:3px}select{width:100%;min-height:48px;background:#fff;border:1px solid #8da99e;border-radius:8px;padding:8px}label{display:block;font-weight:650;margin-bottom:8px}.eyebrow{font-size:.77rem;letter-spacing:.08em;font-weight:800;text-transform:uppercase;color:#446956;margin:0 0 8px}.actions,.choices,.tabs{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:16px 0}.choices button{font-size:1.6rem;min-width:58px}.lab-header{display:flex;justify-content:space-between;align-items:center;gap:16px}.lab-header img{width:52px;height:72px;object-fit:contain}.controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.scene{position:relative;min-height:220px;border:2px solid #c5d5be;border-radius:22px;background:#fff9e9;display:flex;justify-content:center;align-items:center;gap:10px;padding:22px;margin:16px 0;overflow:hidden}.scene.scatter{display:block;height:280px}.scene.scatter .object{position:absolute;transform:translate(-50%,-50%);width:68px;height:78px;padding:4px}.scene.triangle{display:grid;grid-template-columns:repeat(3,72px);justify-content:center}.scene.triangle .object:first-child{grid-column:2}.scene.triangle .object:nth-child(2){grid-column:1}.object{display:inline-flex;justify-content:center;align-items:center;flex-direction:column;background:#fffdf6;border:2px solid transparent;min-width:0;width:92px;height:106px;padding:6px;border-radius:14px}.object svg{width:100%;height:100%;max-width:80px}.object[aria-pressed=true]{background:#e2f0df;color:#214f3f;border:2px solid #28644f}.object[aria-pressed=true]::after{content:'✓';font-size:18px;line-height:1}.empty-tray{width:160px;height:100px;border:7px solid #b89860;border-radius:22px;background:#f8efd9}.status{min-height:32px;font-weight:650;border-radius:10px}.status:not(:empty){padding:12px 16px;background:#edf2e8}.number-readout{font-size:2rem;font-weight:800;text-align:center}.hint{background:#fff0ca!important}.picture-option{display:flex;flex-direction:column;justify-content:space-between;gap:8px;flex:1;min-width:130px;max-width:290px}.picture-option .small-set{display:flex;flex-wrap:wrap;justify-content:center;min-height:66px;align-items:center}.small-set svg{width:43px;height:53px}.large-digit{font-size:4rem;font-weight:800;text-align:center}.sequence{display:flex;justify-content:center;gap:18px;font-size:2rem;font-weight:750}.trace-layout{display:grid;grid-template-columns:1fr 1.4fr;gap:22px}.trace-model svg{width:160px;height:210px;max-width:100%;display:block;margin:auto}.trace-model{text-align:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px}.draw-board{position:relative;min-width:0}.draw-board>svg{display:block;width:100%;height:320px;border:2px solid var(--line);border-radius:16px;background:white;touch-action:none}.draw-board svg path{pointer-events:none}.trace-steps{font-size:1rem}.trace-steps li{margin:10px 0}.session-progress{font-size:.95rem;color:#446956}.shop{display:flex;align-items:center;gap:18px;padding:16px;border:1px solid var(--line);background:#fff;border-radius:18px}.shop img{width:62px;height:85px;object-fit:contain}.stamp{font-size:1.1rem;font-weight:750;color:#24654f}.self-check{display:grid;gap:10px}.self-check label{padding:12px;background:white;border:1px solid var(--line);border-radius:12px;font-weight:500}.self-check input{width:22px;height:22px;vertical-align:middle;margin-right:10px}.notice{font-size:1rem;color:#476361}.hidden,[hidden]{display:none!important}@media(max-width:600px){main{padding:18px 12px;border-radius:18px}.controls,.trace-layout{grid-template-columns:1fr}.scene{padding:12px;gap:2px;min-height:190px}.object{width:18%;height:86px;padding:3px}.object svg{min-width:35px}.choices{gap:7px}.choices button{min-width:44px;padding:8px 10px}.picture-option{min-width:100%;max-width:none}.picture-option .small-set{gap:8px}.trace-model{display:flex;align-items:center;justify-content:center;gap:16px}.trace-model svg{width:110px;height:160px;margin:0}.draw-board>svg{height:280px}.shop{padding:12px}.shop p{margin:0}.sequence{gap:12px}.actions button{flex:1}.scene.scatter .object{width:54px;height:68px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.ten-frame{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;max-width:620px;margin:22px auto;padding:16px;border:2px solid #b5c8ae;border-radius:20px;background:#fff9e9}.frame-cell{position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:1;min-width:0;min-height:44px;background:white;border:2px solid #c8d1c5;border-radius:10px;padding:4px!important}.frame-cell svg{width:100%;height:100%;max-width:78px;max-height:78px;pointer-events:none}.frame-cell[aria-pressed=true]:after{content:'✓';position:absolute;right:2px;top:0;background:#24674d;color:white;border-radius:50%;font-size:15px;line-height:20px;width:20px}.frame-cell[data-demo]:before{content:attr(data-demo);position:absolute;left:2px;top:0;font-size:18px;font-weight:bold;color:#744023}.show-empty .frame-cell:not(.filled){outline:3px dashed #9a5521;outline-offset:-5px}.free{display:block;position:relative;height:310px;max-width:650px}.free .frame-cell{position:absolute;transform:translate(-50%,-50%);width:56px;height:60px;min-height:0;background:transparent;border-color:transparent}.free.row{height:170px}.free.row .frame-cell{width:7.6%;max-height:70px;min-height:0;padding:0!important}.picture-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.picture-option{display:block;padding:10px!important;min-width:0}.picture-option .ten-frame{padding:5px;gap:2px;margin:10px 0 0;border-radius:9px}.picture-option .frame-cell{min-height:0;border-width:1px;border-radius:3px;padding:1px!important}.trace-layout .ten-frame{margin:0}.trace-model svg{width:100%;max-height:310px}.writing-zones{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}.writing-zones .draw-board{height:auto;min-width:0}.writing-zones svg{width:100%;max-height:320px;touch-action:none}.children-row{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px}.children-row>span{display:block;width:45px;height:70px}.children-row svg{width:100%;height:100%}.choices{flex-wrap:wrap}select{max-width:100%}.self-check{display:flex;align-items:center;gap:10px;margin:16px 0}.self-check input{width:24px;height:24px}
@media(max-width:600px){.ten-frame{padding:10px;gap:3px;border-radius:14px}.frame-cell{border-width:1px;border-radius:6px;min-height:40px;padding:2px!important}.free{height:270px}.free .frame-cell{width:42px;height:48px}.picture-choices{grid-template-columns:1fr}.picture-option .ten-frame{max-width:280px;margin:8px auto}.picture-option .frame-cell{min-height:30px}.trace-layout{grid-template-columns:1fr}.trace-layout .trace-model{max-width:230px;margin:auto}.trace-layout .ten-frame{margin:0 auto}.writing-zones{grid-template-columns:1fr}.choices button{min-width:44px}.controls{grid-template-columns:1fr}.trace-steps{padding-left:22px}}
@media(max-width:600px){.free.row{height:auto;min-height:180px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-content:center}.free.row .frame-cell{position:relative;left:auto!important;top:auto!important;transform:none;width:100%;height:auto;aspect-ratio:1;min-height:40px}}
