@import"https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@400;700&display=swap";body{font-family:Noto Sans SC,sans-serif}.textbook-serif{font-family:"Noto Serif SC",serif}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button:disabled{opacity:.5;cursor:wait}body{color:#111827;background:#f8fafc}.app-shell{min-height:100vh;min-height:100dvh;padding-bottom:calc(104px + env(safe-area-inset-bottom,0px))}.app-header{background:#fffffff7;border-bottom:1px solid #e5e7eb;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px));display:flex;align-items:center;justify-content:space-between;gap:8px}.app-brand{display:flex;align-items:center;gap:10px;min-width:0}.app-title{font-size:clamp(18px,2vw,24px);font-weight:700;margin:0;line-height:1.35}.brand-name{font-size:10px;font-weight:700;color:#64748b;letter-spacing:.12em}.header-actions{display:flex;gap:4px;flex-shrink:0}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;min-width:48px;padding:10px 16px;border:1px solid #d1d5db;border-radius:12px;font-size:16px;font-weight:600;line-height:1.4;cursor:pointer;text-decoration:none;transition:background .15s}.button-primary{color:#fff;background:#2563eb;border-color:#2563eb}.button-primary:hover{background:#1d4ed8}.button-secondary{color:#334155;background:#fff}.button-ghost{color:#475569;background:transparent;border-color:transparent}.button-danger{color:#b91c1c;background:transparent;border-color:transparent}.button-ghost:hover,.button-secondary:hover{background:#eef2f7}button:disabled{cursor:default;opacity:.5}.button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #93c5fd;outline-offset:3px}.icon{width:22px;height:22px;flex:0 0 auto}.compact-action{padding:10px}.action-label{display:none}.app-navigation{position:fixed;bottom:0;left:0;right:0;z-index:40;display:flex;gap:8px;background:#fff;border-top:1px solid #e5e7eb;padding:8px max(16px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}.app-navigation .button{flex:1}.app-navigation .active{color:#1d4ed8;background:#eff6ff}.count-badge{padding:2px 7px;font-size:13px;background:#dbeafe;color:#1d4ed8;border-radius:16px}.app-content{width:100%;max-width:1440px;margin:0 auto;padding:20px max(16px,env(safe-area-inset-right,0px)) 20px max(16px,env(safe-area-inset-left,0px))}.editor-panel{max-width:896px;padding:clamp(16px,3vw,32px);margin:0 auto 24px;background:#fff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 4px 16px #0f172a08}.editor-heading,.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.editor-heading h2,.dialog-heading h2{font-size:20px;margin:0}.editor-heading .button{padding:10px;font-size:14px;white-space:nowrap;flex-shrink:0}.editor-intro{color:#64748b;font-size:15px;line-height:1.6;margin:8px 0 16px}.lesson-input{width:100%;min-height:256px;resize:vertical;border:1px solid #cbd5e1;background:#f8fafc;border-radius:12px;padding:16px;font-size:18px;line-height:1.7}.drop-zone{margin-top:16px;padding:12px;text-align:center;border:1px dashed #cbd5e1;border-radius:12px}.drop-zone p{margin:6px 0;font-size:14px;line-height:1.5;color:#64748b}.attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.attachment{display:inline-flex;align-items:center;gap:4px;max-width:100%;background:#eff6ff;border-radius:12px;padding-left:12px}.attachment span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.editor-actions{display:flex;flex-direction:column;gap:16px;margin-top:20px}.exercise-count{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;font-size:15px}.count-control{display:flex;align-items:center;border:1px solid #cbd5e1;border-radius:12px;background:#fff}.count-control input{width:56px;min-height:48px;border:none;padding:8px 2px;text-align:center;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;font-size:18px}.count-control input::-webkit-inner-spin-button,.count-control input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.saved-lessons{max-width:896px;margin:0 auto;display:flex;flex-direction:column;gap:8px}.field-label{font-size:15px;font-weight:600}.saved-lessons select,.share-url{width:100%;min-height:48px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;font-size:16px}.save-status{text-align:center;font-size:14px;color:#64748b;margin:16px 0}.worksheet-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}.worksheet-toolbar p{font-size:15px;color:#64748b;margin:0}.notice{background:#fef2f2;border-left:4px solid #ef4444;padding:16px;margin-bottom:24px;color:#b91c1c;border-radius:8px}.notice p{margin:0;line-height:1.6}.notice-title{font-weight:700}.spinner{display:inline-block;width:24px;height:24px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:spin 1s linear infinite;flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}.button{transition:none}}.app-dialog{width:min(480px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #e5e7eb;border-radius:20px;padding:20px;color:#111827;box-shadow:0 24px 80px #0f172a33}.app-dialog::backdrop{background:#0f172a66}.app-dialog p{line-height:1.6;font-size:16px;color:#475569}.app-dialog h3{font-size:16px;margin:20px 0 4px}.share-url{margin-top:8px;font-size:14px}.dialog-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.dialog-status{min-height:24px;margin-bottom:0}.worksheet-list{display:flex;flex-direction:column;gap:clamp(24px,4vw,48px)}.worksheet{container-type:inline-size;width:100%;padding:clamp(16px,3vw,40px);border:1px solid #e5e7eb;background:#fff}.worksheet-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px 24px;margin-bottom:24px}.worksheet-heading h2{font-size:clamp(30px,4.4cqw,56px);color:#9ca3af;font-weight:400;margin:0;white-space:nowrap}.worksheet-heading p{font-size:clamp(18px,2.1cqw,26px);font-weight:700;margin:0}.word-bank{display:flex;flex-wrap:wrap;gap:clamp(12px,2cqw,28px);margin-bottom:24px}.word-bank span{border:1px solid black;padding:6px 18px;font-size:clamp(24px,2.8cqw,36px);line-height:1.5;text-align:center}.worksheet-columns{display:grid;grid-template-columns:minmax(0,1fr);gap:24px}.worksheet-dialogue{border:1px solid black;padding:clamp(20px,3cqw,40px);min-width:0;display:flex;flex-direction:column;justify-content:center;font-size:clamp(23px,3.05cqw,38px);line-height:1.8;overflow-wrap:anywhere}.worksheet-dialogue p{margin:0}.dialogue-lines{display:flex;flex-direction:column;gap:clamp(20px,3cqw,40px)}.dialogue-line{display:flex;align-items:baseline;gap:12px}.dialogue-line>div{min-width:0}.dialogue-line strong{flex:0 0 auto}.worksheet-dialogue .pinyin{font-family:Noto Sans SC,sans-serif;font-size:clamp(16px,1.65cqw,21px);line-height:1.65;color:#6b7280;margin-top:6px}.scramble-parts{display:flex;flex-wrap:wrap;gap:12px}.scramble-parts span{border:1px solid #d1d5db;padding:4px 12px;background:#f9fafb}.answer-blank{display:inline-block;width:3em;max-width:100%;height:1.1em;border-bottom:1px solid currentColor;vertical-align:-.05em}.answer-line{border-bottom:1px solid #374151;height:1.5em;margin-top:16px}.worksheet-image{width:100%;min-width:0;aspect-ratio:1;display:flex;align-items:center;justify-content:center}.worksheet-image img{display:block;width:100%;height:100%;object-fit:contain}.image-placeholder{min-height:200px;display:flex;align-items:center;justify-content:center;width:100%}@media(min-width:768px){.app-shell{padding-bottom:40px}.app-header{padding-left:clamp(24px,3vw,40px);padding-right:clamp(24px,3vw,40px)}.action-label{display:inline}.app-navigation{position:static;width:fit-content;margin:24px auto 0;border:1px solid #e5e7eb;border-radius:16px;padding:4px}.app-navigation .button{flex:0 1 auto;min-width:144px}.app-content{padding:24px clamp(24px,3vw,40px)}.editor-actions{flex-direction:row;align-items:end;justify-content:space-between}.exercise-count{flex-direction:column;align-items:start}.worksheet-columns{grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:clamp(24px,3cqw,40px)}.worksheet-image{aspect-ratio:1;min-height:300px}.worksheet-dialogue{min-height:300px}}@media(max-width:479px){.editor-actions>button{width:100%}.editor-heading{align-items:start}.editor-heading h2{font-size:18px;padding-top:10px}.worksheet-dialogue{padding:16px}.worksheet-toolbar .button{width:100%}.worksheet-heading{margin-bottom:16px}.word-bank span{padding:4px 12px}}@media print{@page{size:A4 landscape;margin:12mm}body{-webkit-print-color-adjust:exact;print-color-adjust:exact;background:#fff!important}.no-print{display:none!important}.app-shell{min-height:0;padding-bottom:0}.app-content{max-width:none;padding:0!important}.worksheet-list{display:block}.worksheet{width:100%;height:184mm;padding:0;border:none;margin:0;break-inside:avoid-page;break-after:page;page-break-after:always}.worksheet:last-of-type{break-after:auto;page-break-after:auto}.worksheet-heading{margin-bottom:8mm;gap:8mm}.worksheet-heading h2{font-size:30pt}.worksheet-heading p{font-size:16pt}.word-bank{gap:6mm;margin-bottom:8mm}.word-bank span{font-size:22pt;padding:2mm 5mm}.worksheet-columns{grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:8mm}.worksheet-dialogue{min-height:110mm;padding:8mm;font-size:24pt;line-height:1.8}.worksheet-dialogue .pinyin{font-size:13pt}.worksheet-image{aspect-ratio:1;height:110mm;min-height:0}.dialogue-lines{gap:9mm}.answer-line{height:13mm;margin-top:4mm}}
