:root{--ink:#18342c;--muted:#6f7e78;--green:#187c5b;--green-dark:#105f47;--green-soft:#eaf4ef;--line:#dce6e1;--panel:#fff;--canvas:#eef2f0;--shadow:0 18px 50px rgba(24,52,44,.12);--zoom:.82}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--ink);background:var(--canvas)}button,input,textarea,select{font:inherit}button{cursor:pointer}svg{width:1.2em;height:1.2em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.topbar{height:74px;background:#fff;border-bottom:1px solid #e5ece8;display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:relative;z-index:3}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none}.brand-mark{width:42px;height:42px;border-radius:12px;background:linear-gradient(145deg,#1b8964,#106747);display:grid;place-items:center;color:#fff;box-shadow:0 7px 16px rgba(24,124,91,.22)}.brand-mark svg{width:27px;height:27px}.brand>span:last-child{display:flex;align-items:baseline;gap:10px}.brand b{font-size:21px;letter-spacing:1px}.brand small{font-size:14px;color:#70817a}.top-actions{display:flex;gap:10px}.top-actions button{height:42px;border-radius:10px;padding:0 16px;display:flex;align-items:center;gap:7px;font-weight:600}.quiet-button{background:#fff;border:1px solid var(--line);color:#53665f}.primary-button{background:var(--green);color:#fff;border:1px solid var(--green);box-shadow:0 6px 14px rgba(24,124,91,.18)}.primary-button:hover{background:var(--green-dark)}
.workspace{height:calc(100vh - 74px);min-height:0;display:grid;grid-template-columns:420px minmax(0,1fr);overflow:hidden}.control-panel{min-height:0;background:var(--panel);border-right:1px solid var(--line);padding:26px 20px 48px 28px;overflow-x:hidden;overflow-y:scroll;scrollbar-gutter:stable}.panel-heading{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:24px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2.1px;color:var(--green)}h1{font-size:24px;margin:5px 0 0;letter-spacing:.3px}.status-dot{font-size:12px;color:#668078;padding-bottom:4px;display:flex;align-items:center;gap:6px}.status-dot i{width:7px;height:7px;background:#25aa79;border-radius:50%;box-shadow:0 0 0 4px #dcf3e9}
.form-section{border-top:1px solid #e8eeeb;padding:20px 0}.section-title{display:flex;align-items:center;gap:9px;margin-bottom:15px}.section-title>span,.section-title>div>span{font-family:Georgia,serif;font-style:italic;font-size:12px;color:var(--green);font-weight:700}.section-title h2{font-size:15px;margin:0;letter-spacing:.4px}.title-with-action{justify-content:space-between}.title-with-action>div{display:flex;gap:9px;align-items:center}.text-button{border:0;background:transparent;color:var(--green);font-size:12px;padding:4px}.field-label{display:block;color:#63736d;font-size:12px;margin:0 0 7px}.input{width:100%;border:1px solid #d9e4df;background:#fbfcfc;border-radius:9px;color:#263e36;padding:10px 12px;outline:none;transition:.2s}.input:focus{border-color:#3c9a78;box-shadow:0 0 0 3px rgba(60,154,120,.1);background:#fff}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:13px}.grow-section{padding-bottom:17px}.content-input{height:150px;resize:vertical;line-height:1.7;font-family:Consolas,"Microsoft YaHei",monospace;font-size:13px}.input-meta{font-size:11px;color:#89958f;display:flex;justify-content:space-between;margin-top:7px}.setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.setting-grid .input{padding:9px 10px;font-size:13px}.color-settings{margin-top:14px;border:1px solid #e0e8e4;border-radius:10px;display:flex;justify-content:space-around;padding:11px 4px;background:#fbfcfc}.color-settings label{font-size:11px;color:#667870;display:flex;align-items:center;gap:7px;cursor:pointer}.color-settings label>span{display:flex;align-items:center;gap:5px}.color-settings input{width:24px;height:24px;border:0;padding:0;background:transparent}.color-preview{width:8px;height:8px;border-radius:50%;display:inline-block}.green{background:#63b06a}.red{background:#ef6f72}.gray{background:#b8b8b8}
.preview-area{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.preview-toolbar{height:60px;flex:0 0 60px;background:rgba(255,255,255,.88);border-bottom:1px solid #dfe7e3;display:flex;align-items:center;justify-content:space-between;padding:0 28px}.preview-toolbar>div:first-child{display:flex;align-items:center;gap:12px}.preview-toolbar strong{font-size:14px}.preview-toolbar span{font-size:12px;color:#84918c}.zoom-controls{display:flex;border:1px solid #dbe5e0;border-radius:8px;background:white;overflow:hidden;height:32px;align-items:center}.zoom-controls button{width:33px;height:100%;border:0;background:white;color:#527066;font-size:17px}.zoom-controls button:hover{background:#f1f6f3}.zoom-controls span{width:48px;text-align:center;border-left:1px solid #e5ece9;border-right:1px solid #e5ece9;line-height:30px}.paper-stage{flex:1 1 auto;min-height:0;overflow-x:auto;overflow-y:scroll;scrollbar-gutter:stable;padding:36px 34px 82px 42px;background-color:#edf1ef;background-image:radial-gradient(#d6dfda 1px,transparent 1px);background-size:18px 18px}.control-panel,.paper-stage{scrollbar-width:auto;scrollbar-color:#8eaaa0 #e4ebe7}.control-panel::-webkit-scrollbar,.paper-stage::-webkit-scrollbar{width:12px;height:12px}.control-panel::-webkit-scrollbar-track,.paper-stage::-webkit-scrollbar-track{background:#e8eeeb;border-radius:10px}.control-panel::-webkit-scrollbar-thumb,.paper-stage::-webkit-scrollbar-thumb{background:#91aaa1;border:3px solid #e8eeeb;border-radius:10px}.control-panel::-webkit-scrollbar-thumb:hover,.paper-stage::-webkit-scrollbar-thumb:hover{background:#63877a}.pages{display:flex;flex-direction:column;align-items:center;gap:35px;transform-origin:top center}.paper{width:794px;height:1123px;background:#fff;box-shadow:var(--shadow);padding:68px 57px 48px;position:relative;display:flex;flex-direction:column;color:#111;overflow:hidden}.paper.landscape{width:1123px;height:794px;padding:42px 68px 38px}.paper-header{text-align:center;border-bottom:1px solid #e2e2e2;padding-bottom:13px;margin-bottom:17px}.paper-title{font-family:Georgia,"Times New Roman",serif;font-size:20px;font-weight:600;letter-spacing:.7px}.student-info{display:flex;justify-content:flex-end;gap:25px;font-family:"Microsoft YaHei",sans-serif;font-size:11px;color:#444;margin-top:8px;min-height:16px}.student-info span{min-width:105px;border-bottom:1px solid #999;padding-bottom:2px;text-align:left}.practice-list{flex:1;display:flex;flex-direction:column;justify-content:flex-start}.practice-item{height:81px;position:relative;flex-shrink:0}.guide-lines{height:34px;position:relative;margin-top:0;--guide:#63b06a;--baseline:#ef6f72}.guide-lines i{position:absolute;left:0;right:0;height:1px;background:var(--guide)}.guide-lines i:nth-child(1){top:0}.guide-lines i:nth-child(2){top:11px}.guide-lines i:nth-child(3){top:22px;background:var(--baseline)}.guide-lines i:nth-child(4){top:33px}.word-row{position:absolute;top:-8px;left:0;height:44px;display:flex;align-items:flex-end;gap:24px;white-space:nowrap;max-width:100%;overflow:hidden}.model-word,.trace-word{font-family:"Times New Roman",Georgia,serif;font-style:italic;font-size:var(--word-size,30px);line-height:1;font-weight:400;letter-spacing:.1px}.trace-word{color:var(--trace,#b8b8b8)}.meaning{font-family:SimSun,"Songti SC",serif;font-size:14px;margin-top:6px;color:#202020;line-height:1.35}.paper-footer{text-align:center;font-family:Georgia,serif;font-size:11px;color:#444;margin-top:auto;padding-top:8px}.empty-state{height:100%;display:grid;place-items:center;text-align:center;color:#809088}.empty-state svg{width:46px;height:46px;margin:auto;color:#9bb9ad}.empty-state strong{display:block;font-size:17px;margin-top:12px;color:#557067}.empty-state p{font-size:12px}.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);background:#18342c;color:white;border-radius:9px;padding:11px 18px;font-size:13px;opacity:0;pointer-events:none;transition:.25s;z-index:10;box-shadow:0 8px 24px rgba(0,0,0,.18)}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1050px){.workspace{grid-template-columns:360px 1fr}.control-panel{padding:24px 20px}.paper-stage{padding:28px 20px}}
@media(max-width:760px){.topbar{height:64px;padding:0 12px}.brand-logo{width:142px;max-height:50px}.quiet-button{display:none!important}.primary-button{padding:0 10px!important;font-size:11px}.workspace{height:auto;display:block;overflow:visible}.control-panel{border-right:0;padding:22px 18px}.preview-area{min-height:650px}.preview-toolbar{padding:0 17px;position:sticky;top:0;z-index:2}.paper-stage{height:650px;padding:25px 12px}.paper{transform-origin:top center}.field-row,.setting-grid{gap:9px}.color-settings{flex-wrap:wrap;gap:10px}.panel-heading{align-items:flex-start}}
/* Fonts embedded from the supplied PDF. The complete KaiTi face only fills glyphs
   that are not present in the attachment's exact STKaiti subsets. */
@font-face{font-family:"Attachment HengShui";src:url("assets/fonts/shuyao-hengshui-regular.ttf") format("truetype");font-style:normal;font-weight:400;font-display:block}
@font-face{font-family:"Attachment STKaiti";src:url("assets/fonts/stkaiti-attachment-1.ttf?v=2") format("truetype");font-style:normal;font-weight:400;font-display:block}
@font-face{font-family:"Attachment STKaiti";src:url("assets/fonts/stkaiti-attachment-2.ttf?v=2") format("truetype");font-style:normal;font-weight:400;font-display:block}
@font-face{font-family:"Kaiti Complete";src:url("assets/fonts/kaiti-fallback.ttf") format("truetype");font-style:normal;font-weight:400;font-display:block}
.model-word,.trace-word{font-family:"Attachment HengShui","YunZhiXue-HengShui",serif;font-style:normal;font-size:var(--word-size,28px);font-weight:400;letter-spacing:0}
.meaning{font-family:"Attachment STKaiti","STKaiti","华文楷体","Kaiti Complete","KaiTi",serif;font-size:18.667px;line-height:1.2}
.font-match-note{margin:11px 0 0;color:#668078;font-size:11px;display:flex;align-items:center;gap:7px}
.font-match-note span{font-family:"Attachment HengShui",serif;font-size:16px;color:var(--green)}
.brand-logo{display:block;width:190px;height:auto;max-height:58px;object-fit:contain;object-position:left center}
/* The red third guide is the handwriting baseline. Position the text line from
   the font's native vertical metrics so every size shares that exact baseline. */
.word-row{top:calc(22px - (var(--word-size,28px) * .8034));height:calc(var(--word-size,28px) * 1.1406);align-items:baseline;overflow:visible}
.model-word,.trace-word{display:inline-block;line-height:1}
@page{size:A4 portrait;margin:0}@page landscapePage{size:A4 landscape;margin:0}
@media print{body{background:white}.topbar,.control-panel,.preview-toolbar,.toast{display:none!important}.workspace,.preview-area,.paper-stage{display:block;height:auto;overflow:visible;background:white;padding:0}.pages{gap:0;transform:none!important}.paper{width:210mm;height:297mm;padding:18mm 15mm 13mm;box-shadow:none;break-after:page;page-break-after:always}.paper.landscape{page:landscapePage;width:297mm;height:210mm;padding:11mm 18mm 10mm}.paper:last-child{break-after:auto;page-break-after:auto}}
