/* Optional story practice. The ordinary reader and teacher surfaces stay independent. */
.story-practice{margin:24px 0;padding:20px;border:1px solid var(--border);border-radius:20px;background:var(--surface-2);color:var(--text);scroll-margin-top:100px}
.story-practice h2{font-size:clamp(26px,3vw,36px);margin:12px 0;overflow-wrap:anywhere;scroll-margin-top:100px}
.story-practice h3{font-size:19px;margin:12px 0}
.story-practice p{line-height:1.65}
.story-practice button,.story-practice a,.story-practice input{min-height:44px;min-width:44px;overflow-wrap:anywhere}
.story-practice button:focus-visible,.story-practice a:focus-visible,.story-practice h2:focus{outline:3px solid var(--text);outline-offset:3px}
.sp-toolbar,.sp-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.sp-toolbar{justify-content:space-between}.sp-toolbar .eyebrow{margin:0}
.sp-toolbar-actions{display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
.story-practice:fullscreen{box-sizing:border-box;width:100%;height:100%;max-width:none;margin:0;padding:clamp(16px,3vw,40px);border:0;border-radius:0;overflow:auto;background:var(--bg);color:var(--text)}
.sp-progress{color:var(--muted);font-size:14px}
.sp-spread{border-radius:12px;overflow:clip;min-height:0;border:1px solid var(--border)}
.sp-art{width:100%;height:100%;object-fit:cover;min-width:0;align-self:stretch}
.sp-spread .paper{padding:24px;justify-content:center}
.sp-spread .story-text p{font:clamp(20px,1.7vw,24px)/1.6 Georgia,serif;margin:0 0 16px}
.story-practice .sp-blank{display:inline-block;width:4.2em;max-width:100%;padding:2px 7px;margin:2px;min-width:72px;background:#fff4c7;color:#29382b;border:2px solid #75602a;border-radius:6px;font:inherit;line-height:1.2;vertical-align:baseline;text-align:center;scroll-margin-block:210px 32px}
.story-practice .sp-blank::placeholder{color:#75602a;opacity:1}
.story-practice .sp-blank:focus-visible{outline:3px solid #29382b;outline-offset:3px}
.story-practice .sp-blank.sp-is-correct{background:#dff3e4;color:#17452a;border-color:#4d8b61}
.sp-result{padding:16px 0;border-bottom:1px solid var(--border)}
.sp-sentence{font-size:clamp(20px,2vw,25px);overflow-wrap:anywhere}
.sp-input-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:16px}
.sp-input-tools:empty{margin:0}.sp-input-tools p{margin:0;max-width:65ch;font-size:14px;color:var(--muted)}
.sp-feedback{position:sticky;top:80px;z-index:3;padding:14px 18px;margin:14px 0;border:1px solid transparent;border-radius:12px;font-size:17px;line-height:1.6}
.sp-feedback:empty{min-height:0;padding:0;margin:0;border:0}
.sp-feedback.sp-help{background:#fff1b5;color:#503b08;border-color:#b98512}
.sp-feedback.sp-success{background:#dff3e4;color:#17452a;border-color:#4d8b61;font-weight:700}
.sp-spread .paper>.sp-feedback{flex-shrink:0;margin:0 0 18px;font-size:16px;line-height:1.5}
.sp-spread .paper>.sp-feedback:empty{margin:0}
main:fullscreen .sp-feedback,.story-practice:fullscreen .sp-feedback{top:12px}
.sp-navigation{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}
.sp-pages{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;max-width:500px}
.sp-pages [aria-current=page]{outline:2px solid var(--text);outline-offset:1px;font-weight:800}
.sp-actions{margin-top:20px}
.story-practice-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.55fr);align-items:center;gap:32px;margin:4px 0 32px;padding:32px;border:1px solid #a77c2e;border-inline-start:5px solid #f5ca65;border-radius:20px;background:radial-gradient(ellipse at top right,#c8942b24,transparent 70%),linear-gradient(125deg,#f5ca6514,var(--surface-2));box-shadow:0 12px 32px #0002,inset 0 1px 0 #ffe2a026}
.story-lesson .story-practice-entry .story-practice-kicker{display:flex;align-items:center;gap:9px;margin:0 0 12px;color:#f5ca65;font-size:11px;font-weight:800;letter-spacing:.12em;line-height:1.5;text-transform:uppercase}
.story-practice-entry h2{font-size:clamp(29px,3.2vw,38px);line-height:1.12;margin:0 0 14px}
.story-practice-invitation>p:last-child{max-width:60ch;margin:0;font-size:15px}
.story-practice-entry strong{color:var(--text)}
.story-practice-invitation-actions{display:grid;gap:12px;justify-items:start}
.story-practice-entry #start-story-practice{display:inline-flex;align-items:center;justify-content:center;gap:14px;width:100%;min-height:52px;padding:14px 18px;border:1px solid #ffda80;border-radius:13px;background:#f5ca65;color:#251b08;box-shadow:0 4px 16px #0002;font-size:15px;font-weight:800;line-height:1.4;text-align:center;white-space:normal}
.story-practice-entry #start-story-practice::after{content:'→';font-size:21px;line-height:1}
.story-practice-entry #start-story-practice:hover{background:#ffdc89;border-color:#ffe8b6;box-shadow:0 6px 20px #0003}
.story-practice-entry #start-story-practice:focus-visible{outline:3px solid var(--text);outline-offset:4px}
.story-lesson .story-practice-entry .story-practice-note{margin:0;font-size:13px;line-height:1.6;color:var(--text)}
.story-lesson .story-practice-entry .story-practice-session-note{margin:0;font-size:11px;line-height:1.6;color:var(--muted)}
:root[data-theme=light] .story-practice-entry{border-color:#b68a35;border-inline-start-color:#a97712;background:radial-gradient(ellipse at top right,#f5ca653d,transparent 70%),linear-gradient(125deg,#fff7e5,#fffdf7);box-shadow:0 8px 24px #64470b0d}
:root[data-theme=light] .story-lesson .story-practice-entry .story-practice-kicker{color:#805a09}
@media(max-width:760px){.story-practice-entry{grid-template-columns:1fr;gap:22px;padding:24px 20px;margin-bottom:28px}.story-practice-invitation-actions{gap:10px}.story-practice-entry h2{font-size:31px}}
@media(max-width:760px){.story-practice{padding:14px 10px}.sp-spread{grid-template-columns:1fr}.sp-art{aspect-ratio:8/7;height:auto;max-height:420px}.sp-navigation{justify-content:center}.sp-pages{order:3;width:100%}.sp-spread .paper{padding:22px 18px}.sp-toolbar{align-items:flex-start}.sp-feedback{top:76px;font-size:15px}}
