:root{font-family:system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;color:#183933;background:#f3f7f8;font-size:16px;--green:#087669;--purple:#9235bb}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid #cbd9d6;background:white;color:#244b44;border-radius:12px;padding:12px 18px;font-weight:600}button:hover{background:#edf7f4}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #9235bb;outline-offset:3px}button:disabled{opacity:.45;cursor:wait}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#056358}header{height:96px;max-width:1320px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:20px 36px}.brand{display:flex;align-items:center;gap:14px;color:inherit;text-decoration:none;font-size:24px;font-weight:800;letter-spacing:2px}.brand small{display:block;font-size:13px;font-weight:500;letter-spacing:3px;margin-top:3px;color:#658078}.mark{background:var(--green);color:white;width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-family:serif;font-size:35px}.quiet{background:transparent}.eyebrow{font-size:23px;font-weight:750;margin-bottom:25px}main{max-width:1248px;margin:8px auto 24px;display:grid;grid-template-columns:300px minmax(0,1fr);gap:32px;padding:0 24px}aside{padding:28px 8px}form label{display:block;font-size:14px;margin-bottom:10px}textarea{width:100%;resize:vertical;border:1px solid #b9cec7;border-radius:12px;padding:14px;font-size:25px;letter-spacing:5px;background:white;color:#183933}form .primary{width:100%;margin-top:10px}#characters{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 30px;max-height:160px;overflow:auto}#characters button{padding:6px 10px;font-family:serif;font-size:24px;border-radius:9px}#characters button.active{border:2px solid var(--green);background:#e0f3ed}fieldset{padding:0;border:0;margin:0 0 24px}legend{font-size:14px;margin-bottom:12px}.mode{display:flex;align-items:center;gap:12px;border:1px solid #d3dfdb;border-radius:12px;padding:14px 12px;margin-bottom:9px;background:white;cursor:pointer}.mode:has(input:checked){border-color:var(--green);background:#e9f5f1}.mode input{accent-color:var(--green);width:18px;height:18px}.mode strong{font-size:16px}.mode small{display:block;color:#647c76;font-size:13px;margin-top:5px}.settings{display:grid;grid-template-columns:80px 1fr;gap:12px;align-items:center;font-size:14px}select{min-width:0;width:100%;padding:9px;border-radius:8px;border:1px solid #cedbd6;background:white;color:#244b44}.note{font-size:14px;line-height:1.9;color:#6c817b;margin:24px 0 0}.practice{background:white;border:1px solid #d7e3df;border-radius:24px;padding:23px 32px;box-shadow:0 10px 45px #163f3810}.practice-top{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#698179}.mode-tag{padding:6px 12px;background:#eff5f2;border-radius:30px;color:#317668}.stroke-heading{display:flex;align-items:center;justify-content:center;gap:18px;height:77px;font-size:32px;font-weight:650}.sound{font-size:22px;padding:5px 10px;color:var(--green);border:0}.board-wrap{max-width:560px;margin:auto}#board{width:100%;aspect-ratio:1;position:relative;border:2px solid #bdcfc8;background:linear-gradient(to right,transparent calc(50% - .5px),#dce5e0 calc(50% - .5px),#dce5e0 calc(50% + .5px),transparent calc(50% + .5px)),linear-gradient(to bottom,transparent calc(50% - .5px),#dce5e0 calc(50% - .5px),#dce5e0 calc(50% + .5px),transparent calc(50% + .5px)),#fff;touch-action:none;overflow:hidden}#writer,#guides,#directions{position:absolute;inset:0;width:100%;height:100%}#guides,#directions{pointer-events:none}#directions{z-index:3}#writer{z-index:2}#startCover{position:absolute;inset:0;z-index:4;display:grid;place-items:center;background:#ffffff65}#startCover[hidden],#complete[hidden]{display:none}#complete{position:absolute;inset:0;z-index:5;background:#ffffffda;display:grid;place-items:center;backdrop-filter:blur(3px)}.success{text-align:center;padding:20px}.success-icon{width:70px;height:70px;border-radius:50%;background:#dff5e8;color:var(--green);font-size:44px;margin:auto}.success h2{font-size:30px}.success button{margin:6px}.under-board{max-width:560px;display:flex;justify-content:space-between;gap:10px;margin:18px auto;font-size:14px;color:#658078}#feedback.error{color:#b44531}.practice-actions{display:flex;justify-content:center;gap:12px;margin-top:22px}footer{max-width:1200px;margin:0 auto;padding:15px 24px 25px;display:flex;gap:20px;justify-content:space-between;font-size:12px;color:#81918c}footer a{color:inherit}body.focus header,body.focus aside,body.focus footer{display:none}body.focus main{display:block;max-width:1000px;margin:10px auto}body.focus .board-wrap{max-width:min(72vh,760px)}@media(min-height:900px){.board-wrap{max-width:620px}}@media(max-width:760px){header{height:76px;padding:14px 18px}.brand{font-size:21px}.mark{width:44px;height:44px}header button{padding:9px;font-size:14px}main{display:flex;flex-direction:column;padding:0 12px;gap:12px;margin-top:0}aside{padding:6px}.eyebrow,.note{display:none}form{display:grid;grid-template-columns:1fr 108px;gap:8px}form label{grid-column:1/-1;margin:0}textarea{height:52px;min-height:52px;padding:7px 12px;resize:none;font-size:23px}form .primary{margin:0;padding:8px}#characters{margin:10px 0;max-height:64px;flex-wrap:nowrap}fieldset{display:flex;gap:8px;margin:0}legend{display:none}.mode{flex:1;margin:0;padding:10px 7px;gap:7px}.mode small{display:none}.mode strong{font-size:14px}.settings{grid-template-columns:65px 1fr 65px 1fr;gap:6px;margin-top:10px;font-size:12px}.settings select{font-size:12px;padding:7px}.practice{padding:14px 12px;border-radius:17px}.stroke-heading{height:59px;font-size:28px}.practice-actions{margin-top:12px}.practice-actions button{font-size:14px;padding:10px 14px}.under-board{font-size:13px;margin:12px 0}footer{flex-wrap:wrap;justify-content:center;gap:8px;text-align:center}body.focus .board-wrap{max-width:100%}}
#exitFocus{display:none}body.focus #exitFocus{display:block;position:fixed;right:14px;top:12px;z-index:20;font-size:14px;padding:8px 12px}
#fillLayer{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none}#board.playing #writer{visibility:hidden}#complete{position:relative;inset:auto;background:white;backdrop-filter:none;border-top:1px solid #d7e3df;margin-top:18px;padding-top:8px}.success{padding:8px}.success h2{font-size:20px;margin:8px}.success p{font-size:14px;margin:8px}.practice-actions{flex-wrap:wrap}.related{max-width:560px;margin:24px auto 0;border-top:1px solid #dde6e2;padding-top:18px}.related-head{display:flex;align-items:center;justify-content:space-between}.related-head select{width:135px}.related-head strong{font-size:16px}#relatedChars{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}#relatedChars button{font-family:serif;font-size:28px;min-width:50px;padding:6px 10px}#relatedChars small{display:block;font:12px system-ui;color:#698179}#relatedNote{font-size:12px;color:#78877f;margin:10px 0}.practice:has(#complete:not([hidden])) #strokeName{font-size:26px}

#board.assisting #writer{pointer-events:none}

@font-face{font-family:"Lesson One";src:url("fonts/LessonOne-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
.stroke-heading{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;gap:8px;min-height:104px;height:auto;padding:20px 0 14px;max-width:620px;margin:auto}
#strokeName{grid-column:2;text-align:center;font-family:"Kaiti SC",STKaiti,"Noto Serif CJK SC","Songti SC",serif;font-size:clamp(28px,4vw,38px);font-weight:500;line-height:1.65;overflow-wrap:anywhere}
#strokeName ruby{ruby-align:center;margin:0 .10em;line-height:1.6}#strokeName rt{font-family:"Lesson One",Arial,sans-serif;font-size:19px;line-height:1.5;font-weight:400;color:#55766e;text-align:center}
.sound{grid-column:3;display:grid;place-items:center;width:48px;height:48px;padding:11px;border:1px solid #c3ded5;border-radius:50%;background:#edf7f3}.sound svg{width:25px;height:25px}.sound:hover{background:#dcefe8}
.related-head{flex-wrap:wrap;gap:14px}.related-tabs{display:flex;gap:8px;flex-wrap:wrap}.related-tabs button{font-size:14px;padding:9px 13px;border-radius:10px}.related-tabs button[aria-pressed="true"]{background:var(--green);color:white;border-color:var(--green)}#relatedChars{display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:9px}#relatedChars button{min-width:0}#relatedChars small{font-size:14px}#relatedNote{font-size:14px}
@media(max-width:760px){.stroke-heading{grid-template-columns:44px minmax(0,1fr) 44px;gap:4px;min-height:92px;padding:17px 0 10px}.sound{width:44px;height:44px;padding:10px}#strokeName rt{font-size:16px}#strokeName ruby{margin:0 .06em}.related-tabs{gap:6px}.related-tabs button{padding:9px 11px}#relatedChars{grid-template-columns:repeat(auto-fit,minmax(54px,1fr))}}

.input-hint{font-size:14px;color:#657e76;line-height:1.6;margin:9px 0 0}.character-info{max-width:620px;margin:24px auto 0;padding:20px;border:1px solid #d8e5df;border-radius:16px;background:#f7faf9}.character-info h2{font-size:18px;margin:0 0 16px}.character-info dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;margin:0}.character-info .info-pinyin{grid-column:1/-1}.character-info dt{font-size:14px;color:#647d74;margin-bottom:5px}.character-info dd{font-size:21px;margin:0;line-height:1.5;overflow-wrap:anywhere}#charPinyin{font-family:"Lesson One",Arial,sans-serif;font-size:24px;color:#087669}#charRadical,#charTraditional{font-family:"Kaiti SC",STKaiti,"Songti SC",serif;font-size:25px}#infoNote{font-size:14px;color:#6c817b;line-height:1.6;margin:16px 0 0}@media(max-width:760px){.character-info{padding:16px}.character-info dl{gap:15px}.character-info dd{font-size:19px}.input-hint{font-size:13px}}

.difficulty{margin-top:18px}.difficulty>span{display:block;font-size:14px;margin-bottom:8px}.difficulty small{font-size:12px;font-weight:400}.difficulty>div{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.difficulty button{padding:9px 5px;font-size:14px}.difficulty button small{display:block}.difficulty button[aria-pressed=true]{background:#087669;color:white;border-color:#087669}.character-info{padding:0;background:white;border:0}.character-info h2{font-size:17px;margin-bottom:12px}.info-table{width:100%;border-collapse:collapse;table-layout:fixed;border:1px solid #c5dcd4;text-align:center}.info-table th,.info-table td{border:1px solid #c5dcd4;padding:12px 5px;overflow-wrap:anywhere;font-size:17px}.info-table th{background:#edf6f2;font-weight:500;font-size:15px}.info-table small{display:block;font-size:12px;color:#617d72}.info-table #charPinyin{font-size:24px}.info-table #charTraditional,.info-table #charRadical{font-size:23px}.stroke-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px 10px;margin-top:20px}.stroke-card{text-align:center;min-width:0}.stroke-card svg{display:block;width:100%;border:1px solid #bfd8cd;background:white}.stroke-number{display:block;font-size:15px;margin-bottom:5px}.stroke-label{display:block;font-size:14px;line-height:1.4;padding:5px 2px;background:#eff6f2;min-height:30px}.related-tabs small{font-size:12px;font-weight:400}.word-candidate{font-family:inherit!important;font-size:20px!important}#relatedChars:has(.word-candidate){grid-template-columns:repeat(auto-fill,minmax(82px,1fr))}.practice-actions{display:grid;grid-template-columns:1fr 1fr;max-width:560px;margin:12px auto;gap:8px}.practice-actions button{padding:11px 6px;font-size:16px}.success{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0}.success p{display:none}.success button{margin:0;padding:11px 4px;font-size:15px}#complete{padding:10px 0 0;margin-top:10px;border:0}.under-board{margin:10px auto;font-size:13px}.under-board #feedback:empty{display:none}.related{margin-top:20px}.eyebrow{margin-bottom:14px}.note{display:none}
@media(max-width:760px){.difficulty{display:flex;align-items:center;gap:10px;margin-top:10px}.difficulty>span{font-size:13px;margin:0;flex:0 0 68px}.difficulty>span small{display:block}.difficulty>div{flex:1}.difficulty button{padding:7px 3px}.practice-actions button{font-size:14px;padding:10px 4px}.success button{font-size:13px;padding:10px 2px;white-space:nowrap}.stroke-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 8px}.info-table th,.info-table td{font-size:15px;padding:9px 4px}.info-table #charTraditional{font-size:20px}.related-tabs{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.related-tabs button{padding:8px 3px;font-size:14px}.related-tabs small{display:block}.stroke-heading{min-height:84px}.practice-top{font-size:13px}.mode strong{font-size:14px}}

#strokeName{font-size:clamp(38px,5vw,48px)}#strokeName rt{font-size:26px}.stroke-heading{min-height:120px}.standard-download{max-width:620px;margin:22px auto 0;padding-top:16px;border-top:1px solid #dce5df}.standard-download button{font-size:14px;padding:10px 14px}.standard-download p{font-size:13px;line-height:1.6;color:#6c817b;margin:8px 0 0}@media(max-width:760px){#strokeName{font-size:clamp(32px,8vw,40px)}#strokeName rt{font-size:21px}.stroke-heading{min-height:106px;grid-template-columns:36px minmax(0,1fr) 36px}.stroke-heading .sound{width:36px;height:36px;padding:6px}.standard-download button{width:100%}}

/* Projection: dark foreground on white, with stronger outlines. */
#strokeName,#strokeName rt{color:#111111}#board{border-color:#59636e}#charPinyin{color:#003a8c}.stroke-number,.stroke-label{color:#111111}

.curriculum{margin-bottom:18px}.book-selects{display:grid;grid-template-columns:minmax(0,1fr) 94px;gap:8px}.book-selects:has(#volumeLabel[hidden]){grid-template-columns:1fr}.curriculum label{display:block;font-size:13px;margin:8px 0}.curriculum small{color:#59636e;font-size:11px}.curriculum select{display:block;width:100%;min-width:0;padding:10px 8px;margin-top:5px;border:1px solid #c4d0cc;border-radius:9px;background:#fff;color:#1c302a;font:inherit;font-size:14px}#lessonParts{display:flex;gap:6px}#lessonParts[hidden]{display:none}#lessonParts button{flex:1;padding:6px;font-size:12px}#lessonParts button[aria-pressed=true]{background:#087669;color:white}#lessonInfo{font-size:12px;color:#53675e;margin:7px 0 0}#lessonInfo:empty{display:none}#characters{max-height:220px;overflow-y:auto;overscroll-behavior:contain}#characters button[aria-current=true]{outline:2px solid #087669;outline-offset:1px}@media(max-width:700px){.curriculum{margin-bottom:10px}.book-selects{grid-template-columns:1fr 90px}.curriculum label{margin:4px 0}.curriculum select{padding:8px}#characters{max-height:136px}}
.curriculum label[hidden]{display:none}
#characters .stroke-choice{display:flex;flex-direction:column;align-items:center;gap:4px;width:68px;padding:5px;font-size:14px;line-height:1.4}#characters .stroke-choice svg{width:54px;height:54px;background:#fff;border:1px solid #9eaaa7;border-radius:3px}.stroke-lesson .character-info,.stroke-lesson .related{display:none}

/* Prominent curriculum controls: full width leaves long textbook names readable. */
.book-selects{grid-template-columns:1fr;gap:3px}.curriculum .book-selects label{font-size:16px;font-weight:700}.curriculum .book-selects small{font-size:12px;font-weight:400}.curriculum .book-selects select{font-size:19px;font-weight:700;min-height:54px;padding:12px;border:2px solid transparent;border-radius:12px}#seriesSelect{background:#173e71;color:#fff;border-color:#173e71}#volumeSelect{background:#ffe4a1;color:#392a05;border-color:#d4a439}.curriculum select:focus-visible{outline:3px solid #d65b00;outline-offset:3px}#lessonSelect{min-height:46px;font-size:16px;background:#eef3fa;border-color:#a9bdd7}@media(min-width:420px) and (max-width:700px){.book-selects{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}}

.audit-status{font-size:13px;line-height:1.6;margin:12px 0}.audit-status a{color:#365b80;text-decoration:underline}footer nav{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end}footer{gap:18px;flex-wrap:wrap}

/* Three matching curriculum controls, three distinct colors. */
.curriculum #lessonLabel{font-size:16px;font-weight:700}.curriculum #lessonLabel small{font-size:12px;font-weight:400}.curriculum #lessonSelect{font-size:19px;font-weight:700;min-height:54px;padding:12px;border:2px solid #287b64;border-radius:12px;background:#d8f0e6;color:#164a3b}
#charPinyin .pinyin-choice{font:inherit;font-size:24px;padding:4px 11px;margin:3px 7px 3px 0;color:#086c60;background:white;border:1px solid #8bbfb4;border-radius:8px;text-decoration:underline;text-underline-offset:5px}#charPinyin .pinyin-choice[aria-expanded=true]{background:#087669;color:white}.homophones{margin-top:14px;padding:14px;background:white;border:1px solid #b4d3cb;border-radius:12px}.homophones[hidden]{display:none}.homophone-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.homophone-head button{font-size:24px;padding:0 10px}.candidate-grid{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.candidate-grid button{font-family:"Kaiti SC",STKaiti,serif;font-size:28px;min-width:48px;min-height:48px;padding:4px 10px}.homophones p{font-size:14px;color:#526963;margin:10px 0 0}.pinyin-choice:focus-visible,.candidate-grid button:focus-visible{outline:3px solid #d65b00;outline-offset:2px}

/* Compact practice surface, with one consistent pastel action family. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#wordsForm{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
#words{width:100%;min-width:0;min-height:44px;border:1px solid #b9cec7;border-radius:12px;padding:10px 12px;font-size:18px;letter-spacing:1px;background:white;color:#183933}
#words::placeholder{color:#7b8985;font-size:14px;letter-spacing:0;opacity:1}
#wordsForm .primary{width:auto;min-height:44px;margin:0;padding:10px 14px;font-size:14px;white-space:nowrap}
.practice{padding:16px 24px}
.practice-top{max-width:620px;margin:auto;font-size:14px}
.mode-tag{padding:4px 10px}
.stroke-heading{grid-template-columns:44px minmax(0,1fr) 44px;min-height:78px;padding:6px 0;gap:6px}
.stroke-title{grid-column:2;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;min-width:0}
#strokeName{font-size:clamp(32px,4vw,40px);line-height:1.2}
#strokeName ruby{line-height:1.2}
#strokeName rt{font-size:22px;line-height:1.1}
.sound{width:44px;height:44px;padding:9px}
.sound[hidden],#nextInline[hidden]{display:none}
.practice:has(#complete:not([hidden])) .stroke-title{grid-column:1/-1}
.practice:has(#complete:not([hidden])) #strokeName{font:600 20px/1.3 system-ui,sans-serif;color:#244b44}
#nextInline{min-height:44px;padding:9px 16px;border:1px solid #7cb5a8;border-radius:12px;background:#d8eee4;color:#194c41;font-size:15px}
#nextInline:hover{background:#c6e5d8}
.under-board{min-height:18px;margin:6px auto;align-items:center}
.practice-controls{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;max-width:560px;margin:8px auto 0}
.practice-controls #complete,.practice-controls .success,.practice-controls .practice-actions{display:contents}
.practice-controls #complete[hidden]{display:none}
.practice-controls button{min-width:0;min-height:46px;margin:0;padding:9px 6px;border:1px solid var(--action-border);border-radius:12px;background:var(--action-bg);color:#244b44;font-size:15px;line-height:1.35;white-space:normal;transition:filter .15s,box-shadow .15s}
.practice-controls .success button{grid-column:span 2}
.practice-controls .practice-actions button{grid-column:span 3}
.practice-controls button:hover{background:var(--action-bg);filter:brightness(.97);box-shadow:0 2px 5px #18393312}
.practice-controls button:active{filter:brightness(.93)}
#again{--action-bg:#d8eee4;--action-border:#98c7b5}
#listenAgain{--action-bg:#dfeef9;--action-border:#a1c5df}
#next{--action-bg:#eae3f7;--action-border:#bcb0d8}
#autoplay{--action-bg:#f9e4dc;--action-border:#ddb5a4}
#restart{--action-bg:#fcf0ce;--action-border:#dbc888}
.character-info{margin-top:16px}
@media(max-width:760px){
 main{gap:8px}
 .practice{padding:10px 12px}
 .stroke-heading{min-height:72px;grid-template-columns:36px minmax(0,1fr) 36px;padding:5px 0}
 #strokeName{font-size:32px}
 #strokeName rt{font-size:20px}
 .stroke-title{gap:10px}
 .practice-top{font-size:13px}
 .mode-tag{padding:3px 9px}
 .mode{min-width:0;min-height:44px;padding:9px 7px;gap:6px}
 .mode input{flex:0 0 18px;margin:0}
 .mode strong{font-size:14px}
 #characters{padding:2px;margin:8px 0;max-height:78px}
 #characters button{flex-shrink:0;min-width:44px;min-height:44px}
 .difficulty{margin-top:8px}
 .practice-controls{gap:6px;margin-top:6px}
 .practice-controls button{font-size:14px;padding:8px 4px;min-height:46px}
 .under-board{font-size:13px;margin:5px auto}
 .character-info{margin-top:14px}
}
/* Word dictation is a separate, answer-free self-check surface. */
.mode small{display:block;font-size:13px;font-weight:500}.test-entry{margin:12px 0}.test-entry>button{width:100%;background:#e8e2fb;border:1px solid #9d89d4;color:#432473;text-align:left;font-size:18px}.test-entry small{font-size:14px}.test-entry p{font-size:13px;line-height:1.5;margin:6px 1px;color:#53675e}.test-dialog,.test-invite{color:#183933;background:#f8fbfc;border:1px solid #b6cbc4;border-radius:20px;padding:22px;width:min(96vw,610px);max-height:94dvh;overflow:auto;overscroll-behavior:contain;box-shadow:0 20px 80px #172f3955}.test-dialog::backdrop,.test-invite::backdrop{background:#132c36c9}.test-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.test-header h2{font-size:21px;margin:0}.test-header button{white-space:nowrap;padding:8px 12px}.test-dialog p{line-height:1.5}.test-dialog [hidden]{display:none!important}#testLesson{font-size:14px;margin:10px 0 3px}#testCoverage{font-size:13px;margin:0 0 8px;color:#70531b}#testCoverage:empty{display:none}.test-question{display:flex;justify-content:space-between;align-items:center;margin:8px 0}.test-question button{padding:8px 16px;background:#dceff9;border-color:#80b9d7}.test-board{position:relative;width:min(100%,440px);aspect-ratio:1;margin:auto;background-color:white;background-image:repeating-linear-gradient(90deg,#aec2bb 0 8px,transparent 8px 16px),repeating-linear-gradient(0deg,#aec2bb 0 8px,transparent 8px 16px);background-size:100% 1px,1px 100%;background-position:center;background-repeat:no-repeat;border:2px solid #72948a;border-radius:5px;overflow:hidden}.test-board canvas,.test-board #testDemo,.test-board #testDemo>svg{position:absolute;inset:0;width:100%;height:100%}#testInk{touch-action:none;cursor:crosshair}.test-edit,.test-after{display:flex;gap:8px;margin:12px 0}.test-edit button,.test-after button{flex:1;padding:10px 6px;min-height:44px}.test-edit button:not(.primary){background:#edf1f7}.test-after:has(button:not([hidden])){margin-bottom:10px}#testAnswer{font-size:24px;font-weight:700;text-align:center;margin:8px 0}#testAnswer:empty{display:none}#testStatus{font-size:16px;margin:8px 0;min-height:24px}#testStatus.error{color:#9a3c13}.test-note{font-size:13px;color:#596f68;margin:8px 0 0}.test-results{width:100%;border-collapse:collapse;font-size:15px}.test-results th,.test-results td{padding:12px 7px;border-bottom:1px solid #d3e0dc;text-align:left}.test-results th{font-size:14px;background:#e7f1ee}.test-results td:first-child{font-size:25px}.test-results-wrap{overflow:auto}#testTotal{font-size:50px;font-weight:800;color:#087669;margin-top:20px}.test-invite{max-width:440px;padding:25px}.test-invite h2{margin:0;font-size:24px}.test-invite small{display:block;font-size:16px;font-weight:500;margin:5px 0}.test-invite>div{display:flex;gap:10px;margin-top:20px}.test-invite>div button{flex:1}@media(max-width:600px){.test-dialog{padding:14px;width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;margin:0;border:0;border-radius:0}.test-header h2{font-size:19px}.test-board{width:min(100%,440px,51dvh)}.test-edit,.test-after{gap:6px;margin:8px 0}.test-edit button,.test-after button{font-size:14px}#testLesson{margin:6px 0}#testStatus{font-size:14px}.test-invite{max-width:94vw}}
.self-testing main,.self-testing header,.self-testing footer{visibility:hidden}

#testInk{z-index:2}#testDemo{z-index:1;pointer-events:none}.advice-button{font-size:14px;padding:8px 12px;background:#e4effb}#testAdviceNote:empty{display:none}

/* A correct answer gets one clear, central completion action. */
.test-win{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:#f8fffcf5;padding:12px;overflow:auto}.win-card{text-align:center;width:100%;animation:win-arrive .42s cubic-bezier(.2,.8,.3,1) both}.win-check{width:clamp(38px,7dvh,64px);height:clamp(38px,7dvh,64px);overflow:visible}.win-check circle{fill:#d8f4e8;stroke:#087669;stroke-width:2}.win-check path{fill:none;stroke:#087669;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:50;stroke-dashoffset:50;animation:win-tick .45s .12s ease-out forwards}.win-score{font-size:clamp(42px,9dvh,76px);font-weight:850;line-height:1.04;color:#087669;font-variant-numeric:tabular-nums;letter-spacing:-2px}.win-score span{font-size:22px;letter-spacing:0;margin-left:6px}.win-card h3{font-size:22px;margin:5px 0}.win-card h3 small{display:block;font-size:14px;font-weight:500;margin-top:2px}#testPraise{font-size:16px;line-height:1.45;margin:8px auto 14px;max-width:32ch;color:#31584c}#testSuccessNext{min-height:48px;font-size:17px;width:min(100%,310px);padding:10px 12px}.test-winning .test-edit,.test-winning .test-after,.test-winning #testAnswer,.test-winning #testStatus,.test-winning #testAdvice,.test-winning #testAdviceNote,.test-winning #testReplay{display:none!important}.test-winning .test-board{border-color:#88c9ed;box-shadow:0 0 0 4px #def6ff}.test-winning .test-note{margin-top:12px}@keyframes win-arrive{from{opacity:0;transform:scale(.88) translateY(12px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes win-tick{to{stroke-dashoffset:0}}@media(max-height:660px){.win-check{width:34px;height:34px}.win-score{font-size:42px}.win-card h3{font-size:18px}#testPraise{font-size:14px;margin:5px auto 8px}#testSuccessNext{min-height:44px;font-size:15px}}@media(prefers-reduced-motion:reduce){.win-card,.win-check path{animation:none}.win-check path{stroke-dashoffset:0}}

/* Keep success icons out of the full-board drawing layer. */
.test-win{padding:14px;--win-surface:#fff7fb;--win-accent:#cc167d;--win-soft:#ffb4e0;--win-ink:#762052;--button-soft:#aff1ff;--button-ink:#12465c;--button-border:#57d7f5;background:var(--win-surface)}
.test-win .win-card{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;max-width:100%;padding:4px 0}
.test-win .win-check{position:static;inset:auto;display:block;width:48px;height:48px;max-width:48px;max-height:48px;flex:0 0 48px;pointer-events:none;overflow:visible}
.test-win .win-check circle{fill:var(--win-soft);stroke:var(--win-accent)}.test-win .win-check path{stroke:var(--win-ink)}
.test-win .win-announcement{position:relative;pointer-events:none}.test-win .win-score{font-size:clamp(48px,8dvh,68px);color:var(--win-ink);line-height:1.1}
.test-win .win-card h3{font-size:20px;margin:6px 0 0}.test-win .win-card h3 small{font-size:14px}.test-win #testPraise{font-size:16px;margin:8px 0 2px;line-height:1.5;max-width:30ch;color:#29334b}
.test-win #testSuccessNext{position:relative;z-index:1;flex:none;pointer-events:auto;touch-action:manipulation;min-height:48px;width:min(100%,310px);margin-top:4px;border:2px solid var(--button-border);background:var(--button-soft);color:var(--button-ink);font-size:16px;line-height:1.35;box-shadow:0 3px 0 var(--button-border)}
.test-win #testSuccessNext:hover{filter:brightness(.97)}.test-win #testSuccessNext:active{transform:translateY(2px);box-shadow:0 1px 0 var(--button-border)}
@media(max-height:660px){.test-win{place-items:start center;padding:10px}.test-win .win-card{gap:5px}.test-win .win-check{width:36px;height:36px;max-width:36px;max-height:36px;flex-basis:36px}.test-win .win-score{font-size:42px}.test-win .win-card h3{font-size:18px}.test-win #testPraise{font-size:14px}.test-win #testSuccessNext{min-height:44px;font-size:15px}}

/* Keep the next writing action in view while feedback scrolls separately. */
.test-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
#testWorkspace{display:flex;flex-direction:column;min-height:0;flex:1}
.test-content{overflow-y:auto;min-height:0;overscroll-behavior:contain;padding:0 2px 6px;scrollbar-gutter:stable}
.test-actions{flex:none;background:#f8fbfc;border-top:1px solid #d4e2df;padding-top:8px}
.test-actions .test-edit,.test-actions .test-after{margin:0;gap:8px}
.test-actions .test-after:not(:has(button:not([hidden]))){display:none}
.test-actions button{min-height:48px;border-radius:12px;font-weight:700}
#testUndo{background:#e6edff;border-color:#afbee8;color:#29436c}
#testClear{background:#fff0d8;border-color:#e5c18a;color:#674a1f}
#testRetry{background:#e6edff;border-color:#afbee8;color:#29436c}
#testDemoButton{background:#ffe8ef;border-color:#dfadc0;color:#71384e}
#testSubmit,#testNext{background:#08786e;color:white;border-color:#08786e}
#testSummary{overflow-y:auto;min-height:0}
.test-winning .test-actions{display:none}
@media(max-width:600px){
 .test-dialog[open]{height:100dvh;max-height:100dvh;padding:10px 12px max(10px,env(safe-area-inset-bottom));box-sizing:border-box}
 .test-header,.test-dialog>#testLesson,.test-dialog>#testCoverage{flex:none}
 .test-header h2{font-size:18px}
 #testLesson{font-size:13px;margin:5px 0}
 .test-question{margin:4px 0 8px}
 .test-board{width:min(100%,440px,calc(100dvh - 250px))}
 .test-content{scrollbar-gutter:auto}
 .test-actions{padding-top:8px}
 .test-actions button{font-size:14px;padding:10px 4px}
 #testAnswer{font-size:21px;margin:6px 0}
 #testStatus{font-size:15px;margin:6px 0}
 .test-winning .test-board{width:min(100%,440px,calc(100dvh - 180px))}
}

.advice-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.advice-controls button{min-height:44px;font-size:14px;padding:8px 12px}
#testAdvice{background:#e6edff;border-color:#afbee8;color:#29436c}
#testAdviceStop{background:#fff0d8;border-color:#e5c18a;color:#674a1f}
.test-winning .advice-controls{display:none}
.test-win{--win-surface:#f1f5ff;--win-accent:#08786e;--win-soft:#e6edff;--win-ink:#08786e;--button-soft:#fff0d8;--button-ink:#674a1f;--button-border:#e5c18a}
.test-win #testSuccessNext{border-width:1px;box-shadow:none;border-radius:12px}
.test-win #testSuccessNext:active{transform:translateY(1px);box-shadow:none}

.test-win .win-score #testScoreValue{font-size:inherit;letter-spacing:inherit;margin-left:0}
#testPraiseZh,#testPraiseEn,#testSuccessNextZh,#testSuccessNextEn{display:block}
#testPraiseEn{margin-top:5px;font-size:14px;font-weight:400;line-height:1.4}
#testSuccessNextEn{font-size:13px;font-weight:500;margin-top:3px}
.win-voice{display:flex;gap:8px;justify-content:center}
.win-voice button{min-height:36px;font-size:13px;padding:6px 10px;background:#e6edff;border-color:#afbee8;color:#29436c}
#testWinStop{background:#fff0d8;border-color:#e5c18a;color:#674a1f}
#testStatus{white-space:pre-line}
.test-win{padding:10px}
.test-win .win-card{gap:5px}
.test-win .win-check{width:38px;height:38px;max-width:38px;max-height:38px;flex-basis:38px}
.test-win .win-score{font-size:clamp(40px,7dvh,60px)}
.test-win #testPraise{margin:5px 0 2px;line-height:1.4}

.test-accuracy{display:flex;flex:none;align-items:center;gap:5px;margin:5px 0 7px;flex-wrap:wrap}
.test-accuracy>span{font-size:14px;margin-right:auto}
.test-accuracy>span small{font-size:12px}
.test-accuracy button{font-size:13px;padding:7px 9px;min-height:36px;background:#eef3f8;border-color:#bdccd9;color:#354c64}
.test-accuracy button[aria-pressed="true"]{background:#d9f2e8;border-color:#08786e;color:#075e56;box-shadow:inset 0 0 0 1px #08786e}
@media(max-width:600px){.test-accuracy>span small{display:none}.test-accuracy button{padding:7px 6px}.test-board{width:min(100%,440px,calc(100dvh - 295px))}}

.student-entry{margin-left:auto;padding:9px 12px;border:1px solid #9ebaca;border-radius:12px;background:#e6edff;color:#29436c;text-decoration:none;font-size:15px;font-weight:700;white-space:nowrap}
.student-assignment{margin:14px auto;max-width:1200px;padding:16px;background:#e9f7f1;border:1px solid #9fcbbb;border-radius:14px;display:flex;align-items:center;gap:14px}.student-assignment[hidden]{display:none}.student-assignment>div{flex:1}.student-assignment p{margin:5px 0;font-size:14px}.student-assignment a,#backToStudentTasks{color:#075f57;font-weight:700}#homeworkSaveStatus:empty{display:none}#homeworkSaveStatus{padding:12px;background:#eaf4fd;border-radius:10px}#backToStudentTasks{display:inline-block;margin:10px 0}@media(max-width:600px){.student-assignment{margin:8px;flex-wrap:wrap;padding:12px}.student-assignment>div{flex-basis:100%}.student-entry{font-size:13px;padding:9px 7px}header{gap:7px}}

.student-entry-banner{max-width:1200px;margin:0 auto 18px;padding:16px 20px;border:1px solid #b9d8d1;border-radius:14px;background:#d8eee7;display:flex;align-items:center;justify-content:space-between;gap:16px;color:#41645d;font-size:16px}.student-entry-banner[hidden]{display:none}.student-entry-banner>span small{display:block;font-size:14px;margin-top:4px}.student-entry-banner a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:170px;min-height:76px;padding:12px 24px;border:2px solid #55b9aa;border-radius:14px;background:#08786e;color:#fff;text-decoration:none;line-height:1.3}.student-entry-banner a strong{font-size:25px}.student-entry-banner a small{font-size:16px;margin-top:4px}.student-entry-banner a:focus-visible{outline:3px solid #244c86;outline-offset:3px}.self-testing .student-entry-banner{display:none}
.win-actions{display:flex;gap:10px;width:min(100%,370px);align-items:stretch}.test-win .win-actions button{flex:1;min-width:0;min-height:54px;margin:4px 0 0;padding:9px 10px;border:1px solid var(--button-border);border-radius:12px;font-size:16px;line-height:1.3;white-space:normal}.test-win .win-actions #testSuccessNext{width:auto;flex:1}.win-actions #testSuccessRetry{background:#e6edff;color:#29436c;border-color:#afbee8}.win-actions small{display:block;font-size:13px;font-weight:500;margin-top:3px}
@media(max-width:600px){.student-entry-banner{margin:0 12px 14px;padding:14px;flex-wrap:wrap;font-size:14px}.student-entry-banner a{width:100%;min-height:72px}}

header .student-entry{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:auto;min-height:54px;padding:8px 18px;border:2px solid #55b9aa;border-radius:14px;background:#08786e;color:#fff;line-height:1.25}header .student-entry[hidden]{display:none}header .student-entry strong{font-size:20px}header .student-entry small{font-size:13px;font-weight:500;margin-top:3px}header{gap:14px;height:auto;min-height:96px}header #fullscreen{margin-left:0}@media(max-width:600px){header{padding:14px 12px;gap:8px;flex-wrap:nowrap}header .brand{gap:7px;font-size:20px;letter-spacing:0}header .brand .mark{width:38px;height:38px;font-size:28px}header .brand small{font-size:11px;letter-spacing:0}header .student-entry{padding:8px 10px;min-height:52px}header .student-entry strong{font-size:18px}header .student-entry small{font-size:12px}header #fullscreen{padding:8px;font-size:13px;min-height:52px;max-width:76px}}@media(max-width:380px){header .brand .mark{display:none}header .brand{font-size:19px}header .student-entry{padding:8px}header{gap:6px}}

header .student-entry,header #fullscreen{min-height:48px;padding:10px 14px;font-size:16px;line-height:1.3;display:inline-flex;align-items:center;justify-content:center} @media(max-width:600px){header .student-entry,header #fullscreen{min-height:44px;padding:8px 10px;font-size:14px}}

.animation-speed{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:15px;font-weight:650;margin:10px 0}.animation-speed input[type=range]{flex:1;min-width:100px;max-width:300px;accent-color:#08786e;height:32px}.animation-speed output{min-width:42px;font-variant-numeric:tabular-nums;color:#075f56}.test-playback-settings{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;padding:0 14px}.test-playback-settings .animation-speed{flex:1;margin:4px 0}.test-playback-settings select{min-height:38px;font-size:15px;border:1px solid #aacdc3;border-radius:9px;background:#eef7ff;color:#183d36;padding:5px}.demo-transport{display:flex;gap:8px;margin:4px 0}.demo-transport[hidden]{display:none}.demo-transport button{flex:1;min-height:44px;background:#fff0ca;border:1px solid #ddb658;color:#694b16}.demo-transport button:last-child{background:#ffe8e1;border-color:#dfa390;color:#763e2f}

.practice-controls #stopDemo{border:2px solid #b35b43;background:#fff1eb;color:#743820;box-shadow:0 2px 0 #dfb6a7;font-weight:750}.practice-controls #stopDemo:hover{background:#ffe1d4;border-color:#8c3e2a}.practice-controls #stopDemo:focus-visible{outline:3px solid #184f83;outline-offset:3px}#returnToLesson{display:block;width:100%;margin:0 0 14px;padding:12px 16px;border:2px solid #277baf;background:#e5f3ff;color:#174c73;border-radius:12px;font-size:17px;font-weight:750;text-align:left;line-height:1.5;box-shadow:0 2px 0 #b6d7ed}#returnToLesson[hidden]{display:none}#returnToLesson:hover{background:#cfeaff}#returnToLesson:focus-visible{outline:3px solid #08786e;outline-offset:3px}

/* Prominent, clearly actionable return to the saved lesson. */
#returnToLesson{border:4px solid #165f91;background:#fff1a6;color:#103e62;padding:16px 20px;font-size:21px;font-weight:800;white-space:pre-line;line-height:1.55;box-shadow:0 5px 0 #165f91,0 8px 18px #165f9120;margin-bottom:22px;cursor:pointer;transition:background .15s,box-shadow .15s,transform .15s}#returnToLesson:hover{background:#ffe477;transform:translateY(-2px);box-shadow:0 7px 0 #165f91,0 10px 20px #165f912b}#returnToLesson:active{transform:translateY(3px);box-shadow:0 2px 0 #165f91}#returnToLesson:focus-visible{outline:3px solid #cc580d;outline-offset:4px}@media(max-width:600px){#returnToLesson{padding:14px;font-size:19px}}@media(prefers-reduced-motion:reduce){#returnToLesson{transition:none}#returnToLesson:hover,#returnToLesson:active{transform:none}}

#startDictation,#startStudentAssignment,#testNow{min-height:60px;padding:14px 22px;font-size:22px;font-weight:800;border-width:2px;box-shadow:0 4px 0 #075f5630;transition:transform .18s,box-shadow .18s}#startDictation small{font-size:16px}.test-prompt-actions{display:flex;align-items:stretch;gap:8px}.test-prompt-actions button{min-height:44px;padding:8px 14px}.test-prompt-actions #testForgot{background:#fff0bd;color:#6b4417;border:2px solid #cf973d;font-weight:750}.test-prompt-actions small{display:block;font-size:13px}@media(hover:hover){#startDictation:not(:disabled):hover,#startStudentAssignment:not(:disabled):hover,#testNow:not(:disabled):hover{transform:scale(1.07);box-shadow:0 7px 15px #08786e36}}#startDictation:not(:disabled):active,#startStudentAssignment:not(:disabled):active,#testNow:not(:disabled):active{transform:scale(.98)}@media(prefers-reduced-motion:reduce){#startDictation,#startStudentAssignment,#testNow{transition:none;transform:none!important}}

/* Writing stays full size; decisions and feedback use the top layer. */
#dictationDialog .test-accuracy{display:none}#dictationDialog .test-board{width:min(100%,560px);flex-shrink:0}#dictationDialog .test-question{display:grid;grid-template-columns:auto minmax(0,1fr) 78px;gap:8px;align-items:center;margin:6px 0 10px}#testProgress{grid-column:1;grid-row:1;font-size:15px}#adviceLanguage{grid-column:3;grid-row:1;width:100%;height:46px;border:1px solid #96bdb0;background:#edf7ff;border-radius:10px;font-size:14px;padding:4px}.test-prompt-actions{grid-column:2;grid-row:1;display:grid;grid-template-columns:1fr 1fr;gap:6px}.test-prompt-actions button{font-size:15px;min-height:46px;padding:5px 7px;line-height:1.25}.test-prompt-actions small{font-size:12px;margin-top:2px}.test-settings{flex:none;font-size:14px;margin:2px 0}.test-settings summary{cursor:pointer;text-align:right;color:#345e54;padding:4px 0}.test-settings .test-playback-settings{padding:3px 0}.test-settings[open]{background:#edf5f2;border-radius:9px;padding:4px 8px}#testNext.skip-action{background:#f2f5f4;color:#516961;border-color:#b8ccc5;font-weight:500}.learning-modal{width:min(92vw,460px);max-height:88dvh;padding:0;border:2px solid #93bcaf;border-radius:22px;color:#193f36;background:#f8fcfa;box-shadow:0 20px 70px #163d3440;overflow:auto}.learning-modal::backdrop{background:#102e286e}.learning-modal-head{padding:22px 22px 16px;background:#dff1e9;text-align:center}.help-modal .learning-modal-head{background:#fff0c7}.learning-modal h2{font-size:25px;line-height:1.3;margin:0}.learning-modal small{display:block;font-size:14px;font-weight:500;margin-top:5px}.learning-modal-body{padding:16px 22px}.learning-modal-body p{margin:0 0 12px;font-size:17px;line-height:1.6;white-space:pre-line}.learning-modal .modal-english{font-size:15px;color:#49685e}.help-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;list-style-position:inside;padding:0;margin:18px 0 0}.help-steps li{background:#e4eefb;padding:12px 5px;border-radius:12px;text-align:center;font-weight:700;font-size:15px}.learning-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 18px 18px}.learning-modal-actions button,.feedback-voice button{min-height:48px;padding:10px 8px;border-radius:12px;font-size:17px;font-weight:700}.learning-modal-actions button:not(.primary){background:#e7edff;border:1px solid #acbce2;color:#29426a}.learning-modal-actions .feedback-secondary{grid-column:1/-1;background:transparent!important;border:0!important;color:#49665c!important;min-height:38px;font-size:14px}.feedback-score{font-size:48px;font-weight:850;color:#8e4717;line-height:1.15;margin-bottom:8px}.feedback-modal .learning-modal-head{background:#fff0db}.feedback-modal .learning-modal-head>strong{display:block;font-size:25px;margin-top:12px}.feedback-voice{display:flex;gap:8px}.feedback-voice button{font-size:14px;min-height:42px;padding:7px 12px;background:#e4f1fc;color:#28536b}.feedback-modal #feedbackDemo.primary{grid-column:1/-1}.learning-modal button:focus-visible{outline:3px solid #236aa5;outline-offset:3px}@media(max-width:600px){#dictationDialog .test-board{width:100%}.learning-modal-head{padding:18px 16px 14px}.learning-modal-body{padding:14px 18px}.learning-modal h2{font-size:23px}.test-header h2{font-size:18px}.test-prompt-actions button{font-size:14px}}

.learning-modal [hidden]{display:none!important}

.feedback-language{display:flex;align-items:center;gap:8px;font-size:14px;margin-bottom:12px}.feedback-language select{margin-left:auto;min-height:44px;min-width:120px;background:#edf7ff;border:1px solid #8db5b0;border-radius:10px;padding:6px 10px;font-size:16px}#feedbackVoiceNote{margin:0 22px 14px;font-size:14px;color:#45685c;line-height:1.45}#feedbackRead[aria-pressed="true"]{background:#c7eade;border-color:#38866e}

/* Short landscape viewports (including iPads) keep the writing board in view. */
@media(max-height:850px){
 .test-dialog[open]{position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100vh;max-height:100vh;height:100dvh;max-height:100dvh;box-sizing:border-box;border:0;border-radius:0;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 #dictationDialog .test-board{width:min(100%,440px,max(220px,calc(100dvh - 340px)))}
 #dictationDialog .test-content{-webkit-overflow-scrolling:touch}
}

#lessonGuidance{font-size:13px;line-height:1.55;color:#27463c;background:#edf6f1;border-left:3px solid #3f9b79;padding:8px 10px;border-radius:0 8px 8px 0;margin:7px 0 0}#lessonGuidance:empty{display:none}

.mode strong small{display:block;line-height:1.25;margin-top:2px}.info-table #charRadical{font-family:inherit;font-size:inherit;line-height:1.25}.radical-glyph,.radical-name,.radical-pinyin,.radical-pending{display:block}.radical-glyph{font-family:"Kaiti SC",STKaiti,"Songti SC",serif;font-size:23px}.radical-name{font-size:14px;font-weight:600;margin-top:2px}.radical-pinyin{font-size:12px;color:#617d72;margin-top:1px}.radical-pending{font-size:11px;color:#7a6750;margin-top:2px}
.success button small{display:block;line-height:1.15;margin-top:2px}

.radical-display{display:flex;align-items:flex-start;justify-content:center;gap:16px;text-align:left;flex-wrap:wrap}.radical-glyph{font-family:"Kaiti SC",STKaiti,"Songti SC",serif;font-size:32px;line-height:1.25;white-space:nowrap}.radical-readable-char{display:inline-flex;align-items:flex-start}.radical-info{min-width:140px}.radical-name{font-size:18px;font-weight:700;color:#183933;line-height:1.7}.radical-ruby{margin-right:.05em}.radical-ruby rt{font-size:.52em;font-weight:500;color:#54756c;font-family:system-ui,sans-serif}.radical-details{margin-top:3px;text-align:left;font-size:12px;color:#59736b}.radical-details summary{cursor:pointer;color:#087669}.radical-detail-text p{margin:4px 0;line-height:1.5}.radical-pending{font-size:13px;color:#7a6750}.info-table #charRadical{padding:8px 10px}footer>div{max-width:620px}footer p{line-height:1.7;margin:6px 0 0}footer nav{display:flex;flex-wrap:wrap;gap:16px;align-items:center}

.radical-direct-note{font-size:12px;color:#6d837c;align-self:center}.radical-details[open]{min-width:240px}
@media(max-width:760px){.radical-display{gap:10px}.radical-glyph{font-size:29px}.radical-name{font-size:16px}.radical-info{min-width:120px}.radical-details[open]{min-width:0}.radical-detail-text p{font-size:12px}}

.worksheet-notice{margin:12px 0;padding:14px 16px;border:2px solid #70b790;border-radius:12px;background:#e9f8ef;color:#18553b;font-size:17px;font-weight:800;line-height:1.5;text-align:center}.worksheet-notice[hidden]{display:none!important}#worksheetSection iframe[hidden]{display:none!important}

#dictationDialog .test-visual-prompt{display:grid;gap:5px;margin:5px 0 10px;padding:10px 12px;border:1px solid #bfd5cc;border-left:4px solid #358878;border-radius:10px;background:#eef7f3}#dictationDialog .test-visual-prompt[hidden]{display:none!important}#dictationDialog .visual-context{max-height:22dvh;overflow:auto;overscroll-behavior:contain;margin:0;color:#243d36;font-size:17px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}#dictationDialog .visual-context mark{background:#ffe18a;color:#193a31;border-radius:4px;padding:0 2px;font-weight:850;box-shadow:0 0 0 2px #ffe18a}#dictationDialog .visual-target{margin:0;text-align:center;color:#365d53;font-size:15px}#dictationDialog .visual-target strong{display:inline-block;margin-left:8px;color:#173c33;font-size:38px;line-height:1.1;vertical-align:middle}#dictationDialog.stroke-order-mode .test-prompt-actions{display:none}#dictationDialog.stroke-order-mode .test-question{grid-template-columns:minmax(0,1fr) 78px}#dictationDialog.stroke-order-mode #testProgress{grid-column:1;grid-row:1}#dictationDialog.stroke-order-mode #adviceLanguage{grid-column:2;grid-row:1}

.worksheet-retry{display:inline-flex;align-items:center;justify-content:center;margin:0 0 12px;padding:10px 16px;border:1px solid #b98e44;border-radius:10px;background:#fff5d8;color:#694a19;font:inherit;font-weight:700;cursor:pointer}.worksheet-retry[hidden]{display:none!important}
.student-next-assignment{display:block;width:100%;max-width:680px;margin:16px auto;padding:16px 22px;border:0;border-radius:14px;background:#28796d;color:#fff;text-align:center;text-decoration:none;font-size:20px;font-weight:800;line-height:1.35;box-shadow:0 4px 0 #175c52}.student-next-assignment:hover,.student-next-assignment:focus-visible{background:#1c665c}.student-next-assignment[data-complete=true]{background:#3b7c57;box-shadow:0 4px 0 #285b3c}.student-next-assignment[data-complete=true]:hover{background:#2c6947}#assignmentContinuationStatus{text-align:center;font-weight:700;color:#315c50}
.difficulty>div{grid-template-columns:repeat(2,minmax(0,1fr))}.test-accuracy button small{display:block;margin-top:1px;font-size:10px;line-height:1.15}

#feedbackSaveStatus,#testSuccessSaveStatus{padding:8px 12px;margin:8px auto 0;border-radius:10px;background:#e7f3ed;color:#28594b;font-weight:700;text-align:center}

/* Alternate listening clue stays a compact full-width tap target. */
#dictationDialog .test-hint-button{grid-column:1/-1;min-height:40px;padding:7px 12px;background:#e1f0eb;border:1px solid #8fb8aa;border-radius:10px;color:#28594c;font-size:14px;font-weight:650;line-height:1.3}#dictationDialog .test-hint-button small{font-size:12px;margin-left:6px;font-weight:500}#dictationDialog .test-hint-button[hidden],#dictationDialog.stroke-order-mode .test-hint-button{display:none!important}#dictationDialog.has-alternate-clue .test-board{width:min(100%,560px,max(240px,calc(100dvh - 386px)))}@media(max-height:850px){#dictationDialog.has-alternate-clue .test-board{width:min(100%,440px,max(220px,calc(100dvh - 386px)))}}
/* Independent character dictionary: touch-first search, ink and readable results. */
.dictionary-header-button{background:#e0f1e9;border-color:#a2c8b9;color:#245b49;display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:12px;white-space:nowrap}.dictionary-header-button small{font-size:12px;font-weight:500}.dictionary-entry-tools{display:flex;gap:8px;margin-top:8px}.dictionary-entry-tools button{flex:1;padding:9px 6px;font-size:12px;background:#e8f4ee;border-color:#c2dacc;min-height:42px}.dictionary-dialog{width:min(740px,calc(100vw - 24px));max-height:92dvh;border:1px solid #bad3c7;border-radius:24px;padding:24px;color:#23483f;background:#f8fbf9;box-shadow:0 24px 80px #143d3840;overflow-y:auto;overscroll-behavior:contain}.dictionary-dialog::backdrop{background:#183a345e;backdrop-filter:blur(3px)}.dictionary-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.dictionary-head h2{font-size:24px;margin:0}.dictionary-head h2 small{display:block;font-size:13px;color:#698276;font-weight:500;margin-top:3px}.dictionary-head>button{font-size:27px;line-height:1;padding:6px;width:42px;height:42px;border-radius:50%}.dictionary-search{display:flex;gap:5px;align-items:center;background:white;border:2px solid #a8cbbb;border-radius:99px;padding:5px}.dictionary-search input{border:0;outline-offset:-2px;min-width:0;width:100%;flex:1;font-size:20px;background:transparent;color:#23483f;padding:9px 3px}.dictionary-search input::placeholder{font-size:16px;color:#7a9085}.dictionary-search button{margin:0;flex-shrink:0}.dictionary-search .primary{width:auto;border-radius:99px;padding:10px 16px;margin:0;min-height:46px}.dictionary-search .primary small{display:none}.dictionary-search .dictionary-icon{width:44px;height:44px;padding:8px;border:0;background:transparent;color:#4e846d;font-size:28px;display:grid;place-items:center}.dictionary-icon svg{width:25px;height:25px}.dictionary-icon.listening{background:#fce3e3;color:#a73549;animation:dictionary-pulse 1s infinite alternate}.dictionary-status{font-size:14px;line-height:1.6;min-height:24px;color:#5b7769;margin:12px 2px 18px}.dictionary-dialog h3{font-size:18px;margin:0}.dictionary-dialog h4{font-size:16px;margin:20px 0 10px}.dictionary-dialog h3 small,.dictionary-dialog h4 small{font-size:12px;font-weight:500;color:#748a80;margin-left:6px}.dictionary-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.dictionary-section-title button{font-size:12px;padding:6px 10px}.dictionary-history{background:#eef5f0;padding:18px;border-radius:16px}.dictionary-history>div:last-child,.dictionary-word-chips{display:flex;gap:8px;flex-wrap:wrap}.dictionary-history>div:last-child button,.dictionary-word-chips button{padding:8px 14px;border-radius:99px;font-size:17px;background:white;min-height:42px}.dictionary-character-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.dictionary-character-tabs button{font-size:25px;padding:6px 14px;min-width:48px}.dictionary-character-tabs button[aria-pressed=true]{background:#d8eee2;border:2px solid #47886b}.dictionary-result{margin-top:20px;padding:22px;background:white;border:1px solid #d7e4db;border-radius:20px}.dictionary-result-heading{display:flex;align-items:center;gap:24px}.dictionary-result-heading>span{font-family:serif;font-size:78px;line-height:1.3;background:#f0f6f1;border-radius:18px;padding:4px 20px}.dictionary-result-heading h3{font-size:24px;color:#39755b;margin-bottom:10px;overflow-wrap:anywhere}.dictionary-result-heading button{padding:8px 12px;font-size:13px}.dictionary-facts{display:grid;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);align-items:baseline;gap:12px 14px;margin:22px 0;padding:18px 0;border-top:1px solid #e0e9e3;border-bottom:1px solid #e0e9e3;font-size:15px}.dictionary-facts dt{color:#708579;font-size:12px}.dictionary-facts dd{margin:0;font-size:19px;overflow-wrap:anywhere}.dictionary-definition p{font-size:17px;line-height:1.7;margin:0;color:#446255;overflow-wrap:anywhere}#dictionaryExamples p{line-height:1.8;font-size:18px;padding:12px 16px;background:#f3f7ef;border-radius:12px;margin:8px 0}#dictionaryExamples small{display:block;font-size:12px;color:#71856c;margin-top:6px}#dictionaryExamples mark{background:#d8ecc0;color:#245b35;border-radius:4px;padding:1px 2px}#dictionaryAnimation{width:fit-content;max-width:100%;margin:16px auto;background:linear-gradient(90deg,transparent 49.7%,#dce8e0 49.7%,#dce8e0 50.3%,transparent 50.3%),linear-gradient(transparent 49.7%,#dce8e0 49.7%,#dce8e0 50.3%,transparent 50.3%);border:1px solid #b9d2c3;border-radius:10px;overflow:hidden}.dictionary-order-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.dictionary-order-actions button{min-height:44px;font-size:14px}.dictionary-order>p,.dictionary-source{font-size:12px;line-height:1.7;color:#718479}.dictionary-dialog .stroke-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:8px;max-height:none;overflow:visible}.dictionary-dialog .stroke-card{min-width:0}.dictionary-ink-area{text-align:center;padding:16px;background:#eef5f0;border-radius:18px}.dictionary-ink-area>p{font-size:14px;margin:0 0 12px}.dictionary-ink-area small{display:block;font-size:12px;color:#718576;margin-top:5px}#dictionaryInk{width:min(100%,380px);height:auto;aspect-ratio:1;display:block;margin:auto;background:#fff;border:2px solid #b8cfc1;border-radius:15px;touch-action:none;cursor:crosshair}.dictionary-ink-actions{display:flex;justify-content:center;gap:8px;margin-top:12px}.dictionary-ink-actions button{font-size:13px;padding:10px 14px;min-height:42px}#dictionaryInkStatus{font-size:13px;color:#5c7967;line-height:1.6;margin:10px 0}.dictionary-candidates{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.dictionary-candidates button{font-size:27px;font-family:serif;padding:6px 0;background:white;min-height:46px}.dictionary-dialog [hidden]{display:none!important}.self-testing .dictionary-dialog{visibility:visible}.focus .dictionary-header-button{display:none}@keyframes dictionary-pulse{to{box-shadow:0 0 0 5px #e99da629}}@media(max-width:700px){.dictionary-header-button{margin-right:6px;margin-left:5px;padding:9px 12px;display:block}.dictionary-header-button small{display:block;font-size:10px}.dictionary-dialog{padding:16px 13px;border-radius:20px;max-height:94dvh}.dictionary-head{margin-bottom:14px}.dictionary-head h2{font-size:22px}.dictionary-search{gap:0;padding:3px}.dictionary-search .dictionary-icon{width:38px;height:42px;padding:7px}.dictionary-search input{font-size:18px}.dictionary-search input::placeholder{font-size:14px}.dictionary-search .primary{padding:8px 12px;min-height:42px;font-size:14px}.dictionary-result{padding:16px 13px}.dictionary-result-heading{gap:16px}.dictionary-result-heading>span{font-size:65px;padding:4px 16px}.dictionary-result-heading h3{font-size:21px}.dictionary-facts{grid-template-columns:auto minmax(0,1fr);padding:14px 0;gap:9px 16px}.dictionary-history{padding:14px}.dictionary-dialog .stroke-cards{grid-template-columns:repeat(auto-fill,minmax(60px,1fr))}.dictionary-candidates{grid-template-columns:repeat(6,minmax(0,1fr))}.dictionary-ink-area{padding:12px 8px}}
@media(prefers-reduced-motion:reduce){.dictionary-icon.listening{animation:none}}
@media(max-width:600px){header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;min-height:0;padding-bottom:12px}header .brand{min-width:0}header .dictionary-header-button{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:0;background:#deeee5;font-size:16px;border-radius:13px}header .dictionary-header-button small{font-size:12px}header .student-entry{margin-left:0}header #fullscreen{margin:0}}
/* One wide dictionary entry above the lesson selectors; no duplicate header CTA. */
.dictionary-launcher{margin:0 0 24px;padding:14px;background:#e8f3ed;border:1px solid #c0d9cb;border-radius:16px}.dictionary-launcher #wordsForm{gap:8px}.dictionary-launcher #words{min-height:48px;font-size:19px}.dictionary-launcher #wordsForm .primary{min-height:48px}.dictionary-launcher .dictionary-entry-tools{margin-top:9px}.dictionary-launcher .dictionary-entry-tools button{background:#f8fcf9;font-size:12px}.dictionary-search #dictionarySubmit{min-width:88px;font-size:14px}.dictionary-search #dictionarySubmit:disabled{opacity:.8;cursor:progress}
@media(max-width:600px){header{display:flex;justify-content:space-between;flex-wrap:nowrap}.dictionary-launcher{margin:0 -6px 22px;padding:12px;border-radius:16px}.dictionary-launcher #wordsForm{grid-template-columns:minmax(0,1fr) 64px;gap:8px}.dictionary-launcher #words{padding:12px;font-size:19px;min-height:52px}.dictionary-launcher #wordsForm .primary{font-size:16px;padding:10px 8px;min-height:52px}.dictionary-launcher .dictionary-entry-tools{display:flex;gap:8px}.dictionary-launcher .dictionary-entry-tools button{font-size:13px;min-height:44px}.dictionary-dialog{width:calc(100vw - 12px);max-width:none;margin:12px auto;padding:18px 14px;max-height:calc(100dvh - 24px)}.dictionary-search #dictionarySubmit{min-width:72px;max-width:84px;font-size:13px;padding:9px 8px}.dictionary-search input{font-size:18px}.dictionary-search input::placeholder{font-size:14px}}
.dictionary-recording-note{font-size:13px;line-height:1.7;color:#617d6e;background:#f1f7f2;border-radius:10px;padding:10px 12px;margin:14px 0 0;overflow-wrap:anywhere}.dictionary-result-heading #dictionaryRead:disabled{cursor:default}
.dictionary-result>.dictionary-order{margin-top:0;padding-bottom:20px;border-bottom:1px solid #dce7df}.dictionary-result>.dictionary-order>h4{margin-top:0;font-size:22px}.dictionary-demo-label{min-height:28px;text-align:center;font-size:20px;font-weight:700;color:#1d4439;margin:12px 0}#dictionaryAnimation{position:relative;width:min(100%,420px);aspect-ratio:1;background:white;border:2px solid #59636e;border-radius:16px;margin:12px auto}#dictionaryAnimation::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 49.8%,#dbe4df 49.8%,#dbe4df 50.2%,transparent 50.2%),linear-gradient(transparent 49.8%,#dbe4df 49.8%,#dbe4df 50.2%,transparent 50.2%);pointer-events:none}#dictionaryAnimation>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.dictionary-order .animation-speed{justify-content:center;margin:14px auto;max-width:420px}.dictionary-order .animation-speed input{min-width:60px}#dictionaryStrokeCards{margin-top:12px}.dictionary-history{margin-top:20px}.dictionary-result~.dictionary-history{margin-top:20px}
/* Compact writing-first dictionary composer. */
.dictionary-topbar{display:flex;align-items:center;gap:7px}.dictionary-topbar .dictionary-search{flex:1;min-width:0;margin:0}.dictionary-topbar #dictionaryClose{flex:none;width:32px;height:38px;padding:0;border:0;background:transparent;font-size:26px;color:#658176}.dictionary-search #dictionarySubmit{width:42px;min-width:42px;max-width:42px;padding:8px;border-radius:50%;font-size:17px}.dictionary-candidates{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;min-height:56px;padding:6px 0;margin:2px 0;scrollbar-width:thin;white-space:nowrap}.dictionary-candidates button{flex:none;min-width:44px;height:44px;font-size:28px;font-family:serif;padding:4px 10px;border:0;background:transparent;color:#264e40;border-radius:8px}.dictionary-candidates button:hover{background:#e1f0e7}.dictionary-candidates button.word-suggestion{font:20px system-ui;min-width:66px;background:#edf5ef;padding:7px 13px}.dictionary-ink-area{padding:0;margin:0;background:transparent;border:0;border-radius:0}#dictionaryInk{width:min(100%,500px);max-height:none;border:2px solid #b3cdbc;border-radius:16px}.dictionary-ink-actions{margin:10px 0;gap:12px}.dictionary-ink-actions button{min-width:90px;padding:8px 14px}.dictionary-status[hidden],#dictionaryInkStatus[hidden]{display:none}#dictionaryInkStatus{font-size:13px;cursor:pointer;margin:8px 0;color:#8a493c}.dictionary-writing .dictionary-history,.dictionary-writing .dictionary-character-tabs,.dictionary-writing .dictionary-result{display:none!important}.dictionary-result{margin:8px 0 0;padding:18px}.dictionary-result-heading{display:grid;grid-template-columns:minmax(70px,100px) minmax(0,1fr);gap:18px;align-items:center;margin:0 0 16px}.dictionary-glyph-stack{text-align:center;min-width:0}.dictionary-glyph-stack #dictionaryGlyph{display:block;font-family:serif;font-size:72px;line-height:1.1;color:#234c40}.dictionary-glyph-stack #dictionaryPinyin{font-size:16px;line-height:1.4;font-weight:500;margin:5px 0 0;overflow-wrap:anywhere}.dictionary-heading-meaning{min-width:0}.dictionary-heading-meaning #dictionaryMeaning{font-size:19px;line-height:1.55;color:#365b48;margin:0 0 8px;overflow-wrap:anywhere}.dictionary-heading-meaning #dictionaryRead{font-size:12px;padding:7px 10px;min-height:36px}.dictionary-result>.dictionary-order{padding:12px 0 16px;border-top:1px solid #dfebe2;border-bottom:0}.dictionary-result>.dictionary-order>h4{font-size:16px;margin:0 0 8px}.dictionary-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0;padding:0;border:0}.dictionary-facts>div{min-width:0;padding:10px;background:#f1f6f2;border-radius:10px}.dictionary-facts dt{font-size:11px;color:#788c7e;margin:0 0 4px;white-space:normal}.dictionary-facts dd{font-size:18px;line-height:1.3;margin:0;overflow-wrap:anywhere}.dictionary-recording-note{font-size:12px;padding:8px 10px;margin:8px 0 12px}.dictionary-source{font-size:11px;margin-bottom:0}.dictionary-dialog .dictionary-status{min-height:0;margin:4px 0 9px}.dictionary-dialog .dictionary-character-tabs{margin:4px 0 8px}.dictionary-dialog .dictionary-order .stroke-cards{height:auto;max-height:none;overflow:visible;grid-auto-rows:max-content}.dictionary-dialog .dictionary-demo-label{font-size:17px;min-height:24px;margin:8px 0}.dictionary-dialog .dictionary-history{margin-top:12px}.dictionary-dialog .dictionary-head{display:none}
@media(max-width:600px){.dictionary-dialog{padding:12px 10px;border-radius:18px}.dictionary-topbar{gap:2px}.dictionary-search .dictionary-icon{width:34px}.dictionary-search #dictionarySubmit{min-width:38px;width:38px;max-width:38px;min-height:38px;font-size:16px;padding:6px}.dictionary-search input{font-size:18px;padding:8px 2px}.dictionary-search input::placeholder{font-size:13px}.dictionary-topbar #dictionaryClose{width:26px;font-size:24px}.dictionary-candidates{min-height:54px}.dictionary-ink-actions button{font-size:12px;min-height:40px}.dictionary-result{padding:13px 10px;border-radius:14px}.dictionary-result-heading{grid-template-columns:76px minmax(0,1fr);gap:12px}.dictionary-glyph-stack #dictionaryGlyph{font-size:64px}.dictionary-heading-meaning #dictionaryMeaning{font-size:17px}.dictionary-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.dictionary-facts>div{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:9px}.dictionary-facts dt{font-size:10px;margin:0;max-width:66px}.dictionary-facts dd{font-size:17px;text-align:right}.dictionary-result>.dictionary-order{padding-top:10px}#dictionaryAnimation{margin:8px auto}.dictionary-dialog .dictionary-order-actions{gap:6px}.dictionary-dialog .dictionary-order-actions button{font-size:12px;min-height:40px;padding:8px 11px}}
.dictionary-extra{margin-top:14px;border-top:1px solid #e0e9e2;padding-top:12px}.dictionary-extra>summary{cursor:pointer;font-size:14px;color:#52725e;font-weight:600}.dictionary-extra>summary small{font-weight:400;font-size:11px;margin-left:5px}.dictionary-extra[open]{padding-bottom:8px}
.dictionary-result-heading .dictionary-pinyin-readings{grid-column:1/-1;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:5px 14px;font-size:16px;color:#39785b;line-height:1.5;margin-top:-8px}.dictionary-pinyin-readings>span{white-space:nowrap}.dictionary-heading-meaning{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.dictionary-heading-meaning #dictionaryMeaning{margin:0}.dictionary-heading-meaning #dictionaryRead{display:grid;place-items:center;width:58px;height:58px;padding:8px;border:0;border-radius:50%;background:#e0f0e6;color:#15715c;flex:none}.dictionary-heading-meaning #dictionaryRead svg{width:40px;height:40px}.dictionary-heading-meaning #dictionaryRead[aria-pressed=true]{background:#087669;color:white}.dictionary-trace-surface,.dictionary-trace-writer{position:absolute;inset:0;width:100%;height:100%}.dictionary-trace-surface>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.dictionary-trace-writer{touch-action:none;cursor:crosshair}.dictionary-trace-writer>svg{display:block;max-width:100%;max-height:100%}#dictionaryAnimation{touch-action:none}.dictionary-order-actions #dictionaryAnimate,.dictionary-order-actions #dictionaryRewrite{min-width:120px;background:#e5eaff;color:#304668;border-color:#b9c5eb}.dictionary-order-actions #dictionaryRewrite{background:#fff0d6;color:#6c5226;border-color:#e5c48e}#dictionaryOrderNote:empty{display:none}@media(max-width:600px){.dictionary-result-heading{row-gap:12px}.dictionary-heading-meaning{gap:6px}.dictionary-heading-meaning #dictionaryRead{width:50px;height:50px;padding:7px}.dictionary-heading-meaning #dictionaryRead svg{width:36px;height:36px}.dictionary-result-heading .dictionary-pinyin-readings{font-size:15px;gap:4px 13px;margin-top:-5px}.dictionary-order-actions #dictionaryAnimate,.dictionary-order-actions #dictionaryRewrite{min-width:114px}}

/* Independent writing and shared model/ink comparison use normal document flow. */
.dictionary-practice-modes,.dictionary-check-accuracy{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}.dictionary-practice-modes button{flex:1;min-height:44px;font-size:15px;padding:10px}.dictionary-practice-modes button[aria-pressed=true],.dictionary-check-accuracy button[aria-pressed=true]{background:#087669;border-color:#087669;color:white}.dictionary-check-accuracy{font-size:13px}.dictionary-check-accuracy button{font-size:13px;min-height:40px;padding:8px 12px}.dictionary-check-result{margin:16px 0;padding:14px;background:#f0f6f3;border:1px solid #b6d0c3;border-radius:14px}.dictionary-check-result>strong{font-size:24px;color:#20594a}.dictionary-check-result>p{line-height:1.6;font-size:15px}.dictionary-check-result>small{display:block;margin-top:12px;color:#657c73}.writing-comparison{height:auto;max-height:none;margin:14px 0;overflow:visible}.writing-comparison h4{font-size:17px;margin:0 0 8px}.writing-legend{display:flex;flex-wrap:wrap;gap:6px 16px!important;font-size:12px!important;line-height:1.5!important;margin-bottom:8px!important}.writing-legend .model{color:#31764d}.writing-legend .student{color:#265fbd}.writing-comparison-board{display:block;width:min(100%,340px);height:auto;aspect-ratio:1;margin:0 auto;border:1px solid #b8cdc2;border-radius:12px;background:#fff}.writing-comparison-note{font-size:12px!important;line-height:1.6!important;color:#60756a;margin:8px 0 0!important}.dictionary-order-actions #dictionaryCheckSubmit{background:#087669;color:white;border-color:#087669}.dictionary-order-actions #dictionaryCheckUndo{background:#e8edff}.learning-modal .writing-comparison-board{width:min(100%,290px)}#feedbackCompareToggle{font-size:14px;padding:8px 12px;min-height:40px}#dictionaryAnimation>svg{height:100%;width:100%}

#testCompareToggle{display:block;margin:10px auto;font-size:14px;padding:8px 14px;min-height:40px;background:#edf4f0;color:#315f51;border-color:#a7c5b8}#testCompareToggle[hidden]{display:none}

/* Comparison occupies the existing writing square; it never creates another grid. */
.test-board>.writing-overlay{position:absolute;inset:0;pointer-events:none;z-index:1}.writing-overlay>svg{display:block;width:100%;height:100%;background:transparent}.writing-overlay[hidden]{display:none}#testComparisonLegend{justify-content:center;margin:4px 0 8px}#dictionaryComparison{margin:6px 0}

/* Result controls float at the edges of the same grid, leaving ink visible. */
.test-board>.board-result,.dictionary-board-shell>.board-result{position:absolute;inset:0;z-index:3;pointer-events:none;background:transparent;padding:0;overflow:visible;color:#592b65}
.board-result[hidden]{display:none!important}.board-result-top{position:absolute;top:6px;left:6px;right:6px;display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none}
.board-score{display:flex;align-items:baseline;justify-content:center;gap:5px;max-width:100%;border:1px solid #d0a265;border-radius:10px;background:#fff8eef5;box-shadow:0 2px 6px #70470014;padding:3px 10px;font-size:23px;font-weight:800;line-height:1.15;color:#925312;font-variant-numeric:tabular-nums}
.board-score small{font-size:11px;font-weight:500}.board-score>span:last-child{font-size:11px;font-weight:650;margin-left:4px;color:inherit}.board-result .board-legend{display:flex;justify-content:center;gap:10px;margin:0!important;font-size:10px;line-height:1.25;background:#ffffffed;border-radius:6px;padding:2px 6px}.board-legend .model{color:#31764d}.board-legend .student{color:#265fbd}.board-result .board-save{margin:0!important;font-size:10px;line-height:1.3;color:#67427b;background:#fffbf4ed;border-radius:6px;padding:2px 5px;text-align:center;max-width:95%}
.board-result-actions{position:absolute;bottom:6px;left:6px;right:6px;display:flex;justify-content:space-between;align-items:flex-end;gap:8px;pointer-events:none}
.board-result-actions>button,.test-board #testSuccessNext{pointer-events:auto;box-sizing:border-box;flex:0 0 88px;width:88px;min-width:0;max-width:46%;height:38px;min-height:38px;max-height:38px;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0;padding:4px 6px;border-radius:10px;font-size:12px;font-weight:700;line-height:1.2;box-shadow:0 2px 6px #38214020;white-space:normal}
.board-result-actions>button small{display:block;font-size:10px;font-weight:500;margin-top:2px;line-height:1.1}.board-result-actions>.board-retry{background:#fff1ce;color:#704700;border:1px solid #c69c47}.board-result-actions>.board-next,.test-board #testSuccessNext{background:#f0e5ff;color:#663a86;border:1px solid #b79acd}.board-result-actions>button:disabled{opacity:.65;box-shadow:none;cursor:wait}
.test-winning .test-board{box-shadow:none;border-color:#72948a}.test-winning .test-actions,.test-winning #testStatus,.test-winning #testAdvice,.test-winning #testAdviceNote,.test-winning .advice-controls,.test-winning #testReplay{display:revert!important}.test-winning .test-edit,.test-winning .test-after,.test-winning #testAnswer{display:none!important}
#dictationDialog .test-board{width:min(100%,440px,max(220px,calc(100dvh - 340px)));}.dictionary-board-shell{position:relative;width:min(100%,420px);aspect-ratio:1;margin:12px auto}.dictionary-board-shell #dictionaryAnimation{width:100%;height:100%;box-sizing:border-box;margin:0}.dictionary-board-shell>.board-result{border:2px solid transparent;box-sizing:border-box}.dictionary-check-result{padding:8px 10px;margin:8px 0}.dictionary-check-result>p{margin:0}.dictionary-check-result>small{margin-top:5px}.dictionary-board-shell:has(.board-result:not([hidden]))~.dictionary-order-actions{display:none}.dictionary-board-shell:has(.board-result:not([hidden]))~.animation-speed{display:none}#dictionaryComparison{display:none!important}
@media(max-width:380px){.board-score{font-size:21px;padding:3px 7px}.board-score>span:last-child{font-size:10px}.board-result-actions>button,.test-board #testSuccessNext{padding:4px 6px;font-size:11px}}

/* Drawing must not trigger native text selection, drag previews or tap highlights. */
#board,#board *,.test-board,.test-board *,#dictionaryAnimation,#dictionaryAnimation *,#dictionaryInk{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
#board::selection,.test-board::selection,#dictionaryAnimation::selection,#dictionaryInk::selection{background:transparent}

.dictionary-topbar,.dictionary-topbar *,.dictionary-candidates,.dictionary-candidates *,.dictionary-ink-area,.dictionary-ink-area *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.dictionary-topbar input{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}

.board-result[data-perfect="true"] .board-score{color:#1d7045;border-color:#8ebca1;background:#eefaf2f5;box-shadow:0 2px 6px #1d704514}

header .brand-logo{display:block;width:52px;height:52px;object-fit:contain;flex:none}
@media(max-width:600px){header .brand-logo{width:44px;height:44px}}

.teacher-entry{margin-left:8px;padding:9px 12px;border:1px solid #9fcbbb;border-radius:12px;background:#e9f7f1;color:#20594f;text-decoration:none;font-size:15px;font-weight:700;white-space:nowrap}.teacher-entry:hover{background:#d8eee6}
@media(max-width:700px){header{padding:12px 14px;gap:6px}.student-entry{margin-left:auto}.teacher-entry{margin-left:0;padding:8px 9px;font-size:14px}#fullscreen{margin-left:0}}

#sharedLessonParts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}#sharedLessonParts[hidden]{display:none}#sharedLessonParts button{flex:1 1 auto;padding:7px 9px;font-size:12px}#sharedLessonParts button[aria-pressed=true]{background:#087669;color:white}

/* Two facts per first row; readable at phone widths without horizontal scrolling. */
.info-table{width:100%;table-layout:fixed}.info-table th{width:18%}.info-table td{overflow-wrap:anywhere}.info-table #charPinyin,.info-table #charMeaning{width:32%}#charMeaning{font-size:clamp(.85rem,2.8vw,1rem);line-height:1.5}#charPinyin{white-space:normal}.pinyin-choice[aria-pressed=true],.dictionary-pinyin-readings button[aria-pressed=true]{background:#e2f2e9;color:#215c48;border-color:#4b8c70}.dictionary-pinyin-readings button{border:1px solid #d1e3d9;background:#fff;border-radius:10px;padding:7px 12px;font:inherit;cursor:pointer}.dictionary-same-radical{margin:14px 0}.dictionary-same-radical h4{margin:0 0 10px}.dictionary-same-radical small{font-weight:400}.dictionary-same-radical .candidate-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}.dictionary-same-radical .candidate-grid button{min-width:0;min-height:44px;padding:6px;font-size:1.5rem}.dictionary-same-radical p{font-size:.8rem;color:#526d62;margin:7px 0}@media(max-width:480px){.info-table th{padding:7px 4px;font-size:.8rem}.info-table td{padding:7px 5px}.dictionary-same-radical .candidate-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:480px){#dictionaryDialog{box-sizing:border-box;max-width:100%}.dictionary-practice-modes button{font-size:.8rem;white-space:nowrap;padding-inline:6px}}
/* All character facts follow the same label/value pair grid. */
.info-table th,.info-table td{vertical-align:middle;text-align:center}.info-table #charRadical,.info-table #charTraditional{width:32%;font-size:clamp(.85rem,2.8vw,1.1rem);line-height:1.4}.info-table .radical-display{gap:8px;align-items:center}.info-table .radical-glyph{font-size:28px}.info-table .radical-direct-note{font-size:11px}.info-table .radical-info{min-width:0}.info-table small{display:block}.info-table #charTraditional{font-family:"Kaiti SC",STKaiti,"Songti SC",serif}
@media(max-width:480px){.info-table th{width:22%;padding:7px 3px}.info-table td,.info-table #charPinyin,.info-table #charMeaning,.info-table #charRadical,.info-table #charTraditional{width:28%}.info-table th small{font-size:9px;line-height:1.35;white-space:nowrap;letter-spacing:0}}
