:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--background:#f7f8f3;--ink:#18221b;--muted:#607067;--panel:#fff;--line:#d9ded2;--accent:#2f6f9f;--accent-strong:#1f527a;--node:#fff;--node-border:#b8c8d8;--warm:#8b5e25;--subject:#f0f7ff;--predicate:#f4fbf1;--graph-bg:#070b12;--graph-panel:#0b1018;--graph-border:#253144;--graph-text:#e8edf6}*{box-sizing:border-box}body{background:var(--background);color:var(--ink);margin:0;font-family:Arial,Helvetica,sans-serif}button,textarea,select{font:inherit}.pageShell{grid-template-columns:minmax(280px,330px) minmax(0,1fr);min-height:100vh;display:grid;position:relative}.githubCorner{z-index:20;color:var(--ink);opacity:.6;transition:opacity .15s;position:absolute;top:14px;right:14px}.githubCorner:hover{opacity:1}.gramtreeHome{background:#fff;justify-content:center;align-items:center;min-height:100dvh;padding:clamp(24px,5vw,72px);display:flex;position:relative}.practiceHome{align-items:stretch;height:100dvh;padding:0;overflow:hidden}.homeInternalMenu{z-index:10;justify-items:end;gap:8px;width:min(280px,100vw - 40px);display:grid;position:absolute;top:18px;right:20px}.internalLink{color:#64748b;background:#ffffffdb;border:1px solid #e2e8f0;border-radius:999px;padding:7px 12px;font-size:.78rem;font-weight:900;text-decoration:none;box-shadow:0 8px 20px #0f172a0f}.internalLink:hover{color:#334155;border-color:#cbd5e1}.audioCheckBack{color:#475569;background:#ffffffe6;border:1px solid #dbe3ec;border-radius:999px;padding:8px 12px;font-size:.85rem;font-weight:900;text-decoration:none;box-shadow:0 10px 24px #0f172a14}.audioCheckBack:hover{color:#1d4ed8;border-color:#bfdbfe}.providerBadge{letter-spacing:.08em;border-radius:999px;justify-content:center;align-items:center;min-width:42px;padding:5px 10px;font-size:.72rem;font-weight:1000;display:inline-flex}.providerBadge.srp{color:#475569;background:#f8fafc;border:1px solid #cbd5e1}.audioCheckPage{color:#0f172a;background:radial-gradient(circle at 12% 12%,#3b82f61f,#0000 34%),linear-gradient(135deg,#f8fafc,#eef4ff);height:100dvh;padding:clamp(12px,2.4vh,24px) clamp(16px,3vw,36px);overflow:hidden}.audioCheckShell{flex-direction:column;gap:clamp(12px,2.4vh,22px);width:min(100%,680px);height:100%;margin:0 auto;padding-top:clamp(8px,2vh,20px);display:flex}.audioStepDots{flex:none;justify-content:center;gap:10px;display:flex}.audioStepDots span{background:#dbe3ec;border-radius:999px;width:36px;height:6px;transition:background .2s}.audioStepDots span.active{background:#2563eb}.audioStepDots span.done{background:#93c5fd}.audioStep{text-align:center;flex:auto;align-content:center;justify-items:center;gap:clamp(14px,2.6vh,24px);min-height:0;display:grid}.audioStepKicker{color:#2563eb;letter-spacing:.12em;text-transform:uppercase;margin:0;font-size:.78rem;font-weight:1000}.audioStep h1{max-width:none;margin:0;font-size:clamp(1.8rem,4.5vw,2.8rem);line-height:1.05}.audioStepHint{color:#64748b;max-width:28rem;margin:0;font-size:clamp(.95rem,2vw,1.1rem);font-weight:750;line-height:1.5}.audioCheckRunButton{color:#fff;cursor:pointer;background:linear-gradient(135deg,#2563eb,#38bdf8);border:0;border-radius:999px;min-height:56px;padding:0 28px;font-size:1.05rem;font-weight:1000;box-shadow:0 16px 38px #2563eb38}.audioCheckRunButton:disabled{cursor:wait;opacity:.68}.audioTestWord{justify-items:center;gap:6px;display:grid}.audioTestWord span{color:#64748b;background:#f1f5f9;border-radius:8px;padding:3px 8px;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-weight:900}.audioTestWord strong{color:#0f172a;font-size:clamp(2.6rem,9vw,5rem);line-height:.95}.audioCheckMicButton{flex:none}.audioCheckMessage{color:#64748b;text-align:center;margin:0;font-size:clamp(1rem,3vw,1.2rem);font-weight:900}.audioCheckPlayback{width:min(100%,440px)}.audioStepNav{justify-content:center;align-items:center;gap:12px;margin-top:clamp(4px,1.4vh,12px);display:flex}.audioStepNext,.audioStepBack{cursor:pointer;border-radius:999px;min-height:52px;padding:0 28px;font-size:1rem;font-weight:1000}.audioStepNext{color:#fff;background:linear-gradient(135deg,#2563eb,#38bdf8);border:0;box-shadow:0 16px 38px #2563eb38}.audioStepNext:disabled{cursor:not-allowed;color:#f8fafc;box-shadow:none;background:#cbd5e1}.audioStepBack{color:#475569;background:#ffffffe6;border:1px solid #dbe3ec;font-weight:900}.audioStepNav .audioCheckBack{align-items:center;min-height:52px;padding:0 24px;font-size:1rem;display:inline-flex}.audioScore{align-items:baseline;gap:8px;display:flex}.audioScore strong{color:#2563eb;font-size:clamp(3rem,9vw,4.4rem);font-weight:1000;line-height:1}.audioScore span{color:#94a3b8;font-size:clamp(1rem,2.4vw,1.3rem);font-weight:1000}.audioVerdict{border-radius:999px;margin:0;padding:8px 18px;font-size:clamp(.92rem,2vw,1.05rem);font-weight:1000}.audioVerdict.ok{color:#15803d;background:#dcfce7}.audioVerdict.bad{color:#b91c1c;background:#fee2e2}.audioStageSummary{text-align:left;gap:clamp(8px,1.6vh,12px);width:min(100%,560px);display:grid}.audioStageCard{background:#ffffffeb;border:1px solid #e2e8f0;border-radius:18px;padding:clamp(12px,1.8vh,16px)}.audioStageCard.bad{background:#fef2f28c;border-color:#fecaca}.audioStageHead{justify-content:space-between;align-items:center;gap:12px;display:flex}.audioStageHead strong{color:#0f172a;font-size:clamp(.95rem,1.8vw,1.1rem)}.audioStageHead span{color:#15803d;background:#dcfce7;border-radius:999px;flex:none;padding:4px 10px;font-size:.74rem;font-weight:1000}.audioStageCard.bad .audioStageHead span{color:#b91c1c;background:#fee2e2}.audioStageOk{color:#64748b;margin:6px 0 0;font-size:.86rem;font-weight:800}.audioStageCard ul{gap:8px;margin:8px 0 0;padding:0;list-style:none;display:grid}.audioStageCard li{gap:2px;display:grid}.audioStageCard li strong{color:#b91c1c;font-size:.92rem}.audioStageCard li span{color:#7f1d1d;font-size:.84rem;font-weight:700;line-height:1.4}.homeStartPanel{flex-direction:column;justify-content:center;align-items:center;gap:clamp(24px,4vh,42px);width:min(100%,1680px);display:flex}.homePracticeModes{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:min(100%,680px);display:grid}.homePracticeMode{color:#111827;cursor:pointer;text-align:left;background:#fff;border:1px solid #dbe3ec;border-radius:12px;flex-direction:column;justify-content:center;align-items:flex-start;gap:6px;min-height:78px;padding:14px 18px;transition:border-color .16s,box-shadow .16s,transform .16s;display:flex;box-shadow:0 16px 36px #0f172a14}.homePracticeMode:hover,.homePracticeMode:focus-visible{border-color:#93c5fd;transform:translateY(-2px);box-shadow:0 20px 42px #2563eb24}.homePracticeMode:focus-visible{outline-offset:3px;outline:3px solid #2563eb3d}.homePracticeMode:active{transform:translateY(1px)}.homePracticeMode strong{font-size:1.08rem;font-weight:1000}.homePracticeMode span{color:#64748b;font-size:.9rem;font-weight:800;line-height:1.35}.primaryMode{background:#eff6ff;border-color:#bfdbfe}.sentenceImportPanel{background:#f8fafc;border:1px solid #dbe3ec;border-radius:12px;gap:12px;width:min(100%,680px);padding:14px;display:grid;box-shadow:0 16px 36px #0f172a0f}.sentenceImportHeader{justify-content:space-between;align-items:center;gap:12px;display:flex}.sentenceImportHeader div:first-child{gap:3px;display:grid}.sentenceImportHeader strong{color:#111827;font-size:1rem;font-weight:1000}.sentenceImportHeader span{color:#64748b;font-size:.82rem;font-weight:850}.sentenceImportHeaderActions,.sentenceImportActions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.sentenceTemplateTools{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;display:grid}.sentenceTemplateField{gap:6px;display:grid}.sentenceTemplateField span{color:#64748b;font-size:.78rem;font-weight:900}.sentenceTemplateField select{color:#334155;cursor:pointer;background:#fff;border:1px solid #cbd5e1;border-radius:8px;outline:none;width:100%;min-height:38px;padding:8px 34px 8px 11px;font-size:.84rem;font-weight:900}.sentenceTemplateField select:focus-visible{border-color:#93c5fd;box-shadow:0 0 0 3px #2563eb2e}.sentenceImportPanel button{color:#334155;cursor:pointer;background:#fff;border:1px solid #cbd5e1;border-radius:8px;min-height:36px;padding:8px 11px;font-size:.84rem;font-weight:900;transition:border-color .16s,box-shadow .16s,transform .16s}.sentenceImportPanel button:hover,.sentenceImportPanel button:focus-visible{border-color:#93c5fd;box-shadow:0 10px 22px #2563eb1f}.sentenceImportPanel button:focus-visible{outline-offset:2px;outline:3px solid #2563eb38}.sentenceImportPanel button:active{transform:translateY(1px)}.sentenceImportPanel button:disabled{opacity:.52;cursor:not-allowed;box-shadow:none;transform:none}.sentenceImportPanel .primaryImportButton{color:#fff;background:#2563eb;border-color:#2563eb}.sentenceImportTextarea,.importPromptTextarea{color:#111827;min-height:116px;box-shadow:none;background:#fff;border-color:#cbd5e1;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.82rem;line-height:1.5}.sentenceImportTextarea::placeholder{color:#94a3b8}.importPromptTextarea{color:#7c2d12;background:#fff7ed;min-height:146px}.sentenceImportAlert{color:#7c2d12;background:#fff7ed;border:1px solid #fecaca;border-radius:10px;gap:9px;padding:48px 12px 12px;display:grid;position:relative}.sentenceImportAlert strong{color:#991b1b;font-size:.92rem;font-weight:1000}.sentenceImportAlert p{margin:0;padding-right:4px;font-size:.84rem;font-weight:850;line-height:1.45}.sentenceImportPanel .copyImportPromptButton{color:#9a3412;background:#fff;border-color:#fed7aa;position:absolute;top:10px;right:10px}.sentenceImportAlert .importPromptTextarea{background:#fff;border-color:#fed7aa;min-height:132px}.sentenceImportSummary,.sentenceImportError{color:#15803d;margin:0;font-size:.84rem;font-weight:850;line-height:1.4}.sentenceImportError{color:#dc2626}.practiceShell{background:#fff;border:1px solid #e5e7eb;border-radius:0;grid-template-rows:88px minmax(0,1fr) 86px;width:100%;min-height:100dvh;display:grid;position:relative;overflow:hidden}.practiceTopBar{border-bottom:1px solid #eef2f7;justify-content:space-between;align-items:center;gap:16px;height:88px;padding:0 clamp(18px,2.8vw,56px);display:flex}.practiceTopBar strong{color:#6b7280;font-size:clamp(1rem,1.35vw,1.55rem);font-weight:900;line-height:1.3}.practiceTopBar span{color:#f59e0b;font-size:clamp(1.5rem,2.1vw,2.3rem);font-weight:900}.practiceProgress{border:2px solid #d1d5db;border-radius:999px;height:10px;position:absolute;top:109px;left:clamp(18px,2.8vw,56px);right:clamp(18px,2.8vw,56px);overflow:hidden}.practiceProgress span{border-radius:inherit;background:#a855f7;height:100%;transition:width .2s;display:block}.practiceCenter{justify-content:center;align-items:center;min-height:0;padding:72px 20px 40px;display:flex;position:relative;overflow:hidden}.readPracticeShell{grid-template-rows:clamp(64px,9dvh,88px) minmax(0,1fr)}.readPracticeShell .practiceTopBar{height:clamp(64px,9dvh,88px)}.readPracticeShell .practiceTopBar strong{font-size:clamp(.98rem,1.2vw,1.35rem)}.readPracticeShell .practiceProgress{top:clamp(78px,9dvh + 14px,109px)}.readSplit{grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:clamp(12px,2vw,30px);height:100%;min-height:0;padding:clamp(28px,5dvh,48px) clamp(14px,2.4vw,40px) clamp(12px,2dvh,22px);display:grid;position:relative}.readSplitLeft{flex-direction:column;justify-content:center;align-items:center;gap:clamp(6px,1.3dvh,14px);min-height:0;display:flex;position:relative;overflow:hidden}.readSplitLeft .readPracticeShortcuts{height:auto;margin-top:clamp(2px,1dvh,10px);padding:4px 10px 8px;position:static}.readSplitLeft .readPracticeToken .homeBuilderToken{max-width:min(100%,24rem)}.readSplitLeft .readPracticeToken .homeWordBlock{inline-size:min(100%,24rem)}.readSplitRightPane{border-left:1px solid #eef2f7;grid-template-rows:minmax(0,1fr) auto;gap:clamp(8px,1.4vh,16px);height:100%;min-height:0;padding-right:clamp(76px,9vw,112px);display:grid;position:relative}.readSplitRightPane:before{content:"";z-index:4;pointer-events:none;background:linear-gradient(90deg,#0000,#64748b57,#0000);height:1px;position:absolute;top:50%;left:0;right:clamp(76px,9vw,112px)}.readSplitRight{overscroll-behavior:contain;scrollbar-width:none;scroll-snap-type:y proximity;scroll-behavior:smooth;flex-direction:column;gap:clamp(8px,1.4vh,16px);height:100%;min-height:0;padding:40vh 6px 40vh 0;display:flex;overflow-y:auto}.readSplitRight::-webkit-scrollbar{display:none}.readUpcomingPreview{pointer-events:none;padding:0 6px 0 0}.readParagraphMinimap{background:linear-gradient(90deg,#f8fafc7a,#ffffffdb 28%);border-left:1px solid #e5e7eb;width:clamp(64px,8vw,96px);position:absolute;top:0;bottom:0;right:0;overflow:hidden}.readParagraphMinimapContent{flex-direction:column;gap:1px;padding:3px 2px 3px 5px;display:flex}.readParagraphMinimapLine{color:#aeb6c2;white-space:nowrap;border-radius:2px;min-height:5px;font-size:4px;font-weight:800;line-height:1.15;overflow:hidden}.readParagraphMinimapLine.done{color:#94a3b8}.readParagraphMinimapLine.active{color:#6366f1;background:#6366f11a;border:1px solid #6366f142}.readUpcomingPreview .readParagraphItem{background:#fff}.readParagraphItem{scroll-snap-align:center;border-left:3px solid #0000;border-radius:0 12px 12px 0;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:12px;padding:14px clamp(12px,1.6vw,22px);transition:opacity .25s,background .25s,border-color .25s,transform .25s;display:grid}.readParagraphIndex{color:#cbd5e1;font-variant-numeric:tabular-nums;min-width:20px;font-size:.82rem;font-weight:900}.readParagraphChinese{color:#475569;margin:0;font-size:clamp(.95rem,1.35vw,1.22rem);font-weight:850;line-height:1.45}.readParagraphItem.upcoming{opacity:.38}.readParagraphItem.active{background:#f8fafc;border-left-color:#818cf8;transform:translate(2px)}.readParagraphItem.active .readParagraphIndex{color:#6366f1}.readParagraphItem.active .readParagraphChinese{color:#334155}.readParagraphItem.done .readParagraphChinese{color:#64748b}.readParagraphItem.done .readParagraphIndex{color:#94a3b8}.readResultInline{justify-content:center;width:100%;display:flex}.readResultInline .resultModal{width:min(100%,30rem);box-shadow:none}@media (max-width:860px){.readSplit{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);gap:clamp(8px,1.5dvh,12px);padding:clamp(24px,4dvh,36px) 14px 12px}.readSplitLeft{justify-content:flex-start;gap:clamp(5px,1dvh,10px)}.readSplitRightPane{border-top:1px solid #eef2f7;border-left:none;padding-right:72px}.readSplitRightPane:before{right:72px}.readSplitRight{padding:26vh 0}.readUpcomingPreview{padding:0}}.perfectStreak{z-index:30;text-align:center;color:#f97316;pointer-events:none;font-size:clamp(2.2rem,4vw,3.5rem);font-weight:1000;animation:1s ease-out both perfectSlideIn;position:absolute;top:20px;left:0;right:0}@keyframes perfectSlideIn{0%{opacity:0;transform:translateY(-30px)}25%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-15px)}}.practiceInputStage{color:#111827;text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:clamp(16px,3vh,26px);display:flex}.practiceInputStage h1{color:#111827;max-width:min(86vw,980px);margin:0;font-size:clamp(2.4rem,4vw,4.6rem);font-weight:900;line-height:1.05}.practiceTypingHint{color:#a6adba;text-shadow:0 0 10px #a6adba29;will-change:transform,color,text-shadow;margin:0;font-size:clamp(1.1rem,1.7vw,1.7rem);font-weight:900;animation:2.4s ease-in-out infinite promptFloat}.practiceWordInputs{flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:clamp(12px,2.2vw,22px);max-width:min(90vw,980px);margin-top:clamp(28px,8vh,72px);display:flex}.practiceWordInput{flex-direction:column;align-items:center;gap:9px;min-width:clamp(80px,10vw,160px);display:flex}.practiceStaticText{color:#94a3b8;white-space:pre;-webkit-user-select:none;user-select:none;align-items:center;min-height:clamp(2.2rem,4vw,4.4rem);font-size:clamp(2rem,4vw,4.4rem);font-weight:900;line-height:1;display:inline-flex}.practiceWordValue{text-align:center;white-space:pre;justify-content:center;align-items:center;min-height:clamp(2.2rem,4vw,4.4rem);font-size:clamp(2rem,4vw,4.4rem);font-weight:900;line-height:1;display:inline-flex}.practiceTypedValue{min-height:inherit;color:#111827;justify-content:center;align-items:center;display:inline-flex}.revealedWordValue{font-style:italic}.practiceAnswerChar{color:#94a3b8;opacity:.62;-webkit-user-select:none;user-select:none}.typedMatchChar{color:#111827;opacity:1;font-style:normal}.typedMismatchChar,.typedOverflowChars{color:#ef4444;opacity:1;font-style:normal}.practiceWordInput i{background:#d1d5db;border-radius:999px;width:100%;height:4px;transition:background .16s,transform .16s}.answerPlaceholderSlot i{background:repeating-linear-gradient(90deg,#cbd5e1 0 10px,#0000 10px 16px)}.activeWordInput i{background:#a855f7;transform:scaleX(1.04)}.inputError .practiceWordInputs{animation:.3s inputShake}.inputError .practiceTypingHint,.inputError .practiceTypedValue,.inputError .typedMatchChar,.inputError .typedMismatchChar,.inputError .typedOverflowChars{color:#ef4444}.inputError .activeWordInput i{background:#ef4444}.readPracticeStage{color:#111827;text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:clamp(6px,1.1dvh,11px);width:min(100%,620px);max-height:100%;display:flex}.readPracticeToken{border:0;gap:clamp(7px,1.1dvh,10px);width:auto;min-height:0;padding:0}.readPracticeToken .builderPrompt{display:none}.readPracticeToken .homeWordStrip{row-gap:clamp(6px,1dvh,10px)}.readPracticeToken .homeBuilderToken{max-width:min(82vw,24rem)}.readPracticeToken .contextToken{opacity:.58;transform:scale(.92)}.readPracticeToken .recognizedToken{opacity:1}.readPracticeToken .recognizedToken .homeWordBlock{color:#14532d;background:#dcfce7}.readPracticeToken .recognizedToken .homeWordText{color:#14532d}.readPracticeToken .recognizedToken .grammarUnderline{background:#22c55e}.phraseReadToken .contextToken .homeWordBlock{background:#f1f5f9}.phraseReadToken .contextToken .grammarUnderline{background:#cbd5e1}.readPracticeToken .homeWordBlock{inline-size:min(82vw,24rem);max-inline-size:100%;container-type:inline-size}.readPracticeToken .homeWordText{max-inline-size:100%;font-size:clamp(1.95rem,calc(72cqi/max(var(--word-length,6),6)),4.35rem);overflow-wrap:normal;white-space:nowrap;line-height:.95}.readPracticeToken .homeSentenceTranslation{color:#64748b;margin-top:0;font-size:clamp(.98rem,2.4vw,1.35rem);font-weight:900}.readPracticeToken .homeChineseGloss{display:none}.holdToReadButton{color:#fff;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none;background:linear-gradient(135deg,#2563eb,#38bdf8);border:0;border-radius:50%;place-items:center;width:clamp(4.15rem,11vmin,5.35rem);height:clamp(4.15rem,11vmin,5.35rem);transition:background .16s,box-shadow .16s,transform .16s;display:inline-grid;position:relative;box-shadow:0 18px 42px #2563eb3d}.holdToReadButton.recording{background:linear-gradient(135deg,#dc2626,#f97316);box-shadow:0 22px 54px #dc262647}.holdToReadButton:disabled{box-shadow:none;cursor:not-allowed;background:#cbd5e1}.micIcon{z-index:1;fill:none;stroke:#ffffffdb;stroke-width:1.2px;stroke-linecap:round;stroke-linejoin:round;width:clamp(2rem,5.2vmin,2.4rem);height:clamp(2.35rem,6.1vmin,2.85rem)}.micSignalBar{fill:#ffffffe6;stroke:none;opacity:0;transform-box:fill-box;transform-origin:bottom;transition:opacity .18s,transform .18s;transform:scaleY(.35)}.micSignalBar.active{opacity:1;animation:.72s ease-in-out infinite micSignalBreathe;transform:scaleY(1)}@keyframes micSignalBreathe{0%,to{opacity:.72;transform:scaleY(.82)}50%{opacity:1;transform:scaleY(1)}}.readResultBadge{color:#475569;-webkit-user-select:none;user-select:none;background:#f1f5f9;border-radius:999px;padding:6px 14px;font-size:clamp(.9rem,2vw,1.12rem);font-weight:1000}.readResultBadge.recognized{color:#15803d;background:#dcfce7}.readResultBadge.try-again{color:#b45309;background:#fef3c7}.readResultBadge.not-matched{color:#b91c1c;background:#fee2e2}.readProgressText{color:#64748b;margin:-2px 0 0;font-size:clamp(.86rem,3vw,1rem);font-weight:900}.recognizedText,.recordingError{color:#64748b;margin:0;font-size:clamp(.95rem,3.6vw,1.2rem);font-weight:800}.recordingError{color:#dc2626}.recordingPlayback{color:#64748b;text-align:left;gap:8px;width:min(88vw,420px);font-size:.86rem;font-weight:900;display:grid}.recordingPlayback audio{width:100%}.practiceShortcuts button:disabled{opacity:.45;cursor:not-allowed;transform:none}.readPracticeShortcuts{gap:12px}.sentenceReadToken{gap:clamp(5px,.9dvh,8px);width:min(100%,30rem)}.sentenceReadToken .homeWordStrip{flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:clamp(5px,.85dvh,7px);display:flex}.sentenceReadToken .homeBuilderToken{flex:0 auto;max-width:none}.sentenceReadToken .homePhoneticBadge,.sentenceReadToken .homePartOfSpeechPill,.sentenceReadToken .homeChineseGloss{display:none}.sentenceReadToken .wordBubbleStack{width:auto}.sentenceReadToken .homeWordBlock{width:max-content;min-width:0;max-width:100%;min-height:clamp(2.6rem,6.2dvh,3.6rem);border-radius:.72rem;inline-size:auto;padding:.36rem .5rem;container-type:normal}.sentenceReadToken .homeWordText{font-size:clamp(1.35rem,3.2vw,1.95rem)}.sentenceReadToken .grammarUnderline{height:.2rem}.sentenceReadToken .homeSentenceTranslation{margin-top:.05rem;font-size:clamp(.9rem,2.4vw,1.15rem)}@media (max-width:860px){.readPracticeStage{gap:6px;width:min(100%,560px)}.readPracticeStage .practiceTypingHint{font-size:clamp(.95rem,3.2vw,1.12rem)}.readPracticeToken .homeWordText{font-size:clamp(1.75rem,calc(66cqi/max(var(--word-length,6),6)),3.4rem)}.sentenceReadToken{width:min(100%,32rem)}.sentenceReadToken .homeWordBlock{min-height:clamp(2.35rem,5.6dvh,3.25rem);padding:.32rem .46rem}.sentenceReadToken .homeWordText{font-size:clamp(1.28rem,3vw,1.72rem)}.sentenceReadToken .homeSentenceTranslation{font-size:clamp(.86rem,2.4vw,1.05rem)}.holdToReadButton{width:clamp(3.75rem,9dvh,4.6rem);height:clamp(3.75rem,9dvh,4.6rem)}.readResultBadge{padding:5px 11px;font-size:clamp(.86rem,2.8vw,1rem)}}@keyframes inputShake{0%,to{opacity:1;transform:translate(0)}20%,60%{transform:translate(-10px)}40%,80%{transform:translate(10px)}}.practiceResult{border:0;gap:34px;width:auto;min-height:0;padding:0}.practiceResult .builderPrompt{display:none}.practiceResult .homeWordStrip{row-gap:28px}.practiceResult .homeWordText{font-size:clamp(40px,5vw,70px)}.practiceResult .homeSentenceTranslation{font-size:clamp(2.2rem,3.4vw,4rem)}.practiceShortcuts{color:#374151;flex-wrap:wrap;justify-content:center;align-items:center;gap:clamp(18px,4vw,72px);height:86px;padding:16px 20px 30px;font-size:clamp(.95rem,1.25vw,1.35rem);font-weight:900;display:flex}.practiceShortcuts button{color:#374151;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:12px;align-items:center;gap:8px;padding:8px 10px;transition:background .16s,color .16s,transform .16s;display:inline-flex}.practiceShortcuts button:hover{color:#111827;background:#f8fafc;transform:translateY(-2px)}.practiceShortcuts button:active{transform:translateY(1px)}.practiceShortcuts button:focus-visible{outline-offset:3px;outline:3px solid #a855f747}.practiceShortcuts button:hover kbd,.practiceShortcuts button:focus-visible kbd{color:#111827;background:#fff;border-color:#c4b5fd;box-shadow:0 2px #a78bfa}.practiceShortcuts button:active kbd{box-shadow:0 1px #a78bfa}kbd{color:#374151;background:#f8fafc;border:1px solid #d1d5db;border-radius:8px;padding:6px 10px;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.95em;box-shadow:0 2px #d1d5db}.resultOverlay{z-index:40;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#1118279e;justify-content:center;align-items:center;padding:24px;animation:.24s both overlayFadeIn;display:flex;position:fixed;inset:0}.resultModal{color:#111827;background:#fff;border:1px solid #e5e7eb;border-radius:18px;width:min(100%,1020px);animation:.36s cubic-bezier(.18,.9,.24,1.14) both resultPopIn;overflow:hidden;box-shadow:0 30px 90px #0f172a52}.resultHeader{border-bottom:1px solid #e5e7eb;align-items:center;gap:14px;min-height:104px;padding:0 42px;font-size:clamp(1.35rem,2vw,2rem);font-weight:900;display:flex}.resultHeader span{color:#f59e0b}.resultScoreRow{border-bottom:1px solid #e5e7eb;justify-content:space-between;align-items:center;gap:28px;min-height:154px;padding:26px 42px;display:flex}.resultGrade{color:#f97316;font-size:clamp(3.8rem,5.4vw,5.5rem);font-weight:1000;line-height:.9}.resultScore{color:#111827;font-size:clamp(1.8rem,2.6vw,2.6rem);font-weight:900}.resultScoreRow dl{gap:clamp(24px,4vw,54px);margin:0;display:flex}.resultScoreRow div{text-align:center}.resultScoreRow dt{color:#111827;font-size:clamp(2rem,3vw,2.9rem);font-weight:1000;line-height:1}.resultScoreRow dd{color:#6b7280;margin:8px 0 0;font-size:clamp(.95rem,1.2vw,1.2rem);font-weight:800}.resultStatsGrid{border-bottom:1px solid #e5e7eb;grid-template-columns:repeat(3,1fr);display:grid}.resultStatsGrid div{border-right:1px solid #e5e7eb;flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:138px;display:flex}.resultStatsGrid div:last-child{border-right:0}.resultStatsGrid span{color:#6b7280;font-size:clamp(.95rem,1.2vw,1.15rem);font-weight:900}.resultStatsGrid strong{color:#111827;font-size:clamp(1.6rem,2.1vw,2.2rem);font-weight:1000}.resultMessage{text-align:center;flex-direction:column;align-items:center;gap:10px;padding:34px 24px 24px;display:flex}.resultMessage strong{color:#6b7280;font-size:clamp(1.1rem,1.5vw,1.45rem);font-weight:900}.resultMessage span{color:#9ca3af;font-size:clamp(.95rem,1.2vw,1.15rem);font-weight:800}.resultActions{grid-template-columns:1fr 1fr;gap:20px;padding:14px 42px 42px;display:grid}.resultActions button{cursor:pointer;border-radius:12px;min-height:70px;font-size:clamp(1rem,1.35vw,1.3rem);font-weight:900;transition:transform .16s,box-shadow .16s,border-color .16s}.resultActions button:hover{transform:translateY(-2px)}.resultActions button:active{transform:translateY(1px)}.secondaryResultButton{color:#374151;background:#fff;border:1px solid #e5e7eb}.secondaryResultButton:hover{border-color:#cbd5e1;box-shadow:0 12px 26px #0f172a14}.primaryResultButton{color:#fff;background:#9333ea;border:0;box-shadow:0 16px 32px #9333ea47}.primaryResultButton:hover{box-shadow:0 18px 36px #9333ea57}.snowLayer{pointer-events:none;z-index:50;position:absolute;inset:0;overflow:hidden}.snowLayer i{top:-10px;left:var(--left);width:var(--size);height:var(--size);background:rgba(255,255,255,var(--opacity));animation:snowFall var(--duration)linear infinite;animation-delay:var(--delay);border-radius:50%;position:absolute}@keyframes overlayFadeIn{0%{opacity:0}to{opacity:1}}@keyframes resultPopIn{0%{opacity:0;transform:translateY(18px)scale(.96)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes snowFall{0%{opacity:var(--opacity);transform:translateY(0)translate(0)}to{transform:translateY(100%)translateX(var(--drift));opacity:0}}.inputPane{border-right:1px solid var(--line);background:#eef4f7;flex-direction:column;gap:18px;padding:28px 24px;display:flex}.eyebrow{color:var(--accent-strong);letter-spacing:0;text-transform:uppercase;margin:0 0 10px;font-size:.76rem;font-weight:800}h1,h2,p{margin-top:0}h1{max-width:11ch;margin-bottom:12px;font-size:3rem;line-height:1.03}h2{margin-bottom:0;font-size:1.35rem}.intro{max-width:36rem;color:var(--muted);font-size:.94rem;line-height:1.55}.sentenceLabel{color:var(--ink);font-size:.9rem;font-weight:700}textarea{resize:vertical;background:var(--panel);width:100%;min-height:112px;color:var(--ink);border:1px solid #bdc9be;border-radius:8px;outline:none;padding:16px;line-height:1.45;box-shadow:0 8px 18px #18221b0d}textarea:focus{border-color:var(--accent);box-shadow:0 0 0 4px #1f7a6824}.exampleRow{gap:10px;display:grid}.exampleRow button{color:#26352c;text-align:left;cursor:pointer;background:#fff;border:1px solid #cbd6cc;border-radius:8px;min-height:40px;padding:10px 12px}.exampleRow button:hover{border-color:var(--accent);color:var(--accent-strong)}.diagramPane{flex-direction:column;gap:12px;min-width:0;padding:24px 28px 28px;display:flex}.diagramHeader{justify-content:space-between;align-items:end;gap:16px;display:flex}.diagramHeader span{color:var(--muted);background:#fff;border:1px solid #cfd9d0;border-radius:999px;flex:none;padding:8px 12px;font-size:.88rem}.structureBar{min-height:40px;color:var(--muted);flex-wrap:wrap;align-items:center;gap:8px;font-size:.9rem;display:flex}.structureBar strong{color:var(--ink)}.structureBar span{color:#2b4d63;background:#fff;border:1px solid #d4dde5;border-radius:999px;padding:6px 10px;font-size:.82rem;font-weight:700}.wordInspector{background:#fff;border:1px solid #dde4d7;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;gap:14px;width:100%;min-height:0;padding:16px;display:flex;overflow:hidden}.builderPrompt{color:#a78bfa;text-align:center;text-shadow:0 0 10px #a78bfa52;will-change:transform,color,text-shadow;max-width:100%;font-size:clamp(.82rem,1.3vw,.95rem);font-weight:800;line-height:1.2;animation:2.4s ease-in-out infinite promptFloat}@keyframes promptFloat{0%,to{color:#c4b5fd;text-shadow:0 0 8px #c4b5fd3d;transform:translateY(4px)}50%{color:#8b5cf6;text-shadow:0 0 14px #8b5cf66b;transform:translateY(-5px)}}.wordStrip{flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:14px 6px;width:100%;min-width:0;padding:2px 4px 0;display:flex}.builderToken{flex-direction:column;align-items:center;min-width:0;max-width:100%;display:flex}.wordBubbleStack{flex-direction:column;align-items:stretch;width:fit-content;max-width:100%;display:inline-flex}.phoneticBadge{color:#64748b;text-overflow:ellipsis;white-space:nowrap;background:#f1f5f9;border-radius:6px;max-width:100%;min-height:22px;margin-bottom:7px;padding:2px 7px;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.78rem;font-weight:700;line-height:1.2;overflow:hidden;box-shadow:0 2px 6px #0f172a0d}.wordBlock{border-radius:14px;place-items:center;width:fit-content;min-width:56px;max-width:100%;min-height:108px;padding:18px 14px;display:inline-grid;position:relative}.wordText,.wordTextMeasure{letter-spacing:0;overflow-wrap:anywhere;text-align:center;white-space:nowrap;max-width:100%;font-size:70px;font-weight:900;line-height:.95;display:block}.wordText{color:#0f172a;padding:inherit;place-items:center;display:grid;position:absolute;inset:0}.wordTextMeasure{color:#0000;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none}.tokenFillPronoun{background:#fed7aa}.tokenFillLike{background:#fda4af}.tokenFillPhrase{background:#bfdbfe}.tokenFillTime{background:#bae6fd}.tokenFillDefault{background:#e2e8f0}.grammarUnderline{border-radius:999px;align-self:center;width:calc(100% - 16px);height:8px;margin-top:-1px}.tokenUnderlinePronoun{background:#fdba74}.tokenUnderlineVerb{background:#22c55e}.tokenUnderlineModifier{background:#a855f7}.tokenUnderlineNoun{background:#3b82f6}.tokenUnderlineDeterminer{background:#14b8a6}.tokenUnderlineParticle{background:#64748b}.partOfSpeechPill{color:#475569;text-overflow:ellipsis;white-space:nowrap;background:#fff;border:1px solid #cbd5e1;border-radius:999px;max-width:100%;margin-top:4px;padding:4px 12px;font-size:.92rem;font-weight:900;line-height:1.25;overflow:hidden;box-shadow:0 2px 6px #0f172a1f}.chineseGloss{color:#475569;overflow-wrap:anywhere;text-align:center;max-width:100%;margin-top:8px;font-size:.9rem;font-weight:800;line-height:1.25}.sentenceTranslation{color:#475569;text-align:center;max-width:100%;margin:2px 0 0;font-size:clamp(1rem,2.1vw,1.28rem);font-weight:700;line-height:1.25}.legacyWordInspector{background:#fff;border:1px solid #dde4d7;border-radius:8px;padding:16px}.legacyWordInspectorHeader{justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;display:flex}.legacyWordInspectorHeader .eyebrow{color:#8c1d12;margin:0}.legacyWordInspectorHeader span{color:var(--muted);font-size:.82rem;font-weight:700}.legacyWordInspector .wordStrip{justify-content:flex-start;align-items:flex-start;gap:10px;padding:0}.componentGroup{border-radius:8px;min-width:110px;padding-top:34px;position:relative}.componentWords{border-radius:8px;align-items:stretch;display:flex;overflow:visible}.phoneticRow,.posRow{justify-content:space-around;align-items:center;gap:6px;display:flex}.phoneticRow{color:#687180;font-size:.82rem;font-weight:800;position:absolute;top:0;left:0;right:0}.posRow{margin-top:7px}.posRow span{border-style:solid;border-width:1px;border-radius:999px;padding:3px 8px;font-size:.72rem;font-weight:900}.componentLabel{color:#3f4a5a;text-align:center;margin-top:8px;font-size:.9rem;font-weight:900}.componentSubject .componentWords{background:#ffe4aa}.componentVerb .componentWords{background:#ffc4cf}.componentPredicate .componentWords{background:#c9d9ff}.componentComplement .componentWords{background:#e3d4ff}.componentPreposition .componentWords{background:#bdeaf2}.componentDefault .componentWords{background:#eef1f5}.wordChip{min-width:0;color:var(--ink);cursor:help;background:0 0;border:0;border-radius:0;padding:10px 12px 12px;position:relative}.wordChip:first-child{border-top-left-radius:8px;border-bottom-left-radius:8px}.wordChip:last-child{border-top-right-radius:8px;border-bottom-right-radius:8px}.wordChip:hover,.wordChip:focus-visible{z-index:5;outline:none;box-shadow:0 0 0 3px #2f6f9f29}.legacyWordText{color:var(--ink);white-space:nowrap;font-size:2.1rem;font-weight:900;line-height:1.1;display:block}.toneDeterminer{background:#fff4c7;border-color:#cfb25a}.toneNoun{background:#e9f0ff;border-color:#5f7fc4}.toneVerb{background:#ffe7ec;border-color:#c45f72}.tonePreposition{background:#dff7f9;border-color:#4aa7b5}.toneModifier{background:#eef8df;border-color:#7aa15c}.toneDefault{background:#f4f6f8;border-color:#b7bec8}.componentWords .wordChip{background:0 0}.wordTooltip{width:280px;color:var(--ink);text-align:left;background:#fff;border:1px solid #d6ddd2;border-radius:8px;padding:12px;display:none;position:absolute;bottom:calc(100% + 10px);left:50%;transform:translate(-50%);box-shadow:0 16px 34px #18221b29}.wordTooltip strong,.wordTooltip span{display:block}.wordTooltip strong{margin-bottom:6px;font-size:1rem}.wordTooltip span{color:var(--muted);font-size:.84rem;line-height:1.4}.wordChip:hover .wordTooltip,.wordChip:focus-visible .wordTooltip{display:block}.homeWordInspector{border:0;gap:clamp(21px,3.5vh,46px);width:min(100%,1680px);padding:clamp(14px,2vw,32px) 0;overflow:visible}.homeWordInspector .builderPrompt{text-shadow:0 0 9px #a78bfa6b;font-size:clamp(.9rem,1.8vw,1.5rem)}.homeWordStrip{gap:clamp(12px,2vw,21px) 6px}.homeBuilderToken{max-width:none}.homePhoneticBadge{border-radius:4px;min-height:16px;margin-bottom:7px;padding:2px 5px;font-size:clamp(.45rem,.75vw,.78rem)}.homeWordBlock{border-radius:7px;min-width:28px;min-height:54px;padding:9px 7px}.homeWordText{font-size:clamp(30px,3.75vw,52.5px)}.homePartOfSpeechPill{margin-top:3px;padding:2px 6px;font-size:clamp(.39rem,.55vw,.53rem)}.homeChineseGloss{margin-top:7px;font-size:clamp(.48rem,.68vw,.73rem)}.homeSentenceTranslation{margin-top:2px;font-size:clamp(.85rem,1.5vw,1.4rem)}.homeWordInspector .grammarUnderline{width:calc(100% - 8px);height:4px;margin-top:-.5px}.constituencyShell{min-height:620px;color:var(--ink);background:#fff;border:2px solid #8aa1ff;border-radius:2px;flex-direction:column;flex:1;gap:14px;padding:18px;display:flex}.constituencyHeader{justify-content:space-between;align-items:center;gap:16px;display:flex}.constituencyHeader .eyebrow{color:#8c1d12}.constituencyHeader h2{color:#8c1d12;font-size:1.8rem}.constituencyCanvas{background:#fff;flex:1;min-height:540px;overflow:auto}.constituencySvg{width:max(100%,1120px);height:auto;min-height:540px;display:block}.constituencyEdge{stroke:#989898;stroke-width:3px;stroke-linecap:round}.constituencyPhraseNode{fill:#cfe9bd;stroke:#6aa04d;stroke-width:3px}.constituencyWordNode{fill:#fffdd2;stroke:#d4d36b;stroke-width:3px}.constituencyText{fill:#050505;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:16px;font-weight:800}.constituencyRoleText{fill:#39582d;text-transform:uppercase;font-size:10px;font-weight:800}@media (max-width:900px){.pageShell{grid-template-columns:1fr}.audioStep{align-content:start;padding:clamp(8px,2vh,16px) 0;overflow-y:auto}.inputPane{border-right:0;border-bottom:1px solid var(--line);padding:32px 20px}h1{max-width:12ch;font-size:2.8rem}.diagramPane{padding:22px 14px}.diagramHeader{flex-direction:column;align-items:start}.wordInspector{gap:14px;padding:16px 12px}.homeWordInspector{gap:22px;padding:21px 0 15px}.wordStrip{gap:22px 6px}.homeWordStrip{gap:clamp(10px,2vw,14px) 6px}.builderToken{max-width:33.333%}.wordBlock{border-radius:12px;min-width:48px;min-height:92px;padding:14px 12px}.wordText{font-size:clamp(56px,7vw,62px)}.grammarUnderline{height:7px}.constituencyShell{min-height:520px;padding:16px}.constituencyCanvas,.constituencySvg{min-height:420px}}@media (max-width:520px){.wordInspector{gap:12px;padding:14px 10px}.builderPrompt{font-size:.82rem}.wordStrip{gap:18px 6px}.homeWordStrip{gap:10px 6px}.builderToken{max-width:50%}.phoneticBadge{min-height:19px;margin-bottom:5px;padding:2px 5px;font-size:.68rem}.wordBlock{border-radius:11px;min-width:42px;min-height:72px;padding:10px}.wordText{font-size:clamp(40px,11vw,48px)}.grammarUnderline{height:6px}.partOfSpeechPill{padding:3px 9px;font-size:.72rem}.chineseGloss{margin-top:6px;font-size:.78rem}.sentenceTranslation{font-size:.98rem}.gramtreeHome{padding:48px 12px 20px}.homeStartPanel{gap:20px}.homePracticeModes{grid-template-columns:1fr;gap:10px;padding:0 8px}.homePracticeMode{border-radius:10px;min-height:66px;padding:12px 14px}.homePracticeMode strong{font-size:1rem}.homePracticeMode span{font-size:.84rem}.sentenceImportPanel{border-radius:10px;gap:10px;padding:12px}.sentenceImportHeader{flex-direction:column;align-items:stretch}.sentenceImportHeaderActions,.sentenceImportActions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.sentenceTemplateTools{grid-template-columns:1fr}.sentenceImportPanel button{width:100%;padding-inline:8px}.sentenceImportTextarea,.importPromptTextarea{min-height:104px;padding:12px;font-size:.78rem}.sentenceImportAlert{padding:10px}.sentenceImportPanel .copyImportPromptButton{justify-self:end;width:auto;position:static}.practiceHome{padding:0}.practiceShell{border-radius:0;grid-template-rows:64px minmax(0,1fr) 82px}.practiceTopBar{height:64px}.practiceProgress{height:8px;top:78px}.practiceCenter{padding:42px 10px 12px;overflow-y:auto}.practiceShortcuts{align-content:center;height:82px;padding:8px 10px 12px}.readPracticeStage{gap:6px;width:min(100%,560px)}.readPracticeStage .practiceTypingHint{font-size:clamp(.95rem,3.2vw,1.12rem)}.readPracticeToken .homeWordText{font-size:clamp(1.75rem,calc(66cqi/max(var(--word-length,6),6)),3.4rem)}.sentenceReadToken{width:min(100%,32rem)}.sentenceReadToken .homeWordBlock{min-height:clamp(2.35rem,5.6dvh,3.25rem);padding:.32rem .46rem}.sentenceReadToken .homeWordText{font-size:clamp(1.28rem,3vw,1.72rem)}.sentenceReadToken .homeSentenceTranslation{font-size:clamp(.86rem,2.4vw,1.05rem)}.holdToReadButton{width:clamp(3.75rem,9dvh,4.6rem);height:clamp(3.75rem,9dvh,4.6rem)}.readResultBadge{padding:5px 11px;font-size:clamp(.86rem,2.8vw,1rem)}.recognizedText,.recordingError{font-size:clamp(.86rem,3.3vw,1rem)}.resultOverlay{padding:48px 16px}.resultModal{border-radius:14px;width:min(100%,340px);max-height:calc(100dvh - 96px);overflow-y:auto}.resultHeader{gap:10px;min-height:56px;padding:0 20px;font-size:1.4rem}.resultScoreRow{flex-direction:row;align-items:center;gap:14px;min-height:112px;padding:18px 20px}.resultGrade{font-size:3.5rem}.resultScore{font-size:1.9rem}.resultScoreRow dl{flex:1;justify-content:space-between;gap:10px}.resultScoreRow dt{font-size:1.85rem}.resultScoreRow dd{margin-top:6px;font-size:.92rem}.resultStatsGrid{grid-template-columns:repeat(3,1fr)}.resultStatsGrid div{border-bottom:0;border-right:1px solid #e5e7eb;gap:6px;min-height:72px}.resultStatsGrid div:last-child{border-right:0}.resultStatsGrid span{font-size:.88rem}.resultStatsGrid strong{font-size:1.45rem}.resultMessage{gap:8px;padding:18px 18px 14px}.resultMessage strong{font-size:1.03rem;line-height:1.35}.resultMessage span{font-size:.9rem;line-height:1.3}.resultActions{grid-template-columns:1fr 1fr;gap:10px;padding:10px 20px 20px}.resultActions button{border-radius:10px;min-height:48px;font-size:1rem}.audioStepNav{flex-direction:column-reverse;width:100%}.audioStepNav>*{justify-content:center;width:100%}.internalLink{padding:6px 10px}.homeWordInspector{gap:16px}.homeBuilderToken{max-width:50%}.homeWordText{font-size:clamp(1.32rem,7.5vw,2.1rem)}.homeSentenceTranslation{font-size:clamp(.68rem,3.5vw,1rem)}}
