@font-face{font-family:WorkbookKai;src:url('/assets/zhongwen-ink/zhongwen-kai-v2.woff2') format('woff2');font-display:swap}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden}body{height:100dvh;display:flex;flex-direction:column;background:#f8faf9;color:#173752;font-family:system-ui,sans-serif}button,a{font:inherit;touch-action:manipulation}button{cursor:pointer}button,a{min-height:44px;padding:8px 12px;border:1px solid #cfdde7;border-radius:8px;background:white;color:#173752;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}button[aria-pressed=true]{background:#e4eff9;border-color:#80a9ca}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #bd8e3f;outline-offset:2px}[hidden]{display:none!important}header,footer,.workbook-tabs,#groups,.sheet-tools{display:flex;align-items:center;gap:8px;overflow-x:auto;flex-shrink:0;white-space:nowrap;padding:7px 14px;background:#fff;scrollbar-width:thin}header{border-bottom:1px solid #dce6eb}header strong{font-size:18px;flex-shrink:0}#lessons{display:flex;gap:6px;overflow:auto;min-width:0;flex:1}#lessons a{min-width:42px;padding:7px}.langs{display:flex;gap:2px}.langs button{padding:6px;min-width:34px;font-size:12px}.workbook-tabs{border-bottom:1px solid #e3eaee}#source-range{font-size:13px;color:#667e89;margin-left:auto}#source-link{font-size:13px}#groups{justify-content:center;padding:4px 12px}#groups button{padding:7px 18px}#workbook-main{flex:1;min-height:0;overflow:hidden;display:flex;justify-content:center;padding:12px 20px}#task{width:min(100%,1120px);min-height:0;overflow:auto;display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:18px;background:#fff;padding:20px;border:1px solid #dce5e9;border-radius:12px}#task:focus{outline:none}.prompt{font:600 24px/1.5 system-ui;text-align:center;margin:0}.task-help{font-size:15px;color:#667c88;text-align:center;margin:0}.big-character{font:400 100px/1.35 WorkbookKai,serif}.answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:min(100%,780px)}.answers button{font:400 36px/1.4 WorkbookKai,serif;min-height:64px}.answers button.correct,.match-item.correct{background:#e8f5e9;border-color:#4d9462}.answers button.wrong{background:#fff0eb;border-color:#c56a58}.writer{width:min(38vh,300px);aspect-ratio:1;border:1px solid #b6c7cf;background:linear-gradient(90deg,transparent calc(50% - .5px),#d8e3e8 50%,transparent calc(50% + .5px)),linear-gradient(transparent calc(50% - .5px),#d8e3e8 50%,transparent calc(50% + .5px));position:relative;touch-action:none}.writer>div,.writer>svg{width:100%;height:100%}.stroke-canvas{width:min(45vh,340px);aspect-ratio:1;border:1px solid #cfdae0;max-width:100%}.stroke-canvas path{fill:#d9e1e6;cursor:pointer;stroke:#fff;stroke-width:3}.stroke-canvas path:hover{fill:#8ab7d8}.stroke-canvas path.selected{fill:#2463ad}.token-row,.selected-tokens{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;width:100%}.token-row button,.selected-tokens button{font:400 32px/1.5 WorkbookKai,serif}.selected-tokens{min-height:70px;border-bottom:2px solid #c2d5e0;padding:10px}.match{display:grid;grid-template-columns:1fr 1fr;gap:25px;width:min(100%,800px)}.match-column{display:grid;gap:10px}.match-item{width:100%;font:400 30px/1.4 WorkbookKai,serif;min-height:80px}.match-item img{height:80px;max-width:170px;object-fit:contain}.match-item.selected{border:2px solid #2463ad;background:#eff6fc}.count-pictures{display:flex;flex-wrap:wrap;gap:3px;justify-content:center}.count-pictures img{height:65px;width:60px;object-fit:contain}.clock{width:min(34vh,260px);max-width:100%}.read-passage{font:400 38px/1.8 WorkbookKai,serif;white-space:pre-line;text-align:center;margin:0}.done-card{font-size:28px;text-align:center}#feedback{margin:0;min-height:32px;text-align:center;font-size:16px;padding:4px;color:#276c46;flex-shrink:0}footer{border-top:1px solid #dce6eb;justify-content:center}footer #progress{min-width:85px;text-align:center}#sheet{display:flex;flex-direction:column;width:min(100%,1100px);min-height:0}.sheet-tools{padding:5px 0}.sheet-scroll{overflow:auto;flex:1;min-height:0;background:#e9eef1}.sheet-tools button{font-size:14px}#paper{position:relative;width:min(100%,900px);margin:0 auto;background:white}#paper-image{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none}#ink,#paper-fields{position:absolute;inset:0;width:100%;height:100%}#ink{touch-action:none}#paper-fields{pointer-events:none}.paper-field{position:absolute;pointer-events:auto;min-width:35px;width:110px;max-width:55%;background:#fffdf4e8;border:1px dashed #a78b4c;color:#173752;font:400 22px/1.3 WorkbookKai,serif;padding:2px 4px;border-radius:3px}#sheet-hint{margin:4px 0;font-size:13px;color:#5c7380;text-align:center}.complete-page{background:#e4f3e7!important}#paper .ink-line{fill:none;stroke:#2463ad;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.original-mode #workbook-main{padding-top:4px}.original-mode #groups{display:none}
@media(max-width:650px){header,footer,.workbook-tabs{padding:6px 8px;gap:5px}header strong{font-size:15px}header #lessons{flex:0 1 70px}.langs button{min-width:29px;padding:5px}#back{font-size:12px;padding:6px}#source-range{display:none}.workbook-tabs button,.workbook-tabs a{font-size:12px;padding:7px}#groups button{font-size:14px;padding:7px 12px}#workbook-main{padding:8px}#task{padding:14px 10px;gap:12px}.prompt{font-size:21px}.answers button{font-size:31px;min-height:58px}.task-help{font-size:13px}.big-character{font-size:78px}.match{gap:12px}.match-item{font-size:27px;min-height:70px}.match-item img{height:60px;max-width:100%}.read-passage{font-size:32px}.token-row button,.selected-tokens button{font-size:28px}footer button{font-size:13px;padding:7px}footer #progress{min-width:52px;font-size:13px}.writer{width:min(40vh,250px)}.sheet-tools{gap:4px}.sheet-tools button{font-size:12px;padding:6px}.paper-field{font-size:18px;width:90px}}
