@font-face{font-family:SamEggZhuyin;src:url(./zhuyin.woff2) format("woff2");font-weight:100 900;font-display:swap}
:root{font:100%/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans CJK TC",sans-serif;color:#193d31;background:#fbfaf5;--ink:#193d31;--muted:#6a796f;--green:#087952;--line:#e1e7dd;--mint:#e8f2e6;--paper:#fffefa;--bg:#fbfaf5;--yellow:#f5c954}*{box-sizing:border-box}html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}body{margin:0;padding-bottom:110px}button,a{touch-action:manipulation}button,input,a{font:inherit}button{cursor:pointer;color:inherit;user-select:none;-webkit-user-select:none}button:disabled{cursor:default}button,a{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #087952}a{color:inherit}.icon{width:21px;height:21px;display:inline-block;flex:none}.header{position:sticky;top:0;z-index:20;background:#fbfaf5ed;backdrop-filter:blur(18px);padding:env(safe-area-inset-top,0px) 0 0}.header-inner{width:min(1140px,calc(100% - 64px));margin:auto;min-height:82px;display:flex;gap:20px;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;border:0;background:none;padding:0;text-decoration:none}.brand img{width:39px;height:39px}.brand strong{font-size:1.05rem;letter-spacing:-.035em}.brand small{font-size:.6rem;letter-spacing:.14em;display:block;color:var(--muted)}.desktop-nav{display:flex;gap:9px;margin-inline-start:auto}.nav-button{background:none;border:0;border-radius:12px;min-height:44px;padding:8px 18px;color:var(--muted);font-size:.9rem}.nav-button[aria-current=page]{background:var(--mint);color:var(--green);font-weight:600}.pill{border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:9px 13px;min-height:44px;font-size:.75rem;display:inline-flex;align-items:center;gap:8px}.pill .indicator{width:22px;height:13px;background:#c8d1c6;border-radius:10px;position:relative}.pill .indicator::after{content:"";width:9px;height:9px;border-radius:50%;background:white;position:absolute;left:2px;top:2px}.pill[aria-pressed=true] .indicator{background:var(--green)}.pill[aria-pressed=true] .indicator::after{left:11px}.info{width:44px;height:44px;border:0;border-radius:50%;background:var(--mint);font-size:1.2rem}.wrap{width:min(1100px,calc(100% - 64px));margin:auto}main{padding:44px 0}.eyebrow{color:var(--green);font-size:.7rem;letter-spacing:.14em;font-weight:650;margin:0 0 12px}.intro{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:30px;align-items:center;padding:8px 0 30px}.intro h1{font-size:clamp(2rem,4.1vw,3.65rem);line-height:1.15;letter-spacing:-.055em;font-weight:640;margin:0 0 20px}.intro h1 span{color:var(--green)}.lead{font-size:1rem;color:var(--muted);line-height:1.9;margin:0;max-width:540px}.intro img{width:250px;height:250px;object-fit:contain;justify-self:center}.day-note{display:inline-flex;align-items:center;gap:8px;border-radius:20px;color:var(--green);font-size:.7rem;margin:0 0 16px}.day-note::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--green)}.home-layout{display:grid;grid-template-columns:1.6fr 1fr;gap:24px}.lesson-card{background:#e2efdf;border-radius:26px;padding:30px 32px;display:block;text-align:start;border:0;position:relative;min-width:0}.lesson-card .eyebrow{font-size:.65rem;letter-spacing:.09em;color:#537957;margin:0 0 7px}.lesson-card h2{font-size:1.9rem;letter-spacing:-.04em;line-height:1.3;margin:0 0 10px;font-weight:630}.lesson-card p{margin:0;color:#61755d;font-size:.9rem}.symbol-line{display:flex;align-items:center;gap:12px;margin:26px 0}.mini-symbol{font-size:2.6rem;line-height:1.4;width:68px;min-height:74px;display:grid;place-items:center;background:#fffefaad;border-radius:17px;font-family:"Noto Sans CJK TC",sans-serif}.lesson-bottom{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:.8rem}.start-cue{display:flex;align-items:center;gap:18px;font-weight:650;color:var(--green)}.note{font-size:.8rem;color:var(--muted);margin:14px 0 0;line-height:1.8}.preview-note{font-size:.7rem;color:var(--muted);margin:20px 0 0;max-width:720px}.side-card{padding:28px;background:var(--paper);border:1px solid var(--line);border-radius:25px;display:flex;flex-direction:column;align-items:start;justify-content:center;min-width:0}.circle-progress{width:68px;height:68px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--green) var(--progress,0deg),var(--mint) 0);margin-bottom:20px;position:relative}.circle-progress::before{content:"";position:absolute;inset:6px;background:var(--paper);border-radius:50%}.circle-progress strong{position:relative;font-size:1.1rem;font-variant-numeric:tabular-nums}.side-card h2{font-size:1.25rem;line-height:1.4;margin:0 0 9px;font-weight:600;letter-spacing:-.025em}.side-card p{color:var(--muted);font-size:.85rem;margin:0 0 20px}.text-button{background:transparent;border:0;color:var(--green);min-height:44px;padding:0;font-size:.8rem;font-weight:600;text-align:start}.path-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:38px 0 16px}.path-head h2{font-size:1.25rem;margin:0;letter-spacing:-.025em;font-weight:620}.path-head p{font-size:.75rem;color:var(--muted);margin:0}.path-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.path-item{padding:20px 24px;background:var(--paper);border:1px solid var(--line);border-radius:18px;text-align:start;min-height:90px}.path-item span{color:var(--muted);font-size:.7rem;display:block;margin-top:5px}.path-item strong{font-size:.9rem;font-weight:600}.path-number{font-variant-numeric:tabular-nums;color:var(--green)!important;display:inline!important;font-size:.85rem!important;margin-inline-end:10px}.press{transition:transform 120ms cubic-bezier(.23,1,.32,1)}.press:active{transform:scale(.98)}.bottom-nav{display:none}.view[hidden]{display:none}.page-title{font-size:2.4rem;line-height:1.3;letter-spacing:-.05em;font-weight:620;margin:6px 0 12px}.subtitle{font-size:.95rem;line-height:1.8;color:var(--muted);max-width:620px;margin:0 0 30px}.map-heading{display:flex;align-items:baseline;gap:15px;margin:30px 0 16px}.map-heading h2{font-size:1.15rem;margin:0;font-weight:600}.map-heading span{color:var(--muted);font-size:.75rem}.symbol-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:14px}.symbol-button{border:1px solid var(--line);background:var(--paper);border-radius:19px;min-width:0;min-height:115px;padding:15px 8px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.zhuyin{font-family:"Noto Sans CJK TC",sans-serif;font-size:2.8rem;line-height:1.25;font-weight:400}.pinyin{font-size:.8rem;color:var(--muted)}body.hide-pinyin .pinyin{display:none}.practiced::after{content:"✓";position:absolute;right:8px;top:5px;font-size:.7rem;color:var(--green)}.symbol-button.practiced{background:var(--mint)}.lesson-top{display:flex;gap:15px;align-items:center;margin-bottom:26px}.back-button{background:var(--paper);border:1px solid var(--line);border-radius:50%;width:44px;height:44px;flex:none}.lesson-top p{margin:0;color:var(--muted);font-size:.8rem}.lesson-top strong{display:block;font-size:.95rem;letter-spacing:-.02em}.step-track{display:flex;gap:7px;flex:1;margin-inline-start:auto;max-width:240px}.step-track span{height:5px;background:var(--line);flex:1;border-radius:4px}.step-track span.current{background:var(--green)}.learning-panel{max-width:680px;margin:auto}.stage-label{color:var(--green);font-size:.7rem;font-weight:650;letter-spacing:.1em;text-align:center;margin:18px 0 12px}.stage-title{text-align:center;font-size:1.65rem;font-weight:620;letter-spacing:-.035em;line-height:1.4;margin:0 0 22px}.sound-card{border:1px solid var(--line);border-radius:28px;background:var(--paper);padding:28px;text-align:center}.big-symbol{font-family:"Noto Sans CJK TC",sans-serif;font-size:8.5rem;line-height:1.35;margin:0;color:var(--green);font-weight:400}.sound-card .pinyin{margin:4px 0 14px;font-size:.85rem}.sound-tip{font-size:1rem;max-width:420px;margin:12px auto 18px;line-height:1.85;color:var(--muted)}.example{display:flex;align-items:center;justify-content:center;gap:15px;background:var(--mint);border-radius:15px;padding:14px;margin:20px 0;font-size:.95rem}.example .hanzi{font-size:1.5rem;line-height:1.4}.sound-button{display:inline-flex;gap:10px;align-items:center;justify-content:center;border:1px solid var(--line);background:var(--bg);border-radius:14px;min-height:48px;padding:12px 20px;color:var(--muted);font-size:.85rem}.audio-note{font-size:.7rem;line-height:1.7;color:var(--muted);max-width:440px;margin:12px auto 0}.button{display:inline-flex;align-items:center;justify-content:center;gap:16px;min-height:52px;padding:12px 24px;border:0;border-radius:15px;background:var(--green);color:white;font-weight:600;font-size:.9rem;text-decoration:none}.button:disabled{opacity:.45}.lesson-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px;justify-content:space-between;align-items:center}.secondary{background:var(--mint);color:var(--green)}.drawing-wrap{background:var(--paper);border:1px solid var(--line);border-radius:26px;padding:22px}.drawing-tip{margin:0 0 20px;font-size:.9rem;color:var(--muted);line-height:1.8}.canvas-box{aspect-ratio:1;max-width:420px;margin:auto;position:relative;border:1px solid var(--line);background:linear-gradient(90deg,transparent calc(50% - .5px),var(--line) 50%,transparent calc(50% + .5px)),linear-gradient(transparent calc(50% - .5px),var(--line) 50%,transparent calc(50% + .5px));border-radius:18px;overflow:hidden}.trace-guide{position:absolute;inset:0;display:grid;place-items:center;font-family:"Noto Sans CJK TC",sans-serif;font-size:15rem;line-height:1;color:#d9e6d7;pointer-events:none}canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.drawing-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:15px}.drawing-tools button{background:none;border:0;font-size:.8rem;color:var(--green);min-height:44px;padding:8px}.drawing-status{font-size:.75rem;color:var(--muted)}.finish-card{max-width:680px;margin:auto;text-align:center;padding:25px}.finish-card img{width:200px;height:200px;object-fit:contain}.finish-card h1{font-size:2.2rem;line-height:1.3;letter-spacing:-.04em;font-weight:620;margin:0 0 15px}.finish-card p{color:var(--muted);font-size:.95rem}.progress-list{display:grid;gap:12px;margin-top:30px}.progress-item{padding:18px 24px;background:var(--paper);border:1px solid var(--line);border-radius:17px;display:flex;align-items:center;gap:18px}.progress-item .zhuyin{font-size:2rem}.progress-item strong{display:block;font-size:.9rem;font-weight:600}.progress-item small{color:var(--muted);font-size:.75rem}.progress-item>span:last-child{margin-inline-start:auto;color:var(--green);font-size:.8rem}.empty-progress{padding:40px 20px;background:var(--paper);border:1px dashed var(--line);border-radius:20px;text-align:center}.empty-progress p{font-size:.9rem;color:var(--muted)}dialog{background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:24px;width:min(490px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:28px;box-shadow:0 20px 80px #132d2622}dialog::backdrop{background:#183b324a;backdrop-filter:blur(3px)}dialog h2{font-size:1.5rem;line-height:1.4;margin:0 0 18px;font-weight:600;letter-spacing:-.03em}dialog p{font-size:.9rem;color:var(--muted);line-height:1.9}.preview-label{font-size:.65rem;color:var(--muted);text-align:center;margin:45px 0 10px}.toast{position:fixed;left:50%;bottom:105px;transform:translateX(-50%);background:var(--ink);color:white;padding:10px 17px;border-radius:13px;z-index:40;font-size:.8rem;max-width:calc(100% - 32px);text-align:center}.toast:empty{display:none}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(hover:hover) and (pointer:fine){.nav-button:hover,.text-button:hover{color:var(--green)}.symbol-button:hover{border-color:#93b39b}.pill:hover{background:var(--mint)}}
@media(max-width:800px){.intro{grid-template-columns:minmax(0,1fr) 170px}.intro img{width:175px;height:175px}.home-layout{grid-template-columns:1.3fr 1fr}.header-inner,.wrap{width:calc(100% - 40px)}.desktop-nav .nav-button{padding-inline:12px}.mini-symbol{width:55px;font-size:2.2rem}.symbol-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.lesson-card{padding:26px}.side-card{padding:24px}}
@media(max-width:600px){body{padding-bottom:95px}.header-inner,.wrap{width:calc(100% - 36px)}.header-inner{min-height:70px;gap:8px;flex-wrap:wrap;padding-block:10px}.brand{gap:7px;min-width:0;flex:1}.brand img{width:33px;height:33px;flex:none}.brand strong{font-size:.9rem}.brand small{font-size:.55rem}.desktop-nav{display:none}.pill{font-size:.65rem;min-height:44px;padding:7px 10px;gap:6px}.info{width:36px;height:44px;background:none;flex:none}main{padding:24px 0}.intro{grid-template-columns:minmax(0,1fr) 108px;gap:6px;padding:10px 0 25px}.intro h1{font-size:2rem;margin-bottom:14px;line-height:1.18}.intro .lead{font-size:.85rem;line-height:1.85;grid-column:1/-1}.intro-copy{display:contents}.intro .eyebrow{font-size:.6rem;margin-bottom:11px;grid-column:1;grid-row:1}.intro h1{grid-column:1;grid-row:2}.intro img{width:120px;height:148px;grid-column:2;grid-row:1/3}.home-layout{display:flex;flex-direction:column;gap:16px}.lesson-card{padding:25px 24px;border-radius:24px}.lesson-card h2{font-size:1.7rem}.lesson-card p{font-size:.85rem}.symbol-line{gap:10px;margin:23px 0}.mini-symbol{font-size:2.45rem;min-width:0;flex:1;min-height:72px;width:auto}.lesson-bottom{font-size:.75rem}.side-card{padding:20px 24px;display:grid;grid-template-columns:58px 1fr;gap:4px 18px;border-radius:20px}.circle-progress{width:56px;height:56px;grid-row:1/4;margin:0;align-self:center}.circle-progress strong{font-size:.85rem}.side-card h2{font-size:1rem;margin:0}.side-card p{font-size:.75rem;margin:0}.side-card .text-button{min-height:32px;font-size:.75rem}.path-head{margin-top:28px}.path-head h2{font-size:1.1rem}.path-head p{font-size:.7rem}.path-row{gap:9px}.path-item{padding:16px 12px;border-radius:15px;min-height:94px}.path-item strong{font-size:.75rem}.path-item span{font-size:.65rem;margin-top:7px}.path-number{display:block!important;margin:0 0 4px!important;font-size:.8rem!important}.preview-note{font-size:.65rem;margin-top:20px}.bottom-nav{position:fixed;z-index:30;bottom:0;left:0;right:0;display:flex;align-items:stretch;padding:7px 16px calc(7px + env(safe-area-inset-bottom,0px));background:#fbfaf5ed;border-top:1px solid var(--line);backdrop-filter:blur(18px)}.bottom-nav button{flex:1;min-width:0;border:0;background:none;color:var(--muted);border-radius:13px;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:.65rem}.bottom-nav button[aria-current=page]{color:var(--green);background:var(--mint)}.symbol-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.symbol-button{min-height:90px;border-radius:15px;padding:12px 5px}.symbol-grid .zhuyin{font-size:2rem}.symbol-grid .pinyin{font-size:.7rem}.page-title{font-size:1.9rem;margin-top:8px}.subtitle{font-size:.85rem;margin-bottom:25px}.map-heading{margin-top:26px}.map-heading h2{font-size:1rem}.map-heading span{font-size:.65rem}.lesson-top{gap:11px;margin-bottom:20px;flex-wrap:wrap}.lesson-top p{font-size:.7rem}.lesson-top strong{font-size:.85rem}.step-track{max-width:100%;flex-basis:100%;margin-top:6px}.stage-label{font-size:.65rem;margin-top:22px}.stage-title{font-size:1.45rem;margin-bottom:20px}.sound-card{padding:22px 20px;border-radius:24px}.big-symbol{font-size:7rem}.sound-tip{font-size:.9rem;margin-top:16px}.audio-note{font-size:.65rem}.example{font-size:.8rem}.example .hanzi{font-size:1.45rem}.lesson-actions{gap:10px;align-items:stretch}.lesson-actions .button{flex:1;font-size:.8rem;padding-inline:18px;min-height:52px}.drawing-wrap{padding:18px;border-radius:22px}.trace-guide{font-size:12rem}.drawing-tip{font-size:.8rem}.finish-card{padding:16px 0}.finish-card h1{font-size:1.9rem}.finish-card img{width:180px;height:180px}.finish-card p{font-size:.85rem}.progress-list{gap:10px}.progress-item{padding:15px 18px}.progress-item strong{font-size:.85rem}.progress-item small{font-size:.65rem}.preview-label{margin-top:28px;font-size:.6rem}}
@media(max-width:359px){.header-inner,.wrap{width:calc(100% - 28px)}.brand strong{font-size:.8rem}.brand img{width:28px;height:28px}.pill{font-size:.6rem;padding-inline:8px}.pill .indicator{display:none}.intro{grid-template-columns:minmax(0,1fr) 85px}.intro h1{font-size:1.8rem}.intro img{width:95px}.lesson-card{padding:22px}.symbol-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.side-card{gap:4px 12px}.lesson-card h2{font-size:1.5rem}.path-item{padding-inline:9px}.trace-guide{font-size:10rem}}
@media(prefers-reduced-motion:reduce){.press{transition:none}.press:active{transform:none}}@media(prefers-reduced-transparency:reduce){.header,.bottom-nav{background:var(--bg);backdrop-filter:none}dialog::backdrop{backdrop-filter:none}}@media(prefers-contrast:more){.header,.bottom-nav{background:var(--bg);backdrop-filter:none}.lesson-card,.symbol-button,.sound-card{border:1px solid var(--ink)}}
.canvas-box{container-type:inline-size}.trace-guide{font-size:70cqw}
.header-inner{flex-wrap:wrap}.brand{min-width:0}.brand strong{overflow-wrap:anywhere}.progress-item{flex-wrap:wrap}.progress-item>div{min-width:0;flex:1;overflow-wrap:anywhere}.desktop-nav .nav-button{display:inline-flex;align-items:center;gap:7px}
@media(max-width:1000px){.desktop-nav{display:none}.bottom-nav{position:fixed;z-index:30;bottom:0;left:0;right:0;display:flex;align-items:stretch;padding:7px 16px calc(7px + env(safe-area-inset-bottom,0px));background:#fbfaf5ed;border-top:1px solid var(--line);backdrop-filter:blur(18px)}.bottom-nav button{flex:1;min-width:0;border:0;background:none;color:var(--muted);border-radius:13px;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:.65rem}.bottom-nav button[aria-current=page]{color:var(--green);background:var(--mint)}}
@media(max-width:600px){.brand{flex:1 1 160px}.symbol-grid{grid-template-columns:repeat(auto-fit,minmax(min(4rem,100%),1fr))}}
@media(prefers-reduced-transparency:reduce){.bottom-nav{background:var(--bg);backdrop-filter:none}}
.brand{text-align:start}.mini-symbol,.zhuyin,.big-symbol,.trace-guide,.hanzi{font-family:SamEggZhuyin,"Noto Sans CJK TC",sans-serif}.stroke-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.stroke-numbers{pointer-events:none}.demo-status{font-size:.85rem;line-height:1.7;font-weight:600;color:var(--green);margin:18px 0 6px;text-align:center;min-height:1.7em}.trace-tools{flex-wrap:wrap;justify-content:center;gap:8px 18px;margin-top:0}.trace-tools button{min-height:44px}.trace-tools button:disabled{color:var(--muted);opacity:.45}.shape-guide-toggle{display:flex;align-items:center;justify-content:center;gap:10px;min-height:44px;margin-top:6px;font-size:.8rem;color:var(--muted);user-select:none}.shape-guide-toggle[hidden]{display:none}.shape-guide-toggle input{width:18px;height:18px;accent-color:var(--green)}.canvas-box[data-phase=demo]{background-color:#f6faf2}.stroke-numbers circle{paint-order:stroke}.drawing-wrap .drawing-tip{margin-bottom:18px}


/* SamEgg's four-screen learning world */
:root{--bg:#f8f6ed;--paper:#fff;--line:#e9e7da;--ink:#203d33;--muted:#6c7468;--green:#087655;--mint:#e7eee0;background:var(--bg);color:var(--ink)}
body{padding:0 0 90px;min-height:100dvh}button{font-weight:500}button:disabled{opacity:.58}button:focus-visible,input:focus-visible{outline:3px solid #ba932f;outline-offset:4px}h1,h2,p{overflow-wrap:break-word}img{max-width:100%}[hidden]{display:none!important}.header{position:relative;background:transparent;backdrop-filter:none;z-index:15}.header-inner{width:calc(100% - 64px);min-height:86px;gap:14px;flex-wrap:wrap;padding-block:10px}.brand{gap:9px;flex:none}.brand strong{font-family:Georgia,serif;font-size:1.75rem;letter-spacing:-.05em;color:#294331}.brand small{font-size:.51rem;letter-spacing:.21em;line-height:1}.brand-egg{display:grid;place-items:center;width:34px;height:41px;background:#fffefa;border:1px solid #e0deca;border-radius:50% 50% 44% 44%;font-size:1.2rem;color:#e8b449;box-shadow:inset -3px -3px 0 #eeecd9}.header-actions{display:flex;align-items:center;gap:12px;margin-left:auto}.language-chip{background:#eae9dc;border:5px solid #fff;border-radius:30px;padding:4px 13px;font-size:.75rem;line-height:1.5}.pill{background:#fff;border:0;border-radius:30px;padding:10px 14px;font-size:.75rem}.progress-link{border:0;border-radius:30px;background:white;font-size:.75rem;padding:10px 17px;min-height:44px}.info{background:transparent;color:var(--green);border:1px solid #d8ddce;width:44px;height:44px}.wrap{width:auto;margin:0 30px 0 340px;padding:12px 0 0;min-width:0}.study-rail{position:fixed;left:24px;top:94px;bottom:24px;width:280px;padding:26px 22px 18px;background:#fff;border-radius:27px;box-shadow:0 8px 25px #33451c07;display:flex;flex-direction:column;z-index:5;overflow:auto;scrollbar-width:thin}.rail-progress-label{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:.85rem}.rail-progress-label strong{font-weight:600}.rail-progress-label span{color:var(--muted);font-size:.7rem}.rail-progress-label b{color:var(--green);font-size:.95rem;font-weight:600}progress{appearance:none;width:100%;height:7px;display:block;border:0;border-radius:10px;margin-top:10px;overflow:hidden;background:var(--line)}progress::-webkit-progress-bar{background:var(--line)}progress::-webkit-progress-value{background:var(--green);border-radius:10px}progress::-moz-progress-bar{background:var(--green)}.rail-companion{margin:auto 0 0;padding-top:20px;text-align:center}.rail-companion p{font-size:.85rem;line-height:1.7;margin:0 auto 0;max-width:220px}.rail-companion img{display:block;width:220px;max-height:280px;object-fit:contain;margin:0 auto}.rail-level{background:#fcfbf5;border:1px solid #ced7be;border-radius:20px;padding:14px 12px;display:flex;align-items:center;gap:11px;text-align:left;width:100%;min-height:75px;margin-top:5px}.level-mark{color:#c89c2d;font-size:1.6rem}.rail-level strong{font-size:.8rem;display:block}.rail-level small{display:block;font-size:.58rem;color:var(--muted);margin-top:3px}.rail-level-count{font-size:.7rem;color:var(--green);margin-left:auto;white-space:nowrap}.utility-nav{position:fixed;bottom:18px;right:26px;z-index:15;display:flex;gap:8px}.utility-nav button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:1px solid #d1d9c4;border-radius:30px;background:#fffdf7;padding:7px 15px;font-size:.7rem;box-shadow:0 2px 6px #33451c09}.utility-nav button>span:first-child{font-size:1.2rem;line-height:1}.utility-nav button[aria-current=page]{color:var(--green);background:#e6eddf;border-color:#7e9b70}.toast{bottom:82px}.view{min-width:0}body[data-view=learn]{background:var(--bg) url('./scene.webp') center bottom/cover fixed no-repeat;padding-bottom:0}body[data-view=learn] .study-rail{display:none}body[data-view=learn] .wrap{margin:0;padding:0}body[data-view=learn] .utility-nav{background:#faf8edb8;border-radius:30px;padding:5px}.home-content{width:min(930px,67%);margin:clamp(40px,9vh,105px) 4.2% 0 auto;position:relative;z-index:2}.home-kicker{font-size:.62rem;letter-spacing:.17em;color:#59715a;margin:0 0 9px}.home-content h1{font:500 clamp(1.7rem,2.5vw,2.5rem)/1.2 Georgia,serif;color:#294331;margin:0 0 10px;letter-spacing:-.035em}.home-description{color:#687260;font-size:.8rem;margin:0 0 26px}.home-cards{display:grid;grid-template-columns:1fr 1fr;gap:26px}.entry-card{background:#ffffffed;border:2px solid #eeecdf;border-radius:33px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:335px;aspect-ratio:1.04;padding:28px 18px;box-shadow:0 6px 0 #ebe9dd;min-width:0}.entry-meta{font-size:.55rem;letter-spacing:.12em;color:#798371}.entry-card h2{font-size:1.3rem;line-height:1.4;margin:12px 0 0;font-weight:500;color:#2f4134;letter-spacing:-.02em}.entry-card h2 .zhuyin{font-size:1.3rem}.entry-card img{width:230px;max-width:80%;height:210px;object-fit:contain;margin:8px 0 0}.entry-caption{font-size:.7rem;color:#6c7864;margin-top:3px}.home-teacher{position:fixed;width:clamp(240px,29vw,440px);height:55vh;object-fit:contain;object-position:center bottom;left:0;bottom:4vh;pointer-events:none}.home-note{font-size:.65rem;color:#48633f;text-align:center;margin-top:25px}.home-ground-note{position:fixed;bottom:20px;left:34px;font-size:.6rem;letter-spacing:.04em;color:#385a32}.map-intro{display:flex;gap:20px;justify-content:space-between;align-items:baseline;margin:0 0 22px}.map-intro h2{font-size:1.1rem;letter-spacing:-.025em;margin:0;font-weight:600}.map-intro p{font-size:.7rem;color:var(--muted);margin:0}.map-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;border-bottom:1px solid #dfdfcf;margin-bottom:20px}.map-tabs button{border:0;border-bottom:2px solid transparent;background:none;padding:8px 4px 16px;min-height:48px;color:var(--muted);font-size:.75rem;border-radius:0}.map-tabs button[aria-pressed=true]{border-color:var(--green);color:var(--green);font-weight:600}.symbol-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:13px}.symbol-button{background:white;border:1.5px solid #eae9dc;border-radius:16px;min-height:112px;aspect-ratio:1.02;box-shadow:0 4px 0 #eae9dd;gap:5px;padding:12px 5px}.symbol-grid .zhuyin{font-size:2.6rem;color:#24372c}.symbol-grid .pinyin{font-size:.67rem;color:#75816f}.map-note{font-size:.65rem;color:var(--muted);margin:25px 0 0;line-height:1.9}.map-note span{display:block}.mode-switch{display:flex;gap:8px;margin-top:20px}.mode-switch button{flex:1;min-width:0;min-height:44px;font-size:.7rem;border:1px solid #89a177;background:white;border-radius:30px;padding:7px 8px}.mode-switch button[aria-pressed=true]{background:var(--green);color:white;border-color:var(--green)}.test-content{width:min(540px,100%);margin:6vh auto 0;text-align:center}.test-content .eyebrow{font-size:.58rem;color:#7c866f;letter-spacing:.15em}.test-content h2{font:500 1.9rem/1.3 Georgia,serif;margin:0 0 26px;letter-spacing:-.035em}.play-again{background:transparent;border:1.5px solid #59866b;color:var(--green);border-radius:40px;min-height:55px;display:inline-flex;align-items:center;gap:12px;padding:10px 28px;font-size:.9rem;opacity:1!important}.play-again span{font-size:1.3rem}.audio-status{font-size:.65rem;line-height:1.8;color:#798371;margin:12px 0 25px}.test-question{font-size:.85rem;color:#737c68;margin:0 0 20px}.test-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.test-choice{min-height:125px;aspect-ratio:unset}.test-choice.selected{border-color:var(--green);background:#eef4e8;box-shadow:0 4px 0 #c6d8bc}.test-choice .zhuyin{font-size:2.8rem}.test-choice .pinyin{font-size:.7rem}.test-settings{display:flex;justify-content:end;margin-top:20px}.stroke-toggle{position:relative;display:flex;align-items:center;gap:10px;min-height:44px;font-size:.72rem;color:var(--muted);cursor:pointer}.stroke-toggle input{position:absolute;right:0;opacity:0;width:44px;height:30px;margin:0}.switch-track{display:block;width:38px;height:23px;border-radius:20px;background:#c9cfc1;padding:3px;pointer-events:none}.switch-track:after{content:'';display:block;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:transform 150ms ease}.stroke-toggle input:checked+.switch-track{background:var(--green)}.stroke-toggle input:checked+.switch-track:after{transform:translateX(15px)}.stroke-toggle input:focus-visible+.switch-track{outline:3px solid #b89428;outline-offset:4px}.selection-feedback{font-size:.72rem;min-height:1.8em;color:var(--green);margin:3px 0 12px}.test-actions{display:flex;align-items:center;justify-content:center;gap:25px}.test-actions .button{min-height:44px;font-size:.75rem;border-radius:30px}.test-disclaimer{font-size:.6rem;color:#7b8373;margin:16px 0 0}.rail-symbol-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 6px}.rail-symbol-top>.zhuyin{font-size:4.3rem}.rail-symbol-top button{border:0;background:none;color:#86927e;font-size:1.2rem;min-width:44px;min-height:44px}.neighbor-symbols{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.neighbor-symbols button{border:0;background:#eeeee2;border-radius:12px;min-height:48px;font-family:SamEggZhuyin,sans-serif;font-size:1.4rem;padding:3px}.neighbor-symbols button[aria-current=true]{background:var(--green);color:white}.lesson-back{margin:0 0 6px;font-size:.7rem;min-height:32px}.learning-panel{max-width:600px;margin:0 auto}.stage-label{display:none}.stage-title{font:500 1.3rem/1.4 Georgia,serif;margin:0 0 17px;letter-spacing:-.02em}.drawing-wrap{border:0;background:none;padding:0;border-radius:0}.drawing-wrap .drawing-tip{display:none}.drawing-wrap.review-pending .drawing-tip{display:block;font-size:.75rem;text-align:center;margin:0 auto 15px;max-width:480px}.canvas-box{max-width:550px;width:100%;border:1px solid #8ba781;border-radius:23px;background-color:white;background-image:linear-gradient(90deg,transparent calc(50% - .5px),#e5e5d7 50%,transparent calc(50% + .5px)),linear-gradient(transparent calc(50% - .5px),#e5e5d7 50%,transparent calc(50% + .5px));box-shadow:0 5px 0 #ecebdf}.canvas-box[data-phase=demo]{background-color:#fff}.demo-status{font-size:.75rem;font-weight:500;margin:14px 0 2px}.trace-tools{gap:5px 20px}.trace-tools button{font-size:.7rem}.shape-guide-toggle{font-size:.7rem;margin:0}.lesson-actions{justify-content:center;gap:20px;margin-top:18px}.lesson-actions .button{border-radius:30px;min-height:44px;font-size:.75rem;padding:10px 20px}.lesson-actions .text-button{font-size:.7rem}.review-pending .drawing-tools{justify-content:center;flex-wrap:wrap}.page-title{font:500 2.2rem/1.2 Georgia,serif}.subtitle{font-size:.85rem}.progress-list{max-width:760px}.progress-item{min-width:0}.press{transition:transform 140ms cubic-bezier(.23,1,.32,1)}
@media(min-width:1600px){.wrap{margin-left:390px;margin-right:34px}.study-rail{width:320px}.symbol-button{min-height:135px}.symbol-grid{gap:16px}.home-content{width:min(1100px,67%)}.entry-card{min-height:390px}.entry-card img{height:250px;width:270px}.test-content{margin-top:12vh}}
@media(max-height:820px) and (min-width:901px){.rail-companion img{max-height:205px}.rail-companion p{font-size:.78rem}.rail-level{min-height:64px}.study-rail{top:84px;padding-top:22px}.header-inner{min-height:76px}.test-content{margin-top:1vh}.test-content h2{margin-bottom:16px}.test-choice{min-height:105px}.audio-status{margin-bottom:16px}.test-settings{margin-top:10px}.canvas-box{max-width:440px}.stage-title{margin-bottom:10px}.lesson-actions{margin-top:10px}.home-content{margin-top:4vh}.entry-card{min-height:300px}.entry-card img{height:180px}}
@media(max-width:1200px) and (min-width:901px){.study-rail{width:240px;left:20px;padding-inline:17px}.wrap{margin-left:290px;margin-right:25px}.symbol-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:11px}.symbol-button{min-height:100px}.home-content{width:69%;margin-right:3%}.home-cards{gap:18px}.entry-card{min-height:300px;padding:20px 12px}.entry-card img{height:180px}.entry-card h2{font-size:1.1rem}.entry-caption{font-size:.6rem}.home-teacher{width:30vw}}
@media(max-width:900px){body{padding-bottom:100px}.header-inner{width:calc(100% - 36px);min-height:75px;gap:10px}.brand strong{font-size:1.5rem}.brand-egg{width:29px;height:36px}.header-actions{gap:8px}.progress-link{display:none}.study-rail{position:relative;inset:auto;width:auto;margin:8px 18px 22px;border-radius:20px;padding:18px 20px;overflow:visible}.rail-companion,.rail-level{display:none}.rail-progress-label{font-size:.8rem}.rail-progress-label span{font-size:.65rem}.wrap{margin:0 22px;padding:0}.utility-nav{right:0;bottom:0;left:0;background:#faf8f0f5;backdrop-filter:blur(14px);border-radius:0;border-top:1px solid #e5e6d8;padding:8px 18px calc(8px + env(safe-area-inset-bottom));gap:10px;justify-content:space-around}.utility-nav button{flex:1;border:0;box-shadow:none;background:transparent;min-height:48px;border-radius:14px;padding:5px 15px;gap:7px;font-size:.75rem}.utility-nav button[aria-current=page]{border:0;background:#e5eddf}.utility-nav button>span:first-child{font-size:1.4rem}.map-intro{margin-bottom:10px;gap:10px}.map-intro h2{font-size:1rem}.map-intro p{font-size:.65rem}.map-tabs{gap:0;margin-bottom:18px}.map-tabs button{font-size:.65rem;padding-inline:3px}.symbol-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:11px}.symbol-button{min-height:97px;border-radius:15px}.symbol-grid .zhuyin{font-size:2.3rem}.test-content{margin:28px auto 0;max-width:500px}.mode-switch{max-width:400px;margin:16px auto 0}.test-content h2{font-size:1.7rem}.rail-symbol-top{max-width:350px;margin:8px auto 3px}.rail-symbol-top>.zhuyin{font-size:3rem}.neighbor-symbols{max-width:340px;margin:auto}.neighbor-symbols button{min-height:44px;font-size:1.3rem}.lesson-back{margin:0 0 12px}.learning-panel{max-width:550px}.canvas-box{max-width:500px}.stage-title{font-size:1.25rem}.lesson-actions{gap:15px}.lesson-actions .button{flex:none}.toast{bottom:90px}body[data-view=learn] .utility-nav{background:#faf8f0f0;border-radius:0;padding:8px 18px calc(8px + env(safe-area-inset-bottom))}body[data-view=learn]{background-position:center bottom;background-attachment:scroll;min-height:100dvh;padding-bottom:85px}.home-content{width:calc(100% - 50px);max-width:650px;margin:30px auto 0}.home-content h1{font-size:2.2rem}.home-description{font-size:.8rem;margin-bottom:24px}.entry-card{min-height:275px;aspect-ratio:1.1;padding:24px 12px}.entry-card img{height:160px;width:190px}.entry-card h2{font-size:1.15rem}.entry-caption{font-size:.65rem}.home-teacher{position:relative;left:auto;bottom:auto;width:230px;height:230px;margin:0 0 -10px 20px;display:block}.home-ground-note{position:absolute;bottom:100px;left:auto;right:30px;max-width:140px}.home-note{color:#44663d;margin-top:20px}}
@media(max-width:560px){.header-inner{width:calc(100% - 28px);min-height:72px;flex-wrap:nowrap;gap:5px}.brand{flex:none;gap:6px}.brand strong{font-size:1.35rem}.brand small{font-size:.43rem}.brand-egg{width:25px;height:31px;font-size:.9rem}.header-actions{gap:6px}.language-chip{font-size:.6rem;padding:4px 8px;border-width:4px}.pill{padding:8px 10px;gap:6px;font-size:.65rem}.pill .indicator{display:block;width:22px;height:13px}.info{width:38px;min-height:44px;border:0;font-size:1.25rem}.study-rail{margin:4px 16px 20px;padding:15px 18px;border-radius:20px}.wrap{margin:0 18px}.home-content{width:calc(100% - 36px);margin:25px auto 0}.home-kicker{font-size:.52rem;letter-spacing:.12em;margin-bottom:9px}.home-content h1{font-size:2rem;line-height:1.14;max-width:280px}.home-description{font-size:.75rem;max-width:290px;line-height:1.8;margin:12px 0 22px}.home-cards{grid-template-columns:1fr;gap:16px}.entry-card{min-height:155px;aspect-ratio:auto;display:grid;grid-template-columns:1fr 125px;grid-template-rows:auto auto auto;align-content:center;justify-items:start;text-align:left;padding:21px 20px;border-radius:25px;column-gap:4px;box-shadow:0 4px 0 #e7e7d6}.entry-meta{font-size:.5rem;letter-spacing:.08em;grid-column:1;grid-row:1}.entry-card h2{font-size:1.1rem;margin:8px 0 7px;grid-column:1;grid-row:2}.entry-card h2 .zhuyin{font-size:1.1rem}.entry-card img{width:130px;height:125px;max-width:100%;grid-column:2;grid-row:1/4;margin:0;align-self:center}.entry-caption{font-size:.6rem;margin:0;grid-column:1;grid-row:3;max-width:145px}.home-note{font-size:.55rem;max-width:240px;margin:18px 0 0 100px;text-align:left;line-height:1.8}.home-teacher{width:160px;height:170px;margin:-3px 0 -12px -3px}.home-ground-note{display:none}.map-intro{display:block;margin-bottom:13px}.map-intro h2{font-size:1.1rem;margin-bottom:5px}.map-tabs button{font-size:.6rem;padding:7px 2px 12px;min-height:44px}.symbol-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.symbol-button{min-height:88px;aspect-ratio:.91;padding:10px 4px;border-radius:14px}.symbol-grid .zhuyin{font-size:2.1rem}.symbol-grid .pinyin{font-size:.6rem}.map-note{font-size:.6rem;margin-top:22px}.test-content{margin:20px auto 0}.test-content .eyebrow{font-size:.52rem}.test-content h2{font-size:1.65rem;margin-bottom:23px}.play-again{min-height:52px;padding:10px 25px;font-size:.8rem}.audio-status{font-size:.6rem;margin:13px 0 24px}.test-question{font-size:.75rem;margin-bottom:16px}.test-choice{min-height:108px;aspect-ratio:auto}.test-choice .zhuyin{font-size:2.5rem}.test-choices{gap:13px}.test-settings{margin-top:14px}.selection-feedback{font-size:.65rem;line-height:1.8;min-height:2em}.test-actions{gap:20px}.test-disclaimer{font-size:.55rem;line-height:1.8}.test-actions .button{font-size:.7rem}.mode-switch{margin-top:14px}.mode-switch button{font-size:.65rem}.rail-symbol-top{margin-top:6px}.rail-symbol-top>.zhuyin{font-size:2.7rem}.neighbor-symbols{max-width:280px}.neighbor-symbols button{min-height:42px;font-size:1.2rem;border-radius:10px}.rail-progress-label{font-size:.75rem}body[data-view=lesson] .study-rail{margin-bottom:17px}.stage-title{font-size:1.15rem;margin:0 0 17px}.canvas-box{border-radius:20px}.demo-status{font-size:.7rem;margin-top:17px}.trace-tools{gap:4px 15px}.trace-tools button{font-size:.65rem}.shape-guide-toggle{font-size:.65rem}.lesson-actions{gap:7px 14px;margin-top:15px}.lesson-actions .button{font-size:.68rem;padding:10px 15px;flex:1 1 160px}.lesson-actions .text-button{font-size:.65rem}.utility-nav button{font-size:.7rem;padding-inline:8px}.page-title{font-size:1.9rem}.drawing-wrap.review-pending .drawing-tip{font-size:.7rem}.rail-symbol-top button{min-height:44px}.lesson-back{font-size:.65rem;min-height:35px}.test-settings .stroke-toggle{font-size:.68rem}.header-actions .pill{min-height:44px}.language-chip{display:inline-flex;align-items:center;justify-content:center}.home-cards button{min-width:0}}
@media(max-width:359px){.header-actions{gap:1px}.header-inner{width:calc(100% - 24px)}.brand strong{font-size:1.2rem}.brand-egg{width:22px;height:28px}.language-chip{padding-inline:6px}.pill{padding-inline:7px}.entry-card{grid-template-columns:1fr 105px;padding-inline:16px;min-height:150px}.entry-card img{height:108px}.entry-card h2,.entry-card h2 .zhuyin{font-size:1rem}.entry-caption{font-size:.55rem}.entry-meta{font-size:.45rem}.home-content h1{font-size:1.85rem}.symbol-grid{gap:9px}.symbol-button{min-height:80px}.map-tabs button{font-size:.55rem}.test-content h2{font-size:1.5rem}}
@media(prefers-reduced-motion:reduce){.press,.switch-track:after{transition:none}.press:active{transform:none}}@media(prefers-reduced-transparency:reduce){.utility-nav{background:var(--bg);backdrop-filter:none}.entry-card{background:#fff}}@media(prefers-contrast:more){.symbol-button,.entry-card{border-color:#54734d}.audio-status,.pinyin{color:#4b6147}}

@media(max-width:560px){.header-inner{flex-wrap:wrap}.header-actions .info{width:44px;flex:none}.neighbor-symbols button{min-height:44px}}
.language-chip{cursor:pointer;min-height:44px;min-width:52px;color:var(--ink)}.lab-return,.lab-news{color:var(--green);font-size:.7rem;min-height:44px;display:inline-flex;align-items:center;text-decoration:none}.lab-news{border-left:1px solid #d7ddcc;padding-left:14px}.header-actions{flex-wrap:wrap}.language-chip:active{background:#dfead5}.header-inner{padding-inline-start:env(safe-area-inset-left,0px);padding-inline-end:env(safe-area-inset-right,0px)}.rail-companion p{white-space:pre-line}.home-content h1{line-height:1.4}.test-content h2{font-weight:500}.entry-meta{line-height:1.8}.entry-caption{line-height:1.8}.home-teacher{z-index:1}.utility-nav{z-index:15}body{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}@media(max-width:900px){.lab-return,.lab-news{font-size:.65rem}.header-inner{flex-wrap:wrap}.header-actions{gap:8px}.header-actions .lab-return,.header-actions .lab-news{min-height:36px}.home-content{margin-top:22px}}@media(max-width:560px){.brand strong{font-size:1.15rem}.brand small{letter-spacing:0;font-size:.48rem}.header-actions{flex:1;justify-content:flex-end;gap:3px 6px}.lab-return,.lab-news{display:none}.header-inner{min-height:78px}.language-chip{padding-inline:8px;min-width:48px}.pill{font-size:.65rem}.pill .indicator{display:none}.entry-card{grid-template-columns:minmax(0,1fr) 115px}.entry-card h2{font-size:1.05rem;line-height:1.6}.entry-card img{height:115px}.entry-caption{font-size:.65rem}.map-tabs button{font-size:.72rem}.test-content h2{font-size:1.65rem;line-height:1.5}.home-content h1{max-width:none;font-size:1.85rem}.home-note{margin-left:90px}.home-teacher{margin-top:8px}.utility-nav button{font-size:.75rem}.home-description{max-width:none;font-size:.85rem}.audio-status{font-size:.7rem}.test-question{font-size:.85rem}.selection-feedback{font-size:.75rem}.map-note{font-size:.7rem}.stage-title{font-family:inherit;line-height:1.7}.drawing-wrap.review-pending .drawing-tip{font-size:.8rem}.lesson-actions .button{font-size:.75rem}.trace-tools button{font-size:.75rem}.shape-guide-toggle{font-size:.75rem}}

.rail-progress-link{border:0;background:transparent;padding:0;min-height:44px;text-align:left;color:var(--ink);font-weight:600;font-size:inherit}.rail-progress-link:active{color:var(--green)}.pill[aria-pressed=true]{background:var(--mint)}#about>.button{margin:5px 5px 0 0}

/* Teaching motion traces the glyph; practice keeps a dashed path under the user's ink. */
.pronunciation-controls{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;margin:0 0 16px}.pronunciation-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;border:1px solid #9ab49e;background:#fffefa;border-radius:30px;padding:8px 19px;color:var(--green);font-size:.8rem}.pronunciation-button[data-playing=true]{background:var(--mint)}.speaker-icon{font-size:1.15rem;line-height:1}.pronunciation-status{font-size:.6rem;color:var(--muted);line-height:1.7;text-align:center;max-width:100%}.demo-pen{pointer-events:none}.stroke-dashed-guide{opacity:.95}.free-dashed-guide text{font-family:SamEggZhuyin,sans-serif}.test-choice:disabled{opacity:1}.test-choice:disabled:not(.correct){color:var(--muted)}.test-choice.incorrect{border-color:#ac785e;background:#fff7ee;box-shadow:0 4px 0 #ebd9c7}.test-choice.correct{border-color:#087655;background:#e7f1df;box-shadow:0 4px 0 #b9d2ac}.audio-attribution a{color:var(--green);text-underline-offset:3px}.stage-title{min-height:1.4em}.play-again:disabled{opacity:.55!important}
@media(max-width:560px){.pronunciation-controls{margin-bottom:17px}.pronunciation-status{font-size:.62rem}.pronunciation-button{font-size:.8rem;min-height:44px}.stage-title{margin-bottom:12px}.test-content .audio-status{min-height:3.6em}.test-settings{margin-top:12px}}

.guided-writing{background-image:none!important;background-color:#fff!important}.writing-crosshair line{stroke:#c7d2be;stroke-width:2;stroke-dasharray:12 12}.reference-stroke{opacity:.9}.stroke-shape-guide .stroke-dashed-guide{opacity:.4}.stroke-marker circle{fill:#e7eddf;stroke:#fffefa;stroke-width:4}.stroke-marker text{fill:#81917c}.stroke-marker[data-active=true] circle{fill:#087655}.stroke-marker[data-active=true] text{fill:white;font-weight:650}.stroke-marker[data-complete=true] circle{fill:#bdd4b5}.stroke-marker[data-complete=true] text{fill:#25533b}.stroke-progress{display:flex;justify-content:center;gap:12px;margin:18px auto 10px}.stroke-step{display:grid;place-items:center;min-width:37px;min-height:37px;border-radius:50%;background:#e7eddf;color:#839179;font-size:.8rem;font-weight:600;padding:5px}.stroke-step[data-active=true]{background:#087655;color:#fff}.stroke-step[data-complete=true]{background:#bdd4b5;color:#25533b}.stroke-step[data-i18n=Shape]{border-radius:20px;padding-inline:15px}.canvas-box[data-feedback=retry]{border-color:#bc8a6c}.canvas-box[data-feedback=correct],.canvas-box[data-phase=complete]{border-color:#087655}.canvas-box[data-phase=complete]{box-shadow:0 5px 0 #d6e5ca}.drawing-wrap.review-pending .drawing-tip{font-size:.7rem;line-height:1.8;margin:8px auto 0}.guided-writing~.demo-status{min-height:3em}.pronunciation-controls{margin-bottom:15px}.demo-status{font-weight:500}.canvas-box canvas{overscroll-behavior:contain}
@media(max-width:560px){.stroke-progress{margin-top:17px;gap:10px}.stroke-step{min-width:34px;min-height:34px}.demo-status{font-size:.75rem;line-height:1.8}.trace-tools{gap:5px 12px}.trace-tools button{font-size:.72rem}.stage-title{font-size:1.05rem;min-height:3.4em;margin-bottom:8px}.pronunciation-status{font-size:.6rem}.drawing-wrap.review-pending .drawing-tip{font-size:.7rem}.lesson-actions .button{font-size:.75rem}}

.stroke-writer-layer{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}.stroke-writer-layer svg{display:block;pointer-events:none}.guided-writing>canvas{z-index:2}.auto-check-note{font-size:.7rem;color:var(--muted);line-height:1.8;text-align:center}.test-choice[data-playing=true]{box-shadow:0 4px 0 #b9d2ac,inset 0 0 0 2px #7da986}.test-choice[data-playing=true] .zhuyin{color:#087655}.stage-title{font-family:inherit;font-weight:550;letter-spacing:0}.pronunciation-controls{margin-bottom:17px}
@media(prefers-reduced-motion:reduce){.stroke-writer-layer{transition:none}}

/* Dictation keeps the existing cream/emerald practice shell. */
.entry-dictation{grid-column:1/-1;min-height:160px;height:auto;aspect-ratio:auto;display:grid;grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:repeat(3,max-content);text-align:left;align-items:center;align-content:center;gap:6px 20px;padding:20px 28px}
.entry-dictation .entry-meta,.entry-dictation h2,.entry-dictation .entry-caption{grid-column:1;margin:0}
.entry-dictation .entry-meta{grid-row:1}.entry-dictation h2{grid-row:2}.entry-dictation .entry-caption{grid-row:3}
.entry-dictation img{grid-column:2;grid-row:1/4;width:200px;height:145px;max-width:100%;margin:0;object-fit:contain;align-self:center;justify-self:center}
.dictation-content{max-width:560px;margin:20px auto 0;text-align:center}
.dictation-content h2{font-size:1.6rem;font-weight:500;line-height:1.5;margin:0 0 10px}
.dictation-intro,.dictation-note{font-size:.8rem;line-height:1.8;color:#62745d}
.dictation-content .audio-status{min-height:2.8em;margin:10px 0}
.dictation-canvas{position:relative;aspect-ratio:1;max-width:400px;margin:0 auto 18px;overflow:hidden}
.dictation-canvas canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}
.dictation-content .selection-feedback{min-height:3em;margin:12px 0}
.dictation-actions{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;justify-content:center}
.dictation-actions button{min-height:44px;font-size:.8rem}
.dictation-answer{font-family:SamEggZhuyin,system-ui,sans-serif;font-size:1.5rem;color:var(--green);margin:10px 0}
.dictation-note{font-size:.7rem;margin:16px 0}
.dictation-content button:disabled{opacity:.5;cursor:default}
@media(max-width:560px){.entry-dictation{min-height:140px;padding:21px 20px;grid-template-columns:minmax(0,1fr) 115px}.entry-dictation img{width:115px;height:100px}.utility-nav{gap:2px;padding-inline:8px}.utility-nav button{padding-inline:5px;font-size:.68rem}.dictation-content{margin:16px auto}.dictation-content h2{font-size:1.4rem}.dictation-intro{font-size:.8rem}}

/* A full-row card must size to its contents, not inherit the square card ratio. */
body[data-view=learn]{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
@media(orientation:landscape) and (max-height:600px){
 .entry-dictation{min-height:140px;padding:16px 24px;grid-template-columns:minmax(0,1fr) clamp(100px,22vw,160px)}
 .entry-dictation img{width:160px;height:120px;max-width:100%}
}
