:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;color:#27233d;background:#fff;font-synthesis:none;--accent:#6654c7;--lavender:#f1edff;--muted:#77718e;--line:#ebe8f0}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #bdacf3;outline-offset:4px}button{touch-action:manipulation}h1,h2,p{margin:0}small{display:block;font-size:14px;font-weight:400;line-height:1.5}p{line-height:1.7}p small{color:var(--muted);margin-top:6px}.shell{max-width:492px;padding:28px 28px max(28px,env(safe-area-inset-bottom));margin:0 auto;min-height:100svh}.home-header{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:21px;font-weight:750;margin-bottom:42px;letter-spacing:-.5px}.icon-button{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;padding:0;color:inherit;border:0;background:transparent;border-radius:12px}.icon-button:hover{background:var(--lavender)}.welcome{text-align:center;margin-bottom:28px}.welcome h1{font-size:34px;line-height:1.55;font-weight:750;letter-spacing:-1.3px;white-space:nowrap}.welcome h1 span{text-decoration:underline;text-decoration-color:#ffd8bf;text-decoration-thickness:8px;text-underline-offset:4px;text-decoration-skip-ink:none}.welcome p{font-size:17px;color:var(--muted);margin-top:10px}.photo-panel{text-align:center;border:2px dashed #d8cbff;border-radius:18px;background:#f7f4ff;padding:30px 24px 14px}.camera-icon{color:var(--accent);margin-bottom:15px}.photo-panel h2{font-size:24px;font-weight:700}.photo-panel p{font-size:17px;color:var(--muted);margin:2px 0 24px}.button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;min-height:64px;border:2px solid transparent;border-radius:18px;padding:13px 16px;font-size:21px;font-weight:650;line-height:1.35;transition:background .15s,transform .15s;margin:12px 0}.button>span{display:flex;justify-content:center;align-items:center;gap:10px}.button small{font-size:13px;letter-spacing:.1px;opacity:.87}.button.primary{background:var(--accent);color:#fff}.button.primary:hover:not(:disabled){background:#5644b5}.button.secondary{color:var(--accent);background:#fff;border-color:var(--accent)}.button.secondary:hover:not(:disabled){background:var(--lavender)}.button:active:not(:disabled){transform:scale(.99)}.text-button{display:flex;align-items:center;justify-content:center;gap:7px;background:none;border:0;color:var(--accent);padding:12px 4px;min-height:44px;font-size:16px;line-height:1.5;margin:auto;text-decoration:underline;text-underline-offset:4px}.photo-panel .text-button{font-size:14px}.manual-entry{margin:12px auto 22px}.current-lesson{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line);font-size:14px;color:var(--muted)}.current-lesson span{overflow-wrap:anywhere}.current-lesson .text-button{font-size:13px;flex-shrink:0;margin:0}.mode-list{border-top:1px solid var(--line)}.mode-list>button{display:flex;align-items:center;gap:16px;width:100%;border:0;border-bottom:1px solid var(--line);background:#fff;color:inherit;text-align:left;padding:18px 0}.mode-list>button>span:nth-child(2){flex:1}.mode-list strong{font-size:22px}.mode-list small{font-size:14px;color:var(--muted);margin-top:4px}.mode-list>button>svg{width:20px;color:var(--muted)}.mode-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:var(--lavender);color:var(--accent);flex-shrink:0}.closing{text-align:center;color:var(--muted);font-size:18px;margin-top:28px}.footnote{text-align:center;font-size:12px;color:var(--muted);line-height:1.7;margin:18px 0 4px}.page-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 -8px 18px}.page-header h1{font-size:25px;line-height:1.5}.header-spacer{width:44px}.progress-label{text-align:right;font-size:18px;margin-bottom:12px}.progress-track{height:9px;border-radius:10px;background:var(--lavender);overflow:hidden}.progress-track>div{height:100%;border-radius:10px;background:var(--accent);transition:width .2s}.practice-main{text-align:center}.round-icon{display:grid;place-items:center;width:188px;height:188px;margin:66px auto 35px;border-radius:50%;background:var(--lavender);color:var(--accent)}.round-icon.small{width:94px;height:94px;margin:30px auto}.round-icon.peach{background:#fff0e5;color:#b47249}.practice-main h2,.study h2,.reveal h2,.celebration h2{font-size:29px;line-height:1.4}.muted{color:var(--muted);font-size:16px;margin:12px 0 26px}.practice-main .button{margin:14px 0}.writing-gap{margin-top:28px}.writing-gap .muted{margin-bottom:12px}.voice-status{text-align:center;min-height:8px;font-size:14px;color:var(--muted)}.voice-status:empty{display:none}.hint-note{font-size:14px;color:var(--muted)}.steps{list-style:none;display:flex;justify-content:space-around;padding:0;margin:28px 0 35px;gap:14px}.steps li{position:relative;display:flex;align-items:center;flex-direction:column;gap:9px;flex:1;color:var(--muted);font-size:17px}.steps li:after{content:"";position:absolute;width:calc(100% - 42px);left:calc(50% + 29px);top:23px;height:3px;background:var(--lavender)}.steps li:last-child:after{display:none}.steps span{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--lavender);color:var(--accent);font-size:20px}.steps .active{color:var(--accent);font-weight:700}.steps .active span{background:var(--accent);color:#fff}.steps+.practice-main .round-icon{margin-top:28px;width:164px;height:164px;margin-bottom:25px}.study{text-align:center}.study h2{font-size:25px}.study .muted{font-size:14px;margin:8px 0 20px}.passage{text-align:left;font-size:27px;line-height:2.05;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:22px 4px;margin:0 0 28px;max-height:42svh;overflow:auto;overflow-wrap:anywhere;white-space:pre-wrap;color:#746d84}.passage .highlight{background:#ece4ff;color:#342466;box-decoration-break:clone;-webkit-box-decoration-break:clone;border-radius:6px;font-weight:650;outline:3px solid #ece4ff}.reveal{text-align:center;padding-top:20px}.answer{font-size:36px;line-height:1.9;overflow-wrap:anywhere;background:#f7f4ff;border-radius:18px;padding:24px 18px;margin:24px 0}.reveal>p:not(.answer){margin-bottom:28px;color:var(--muted)}.feedback{padding:16px;background:var(--lavender);border-radius:14px;font-size:17px;text-align:left;line-height:1.7}.feedback.good{background:#edf7ee}.writing-note{margin:30px 0;color:var(--muted)}.celebration{text-align:center;padding:20px 0 32px}.celebration p{margin-top:18px;color:var(--muted)}.field{display:block;font-size:17px;font-weight:600;margin:24px 0}.field small{font-size:13px;color:var(--muted);margin:6px 0 9px}.field input,.field textarea,.field select{display:block;width:100%;margin-top:9px;border:1px solid #cdc7db;border-radius:12px;padding:13px 14px;background:#fff;color:inherit;font-size:18px;font-weight:400;line-height:1.7}.field textarea{resize:vertical;min-height:130px}.field select{min-height:52px}.intro{font-size:18px;margin:26px 0;color:var(--muted)}.notice{background:#fff4e7;border-radius:14px;padding:16px;font-size:14px;line-height:1.8}.source-photo{max-width:100%;border-radius:10px;margin-top:12px}details{margin:18px 0}summary{cursor:pointer;color:var(--accent);font-size:15px;min-height:40px}.error{color:#a1344d;background:#fff0f3;border-radius:12px;padding:12px 14px;font-size:15px;line-height:1.6;margin:14px 0;overflow-wrap:anywhere}.processing{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;background:var(--lavender);color:var(--accent);border-radius:14px;margin:16px 0;padding:20px;font-size:17px}.processing small{flex-basis:100%;text-align:center;font-size:13px}.login{text-align:center;padding-top:48px}.login h1{font-size:35px;line-height:1.5;margin-bottom:20px}.login>p{color:var(--muted);margin-bottom:35px}.login form{text-align:left}.login .field{font-size:16px}.login .button{margin-top:25px}.checkbox{display:flex;align-items:center;gap:12px;margin:28px 0;font-size:18px;min-height:44px}.checkbox input{width:23px;height:23px;accent-color:var(--accent)}.section-title{font-size:23px;margin:34px 0 16px}.lesson-row{display:flex;gap:8px;align-items:center;border-top:1px solid var(--line)}.lesson-row>button:first-child{flex:1;text-align:left;min-height:76px;border:0;background:none;color:inherit;padding:14px 0}.lesson-row strong{font-size:16px;font-weight:600}.lesson-row small{color:var(--muted);margin-top:6px}.privacy{font-size:14px;color:var(--muted);border-top:1px solid var(--line);margin-top:25px;padding-top:25px}.privacy h2{font-size:21px;color:#27233d;margin-bottom:12px}.privacy p{margin-bottom:15px}.loading{display:flex;align-items:center;justify-content:center;gap:12px;color:var(--accent)}.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}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.ai-note{margin-top:26px}@media(min-width:800px){.shell{margin:24px auto;min-height:calc(100svh - 48px);padding-top:24px}.home-header{margin-bottom:36px}.round-icon{margin-top:56px}}@media(max-width:390px){.shell{padding:22px 20px max(24px,env(safe-area-inset-bottom))}.home-header{font-size:19px;margin-bottom:28px}.welcome h1{font-size:28px;letter-spacing:-1px}.welcome p{font-size:15px}.photo-panel{padding:22px 20px 10px}.camera-icon{width:62px;height:62px}.round-icon{width:154px;height:154px;margin-top:45px}.practice-main h2{font-size:27px}.button{font-size:20px}.mode-list small{font-size:12px}.passage{font-size:25px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important;transition:none!important}}.explanation{border-top:1px solid var(--line);margin-top:26px;padding-top:10px}.explanation>.text-button{font-size:15px}.english-explanation{text-align:left;background:#fff5ed;border-radius:14px;padding:18px;margin-top:8px;font-size:17px;line-height:1.7}.english-explanation .text-button{font-size:14px;margin-top:10px}.button.correct{background:#237747;color:#fff}.button.correct:hover:not(:disabled){background:#195c35}.button.wrong{background:#bc3d47;color:#fff}.button.wrong:hover:not(:disabled){background:#a12c36}.passage-editor{border:1px solid #d8cbff;border-radius:16px;padding:0 16px 12px;margin:24px 0;min-width:0}.passage-editor legend{font-weight:650;color:var(--accent);padding:0 8px}.passage-editor .field{margin:16px 0}.mode-list strong{overflow-wrap:anywhere}.shell.practice-shell{width:100%;max-width:1120px;height:100svh;height:100dvh;min-height:0;margin:0 auto;padding:max(10px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));overflow:auto}.practice-layout{height:100%;min-height:0;display:flex;flex-direction:column;gap:clamp(8px,1.5dvh,16px)}.practice-top,.practice-footer{flex:none;min-width:0}.practice-shell .page-header{margin:0;min-height:44px}.practice-shell .page-header h1{font-size:clamp(21px,3vw,28px)}.practice-progress{display:flex;align-items:center;gap:16px;margin-top:5px}.practice-shell .progress-label{flex:none;font-size:clamp(14px,2vw,17px);margin:0;order:2}.practice-shell .progress-track{flex:1;height:6px}.practice-shell .steps{margin:10px 0 0;gap:8px}.practice-shell .steps li{flex-direction:row;justify-content:center;gap:6px;font-size:14px}.practice-shell .steps span{width:25px;height:25px;font-size:14px}.practice-shell .steps li:after{display:none}.retry-note{text-align:center;font-size:13px;color:var(--muted);line-height:1.4;margin-top:6px}.practice-stage{flex:1;min-height:0;min-width:0;width:100%;max-width:680px;margin:0 auto;gap:clamp(8px,1.6dvh,18px)}.practice-stage.practice-main{display:flex;flex-direction:column;justify-content:center;padding:0}.practice-stage .stage-copy{flex:none;min-width:0;text-align:center}.practice-stage h2{font-size:clamp(22px,3.4vw,32px);line-height:1.3}.practice-stage .muted{font-size:clamp(14px,1.8vw,17px);line-height:1.45;margin:7px 0 0}.practice-stage .muted small{font-size:13px;line-height:1.4;margin-top:3px}.practice-stage .round-icon{width:clamp(52px,12dvh,112px);height:clamp(52px,12dvh,112px);margin:0 auto 10px}.practice-stage .round-icon svg{width:55%;height:55%}.practice-stage .stage-actions{display:flex;flex-direction:column;gap:8px;flex:none;min-width:0;width:100%;max-width:600px;margin:0 auto}.practice-shell .button{margin:0;min-height:58px;padding:8px 12px;border-radius:15px;font-size:clamp(18px,2.4vw,22px);line-height:1.25}.practice-shell .button small{font-size:12px;line-height:1.3}.practice-shell .text-button{min-height:44px;margin:0;padding:7px 4px;font-size:14px;line-height:1.35}.practice-stage .writing-note{font-size:14px;line-height:1.5;margin:8px 0 0}.practice-stage .hint-note{font-size:13px;line-height:1.35;margin:0}.practice-stage.study,.practice-stage.reveal{display:flex;flex-direction:column;text-align:center;padding:0}.practice-stage .passage,.practice-stage .answer{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y;white-space:pre-wrap;line-height:1.8;padding:14px 12px;margin:0;border-radius:14px;font-size:clamp(24px,3.3vw,32px)}.practice-stage .passage{border:1px solid var(--line);text-align:left}.practice-stage .answer{font-size:clamp(28px,3.6vw,38px);line-height:1.7}.practice-shell .practice-footer{max-width:680px;width:100%;margin:0 auto;text-align:center}.practice-shell .explanation{margin:0;padding:0;border-top:1px solid var(--line)}.practice-shell .explanation>.text-button{width:100%;font-size:14px}.practice-shell .voice-status{max-height:70px;overflow:auto;line-height:1.4}.practice-shell .voice-status .text-button{width:100%;min-height:36px}.practice-shell .voice-status .button{min-height:44px}.practice-shell .error{margin:3px 0;font-size:13px;line-height:1.4;padding:7px 10px;max-height:66px;overflow:auto}.practice-shell .ai-note{font-size:10px;line-height:1.3;margin:3px 0 0}.explanation-dialog{width:min(480px,calc(100vw - 32px));max-height:85svh;max-height:85dvh;overflow:auto;border:1px solid #ded6ee;border-radius:20px;padding:18px;color:#27233d;box-shadow:0 16px 60px #27233d33}.explanation-dialog::backdrop{background:#27233d70}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.dialog-heading h2{font-size:20px}.explanation-dialog .english-explanation{font-size:18px;margin-top:12px}@media(min-width:900px),(min-width:600px)and (max-height:500px){.shell.practice-shell{padding-left:clamp(20px,4vw,48px);padding-right:clamp(20px,4vw,48px)}.practice-stage{max-width:none;column-gap:clamp(24px,5vw,64px)}.practice-stage.practice-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center}.practice-stage.study,.practice-stage.reveal{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.practice-stage.study .stage-copy,.practice-stage.reveal .stage-copy{grid-column:1;grid-row:1}.practice-stage .passage,.practice-stage .answer{grid-column:1;grid-row:2;align-self:stretch;height:100%}.practice-stage.study .stage-actions,.practice-stage.reveal .stage-actions{grid-column:2;grid-row:1 / span 2;align-self:center}.practice-shell .practice-footer{max-width:none;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:0 24px;border-top:1px solid var(--line)}.practice-shell .explanation{border:0}.practice-shell .ai-note{grid-column:1 / -1}.practice-stage .round-icon{width:clamp(90px,22dvh,170px);height:clamp(90px,22dvh,170px);margin-bottom:18px}}@media(max-height:650px){.practice-layout,.practice-stage{gap:8px}.practice-shell .button{min-height:54px;font-size:18px;padding:6px 10px}.practice-stage .stage-actions{gap:6px}.practice-stage .round-icon{display:none}.practice-stage h2{font-size:22px}.practice-stage .muted{font-size:13px;margin-top:4px}.practice-stage .writing-note{font-size:13px}.practice-shell .steps{margin-top:6px}.practice-shell .steps span{width:22px;height:22px}.practice-shell .steps li{font-size:13px}.practice-shell .page-header{min-height:40px}.practice-shell .page-header h1{font-size:21px}.practice-stage .passage,.practice-stage .answer{padding:8px 10px;font-size:24px}}@media(max-width:359px){.practice-shell .button{font-size:17px}.practice-shell .button small{font-size:11px}.practice-shell .explanation>.text-button{font-size:13px}.retry-note{font-size:12px}}@media(max-height:340px){.practice-layout{min-height:340px}}.shell.screen-shell{width:100%;max-width:1000px;height:100svh;height:100dvh;min-height:0;margin:0 auto;padding:max(10px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:8px;overflow:auto}.screen-shell>*{flex-shrink:0;min-width:0}.screen-shell .page-header{margin:0;min-height:44px}.screen-shell .page-header h1{font-size:23px}.home-shell .home-header{margin:0;font-size:19px;min-height:44px}.home-shell .welcome{margin:0;text-align:center}.home-shell .welcome h1{font-size:clamp(24px,4vw,34px);line-height:1.4}.home-shell .welcome p{font-size:14px;margin:4px 0 0}.home-shell .photo-panel{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:10px 16px;margin-top:4px}.home-shell .camera-icon{height:clamp(28px,8dvh,74px);width:clamp(28px,8dvh,74px);margin:0 0 6px;flex-shrink:0}.home-shell .photo-panel h2{font-size:23px}.home-shell .photo-panel p{font-size:14px;margin:2px 0 6px}.home-shell .photo-panel .button{max-width:420px;min-height:54px;font-size:20px;padding:7px 12px;margin:0}.home-shell .text-button{min-height:40px;padding:6px 4px}.home-shell .manual-entry{margin:0 auto;font-size:14px}.home-shell .current-lesson{padding:0;min-height:40px;gap:8px}.home-shell .current-lesson>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px}.home-shell .mode-list>button{padding:8px 0;gap:12px;min-height:68px}.home-shell .mode-icon{width:42px;height:42px}.home-shell .mode-list strong{font-size:21px}.home-shell .mode-list small{font-size:12px;margin-top:2px}.home-shell .closing{font-size:14px;margin:0}.home-shell .footnote{font-size:10px;margin:0;line-height:1.4}.home-shell .processing{padding:8px;margin:0;font-size:14px;gap:5px}.home-shell .processing small{font-size:11px}.home-shell .error{margin:0;max-height:60px;overflow:auto;font-size:13px;padding:8px}.passages-shell>.mode-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.passages-shell>.muted{margin:0 0 8px}.passages-shell>h2{font-size:24px}.passages-shell .mode-list>button{padding:14px 4px}.passages-shell .mode-list strong{font-size:20px}.settings-shell>h2{font-size:22px;margin:0}.settings-shell .field{margin:0;font-size:15px}.settings-shell .field select{padding:7px 12px;min-height:44px;margin:4px 0 0;font-size:16px}.settings-shell>.button{min-height:44px;font-size:17px;padding:7px 10px;margin:0;border-radius:12px}.settings-shell .checkbox{margin:0;font-size:16px;min-height:40px}.settings-shell .section-title{font-size:19px;margin:0}.settings-shell .lesson-list{flex:1;min-height:60px;overflow:auto;overscroll-behavior:contain}.settings-shell .lesson-row>button:first-child{min-height:60px;padding:8px 0}.settings-shell .lesson-row strong{font-size:14px;overflow-wrap:anywhere}.settings-shell .lesson-row small{font-size:12px;margin-top:3px}.settings-shell .privacy{margin:0;padding:0;font-size:13px;max-height:25dvh;overflow:auto}.settings-shell .privacy summary{min-height:40px;padding:8px 0;font-size:14px}.settings-shell .privacy p{margin-bottom:10px}.settings-shell .voice-status{max-height:60px;overflow:auto}.settings-shell .voice-status .text-button{min-height:32px;padding:4px}.settings-shell .error{margin:0;padding:6px;max-height:50px;overflow:auto}.login-shell{justify-content:center}.login-shell .login{padding:0;width:100%;max-width:420px;margin:auto}.login-shell .round-icon{width:64px;height:64px;margin:0 auto 12px}.login-shell .login h1{font-size:30px;margin-bottom:12px}.login-shell .login>p{margin:0 0 12px;font-size:14px}.login-shell .login .field{margin:12px 0}.login-shell .login .button{margin:12px 0;min-height:56px}.login-shell .login .footnote{margin:8px 0 0;font-size:12px}@media(min-width:800px),(min-width:600px)and (max-height:500px){.home-shell{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto;column-gap:clamp(24px,5vw,60px)!important}.home-shell .home-header{grid-column:1 / -1;grid-row:1}.home-shell .welcome{grid-column:1 / -1;grid-row:2;margin:0 0 10px}.home-shell .photo-panel{grid-column:1;grid-row:3 / span 2;margin:0}.home-shell .manual-entry{grid-column:1;grid-row:5}.home-shell .current-lesson{grid-column:2;grid-row:3;align-self:start}.home-shell .mode-list{grid-column:2;grid-row:3;align-self:center;margin-top:44px;width:100%}.home-shell .closing{grid-column:2;grid-row:4}.home-shell>.footnote{grid-column:2;grid-row:5}.home-shell .processing,.home-shell>.error{grid-column:1 / -1;grid-row:6}.settings-shell{max-width:720px!important}.passages-shell{max-width:800px!important}}@media(max-height:650px){.screen-shell{gap:4px!important}.home-shell .camera-icon{display:none}.home-shell .welcome h1{font-size:24px}.home-shell .welcome p{font-size:12px;margin-top:2px}.home-shell .photo-panel h2{font-size:20px}.home-shell .photo-panel p{font-size:12px}.home-shell .closing{display:none}.home-shell .photo-panel{padding:8px 14px}.home-shell .mode-list>button{min-height:60px;padding:5px 0}.home-shell .photo-panel .button{min-height:50px;font-size:18px}.home-shell .manual-entry{font-size:13px}.home-shell .current-lesson .text-button{font-size:12px}.settings-shell .page-header h1{font-size:21px}.settings-shell>h2{font-size:18px}.settings-shell .privacy{max-height:20dvh}.login-shell .round-icon{display:none}}@media(min-width:600px)and (max-height:500px){.home-shell .welcome{margin:0}.home-shell .photo-panel{padding:6px 14px}.home-shell .photo-panel p{margin-bottom:4px}.home-shell .home-header{min-height:40px}.home-shell .mode-list{margin-top:36px}.home-shell .current-lesson{min-height:36px}.home-shell .welcome h1{font-size:24px}.home-shell .welcome p{display:none}.settings-shell{display:grid!important;grid-template-columns:1fr 1fr;grid-template-rows:44px auto auto auto minmax(0,1fr) auto;gap:6px 24px!important}.settings-shell>.page-header{grid-column:1 / -1;grid-row:1}.settings-shell>h2:not(.section-title){grid-column:1;grid-row:2}.settings-shell>.field{grid-column:1;grid-row:3}.settings-shell>.button{grid-column:1;grid-row:4}.settings-shell>.checkbox{grid-column:1;grid-row:5}.settings-shell>.section-title{grid-column:2;grid-row:2}.settings-shell>.lesson-list{grid-column:2;grid-row:3 / span 3;min-height:0}.settings-shell>.privacy{grid-column:1;grid-row:6}.settings-shell>.button:last-child{grid-column:2;grid-row:6}.settings-shell>.voice-status{grid-column:1;grid-row:5;align-self:end;max-height:35px}.settings-shell .checkbox{align-self:start}.login-shell .login{max-width:680px;display:grid;grid-template-columns:1fr 1fr;gap:8px 24px;align-items:center}.login-shell .login h1{grid-column:1;grid-row:1}.login-shell .login>p:not(.footnote){grid-column:1;grid-row:2}.login-shell .login form{grid-column:2;grid-row:1 / span 2}.login-shell .login .footnote{grid-column:1 / -1;grid-row:3}}@media(max-height:340px){.screen-shell{min-height:340px!important}}.whole-recitation{color:#342466}@media(max-width:390px){.practice-shell .steps{gap:3px}.practice-shell .steps li{gap:3px;font-size:12px}.practice-shell .steps span{width:20px;height:20px;font-size:12px}}.passages-shell .preview-intro h2{font-size:clamp(20px,3vw,25px);margin:0}.passages-shell .preview-intro .muted{font-size:14px;line-height:1.4;margin:4px 0}.passage-previews{flex:1!important;min-height:0;display:grid;grid-auto-rows:minmax(0,max-content);align-content:start;gap:12px;overflow:auto;overscroll-behavior:contain}.passage-preview{min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px;border:1px solid #ded6ee;border-radius:16px;background:#faf8ff;padding:12px}.passage-preview.listening{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.passage-preview h3{margin:0;font-size:16px;line-height:1.4;flex:none;overflow-wrap:anywhere}.preview-text{flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;white-space:pre-wrap;overflow-wrap:anywhere;font-size:clamp(20px,2.5vw,26px);line-height:1.8;color:#342466;padding:2px}.preview-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none}.preview-actions .button{margin:0;min-height:52px;padding:7px 5px;font-size:17px;border-radius:12px}.preview-actions .button>span{gap:5px}.preview-actions .button small{font-size:11px}.preview-status .footnote{font-size:10px;margin:2px 0 0}.preview-status .voice-status{max-height:72px;overflow:auto}.preview-status .text-button{padding:5px;min-height:36px}.preview-status .button{margin:0;min-height:44px;padding:7px;font-size:16px}@media(min-width:700px),(min-width:600px)and (max-height:500px){.passage-previews{grid-template-columns:1fr 1fr;grid-auto-rows:minmax(0,max-content)}.shell.passages-shell{max-width:1100px!important}}@media(max-width:359px){.passage-preview{padding:8px;gap:5px}.passage-previews{gap:8px;grid-auto-rows:minmax(0,max-content)}.preview-actions{gap:5px}.preview-actions .button{font-size:15px}.preview-actions .button svg{width:16px}.preview-text{font-size:20px}.passages-shell .preview-intro .muted{font-size:12px}}.practice-stage .answer.ting-answer{display:flex;font-size:clamp(40px,7vw,72px);font-weight:750;line-height:1.5;color:#302357;padding:16px}.ting-answer>span{display:block;max-width:100%;margin:auto;overflow-wrap:anywhere}.practice-stage .passage{font-size:clamp(32px,5.8vw,48px);font-weight:500;line-height:1.75;overflow-wrap:anywhere}.practice-stage .passage .highlight{font-weight:800}.library-shell{max-width:760px!important}.library-shell>.button{margin:0;min-height:52px;font-size:18px;padding:7px}.library-intro{font-size:18px}.library-intro small{font-size:13px;margin:0}.library-tools{display:flex;gap:8px;align-items:center}.search-field{display:flex;flex:1;gap:8px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:0 12px;color:var(--muted)}.search-field input{width:100%;min-width:0;min-height:44px;border:0;background:transparent;color:inherit;font-size:16px}.library-filters{display:flex;gap:6px;flex-wrap:wrap}.library-filters button{border:1px solid var(--line);border-radius:10px;background:#fff;min-height:40px;padding:7px 12px;font-size:14px;color:inherit}.library-filters button[aria-pressed=true]{color:#fff;background:var(--accent);border-color:var(--accent)}.library-entries{flex:1!important;min-height:0;overflow:auto;overscroll-behavior:contain}.library-entry{display:flex;align-items:center;gap:12px;width:100%;padding:16px 0;text-align:left;border:0;border-bottom:1px solid var(--line);background:#fff;color:inherit}.library-entry>span:nth-child(2){flex:1;min-width:0}.library-entry strong{display:block;overflow-wrap:anywhere;font-size:19px;line-height:1.5;margin:3px 0}.library-entry small{font-size:13px;color:var(--muted)}.library-entry-icon{display:grid;place-items:center;flex-shrink:0;width:46px;height:54px;background:var(--lavender);color:var(--accent);border-radius:10px}.library-empty{text-align:center;padding:30px 12px;color:var(--muted)}.library-empty h2{font-size:21px;color:#27233d;margin:12px 0}.library-empty p{font-size:15px}.library-shell>.footnote{margin:0;font-size:11px}.library-shell>.error{margin:0;max-height:80px;overflow:auto}.home-shell .library-link{border:1px solid var(--line);border-radius:12px;width:100%;font-weight:650;font-size:16px}.home-shell .manual-entry{min-height:32px}.home-shell .closing{display:none}@media(min-width:800px),(min-width:600px)and (max-height:500px){.home-shell .library-link{grid-column:2;grid-row:4;align-self:end;margin:0}.home-shell .closing{display:none}}@media(max-width:359px){.library-filters{gap:4px}.library-filters button{padding:6px 10px}.library-entry strong{font-size:17px}}.library-entry-row{display:flex;gap:8px;align-items:center;border-bottom:1px solid var(--line)}.library-entry-row .library-entry{flex:1;min-width:0;border-bottom:0}.library-delete{display:flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;min-width:64px;min-height:48px;border:0;border-radius:10px;background:#fff0f3;color:#a1344d;padding:8px;font-size:14px}.library-delete small{font-size:10px;line-height:1.3}.library-delete:hover:not(:disabled){background:#ffe2e8}.library-entry>svg{flex-shrink:0}@media(max-width:390px){.library-entry-row{gap:5px}.library-entry-row .library-entry{gap:8px}.library-entry-row .library-entry-icon{width:32px;height:44px}.library-entry-row .library-entry strong{font-size:16px}.library-entry-row .library-entry small{font-size:11px}.library-delete{min-width:55px;padding:6px;gap:3px}.library-delete svg{width:16px}}.library-sort{display:flex;align-items:center;gap:12px;margin:16px 0;font-size:14px;color:var(--muted)}.library-sort select{min-width:0;flex:1;padding:10px;border:1px solid #ddd;border-radius:10px;background:#fff;color:inherit}.library-selection{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0;font-size:13px;border-bottom:1px solid #eee}.library-selection label{display:flex;align-items:center;gap:8px}.library-selection input,.library-check{width:20px;height:20px;accent-color:#6356b7;flex-shrink:0}.library-selection button{border:0;border-radius:8px;padding:10px;background:#f1eff9;color:#55479b;cursor:pointer}.library-selection .bulk-delete{display:flex;gap:5px;align-items:center;background:#fff1f3;color:#a33e58}.library-actions{display:flex;gap:6px;align-items:center}.library-edit{display:flex;align-items:center;gap:5px;border:0;border-radius:10px;background:#f1eff9;color:#55479b;padding:10px;min-height:48px;cursor:pointer}.library-edit small{display:block;font-size:10px}.library-check{margin-right:4px}.library-entry{padding-left:6px}.library-entry>span:nth-child(2){min-width:0;overflow-wrap:anywhere}@media(max-width:540px){.library-entry-icon{display:none}.library-actions{flex-direction:column;gap:4px}.library-edit,.library-actions .library-delete{padding:6px;min-height:40px;min-width:60px}.library-entry-row{gap:4px}.library-entry strong{font-size:16px}.library-entry>svg{display:none}.library-selection{gap:8px}.library-sort{flex-wrap:wrap}}.arrange-help{font-size:12px;color:var(--muted);margin:0;min-height:18px}.reorder-controls{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.reorder-controls button{border:0;background:transparent;color:#71649e;padding:4px;cursor:pointer}.reorder-controls .drag-handle{touch-action:none;cursor:grab;padding:8px 5px}.reorder-controls button:disabled{opacity:.3;cursor:default}.reorder-controls>div{display:flex}.library-entry-row.is-dragging{opacity:.55;background:#f5f2ff}.library-entry-row.drag-target{box-shadow:inset 0 -3px #7360c1}.drag-handle:active{cursor:grabbing}@media(max-width:540px){.reorder-controls>div{flex-direction:column}.reorder-controls .drag-handle{padding:5px 0}.reorder-controls button{padding:3px}.library-check{width:18px;height:18px}.library-entry-row{gap:2px}}.pdf-upload{align-self:center;display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px}.pdf-review-status{background:#f3f0ff;border:1px solid #ded8f5;border-radius:14px;padding:16px;margin-bottom:20px}.pdf-review-status strong,.pdf-review-status small{display:block}.pdf-review-status span{font-size:13px;color:var(--muted)}.pdf-review-status small{overflow-wrap:anywhere;margin-top:8px}.pdf-review-status p{font-size:14px}.pdf-review-status .text-button{display:inline-block;margin-right:14px}.pdf-source{margin:20px 0}.pdf-source h2{font-size:17px}.pdf-source img{width:100%;height:auto;border:1px solid #ddd;border-radius:8px}.pdf-complete{padding:30px 0;text-align:center}@media(min-width:1000px){.shell:has(.pdf-review-status){max-width:1200px;display:grid;grid-template-columns:1fr 1fr;gap:10px 28px;align-items:start}.shell:has(.pdf-review-status)>*{grid-column:2}.shell:has(.pdf-review-status)>.pdf-review-status{grid-column:1/-1}.shell:has(.pdf-review-status)>.pdf-source{grid-column:1;grid-row:2/25;position:sticky;top:12px}}.item-classification{margin:0 0 28px;padding:16px;border:1px solid #ddd6ef;border-radius:16px;background:#faf8ff}.item-classification summary{cursor:pointer;color:#6551a4;font-weight:600}.classification-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e9e3f3}.classification-row:last-child{border:0}.classification-row span{min-width:0;overflow-wrap:anywhere}.classification-row select{flex:0 0 96px;min-height:44px;padding:8px;border:1px solid #d4cbe5;border-radius:10px;background:#fff;font:inherit}.editor-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px;margin:8px 0 24px}.editor-meta .field{margin:0;font-size:13px;gap:5px}.editor-meta .field input,.editor-meta .field select{padding:10px 12px;font-size:16px;min-height:44px}.editor-title,.editor-date{grid-column:1/-1}.editor-items{min-width:0;width:100%}.editor-items-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.editor-items-heading h2{font-size:19px}.editor-items-heading span{font-size:13px;color:var(--muted);white-space:nowrap}.editor-help{font-size:13px;color:var(--muted);margin:5px 0 12px}.editor-item-list{border:1px solid var(--line);border-radius:12px;overflow:hidden}.editor-item{display:grid;grid-template-columns:minmax(0,1fr) 76px 34px;gap:8px;align-items:start;padding:10px;border-bottom:1px solid var(--line)}.editor-item:last-child{border:0}.editor-item textarea{width:100%;min-width:0;resize:vertical;border:1px solid transparent;border-radius:7px;background:#faf9fc;padding:9px 8px;font-size:17px;line-height:1.55;min-height:44px;color:inherit}.editor-item textarea:focus{border-color:#aa98dd;background:#fff}.editor-item select{width:100%;height:44px;border:1px solid #e0d9ec;border-radius:8px;background:#fff;color:var(--accent);padding:6px;font-size:14px}.item-remove{display:grid;place-items:center;width:34px;height:44px;border:0;background:transparent;color:#958ba5;border-radius:8px}.item-remove:hover{color:#a1344d;background:#fff1f3}.editor-add{display:flex;justify-content:center;align-items:center;gap:6px;width:100%;min-height:44px;margin-top:10px;border:1px dashed #cfc4e6;border-radius:10px;background:#faf8ff;color:var(--accent);font-size:14px}.shell:has(.editor-items):not(:has(.pdf-review-status)){max-width:680px}@media(max-width:390px){.editor-item{grid-template-columns:minmax(0,1fr) 66px 30px;gap:4px;padding:8px}.editor-item textarea{font-size:16px}.editor-item select{font-size:13px}.item-remove{width:30px}}.home-actions{display:flex;flex-direction:column;gap:8px;min-width:0;width:100%}.home-shell .home-actions>.text-button{width:100%;margin:0;min-height:42px;font-size:15px;white-space:normal}.home-actions .pdf-upload{border:1px solid var(--line);border-radius:12px}.home-actions .manual-entry{font-size:13px!important}@media(min-width:800px),(min-width:600px)and (max-height:500px){.home-shell{grid-template-rows:auto auto auto minmax(136px,1fr) auto auto}.home-shell .photo-panel{grid-column:1;grid-row:3/6}.home-shell .current-lesson{grid-column:2;grid-row:3}.home-shell .mode-list{grid-column:2;grid-row:4;margin-top:0;align-self:center}.home-shell .home-actions{grid-column:2;grid-row:5}.home-shell>.footnote{grid-column:1/-1;grid-row:6}.home-shell .home-actions .processing,.home-shell .home-actions>.error{grid-column:auto;grid-row:auto}}.library-shell{max-width:1200px!important}.library-workspace{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px;flex:1!important;min-height:0;overflow:hidden}.library-sidebar{display:flex;flex-direction:column;gap:14px;min-width:0;overflow:auto;padding:18px;background:#f8f7fc;border:1px solid var(--line);border-radius:16px}.library-sidebar .library-intro{margin:0;font-size:19px;line-height:1.5}.library-sidebar .library-intro small{display:block;font-size:12px;line-height:1.5;margin-top:5px}.library-sidebar>.button{font-size:17px;min-height:58px;padding:10px;margin:0}.library-sidebar>.pdf-upload{font-size:13px;min-height:42px;margin:0}.library-sidebar .library-filters{gap:5px}.library-sidebar .library-filters button{padding:7px 9px;font-size:13px}.library-sidebar .library-sort{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0}.library-sidebar .arrange-help{line-height:1.6}.library-documents{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.library-documents-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0}.library-documents-heading h2{font-size:20px;margin:0}.library-documents-heading>span{font-size:14px;color:var(--muted)}.library-documents .library-selection{padding:10px 0;gap:8px}.library-documents>.error{flex-shrink:0}.library-documents .library-entries{flex:1;min-height:0;overflow:auto}.library-documents .library-entry strong{font-size:18px}.library-documents .library-entry-icon{width:36px;height:44px}@media(max-width:759px){.library-workspace{display:flex;flex-direction:column;overflow:visible;gap:16px;flex:none!important}.library-sidebar{overflow:visible;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.library-sidebar .library-intro,.library-sidebar .library-tools,.library-sidebar .library-filters,.library-sidebar .arrange-help{grid-column:1/-1}.library-sidebar .library-intro{font-size:17px}.library-sidebar>.button{font-size:15px;min-height:52px}.library-sidebar>.button small{font-size:11px}.library-sidebar>.pdf-upload{font-size:12px;white-space:normal;line-height:1.5}.library-sidebar .library-sort{font-size:12px}.library-sidebar .library-sort select{width:100%;font-size:12px;padding:9px 5px}.library-documents{overflow:visible;min-height:220px}.library-documents .library-entries{overflow:visible;flex:none!important}.library-documents .library-entry strong{font-size:16px}.library-shell>.footnote{padding:12px 0}}@media(min-width:760px){.library-workspace{grid-template-columns:clamp(220px,var(--library-panel-width,25%),45%) 24px minmax(0,1fr);gap:0}.library-divider{display:flex;align-items:center;justify-content:center;cursor:col-resize;touch-action:none;outline:none;border-radius:8px}.library-divider span{width:4px;height:56px;border-radius:4px;background:#d7d0e8;transition:background .15s,height .15s}.library-divider:hover span,.library-divider:focus-visible span,.is-resizing .library-divider span{background:var(--accent);height:80px}.library-divider:focus-visible{box-shadow:inset 0 0 0 2px #c6b8ed}.library-workspace.is-resizing{-webkit-user-select:none;user-select:none;cursor:col-resize}}@media(max-width:759px){.library-divider{display:none}}.library-entry small.attempt-count{display:block;color:#6251a5;font-weight:600;margin:2px 0}.attempt-status{font-size:14px;color:var(--muted);text-align:center}.optional-label{font-size:12px;font-weight:400;color:var(--muted)}.library-actions .attempt-count{display:inline-flex;align-items:center;gap:9px;min-width:108px;margin:5px 0;padding:6px 12px;border:1px solid #c9b9f0;border-radius:10px;background:#eee7ff;color:#57408d;vertical-align:middle}.library-actions .attempt-count b{font-size:26px;line-height:1.1;font-variant-numeric:tabular-nums}.library-actions .attempt-count>span{font-size:12px;line-height:1.3;font-weight:650}.library-actions .attempt-count small{display:block;font-size:10px;color:#6e579e;font-weight:400}.library-actions .attempt-count{flex-shrink:0;min-width:78px;min-height:48px;margin:0;padding:6px 8px;gap:6px}.library-actions .attempt-count b{font-size:23px}.library-actions .attempt-count>span{font-size:11px}.library-actions .attempt-count small{font-size:9px}@media(max-width:540px){.library-actions{display:grid;grid-template-columns:repeat(3,auto);gap:4px}.library-entry-row{flex-wrap:nowrap}.library-actions{margin-left:auto}.library-actions .library-edit,.library-actions .library-delete{min-width:30px;width:30px;padding:5px}.library-actions .library-edit>span,.library-actions .library-delete>span{display:none}.library-actions .attempt-count{min-width:72px;min-height:40px;padding:4px 7px}}.mistake-library-link{border:1px solid #c9b9f0;border-radius:10px;background:#eee7ff;color:#57408d;font-size:17px;font-weight:650;padding:10px;min-height:50px;cursor:pointer}.mistake-library-link small{display:block;font-size:11px;font-weight:400;margin-top:3px}.mistakes-shell{max-width:1100px!important}.mistake-review{display:grid;grid-template-columns:310px minmax(0,1fr);gap:24px;min-height:0;flex:1!important}.mistake-controls{padding:20px;border:1px solid var(--line);border-radius:14px;background:#f8f7fc;overflow:auto}.mistake-intro>svg{color:var(--accent)}.mistake-intro h2{font-size:21px;margin:12px 0}.mistake-intro p{font-size:14px;line-height:1.6}.mistake-intro small{display:block;color:var(--muted);font-size:12px}.mistake-dates{display:grid;gap:12px;margin:20px 0}.mistake-dates .field{margin:0;font-size:13px}.mistake-dates input{min-width:0;width:100%;font:inherit;min-height:44px}.mistake-controls .button{font-size:17px;padding:10px;min-height:48px}.mistake-note{font-size:12px;color:var(--muted);line-height:1.8;margin-top:18px}.mistake-results{display:flex;flex-direction:column;min-width:0;min-height:0}.mistake-results-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.mistake-results-heading h2{font-size:21px}.mistake-results-heading>span{font-size:13px;color:var(--muted)}.mistake-select-all{font-size:14px;padding:8px 0}.mistake-word-list{flex:1;min-height:0;overflow:auto;margin:8px 0 16px}.mistake-word{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}.mistake-word>span:first-of-type{flex:1;min-width:0}.mistake-word strong{font-size:22px}.mistake-word small{display:block;font-size:12px;color:var(--muted);overflow-wrap:anywhere;margin-top:5px}.mistake-word input,.mistake-select-all input{width:20px;height:20px;accent-color:var(--accent);flex-shrink:0}.wrong-count{background:#fff0e6;color:#995322;border-radius:8px;padding:7px 9px;font-size:13px;white-space:nowrap}.mistake-results>.button{font-size:18px;min-height:56px}@media(max-width:759px){.library-sidebar .mistake-library-link{grid-column:1/-1}.mistake-review{display:flex;flex-direction:column;flex:none!important}.mistake-controls{overflow:visible;padding:16px}.mistake-dates{grid-template-columns:1fr 1fr;gap:10px}.mistake-results,.mistake-word-list{overflow:visible}.mistake-results>.button{position:sticky;bottom:10px}.mistake-word{gap:8px}}
