:root{font-family:PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif;color:#24372e;background:#f5f2e9;font-synthesis:none;font-weight:400;line-height:1.5;font-size:14px;--paper:#f5f2e9;--ink:#24372e;--mint:#8bc8a8;--apricot:#f3cf73;--border:#c7c9b9}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}button{min-height:40px;padding:8px 14px;border:1.5px solid var(--ink);border-radius:7px;background:#fffdf6;font-weight:650;cursor:pointer;line-height:1.4}button:hover:not(:disabled){background:#e6efdd}button:active:not(:disabled){transform:translateY(1px)}button:disabled{cursor:not-allowed;opacity:.48}button.primary{background:var(--mint);box-shadow:3px 3px 0 var(--ink)}button.primary:hover:not(:disabled){background:#a1d7b9}button.quiet{border-color:transparent;background:transparent;box-shadow:none;font-weight:500;text-decoration:underline;text-underline-offset:3px}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid #286743;outline-offset:3px}input,select,textarea{display:block;width:100%;min-height:42px;border:1.5px solid var(--ink);border-radius:6px;background:#fffdf8;padding:9px 11px;line-height:1.4}textarea{resize:vertical;min-height:78px}input::placeholder,textarea::placeholder{color:#738074}label,.field-label{display:block;font-weight:650;margin:16px 0 7px}h1,h2,h3,p{margin:0}h1{font-size:25px;letter-spacing:-.7px;white-space:nowrap;font-weight:800}h2{font-size:22px;letter-spacing:-.5px}h3{font-size:18px}small{font-size:12px}fieldset{margin:0;padding:0;border:0;min-width:0}legend{font-weight:650}img{display:block;max-width:100%}.workbench{max-width:1880px;margin:auto;padding:0 20px}.app-header{display:flex;align-items:center;gap:20px;padding:19px 0 18px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:34px;height:37px;background:var(--mint);border:1.5px solid var(--ink);border-radius:6px;font-size:22px;font-family:Kaiti SC,KaiTi,serif;font-weight:800}.badge{display:inline-flex;align-items:center;justify-content:center;border-radius:6px;background:#deeadb;padding:4px 10px;white-space:nowrap;font-size:12px;font-weight:650;line-height:1.5}.badge.local{border:1px solid #7cae8d;background:#dcebdc}.badge.warning,.row-state.warning{background:#f9e0a0}.badge.ready{background:#c7e4cf}.version{display:flex;flex-direction:column;font-size:11px;color:#59695d;gap:2px;max-width:210px;overflow-wrap:anywhere}.version strong{font-weight:650}.header-actions{display:flex;gap:9px;flex-wrap:wrap;margin-left:auto}.library-summary{display:flex;align-items:center;gap:18px;flex-wrap:wrap;background:#dce7d8;min-height:52px;border-radius:8px;padding:12px 18px;margin-bottom:16px}.library-summary>strong{font-size:19px;letter-spacing:-.4px}.library-summary>strong>span{font-size:16px;font-weight:500}.summary-item{font-size:13px}.library-summary .badge{margin-left:auto}.validation{margin:-6px 0 16px;padding:10px 14px;border:1px solid #b69b50;border-radius:6px;background:#fff3cf}.validation summary{font-weight:650;cursor:pointer}.validation ul,.message ul,.field-errors ul{max-height:220px;overflow:auto;padding-left:23px;margin:8px 0}.validation p{margin:8px 0}.columns{display:grid;grid-template-columns:minmax(360px,.8fr) minmax(0,1.6fr);gap:12px;align-items:start}.panel{min-width:0;border:2px solid var(--ink);border-radius:12px;padding:20px;background:#fffdf740}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}.library-panel{position:sticky;top:12px;display:flex;flex-direction:column;max-height:calc(100dvh - 24px);min-height:680px;padding:18px 15px}.library-panel label{margin-top:13px}.library-panel .panel-heading{margin-bottom:4px}.segmented{display:flex;border:1.5px solid var(--ink);border-radius:7px;overflow:hidden;margin:18px 0 12px;flex-shrink:0}.segmented button{min-height:39px;border:0;border-radius:0;flex:1;padding:7px 4px;font-size:13px;white-space:nowrap}.segmented button+button{border-left:1px solid var(--ink)}.segmented button[aria-pressed=true]{background:#3d7856;color:#fffdf8}.character-list{list-style:none;padding:0;margin:0;overflow:auto;min-height:120px;flex:1;scrollbar-width:thin;scrollbar-color:#b1baaa transparent}.character-list li+li{border-top:1px solid var(--border)}.character-row{display:flex;align-items:center;gap:11px;width:100%;border:0;border-radius:5px;background:none;text-align:left;padding:7px;min-height:54px;font-weight:400}.character-row.selected{background:#c2e1ca;box-shadow:inset 3px 0 #36794e}.character-row.selected:hover:not(:disabled){background:#b4d9bd}.list-character{font-family:Kaiti SC,STKaiti,KaiTi,serif;font-size:29px;font-weight:650;min-width:31px;text-align:center;line-height:1}.list-pinyin{font-size:14px;overflow-wrap:anywhere}.row-state{font-size:10px;margin-left:auto;white-space:nowrap;border-radius:4px;padding:3px 5px;background:#e7e8dc}.list-footer{padding-top:14px;color:#667366;font-size:12px}.list-empty{padding:25px 4px;text-align:center}.list-empty p{margin:8px 0 15px;color:#657365;font-size:13px}.editor-heading{display:flex;gap:20px;align-items:center;margin-bottom:16px}.selected-character{font-family:Kaiti SC,STKaiti,KaiTi,serif;font-size:66px;line-height:1.1;min-width:72px;text-align:center}.editor-heading p{font-size:12px;color:#5d6c5d;margin-top:7px}.editor-heading+.form{margin:0}.editor-panel form>fieldset>label:first-of-type{margin-top:0}.image-editor{display:grid;grid-template-columns:minmax(150px,1fr) minmax(120px,.9fr);gap:18px;align-items:center}.editor-image{width:100%;aspect-ratio:4/3;object-fit:contain;background:#fff6db;border:1px solid #aab89b;border-radius:9px}.upload-controls p{font-size:12px;color:#59695c;line-height:1.7;margin:12px 0 8px}.image-path{display:block;font-size:10px;overflow-wrap:anywhere;color:#667366}.image-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:14px;color:#6e7a65;text-align:center;background:#eceee2}.image-empty>span{font-size:30px;line-height:1}.image-empty strong{font-size:13px}.image-empty small{font-size:11px}.prompt-details{margin-top:10px;color:#65735f;font-size:12px}.prompt-details summary{cursor:pointer;text-decoration:underline;text-underline-offset:3px}.prompt-details textarea{font-size:12px}.words-heading{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin:24px 0 10px}.words-heading small{font-size:11px;font-weight:400;color:#69725f}.word-editor{border:1px solid #a5ad96;border-radius:8px;padding:8px 12px 12px;margin-bottom:13px;background:#f7f5eb}.word-editor legend{padding:0 5px;font-size:12px}.word-editor label{font-size:12px;margin:5px 0}.word-editor input{min-height:37px;font-size:13px;padding:7px 9px}.word-inputs{display:grid;grid-template-columns:1fr 1fr;gap:12px}.save-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px dashed #abb29e;margin-top:20px;padding-top:18px}.save-bar small{display:block;flex-basis:100%;color:#63715f;font-size:11px}.field-errors{border:1px solid #bd7354;border-radius:6px;padding:12px;background:#fff0df;font-size:12px}.message{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 16px;margin-bottom:14px;border:1px solid;border-radius:7px;font-size:13px}.message p{margin-top:4px}.message.error{background:#fff0e2;border-color:#ae6244}.message.success{background:#e5efdf;border-color:#8da87a}.message.unsaved{justify-content:flex-start;flex-wrap:wrap;gap:6px 16px;background:#fff1cc;border-color:#c4a55b}.message.unsaved span{font-size:12px}.message>button{flex-shrink:0;font-size:12px}.center-state{display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:55vh;text-align:center;gap:14px;padding:40px 20px}.center-state p{color:#65745e;max-width:440px}.loader{width:30px;height:30px;border:3px solid #cbd9bf;border-top-color:#36794e;border-radius:50%;animation:spin 1s linear infinite}.app-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:11px;color:#6b7664;padding:22px 0 24px}.mobile-tabs{display:none}.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}.skip-link{position:fixed;top:-70px;left:15px;padding:12px 18px;z-index:100;background:#fffdf5;color:var(--ink);border:2px solid;transition:top .1s}.skip-link:focus{top:10px}@keyframes spin{to{transform:rotate(360deg)}}@media(min-width:1600px){.columns{grid-template-columns:minmax(440px,.85fr) minmax(0,1.6fr);gap:18px}.panel{padding:24px}.library-panel{padding:20px}}@media(max-width:1190px){.workbench{padding:0 14px}.app-header{gap:12px}.version{margin-left:auto}.header-actions{flex-basis:100%;justify-content:flex-end}.columns{grid-template-columns:minmax(320px,.85fr) minmax(0,1.4fr);gap:9px}.panel{padding:15px}.library-panel{padding:14px 11px}.selected-character{font-size:58px}.badge.local{font-size:11px}.image-editor{gap:12px}.upload-controls p{font-size:11px}}@media(max-width:980px){.columns{grid-template-columns:300px minmax(0,1fr)}.editor-panel{grid-column:2;grid-row:1}.library-panel{grid-column:1;grid-row:1}.library-summary{gap:10px}.library-summary .badge{margin-left:0}.header-actions button{font-size:12px}.panel-heading h2{font-size:20px}}@media(max-width:680px){:root{font-size:14px}.workbench{padding:0 12px}.app-header{padding:17px 0 14px;gap:11px}.brand{gap:8px;flex-wrap:wrap}.brand-mark{width:29px;height:32px;font-size:20px}h1{font-size:21px}.badge.local{font-size:10px;padding:3px 6px}.version{margin:0;max-width:none;flex-direction:row;gap:10px;flex-wrap:wrap;font-size:10px}.header-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin:0}.header-actions .primary{grid-column:1 / -1}.header-actions button{min-height:42px}.library-summary{padding:12px;margin-bottom:12px;gap:8px 14px}.library-summary>strong{font-size:17px}.library-summary .badge,.summary-item{font-size:11px}.mobile-tabs{display:flex;gap:6px;position:sticky;top:0;z-index:5;background:var(--paper);padding:10px 0}.mobile-tabs button{flex:1;padding:9px 5px;font-size:12px}.mobile-tabs button[aria-current=page]{background:var(--mint);box-shadow:2px 2px 0 var(--ink)}.columns{display:block}.panel{display:none;padding:17px;border-radius:10px}.panel.mobile-active{display:block}.library-panel.mobile-active{display:flex;position:static;max-height:none;min-height:0}.character-list{max-height:65dvh}.character-row{min-height:60px}.list-pinyin{font-size:15px}.row-state{font-size:11px}.editor-heading{gap:14px}.editor-heading p{font-size:11px}.editor-panel input,.editor-panel textarea,.library-panel input,.library-panel select{font-size:16px}.word-editor input{font-size:15px}.image-editor{grid-template-columns:1fr;gap:13px}.editor-image{max-height:270px}.upload-controls{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;align-items:center}.upload-controls p{margin:0;font-size:11px}.image-path{grid-column:1 / -1;font-size:10px}.words-heading{font-size:17px;gap:5px 10px}.words-heading small{font-size:10px}.word-inputs{gap:8px}.save-bar{gap:10px}.save-bar .primary{flex:1}.save-bar .quiet{font-size:12px}.message{align-items:flex-start;flex-direction:column;font-size:12px;padding:12px}.message>button{min-height:40px}.message.unsaved{gap:5px}.app-footer{font-size:10px;line-height:1.8}.validation{font-size:12px}.validation ul{max-height:180px}.center-state{min-height:45vh;padding:30px 10px}.center-state h2{font-size:21px}.word-editor{padding:8px 10px 12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}input[aria-invalid=true],textarea[aria-invalid=true]{border-color:#9d3e2e;box-shadow:0 0 0 1px #9d3e2e}.audio-preview{display:flex;align-items:center;flex-wrap:wrap;gap:7px 10px;margin:10px 0;min-width:0}.audio-preview button{font-size:12px;min-height:44px;padding:7px 10px;flex-shrink:0}.audio-preview button[aria-pressed=true]{background:var(--mint)}.audio-preview>span{font-size:11px;color:#59695c;overflow-wrap:anywhere}.audio-preview>span.audio-error{color:#9d3e2e}.audio-generation{margin:14px 0 20px;padding:13px;border:1px solid var(--border);border-radius:8px;background:#e5efdf}.audio-generation p{margin-top:8px;font-size:12px;color:#59695c;line-height:1.7}.message.audio-generating{flex-wrap:wrap;justify-content:flex-start;gap:5px 15px;background:#e5efdf;border-color:#8da87a}.message.audio-generating span{font-size:12px}[hidden]{display:none!important}.auth-page{min-height:100dvh;display:grid;place-items:center;padding:32px 20px}.auth-card{width:100%;max-width:440px;padding:32px;background:#fffdf6;border:1.5px solid var(--ink);border-radius:12px;box-shadow:5px 5px 0 var(--ink)}.auth-card h1{font-size:27px;margin:24px 0 10px;line-height:1.35}.auth-description,.auth-footnote,.auth-preserved{color:#59695c;line-height:1.7}.auth-description{margin:0 0 24px}.auth-card fieldset{padding:0;border:0;margin:0;min-width:0}.auth-card label{display:block;font-weight:650;margin:16px 0 7px}.auth-card input{display:block;width:100%;min-height:46px;padding:10px 12px;border:1.5px solid var(--border);border-radius:7px;background:#fff}.auth-card button[type=submit]{width:100%;margin-top:24px;min-height:46px}.auth-card .message{margin:0 0 16px;overflow-wrap:anywhere}.auth-preserved{font-size:12px;margin:0 0 16px}.auth-footnote{font-size:12px;margin:24px 0 0;padding-top:16px;border-top:1px solid var(--border)}.auth-loading{display:flex;align-items:center;gap:12px;min-height:100px}.auth-recheck{display:block;margin:16px auto 0;font-size:12px}@media(max-width:480px){.auth-page{padding:20px 16px}.auth-card{padding:24px}.auth-card h1{font-size:24px}.header-actions button:last-child{grid-column:1 / -1}}.resource-export{margin:0 0 16px;padding:14px 16px;background:#fffdf6;border:1px solid var(--border);border-radius:8px;overflow-wrap:anywhere}.resource-export p{margin:5px 0 0;font-size:12px;color:#59695c}.resource-export.export-error{border-color:#9d3e2e}.resource-export.export-error>p{color:#9d3e2e}.export-progress{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;margin-top:12px;font-size:12px}.export-progress>div{grid-column:1 / -1;font-variant-numeric:tabular-nums}.export-progress progress{width:100%;height:12px;accent-color:var(--ink)}.export-progress button{min-height:44px}@media(max-width:680px){.resource-export{padding:12px}.header-actions .export-button{grid-column:1 / -1}.export-progress{gap:8px}.resource-export strong{font-size:12px}}.module-tabs{display:flex;gap:8px;margin:16px 0}.module-tabs button[aria-current=page]{background:var(--mint);box-shadow:2px 2px 0 var(--ink)}.textbook-return{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}.textbook-return span{font-size:12px;color:#59695c}.textbooks{margin-bottom:24px;min-width:0}.textbooks-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.textbooks-heading h2{margin:0;font-size:24px}.textbooks-heading p{margin:6px 0 18px;color:#59695c}.textbooks-heading>.badge{flex-shrink:0}.textbook-selectors{display:flex;gap:14px;margin-bottom:16px}.textbook-selectors>div{flex:1;max-width:240px}.textbooks label{display:block;margin-bottom:6px;font-weight:650}.textbooks select{width:100%;min-height:44px;padding:9px 10px;background:#fffdf6;border:1.5px solid var(--border);border-radius:7px}.textbook-source{padding:14px 16px;border:1px solid var(--border);border-radius:8px;background:#fffdf6;margin-bottom:18px;overflow-wrap:anywhere}.textbook-source.incomplete{border-color:#b49a51;background:#fff5d5}.textbook-source p{font-size:12px;margin:6px 0 0;color:#59695c}.textbook-source a{color:var(--ink);text-underline-offset:3px}.textbook-columns{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}.textbook-columns>.panel{min-width:0}.textbook-columns h3{font-size:19px;margin:0}.textbook-lessons>select{margin-bottom:12px}.textbook-lesson-list{list-style:none;margin:0;padding:0;max-height:65vh;overflow-y:auto;overscroll-behavior:contain}.textbook-lesson-list li+li{margin-top:6px}.textbook-lesson-list button{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;width:100%;min-height:48px;border-color:var(--border);font-weight:500}.textbook-lesson-list button[aria-current=true]{background:#e5efdf;border-color:var(--ink)}.textbook-lesson-list small{font-size:11px;color:#59695c;white-space:nowrap}.textbook-lesson-meta,.textbook-legend{color:#59695c;font-size:12px;margin:12px 0 16px}.textbook-gap{padding:14px;background:#fff5d5;border:1px solid #b49a51;border-radius:7px}.textbook-character-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(156px,1fr));gap:10px;list-style:none;margin:0;padding:0}.textbook-character-list li{min-width:0}.textbook-character{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;width:100%;height:100%;min-height:126px;padding:12px 6px;border:1.5px solid var(--ink);border-radius:7px;background:#fffdf6;text-align:center}.textbook-character strong{font-size:34px;font-weight:500;line-height:1.4}.textbook-character span,.textbook-character small{font-size:11px;font-weight:400;line-height:1.5}.textbook-character small{color:#59695c}.textbook-character.not-in-inventory{border-color:var(--border);background:#eeeee5;color:#687368}@media(max-width:980px){.textbook-columns{grid-template-columns:250px minmax(0,1fr)}.textbook-character-list{grid-template-columns:repeat(auto-fill,minmax(156px,1fr))}}@media(max-width:680px){.module-tabs button{flex:1;min-height:44px}.textbooks-heading{display:block}.textbooks-heading>.badge{display:inline-block;margin-bottom:14px}.textbook-selectors{gap:10px}.textbook-selectors>div{max-width:none}.textbook-columns{grid-template-columns:minmax(0,1fr);gap:12px}.textbook-lesson-list{display:none}.textbook-lessons .panel-heading{margin-bottom:12px}.textbook-lessons>select{margin-bottom:0}.textbook-characters .panel-heading{align-items:flex-start;gap:8px}.textbook-characters .panel-heading>.badge{flex-shrink:0}.textbook-character-list{grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px}.textbook-source{padding:12px}.textbook-return{gap:8px}}.textbook-columns>.panel{display:block}.textbook-selectors select,.textbook-lessons select{font-size:16px}.textbook-supplement-words{display:grid;gap:8px;width:100%;margin-top:5px;padding-top:8px;border-top:1px solid var(--border);color:var(--ink);overflow-wrap:anywhere}.textbook-supplement-words>span{display:flex;flex-direction:column;gap:2px}.textbook-supplement-words>span>span{font-size:14px}.textbook-supplement-words small{font-size:11px}.character-row{gap:14px;padding:10px;min-height:96px}.list-thumbnail{width:72px;height:72px;flex:0 0 72px;object-fit:contain;border-radius:6px;background:#fffdf6}.character-row-summary{display:flex;flex-direction:column;gap:10px;flex:1;min-width:0}.character-row-title{display:flex;align-items:center;gap:10px;min-width:0}.list-words{display:flex;flex-wrap:wrap;gap:5px 8px;font-size:13px;overflow-wrap:anywhere}.list-words>span{padding:2px 7px;background:#fffdf7a6;border:1px solid var(--border);border-radius:4px}.list-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px}.textbook-thumbnail{width:100%;max-width:180px;height:auto;aspect-ratio:1;object-fit:contain;border-radius:6px;background:#fffdf6}.thumbnail-error{display:flex;align-items:center;justify-content:center;min-height:72px;font-size:12px;color:#9d3e2e}.textbook-character-state{margin-top:auto}.textbook-character .textbook-supplement-words>span>span{font-size:16px;color:var(--ink)}@media(max-width:680px){.list-thumbnail{width:64px;height:64px;flex-basis:64px}.character-row{min-height:88px;gap:10px}.textbook-character{padding:10px 8px}.textbook-character .textbook-supplement-words>span>span{font-size:15px}}
