.homework-work{max-width:900px;margin-inline:auto}
.homework-work .card{margin-bottom:20px}
.homework-work h2{line-height:1.45;overflow-wrap:anywhere}
.homework-preline{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.homework-calculation{font-size:1.15em;font-weight:650;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:#f1f3ec;border-radius:8px}
.homework-steps{padding-left:28px}
.homework-steps li{padding-left:5px;margin-block:12px}
.homework-example,.homework-consent{padding:20px;margin-top:20px;border:1px solid #b5c4aa;border-radius:12px;background:#f4f7ef}
.homework-example h3{font-size:1.15rem;line-height:1.5}
.homework-import-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.homework-work textarea{font-size:1rem;line-height:1.6;min-height:100px}
.homework-work #homework-select-form{display:flex;align-items:end;gap:12px;margin-top:20px}
.homework-work #homework-select-form .field{flex:1;margin-bottom:0;min-width:0}
.homework-work .actions{flex-wrap:wrap}
.homework-work .hint{margin-block:16px}
#homework-status:empty{display:none}
#homework-status{padding:12px;border-radius:8px;background:#f1f3ec;line-height:1.5}
@media(max-width:640px){.homework-import-grid{grid-template-columns:1fr}.homework-work #homework-select-form{display:block}.homework-work #homework-select-form button{margin-top:10px}.homework-work .toolbar{flex-wrap:wrap;gap:10px}.homework-example,.homework-consent{padding:14px}.homework-work .actions .btn{max-width:100%;white-space:normal}}

.homework-original-preview img{display:block;max-width:100%;height:auto;margin:12px auto;border:1px solid #b5c4aa;border-radius:8px}

/* A calm, playful task card shared by every subject. */
.lesson-launch{background:linear-gradient(120deg,#f1f7eb,#fbfaf3);border-color:#b5c4aa}
.homework-lesson{max-width:760px;margin-inline:auto;border:1px solid #b5c4aa;box-shadow:0 8px 28px #344a2410;padding:28px}
.lesson-top{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.lesson-progress{display:flex;gap:7px;align-items:center;margin:24px 0}
.lesson-progress span{height:7px;flex:1;background:#e1e7dc;border-radius:8px}
.lesson-progress span.active{background:#91ab79}.lesson-progress span.done{background:#42613a}
.lesson-progress strong{font-size:.85rem;margin-left:8px;white-space:nowrap;color:#56614f}
.homework-lesson h2{font-size:clamp(1.4rem,4vw,2rem);margin-block:18px 24px;line-height:1.45;white-space:pre-wrap}
.lesson-introduction{line-height:1.7;color:#52604a}
.lesson-context{padding:14px 18px;background:#f3f5ed;border-radius:10px;white-space:pre-wrap;line-height:1.7}
.lesson-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-block:20px}
.lesson-choice{display:flex;align-items:center;gap:12px;min-height:76px;padding:16px;text-align:left;border:2px solid #ced7c7;background:#fafcf8;border-radius:14px;color:#25351f;cursor:pointer;font:inherit;line-height:1.5;overflow-wrap:anywhere}
.lesson-choice:hover:not(:disabled){border-color:#6e8c5a;background:#f0f6e9;transform:translateY(-1px)}
.lesson-choice:focus-visible{outline:3px solid #826630;outline-offset:3px}
.lesson-choice:disabled{opacity:1;cursor:default}
.lesson-choice.is-selected{border-color:#bd965b;background:#fff9ed}
.lesson-choice.is-correct{border-color:#4c793a;background:#edf7e6}
.lesson-letter{display:flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border-radius:50%;background:#e7eddf;font-size:.75rem;font-weight:700}
.lesson-check{margin-left:auto;color:#426b32;font-weight:700;font-size:1.4rem}
.lesson-feedback,.lesson-hint{padding:18px;border-radius:12px;margin-block:18px;line-height:1.65}
.lesson-feedback.is-correct{background:#edf7e6;border-left:4px solid #54803e}
.lesson-feedback.is-retry{background:#fff8e9;border-left:4px solid #bc9653}
.lesson-feedback p:last-child,.lesson-hint p:last-child{margin-bottom:0}
.lesson-hint{background:#f1f4ec;border:1px solid #d0d9c7}
.lesson-visual{margin:16px 0;max-width:100%;overflow:auto}
.lesson-visual figcaption{margin-top:12px;font-size:.95rem}
.lesson-dot-rows{display:flex;flex-direction:column;gap:10px;padding:12px;background:#fff;border-radius:10px;width:fit-content;max-width:100%}
.lesson-dot-rows>div{display:flex;gap:8px;flex-wrap:wrap}
.lesson-dot-rows i{display:block;width:15px;height:15px;border-radius:50%;background:#76965b;flex:none}
.lesson-fraction{display:flex;max-width:100%;width:360px;border:2px solid #526e41;border-radius:8px;overflow:hidden}
.lesson-fraction i{height:58px;flex:1;border-right:1px solid #526e41;background:#fff}.lesson-fraction i:last-child{border:0}.lesson-fraction .shaded{background:#99b77d}
.lesson-numberline{display:flex;justify-content:space-between;gap:6px;border-bottom:2px solid #66844f;padding:10px 2px;width:100%;min-width:260px}
.lesson-numberline span{padding:5px;text-align:center;min-width:18px}.lesson-numberline .marked{background:#5f8049;color:#fff;border-radius:50%;font-weight:700}
.lesson-finished{text-align:left}.lesson-sprout{display:block;font-size:2.5rem;margin-block:16px}
.homework-scratch>summary{font-weight:650}.homework-scratch>.card{margin-top:16px}
.homework-teacher .section-head{align-items:center}.lesson-teacher-answer{margin-top:20px;padding:18px;background:#f5f7ef;border-radius:12px}
.homework-lesson [tabindex="-1"]:focus{outline:none}
@media(max-width:640px){.homework-lesson{padding:18px}.lesson-choices{grid-template-columns:1fr}.lesson-choice{min-height:64px}.lesson-dot-rows{padding:8px}.lesson-dot-rows i{width:12px;height:12px}.lesson-dot-rows>div{gap:6px}.lesson-top .pill{font-size:.8rem}}
@media(prefers-reduced-motion:reduce){.lesson-choice:hover:not(:disabled){transform:none}}

/* Calm, readable review states; no automatic motion or audio. */
.homework-quota{border-top:1px solid var(--line,#d8e1d7);padding-top:.8rem;line-height:1.6}
.homework-quality-review{border:2px solid #bdd3bc;background:#f5f9f3}
.homework-quality-question{padding:1rem 0;border-bottom:1px solid #d8e1d7}
.homework-quality-question h4{font-size:1.05rem;line-height:1.5;margin:.25rem 0 .7rem}
.homework-quality-question ol{padding-left:1.6rem;line-height:1.7}
.homework-quality-review .checkbox{margin:1rem 0}
.lesson-quality-pause{border:2px solid #d1c58d;background:#fffdf4}
.lesson-report{display:block;margin-top:1.25rem;text-align:left;min-height:44px}
.teacher-chat{margin-top:20px;border-top:1px solid #bdcbb4;padding-top:20px}
.teacher-conversation{display:grid;gap:18px;margin:20px 0}
.teacher-turn{overflow-wrap:anywhere}
.teacher-student{margin-left:22px;padding:14px 16px;background:#e9efdf;border-radius:14px}
.teacher-reply{margin-right:22px;padding:18px;background:#fffefa;border:1px solid #d6dfcc;border-radius:14px;line-height:1.7}
.teacher-reply ol{padding-left:24px}.teacher-reply li{padding-bottom:8px}
.teacher-chat textarea{font-size:1rem;line-height:1.6}
.teacher-chat .text-btn{min-height:44px;text-align:left}
.teacher-history-row{border-bottom:1px solid #d6dfcc;padding:14px 0}
.teacher-history-row p{margin-bottom:8px}.teacher-history-row button{margin-right:12px}
#teacher-chat-status:not(:empty){padding:12px;background:#eef3e6;border-radius:9px;margin-top:14px}
@media(max-width:640px){.teacher-student{margin-left:10px}.teacher-reply{margin-right:0;padding:14px}.teacher-chat .actions{align-items:stretch}.teacher-chat .actions .btn{flex-basis:45%;min-height:52px}}
