.math-main [hidden]{display:none!important}
.math-main{max-width:1100px}
.math-main header{margin-bottom:24px}
.back-reading{font-size:16px;color:#265bda;text-decoration:none;padding:12px 0}
.math-settings{display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px;margin-bottom:24px;padding:16px 20px;background:#dfe9f9;border-radius:15px}
.math-settings label{display:flex;flex-direction:column;gap:6px;font-size:14px}
.math-settings select,.math-settings input,.dice-editor select{font:inherit;color:#173257;background:white;border:2px solid #a9bfdc;border-radius:9px;min-height:48px;padding:8px 12px;font-size:16px}
.math-settings select{min-width:240px;max-width:100%}.math-settings input{width:100px}
.math-main input:focus-visible,.math-main select:focus-visible{outline:3px solid #dd8a00;outline-offset:3px}
.primary-button,.secondary-button,.read-math{font:inherit;min-height:48px;border-radius:11px;padding:11px 20px;font-size:17px;touch-action:manipulation}
.primary-button{border:2px solid #265bda;background:#265bda;color:#fff;box-shadow:0 3px 0 #1743ac}
.secondary-button,.read-math{border:2px solid #bfd0e7;background:white;color:#264b7e}
.primary-button:hover{background:#1f4fc5}.secondary-button:hover,.read-math:hover{background:#eaf1ff}.read-math:disabled{opacity:.45}
.math-exercise{background:#fff;border:1px solid #d8e3f2;border-radius:23px;padding:23px 28px 20px;box-shadow:0 6px 0 #dee7f4}
.math-meta{display:flex;justify-content:space-between;gap:20px;color:#526681;font-size:14px}
#math-counter{white-space:nowrap;font-variant-numeric:tabular-nums}
.math-progress{height:5px;background:#e8effa;border-radius:3px;margin:13px 0 20px;overflow:hidden}.math-progress span{display:block;height:100%;background:#edb433;transition:width .2s}
.math-exercise h1{font-size:25px;line-height:1.45;font-weight:400;margin:0 0 14px;max-width:880px}.math-exercise h1:focus{outline:none}
.math-voice{display:flex;align-items:center;gap:12px 20px;flex-wrap:wrap;margin-bottom:22px}.math-voice label{display:flex;align-items:center;gap:8px;font-size:15px;min-height:44px}.math-voice input{width:20px;height:20px;accent-color:#265bda}.math-voice span{font-size:13px;color:#526681}
.math-instruction{font-size:15px;color:#526681;margin:0 0 14px}.math-subquestion{font-size:18px;margin:20px 0 12px}
.select-pool{display:grid;grid-template-columns:repeat(5,64px);gap:18px;justify-content:center;padding:10px 0 25px}
.select-token{width:64px;height:64px;border:3px solid #7894ba;background:#fff;border-radius:50%;position:relative}
.select-token.coloured{background:#edb433;border-color:#b46a00}.select-token.coloured::after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:#664000;font-size:30px}
.counter-grid{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center}
.count-token{display:inline-grid;place-items:center;flex:none;width:48px;height:48px;border:2px solid #265bda;background:#265bda;border-radius:50%;padding:0;position:relative}
.count-token.counted{box-shadow:0 0 0 3px #e6a700;background:#87b6f4;border-color:#345e94}
.food-token{background:#fff;border:1px solid #dce6f5;border-radius:9px;font-size:30px}
.food-token.counted{background:#fff4c6}
.frames{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;padding:10px 0}
.ten-frame{display:grid;grid-template-columns:repeat(5,48px);grid-template-rows:repeat(2,48px);border:2px solid #6885ad;background:#f8fbff}
.frame-cell{display:grid;place-items:center;border:1px solid #a3b8d5}
.frame-cell .count-token{width:100%;height:100%;border:0;background:transparent;border-radius:0;box-shadow:none}
.frame-cell .count-token::before{content:'';width:27px;height:27px;border-radius:50%;background:#265bda}
.frame-cell .count-token.counted::before{background:#87b6f4;box-shadow:0 0 0 3px #dc9900}
.dice-row{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;padding:10px 0 18px}
.die{display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);align-items:center;justify-items:center;gap:5px;width:96px;height:96px;padding:12px;border:3px solid #728bae;background:#f7faff;border-radius:17px}
.pip{display:block;width:16px;height:16px;background:#173257;border-radius:50%}.empty-pip{width:16px;height:16px}
.number-answer{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:15px;color:#526681;margin:16px 0}
.number-answer input{width:120px;height:70px;text-align:center;font:inherit;font-size:36px;color:#173257;border:2px solid #a9bfdc;border-radius:12px;background:#f8fbff}
.number-answer input.active-answer{border-color:#265bda;background:#eef4ff}
.number-name{text-align:center;font-size:43px;color:#173257;padding:10px;line-height:1.4}
.choice-row,.group-choices,.player-choices,.line-choices,.story-comparison{display:flex;gap:13px;flex-wrap:wrap;justify-content:center}
.choice-button{border:2px solid #bfd0e7;background:#f8fbff;color:#173257;min-height:55px;min-width:90px;border-radius:13px;padding:14px 18px;position:relative;font-size:18px}
.choice-button.chosen{border-color:#265bda;background:#e7efff;box-shadow:0 0 0 2px #265bda}
.choice-button.chosen::after{content:'✓';position:absolute;right:7px;top:5px;background:#265bda;color:white;font-size:14px;line-height:24px;width:24px;height:24px;border-radius:50%;text-align:center}
.reference{text-align:center;margin-bottom:15px;background:#eef4fd;border-radius:14px;padding:12px}.reference strong{font-weight:400;font-size:16px}
.group-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.group-choice{padding:14px 8px}.group-choice>span{font-size:15px}.group-choice .ten-frame{grid-template-columns:repeat(5,26px);grid-template-rows:repeat(2,26px)}
.group-choice .frame-cell .count-token::before{width:18px;height:18px}
.group-choice .frames{gap:5px;pointer-events:none}
.number-sequence{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:17px;padding:10px 0}
.number-sequence .number-answer{margin:0}.number-tile{display:grid;place-items:center;width:108px;min-height:80px;background:#e7efff;border-radius:15px;font-size:40px}.sequence-arrow{font-size:30px;color:#7894ba}
.line-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.line-choices .choice-button{padding:14px}
.line-choices svg{width:100%;height:130px;max-height:130px;min-height:0}.line-choices path{fill:none;stroke:#173257;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.count-on{display:flex;gap:26px;align-items:center;justify-content:center;margin:10px 0 20px}.hidden-box{background:#dfe9f9;border:2px solid #9ab5dd;border-radius:17px;padding:14px 24px;max-width:230px;text-align:center}.hidden-box strong{display:block;font-size:48px;font-weight:400}.hidden-box span{font-size:14px}.count-on .counter-grid{max-width:330px}
.dice-editors{display:flex;justify-content:center;gap:28px;margin:10px 0}.dice-editor label{display:flex;align-items:center;gap:10px;margin-top:12px}.dice-editor select{width:70px}
.player-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.player-choice{padding:15px 8px}.player-choice strong{font-weight:400}.player-choice .die{width:76px;height:76px;padding:9px;gap:2px}.player-choice .pip,.player-choice .empty-pip{width:12px;height:12px}.player-choice .dice-row{gap:7px;padding-bottom:0}
.story-groups{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.story-group{background:#f3f7fd;border:1px solid #d8e3f2;border-radius:12px;padding:12px 7px;text-align:center}.story-group strong{display:block;font-weight:400;font-size:17px}.story-group>span{font-size:13px;color:#526681}.story-group .counter-grid{gap:5px;margin-top:10px}.story-group .food-token{width:44px;height:44px;font-size:26px}
.teacher-given{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;background:#fff4c9;border-radius:11px;padding:14px;margin:15px 0;font-size:16px}.teacher-given strong{font-weight:400}.story-answers{display:flex;justify-content:center;gap:35px}.story-comparison{flex-direction:column;align-items:stretch}.story-comparison .choice-button{text-align:left;padding-right:40px;font-size:16px}
.math-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;max-width:290px;margin:15px auto 0}.math-keypad button{min-height:49px;border:1px solid #a9bfdc;border-bottom-width:3px;border-radius:9px;background:#f1f6ff;color:#173257;font-size:20px;padding:7px}.math-keypad button:nth-child(10){font-size:14px}.math-keypad button:active{background:#dfe9ff}
.math-feedback{min-height:28px;font-size:18px;margin:20px 0 10px;line-height:1.5}.math-feedback.correct{color:#14673e}.math-feedback.try-again{color:#744900}
.math-hint{padding:14px 17px;border-radius:11px;background:#fff4c9;color:#674500;font-size:16px;line-height:1.55;margin-bottom:18px}
.math-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.math-small-actions{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;margin-top:15px}.math-small-actions button{border:0;background:transparent;color:#526681;font-size:14px;min-height:44px;padding:5px 0}
.math-footer{display:block;margin-top:24px;font-size:14px;line-height:1.7}.math-footer span{white-space:nowrap}.math-finish{text-align:center;padding:35px 28px}.math-finish .math-actions{justify-content:center;margin-top:24px}.finish-symbol{display:inline-grid;place-items:center;width:76px;height:76px;border-radius:50%;background:#d7f2e3;color:#14673e;font-size:50px;margin-bottom:18px}.math-finish p{font-size:18px;line-height:1.6}
@media(max-width:760px){.math-main{padding:20px}.math-settings{padding:13px;gap:10px}.math-settings select{min-width:190px}.math-exercise{padding:20px}.math-exercise h1{font-size:22px}.story-groups{grid-template-columns:repeat(3,minmax(0,1fr))}.line-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.player-choice .dice-row{flex-direction:column;align-items:center}.group-choices{gap:9px}.group-choice .ten-frame{grid-template-columns:repeat(5,18px);grid-template-rows:repeat(2,22px)}.group-choice .frame-cell .count-token::before{width:13px;height:13px}}
@media(max-width:480px){.math-main{padding:18px 13px}.math-main header{gap:12px}.back-reading{font-size:13px}.math-settings label:first-child{width:100%}.math-settings select{width:100%;min-width:0}.math-exercise{padding:18px 14px}.math-exercise h1{font-size:20px}.select-pool{grid-template-columns:repeat(5,48px);gap:12px}.select-token{width:48px;height:48px}.math-meta{font-size:12px}.math-voice{gap:6px 14px}.math-voice span{flex-basis:100%}.group-choices{grid-template-columns:1fr}.group-choice .ten-frame{grid-template-columns:repeat(5,28px);grid-template-rows:repeat(2,28px)}.group-choice .frame-cell .count-token::before{width:19px;height:19px}.group-choice .frames{flex-wrap:nowrap}.number-sequence{gap:8px}.number-tile{width:65px;min-height:66px;font-size:32px}.number-sequence .number-answer input{width:75px;height:66px;font-size:30px}.sequence-arrow{font-size:23px}.count-on{flex-direction:column;gap:15px}.player-choices{grid-template-columns:1fr}.player-choice .dice-row{flex-direction:row}.story-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.story-answers{gap:20px}.number-name{font-size:34px}.primary-button,.secondary-button,.read-math{font-size:15px;padding:10px 14px}.math-feedback{font-size:16px}}
.position-relative{max-width:82px;text-align:center;font-size:16px;color:#526681}.position-pair{margin-bottom:20px}.position-choices .choice-button{min-width:140px;min-height:60px;font-size:22px}.position-number-line{display:flex;flex-wrap:wrap;gap:6px;margin-top:15px}.position-number-line span{display:grid;place-items:center;min-width:32px;height:36px;background:#fff;border:1px solid #d5bf89;border-radius:6px;font-size:16px}.position-number-line .asked-number{background:#265bda;border-color:#265bda;color:white;font-weight:700}.position-number-line .reference-number{background:#edb433;border-color:#b46a00;color:#533500;font-weight:700}
.math-drawing{display:block;width:100%;max-width:500px;height:auto;margin:10px auto 22px}.jump-drawing{max-width:650px;font-family:inherit}.spatial-choices .choice-button{min-width:110px;text-transform:none}.math-hint .jump-drawing{margin:4px 0 0}@media(max-width:480px){.spatial-choices{gap:10px}.spatial-choices .choice-button{min-width:90px;padding:12px}.jump-drawing{min-height:120px}}

.jump-scroll{max-width:100%;overflow-x:auto}.jump-scroll .jump-drawing{width:600px;min-width:600px;max-width:none}

.story-group.teacher-contribution{background:#fff4c9;border-color:#e4ca76}
.junior-spatial-image{display:block;width:100%;height:auto;max-width:500px;margin:auto;border-radius:12px}
