@font-face{font-family:SemesterKai;src:url('/assets/fonts/school-reading-kai.woff2') format('woff2');font-display:swap}@font-face{font-family:SemesterExtra;src:url('/assets/fonts/school-reading-kai-extra.woff2') format('woff2');font-display:swap}@font-face{font-family:Pinyin;src:url('/assets/fonts/noto-sans-pinyin.woff2') format('woff2');font-display:swap}@font-face{font-family:QuestionSong;src:url('/assets/fonts/teacher-desk/desk-song-regular-20261129.woff2') format('woff2');font-display:swap}
:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#31483e;background:#fff;--green:#71875b;--dark:#486340;--line:#dde5d7;--pale:#eef4e2;--text:32px;--blue:#2463ad;--orange:#a45a12}*{box-sizing:border-box}body{margin:0;min-height:100dvh}button,select,input{font:inherit;color:inherit}button,a,select,input{touch-action:manipulation}button,select{min-height:44px;background:white;border:1px solid var(--line);border-radius:13px;padding:8px 14px;cursor:pointer}button:hover:not(:disabled){background:#f3f7ed;border-color:#a6b690}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #2463ad;outline-offset:3px}button:disabled{cursor:default;opacity:.5}button.active,button[aria-pressed=true]{background:#e8f0d7;border-color:#9cb283;box-shadow:inset 0 -3px #a5b88a}.primary{background:#71875b;color:white;border-color:#71875b;font-weight:650;min-width:132px}.primary:hover:not(:disabled){background:#536d41;color:white}.secondary{background:#eff4e8}a{color:#315e83;text-decoration:none}a:hover{text-decoration:underline}h1,h2,p{margin:0}h1{font-size:28px;line-height:1.3}h2{font-size:21px}small,.muted{color:#72816e}header{max-width:1080px;margin:auto;height:70px;display:flex;align-items:center;justify-content:space-between;padding:10px 24px;gap:12px}.brand{display:flex;gap:10px;align-items:center;color:#344642}.brand span{display:flex;flex-direction:column;gap:3px}.brand strong{font-size:18px}.brand small{font-size:11px}header nav{display:flex;gap:7px;white-space:nowrap}header nav button{min-width:44px;padding:7px 10px;background:#f7f9f2;font-size:14px}main{max-width:1440px;margin:auto;padding:2px 24px 12px}.hero{background:var(--pale);border:1px solid #e0e8d4;border-radius:26px 26px 26px 7px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:15px}.hero p{font-size:14px;color:#5e7058;margin-top:5px}.points{border:0;background:#f8faef;color:#788845;font-size:17px;font-weight:700;white-space:nowrap}.unit-tabs,.track-tabs{display:flex;justify-content:center;gap:8px;margin:12px auto}.unit-tabs button{font-size:14px;min-height:36px;border-radius:10px;padding:7px 12px}.track-tabs{max-width:680px;margin:10px auto 12px}.track-tabs button{flex:1;min-height:38px;font-size:14px;font-weight:650}.study{border:1px solid var(--line);background:#fcfdf9;border-radius:23px;padding:16px 22px;display:flex;justify-content:space-between;align-items:center;gap:12px}.study p{font-size:14px;color:#72816e;margin-top:5px}.study-controls{display:flex;gap:8px;align-items:center}.study select{font-size:14px;padding-right:24px}.study-controls>button{font-size:14px}select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2371875b' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center}.section-label{font-size:15px;color:#607251;margin:14px 3px 9px}.modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.mode{position:relative;min-height:108px;border-radius:23px 10px 23px 10px;border:1px solid var(--line);background:#f9fbf5;box-shadow:0 4px #e6eadf;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.mode:first-child{background:#e9f1d7;border-color:#a4b689;box-shadow:0 4px #b5c59a}.mode svg{height:56px;width:72px;display:block}.mode strong{font-size:17px}.mode .lock{position:absolute;right:9px;top:7px;font-size:11px;background:#edf2e4;color:#758469;border-radius:6px;padding:3px 5px}footer{display:flex;justify-content:center;align-items:center;gap:17px;flex-wrap:wrap;margin:15px 0 0;font-size:13px}footer button{border:0;padding:0;min-height:30px;font-size:13px;color:#66785d}dialog{border:1px solid var(--line);border-radius:22px;max-width:min(780px,95vw);max-height:92dvh;width:640px;padding:20px;box-shadow:0 15px 80px #26351d25;color:inherit}dialog::backdrop{background:#263c3144;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:white;z-index:3;padding:0 0 12px}.dialog-head h2{font-size:21px}.dialog-head button{font-size:14px}.dialog-body p{margin:10px 0;line-height:1.8}.settings-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #edf0e7}.settings-row>label{min-width:95px}.settings-row input{min-height:42px;width:150px;padding:7px 10px;border:1px solid var(--line);border-radius:9px}.settings-row button{font-size:14px}.wide{width:100%}.note{font-size:14px;line-height:1.8;color:#71806a;margin-top:12px}.practice-top{height:52px;display:flex;align-items:center;justify-content:space-between;gap:12px}.practice-top h1{font-size:19px}.practice-top .right{display:flex;align-items:center;gap:8px}.practice-top button{font-size:14px}.progress{display:block;width:100%;height:6px;border:0;border-radius:4px;overflow:hidden;background:#eaf0e3;margin:6px 0 12px;accent-color:#92aa72}.practice-frame{display:flex;flex-direction:column;height:calc(100dvh - 95px);min-height:400px}.practice-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.study-layout{display:grid;grid-template-columns:minmax(260px,.85fr) minmax(0,1.25fr);gap:20px;min-height:100%;align-items:center}.study-left{text-align:center}.target{font-size:clamp(60px,8vw,95px);color:#152722;line-height:1.5}.target .syllable rt{font-size:.36em}.source{font-size:13px;color:#789068;margin:8px 0 12px;line-height:1.7}.word-list{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.word-card{border:1px solid #e2e8db;border-radius:17px;background:#fcfdf9;flex:1;min-width:100px;max-width:240px;padding:8px}.word-card img{width:100%;height:98px;object-fit:contain;display:block}.word-card .reading{font-size:28px;justify-content:center;margin:10px 0 4px}.gloss{font-size:14px;color:#71816a;display:block;text-align:center;line-height:1.5}.example-card{border:1px solid var(--line);border-radius:22px;padding:14px;background:#fff;display:grid;grid-template-columns:35% minmax(0,1fr);gap:16px;align-items:center}.example-card img{width:100%;max-height:360px;object-fit:contain}.example-card .reading{font-size:var(--text);line-height:1.85;align-content:center;min-height:200px}.example-card .caption{grid-column:1/-1;font-size:12px;text-align:right;color:#7a8a70}.example-tools{display:flex;justify-content:center;gap:8px;margin-top:12px;align-items:center}.example-tools button{font-size:14px}.reading{font-family:SemesterKai,SemesterExtra,serif;display:flex;flex-wrap:wrap;gap:0;line-height:1.9;align-items:baseline;color:#101812;font-weight:400}.syllable{display:inline-flex;flex-direction:column-reverse;align-items:center;position:relative;min-width:1em;padding:0 .075em;line-height:1.25;margin-top:.7em;border:0;background:transparent;border-radius:3px;white-space:nowrap;min-height:0;font:inherit;cursor:pointer}.syllable rt{font-family:Pinyin,sans-serif;font-size:.45em;font-weight:600;line-height:1.35;position:absolute;bottom:100%;white-space:nowrap;letter-spacing:0;padding:0 .1em;visibility:hidden}.show-pinyin .syllable rt{visibility:visible}.syllable.punct{padding:0;min-width:.55em;cursor:default}.tone-color .tone1{color:#2463ad}.tone-color .tone2{color:#24764f}.tone-color .tone3{color:#a45a12}.tone-color .tone4{color:#8251a5}.tone-color .tone5{color:#637486}.syllable.read{background:#fff8ce}.syllable.current::after{content:'';position:absolute;right:0;top:5%;height:90%;width:1px;background:#b49e58}.reading .word{display:inline-flex;white-space:nowrap;align-items:baseline}.practice-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 0 4px;flex-shrink:0}.practice-bottom>div{display:flex;gap:8px;align-items:center}.practice-bottom button{font-size:14px}.practice-bottom .primary{font-size:16px;min-height:48px}.question{height:100%;display:flex;flex-direction:column;justify-content:center;max-width:1000px;width:100%;margin:auto;gap:18px;padding:8px}.question h2{font-family:QuestionSong,serif;font-size:22px;color:#354b40;line-height:1.6;text-align:center}.question .prompt{min-height:100px;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}.prompt .reading{font-size:clamp(52px,8vw,80px)}.big-pinyin{font-family:Pinyin,sans-serif;font-size:clamp(32px,5vw,56px);font-weight:600}.question-picture{display:grid;grid-template-columns:35% 1fr;gap:20px;align-items:center}.question-picture img{width:100%;max-height:240px;object-fit:contain}.cloze{font-family:SemesterKai,SemesterExtra,serif;font-size:var(--text);line-height:1.75;color:#121b16}.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.choice{width:100%;min-height:92px;font-size:34px;display:flex;align-items:center;justify-content:center;gap:7px;font-family:SemesterKai,SemesterExtra,serif}.choice.pinyin-choice{font-family:Pinyin,sans-serif;font-size:25px}.choice.correct{background:#e4f2dc;border:2px solid #5b965a}.choice.wrong{background:#fff2e8;border:2px solid #d99058}.feedback{min-height:26px;text-align:center;color:#43753f;font-size:16px}.feedback.error{color:#a45a12}.order-answer,.order-bank{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;min-height:70px;padding:12px;border:1px solid var(--line);border-radius:15px}.order-answer{background:#f4f8ed;min-height:100px}.order-bank button,.order-answer button{font-family:SemesterKai,SemesterExtra,serif;font-size:28px}.result{max-width:700px;text-align:center;margin:auto;padding:35px 10px}.result h1{font-size:32px;margin:14px 0}.result p{margin:12px 0;line-height:1.7}.result .stat-grid{display:flex;justify-content:center;gap:40px;margin:25px 0}.stat-grid strong{font-size:38px;color:#688548}.stat-grid span{display:block;font-size:14px;margin-top:7px}.char-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(66px,1fr));gap:8px;margin:15px 0}.char-grid button{font-family:SemesterKai,SemesterExtra,serif;font-size:27px}.word-index{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}.char-grid button small{display:block;font-family:Pinyin,sans-serif;font-size:12px}.record-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;padding:12px;border-bottom:1px solid var(--line);font-size:14px}.match-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.match-columns>div{display:flex;flex-direction:column;gap:10px}.match-columns button{min-height:70px;font-size:24px;font-family:SemesterKai,SemesterExtra,serif}.match-columns .matched{background:#e6f2dc;border-color:#9ebf85}.writing-layout{display:flex;align-items:center;justify-content:center;gap:24px;flex-wrap:wrap}.writing-board{width:min(310px,70vw);aspect-ratio:1;position:relative;border:2px solid #b1bd9f;border-radius:6px;touch-action:none;background:linear-gradient(45deg,transparent 49.8%,#e0e5d7 50%,transparent 50.2%),linear-gradient(-45deg,transparent 49.8%,#e0e5d7 50%,transparent 50.2%),linear-gradient(90deg,transparent 49.7%,#ced9c2 50%,transparent 50.3%),linear-gradient(0deg,transparent 49.7%,#ced9c2 50%,transparent 50.3%)}.writing-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:12px}.writing-actions button{font-size:14px}.writing-note{text-align:center;font-size:14px;margin:12px 0;color:#6b7b62}.skip,.sr{position:absolute;left:-10000px;top:0;width:1px;height:1px;overflow:hidden}.skip:focus{left:10px;top:10px;width:auto;height:auto;z-index:100;background:white;padding:10px}.empty{text-align:center;padding:50px 20px;line-height:1.8}.badge{display:inline-block;background:#eef5e5;padding:6px 12px;border-radius:8px;font-size:13px}.hide-support .gloss{display:none}.install-steps{font-size:16px;line-height:1.8}.install-steps p{margin:12px 0}.list-filter{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.list-filter button{font-size:14px}.profile-button{min-width:100px}.profile-button small{display:block;font-size:12px}.danger{color:#9e4e33}.profile-note{font-size:13px;color:#6e7c66;line-height:1.7}
@media(min-width:1500px){.mode{min-height:135px}.mode svg{height:68px}.study{padding:25px 40px}}@media(max-width:850px){.study{align-items:flex-start;flex-direction:column}.study-controls{width:100%;flex-wrap:wrap}.study-controls .primary{margin-left:auto}.study-layout{grid-template-columns:1fr 1.2fr;gap:12px}.example-card{grid-template-columns:1fr;padding:12px}.example-card img{height:180px}.example-card .reading{min-height:0}.word-card img{height:70px}.practice-top h1{font-size:17px}}@media(max-width:600px){:root{--text:30px}header{padding:8px 12px;height:65px}.brand strong{font-size:15px}.brand small{font-size:10px}.brand img{width:33px;height:33px}header nav{gap:4px}header nav button{padding:5px 7px;font-size:12px}main{padding:2px 12px 10px}.hero{padding:13px 15px;border-radius:22px 22px 22px 7px}.hero h1{font-size:24px}.hero p{font-size:12px}.unit-tabs{gap:5px;flex-wrap:wrap;margin:9px 0}.unit-tabs button{font-size:12px;padding:5px 9px;min-height:34px}.track-tabs{gap:6px;margin:9px auto}.track-tabs button{font-size:13px;padding:6px}.study{padding:12px 14px;border-radius:18px;gap:8px}.study h2{font-size:19px}.study p{font-size:12px}.study-controls{gap:5px}.study-controls button,.study-controls select{font-size:12px;min-height:40px;padding:6px 8px}.study-controls select{padding-right:23px}.study-controls .primary{min-width:90px;flex:1}#shuffle{padding:6px}#lessonFilter{max-width:110px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.section-label{font-size:12px;margin:10px 2px 7px}.modes{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.mode{min-height:98px;border-radius:17px 7px 17px 7px;padding:7px 2px}.mode strong{font-size:13px}.mode svg{height:45px;width:55px}.mode .lock{font-size:9px;right:5px;top:4px;padding:2px 3px}footer{font-size:12px;gap:12px;margin-top:12px}footer button{font-size:12px}.practice-frame{height:calc(100dvh - 78px);min-height:0}.practice-top{height:46px;gap:6px}.practice-top h1{font-size:15px}.practice-top button{padding:6px 8px;font-size:12px}.practice-top .right{gap:5px;font-size:12px}.progress{margin:5px 0 8px}.study-layout{display:flex;flex-direction:column;gap:8px;justify-content:center;min-height:100%;padding:0 0 8px}.study-left{width:100%}.target{font-size:56px;line-height:1.35}.source{font-size:11px;margin:2px 0 7px}.word-list{gap:6px}.word-card{padding:4px;min-width:80px;max-width:180px;border-radius:12px}.word-card img{height:64px}.word-card .reading{font-size:25px;margin:10px 0 4px}.word-card .gloss{font-size:11px}.example-wrap{width:100%}.example-card{grid-template-columns:28% minmax(0,1fr);gap:10px;padding:10px;border-radius:15px}.example-card img{height:150px;max-height:180px}.example-card .reading{font-size:var(--text);line-height:1.85;min-height:0}.example-card .caption{font-size:10px}.example-tools{margin-top:7px;gap:6px}.example-tools button{font-size:12px;min-height:38px;padding:5px 8px}.practice-bottom{padding:8px 0 2px;gap:5px}.practice-bottom button{padding:6px 8px;min-height:44px;font-size:12px}.practice-bottom .primary{font-size:14px;min-width:100px}.practice-bottom>div{gap:4px}.question{gap:12px;padding:4px 0;justify-content:center}.question h2{font-size:20px}.question .prompt{min-height:80px}.choices{gap:7px}.choice{font-size:29px;min-height:70px;padding:8px 3px}.choice.pinyin-choice{font-size:19px}.question-picture{grid-template-columns:30% 1fr;gap:10px}.question-picture img{max-height:160px}.cloze{font-size:30px}.order-answer,.order-bank{gap:5px;padding:8px}.order-bank button,.order-answer button{font-size:24px;padding:7px 10px}.feedback{font-size:14px;min-height:22px}.writing-layout{gap:10px}.writing-board{width:min(290px,66vw)}dialog{padding:15px;width:95vw}.dialog-head{top:-15px}.dialog-head h2{font-size:19px}.match-columns{gap:12px}.match-columns button{font-size:22px}.result{padding:18px 5px}.result h1{font-size:27px}.result .stat-grid{gap:25px}.stat-grid strong{font-size:32px}}
@media(max-height:650px) and (min-width:700px){header{height:58px}.hero{padding:8px 16px}.hero h1{font-size:24px}.unit-tabs,.track-tabs{margin:7px auto}.study{padding:10px 18px}.mode{min-height:86px}.mode svg{height:42px}.practice-frame{height:calc(100dvh - 75px)}.example-card img{max-height:240px}.target{font-size:64px}.word-card img{height:75px}}

.target{justify-content:center}.result>svg{width:100px;height:100px}.progress::-webkit-progress-bar{background:#eaf0e3;border-radius:4px}.progress::-webkit-progress-value{background:#92aa72;border-radius:4px}

.study-art{width:88px;height:66px;display:inline-block;position:relative;flex-shrink:0}.study-art img{width:100%;height:100%;object-fit:contain;display:block}.art-label{position:absolute;font-family:SemesterKai,SemesterExtra,serif;color:#32485b;font-size:16px;line-height:1;left:55%;top:58%;transform:translate(-50%,-50%);white-space:nowrap;pointer-events:none}.art-readpy .art-label{font-family:Pinyin,sans-serif;top:31%;left:42%;font-size:13px;font-weight:600}.art-pinyin .art-label{left:49%;top:38%;font-size:18px}.art-listen .art-label{left:47%;top:59%;font-size:19px}.art-order .art-label{left:50%;top:52%;font-size:13px;letter-spacing:1px}.art-mixed .art-label{left:69%;top:65%;font-size:15px}.mode .study-art{height:64px}.result>.study-art{width:130px;height:120px}.mode strong{position:relative;z-index:1}@media(max-width:600px){.mode .study-art{width:70px;height:53px}.art-label{font-size:14px}.art-readpy .art-label{font-size:11px}.art-pinyin .art-label{font-size:16px}.art-listen .art-label{font-size:16px}.art-order .art-label{font-size:11px}.art-mixed .art-label{font-size:13px}}

@media (min-width:700px) and (max-height:800px){header{height:56px;padding-top:6px;padding-bottom:6px}.hero{padding:8px 16px}.hero h1{font-size:24px}.hero p{font-size:12px;margin-top:3px}.unit-tabs,.track-tabs{margin:5px auto}.unit-tabs button{min-height:30px;padding:4px 11px;font-size:13px}.track-tabs button{min-height:32px;padding:5px 12px}.study{padding:10px 20px;min-height:64px}.study h2{font-size:20px}.study p{font-size:12px;margin-top:3px}.study-controls button,.study-controls select{min-height:40px}.section-label{margin:9px 3px 7px;font-size:14px}.modes{gap:8px}.mode{min-height:84px;gap:0;padding:4px}.mode .study-art{height:51px;width:76px}.mode strong{font-size:16px}footer{margin-top:8px;gap:15px}footer button{min-height:27px;font-size:12px}.practice-frame{height:calc(100dvh - 81px)}}

/* Mechelen Chinese reference palette, shared by characters and their pinyin. */
.tone-color .tone1{color:#c71936}.tone-color .tone2{color:#00843c}.tone-color .tone3{color:#8822b6}.tone-color .tone4{color:#1648d1}.tone-color .tone5{color:#273342}
.syllable{line-height:1.3}.syllable.target-char,.syllable.target-char:hover,.syllable.target-char.read{background:#fff0ad!important;border-radius:4px}
body:not(.show-pinyin) .syllable{margin-top:.12em}
.example-wrap{display:flex;flex-direction:column;gap:14px;width:100%}
.example-card{align-items:center;cursor:pointer;grid-template-columns:30% minmax(0,1fr);column-gap:14px;row-gap:8px}
.example-card.without-image{grid-template-columns:1fr}
.example-heading{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #eef1e8;padding-bottom:8px}
.example-heading .source{margin:0;color:#516c47;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:13px;font-weight:500;line-height:1.6}
.sentence-listen{min-height:38px;flex-shrink:0;padding:5px 12px;font-size:13px;background:#f5f8ee;border-color:#dde6d2}
.example-card .reading{min-height:100px;align-content:center;line-height:1.8;padding:8px 0}
.example-card img{height:170px;max-height:190px;object-fit:contain;align-self:center}
.example-card .caption{font-size:11px}
.example-card.speaking{border-color:#a6ba87;box-shadow:0 0 0 2px #e8f0db}
.example-card:focus-visible{outline:3px solid #2463ad;outline-offset:3px}
.has-two .example-card .reading{min-height:70px}
.has-two .example-card img{height:135px}
#dialogBody .example-card{margin-top:12px}
@media(max-width:850px) and (min-width:601px){.example-card{grid-template-columns:1fr}.example-card img{height:130px}.example-heading{gap:7px}.example-heading .source{font-size:12px}.sentence-listen{padding:5px 9px}}
@media(max-width:600px){.example-wrap{gap:10px}.example-card{grid-template-columns:24% minmax(0,1fr);gap:8px;padding:10px}.example-heading{gap:7px;padding-bottom:7px}.example-heading .source{font-size:12px}.sentence-listen{min-height:40px;padding:5px 9px;font-size:12px}.example-card img,.has-two .example-card img{height:100px;max-height:120px}.example-card .reading,.has-two .example-card .reading{min-height:0;font-size:var(--text);padding:4px 0}.study-layout{justify-content:flex-start}.study-left{padding-top:8px}.target{font-size:56px}}

.learning-section-title{font-size:19px;color:#526849;margin:12px 0}
.word-stage{max-width:980px;margin:0 auto;padding:10px 20px 20px;text-align:center;min-height:100%;display:flex;flex-direction:column;justify-content:center}
.word-stage>.source{display:block}.word-stage .target{font-size:78px}
.word-stage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:10px 0 16px}
.word-stage-grid .word-card{max-width:none;min-width:0;width:100%;padding:14px 12px;border-radius:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.word-stage-grid .word-card img{height:150px;max-height:180px;width:100%;object-fit:contain}
.word-stage-grid .reading{flex-wrap:nowrap;font-size:clamp(16px,calc(220px / var(--word-width)),34px);line-height:1.5;margin:12px 0 6px}
.word-listen{font-size:13px;min-height:34px;padding:4px 12px;border:0;background:#f0f5e7;color:#55734a;border-radius:9px}
.compact-word-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.compact-word-list .word-card{min-width:0;max-width:none;padding:8px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
.compact-word-list .reading{font-size:clamp(13px,calc(110px / var(--word-width)),27px);flex-wrap:nowrap;margin:5px 0}.compact-word-list .word-listen{font-size:12px;padding:3px 7px;min-height:32px}.compact-word-list .gloss{font-size:11px}
.sentence-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.sentence-section-heading .learning-section-title{margin:0}.sentence-section-heading button{font-size:13px;min-height:36px;padding:5px 10px}
.sentence-filters{display:flex;flex-direction:column;gap:8px;flex-shrink:0;padding:4px 0 10px}
.sentence-unit-buttons,.sentence-lesson-buttons{display:flex;gap:7px;overflow-x:auto;white-space:nowrap;scrollbar-width:thin;padding:2px 0 5px}
.sentence-unit-buttons button,.sentence-lesson-buttons button{font-size:13px;min-height:36px;flex-shrink:0;padding:5px 11px}
.sentence-search{display:flex;align-items:center;gap:8px}.sentence-search input{font-size:15px;min-width:80px;flex:1;max-width:350px;height:40px;border:1px solid #d5dfc9;border-radius:11px;padding:8px 12px}.sentence-search button{font-size:13px;min-height:40px}
.sentence-catalog{max-width:1100px;margin:0 auto;display:flex;flex-direction:column;gap:12px;padding:3px 3px 14px}
.sentence-catalog .example-card .reading{min-height:0;padding:12px 0}.sentence-catalog .example-card .caption{display:none}.sentence-targets{grid-column:1/-1;color:#6b7b62;font-size:13px;line-height:1.6;border-top:1px solid #edf1e7;padding-top:8px}
#dialogBody>.word-stage-grid .word-card img{height:100px}
@media(max-width:600px){.word-stage{padding:8px 0 14px;justify-content:center}.word-stage .target{font-size:62px}.word-stage .learning-section-title{font-size:17px}.word-stage-grid{gap:7px;margin:10px 0}.word-stage-grid .word-card{padding:9px 5px;gap:7px;border-radius:15px}.word-stage-grid .word-card img{height:92px;max-height:110px}.word-stage-grid .reading{font-size:clamp(13px,calc(90px / var(--word-width)),27px);margin:10px 0 3px;flex-wrap:nowrap}.word-stage-grid .word-listen{font-size:12px;min-height:38px;padding:5px 10px}.word-stage-grid .gloss{font-size:11px}.compact-word-list .reading{font-size:clamp(12px,calc(92px / var(--word-width)),25px)}.compact-word-list .word-card{padding:5px 3px}.sentence-section-heading .learning-section-title{font-size:17px}.sentence-filters{gap:4px;padding-bottom:7px}.sentence-unit-buttons,.sentence-lesson-buttons{gap:5px;padding-bottom:4px}.sentence-unit-buttons button,.sentence-lesson-buttons button{font-size:12px;min-height:34px;padding:5px 9px}.sentence-search{gap:5px;flex-wrap:wrap}.sentence-search input{font-size:14px;max-width:none;min-width:110px}.sentence-search button{font-size:12px;min-height:38px;padding:5px 8px}.sentence-catalog .example-heading .source{font-size:12px}.sentence-catalog .reading{font-size:var(--text)}.sentence-targets{font-size:12px}.practice-bottom .primary{min-width:98px}.practice-bottom>div{gap:3px}.practice-bottom>div>button{padding:5px 7px}}

/* Keep the viewport and illustration boxes stable while cards change. */
@media(min-width:601px){html{scrollbar-gutter:stable}}.practice-scroll{scrollbar-gutter:stable;overflow-anchor:none}
.example-card,.word-card{contain:paint}.example-card img,.word-card img{aspect-ratio:8/5;flex-shrink:0}
:root{--green:#597b65;--dark:#294c70;--line:#dce4e7;--pale:#eef3f6}h1,h2,.brand{color:#294c70}.primary{background:#386b57;border-color:#386b57}.primary:hover:not(:disabled){background:#28533f}.hero{background:#f0f5f2;border-color:#dbe5e1}.mode{background:#fafcfb;box-shadow:0 3px #e4ebe7}.mode:first-child{background:#edf4ee;border-color:#a6bcaa;box-shadow:0 3px #b4c6b8}.mode .study-art{width:90px;height:66px}.mode .study-art img{object-fit:contain}.art-label{color:#294c70}.art-cards .art-label{left:46%;top:47%;font-size:23px}.art-readpy .art-label{top:29%;left:49%;font-size:15px}.art-pinyin .art-label{left:47%;top:53%;font-size:22px}.art-listen .art-label{left:50%;top:55%;font-size:23px}.art-order .art-label{left:46%;top:48%;font-size:13px}.art-mixed .art-label{left:67%;top:52%;font-size:15px}
.family-home{padding:14px 18px;border:1px solid #d5e0e6;border-radius:20px;margin:12px 0;background:#f7fafb}.family-home-heading{display:flex;align-items:center;gap:12px}.family-home-heading .study-art{width:72px;height:55px}.family-home h2{font-size:20px}.family-hint{font-size:14px;line-height:1.6;color:#53675d;margin:6px 0}.family-translation{display:block;color:#4b6580;font-size:13px;line-height:1.6;margin-top:3px}.family-summary{font-size:13px;color:#627480;margin:4px 0 8px}.family-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}.family-actions button{font-size:14px}.family-count{display:flex;gap:5px}.family-count button{font-size:13px;min-height:40px;padding:5px 10px}.family-result>.study-art{width:110px;height:100px}.family-result>button{margin:8px 4px}.family-result .family-hint{text-align:center}.parent-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}.parent-stats>div{border:1px solid #dce5e2;border-radius:13px;padding:12px 6px;text-align:center;background:#f5f9f6}.parent-stats strong{display:block;font-size:27px;color:#294c70}.parent-stats span{font-size:13px}.parent-group{margin:20px 0}.parent-group h3{font-size:17px;margin:8px 0}.parent-group>button{font-size:13px}.parent-word-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:7px;margin:10px 0}.parent-word-grid button{display:flex;flex-direction:column;align-items:center;padding:8px 6px;gap:5px;background:#fcfdfc}.parent-word-grid strong{font-family:SemesterKai,SemesterExtra,serif;font-size:27px;font-weight:400}.parent-word-grid small{font-size:11px;line-height:1.5;color:#687b70}.parent-guide .family-hint{margin:12px 0}.parent-guide button{margin:8px 4px}
.unified-learning{max-width:1120px;margin:0 auto;padding:2px 6px 12px}.learning-heading{display:flex;align-items:center;justify-content:center;position:relative;min-height:82px;gap:15px}.learning-heading .target{font-size:64px;line-height:1.2}.learning-inline-tools{position:absolute;right:0;display:flex;gap:6px}.learning-inline-tools button{font-size:13px;min-height:38px;padding:5px 10px}.unified-learning>.source{text-align:center;display:block;margin:2px 0 8px}.unified-learning>.family-hint{text-align:center;margin:3px 0 8px}.unified-words{max-width:860px;margin:6px auto 12px;gap:10px}.unified-words .word-card{padding:6px 10px;border-radius:16px;gap:3px}.unified-words .word-card img{height:92px;max-height:105px}.unified-words .reading{margin:9px 0 4px;font-size:clamp(16px,calc(190px / var(--word-width)),32px)}.unified-examples{gap:9px}.unified-examples .example-card{grid-template-columns:12% minmax(0,1fr);column-gap:12px;padding:10px 13px;border-radius:16px}.unified-examples .example-heading{padding-bottom:4px}.unified-examples .example-card img,.unified-examples.has-two .example-card img{height:82px;max-height:90px}.unified-examples .example-card .reading,.unified-examples.has-two .example-card .reading{min-height:0;padding:5px 0;line-height:1.6}.unified-examples .example-card .caption{display:none}.unified-examples .example-card.without-image{grid-template-columns:1fr}.parent-observation{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;margin:12px 0 2px;font-size:14px}.parent-observation button{font-size:14px;min-height:40px}.parent-observation small{font-size:12px;color:#5a795f}
@media(min-width:700px) and (max-height:800px){.family-home{padding:8px 14px;margin:8px 0}.family-home-heading .study-art{width:58px;height:42px}.family-home h2{font-size:18px}.family-home .family-hint{font-size:13px;margin:2px 0}.family-home .family-actions{margin-top:5px}.family-home .family-actions button{min-height:36px;font-size:13px}.family-summary{margin:2px 0 3px}.mode{min-height:78px}.mode .study-art{height:48px;width:76px}.learning-heading{min-height:66px}.learning-heading .target{font-size:55px}.unified-words .word-card img{height:72px}.unified-words .word-card{padding:4px 8px}.unified-examples .example-card img,.unified-examples.has-two .example-card img{height:66px}.unified-words{margin-bottom:8px}}
@media(max-width:600px){.family-home{padding:11px 12px;margin:9px 0}.family-home-heading{gap:8px}.family-home-heading .study-art{width:53px;height:45px}.family-home h2{font-size:18px}.family-hint{font-size:13px;line-height:1.55}.family-summary{font-size:12px}.family-actions{gap:6px}.family-actions button{font-size:12px;padding:6px 9px}.family-count button{min-height:38px}.family-actions .primary{min-width:120px}.mode .study-art{width:74px;height:51px}.learning-heading{min-height:65px;justify-content:flex-start}.learning-heading .target{font-size:53px}.learning-inline-tools button{font-size:12px;padding:5px 8px;min-height:36px}.unified-learning{padding:0 0 8px}.unified-learning>.source{font-size:11px;margin:2px 0 5px;text-align:left}.unified-learning>.family-hint{text-align:left;font-size:12px}.unified-words{gap:6px;margin:6px 0 9px}.unified-words .word-card{padding:4px 3px;gap:2px}.unified-words .word-card img{height:64px;max-height:74px}.unified-words .reading{margin:7px 0 3px;font-size:clamp(13px,calc(86px / var(--word-width)),26px)}.unified-words .word-listen{font-size:11px;min-height:32px;padding:4px 7px}.unified-examples .example-card{grid-template-columns:19% minmax(0,1fr);padding:8px;gap:6px}.unified-examples .example-card img,.unified-examples.has-two .example-card img{height:65px;max-height:85px}.unified-examples .example-card .reading{font-size:var(--text);line-height:1.55}.unified-examples .example-heading .source{font-size:11px}.unified-examples .sentence-listen{font-size:11px;min-height:34px;padding:4px 7px}.parent-observation{gap:6px;font-size:13px}.parent-observation button{font-size:13px;padding:6px 10px}.parent-stats{gap:5px}.parent-stats span{font-size:11px}.parent-stats strong{font-size:24px}.parent-word-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.parent-word-grid small{font-size:11px}}
.parent-group>summary{cursor:pointer;font-size:17px;font-weight:600;color:#294c70;padding:10px 0;border-bottom:1px solid #e1e8e4}.parent-group>summary::marker{color:#718b7b}
/* Keep the school header fixed; long home and learning content scrolls inside main. */
body{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}header{width:100%;flex-shrink:0}main{flex:1;min-height:0;width:100%;overflow:auto;overscroll-behavior:contain}.practice-frame{height:100%;min-height:0}
/* One scroll owner per view. No horizontal scrolling strips. */
html{scrollbar-gutter:auto}body{background:#fff}header,main{max-width:1280px}main{scrollbar-gutter:auto;scrollbar-width:thin;scrollbar-color:#cdd8d2 transparent}main:has(.practice-frame){overflow:hidden}.practice-scroll{overflow-x:hidden;overflow-y:auto;scrollbar-gutter:auto;scrollbar-width:thin;scrollbar-color:#cdd8d2 transparent}main::-webkit-scrollbar,.practice-scroll::-webkit-scrollbar,#dialogBody::-webkit-scrollbar{width:5px;height:5px}main::-webkit-scrollbar-thumb,.practice-scroll::-webkit-scrollbar-thumb,#dialogBody::-webkit-scrollbar-thumb{background:#cdd8d2;border-radius:8px}main::-webkit-scrollbar-track,.practice-scroll::-webkit-scrollbar-track,#dialogBody::-webkit-scrollbar-track{background:transparent}body:has(dialog[open]) main,body:has(dialog[open]) .practice-scroll{overflow:hidden}
.home-view{display:flex;flex-direction:column;gap:8px;padding-top:4px;padding-bottom:10px}.home-view .hero{flex-shrink:0;padding:12px 18px;border-radius:20px}.home-view .hero h1{font-size:26px}.scope-bar{display:flex;justify-content:center;align-items:center;gap:18px;flex-shrink:0}.scope-bar .unit-tabs,.scope-bar .track-tabs{margin:0;gap:6px;max-width:none}.scope-bar .unit-tabs button,.scope-bar .track-tabs button{font-size:13px;min-height:36px;padding:5px 10px;white-space:nowrap;box-shadow:none}.scope-bar .track-tabs button{min-width:120px}.track-tabs button[aria-pressed=true]{background:#edf3f8;border-color:#afc3d2;box-shadow:none}.home-view .study{padding:10px 18px;flex-shrink:0;border-radius:18px}.home-view .study p{font-size:13px}.home-view .section-label{flex-shrink:0;margin:0 2px;font-size:14px}.home-view .modes{flex:1;min-height:230px;grid-template-rows:repeat(3,minmax(0,1fr));gap:10px}.home-view .mode{min-height:0;border-radius:19px;padding:6px;box-shadow:none}.home-view .mode:first-child{box-shadow:inset 0 0 0 1px #b4c6b8}.home-view .mode .study-art{height:clamp(42px,8vh,64px);width:84px}.home-view .mode strong{font-size:16px}.mode:not(:first-child) .lock{display:none}.home-view footer{flex-shrink:0;margin:0;gap:24px;min-height:32px}.home-view footer button{font-size:13px;min-height:32px;padding:4px}.study-controls{gap:7px}.study-controls button,.study-controls select{min-height:42px;font-size:13px}.family-home{padding:0;margin:0;border:0;background:#fff}.family-home-heading h2{display:none}.family-home-heading .study-art{width:72px;height:60px}.family-home .family-actions{margin-top:14px}.family-home .family-summary{margin:12px 0}.family-home .family-hint{font-size:15px}.family-home .family-actions button{min-height:44px;font-size:14px}
/* Short fixed navigation, one primary action, and a single source for the learning card. */
body:has(.practice-frame) header{height:52px;padding-top:4px;padding-bottom:4px}.practice-top{height:44px;min-height:44px;display:grid;grid-template-columns:1fr auto 1fr;gap:8px}.practice-top>button{justify-self:start;min-height:40px;padding:5px 12px}.practice-top h1{font-size:18px}.practice-top .right{justify-self:end;font-size:13px}.practice-top .right>button{display:none}.progress{height:4px;margin:4px 0 8px}.practice-bottom{padding:8px 0 2px;min-height:54px}.practice-bottom>button,.practice-bottom>div>button{min-height:44px}.practice-bottom .primary{min-width:210px}.unified-learning{max-width:1120px;padding:0 4px 8px}.learning-heading{min-height:58px}.learning-heading .target{font-size:56px;line-height:1.15}.learning-inline-tools button{border:0;background:#f6f8f5;min-height:36px;font-size:13px}.unified-learning>.source{font-size:12px;line-height:1.4;margin:0 0 7px}.unified-words{max-width:900px;gap:10px;margin:4px auto 10px}.unified-words .word-card{padding:5px 9px 9px;gap:0;cursor:pointer;background:#fff;border-radius:17px}.unified-words .word-card img{height:78px;max-height:90px}.unified-words .reading{margin:6px 0 2px;font-size:clamp(16px,calc(190px / var(--word-width)),32px)}.unified-words .word-listen[hidden]{display:none}.word-card:focus-visible{outline:2px solid #6c927a;outline-offset:2px}.unified-examples{gap:8px}.unified-examples .example-card{grid-template-columns:76px minmax(0,1fr) 56px;gap:10px;padding:10px 12px;min-height:92px;border-radius:17px}.unified-examples .example-heading{display:contents}.unified-examples .example-heading .source{display:none}.unified-examples .sentence-listen{grid-column:3;grid-row:1;align-self:center;justify-self:end;min-height:40px;padding:5px 8px;font-size:12px;border:0;background:#f6f8f4;box-shadow:none}.unified-examples .example-card img,.unified-examples.has-two .example-card img{grid-column:1;grid-row:1;height:72px;max-height:90px}.unified-examples .example-card .reading,.unified-examples.has-two .example-card .reading{grid-column:2;grid-row:1;min-height:0;font-size:var(--text);padding:0;line-height:1.55}.unified-examples .example-card.without-image{grid-template-columns:minmax(0,1fr) 56px}.unified-examples .example-card.without-image .reading{grid-column:1}.unified-examples .example-card.without-image .sentence-listen{grid-column:2}
/* The list has two concise filter rows; the lesson chooser never scrolls horizontally. */
.sentence-filters{gap:7px;padding:2px 0 9px}.sentence-unit-buttons{overflow:visible;flex-wrap:wrap;justify-content:center;gap:7px;padding:0}.sentence-unit-buttons button{min-height:36px;padding:5px 12px;font-size:13px;box-shadow:none}.sentence-search{justify-content:center;flex-wrap:nowrap;gap:7px}.sentence-search input{max-width:440px;min-width:0;width:0;flex:1;font-size:14px}.sentence-search button{min-height:40px;font-size:13px}.sentence-lesson-picker{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:112px}.sentence-catalog{max-width:1120px;gap:10px;padding:0 0 8px}.sentence-catalog .example-card{padding:10px 14px;border-radius:16px;row-gap:5px}.sentence-catalog .example-heading{padding-bottom:5px}.sentence-catalog .example-heading .source{font-size:12px}.sentence-catalog .sentence-listen{min-height:34px;border:0;background:#f6f8f4;font-size:12px}.sentence-catalog .example-card .reading{padding:5px 0;line-height:1.55}.sentence-targets{font-size:12px;border:0;padding-top:2px}
/* A dialog has one scrollable body, with its own heading always visible. */
dialog{padding:0;overflow:hidden;max-height:88dvh;border-radius:20px}dialog[open]{display:flex;flex-direction:column}.dialog-head{position:static;flex-shrink:0;padding:14px 18px;border-bottom:1px solid #e8ede8}.dialog-head h2{font-size:19px}.dialog-head button{min-height:40px;border:0;background:#f7f9f6}#dialogBody{padding:15px 18px 20px;overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cdd8d2 transparent}dialog::backdrop{background:#203d3530;backdrop-filter:none}.quiet-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quiet-menu>button,.quiet-menu>a{min-height:48px;padding:12px;text-align:center;border:1px solid #dde5df;border-radius:12px;font-size:15px;background:#fff}.reading-observation{display:flex;gap:12px;flex-wrap:wrap}.reading-observation>p{width:100%;margin:0 0 8px}.reading-observation>button{flex:1;min-height:70px;font-size:18px}.reading-observation>button small{display:block;font-size:13px;margin-top:5px;color:#597286}
@media(max-width:1000px){.scope-bar{gap:8px}.scope-bar .track-tabs button{min-width:100px}.scope-bar .unit-tabs button{font-size:12px;padding:5px 7px}.study-controls{flex-wrap:wrap}.unified-examples .example-card{grid-template-columns:62px minmax(0,1fr) 48px;gap:8px}.unified-examples .example-card img,.unified-examples.has-two .example-card img{height:65px}.unified-examples .sentence-listen{padding:5px 7px}}
@media(max-width:700px){.scope-bar{flex-direction:column;gap:6px;align-items:stretch}.scope-bar .unit-tabs,.scope-bar .track-tabs{justify-content:center}.scope-bar .unit-tabs{flex-wrap:wrap}.scope-bar .track-tabs button{min-width:0}.home-view .study{gap:6px}.home-view .study-controls{gap:6px}.home-view .study-controls .primary{margin-left:0}.home-view .mode strong{font-size:14px}}
@media(max-width:600px){header{height:58px}.home-view{gap:7px;padding-top:3px;padding-bottom:6px}.home-view .hero{padding:9px 13px}.home-view .hero h1{font-size:23px}.home-view .hero p{font-size:12px}.scope-bar .unit-tabs{gap:4px}.scope-bar .unit-tabs button{font-size:11px;padding:5px 7px;min-height:34px}.scope-bar .track-tabs{gap:5px}.scope-bar .track-tabs button{font-size:12px;min-height:35px;padding:5px 7px}.home-view .study{padding:10px 12px;flex-direction:column;align-items:stretch}.home-view .study>div:first-child{display:flex;align-items:baseline;gap:10px}.home-view .study h2{font-size:18px;white-space:nowrap}.home-view .study p{font-size:11px;margin:0}.study-controls{gap:5px}.study-controls button,.study-controls select{font-size:12px;min-height:38px;padding:5px 7px}.study-controls select{padding-right:23px}#lessonFilter{max-width:105px}#count{max-width:75px}#order{max-width:89px}#shuffle{padding:5px 8px}.home-view .study-controls .primary{width:100%;min-height:40px}.home-view .section-label{font-size:12px}.home-view .modes{min-height:225px;gap:7px}.home-view .mode{border-radius:15px;padding:4px 2px}.home-view .mode .study-art{width:68px;height:47px}.home-view .mode strong{font-size:12px}.home-view footer{gap:20px;min-height:30px}.home-view footer button{font-size:12px}.practice-top{height:42px;min-height:42px}.practice-top h1{font-size:16px}.practice-top>button{min-height:40px;font-size:12px;padding:5px 10px}.practice-bottom{gap:6px;padding:7px 0 2px}.practice-bottom button{font-size:12px;padding:6px 9px}.practice-bottom .primary{min-width:130px;font-size:14px}.learning-heading{min-height:54px;gap:8px;justify-content:space-between}.learning-heading .target{flex:1;min-width:0;font-size:clamp(28px,calc(206px / var(--target-width)),48px)}.learning-inline-tools{position:static;flex-shrink:0;gap:5px}.learning-inline-tools button{font-size:12px;padding:5px 8px;min-height:36px}.unified-learning{padding:0 0 6px}.unified-learning>.source{font-size:11px;text-align:center;margin:1px 0 6px}.unified-words{margin:3px 0 8px;gap:6px}.unified-words .word-card{padding:3px 3px 7px;border-radius:14px}.unified-words .word-card img{height:62px;max-height:70px}.unified-words .reading{font-size:clamp(13px,calc(86px / var(--word-width)),26px);margin:5px 0 1px}.unified-examples .example-card{grid-template-columns:48px minmax(0,1fr);column-gap:7px;row-gap:0;padding:8px;min-height:88px;border-radius:14px}.unified-examples .example-card img,.unified-examples.has-two .example-card img{grid-column:1;grid-row:1;height:52px;align-self:end}.unified-examples .sentence-listen{grid-column:1;grid-row:2;min-height:36px;padding:5px 6px;font-size:11px;justify-self:stretch;align-self:start;margin-top:3px}.unified-examples .example-card .reading,.unified-examples.has-two .example-card .reading{grid-column:2;grid-row:1/span 2;font-size:var(--text);line-height:1.55;padding:0}.unified-examples .example-card.without-image{grid-template-columns:minmax(0,1fr) 48px}.unified-examples .example-card.without-image .reading{grid-column:1;grid-row:1}.unified-examples .example-card.without-image .sentence-listen{grid-column:2;grid-row:1;margin:0}.sentence-unit-buttons{gap:4px;justify-content:space-between}.sentence-unit-buttons button{flex:1;font-size:11px;padding:5px 5px;min-height:34px;white-space:nowrap}.sentence-search{gap:5px}.sentence-search button{padding:5px 7px;min-height:38px;font-size:12px}.sentence-lesson-picker{min-width:88px;max-width:110px}.sentence-search input{height:38px;font-size:13px;padding:6px 8px}.sentence-catalog .example-card{padding:9px 10px}.sentence-catalog .example-heading .source{font-size:11px}.sentence-catalog .reading{font-size:var(--text)}.sentence-targets{font-size:11px}.quiet-menu{gap:8px}.quiet-menu>button,.quiet-menu>a{font-size:14px;padding:10px}.dialog-head{padding:11px 14px}#dialogBody{padding:12px 14px 16px}.family-home .family-hint{font-size:14px}}
/* One coherent bamboo counterpart to the reference's fresh green interface. */
:root{--green:#4d7651;--dark:#304837;--line:#dce4d8;--pale:#edf4dd;color:#34443c;background:#fff}h1,h2,.brand{color:#34483e}header{max-width:1040px;gap:8px}.brand strong{font-size:18px}.brand small{font-size:11px}.brand img{border-radius:11px;object-fit:contain}header nav{margin-left:auto;gap:7px}header nav button{width:44px;min-width:44px;height:44px;min-height:44px;padding:7px;border-radius:13px;background:#f5f8ed;border:1px solid #e1e7d8;box-shadow:0 2px #e1e7d5}header nav button svg,.header-back svg{width:100%;height:100%;display:block}.header-back,#viewTitle{display:none}.home-view{gap:10px;padding-top:2px}.home-view .hero{background:#edf4dd;border-color:#e0e8d4;border-radius:27px 27px 27px 8px;padding:13px 18px}.home-view .hero h1{font-size:28px}.hero p{color:#67735d}.points{background:#f8faee;border:0;color:#7e894e;padding:7px 12px;border-radius:12px}.home-view .track-tabs{flex-shrink:0;max-width:680px;width:100%;margin:1px auto;gap:9px}.home-view .track-tabs button{font-size:14px;min-height:39px;border-radius:15px 15px 11px 11px;box-shadow:0 2px #e6eadf;background:#fff;color:#6b786d}.home-view .track-tabs button[aria-pressed=true]{background:#eaf2d9;color:#3e5b3e;border:2px solid #a6bb8d;box-shadow:0 3px #a6bb8d}.home-view .study{border-radius:25px;padding:13px 22px;background:#fbfdf8;border-color:#dbe4d7;gap:12px}.study h2{color:#486344}.study-controls{flex-wrap:nowrap;gap:8px}.study-controls>button,.study-controls select{font-size:13px;min-height:42px;border-radius:13px}.study-controls #unitFilter{max-width:156px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.study-controls #lessonFilter{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.study-controls .primary{min-width:150px}.primary{background:#4b7552;border-color:#416b48;box-shadow:0 3px #365b3d;color:#fff;border-radius:16px;font-weight:650}.primary:hover:not(:disabled){background:#3e6545;box-shadow:0 3px #2c4d33}.home-view .section-label{color:#52634a;margin:0 2px;font-size:14px}.home-view .modes{gap:11px;min-height:242px}.home-view .mode{background:#f9fbf5;border:1px solid #dfe6d9;border-radius:24px 24px 24px 9px;box-shadow:0 3px #e2e8dd;padding:7px 5px 9px;gap:3px}.home-view .mode:first-child{background:#eaf2d6;border:2px solid #9db382;box-shadow:0 3px #bbcca3}.home-view .mode .study-art{width:84px;height:clamp(48px,8.2vh,72px);display:block}.home-view .mode strong{font-size:16px;color:#425b3e}.mode:disabled{opacity:.63}.mode-lock{position:absolute;right:9px;top:8px;width:17px;height:17px;opacity:.7}.mode-lock svg{width:100%;height:100%;stroke:#74846b}.mode .lock{color:#5f744e;background:#e5efce}.art-label{display:none}.study-art img{object-fit:contain}.home-view footer{gap:26px;margin-top:1px}.home-view footer button{color:#63745b}.practice-bottom .primary{border-radius:16px}.learning-inline-tools button,.sentence-search button,.sentence-unit-buttons button,.quiet-menu>button,.quiet-menu>a{border-radius:12px;background:#fbfdf8;border-color:#dce5d6;color:#4c6546}.sentence-unit-buttons button[aria-pressed=true],.quiet-menu button[aria-pressed=true]{background:#eaf2d9;border-color:#a1b58a;box-shadow:inset 0 -2px #c4d4ad}.word-card,.example-card{border-color:#e0e6dc}.syllable.target-char,.syllable.target-char:hover,.syllable.target-char.read{background:#fff1a7!important}.example-card.speaking{border-color:#a4bc87;box-shadow:0 0 0 2px #eaf2dc}.progress{accent-color:#a5bb8c}.progress::-webkit-progress-value{background:#a5bb8c}
/* In learning views the existing title and navigation share the same header. */
body:has(.practice-frame) header{height:56px;padding-top:5px;padding-bottom:5px;max-width:1280px}body:has(.practice-frame) .brand span{display:none}body:has(.practice-frame) .brand img{width:36px;height:36px}body:has(.practice-frame) .header-back{display:block;width:34px;height:38px;min-height:38px;padding:5px;border:0;background:transparent;box-shadow:none;border-radius:10px}body:has(.practice-frame) #viewTitle{display:flex;align-items:center;gap:12px;flex:1;min-width:0;font-size:17px;font-weight:650;white-space:nowrap}#viewTitle>span{overflow:hidden;text-overflow:ellipsis}#viewTitle small{font-size:12px;font-weight:400;color:#7a896f;flex-shrink:0}body:has(.practice-frame) .practice-top{display:none}.practice-frame .progress{margin-top:3px}.unified-learning{padding-top:2px}.unified-words .word-card{border-radius:18px}.unified-examples .example-card{border-radius:19px}.sentence-catalog .example-card{border-radius:18px}.sentence-listen{color:#536b49;background:#f1f6e8}.reading-observation>button[aria-pressed=true]{background:#eaf2d9;border-color:#a1b58a}
/* Reference-style settings: two clear tabs and compact segmented groups. */
dialog{max-width:min(620px,95vw);border-color:#dce5d8;border-radius:22px;box-shadow:0 18px 70px #243d2330}.dialog-head{padding:14px 18px 9px;border-bottom:0}.dialog-head h2{font-size:20px}.dialog-head button{border-radius:12px;background:#f1f5ea;color:#486b43}.preferences-panel{display:flex;flex-direction:column;gap:16px}.preferences-tabs{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:2px}.preferences-tabs button{border-radius:13px;min-height:43px;font-size:15px;box-shadow:0 2px #e6ebdf}.preferences-tabs button[aria-selected=true]{background:#eaf2d9;border-color:#9fb486;box-shadow:0 2px #b8cba0}.preference-section h3{margin:0 0 8px;font-size:14px;color:#5a7050}.setting-grid{display:flex;gap:8px;flex-wrap:wrap}.setting-grid>button{flex:1;min-height:40px;min-width:65px;font-size:14px;border-radius:12px;box-shadow:0 2px #e5ebdf}.setting-grid>button[aria-pressed=true]{background:#eaf2d9;border-color:#9fb486;box-shadow:0 2px #c0d0a8}.preference-font{display:flex;align-items:center;gap:9px}.preference-font>span{margin-right:auto;font-size:14px;color:#5a7050}.preference-font button{min-width:48px;min-height:38px}.preference-font strong{font-size:13px;min-width:38px;text-align:center}.preferences-links{display:flex;gap:8px;justify-content:center}.preferences-links button{border:0;background:#f7faf1;min-height:38px;font-size:13px}.record-summary{display:flex;align-items:center;gap:16px;background:#f3f7ea;padding:14px;border-radius:17px}.record-summary .study-art{width:84px;height:84px}.record-summary h3{margin:0 0 6px;font-size:15px}.record-summary strong{font-size:22px;color:#7b8b45}.record-summary p{margin:7px 0 0;font-size:13px;line-height:1.6;color:#6d7f63}.profile-add{display:flex;gap:9px;margin-top:17px}.profile-add input{flex:1;min-width:0;padding:8px;border:1px solid #dce5d6;border-radius:12px}.profile-add button{font-size:14px}.profile-editor>.setting-grid{margin-bottom:10px}
/* Night mode is opt-in and saved with the existing device preferences. */
html[data-theme=night]{background:#1b2821;color:#e3ebdf}html[data-theme=night] body{background:#1b2821;color:#e3ebdf}html[data-theme=night] :is(h1,h2,h3,.brand,.study h2,.home-view .mode strong){color:#e1ebd8}html[data-theme=night] :is(button,select,input,dialog,.word-card,.example-card,.study,.quiet-menu>a){background:#29392e;color:#e0ead8;border-color:#435543}html[data-theme=night] :is(.home-view .hero,.home-view .mode,.family-home,.record-summary){background:#283b29;border-color:#435942}html[data-theme=night] .home-view .mode:first-child{background:#354a2c;border-color:#82996b;box-shadow:0 3px #223a22}html[data-theme=night] :is(button[aria-pressed=true],.preferences-tabs button[aria-selected=true]){background:#3a5130;color:#eef6e6;border-color:#82996b;box-shadow:0 2px #526948}html[data-theme=night] :is(.reading,.cloze,.parent-word-grid strong){color:#edf4e5}html[data-theme=night] :is(.source,.family-hint,.note,.sentence-targets,.family-summary,.hero p){color:#b4c6a9}html[data-theme=night] .tone-color .tone1{color:#ff95a4}html[data-theme=night] .tone-color .tone2{color:#8ed38e}html[data-theme=night] .tone-color .tone3{color:#dcb4ff}html[data-theme=night] .tone-color .tone4{color:#9dbdff}html[data-theme=night] .tone-color .tone5{color:#c2cfbd}html[data-theme=night] .target-char{color:#304629!important}html[data-theme=night] .syllable.read{background:#46502b}html[data-theme=night] .primary{background:#60834b;color:#fff;border-color:#70905d;box-shadow:0 3px #172c18}
@media(max-width:900px){.study-controls{gap:6px;flex-wrap:wrap}.study-controls #unitFilter{max-width:130px}.study-controls #lessonFilter{max-width:120px}.study-controls .primary{min-width:120px}.home-view .study{padding:12px 16px}.home-view .modes{gap:9px}}
@media(max-width:600px){header{height:59px;padding:6px 12px;gap:7px}.brand{gap:7px}.brand strong{font-size:15px}.brand small{font-size:10px}.brand img{width:33px;height:33px}header nav{gap:4px}header nav button{width:38px;height:40px;min-width:38px;min-height:40px;padding:6px;border-radius:12px}.home-view{gap:8px}.home-view .hero{padding:11px 14px;border-radius:23px 23px 23px 7px}.home-view .hero h1{font-size:24px}.home-view .track-tabs{gap:6px;margin:0 auto}.home-view .track-tabs button{min-height:37px;font-size:13px;padding:5px 7px}.home-view .study{padding:11px 12px;gap:8px}.home-view .study h2{font-size:19px}.home-view .study p{font-size:12px}.study-controls{gap:5px;flex-wrap:wrap}.study-controls>button,.study-controls select{font-size:12px;min-height:37px;padding:5px 7px}.study-controls #unitFilter{max-width:98px;min-width:85px}.study-controls #lessonFilter{max-width:95px;min-width:80px}.study-controls #count{max-width:65px}.study-controls #order{max-width:88px}.home-view .study-controls .primary{width:100%;min-height:40px;font-size:14px}.home-view .modes{min-height:222px;gap:8px}.home-view .mode{border-radius:18px 18px 18px 7px;padding:6px 3px 8px;gap:2px}.home-view .mode .study-art{width:70px;height:clamp(44px,6.6vh,57px)}.home-view .mode strong{font-size:12px}.mode-lock{right:6px;top:6px;width:14px;height:14px}.home-view footer{gap:21px}.home-view footer button{font-size:12px}body:has(.practice-frame) header{height:52px;padding:5px 11px;gap:5px}body:has(.practice-frame) .brand img{width:28px;height:28px}body:has(.practice-frame) .header-back{width:28px;min-width:28px;height:36px;min-height:36px;padding:4px}body:has(.practice-frame) #viewTitle{font-size:14px;gap:6px}#viewTitle small{font-size:10px}.preferences-panel{gap:14px}.preferences-tabs button{min-height:41px;font-size:14px}.preference-section h3{font-size:13px}.setting-grid{gap:6px}.setting-grid>button{min-height:38px;min-width:54px;font-size:13px;padding:6px}.record-summary{padding:12px;gap:11px}.record-summary .study-art{width:65px;height:65px}.record-summary p{font-size:12px}.preferences-links button{font-size:12px}.dialog-head h2{font-size:18px}}
@media(max-width:360px){body:has(.practice-frame) .brand{display:none}.brand strong{font-size:13px}.brand img{width:29px;height:29px}header nav button{width:34px;min-width:34px}.home-view footer{gap:16px}}

html[data-theme=night] .dialog-head{background:#29392e}html[data-theme=night] :is(.preference-font>span,.preference-section h3,.record-summary p){color:#b4c6a9}

/* One task per screen, with a quiet centre and stable choices. */
body:has(.practice-frame) header{border-bottom:0}body:has(.practice-frame) #viewTitle{font-size:15px;color:#607166}.practice-frame .progress{height:7px;margin:6px 0 8px;flex-shrink:0}.practice-frame .progress::-webkit-progress-bar{background:#edf1ed}.practice-frame .progress::-webkit-progress-value{background:#aac08e;transition:width .18s ease-out}.practice-scroll{scrollbar-color:#dbe4d8 transparent}.practice-bottom{min-height:59px;padding:8px 0 3px}.practice-bottom>button:first-child{color:#81917b}.practice-bottom>div:last-child{flex:1;justify-content:flex-end}.practice-bottom>div:last-child>.primary{min-width:220px}.question{width:100%;max-width:980px;min-height:100%;display:flex;flex-direction:column;justify-content:center;gap:22px;padding:18px 22px 4px}.question-instruction{font-family:inherit!important;font-size:16px!important;font-weight:450;color:#71806a!important;line-height:1.5!important;margin:0}.question-readpy .question-instruction,.question-pinyin .question-instruction,.question-listen .question-instruction{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.question .prompt{min-height:170px;margin:0 0 12px}.question .prompt .target{font-size:clamp(64px,9vw,92px);cursor:pointer}.question .big-pinyin{font-size:clamp(42px,6vw,64px)}.question .choices{width:100%;max-width:900px;margin:0 auto;gap:18px;flex-shrink:0}.question .choice{min-height:108px;padding:15px 9px;border-radius:22px 22px 22px 8px;border:1px solid #dfe7d9;background:#fbfdf8;box-shadow:0 3px #e2e8de;transition:background .12s,border-color .12s,transform .12s}.question .choice:hover:not(:disabled){background:#f1f7e7;border-color:#acc294;transform:translateY(-2px)}.choice .reading{font-size:40px;line-height:1.4;justify-content:center;margin:0;pointer-events:none}.choice .syllable{pointer-events:none}.choice .syllable rt{font-size:.39em}.choice .answer-pinyin{font:600 30px Pinyin,sans-serif}.choice.correct{background:#e5f2d8!important;border:2px solid #89ae68!important;box-shadow:0 3px #b8d09d!important}.choice.wrong{background:#fff3e8!important;border-color:#d79a6f!important;box-shadow:0 3px #eed6c3!important}.question .feedback{height:25px;min-height:25px;line-height:25px;margin:0;font-size:16px;color:#547a45}.question-footer{min-height:48px;justify-content:center!important}.question-footer .source{margin:0;text-align:center;max-width:90%;font-size:12px;line-height:1.5}.listen-control{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:6px 16px;border:1px solid #dce5d5;border-radius:15px;background:#f8fbf2;color:#4b6e45;box-shadow:0 2px #e3eadc;font-size:14px}.listen-control .study-art{width:38px;height:34px}.question-listen .prompt .listen-control{flex-direction:column;gap:7px;min-width:170px;min-height:150px;border-radius:28px 28px 28px 10px}.question-listen .prompt .study-art{width:94px;height:90px}.question-picture{grid-template-columns:29% minmax(0,1fr);gap:22px;max-width:940px;width:100%;margin:auto}.question-picture.without-image{grid-template-columns:1fr}.scene-listen{background:transparent;border:0;box-shadow:none;padding:0;display:block;min-width:0}.scene-listen img{width:100%;height:100%;max-height:210px;object-fit:contain;display:block}.question-context{display:flex;flex-direction:column;gap:10px}.cloze{margin:0;line-height:1.65;font-size:var(--text);text-align:left}.sentence-gap{display:inline-block;background:#fff2b0;border-radius:5px;border-bottom:2px solid #d4bd67;min-width:1.1em;height:1.1em;vertical-align:-.08em}.question-audio{display:flex;justify-content:center}.question-audio .study-art{width:30px;height:28px}.order-scene{display:flex;align-items:center;justify-content:center;gap:25px;min-height:105px}.order-scene .scene-listen{width:155px;height:110px}.order-answer{background:#f8fbf1;border:1px dashed #bbcea5;min-height:96px;align-items:center;align-content:center}.order-placeholder{font-family:inherit;color:#8b9b80;font-size:15px}.order-bank{border:0;background:transparent;min-height:65px;padding:4px;align-items:center}.order-bank button,.order-answer button{border-radius:14px 14px 14px 5px;background:#fff;border-color:#dbe5d2;box-shadow:0 2px #e4ecdd;font-size:28px;min-height:50px;line-height:1.5}.order-bank button:disabled{opacity:.25}.order-reset{align-self:center;min-height:36px;border:0;background:#f5f8ee;color:#617d55;font-size:13px;border-radius:12px}.order-answer.wrong{border-color:#d79a6f;background:#fff5ee}.order-answer.correct{border-color:#89ae68;background:#eaf4df}.writing-layout{gap:45px}.writing-layout .target{font-size:80px}.writing-actions{margin-top:0;gap:8px}.writing-actions button{border-radius:13px;min-height:40px;background:#f8fbf2;border-color:#dde7d4;color:#5a754d}.writing-actions button[aria-pressed=true]{background:#eaf3db;border-color:#a1bb83;box-shadow:0 2px #c6d6b2}.writing-board{border-radius:13px;border-color:#bbcca8;background-color:#fdfefb}.unified-learning{width:100%;max-width:1120px;gap:9px;margin:auto}.learning-heading{position:relative;min-height:76px}.learning-heading .target{font-size:60px}.learning-inline-tools{gap:6px}.learning-inline-tools button{border:0;box-shadow:none;background:#f7faf1;min-height:34px;font-size:12px}.unified-words{gap:12px;max-width:880px}.unified-words .word-card{border:1px solid #dfe7d8;border-radius:22px 22px 22px 8px;box-shadow:0 2px #e7ecdf;padding:8px 10px;cursor:pointer;background:#fff}.unified-words .word-card:hover{border-color:#b0c499;background:#fcfef8}.unified-words .word-card img{height:83px}.unified-words .word-card .reading{font-size:32px}.unified-examples{gap:9px}.unified-examples .example-card{border:1px solid #e1e8dc;border-radius:20px 20px 20px 7px;background:#fff;box-shadow:0 2px #eff2e9;padding:10px 14px;grid-template-columns:62px minmax(0,1fr) 46px;gap:12px}.unified-examples .example-card img{height:64px}.unified-examples .example-card .reading{line-height:1.55}.unified-examples .sentence-listen{font-size:12px;padding:4px;min-height:35px;background:#f7faf1;border-radius:12px}.result{width:100%;max-width:860px;padding:20px 15px;overflow:auto;scrollbar-width:thin}.result h1{font-size:28px;color:#456641}.result p{font-size:15px;color:#728069}.result>.study-art{width:90px;height:80px}.result .stat-grid{gap:45px;margin:20px 0}.stat-grid strong{font-size:33px;color:#78944e}.result .char-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.result .char-grid button{min-width:58px;background:#fbfdf6;border-color:#dce7cf;border-radius:14px 14px 14px 5px}.result-games{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:18px auto}.result-games button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:9px 5px;border-radius:18px 18px 18px 7px;background:#f8fbf1;border-color:#dde7d4;font-size:13px;box-shadow:0 2px #e5ecde}.result-games .study-art{width:52px;height:44px}.result-actions{display:flex;justify-content:center;gap:10px;margin-top:18px}.result-actions button{min-height:46px;border-radius:15px}.result-actions .primary{min-width:180px}html[data-theme=night] :is(.question .choice,.unified-examples .example-card,.unified-words .word-card,.listen-control,.writing-actions button,.order-reset,.order-answer,.result-games button,.result .char-grid button){background:#29392e;color:#e0ead8;border-color:#465c43}html[data-theme=night] .sentence-gap{background:#6e6639;border-color:#bdaa6a}html[data-theme=night] :is(.question-instruction,.result p){color:#b4c6a9!important}html[data-theme=night] .order-placeholder{color:#b4c6a9}html[data-theme=night] .choice.correct{background:#3c5a31!important}html[data-theme=night] .choice.wrong{background:#634735!important}html[data-theme=night] .writing-board{background-color:#e8eedf}
@media(max-width:600px){.question{gap:18px;padding:10px 0 0}.question .prompt{min-height:150px;margin:0}.question .choices{gap:8px}.question .choice{min-height:91px;padding:12px 4px;border-radius:18px 18px 18px 6px}.choice .reading{font-size:34px}.choice .answer-pinyin{font-size:23px}.question-picture{grid-template-columns:1fr;gap:8px}.scene-listen img{max-height:125px}.question-context{gap:9px}.question .cloze{font-size:var(--text);line-height:1.55}.question-instruction{font-size:14px!important}.question-audio .listen-control{min-height:38px;padding:4px 11px}.question-picture .scene-listen{max-width:190px;justify-self:center}.question-footer{min-height:40px}.question-footer .source{font-size:11px}.question-listen .prompt .listen-control{min-height:138px;min-width:155px}.question .feedback{font-size:14px}.order-scene{min-height:80px;gap:12px}.order-scene .scene-listen{height:85px;width:120px}.order-answer{min-height:90px;padding:8px}.order-bank button,.order-answer button{font-size:24px;padding:7px 10px;min-height:43px}.order-placeholder{font-size:13px}.question-order{gap:12px}.writing-layout{gap:16px}.writing-layout .target{font-size:55px}.writing-board{width:min(270px,64vw)}.writing-actions{gap:5px}.writing-actions button{font-size:12px;padding:6px 9px;min-height:38px}.practice-bottom>div:last-child>.primary{min-width:130px}.learning-heading{min-height:69px}.learning-heading .target{font-size:54px}.learning-inline-tools{top:12px}.unified-learning{gap:8px}.unified-words{gap:7px}.unified-words .word-card{padding:7px 3px;border-radius:18px 18px 18px 6px}.unified-words .word-card img{height:72px}.unified-words .word-card .reading{font-size:28px}.unified-examples .example-card{grid-template-columns:42px minmax(0,1fr);gap:8px;padding:10px 9px}.unified-examples .example-card img{height:46px}.unified-examples .example-card .reading{line-height:1.55}.unified-examples .sentence-listen{grid-column:1;grid-row:2;font-size:10px;min-height:30px}.result{padding:16px 3px}.result h1{font-size:24px}.result>.study-art{height:62px}.result p{font-size:14px}.result-games{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.result-games button{font-size:12px;padding:7px 3px}.result-actions{flex-wrap:wrap}.result-actions .primary{min-width:160px}}
@media(max-height:680px) and (min-width:700px){.question{gap:13px;padding-top:5px}.question .prompt{min-height:120px}.question .choice{min-height:86px}.question-picture img{max-height:150px}.question-listen .prompt .listen-control{min-height:120px}.unified-words .word-card img{height:65px}.learning-heading{min-height:60px}.learning-heading .target{font-size:50px}}
@media(prefers-reduced-motion:reduce){.choice,.progress::-webkit-progress-value{transition:none!important}}

.answer-pinyin,.big-pinyin{display:flex;flex-wrap:wrap;justify-content:center;column-gap:.28em;row-gap:.1em;line-height:1.45}.answer-pinyin>span,.big-pinyin>span{white-space:nowrap}

/* Keep each screen as one compact group, centred within the available space. */
main.home-view{max-width:1060px;justify-content:center;gap:12px;padding-top:18px;padding-bottom:18px}.home-view .hero{display:none}.home-view .track-tabs{max-width:680px;margin:0 auto 2px}.home-view .study{padding:14px 20px;flex-shrink:0}.study-overview{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}.study-overview h2{grid-column:1;font-size:21px}.study-overview #scopeNote{grid-column:1;margin-top:3px}.study-overview #points{grid-column:2;grid-row:1/span 2;min-height:38px;padding:4px 9px;font-size:14px;background:#f0f5e5}.home-view .modes{flex:0 0 auto;grid-template-rows:repeat(3,104px);min-height:0;gap:11px}.home-view .mode .study-art{height:57px;width:78px}.home-view footer{margin:2px 0 0;gap:26px}.home-view .section-label{margin:1px 2px 0}main:has(.practice-frame){max-width:1120px;padding-left:22px;padding-right:22px}body:has(.practice-frame) header{max-width:1120px}.practice-frame:has(.unified-learning) .practice-scroll{display:flex;flex-direction:column;padding:14px 0;overflow-y:auto}.practice-frame:has(.unified-learning) .practice-bottom{width:100%;max-width:1000px;margin:0 auto;flex-shrink:0}.unified-learning{flex:0 0 auto;display:flex;flex-direction:column;width:100%;max-width:1000px;gap:0;margin:auto!important;padding:0!important}.learning-heading{min-height:68px;justify-content:center!important}.learning-heading .target{font-size:56px;line-height:1.15;justify-content:center;margin:0 auto}.learning-inline-tools{position:absolute;right:0;top:50%;transform:translateY(-50%);gap:5px}.learning-inline-tools button{min-height:34px;padding:5px 9px}.unified-learning>.source{text-align:center;margin:1px 0 9px;font-size:12px;line-height:1.4}.unified-words{width:100%;max-width:760px;margin:0 auto 12px!important;gap:10px}.unified-words .word-card{min-width:0;max-width:none;padding:7px 8px 8px;border-radius:20px 20px 20px 7px}.unified-words .word-card img{height:78px;max-height:90px}.unified-words .word-card .reading{font-size:clamp(20px,calc(180px / var(--word-width)),32px);margin:5px 0 1px}.unified-examples{width:100%;gap:9px}.unified-examples .example-card{padding:9px 12px;min-height:0;grid-template-columns:54px minmax(0,1fr) 44px;gap:10px;border-radius:19px 19px 19px 7px}.unified-examples .example-card img,.unified-examples.has-two .example-card img{height:54px;max-height:64px}.unified-examples .example-card .reading,.unified-examples.has-two .example-card .reading{line-height:1.45;padding:0;min-height:0}.unified-examples .sentence-listen{font-size:11px;padding:4px 5px;min-height:34px}.practice-frame:has(.unified-learning) .practice-bottom{min-height:56px;padding-top:6px;padding-bottom:4px}.practice-frame:has(.unified-learning) .practice-bottom .primary{min-width:190px}.index-browser{display:flex;flex-direction:column;gap:10px}.index-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.index-tabs button{font-size:15px;border-radius:13px;min-height:42px}.index-tabs button[aria-selected=true]{background:#eaf3db;border-color:#a6bc8b;box-shadow:0 2px #c5d5af}.index-units{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}.index-units button{font-size:12px;padding:6px 9px;min-height:35px}.index-count{font-size:12px;color:#7b8d70;margin:0!important;text-align:center}.index-unit-group{padding:12px;border-radius:17px;background:#f5f9ee;border:1px solid #e3ebd9}.index-unit-group[data-unit=lower-1]{background:#f0f7fa;border-color:#ddeaf0}.index-unit-group[data-unit=lower-2]{background:#fff8ec;border-color:#f0e5d1}.index-unit-group h3{margin:0 0 10px;font-size:16px;color:#526b49}.index-unit-group h4{font-size:13px;font-weight:450;margin:12px 0 7px;color:#738369}.index-unit-group .char-grid{grid-template-columns:repeat(auto-fill,minmax(70px,1fr));margin:0;gap:7px}.index-unit-group .word-index{grid-template-columns:repeat(auto-fill,minmax(112px,1fr))}.index-unit-group .char-grid button{padding:8px 4px;min-height:70px;font-size:28px;background:#ffffffd9;border-radius:13px;border-color:#e0e8d8}.index-unit-group .char-grid small{font-size:13px;margin-top:5px}.index-back{margin-bottom:12px;font-size:13px;background:#f3f8e9;min-height:38px}html[data-theme=night] :is(.index-unit-group,.index-unit-group .char-grid button){background:#29392e;border-color:#465c43}html[data-theme=night] .index-unit-group h3{color:#d8e6cb}html[data-theme=night] .index-tabs button[aria-selected=true]{background:#3a5130;border-color:#82996b}html[data-theme=night] :is(.index-count,.index-unit-group h4){color:#b4c6a9}
@media(min-width:700px) and (max-width:1100px){main.home-view{max-width:960px}.home-view .study{gap:10px;padding:12px 15px}.home-view .study-controls{flex-wrap:wrap;justify-content:flex-end}.study-overview{min-width:160px}.home-view .modes{grid-template-rows:repeat(3,108px)}main:has(.practice-frame){padding-left:24px;padding-right:24px}.unified-learning{max-width:900px}.unified-words{max-width:700px}.learning-heading{min-height:61px}.learning-heading .target{font-size:52px}.unified-words .word-card img{height:73px}.unified-examples .example-card{grid-template-columns:46px minmax(0,1fr) 42px;gap:8px}.unified-examples .example-card img{height:46px}.unified-examples .example-card .reading{line-height:1.45}}
@media(min-width:700px) and (min-height:950px){.home-view .modes{grid-template-rows:repeat(3,115px)}.home-view .mode .study-art{height:64px}.practice-frame:has(.unified-learning) .practice-scroll{padding:20px 0}.unified-words{margin-bottom:14px!important}}
@media(max-width:699px){main.home-view{padding:12px;gap:10px;justify-content:center}.home-view .study{padding:11px 12px;gap:10px}.home-view .study>div.study-overview{display:grid;width:100%;grid-template-columns:1fr auto}.study-overview h2{font-size:19px}.home-view .study p{font-size:12px}.study-overview #points{grid-column:2;grid-row:1/span 2;min-height:35px;font-size:13px}.home-view .modes{grid-template-rows:repeat(3,105px);gap:8px}.home-view .mode .study-art{width:70px;height:53px}.home-view .mode strong{font-size:12px}.home-view footer{gap:20px;margin-top:1px}.home-view .section-label{font-size:12px}main:has(.practice-frame){padding:0 12px 8px}.practice-frame:has(.unified-learning) .practice-scroll{padding:8px 0}.learning-heading{min-height:61px}.learning-heading .target{max-width:calc(100% - 166px);font-size:clamp(26px,calc(180px / var(--target-width)),50px);margin:0 auto}.learning-inline-tools{position:absolute;right:0;top:50%;gap:4px}.learning-inline-tools button{font-size:11px;min-height:32px;padding:4px 7px}.unified-learning>.source{font-size:11px;margin:0 0 8px}.unified-words{max-width:580px;gap:6px;margin:0 auto 9px!important}.unified-words .word-card{padding:6px 3px;border-radius:16px 16px 16px 6px}.unified-words .word-card img{height:61px;max-height:70px}.unified-words .word-card .reading{font-size:clamp(15px,calc(85px / var(--word-width)),28px);margin:5px 0 1px}.unified-words .gloss{font-size:11px}.unified-examples{gap:8px}.unified-examples .example-card{grid-template-columns:36px minmax(0,1fr);column-gap:7px;row-gap:0;padding:9px 8px}.unified-examples .example-card img,.unified-examples.has-two .example-card img{grid-column:1;grid-row:1;height:40px;align-self:end}.unified-examples .sentence-listen{grid-column:1;grid-row:2;margin-top:3px;align-self:start;min-height:29px;font-size:10px;padding:4px 2px}.unified-examples .example-card .reading,.unified-examples.has-two .example-card .reading{grid-column:2;grid-row:1/span 2;line-height:1.42}.practice-frame:has(.unified-learning) .practice-bottom{min-height:52px;padding-top:6px}.practice-frame:has(.unified-learning) .practice-bottom .primary{min-width:130px}.index-tabs button{font-size:14px}.index-units{gap:5px}.index-units button{font-size:11px;padding:5px 6px;min-height:34px}.index-unit-group{padding:10px}.index-unit-group .char-grid{grid-template-columns:repeat(auto-fill,minmax(62px,1fr));gap:6px}.index-unit-group .word-index{grid-template-columns:repeat(auto-fill,minmax(95px,1fr))}.index-unit-group .char-grid small{font-size:12px}}
@media(max-height:700px) and (min-width:700px){main.home-view{gap:9px;padding-top:8px;padding-bottom:8px}.home-view .modes{grid-template-rows:repeat(3,91px)}.home-view .mode .study-art{height:48px}.practice-frame:has(.unified-learning) .practice-scroll{padding:8px 0}.learning-heading{min-height:55px}.learning-heading .target{font-size:48px}.unified-words .word-card img{height:61px}.unified-learning>.source{margin-bottom:7px}.unified-words{margin-bottom:8px!important}}

.unified-examples .sentence-listen{white-space:nowrap;padding-left:3px;padding-right:3px}

/* Content starts beneath the header. Centre horizontally, never by adding vertical voids. */
main.home-view{justify-content:flex-start!important;margin:0 auto!important;padding-top:10px!important;padding-bottom:12px!important;gap:10px}.home-view .track-tabs{margin-top:0!important}.home-view .study{padding-top:12px;padding-bottom:12px}.home-view .modes{grid-template-rows:repeat(3,100px);gap:10px}.home-view footer{margin-top:3px}.practice-frame:has(.unified-learning) .practice-scroll{justify-content:flex-start;padding-top:12px!important;padding-bottom:8px!important}.unified-learning{margin:0 auto!important}.learning-heading{min-height:60px}
@media(min-height:950px) and (min-width:700px){.home-view .modes{grid-template-rows:repeat(3,108px)}}
@media(max-width:699px){main.home-view{padding-top:8px!important;gap:9px}.home-view .modes{grid-template-rows:repeat(3,100px);gap:8px}.practice-frame:has(.unified-learning) .practice-scroll{padding-top:7px!important}}
@media(max-height:700px) and (min-width:700px){.home-view .modes{grid-template-rows:repeat(3,88px)}main.home-view{gap:8px}}

.theme-select{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;color:#4f6648;border:1px solid #dce5d5;border-radius:13px;font-size:13px;min-height:42px;padding:7px 10px;white-space:nowrap;box-shadow:none}.theme-select[aria-expanded=true]{border-color:#9bb581;background:#f0f7e7}.select-chevron{font-size:18px;line-height:1;color:#748e5e}.theme-options{position:fixed;z-index:1000;background:#fff;border:1px solid #d8e4ce;border-radius:15px;box-shadow:0 10px 28px #30492b22;padding:5px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cddbc1 transparent}.theme-option{display:block;width:100%;text-align:left;background:#fff;border:0;border-radius:10px;min-height:39px;font-size:14px;padding:9px 12px;color:#4e6546}.theme-option[aria-selected=true]{background:#eaf3dc;color:#3b5d37;font-weight:650;box-shadow:none}.theme-option:hover,.theme-option:focus-visible{background:#f1f7e9;outline:2px solid #9db787;outline-offset:-2px}.reading-unit{display:inline-flex;align-items:baseline;white-space:nowrap;flex:0 0 auto}.reading-unit .syllable.punct{align-self:baseline}.table-detail-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.table-detail-nav button{font-size:13px;min-height:38px}.table-detail-nav .index-back{margin:0}.detail-writing-entry{display:flex;justify-content:center;gap:8px;margin:12px 0}.dialog-body .writing-layout{gap:16px}.writing-dialog{display:flex;flex-direction:column;gap:12px}.writing-dialog .writing-layout .target{font-size:56px}.writing-dialog .writing-board{width:min(280px,62vw)}.writing-dialog .writing-note{min-height:22px;margin:0}.writing-dialog .writing-actions{gap:6px}.dialog-back-button{min-height:36px;font-size:13px;background:#f4f8ed;border:0;border-radius:11px;margin-bottom:9px}.practice-bottom{flex-shrink:0}.family-result>.primary,.family-result>.secondary,.family-result>button{margin:6px}.order-answer,.order-bank{overflow-wrap:anywhere}.order-bank button,.order-answer button{max-width:100%;white-space:normal;overflow-wrap:anywhere}.home-view .study-art img{opacity:1}.index-browser-top{position:sticky;top:-15px;background:#fff;z-index:2;padding:3px 0 8px;display:flex;flex-direction:column;gap:9px}.index-browser{gap:9px}html[data-theme=night] :is(.theme-select,.theme-options,.theme-option,.index-browser-top){background:#29392e;color:#e0ead8;border-color:#465c43}html[data-theme=night] .theme-option[aria-selected=true]{background:#3a5130;color:#e8f4dc}html[data-theme=night] .theme-option:hover,html[data-theme=night] .theme-option:focus-visible{background:#34492f}html[data-theme=night] .dialog-head{background:#29392e}.question .choice:disabled.wrong{opacity:.55}.progress::-webkit-progress-value{transition:width .18s ease-out}.reading .target{cursor:pointer}
@media(max-width:699px){.study-controls .theme-select{font-size:12px;min-height:37px;padding:5px 8px;gap:7px}.theme-options{border-radius:13px}.theme-option{min-height:42px;font-size:14px}.index-browser-top{top:-12px}.table-detail-nav{gap:5px}.table-detail-nav button{font-size:12px;padding:5px 8px}.writing-dialog .writing-layout{gap:9px}.writing-dialog .writing-layout .target{font-size:43px}.writing-dialog .writing-board{width:min(245px,63vw)}}

main:has(>.result){display:flex;align-items:center;justify-content:center}.result{max-height:100%;margin:auto;flex-shrink:1}.family-result{padding-top:20px;padding-bottom:20px}html[data-theme=night] #points{background:#3a5130;color:#e1edba}html[data-theme=night] :is(#scopeNote,.home-view .study p,.home-view .section-label){color:#bdcbae}html[data-theme=night] .home-view .mode,html[data-theme=night] .home-view .track-tabs button,html[data-theme=night] .preferences-tabs button,html[data-theme=night] .setting-grid button{box-shadow:0 2px #14241a}

/* Screen-sized layout: the grid uses the available width and height. */
body>header,body>main,body:has(.practice-frame)>header,main:has(.practice-frame){max-width:1600px;width:100%}body>header{height:60px;padding:7px 24px}main.home-view{max-width:1600px!important;width:100%;padding:8px 24px 12px!important;gap:10px;overflow:auto}.home-view .track-tabs{max-width:900px;width:100%;flex-shrink:0}.home-view .study{padding:12px 20px;flex-shrink:0}.home-view .modes{flex:1;min-height:270px;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:12px}.home-view .mode{min-height:0;padding:10px;gap:7px}.home-view .mode .study-art{height:clamp(54px,10vh,120px)!important;width:clamp(78px,11vw,144px)!important;max-height:64%}.home-view .mode strong{font-size:clamp(15px,1.35vw,20px)}.home-view footer{flex-shrink:0;min-height:32px;gap:30px}.home-view footer button{font-size:14px}.home-view .section-label{flex-shrink:0}.home-view [data-helper-label]:after{content:attr(data-helper-label);display:block;font-size:11px;font-weight:400;line-height:1.35;color:#7a8a6e;margin-top:3px}.home-view .study-controls{justify-content:flex-end;flex-wrap:wrap}.home-view .study-overview{min-width:170px}.header-stop{width:auto!important;min-width:72px!important;display:flex;align-items:center;justify-content:center;gap:4px;padding:6px 9px!important}.header-stop svg{width:24px!important;height:24px!important;flex-shrink:0}.header-stop span{font-size:13px;font-weight:600}.header-stop:disabled{opacity:.55}.practice-frame{width:100%}.practice-frame:has(.paged-learning) .practice-scroll{padding:0!important;overflow:hidden}.unified-learning.paged-learning{height:100%;min-height:0;width:100%;max-width:1500px;margin:0 auto!important;padding:8px 6px!important;gap:8px;display:flex;flex-direction:column;box-sizing:border-box}.paged-learning>.learning-heading{flex-shrink:0;min-height:65px}.paged-learning>.source{flex-shrink:0;margin:0!important;text-align:center;line-height:1.4}.learning-page-body{flex:1;min-height:0;display:grid;grid-auto-rows:minmax(0,1fr);gap:10px;width:100%}.learning-page-body>.unified-words{width:100%;max-width:1100px;height:100%;margin:0 auto!important;gap:12px;min-height:0}.learning-page-body .word-card{height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 12px;gap:4px}.learning-page-body .word-card>img{flex:1;min-height:0;max-height:210px;height:auto!important;max-width:100%;width:100%;object-fit:contain}.learning-page-body .word-card .reading{flex-shrink:0;font-size:clamp(24px,calc(220px / var(--word-width)),36px);margin:3px 0!important;min-height:0}.learning-page-body .gloss{flex-shrink:0;max-width:100%;font-size:14px;line-height:1.25;overflow-wrap:normal}.learning-page-body>.unified-examples{height:100%;min-height:0;margin:0}.learning-page-body .example-card{height:100%;min-height:0;grid-template-columns:clamp(60px,10vw,130px) minmax(0,1fr) 52px;padding:10px 16px;gap:14px}.learning-page-body .example-card img,.learning-page-body .has-two .example-card img{height:100%!important;max-height:150px;min-height:0;object-fit:contain}.learning-page-body .example-card .reading{font-size:var(--page-text,var(--text))!important;min-height:0;line-height:1.4!important;padding:0;align-content:center}.learning-page-body .example-card .sentence-listen{white-space:nowrap;min-height:36px;font-size:12px}.learning-page-nav{flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:16px;min-height:34px}.learning-page-nav[hidden]{display:none!important}.learning-page-nav button{min-height:32px;padding:4px 12px;font-size:13px;background:#f4f8ed;border-color:#dde7d4}.learning-page-nav span{font-size:13px;min-width:44px;text-align:center;color:#6b825e}.paged-learning.deck-measuring{height:auto;min-height:100%}.deck-measuring .learning-page-body{display:block;flex:none;min-height:0}.deck-measuring .learning-page-body>section,.deck-measuring .learning-page-body>.unified-words{height:auto!important;min-height:0;flex:none;margin:0 auto 10px!important}.deck-measuring .word-card{height:auto;min-height:0;display:flex}.deck-measuring .word-card>img{height:100px!important;max-height:100px;flex:none}.deck-measuring .example-card{height:auto!important;min-height:0}.deck-measuring .example-card img{height:65px!important}.deck-measuring .gloss{font-size:13px}.learning-only-sentence .learning-page-body{display:flex;align-items:stretch}.learning-only-sentence .unified-examples{width:100%;height:100%}.learning-only-sentence .example-card .reading{font-size:var(--page-text,var(--text))!important}.question.tight-question{gap:8px;padding:4px 0}.tight-question .question-picture img{max-height:100px}.tight-question .question-picture{gap:8px}.tight-question .cloze{font-size:min(var(--text),28px);line-height:1.4}.tight-question .choice{min-height:66px;padding:7px}.tight-question .choice .reading{font-size:30px}.tight-question .order-scene{min-height:65px}.tight-question .order-scene .scene-listen{height:65px}.tight-question .order-answer{min-height:65px}.tight-question .order-bank button,.tight-question .order-answer button{font-size:22px;min-height:35px;padding:5px 8px}.tight-question .writing-board{width:min(270px,48vh)}.question-help{font-size:13px;text-align:center;color:#75876b;line-height:1.4;flex-shrink:0}.support-language-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.support-language-row button{min-height:42px;font-size:13px;padding:6px}.hide-support .gloss{display:none!important}html[data-theme=night] :is(.question-help,.learning-page-nav span){color:#bdcbae}html[data-theme=night] .learning-page-nav button{background:#29392e;color:#e0ead8;border-color:#465c43}
@media(max-width:900px){main.home-view{padding-left:16px!important;padding-right:16px!important}.home-view .study{gap:9px}.home-view .study-controls{gap:6px}.home-view .modes{gap:10px}.learning-page-body .example-card{grid-template-columns:60px minmax(0,1fr) 44px;gap:10px}.learning-page-body .word-card>img{max-height:180px}.paged-learning>.learning-heading{min-height:58px}.learning-page-body .gloss{font-size:13px}}
@media(max-width:699px){body>header{height:56px;padding:6px 12px}.header-stop{min-width:54px!important;padding:4px!important;gap:2px}.header-stop svg{width:17px!important;height:17px!important}.header-stop span{font-size:11px}.home-view .study-overview{min-width:0}.home-view .modes{min-height:270px;gap:8px}.home-view .mode .study-art{height:clamp(50px,8vh,82px)!important;width:80px!important;max-height:65%}.home-view .mode{padding:7px 4px;gap:4px}.home-view .mode strong{font-size:12px}.home-view [data-helper-label]:after{font-size:9px;line-height:1.25;margin-top:2px}.home-view footer{gap:17px;min-height:28px}.home-view footer button{font-size:12px}.unified-learning.paged-learning{padding:6px 0!important;gap:6px}.paged-learning>.learning-heading{min-height:58px}.paged-learning>.learning-heading .target{font-size:clamp(26px,calc(180px / var(--target-width)),48px)}.learning-page-body{gap:8px}.learning-page-body>.unified-words{gap:6px}.learning-page-body .word-card{padding:6px 4px;gap:3px}.learning-page-body .word-card>img{max-height:180px}.learning-page-body .word-card .reading{font-size:clamp(17px,calc(90px / var(--word-width)),30px)}.learning-page-body .gloss{font-size:11px;line-height:1.2}.learning-page-body .example-card{grid-template-columns:35px minmax(0,1fr);gap:7px;padding:8px}.learning-page-body .example-card img{height:45px!important;max-height:55px;align-self:end}.learning-page-body .example-card .reading{grid-column:2;grid-row:1/span 2;line-height:1.35!important}.learning-page-body .sentence-listen{grid-column:1;grid-row:2;font-size:10px!important;padding:3px!important;min-height:28px!important;align-self:start;margin-top:3px}.learning-only-words .unified-words{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));max-width:520px;gap:8px}.learning-only-words .word-card{display:grid;grid-template-columns:42% minmax(0,1fr);grid-template-rows:1fr auto;column-gap:12px;padding:8px 12px}.learning-only-words .word-card>img{height:100%!important;max-height:170px;grid-column:1;grid-row:1/span 2}.learning-only-words .word-card .reading{grid-column:2;grid-row:1;align-self:center;font-size:clamp(24px,calc(200px / var(--word-width)),38px)}.learning-only-words .word-card .gloss{grid-column:2;grid-row:2;align-self:start;font-size:13px}.learning-page-nav{min-height:32px;gap:12px}.learning-page-nav button{min-height:30px;font-size:12px;padding:4px 9px}.learning-page-nav span{font-size:12px}.deck-measuring .word-card>img{height:65px!important;max-height:65px}.deck-measuring .word-card{display:flex}.deck-measuring .word-card .reading{font-size:clamp(17px,calc(90px / var(--word-width)),30px)}.deck-measuring .gloss{font-size:11px}.support-language-row{gap:5px}.support-language-row button{font-size:12px;padding:5px 3px}.question-help{font-size:12px}}
@media(max-height:650px){.home-view .modes{min-height:225px}.home-view .mode .study-art{height:48px!important}.paged-learning>.learning-heading{min-height:45px}.paged-learning>.learning-heading .target{font-size:40px}.paged-learning>.source{font-size:11px}.learning-page-nav{min-height:30px}.learning-only-sentence .example-card{display:block;position:relative;padding:32px 8px 8px}.learning-only-sentence .example-card img{display:none}.learning-only-sentence .example-card .reading{width:100%;height:100%;align-content:center}.learning-only-sentence .sentence-listen{position:absolute;right:8px;top:3px;margin:0!important}.learning-page-body .word-card>img{max-height:120px}.deck-measuring .word-card>img{height:48px!important}.question .writing-board{width:min(260px,48vh)}}
@media(max-height:450px) and (min-width:600px){.paged-learning>.learning-heading{min-height:38px}.paged-learning>.learning-heading .target{font-size:34px}.question-readpy,.question-pinyin,.question-listen{display:grid;grid-template-columns:1fr 1.5fr;grid-template-rows:1fr auto;gap:8px}.question .prompt{min-height:0;margin:0}.question .choices{gap:8px}.question .choice{min-height:75px}.question .feedback{grid-column:1/-1}.question-picture .question-instruction,.question-sentence .question-instruction,.question-order .question-instruction{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.question-picture .question-picture,.question-sentence .question-picture{grid-template-columns:18% 1fr}.question .cloze{font-size:24px}.question .question-picture img{max-height:65px}.question .question-audio{display:none}.question{gap:6px;padding:3px 0}.question .choice{min-height:56px}.question .choice .reading{font-size:27px}}

.example-card.sentence-fragment{position:relative;padding-top:27px!important}.sentence-part{position:absolute;left:9px;top:5px;font:11px/1.3 -apple-system,BlinkMacSystemFont,sans-serif;color:#7a8b6c}.learning-only-sentence .sentence-fragment .sentence-listen{top:1px}html[data-theme=night] .sentence-part{color:#bdcbae}

@media(max-height:450px) and (min-width:600px){.unified-learning.paged-learning{padding:3px 4px!important;gap:4px}.paged-learning>.learning-heading{min-height:40px;height:auto}.paged-learning>.learning-heading .target{font-size:30px}.learning-heading .target .syllable rt{font-size:11px}.paged-learning>.source{font-size:10px;line-height:1.2}.learning-page-nav{min-height:28px}.learning-page-nav button{min-height:26px;padding:2px 8px;font-size:11px}.learning-page-body .word-card{padding:3px 6px;gap:0}.learning-page-body .word-card>img{max-height:34px}.learning-page-body .word-card .reading{font-size:26px;margin:0!important}.learning-page-body .word-card .gloss{font-size:11px;line-height:1.15}.deck-measuring .word-card>img{height:24px!important}.learning-page-body .example-card{padding-top:27px!important}.learning-page-body .example-card .reading{line-height:1.3!important}}

@media(max-width:599px) and (max-height:749px){.learning-only-words .word-card{padding:5px 8px;grid-template-columns:35% minmax(0,1fr);column-gap:6px}.learning-only-words .word-card .reading{font-size:26px}.learning-only-words .word-card .gloss{font-size:11px;line-height:1.15}}
@media(max-height:450px) and (min-width:600px){.question-readpy,.question-pinyin,.question-listen{grid-template-rows:auto minmax(0,1fr) 20px}.question-help{grid-column:1/-1;font-size:11px}.question-readpy .prompt,.question-pinyin .prompt,.question-listen .prompt{grid-column:1;grid-row:2}.question-readpy .choices,.question-pinyin .choices,.question-listen .choices{grid-column:2;grid-row:2}.question .feedback{grid-row:3}}

.question:has(.question-help) .question-instruction{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.question.very-tight-question{gap:6px;padding:2px 0}.very-tight-question .question-picture img{max-height:64px}.very-tight-question .cloze{font-size:24px;line-height:1.3}.very-tight-question .choice{min-height:60px;padding:5px}.very-tight-question .choice .reading{font-size:28px}.very-tight-question .question-help{font-size:11px}.very-tight-question .question-audio .listen-control{min-height:32px;padding:3px 9px}.very-tight-question .question-audio .study-art{height:24px;width:26px}
.question-order .order-bank button:disabled{display:none}.very-tight-question.question-order{gap:4px}.very-tight-question .order-scene{min-height:28px;gap:6px}.very-tight-question .order-scene .scene-listen{display:none}.very-tight-question .order-scene .listen-control{min-height:30px;padding:3px 10px;font-size:12px}.very-tight-question .order-scene .study-art{height:24px;width:26px}.very-tight-question .order-answer{min-height:50px;padding:6px;gap:4px}.very-tight-question .order-bank{min-height:0;padding:0;gap:4px}.very-tight-question .order-answer button,.very-tight-question .order-bank button{font-size:20px;line-height:1.3;min-height:34px;padding:4px 6px}.very-tight-question .order-reset{min-height:28px;padding:3px 10px}.very-tight-question .feedback{min-height:20px;height:20px;line-height:20px}
.writing-dialog .writing-board{width:min(280px,45vh,62vw)}
@media(max-width:599px) and (max-height:700px){body>header{height:52px}main.home-view{padding:6px 12px 8px!important;gap:6px}.home-view .study{padding:8px 10px;gap:6px}.home-view .study-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;width:100%}.home-view .study-controls>:is(button,.theme-select){max-width:none!important;width:100%;min-width:0!important;min-height:30px;font-size:11px;padding:4px 7px}.home-view .study-controls .primary{grid-column:1/-1;min-height:32px}.study-overview h2{font-size:17px}.home-view .study p{font-size:10px}.study-overview #points{min-height:30px;font-size:12px}.home-view .modes{min-height:210px!important;gap:6px}.home-view .mode{padding:4px 3px;gap:2px}.home-view .mode .study-art{height:clamp(34px,6vh,46px)!important;width:62px!important;max-height:58%}.home-view .mode strong{font-size:11px}.home-view .mode strong[data-helper-label]{font-size:0}.home-view .mode strong[data-helper-label]:after{font-size:10px;line-height:1.15;margin:0}.home-view footer{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-height:28px}.home-view footer button{font-size:11px;padding:2px}.home-view footer [data-helper-label]:after{font-size:9px}.home-view .track-tabs button{min-height:32px;font-size:12px;padding:4px}.home-view .section-label{font-size:11px}}
@media(max-width:599px) and (max-height:700px){.home-view .study>div.study-overview{display:flex!important;align-items:center;gap:6px;min-height:30px}.home-view .study-overview #points{margin-left:auto}.home-view .study p{margin:0}.home-view .study-overview h2{font-size:16px;flex-shrink:0}}
@media(max-width:360px){body:has(.practice-frame) #viewTitle{font-size:12px;gap:4px}}@media(max-width:599px) and (max-height:700px){.home-view .study p{font-size:11px}}

.human-audio-label{display:block;color:var(--muted,#61745e);font-size:11px;line-height:1.2}.human-audio-notice{position:fixed;left:50%;bottom:88px;transform:translateX(-50%);z-index:1000;background:#f4f8e9;border:1px solid #b9c9a5;border-radius:12px;padding:12px 18px;font-size:16px;box-shadow:0 3px 12px #203c2418}.human-audio-notice[hidden]{display:none}

@font-face{font-family:SchoolPinyin;src:url('fonts/school-pinyin-20261203.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
.reading rt,.big-pinyin,.choice-pinyin,.pinyin,.pinyin-only{font-family:SchoolPinyin,sans-serif!important;letter-spacing:0!important;font-variant-ligatures:none}.reading rt{line-height:1.28}
.word-card,.example-card,.learning-heading>.target{position:relative}
.study-checklist{display:grid;gap:10px}.study-checklist>button{text-align:left;white-space:normal}.pending-reading-note{font-size:14px;color:#69755e}.manual-sentence{font-family:SemesterKai,serif;font-size:26px;line-height:1.6}
dialog.stroke-learning-open{width:min(650px,calc(100vw - 24px));max-height:calc(100dvh - 20px);padding:16px;box-sizing:border-box}dialog.stroke-learning-open #dialogBody{overflow:auto;max-height:calc(100dvh - 85px)}.stroke-dialog-content{display:grid;gap:8px}.stroke-dialog-heading{display:flex;align-items:center;justify-content:center;gap:14px;min-height:40px}.stroke-dialog-heading>strong{font:40px/1 SemesterKai,serif;color:#356349}.stroke-char-tabs{display:flex;gap:5px}.stroke-char-tabs button{min-width:34px;padding:4px 8px;font:24px/1.2 SemesterKai,serif}.stroke-char-tabs button[aria-pressed=true]{background:#e8f1d8}.stroke-tutor-host{display:grid;gap:7px;min-width:0}.stroke-stages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.stroke-stages button{padding:9px 5px;font-size:14px;min-height:40px}.stroke-stages button[aria-pressed=true]{background:#e7f0d7;border-color:#a1b583}.stroke-voice-bar{display:grid;grid-template-columns:65px minmax(0,1fr) 65px;gap:5px;align-items:center}.stroke-voice-bar button{padding:5px;font-size:13px;min-height:36px}.stroke-voice-bar button:nth-child(2){font-size:17px;font-weight:650}.stroke-content{display:grid;justify-items:center;gap:8px}.stroke-board{position:relative;width:min(300px,42dvh,calc(100vw - 74px));aspect-ratio:1;border:1px solid #dfe7d7;border-radius:16px;background:linear-gradient(90deg,transparent 49.6%,#e8eddf 49.6%,#e8eddf 50.4%,transparent 50.4%),linear-gradient(transparent 49.6%,#e8eddf 49.6%,#e8eddf 50.4%,transparent 50.4%),white;touch-action:none}.stroke-board>svg,.stroke-board>canvas{display:block}.stroke-board .stroke-hit-layer{position:absolute;inset:0;pointer-events:none;z-index:2}.stroke-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:min(390px,100%)}.stroke-choices[hidden]{display:none}.stroke-option{height:82px;display:grid;grid-template-rows:minmax(0,1fr) auto;justify-items:center;padding:5px;color:#356349}.stroke-option svg{width:100%;height:100%;min-height:0}.stroke-option span{font-size:13px}.stroke-option.wrong{border-color:#b84b56;background:#fff2ef}.stroke-status{font-size:14px;line-height:1.3;margin:0;text-align:center;min-height:18px}.stroke-dialog-content>.primary{min-height:43px;padding:8px}
@media(max-width:600px){.learning-inline-tools{gap:4px}.learning-inline-tools>button{padding:5px 7px}.stroke-stages button{font-size:12px;padding:6px 3px;min-height:36px}.stroke-voice-bar{grid-template-columns:55px minmax(0,1fr) 55px}.stroke-voice-bar button:nth-child(2){font-size:15px}.stroke-char-tabs{gap:3px}.stroke-char-tabs button{font-size:21px;min-width:28px;padding:3px 5px}.stroke-board{width:min(270px,39dvh,calc(100vw - 70px))}.stroke-option{height:68px}.stroke-status{font-size:12px}}
@media(max-height:500px){dialog.stroke-learning-open{width:min(850px,calc(100vw - 20px));padding:10px}.stroke-dialog-heading{min-height:26px}.stroke-dialog-heading>strong{font-size:27px}.stroke-char-tabs button{font-size:18px;min-width:25px;padding:2px 6px}.stroke-dialog-content,.stroke-tutor-host{gap:4px}.stroke-stages button{min-height:29px;padding:3px;font-size:12px}.stroke-voice-bar button{min-height:28px;padding:2px}.stroke-voice-bar button:nth-child(2){font-size:14px}.stroke-content{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center}.stroke-board{width:min(210px,calc(100dvh - 180px))}.stroke-choices{align-self:center;gap:5px}.stroke-option{height:77px}.stroke-dialog-content>.primary{min-height:33px;padding:4px}.stroke-status{font-size:12px;min-height:14px}}

.stroke-char-tabs[hidden]{display:none}.stroke-board.choosing>svg:not(.stroke-choice-preview){visibility:hidden}.stroke-choice-preview{position:absolute;inset:0;pointer-events:none}.stroke-choice-preview path{pointer-events:all;cursor:pointer}

.answer-pinyin{font-family:SchoolPinyin,sans-serif!important;letter-spacing:0!important}.practice-writing-rich{display:block!important;min-height:0!important}.practice-writing-heading{display:flex;justify-content:center;max-height:90px}.practice-writing-heading .target{font-size:52px!important;line-height:1.2}.practice-stroke-tutor{display:grid;gap:7px;max-width:620px;margin:0 auto}.practice-stroke-tutor .stroke-stages button{padding:5px}.practice-writing-rich .feedback{margin:4px 0;min-height:20px}@media(max-height:500px){.question.practice-writing-rich{display:grid!important;grid-template-columns:100px minmax(0,1fr);column-gap:12px;align-items:center}.practice-writing-heading{grid-column:1;grid-row:1;align-self:center}.practice-stroke-tutor{grid-column:2;grid-row:1 / 3;width:100%;gap:3px}.practice-writing-rich .feedback{grid-column:1;grid-row:2}.practice-writing-heading .target{font-size:40px!important}}

@media(max-height:500px){dialog.stroke-learning-open #dialogBody{padding-bottom:10px}.stroke-content{gap:4px}.stroke-status{line-height:1.15}}
@media(max-height:500px){.question.practice-writing-rich{grid-template-rows:auto minmax(0,1fr) 24px}.practice-writing-rich>.question-instruction{grid-column:1;grid-row:1;font-size:13px!important;white-space:normal!important;text-align:center}.practice-writing-heading{grid-row:2}.practice-stroke-tutor{grid-row:1 / 4}.practice-writing-rich .feedback{grid-row:3}}

.table-pinyin{font-family:SchoolPinyin,sans-serif!important;letter-spacing:0!important}
.practice-writing-rich{display:flex!important;flex-direction:column;justify-content:center;align-items:stretch;gap:8px}.practice-writing-heading{flex-shrink:0}.practice-stroke-tutor{flex-shrink:0;width:100%}.practice-writing-rich>.question-instruction{flex-shrink:0}
/* One, two or three relevant word cards use the same centered rhythm. */
.learning-page-body>.unified-words{grid-template-columns:repeat(var(--word-count,3),minmax(0,1fr));width:100%;max-width:calc(var(--word-count,3) * 345px);margin-inline:auto;justify-self:center}
.learning-page-body .extension-label{font-size:11px;color:#687b55;line-height:1.2}
.study-checklist-note{font-size:14px;line-height:1.5;color:#596b50;margin:0 0 8px}
@media(max-width:699px){.learning-only-words .learning-page-body>.unified-words{grid-template-columns:1fr;grid-template-rows:repeat(var(--word-count,3),minmax(0,1fr));max-width:520px}.learning-only-words .unified-words[data-word-count="1"]{max-height:300px;align-self:center}.learning-only-words .unified-words[data-word-count="2"]{max-height:440px;align-self:center}}
.word-source-label{font-size:10px;line-height:1.2;color:#7a886f;text-align:center;max-width:100%;overflow-wrap:anywhere}
.learning-page-body{gap:5px}
/* Keep heard-state controls beside the character, including at 320px. */
@media(max-width:600px){
 .paged-learning>.learning-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important;align-items:center}
 .paged-learning>.learning-heading>.target{justify-self:center;font-size:clamp(20px,calc((100vw - 220px) / var(--target-width)),40px)!important}
 .paged-learning .learning-inline-tools{position:static;max-width:185px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
 .paged-learning>.learning-heading:has(.target .reading-unit:nth-child(3)){grid-template-columns:1fr}
 .paged-learning>.learning-heading:has(.target .reading-unit:nth-child(3))>.target{font-size:clamp(24px,calc(240px / var(--target-width)),40px)!important}
 .paged-learning>.learning-heading:has(.target .reading-unit:nth-child(3)) .learning-inline-tools{justify-self:center;max-width:100%;justify-content:center}
 .learning-only-words .unified-words[data-word-count="1"] .word-card{display:flex;flex-direction:column;justify-content:center;gap:7px}
 .learning-only-words .unified-words[data-word-count="1"] .word-card>img{width:min(100%,240px);height:auto!important;max-height:150px;flex:0 1 auto}
 .learning-only-words .unified-words[data-word-count="1"] .word-card .reading{flex:0 0 auto;font-size:clamp(25px,calc(220px / var(--word-width)),38px)}
}
@media(max-width:600px){
 .paged-learning>.learning-heading>.target{width:auto;max-width:100%;margin:0;min-width:0}
 .paged-learning .learning-inline-tools{top:auto;right:auto;transform:none}
}

/* Reading is optional. Only the three stroke stages gate the next character. */
.stroke-dialog-heading>strong{display:none}
.stroke-dialog-heading:has(.stroke-char-tabs[hidden]){display:none}
.stroke-voice-bar{grid-template-columns:1fr!important}
.stroke-voice-bar button{font-size:16px;font-weight:650;min-height:34px}
.stroke-status[hidden]{display:none}
.stroke-tutor-host[data-stroke-mode="write"] .stroke-content{grid-template-columns:1fr}
@media(max-width:600px){
 dialog.stroke-learning-open{width:calc(100vw - 16px);padding:10px;max-height:calc(100dvh - 16px)}
 .stroke-dialog-content{gap:7px}.stroke-tutor-host{gap:6px}
 .stroke-board{width:min(310px,calc(100vw - 58px),calc(100dvh - 235px))}
 .stroke-stages button{min-height:38px;padding:5px 3px;font-size:12px}
 .stroke-option{height:66px}.stroke-option span{font-size:12px}
 .stroke-dialog-content>.primary{min-height:42px}
}

@media(max-width:699px){.learning-only-words .learning-page-body>.unified-words[data-word-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:7px}.learning-only-words .unified-words[data-word-count="4"] .word-card{min-height:0;padding:7px;gap:4px}.learning-only-words .unified-words[data-word-count="4"] .word-card>img{max-height:80px!important;width:100%;object-fit:contain}.learning-only-words .unified-words[data-word-count="4"] .reading{font-size:27px!important}}

@media(max-width:699px){.learning-page-body>.unified-words[data-word-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:7px}.unified-words[data-word-count="4"] .word-card{min-height:0;padding:7px;gap:4px}.unified-words[data-word-count="4"] .word-card>img{max-height:80px!important;width:100%;object-fit:contain}.unified-words[data-word-count="4"] .reading{font-size:27px!important}}
@media(max-width:699px){.unified-words[data-word-count="4"] .word-card{display:flex!important;flex-direction:column;justify-content:center;align-items:center;gap:3px!important}.unified-words[data-word-count="4"] .word-card>img{height:65px!important;flex:0 0 65px}.unified-words[data-word-count="4"] .reading{flex:0 0 auto;min-height:0!important;margin:0!important}.unified-words[data-word-count="4"] .gloss:empty{display:none}}
@media(max-width:699px) and (max-height:650px){.unified-words[data-word-count="4"] .word-card{padding:4px;gap:2px!important}.unified-words[data-word-count="4"] .word-card>img{height:38px!important;max-height:38px!important;flex-basis:38px}.unified-words[data-word-count="4"] .reading{font-size:25px!important;line-height:1.55!important}}
.stroke-voice-bar button:disabled{opacity:1;color:#365e45;cursor:default}.stroke-stages button[aria-pressed="true"]:disabled{opacity:1}
