.direct-exercise{max-width:440px;margin:auto;padding:20px}.direct-exercise .math-question{font-size:clamp(44px,9vw,76px);margin:8px 0;line-height:1.2}.direct-exercise form{max-width:340px;margin:0 auto}.direct-exercise .tempo-info{margin:12px 0}.direct-exercise .keypad button{min-height:44px}.direct-exercise.success .auto-next-track{animation-duration:.45s}.direct-exercise.mistake .auto-next-track{animation-duration:1.1s}.math-home-reward{padding:30px;display:flex;flex-direction:column;gap:18px;justify-content:center}.math-home-reward>span{font-size:56px}.house-upgrade{display:flex;align-items:center;gap:24px;padding:25px;margin-bottom:24px}.house-stage-icon{font-size:76px}.house-room.house-stage-1{background:linear-gradient(#eee4d0,#fff7e9 80%,#c9ad86 80%)}.house-room.house-stage-2{background:linear-gradient(#e1eeea,#f9fbf6 80%,#b7cac1 80%)}.house-room.house-stage-3{background:linear-gradient(#eee8f7,#fffaf0 80%,#ceb77c 80%)}.house-stage-3 .house-window{border-color:#b99a48}.house-stage-2 .house-beams,.house-stage-3 .house-beams{background:#8b9c96}@media(max-width:650px){.direct-exercise{padding:22px 16px}.house-upgrade{align-items:flex-start;gap:12px;padding:20px}.house-stage-icon{font-size:45px}}

.course-rows{align-items:stretch}.course-row{display:flex;flex-direction:column;gap:12px}.course-row h3,.course-row p{margin:0}.course-row button{margin-top:auto;min-height:46px;white-space:normal;line-height:1.45}.row-practice-progress{display:block;width:100%;height:10px;appearance:none;border:0;border-radius:20px;overflow:hidden;background:#e0e9d8;accent-color:#478569}.row-practice-progress::-webkit-progress-bar{background:#e0e9d8;border-radius:20px}.row-practice-progress::-webkit-progress-value{background:#478569;border-radius:20px}.row-practice-progress::-moz-progress-bar{background:#478569;border-radius:20px}.row-encouragement{font-size:13px;line-height:1.6;min-height:42px}.row-confirmations{padding:12px 0}.row-confirmations>.label{font-size:8px;letter-spacing:1px;line-height:1.5;display:block;margin-bottom:10px}.row-confirmations>div{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.row-confirmations>div>span{background:#e8efe2;border-radius:10px;text-align:center;padding:8px 3px}.row-confirmations b,.row-confirmations small{display:block;font-size:12px}.row-confirmations small{margin-top:5px}.row-best{margin-bottom:4px}.fresh-round-note{font-size:12px}

.direct-exercise .feedback:empty{visibility:hidden}

.direct-exercise .numeric-keypad{grid-template-columns:repeat(3,minmax(0,1fr)) minmax(68px,1fr);gap:8px}.numeric-keypad [data-key="0"]{grid-column:1 / span 3}.numeric-keypad .keypad-enter{grid-column:4;grid-row:3 / span 2;height:auto;align-self:stretch;padding:8px 4px;font-size:14px}.numeric-keypad [data-key="C"],.numeric-keypad [data-key="⌫"]{font-size:17px}

.direct-exercise .math-feedback-slot{position:relative;height:52px;margin:0;overflow:hidden}
.direct-exercise .math-feedback-slot .feedback{height:52px;min-height:0;margin:0;padding:8px;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;white-space:nowrap;line-height:1.3;animation:math-feedback-in .12s ease-out}
.direct-exercise .math-feedback-slot .feedback strong{font-size:17px}
.direct-exercise .math-feedback-slot .success-check,.direct-exercise .math-feedback-slot .retry-heart{width:28px;height:28px;flex-shrink:0;font-size:22px;animation:none}
.direct-exercise .math-feedback-slot .earned-coin{animation:none;padding:4px 8px}
.direct-exercise .math-feedback-slot .auto-next{position:absolute;inset:auto 0 0;height:3px;min-height:0;padding:0}
.direct-exercise .math-feedback-slot .auto-next-track{margin:0;width:100%;max-width:none}
.direct-exercise .tempo-info{height:36px;min-height:36px;line-height:20px;padding:8px 12px;white-space:nowrap}
.direct-exercise .tempo-info:empty{visibility:hidden}
.direct-exercise .math-question{white-space:nowrap;font-size:clamp(28px,8vw,64px);font-variant-numeric:tabular-nums}
.direct-exercise.success h1,.direct-exercise.mistake{animation:none}
@keyframes math-feedback-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.direct-exercise .math-feedback-slot .feedback{animation:none}}

.direct-exercise .math-feedback-slot .feedback.correct{padding:4px;background:transparent;animation:none}
.direct-exercise .math-feedback-slot .feedback.correct .success-check{width:44px;height:44px;background:#397b58;box-shadow:0 0 0 5px #75c69433;animation:visual-confirm .24s ease-out}
.direct-exercise .success-check svg{width:32px;height:32px;fill:none;stroke:#fff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.direct-exercise .success-check path{stroke-dasharray:26;stroke-dashoffset:0;animation:check-draw .14s ease-out}
@keyframes check-draw{from{stroke-dashoffset:26}to{stroke-dashoffset:0}}
@keyframes visual-confirm{from{box-shadow:0 0 0 0 #75c69466}to{box-shadow:0 0 0 5px #75c69433}}
@media(prefers-reduced-motion:reduce){.direct-exercise .math-feedback-slot .feedback.correct .success-check,.direct-exercise .success-check path{animation:none}}

.chapter-position{font-size:12px;line-height:1.6;min-height:38px}.chapter-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:14px 0}.chapter-step{display:flex;flex-direction:column;align-items:center;gap:5px;padding:9px 2px;background:var(--cream);border:1px solid #c7d7c9;border-radius:9px;color:var(--ink);min-height:52px}.chapter-step span{font-size:10px;letter-spacing:-1px;color:#b68a31;white-space:nowrap}.chapter-step.passed{border-color:var(--green);background:var(--mint)}.chapter-step:disabled{opacity:.45}.chapter-count{font-size:11px;color:var(--muted);display:block;margin:0 0 14px}.course-row>button{white-space:normal;line-height:1.5}.chapter-step:focus-visible{outline:3px solid var(--gold);outline-offset:2px}html[data-theme=dark] .chapter-step{background:#16271e;border-color:#708575}html[data-theme=dark] .chapter-step.passed{background:#345b47}html[data-theme=dark] .chapter-step span{color:#e5bd57}

.direct-exercise .direct-question{display:grid;grid-template-columns:minmax(0,1fr);row-gap:4px;margin:0 auto 6px;max-width:340px}.direct-question .math-question{grid-row:1;grid-column:1;margin:8px 0}.direct-exercise .direct-question .tempo-info{grid-row:2;grid-column:1;align-self:center;margin:0}.direct-exercise .direct-question .math-feedback-slot{grid-row:2;grid-column:1;align-self:center;width:100%}.direct-exercise.success .tempo-info,.direct-exercise.mistake .tempo-info{visibility:hidden}.direct-exercise input{height:56px}.direct-exercise .numeric-keypad{margin-top:12px;gap:7px}.direct-exercise .direct-answer label{margin-bottom:6px}.direct-exercise .keypad-enter{font-size:13px}@media(max-width:480px){.direct-exercise{padding:18px 16px}.direct-exercise .math-question{font-size:clamp(32px,9vw,54px)}}

.course-row.chapter-complete{border-color:var(--green)}.chapter-done{display:block;margin-top:auto;padding:13px 8px;text-align:center;font-size:12px;color:var(--green);border:1px solid #73967c;border-radius:10px;background:var(--mint)}
