@font-face{font-family:Mali;src:url(/assets/mali-regular-BEaBlhbL.ttf) format("truetype");font-weight:400;font-display:swap}@font-face{font-family:Mali;src:url(/assets/mali-semibold-BB91aIpb.ttf) format("truetype");font-weight:600;font-display:swap}@font-face{font-family:Mali;src:url(/assets/mali-bold-C_53kbs5.ttf) format("truetype");font-weight:700;font-display:swap}@font-face{font-family:"UNI Tap Viet 5";src:url(/assets/uni-tap-viet-5-B4-s028K.ttf) format("truetype");font-weight:400;font-style:normal;font-display:swap}:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#183c38;background:#eaf6f4;font-synthesis:none;--ink: #183c38;--teal: #176b63;--teal-dark: #0d554e;--mint: #d8efeb;--paper: #fffdf8;--coral: #df776f;--gold: #e4a545;--line: #c8dedb}*{box-sizing:border-box}html{min-width:320px;scroll-behavior:smooth}body{margin:0;min-width:320px;min-height:100vh;background:#eaf6f4}button,input,textarea{font:inherit}button{color:inherit}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid rgba(228,165,69,.42);outline-offset:2px}.app-shell{min-height:100vh}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 34px;background:#ffffffdb;border-bottom:1px solid #d4e7e4;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none}.brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:12px 12px 12px 4px;color:#fff;background:var(--teal);box-shadow:0 6px 16px #176b632e}.brand>span:last-child{display:flex;flex-direction:column;line-height:1.05}.brand strong{font-family:Mali,Chalkboard SE,cursive;font-size:20px;letter-spacing:-.4px}.brand small{color:#66827e;font-size:11px;margin-top:5px}.top-actions{display:flex;align-items:center;gap:10px}.history-actions{display:flex;gap:4px;border-right:1px solid #d8e5e3;padding-right:9px;margin-right:2px}.icon-button,.secondary-button,.print-button,.download-button{border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700}.icon-button{width:36px;height:36px;background:transparent;border-radius:9px}.icon-button:hover:not(:disabled){background:#e7f3f1}.icon-button:disabled{opacity:.28;cursor:not-allowed}.secondary-button{height:40px;padding:0 14px;border-radius:10px;background:#fff;border:1px solid #cddfdd}.print-button{height:42px;padding:0 18px;border-radius:10px;background:var(--teal);color:#fff;box-shadow:0 5px 14px #176b6333}.print-button:hover{background:var(--teal-dark)}.workspace{display:grid;grid-template-columns:minmax(310px,380px) minmax(640px,1fr);min-height:calc(100vh - 76px)}.control-panel{padding:34px 30px 40px;background:#ffffffa8;border-right:1px solid #cfe3e0}.intro{display:grid;grid-template-columns:auto 1fr;gap:13px;margin-bottom:27px}.intro-icon{width:36px;height:36px;display:grid;place-items:center;background:#fff4dc;color:#ba7921;border-radius:50%}.intro h1{font-family:Mali,Chalkboard SE,cursive;font-size:22px;line-height:1.3;margin:0 0 6px;letter-spacing:-.5px}.intro p{margin:0;color:#657f7b;font-size:13px;line-height:1.55;max-width:30ch}.text-field{display:flex;flex-direction:column;gap:8px}.text-field>span,.field-label,.range-row label>span{font-size:13px;font-weight:750;color:#345b56;display:flex;justify-content:space-between;align-items:center}.text-field em{font-style:normal;color:#849c98;font-size:11px;font-weight:600}.text-field textarea,.text-field input{width:100%;border:1px solid #c9ddda;border-radius:11px;background:#ffffffe6;color:var(--ink);padding:12px 13px;resize:vertical}.text-field textarea{min-height:112px;line-height:1.5;font-family:Mali,Chalkboard SE,cursive;font-size:16px}.text-field textarea:hover,.text-field input:hover{border-color:#91b9b4}.text-field textarea:focus,.text-field input:focus{border-color:var(--teal)}.text-field small{color:#7b918e;font-size:11px}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.two-fields input{min-width:0;font-size:12px}.divider{height:1px;background:#d8e8e5;margin:25px 0 22px}.field-group+.field-group{margin-top:19px}.field-label{margin-bottom:9px}.segmented{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;border-radius:10px;padding:3px;background:#e1efed}.segmented button{min-height:34px;padding:5px 7px;border:0;border-radius:8px;background:transparent;cursor:pointer;color:#66807c;font-size:12px;font-weight:700;white-space:nowrap}.segmented button.active{background:#fff;color:var(--teal-dark);box-shadow:0 2px 7px #2d5c561f}.range-row{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:22px}.range-row label{min-width:0}.range-row output{color:var(--teal);font-size:11px;background:#d9eeeb;padding:2px 7px;border-radius:20px}input[type=range]{width:100%;accent-color:var(--teal);margin-top:12px}.download-button{width:100%;height:44px;border-radius:10px;background:#fff;border:1px solid #a9c9c5;margin-top:25px;color:var(--teal-dark)}.download-button:hover{background:#edf7f5;border-color:#79a9a3}.download-note{display:flex;justify-content:center;align-items:center;gap:6px;font-size:11px;color:#7c918e;margin:9px 0 0}.preview-panel{padding:24px clamp(24px,5vw,78px) 52px;min-width:0;overflow:auto;position:relative}.preview-panel:before{content:"";position:fixed;width:250px;height:250px;right:2vw;top:120px;background:radial-gradient(circle,#ffffffad,#fff0 70%);pointer-events:none}.preview-head{max-width:794px;margin:0 auto 13px;display:flex;justify-content:space-between;color:#66827e;font-size:12px;font-weight:650}.preview-head div{display:flex;align-items:center;gap:8px}.draw-tools{justify-content:flex-end}.draw-tools button{min-height:34px;border:1px solid #bdd6d2;border-radius:8px;background:#ffffffc7;color:#315f5a;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:5px 9px;cursor:pointer;font-size:11px;font-weight:700}.draw-tools button.active{background:var(--teal);border-color:var(--teal);color:#fff}.status-dot{width:7px;height:7px;border-radius:50%;background:#4bb69d;box-shadow:0 0 0 4px #4bb69d24}.paper-stage{min-width:610px;display:grid;place-items:start center;perspective:1000px}.paper{--cell: 9.45px;width:min(100%,210mm);aspect-ratio:210 / 297;container-type:inline-size;background:var(--paper);border:1px solid rgba(61,104,98,.13);box-shadow:0 22px 54px #335d572b,0 3px 10px #335d5714;padding:36px 42px 27px;display:flex;flex-direction:column;position:relative;overflow:hidden}@supports (width: 1cqw){.paper{--cell: 1.190476cqw}}.paper:after{content:"";position:absolute;top:13px;right:13px;bottom:13px;left:13px;border:1.5px solid rgba(23,107,99,.74);border-radius:7px;pointer-events:none}.paper-head{min-height:100px;display:flex;align-items:flex-start;justify-content:space-between;gap:22px;position:relative;z-index:1}.paper-title{display:flex;align-items:center;gap:12px}.mini-flower{width:34px;height:34px;display:grid;place-items:center;color:var(--coral);font-size:29px;line-height:1}.paper-title p{margin:0 0 4px;color:var(--teal);font-size:11px;font-weight:800;letter-spacing:.03em}.paper-title h2{margin:0;font-family:Mali,Chalkboard SE,cursive;font-size:clamp(20px,2.5vw,29px);max-width:420px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.student-fields{display:flex;flex-direction:column;gap:13px;padding-top:6px;color:#617874;font-size:10px;white-space:nowrap}.student-fields b{min-width:112px;display:inline-block;padding:0 3px 3px;border-bottom:1px dotted #75928e;color:#315c57;font-family:Mali,Chalkboard SE,cursive;font-size:11px}.practice-area{flex:1;display:grid;grid-template-rows:repeat(var(--rows, 1),calc(8 * var(--cell)));align-content:start;min-height:0}.worksheet-row{min-height:0;position:relative;overflow:hidden}.trace-line{position:absolute;z-index:1;top:0;right:0;bottom:0;left:0;width:100%;height:100%;overflow:visible}.row-number{position:absolute;z-index:2;right:5px;top:5px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#fffdf8d1;color:#9aafac;font-size:8px}.drawing-canvas{position:absolute;z-index:5;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.drawing-canvas.enabled{pointer-events:auto;cursor:crosshair;touch-action:none}.paper-foot{min-height:52px;display:flex;align-items:end;justify-content:space-between;gap:20px;color:#6d8581;font-size:10px;padding:12px 4px 0}.stars{color:var(--gold);font-size:19px;letter-spacing:3px}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%);z-index:50;background:#173f3a;color:#fff;padding:11px 17px;border-radius:10px;box-shadow:0 10px 30px #10383338;font-size:13px;font-weight:650}@media (max-width: 980px){.workspace{grid-template-columns:1fr}.control-panel{border-right:0;border-bottom:1px solid #cfe3e0;padding:28px max(22px,calc((100vw - 680px)/2))}.preview-panel{padding-inline:20px}.paper-stage{min-width:0}.paper{width:min(100%,210mm)}}@media (max-width: 620px){.topbar{height:66px;padding:0 16px}.brand small,.history-actions,.secondary-button{display:none}.print-button{padding:0 13px}.workspace{min-height:calc(100vh - 66px)}.control-panel{padding:24px 17px 30px}.two-fields{grid-template-columns:1fr}.range-row{gap:14px}.preview-panel{padding:20px 12px 36px}.preview-head{align-items:flex-start;gap:10px}.draw-tools{flex-wrap:wrap}.draw-tools button span{display:none}.paper-stage{min-width:0;display:block;padding:0 5px 22px}.paper{min-width:0;width:100%;padding:22px 25px 18px}.paper-head{min-height:73px}.student-fields{display:none}.paper-foot{min-height:36px}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}@page{size:A4 portrait;margin:0}@media print{body{background:#fff}*,*:before,*:after{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}.topbar,.control-panel,.preview-head,.toast{display:none!important}.workspace,.preview-panel,.paper-stage{display:block;margin:0;padding:0;min-width:0;overflow:visible}.paper{--cell: 2.5mm;width:210mm;height:297mm;min-width:0;margin:0;border:0;box-shadow:none;break-after:page;container-type:normal;padding:9.5mm 11mm 7mm}}
