@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,650&display=swap');

:root{font-family:'DM Sans',ui-sans-serif,system-ui,sans-serif;color:#172727;background:#f6f3ed;font-size:17px;line-height:1.55;font-synthesis:none;--ink:#172727;--green:#244f42;--edge:#cbd6cf;--muted:#52625a}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button,a,input,summary{-webkit-tap-highlight-color:transparent}button,summary{touch-action:manipulation}button{color:inherit}a{color:var(--green)}h1,h2,h3,p{margin:0 0 1rem}h1,h2,h3{line-height:1.15;overflow-wrap:anywhere}h1{font-family:'Fraunces',Georgia,serif;font-size:clamp(2.5rem,5vw,4rem);font-weight:500;letter-spacing:-.04em}h2{font-size:1.45rem}h3{font-size:1.2rem}p{overflow-wrap:anywhere}svg{display:block;width:100%;height:auto}button:disabled{cursor:not-allowed;opacity:.55}button:not(:disabled),summary{cursor:pointer}a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #805c14;outline-offset:4px;border-radius:5px}main:focus{outline:none}details>summary{min-height:44px;align-content:center;font-weight:700;list-style-position:outside;margin-left:1em}details>p{margin-top:.5rem}fieldset{min-width:0}input[type=range]{accent-color:#244f42;min-height:44px;width:100%;cursor:pointer}input[type=checkbox],input[type=radio]{accent-color:#244f42;width:20px;height:20px;flex-shrink:0}input[type=checkbox]{margin-right:10px}
.lesson-app{max-width:1180px;margin:auto;padding:0 30px}.site-header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:100px;border-bottom:1px solid #d5d9ce}.wordmark{font-size:1.05rem;font-weight:700;text-decoration:none;display:flex;align-items:center;gap:10px;min-height:44px;color:#172727}.wordmark>span{font-size:1.8rem;color:#345b49}.lesson-tag{font-size:.73rem;letter-spacing:.12em;text-transform:uppercase;color:#52625a}.skip-link{position:absolute;left:12px;top:-100px;background:#fff;padding:12px;z-index:20}.skip-link:focus{top:12px}main{padding:20px 0 50px}.production-notice{display:flex;gap:14px;align-items:baseline;padding:12px 16px;background:#eee7d8;border:1px solid #dfd4bd;border-radius:10px;font-size:.79rem;line-height:1.55}.production-notice strong{white-space:nowrap;color:#6c4e22}.save-status{font-size:.73rem;color:#52625a;text-align:right;margin:10px 0 25px;min-height:1.2em}.eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:.7rem;font-weight:700;color:#52625a}.welcome-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:65px;align-items:center;padding:25px 0 30px}.welcome-copy h1{font-size:clamp(3.3rem,6.4vw,5rem);margin:20px 0 26px;line-height:1.06}.lead{font-size:1.15rem;max-width:32em}.welcome-art{position:relative;background:#e7ddc9;border:1px solid #d9cbb1;border-radius:110px 110px 16px 16px;overflow:hidden;max-width:390px;justify-self:end;box-shadow:0 18px 40px #5343290d}.welcome-art svg{max-height:510px}.scene-badge{position:absolute;top:18px;left:50%;transform:translateX(-50%);font-size:.68rem;letter-spacing:.08em;text-transform:uppercase;font-weight:700;background:#f8f4e9e8;border:1px solid #ded4c1;border-radius:20px;white-space:nowrap;padding:7px 12px;z-index:1}.art-caption{background:#efe7d6;text-align:center;padding:12px;font-size:.72rem}.lesson-facts{display:flex;flex-wrap:wrap;gap:18px;margin:26px 0}.lesson-facts>span{font-size:.75rem;color:#52625a;border-left:1px solid #c3cbbe;padding-left:13px}.lesson-facts strong{display:block;color:#243b30;font-size:1rem}.button{display:inline-flex;justify-content:center;align-items:center;min-height:44px;padding:10px 17px;background:white;border:1px solid #b7c6bb;border-radius:8px;font-size:.85rem;font-weight:700;text-decoration:none;gap:8px;white-space:normal;line-height:1.4}.button:hover:not(:disabled){border-color:#547661;background:#f0f4ee}.button.primary{background:#244f42;border-color:#244f42;color:#fff}.button.primary:hover:not(:disabled){background:#193d32}.button.large{padding:14px 25px;font-size:.95rem;border-radius:9px;min-height:52px}.button.quiet{background:transparent;border-color:transparent;text-decoration:underline;text-underline-offset:4px;font-size:.78rem}.button.quiet:hover:not(:disabled){background:#e7ece4}.button.danger{color:#8c2a21;border-color:#b98b85}.welcome-copy>.button{margin-bottom:22px}.small{font-size:.8rem}.muted{color:#52625a}.card{background:#fff;border:1px solid #cbd6cf;border-radius:16px;padding:28px;box-shadow:0 12px 30px #15372b05}.story-layout{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:25px 45px;align-items:start}.story-layout>*{min-width:0}.story-intro{position:sticky;top:30px;padding-top:28px}.story-intro h1{margin:16px 0 22px}.story-intro p{max-width:28em}.story-next{grid-column:2;justify-self:center;text-align:center;max-width:440px}.story-player{width:100%;max-width:540px;margin:0 auto;background:#fff;border:1px solid #cbd6cf;border-radius:16px;overflow:hidden}.player-topline{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:14px 16px;background:#edf0e8}.player-time{font-size:.76rem;font-variant-numeric:tabular-nums;white-space:nowrap}.scene-frame{width:100%;max-width:265px;margin:auto;background:#e7ddc9}.player-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:2px;padding:8px 10px 0}.player-controls .button{padding:9px 11px;min-height:44px}.range-label{display:flex;align-items:center;gap:12px;padding:0 17px;font-size:.7rem;font-weight:700;white-space:nowrap}.range-label input{min-width:0}.volume-label{padding-bottom:8px}.preview-note{font-size:.7rem;line-height:1.5;background:#f5f1e8;padding:10px 17px;margin:0}.caption-panel{padding:17px;border-top:1px solid #d3dbd0}.caption-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.speaker{text-transform:uppercase;letter-spacing:.12em;font-size:.7rem;font-weight:700}.grammar-phrase{display:inline;font-size:1.3rem;font-weight:700;line-height:2.1;overflow-wrap:anywhere}.token-unit{display:inline;white-space:normal}.token-shell{display:inline-block;white-space:nowrap;border-radius:4px;line-height:1.45;padding:2px 1px;vertical-align:baseline}.token-glyph{display:inline-block}.token-dark{background:#344b40;padding:0 4px;border-radius:3px}.token-plural{text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:4px}.token-symbol{font-size:.56em;color:#171717;background:#fff;vertical-align:super;margin-left:2px;line-height:1}.token-focus{background:#fff1a8;outline:2px solid #433900;outline-offset:0}.token-button{display:inline-block;vertical-align:baseline;font:inherit;border:0;background:transparent;padding:0 2px;min-height:44px;max-width:100%;line-height:inherit}.token-button:hover{background:#eef1eb;border-radius:5px}.token-button:focus-visible{outline-offset:1px}.token-detail{display:block;border-left:3px solid #788c76;padding:8px 11px;margin:6px 0 12px;background:#eef2ea;color:#27392e;font-size:.76rem;font-weight:400;line-height:1.5;overflow-wrap:anywhere;white-space:normal}.translation-slot{min-height:3em;font-size:.9rem;color:#405747;line-height:1.5;margin-top:9px}.check-label{display:flex;align-items:center;min-height:44px;font-size:.72rem}.grammar-key{background:#f1f4ee;border-radius:8px;padding:8px 13px;font-size:.73rem;margin-top:12px;line-height:1.6}.grammar-key p{margin:8px 0}.case-key{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;margin:12px 0}.case-key>span{display:flex;flex-direction:column;align-items:flex-start;gap:0;min-width:0;padding:3px 0}.case-key .case-example{font-size:22px;line-height:1.8}.case-dot{width:10px;height:10px;border:1px solid #555;flex-shrink:0}.story-player:fullscreen{overflow-y:auto;max-width:none;border-radius:0;background:#f6f3ed;padding:15px;display:flex;flex-direction:column;align-items:center}.story-player:fullscreen>.scene-frame{max-width:min(320px,42vh)}.story-player:fullscreen>.caption-panel{max-width:660px;width:100%;background:#fff}.story-player:fullscreen>.player-controls,.story-player:fullscreen>.range-label,.story-player:fullscreen>.player-topline{width:100%;max-width:660px}.story-player:fullscreen>.preview-note{max-width:660px}.return-button{margin:12px 17px}.notice{background:#fff5e3;border-left:4px solid #91702a;padding:14px;margin:12px;font-size:.8rem}.notice>.button{margin-top:12px;display:block}.quiz-card{max-width:800px;margin:0 auto}.quiz-topline{display:flex;gap:14px;align-items:center;justify-content:space-between;margin-bottom:17px}.question-dots{display:flex;gap:5px}.question-dots>span{height:7px;width:7px;border-radius:50%;background:#d8ded2}.question-dots>.current{background:#244f42}.progress-track{height:3px;background:#e6ebe1;margin-bottom:27px}.progress-track>span{display:block;height:100%;background:#54745d}.quiz-card h2{font-size:1.3rem;line-height:1.5;margin-bottom:18px}.action-description{font-size:.85rem;color:#52625a;line-height:1.6;border-left:2px solid #d2d8c8;padding-left:12px;margin:10px 0 16px}.help-controls{display:flex;flex-wrap:wrap;gap:2px;margin:8px -10px 12px}.question-english{padding:12px;background:#edf2e9;border-radius:8px;font-size:.9rem}.answer-options{padding:0;margin:22px 0 10px;border:0;display:grid;gap:12px}.answer-option{display:flex;align-items:center;gap:12px;padding:12px 15px;border:1px solid #ccd5c9;border-radius:10px;min-height:64px;cursor:pointer;min-width:0}.answer-option.selected{border:2px solid #345b49;background:#f0f4eb;padding:11px 14px}.answer-option input{margin:0}.option-id{font-size:.73rem;color:#52625a;font-weight:700}.option-content{min-width:0;flex:1}.option-content .grammar-phrase{font-size:1.2rem;line-height:1.9}.option-english{display:block;font-size:.8rem;color:#52625a;font-weight:400;line-height:1.5}.answer-options:disabled .answer-option{cursor:default}.answer-options:disabled input{opacity:1}.selected-grammar{font-size:.78rem;background:#f3f5ef;padding:4px 12px;margin:12px 0}.selected-grammar p{overflow-wrap:anywhere;line-height:1.8}.answer-status{font-size:.88rem;margin:18px 0;padding:14px 0;border-top:1px solid #dce1d6;min-height:55px}.feedback{background:#eef3e9;border:1px solid #cad7c1;padding:20px;border-radius:10px;margin:8px 0 20px}.feedback-review-needed{background:#f8f0e2;border-color:#dfceb0}.feedback p{font-size:.9rem}.feedback h3{margin-bottom:14px}.explained-forms{display:flex;flex-wrap:wrap;gap:10px}.replay-card{max-width:800px;margin:0 auto 24px}.replay-card h2{font-family:'Fraunces',Georgia,serif;font-weight:500;font-size:1.7rem}.transcript{margin:35px auto 0;max-width:900px}.transcript>summary{font-size:.9rem}.transcript>p{margin:17px 0}.transcript-line{padding:20px 0;border-top:1px solid #d8dfd2}.transcript-meta{font-size:.72rem;font-weight:700;letter-spacing:.06em;color:#52625a}.transcript-phrase{margin-bottom:17px}.transcript-phrase .grammar-phrase{font-size:1.2rem}.translation-disclosure,.grammar-description{font-size:.8rem}.grammar-description{color:#52625a}.grammar-description p{line-height:1.8}.recap{max-width:900px;margin:auto}.recap h1{margin:14px 0 18px}.recap-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:30px 0}.recap-counts>div{background:#eef2e8;border:1px solid #dae2d2;border-radius:10px;padding:18px}.recap-counts strong{display:block;font-family:'Fraunces',Georgia,serif;font-size:2.3rem;font-weight:500}.recap-counts span{font-size:.78rem;color:#52625a}.recap-row{padding:24px 0;border-top:1px solid #d9dfd3}.recap-row-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.recap-row-header h2{font-size:.85rem;margin:0}.outcome-tag{background:#edf1e7;border:1px solid #d4ddca;padding:5px 10px;border-radius:20px;font-size:.7rem}.recap-row>.grammar-phrase{font-size:1.05rem}.recap-row>p{font-size:.85rem;margin-top:12px}.button-row{display:flex;flex-wrap:wrap;gap:10px}.resume-card{max-width:680px;margin:35px auto}.resume-card .button{margin:10px 8px 0 0}.site-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:15px;border-top:1px solid #d1d8ca;padding:24px 0 32px;color:#52625a;font-size:.8rem}.dialog-scrim{position:fixed;inset:0;display:grid;place-items:center;background:#182b245e;z-index:40;padding:20px}.restart-dialog{background:#fff;border-radius:16px;max-width:480px;width:100%;padding:28px;box-shadow:0 20px 70px #17272733}.restart-dialog h2{font-family:'Fraunces',Georgia,serif;font-size:1.8rem;font-weight:500}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.lesson-app{padding:0 18px}.site-header{min-height:76px;gap:10px}.wordmark{font-size:.88rem}.lesson-tag{font-size:.62rem}.production-notice{display:block;padding:11px 13px;font-size:.74rem}.production-notice strong{display:block;margin-bottom:3px}.save-status{text-align:left;font-size:.68rem;margin-bottom:20px}.welcome-grid{grid-template-columns:minmax(0,1fr);gap:25px;padding:5px 0 0}.welcome-copy h1{font-size:3.4rem;margin-top:15px;margin-bottom:20px}.welcome-copy .lead{font-size:1.05rem}.welcome-art{width:100%;max-width:330px;justify-self:center;border-radius:90px 90px 15px 15px;order:2}.welcome-art svg{max-height:360px}.lesson-facts{gap:14px}.lesson-facts>span{padding-left:10px;font-size:.68rem}.lesson-facts strong{font-size:.88rem}.story-layout{grid-template-columns:minmax(0,1fr);gap:20px}.story-intro{position:static;padding-top:0}.story-intro h1{font-size:2.4rem}.story-intro p{font-size:.9rem;margin-bottom:12px}.story-next{grid-column:1}.story-player{max-width:540px}.scene-frame{max-width:210px}.caption-panel{padding:14px}.grammar-phrase{font-size:22px}.caption-heading{margin-bottom:4px}.card{padding:20px 16px;border-radius:13px}.quiz-card h2 .grammar-phrase{font-size:22px}.quiz-topline{gap:5px}.eyebrow{font-size:.63rem}.quiz-card .option-content .grammar-phrase{font-size:22px}.answer-option{gap:8px;padding:10px}.answer-option.selected{padding:9px}.option-id{font-size:.65rem}.answer-option input{width:18px;height:18px}.help-controls .button{font-size:.73rem;padding:9px}.recap-counts{gap:8px}.recap-counts>div{padding:12px 9px}.recap-counts span{font-size:.68rem;line-height:1.4;display:block}.recap-counts strong{font-size:2rem}.recap h1{font-size:2.4rem}.site-footer{align-items:flex-start}.site-footer>.small{width:100%}.transcript-line .grammar-phrase{font-size:22px}.token-detail{font-size:.75rem}.restart-dialog{padding:22px}.question-dots{gap:4px}.question-dots>span{height:6px;width:6px}.recap-row-header{gap:8px}}
@media(max-width:359px){.lesson-app{padding:0 12px}.wordmark{font-size:.78rem;gap:6px}.lesson-tag{font-size:.55rem}.welcome-copy h1{font-size:3rem}.card{padding:18px 13px}.player-controls .button{padding:8px 9px;font-size:.73rem}.case-key{gap:4px 6px}.grammar-key{font-size:.68rem;padding:8px 9px}.button-row>.button{width:100%}.answer-option{gap:6px}.option-id{display:none}.quiz-topline .eyebrow{font-size:.59rem}.caption-panel{padding:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.title-phrase{font:inherit;line-height:inherit;letter-spacing:inherit}.title-phrase .token-shell{line-height:1.2}.inline-grammar{font-size:inherit;line-height:inherit}.inline-grammar .token-button{min-height:44px;font-size:inherit}.inline-grammar .token-detail{font-size:.8rem}
.player-topline{flex-wrap:wrap}
.stage-panel>.story-next,.stage-panel>.recap,.stage-panel>.return-button{animation:gentle-reveal .24s ease}.stage-panel .player-controls{animation:gentle-reveal .18s ease}
.site-header{flex-wrap:wrap;padding-top:8px;padding-bottom:8px}.wordmark{min-width:0;flex:1 1 180px}.lesson-tag{white-space:normal}
/* Shared stage: coordinates come from measured content and authored safe areas.
   Never interpolate frame geometry across protected pixels. */
.lesson-app{max-width:none;padding:0}.site-header,.production-notice,.save-status,.site-footer,.welcome-grid,.resume-card{max-width:1120px;margin-left:auto;margin-right:auto}.site-header,.site-footer{padding-left:20px;padding-right:20px}main{padding-bottom:30px}.production-notice,.save-status{margin-left:20px;margin-right:20px}.welcome-grid{padding:20px}.lesson-reference{max-width:900px;margin:24px auto;padding:0 16px}
.story-player.lesson-stage{position:relative;width:100%;max-width:none;min-height:100svh;margin:0;border:0;border-radius:0;overflow:visible;background:radial-gradient(ellipse at 62% 35%,#e3dfcf,#f3eee4 72%)}
.lesson-stage>.scene-frame{position:absolute;max-width:none;margin:0;top:20px;left:35%;width:30%;background:#e7ddc9;box-shadow:0 12px 40px #27392e15;overflow:hidden}
.lesson-stage .scene-frame>div{width:100%!important}.stage-panel{position:absolute;left:12px;top:44svh;width:min(470px,calc(100% - 24px));min-width:0;padding:12px;background:#fffdf7;border:1px solid #c8d1c1;border-radius:22px;box-shadow:0 16px 38px #17372b12;overflow-wrap:anywhere;isolation:isolate}
.stage-panel>*{min-width:0}.stage-panel .card{padding:12px 4px;border:0;box-shadow:none;background:transparent}.stage-panel .player-topline{padding:4px 8px;background:transparent}.stage-panel .player-controls{padding:8px 0;gap:8px;position:relative;justify-content:flex-start;align-items:center}.stage-panel .range-label{padding:0 8px;white-space:normal}.playback-tools{position:sticky;top:0;z-index:3;background:#fffdf7;border-radius:12px}.stage-panel .icon-button{min-width:44px;min-height:44px;padding:7px 10px;text-decoration:none;border-radius:14px;background:#eff3e9;border-color:#d6dfcd;font-size:1.15rem;line-height:1}
.icon-button{position:relative}.icon-button:active:not(:disabled)>span[aria-hidden=true]{transform:scale(.94)}.control-tooltip{display:block;position:fixed;z-index:60;width:max-content;max-width:min(240px,calc(100vw - 24px));padding:7px 10px;border-radius:8px;background:#244f42;color:#fff;font-size:.75rem;font-weight:500;line-height:1.4;pointer-events:none;white-space:normal;overflow-wrap:normal;word-break:normal;animation:gentle-reveal .12s ease}
.sound-control{display:contents}.sound-popup{display:block;position:fixed;z-index:50;width:min(300px,calc(100vw - 24px));max-height:calc(100svh - 24px);overflow:auto;padding:12px;border:1px solid #8ea58c;border-radius:12px;background:#fffdf7;box-shadow:0 8px 24px #17372b26;animation:gentle-reveal .12s ease}.sound-popup .range-label{display:flex;gap:10px;padding:0}.sound-popup .range-label input{flex:1;width:100%;min-width:0}.sound-popup>.icon-button{margin:10px 0 0}
.stage-panel .icon-button[aria-pressed=true],.stage-panel .icon-button[aria-expanded=true]{background:#d7e8c9;border-color:#345b49;box-shadow:inset 0 0 0 1px #345b49;color:#183f31}.stage-panel .icon-button:hover:not([aria-pressed=true]):not([aria-expanded=true]){background:#e5eddd;border-color:#829576}.stage-panel .icon-button:focus-visible{outline:3px solid #1b5d8c;outline-offset:3px}
.stage-panel .caption-panel{padding:12px 8px;border-top:1px solid #d3dbd0}.stage-panel .caption-heading{margin:0}.stage-panel .translation-slot{min-height:0;margin-top:8px;animation:gentle-reveal .16s ease}.stage-panel .token-detail{animation:gentle-reveal .16s ease}.stage-panel .story-next{margin:12px 8px 4px;max-width:none;text-align:left}.stage-panel .story-next p{margin:0}.stage-panel .return-button{margin:10px 8px}.stage-panel .help-controls{margin:4px 0 8px;gap:8px}.stage-panel .answer-options{gap:8px;margin:12px 0}.stage-panel .answer-option{width:100%;text-align:left;background:#fff;font:inherit;color:inherit;min-height:52px;padding:8px 10px}.stage-panel .answer-option.selected{background:#eaf2df;border:2px solid #345b49;padding:7px 9px}.stage-panel .answer-option:disabled{opacity:1}.stage-panel .option-content .grammar-phrase{font-size:1.16rem;line-height:1.7}.stage-panel .quiz-topline{margin-bottom:10px}.stage-panel .progress-track{margin-bottom:12px}.stage-panel .quiz-card h2{margin-bottom:8px}.stage-panel .quiz-card h2 .grammar-phrase{font-size:1.2rem;line-height:1.75}.stage-panel .action-description{margin:6px 0 10px}.stage-panel .answer-status{margin:10px 0;padding:8px 0;min-height:0}.stage-panel .feedback{padding:12px;margin:8px 0 14px;animation:gentle-reveal .25s ease}.stage-panel .feedback p{margin-bottom:10px}.stage-panel .selected-grammar{margin:8px 0}.stage-panel .recap-counts{margin:14px 0;gap:8px}.stage-panel .recap-counts>div{padding:10px}.stage-panel .recap h1{font-size:2rem}.stage-panel .recap-row{padding:16px 0}.stage-panel .question-entrance{animation:gentle-reveal .3s ease}.success-pop{display:inline-block;animation:check-pop .3s cubic-bezier(.2,.8,.3,1.2);color:#244f42}
.lesson-stage:fullscreen{display:block;padding:0;overflow:auto;background:#f3eee4}.lesson-stage:fullscreen>.scene-frame{max-width:none}.lesson-stage .token-symbol{background:#fffdf7}.stage-panel .notice{margin:8px 0}.stage-panel .grammar-phrase{max-width:100%}
@keyframes anchored-pop{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes buoyant-panel{0%{opacity:0;transform:translateY(8px)}75%{opacity:1;transform:translateY(-2px)}100%{transform:translateY(0)}}
@keyframes gentle-reveal{from{opacity:.3}to{opacity:1}}
@keyframes check-pop{0%{transform:scale(.6) rotate(-8deg)}75%{transform:scale(1.12) rotate(3deg)}100%{transform:scale(1) rotate(0)}}
@media(max-width:760px){.lesson-app{padding:0}.site-header{min-height:64px}.stage-panel{padding:10px}.lesson-reference{padding:0 12px}.stage-panel .token-detail{font-size:.82rem}.stage-panel .quiz-card h2 .grammar-phrase,.stage-panel .option-content .grammar-phrase{font-size:1.2rem}.production-notice{margin:0 12px}.save-status{margin:8px 12px 12px}.stage-panel .option-id{display:inline}.stage-panel .answer-option{gap:8px}}
@media(prefers-reduced-motion:reduce){.icon-button:active:not(:disabled){transform:none}}
.token-button{min-width:44px}
@media(max-width:760px){.welcome-copy h1{font-size:clamp(1.75rem,12vw,3.4rem)}.story-intro h1{font-size:clamp(1.75rem,9vw,2.4rem)}}
.inline-grammar,.recap-row>.grammar-phrase{font-size:22px;font-weight:700}.inline-grammar .token-button{font-size:22px}
.lesson-title{display:flex;align-items:center;gap:10px;min-width:0;max-width:100%}.lesson-language{min-width:0}.lesson-language select{font:inherit;font-size:1.12rem;font-weight:700;color:#172727;background:transparent;border:1px solid #b7c6bb;border-radius:8px;min-height:44px;padding:8px 28px 8px 10px;width:220px;max-width:100%;cursor:pointer}.site-header{flex-wrap:wrap}.site-header .lesson-tag{flex-shrink:0;margin-inline-start:auto}@media(max-width:760px){.site-header{padding:8px 12px;gap:8px}.lesson-title{gap:6px}.lesson-language select{font-size:1rem;max-width:195px}.site-header .lesson-tag{font-size:.6rem;letter-spacing:.06em}}@media(max-width:359px){.lesson-language select{font-size:.9rem;max-width:175px}.site-header .lesson-tag{font-size:.55rem}}

.lesson-title>.wordmark{flex:0 0 44px;width:44px;justify-content:center}.lesson-title>.lesson-language{width:220px}

.grammar-phrase[lang="ja"]{font-family:"Hiragino Sans","Yu Gothic","Noto Sans CJK JP",sans-serif}
.grammar-phrase[lang="ko"]{font-family:"Apple SD Gothic Neo","Malgun Gothic","Noto Sans CJK KR",sans-serif}
.grammar-phrase[lang="zh-Hans"]{font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif}
.grammar-phrase[lang="zh-Hans"] .token-button{padding-left:0;padding-right:0;min-width:0}
.grammar-phrase[lang="zh-Hans"] .token-shell{padding-inline:0}
.grammar-phrase[lang="ar"]{font-family:"Geeza Pro","Noto Naskh Arabic","Arial",sans-serif;line-height:2.3}
.grammar-phrase[dir="rtl"]{unicode-bidi:isolate}
.grammar-phrase[dir="rtl"] .token-symbol{direction:ltr;unicode-bidi:isolate}
.grammar-phrase[lang="ja"] .token-button,.grammar-phrase[lang="ko"] .token-button{padding-inline:0;padding-left:0;padding-right:0}
.grammar-phrase[lang="ja"] .token-shell,.grammar-phrase[lang="ko"] .token-shell{padding-inline:0}
/* Visible reading aids share their original token's spoken focus. */
.grammar-phrase[lang="ja"] .token-button,.grammar-phrase[lang="ko"] .token-button{min-width:0}
.reading-controls{display:flex;flex-wrap:wrap;align-items:center;gap:0 16px;min-width:0;margin:12px 0;padding:4px 10px;border:1px solid #cbd6cf;border-radius:10px;background:#f4f6ef;color:#27392e}
.reading-controls legend{font-size:.78rem;font-weight:700;padding:0 4px}.reading-controls .check-label{gap:7px;font-size:.8rem}.reading-controls input{width:18px;height:18px;accent-color:#244f42}.reading-note{flex-basis:100%;font-size:.7rem;font-weight:400;line-height:1.5;padding-bottom:5px}
.token-shell:has(.reading-latin){max-width:100%;vertical-align:bottom;text-align:center;line-height:1.65}.reading-latin{display:block;direction:ltr;unicode-bidi:isolate;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-family:system-ui,sans-serif;font-size:.58em;font-weight:500;line-height:1.4;color:#405747;padding:0 2px 2px}
.token-glyph ruby{ruby-position:over;ruby-align:center}.token-glyph rt{font-size:.52em;line-height:1.1;font-weight:500;color:#405747}.token-focus .reading-latin,.token-focus rt{color:#332d00}.token-static{display:inline-block;max-width:100%}.grammar-phrase .token-button{max-width:100%}.title-phrase .reading-latin{font-size:.32em}.title-phrase rt{font-size:.38em}.welcome-copy h1:has(rt){line-height:1.55}.stage-panel .reading-controls{margin:8px 0}.reading-controls:focus-within{border-color:#547661}
/* The first grid row supplies the inline baseline, keeping punctuation beside
   the original script when a second reading row is enabled. */
.token-shell:has(.reading-latin){display:inline-grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:baseline;vertical-align:baseline}.token-shell:has(.reading-latin)>.token-glyph{grid-column:1;grid-row:1}.token-shell:has(.reading-latin)>.token-symbol{grid-column:2;grid-row:1;align-self:start}.reading-latin{grid-column:1/-1;grid-row:2;letter-spacing:normal}.token-glyph rt{letter-spacing:normal}
.token-detail{min-width:0;max-width:100%;text-align:start;unicode-bidi:isolate}.word-grammar,.word-definitions,.word-field{display:block}.word-grammar{margin:4px 0 8px}.word-field+.word-field{margin-top:6px}.word-form{font-size:1.15em}.word-lemma{font-weight:700}.word-close{float:right;min-height:44px;min-width:44px;margin:0 0 4px 8px;padding:6px 10px;font:inherit;font-weight:700;color:#244f42;background:#fff;border:1px solid #9eaf9a;border-radius:6px}.word-close:hover{background:#e1e9db}.token-button[aria-expanded="true"]{box-shadow:inset 0 -2px #345b49;border-radius:4px}.token-detail::after{content:"";display:block;clear:both}
