
:root{font:16px/1.5 system-ui,-apple-system,'Segoe UI',sans-serif;color:#153434;background:#f5f8f6}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}header{background:#143735;color:white;padding:18px max(24px,calc((100vw - 1180px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{font-size:1.15rem;font-weight:750;letter-spacing:-.03em}.brand span{color:#b9e9cf}header small{color:#bdd4d1}main{max-width:1180px;margin:0 auto;padding:34px 24px 70px}.top{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:28px}h1{font-size:clamp(2rem,4vw,3rem);letter-spacing:-.055em;line-height:1.1;margin:0 0 8px}p{margin:0;color:#57706c}.layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:22px}.panel{border:1px solid #dbe7e1;background:white;border-radius:20px;box-shadow:0 8px 35px #15343409;padding:24px}.eyebrow{color:#5c7871;font-size:.88rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.levels{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0 22px}.level{border:1px solid #cbdcd4;background:white;color:#264841;padding:9px 15px;border-radius:999px}.level.active{background:#174b40;border-color:#174b40;color:white}.card{min-height:270px;border-radius:17px;background:#eaf5ee;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;margin:15px 0}.hanzi{font-size:clamp(3.8rem,9vw,6.3rem);line-height:1.2;font-family:'PingFang SC','Microsoft YaHei',sans-serif;color:#123e34}.answer{min-height:58px;margin-top:10px}.answer strong{font-size:1.25rem}.muted{color:#6c827b}.actions{display:flex;gap:10px;flex-wrap:wrap}.primary,.grade{border:0;border-radius:12px;padding:12px 18px;font-weight:700}.primary{background:#174b40;color:white}.grade{background:#e6f0ec;color:#174b40}.grade.good{background:#c8edd5}.grade.again{background:#f8e9e2;color:#8a4936}button:disabled{opacity:.5;cursor:not-allowed}.row{display:flex;justify-content:space-between;gap:10px;align-items:center}.stat{font-size:2.2rem;font-weight:760;letter-spacing:-.05em;margin:2px 0}.divider{border:0;border-top:1px solid #e4ece8;margin:20px 0}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(62px,1fr));gap:8px;margin-top:18px}.tile{border:1px solid #d9e5de;border-radius:10px;min-height:66px;background:white;color:#173e35;font-size:1.42rem}.tile:hover,.tile:focus-visible{outline:2px solid #26775d}.tile small{display:block;font-size:.68rem;color:#627a70}.legend{display:flex;align-items:center;gap:8px;color:#648078;font-size:.83rem;margin-top:16px}.swatches{display:flex}.swatches i{height:16px;width:21px;border:1px solid #d3e1d8}nav{display:flex;gap:8px}nav button{border:0;background:transparent;color:#52736a;padding:7px 9px;border-bottom:2px solid transparent}nav button.on{color:#174b40;border-color:#174b40;font-weight:700}.browse{display:none}.browse.open{display:block}.study.hide{display:none}.search{border:1px solid #d6e3dc;border-radius:10px;padding:10px 12px;width:100%;margin:12px 0}.footer{font-size:.85rem;color:#678079;margin-top:22px}.footer a{color:#176b53}.backup{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.backup button,.backup label{border:1px solid #ceded5;border-radius:9px;padding:8px 11px;background:white;color:#31594d;cursor:pointer;font-size:.85rem}.backup input{display:none}.empty{padding:35px;text-align:center;color:#637d73}.note{font-size:.82rem;color:#688178;margin-top:12px}@media(max-width:760px){header{padding:16px 20px}main{padding:26px 16px}.layout{grid-template-columns:1fr}.top{display:block}.panel{padding:18px}.card{min-height:235px}}
 .layout.hidden{display:none}.vocab-page{display:none}.vocab-page.open{display:block}.preset-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.preset{border:1px solid #d8e6df;border-radius:20px;background:#fff;padding:26px;text-align:left;color:#153b34;min-height:190px;box-shadow:0 8px 35px #15343409}.preset:hover,.preset:focus-visible{border-color:#32966b;outline:2px solid #aedbc1}.preset strong{display:block;font-size:2rem;letter-spacing:-.05em;margin:10px 0}.preset .count{display:block;color:#58756a}.vocab-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.vocab-head h2{font-size:2rem;margin:0;letter-spacing:-.04em}.back{border:0;background:transparent;color:#176b53;font-weight:700;padding:9px 0}.vocab-page .grid{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}.vocab-page .tile{min-height:82px}.vocab-page .tile small{font-size:.78rem}.vocab-page .search{max-width:460px;margin:4px 0 14px}.vocab-page .panel{min-height:360px}@media(max-width:650px){.preset-grid{grid-template-columns:1fr}.vocab-head h2{font-size:1.55rem}.vocab-page .grid{grid-template-columns:repeat(auto-fill,minmax(76px,1fr))}}

.page{max-width:1180px;margin:0 auto;padding:34px 24px 70px}.page-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:28px}.nav-tabs{display:flex;gap:8px}.nav-tabs a{text-decoration:none;color:#52736a;padding:7px 9px;border-bottom:2px solid transparent}.nav-tabs a.on{color:#174b40;border-color:#174b40;font-weight:700}.home-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:22px}.preset-choice{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:11px;margin:18px 0}.choice{border:1px solid #d6e4dc;border-radius:14px;background:white;padding:17px;text-align:left;color:#21483b}.choice.active{border:2px solid #237c5b;background:#eef8f1;padding:16px}.choice strong,.choice span{display:block}.choice span{color:#638075;font-size:.88rem;margin-top:5px}.home-actions{display:flex;gap:10px;flex-wrap:wrap}.secondary{border:1px solid #c9ddd2;border-radius:12px;background:white;color:#1d5b48;padding:12px 18px;font-weight:700}.form-grid{display:grid;gap:14px;margin-top:17px}.form-grid input[type=text],select{width:100%;border:1px solid #cfdfd6;border-radius:10px;padding:10px 12px;background:white;color:#153434}.form-grid label{font-weight:650}.checks{display:flex;gap:20px;flex-wrap:wrap}.checks label{font-weight:500}.panel h2{margin:0;font-size:1.5rem;letter-spacing:-.035em}.test-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.back-link{border:0;background:none;color:#176b53;font-weight:700;padding:7px 0}.switch-line{display:flex;align-items:center;gap:9px;color:#345c4e;font-size:.92rem;cursor:pointer}.switch-line input{width:18px;height:18px;accent-color:#1c7555}.stroke-row{display:flex;justify-content:center;gap:3px;flex-wrap:wrap}.stroke-row>div{width:96px;height:96px}.stroke-message{font-size:.82rem;color:#6b8076;min-height:20px}.replay{border:0;background:transparent;color:#176b53;font-weight:700}.test-panel{max-width:760px;margin:auto}.summary{text-align:center;padding:45px 20px}.summary strong{font-size:3rem;display:block}.ten-step{display:flex}.ten-step i{width:22px;height:17px;border:1px solid #d1e0d5}.vocab-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin:14px 0}.vocab-toolbar label{font-size:.9rem;color:#46695c}.vocab-toolbar select{width:auto;margin-left:8px}.vocab-card{border:1px solid #d8e6df;border-radius:20px;background:#fff;padding:26px;text-align:left;color:#153b34;min-height:190px;box-shadow:0 8px 35px #15343409}.vocab-card strong{display:block;font-size:2rem;letter-spacing:-.05em;margin:10px 0}.vocab-card .count{display:block;color:#58756a}.vocab-card:hover,.vocab-card:focus-visible{outline:2px solid #aedbc1}.vocab-detail .grid{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}.vocab-detail .tile{min-height:82px}.vocab-detail .tile small{font-size:.78rem}.level-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hidden{display:none!important}.subtle{font-size:.88rem;color:#638075}.word-preview{border:1px solid #dce9e1;background:#f6faf7;border-radius:14px;padding:15px;margin-top:15px}.word-preview strong{font-size:1.7rem}.word-preview small{display:block;color:#678076}.error{color:#a14b38}@media(max-width:760px){.page{padding:26px 16px}.home-grid{grid-template-columns:1fr}.page-head{display:block}.nav-tabs{margin-top:20px}.level-grid{grid-template-columns:1fr}.vocab-toolbar select{margin-left:0}.card{min-height:260px}}
/* Both modes occupy the same glyph box, including while stroke data loads. */
#testCard .hanzi{font-size:var(--glyph-size,96px);line-height:var(--glyph-size,96px);height:var(--glyph-size,96px);min-height:var(--glyph-size,96px);display:flex;align-items:center;justify-content:center;white-space:nowrap}
#testCard .stroke-row{height:var(--glyph-size,96px);min-height:var(--glyph-size,96px);gap:0;align-items:center}
#testCard .stroke-row>div{width:var(--glyph-size,96px);height:var(--glyph-size,96px)}
#testCard .hanzi{font-size:min(72px,var(--glyph-size,96px))}
.word-dialog{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:48px 28px 32px;border:1px solid #dbe7e1;border-radius:20px;background:#f6faf7;color:#153434;text-align:center;box-shadow:0 24px 80px #15343440;overflow:auto}
.word-dialog::backdrop{background:rgb(10 35 30 / .55)}
.word-dialog-close{position:absolute;top:10px;right:10px;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:#31594d;font-size:1.7rem;line-height:1}
.word-dialog-close:hover{background:#e6f0ec}
.word-dialog-close:focus-visible{outline:2px solid #26775d;outline-offset:2px}
.word-dialog #wordTitle{font-size:clamp(2.5rem,9vw,4rem);line-height:1.3;margin:0 0 12px;overflow-wrap:anywhere}
.word-pinyin{font-size:1.25rem;color:#52736a;margin-bottom:18px}
.word-meaning{font-size:1.05rem;color:#21483b;overflow-wrap:anywhere}
body:has(.word-dialog[open]){overflow:hidden}
.popup-strokes{display:flex;justify-content:center;flex-wrap:wrap;margin-bottom:12px}
.popup-strokes>div{flex:none}
.word-dialog .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#popupStrokeStatus:empty{display:none}
#test .actions{justify-content:center;gap:14px}
#test .actions button{flex:0 1 240px;min-height:52px;padding:14px 24px}
#test .grade.good{background:#d8efdf;color:#245c3a}
#test .grade.again{background:#f7dede;color:#843b3b}
#test .grade.good:hover{background:#c7e6d1}
#test .grade.again:hover{background:#f0cccc}
button,.vocab-card,a.choice,.backup label{-webkit-user-select:none;user-select:none}
.vocab-card{text-decoration:none;display:block}
.vocab-metrics{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:.75rem;color:#57706c}
.vocab-metrics b{font-size:.85rem;color:#21483b}
.level-progress{display:block;border-top:1px solid #dce8e0;margin-top:18px;padding-top:14px}
.progress-heading{display:flex;justify-content:space-between;font-size:.85rem;color:#31594d}
.level-progress progress{display:block;width:100%;height:8px;margin:8px 0;appearance:none;border:0;border-radius:99px;background:#e6eee8;overflow:hidden}
.level-progress progress::-webkit-progress-bar{background:#e6eee8;border-radius:99px}
.level-progress progress::-webkit-progress-value{background:#68ad82;border-radius:99px}
.level-progress progress::-moz-progress-bar{background:#68ad82;border-radius:99px}
.progress-detail{display:block;font-size:.75rem;color:#57706c}
.vocab-head .back-link{display:inline-block;text-decoration:none}
#test .actions button:focus-visible{outline:3px solid #153434;outline-offset:3px}
.home-actions{justify-content:center}
.home-actions button{flex:0 1 240px;min-height:52px}
.preset-choice{grid-template-columns:minmax(0,1fr)}
.home-grid>aside{align-self:start;position:sticky;top:20px;max-height:calc(100dvh - 40px);overflow-y:auto}
.test-size{display:grid;gap:6px;margin-top:20px}
.test-size>span{font-weight:650;font-size:.9rem}
.count-chips{display:flex;flex-wrap:wrap;gap:8px}
.count-chip{min-width:44px;min-height:44px;border:1px solid #cfdfd6;border-radius:999px;padding:8px 12px;background:white;color:#31594d;font-size:.88rem}
.count-chip:hover{background:#eef8f1}
.count-chip[aria-pressed=true]{background:#d8efdf;border-color:#237c5b;color:#174b40;font-weight:700}
.count-chip:focus-visible{outline:2px solid #26775d;outline-offset:3px}
.stats-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #dbe7e1;border-radius:20px;padding:28px;background:#fff;color:#153434;box-shadow:0 24px 80px #15343440}
.stats-dialog::backdrop{background:rgb(10 35 30 / .55)}
.stats-dialog h2{margin:0 0 6px;font-size:1.6rem;letter-spacing:-.035em}
.stats-list{display:grid;gap:10px;margin:22px 0}
.stats-list>div{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px;border-radius:10px;background:#f5f8f6}
.stats-list dt{font-size:.9rem}
.stats-list dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;text-align:right}
.stats-list .stats-correct{background:#e5f3e9;color:#245c3a}
.stats-list .stats-incorrect{background:#fbecec;color:#843b3b}
.stats-dialog form{display:flex;justify-content:center;margin-top:22px}
.stats-dialog form button{min-width:160px}
body:has(.stats-dialog[open]){overflow:hidden}
@media(max-width:760px){.home-grid>aside{position:static;max-height:none;overflow:visible}}
.sidebar-start{margin-top:20px}
.sidebar-stroke{margin-top:20px}
.sidebar-start #startTest{flex:1;width:100%}
.preset-choice{gap:14px}
.preset-count-note{margin-bottom:20px}
#home>section.panel>.eyebrow+h2{margin-top:12px}
.page-head .back-link+h1{margin-top:16px}
.legend-note{margin-top:12px}
.site-footer{border-top:1px solid #dbe7e1;background:#edf3ef;padding:24px}
.site-footer-inner{max-width:1132px;margin:0 auto;display:grid;gap:8px}
.site-footer p{font-size:.8rem;line-height:1.7;color:#57706c}
.site-footer .footer-credit{font-size:.9rem;color:#21483b}
.site-footer a{color:#176b53;text-underline-offset:3px}
.site-footer a:hover{color:#123e34}
.choice{width:100%;padding:22px 24px}
a.choice{display:block;text-decoration:none}
.choice.active{padding:21px 23px}
.choice .choice-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0}
.choice-heading strong{font-size:1.5rem;letter-spacing:-.035em;overflow-wrap:anywhere}
.choice .choice-status{margin:0;font-size:.78rem;font-weight:650;white-space:nowrap;color:#52736a}
.choice.active .choice-status{color:#176b53}
.choice .choice-detail{margin-top:4px;color:#57706c}
.choice .choice-metrics{display:flex;gap:6px 20px;flex-wrap:wrap;margin-top:10px}
.choice-metrics>span{display:inline-flex;align-items:baseline;gap:5px;margin:0}
.choice-metrics b{font-size:.85rem;color:#21483b;font-variant-numeric:tabular-nums}
.choice-metrics small{font-size:.75rem;margin:0}
.choice:focus-visible{outline:3px solid #26775d;outline-offset:3px}
@media(max-width:480px){.choice{padding:18px}.choice.active{padding:17px}.choice .choice-metrics{gap:6px 14px}.choice .choice-status{font-size:.7rem}}
