/* Drafting is a document workspace: persistent commands, scrollable paper. */
.draft-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.draft-intro h2{font-size:26px;margin:4px 0 7px;font-weight:600}.draft-intro p:last-child{font-size:13px;color:var(--muted);margin:0}.draft-connection{font-size:12px;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--brand-dark);max-width:330px;overflow-wrap:anywhere}
.draft-steps{display:flex;gap:30px;list-style:none;margin:0 0 22px;padding:0 0 18px;border-bottom:1px solid var(--line)}.draft-steps li{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px}.draft-steps span{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;border:1px solid var(--line-strong);font-variant-numeric:tabular-nums}.draft-steps .is-current{color:var(--brand-dark);font-weight:600}.draft-steps .is-current span{background:var(--brand);border-color:var(--brand);color:var(--surface)}.draft-steps .is-complete{color:var(--success)}
.draft-layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:24px;align-items:start}.draft-brief{background:var(--surface);border:1px solid var(--line);border-radius:10px;overflow:hidden}.draft-brief-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px;border-bottom:1px solid var(--line)}.draft-brief-heading h3{font-size:15px;margin:0}.draft-brief-heading button{font-size:12px;min-height:32px;padding:6px 9px;white-space:nowrap}
#draftForm{margin:0;padding:20px;gap:18px}#draftForm label{font-size:13px;font-weight:500;min-width:0}#draftForm input,#draftForm select,#draftForm textarea{font-size:13px;min-width:0;width:100%}#draftForm textarea{line-height:1.8;resize:vertical;min-height:132px}.draft-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.draft-options{font-size:12px;padding:14px 0;border-top:1px solid var(--line);margin:0}.draft-options>summary{cursor:pointer;color:var(--muted)}.draft-options>label{margin-top:16px}.draft-field-help{font-size:12px;color:var(--muted);line-height:1.8;margin:8px 0 12px}.draft-rules{font-size:12px;color:var(--muted)}.draft-rules ul{padding-left:18px;line-height:1.9}
.draft-submit-area{position:sticky;bottom:0;background:var(--surface);padding-top:14px;border-top:1px solid var(--line);z-index:2}.draft-consent{display:flex!important;align-items:flex-start;gap:8px!important;line-height:1.7;color:var(--muted);font-size:12px!important;margin-bottom:14px}.draft-consent input{width:16px!important;height:16px;min-height:16px;flex-shrink:0;margin:3px 0 0;accent-color:var(--brand)}.draft-generate{display:grid;grid-template-columns:1fr;gap:8px}.draft-generate button{width:100%;font-size:13px;min-height:42px}#draftError{color:var(--error);font-size:12px;white-space:pre-wrap;line-height:1.8;margin:8px 0 0}#draftError:empty{display:none}.draft-history{border-top:1px solid var(--line);padding:20px;background:var(--surface-soft)}.draft-history label{font-size:12px}.draft-history select{max-width:100%;font-size:12px}.draft-history button{font-size:12px;margin-top:10px;width:100%}
.draft-editor{min-width:0;border:1px solid var(--line);background:#e9ece7;border-radius:10px;overflow:hidden;display:flex;flex-direction:column;position:sticky;top:106px;height:calc(100dvh - 320px);min-height:540px}.draft-editor-header{margin:0;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--surface);display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0}.draft-editor-header>div{min-width:0}.draft-editor-header h3{font-size:15px;margin:0 0 5px}.draft-editor-header p{font-size:12px;color:var(--muted);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:360px}.draft-editor-tools{display:flex;gap:10px;align-items:center}.draft-editor-tools button{font-size:12px;min-height:32px;padding:6px 10px;white-space:nowrap}.draft-pending{font-size:11px;color:var(--brand-dark);background:var(--brand-soft);border-radius:4px;padding:5px 8px;white-space:nowrap;min-width:92px;text-align:center}
.draft-paper{margin:20px 24px;padding:28px 34px;background:var(--surface);border:1px solid var(--line);box-shadow:0 4px 18px var(--shadow-small);display:flex;flex-direction:column;min-height:0;flex:1;overflow:auto}#draftTitle{border:0;border-radius:0;padding:0;width:100%;background:var(--surface);color:var(--ink-strong);font:600 23px/1.5 "SimSun",serif;text-align:center;min-height:44px;flex-shrink:0}#draftTitle:focus{outline:1px solid var(--brand);box-shadow:none}#draftDocumentNotice{font-size:11px;color:var(--muted);text-align:center;line-height:1.8;margin:8px 0 18px;flex-shrink:0}#draftBody{border:0;border-radius:0;background:var(--surface);color:var(--ink);padding:2px;width:100%;flex:1;min-height:160px;resize:none;font:16px/2 "SimSun","Songti SC",serif;white-space:pre-wrap;scrollbar-width:thin}#draftBody:focus{outline:1px solid var(--line-strong);box-shadow:none}#draftBody:disabled,#draftTitle:disabled{opacity:1;cursor:default}#draftBody::placeholder{color:var(--muted);font:14px/2 "Microsoft YaHei",sans-serif}
.draft-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--surface);border-top:1px solid var(--line);padding:14px 20px;flex-shrink:0}.draft-editor-footer>span{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.draft-editor-footer>div{display:flex;gap:8px;flex-wrap:wrap}.draft-editor-footer button{font-size:12px;min-height:36px;padding:8px 12px}#draftStatus{font-size:12px;margin:0;padding:0 20px;background:var(--surface);min-height:28px;height:auto;line-height:28px;flex-shrink:0}
.draft-mobile-tabs{display:none}.draft-workbench.is-focused .draft-brief,.draft-workbench.is-focused .draft-steps,.draft-workbench.is-focused .draft-intro{display:none}.draft-workbench.is-focused .draft-layout{grid-template-columns:minmax(0,1fr);max-width:1100px;margin:auto}.draft-workbench.is-focused .draft-editor{height:calc(100dvh - 132px)}
@media(min-width:1250px){.draft-brief{max-height:calc(100dvh - 132px);overflow:auto;position:sticky;top:106px;scrollbar-width:thin}}
@media(max-width:1249px){.draft-layout{grid-template-columns:300px minmax(0,1fr);gap:18px}.draft-paper{margin:16px;padding:24px}.draft-editor-header{align-items:flex-start;flex-direction:column;gap:10px}.draft-editor-tools{justify-content:space-between;width:100%}.draft-editor-footer>div{width:100%;justify-content:flex-end}.draft-editor-header p{max-width:300px}}
@media(max-width:980px){.draft-layout{grid-template-columns:minmax(0,1fr)}.draft-mobile-tabs{display:flex;background:var(--surface-soft);padding:4px;border:1px solid var(--line);border-radius:8px;gap:4px;margin-bottom:18px}.draft-mobile-tabs button{flex:1;background:none;color:var(--muted);font-size:13px;min-height:38px}.draft-mobile-tabs [aria-pressed=true]{background:var(--surface);color:var(--brand-dark);box-shadow:0 1px 4px var(--shadow-small)}.draft-workbench[data-pane=brief] .draft-editor{display:none}.draft-workbench[data-pane=editor] .draft-brief{display:none}.draft-editor{position:relative;top:auto;height:680px;min-height:540px;overflow:visible}.draft-editor-footer{position:sticky;bottom:0;z-index:4;box-shadow:0 -8px 24px var(--shadow-soft);border-radius:0 0 10px 10px}.draft-intro{align-items:flex-start;flex-wrap:wrap;gap:12px}.draft-intro h2{font-size:24px}.draft-connection{font-size:12px}.draft-editor-header{flex-direction:row;align-items:center}.draft-editor-tools{width:auto}.draft-workbench.is-focused .draft-mobile-tabs{display:none}.draft-workbench.is-focused .draft-editor{display:flex;height:calc(100dvh - 180px)}.draft-editor-header p{max-width:350px}.draft-submit-area{bottom:-20px;padding-bottom:10px}}
@media(max-width:560px){.draft-intro h2{font-size:23px}.draft-intro p:last-child{font-size:13px}.draft-steps{gap:16px;margin-bottom:18px}.draft-steps li{font-size:12px;gap:6px}.draft-steps span{width:22px;height:22px}.draft-brief-heading{padding:18px}#draftForm{padding:18px}.draft-paper{padding:22px 18px;margin:12px}.draft-editor-header{padding:16px;align-items:flex-start;flex-direction:column}.draft-editor-header p{max-width:calc(100vw - 100px)}.draft-editor-tools{width:100%;justify-content:space-between}.draft-editor-footer{padding:12px;gap:10px}.draft-editor-footer>div{justify-content:flex-start;gap:6px}.draft-editor-footer button{font-size:12px;padding:8px}.draft-editor{height:680px}#draftBody{font-size:16px}#draftTitle{font-size:21px}#draftStatus{padding:0 12px;font-size:11px}.draft-workbench.is-focused .draft-editor{height:calc(100dvh - 170px);min-height:540px}}

.draft-fields{display:grid;gap:18px}

@media(min-width:1250px){.draft-brief{height:calc(100dvh - 320px);min-height:540px;max-height:none;display:flex;flex-direction:column;overflow:hidden}.draft-brief-heading,.draft-history{flex-shrink:0}.draft-history{padding:12px 20px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.draft-history button{margin:0;width:auto;padding:10px;font-size:11px}#draftForm{display:flex;flex-direction:column;padding:0;gap:0;min-height:0;flex:1}.draft-fields{overflow:auto;padding:20px;scrollbar-width:thin;min-height:0;flex:1}.draft-submit-area{position:static;padding:14px 20px;flex-shrink:0}.draft-generate{grid-template-columns:1fr 1fr}.draft-generate button{font-size:12px;padding:10px 6px}.draft-consent{font-size:11px!important}}
.draft-history label{min-width:0}.draft-history select{width:100%;min-width:0}.draft-history button{white-space:nowrap}@media(min-width:1250px){.draft-history{grid-template-columns:minmax(0,1fr) auto}}
