:root{--bg: #f7f8fa;--surface: #ffffff;--surface-muted: #f2f4f7;--border: #e4e7ec;--border-strong: #d0d5dd;--text: #101828;--text-secondary: #475467;--text-muted: #98a2b3;--primary: #2f5bea;--primary-hover: #2449c7;--primary-soft: #eef2ff;--success: #067647;--success-soft: #ecfdf3;--warning: #b54708;--warning-soft: #fffaeb;--danger: #b42318;--danger-soft: #fef3f2;--neutral-soft: #f2f4f7;--radius: 10px;--radius-sm: 6px;--shadow: 0 1px 2px rgba(16, 24, 40, .05);--header-h: 60px;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Segoe UI,sans-serif;font-size:14px;line-height:1.55;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}*,*:before,*:after{box-sizing:border-box}body{margin:0;min-width:320px}h1,h2,h3,p{margin:0}button,textarea{font:inherit;color:inherit}.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-header{position:sticky;top:0;z-index:10;height:var(--header-h);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:0 24px;background:#ffffffeb;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:8px;font-weight:650;color:var(--primary)}.brand-sub{font-weight:400;color:var(--text-muted);font-size:13px}.header-actions{display:flex;justify-content:flex-end;gap:4px}.app-main{flex:1;width:100%;max-width:1360px;margin:0 auto;padding:24px}.page{display:flex;flex-direction:column;gap:16px}.page-intro h1{font-size:22px;font-weight:650;letter-spacing:-.01em}.page-intro p{margin-top:4px;color:var(--text-secondary)}.page-intro.is-inline{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.muted{color:var(--text-muted);font-size:13px}.hint{color:var(--text-muted);font-size:12px}.empty-state{padding:16px;color:var(--text-muted);text-align:center;font-size:13px}.loading-block{display:flex;align-items:center;justify-content:center;gap:8px;padding:48px 0;color:var(--text-secondary)}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.step-progress{display:flex;align-items:center;gap:8px;margin:0;padding:0;list-style:none}.step{display:flex;align-items:center;gap:8px;color:var(--text-muted);font-size:13px;white-space:nowrap}.step+.step:before{content:"";width:32px;height:1px;background:var(--border-strong)}.step-index{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--border-strong);font-size:12px;font-weight:600}.step.is-active{color:var(--text);font-weight:600}.step.is-active .step-index{background:var(--primary);border-color:var(--primary);color:#fff}.step.is-done{color:var(--text-secondary)}.step.is-done .step-index{background:var(--success-soft);border-color:var(--success);color:var(--success)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border-radius:var(--radius-sm);border:1px solid transparent;font-weight:550;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--primary);color:#fff}.btn-primary:not(:disabled):hover{background:var(--primary-hover)}.btn-secondary{background:var(--surface);border-color:var(--border-strong)}.btn-secondary:not(:disabled):hover{background:var(--surface-muted)}.btn-ghost{background:transparent;color:var(--text-secondary)}.btn-ghost:not(:disabled):hover{background:var(--surface-muted);color:var(--text)}.btn-sm{height:30px;padding:0 10px;font-size:13px}.icon-btn{display:inline-grid;place-items:center;width:28px;height:28px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--text-muted);cursor:pointer}.icon-btn:hover{background:var(--surface-muted);color:var(--text)}.error-notice{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #fecdca;border-radius:var(--radius-sm);background:var(--danger-soft);color:var(--danger)}.error-notice-text{flex:1}.error-notice .btn{color:var(--danger)}.error-notice.is-compact{padding:6px 8px 6px 10px;font-size:13px}.status-badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;font-size:12px;font-weight:550;white-space:nowrap}.status-satisfied{background:var(--success-soft);color:var(--success)}.status-missing{background:var(--neutral-soft);color:var(--text-secondary)}.status-needs_clarification{background:var(--warning-soft);color:var(--warning)}.status-failed{background:var(--danger-soft);color:var(--danger)}.info-notice{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid #c7d7fe;border-radius:var(--radius-sm);background:var(--primary-soft);color:var(--primary-hover)}.info-notice.is-compact{padding:6px 10px;font-size:13px}.tag,.optional,.source-tag{display:inline-block;padding:0 6px;border-radius:4px;font-size:11px;font-weight:500;line-height:18px;background:var(--neutral-soft);color:var(--text-muted)}.tag-strong{background:var(--primary-soft);color:var(--primary)}.optional{margin-left:6px}.source-tag{background:var(--primary-soft);color:var(--primary)}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;border-bottom:1px solid var(--border)}.panel-header h2{font-size:14px;font-weight:600}.restore-page{max-width:640px;margin:48px auto 0}.scenario-group h2{margin-bottom:8px;font-size:13px;font-weight:600;color:var(--text-secondary)}.scenario-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}.scenario-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:14px 40px 14px 16px;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);cursor:pointer;transition:border-color .15s,box-shadow .15s}.scenario-card:not(:disabled):hover,.scenario-card.is-loading{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.scenario-card:disabled:not(.is-loading){opacity:.6;cursor:not-allowed}.scenario-category{font-size:12px;color:var(--text-muted)}.scenario-name{font-size:15px;font-weight:600}.scenario-action{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:var(--primary)}.ready-banner{display:flex;align-items:center;gap:10px;padding:6px 6px 6px 12px;border:1px solid #abefc6;border-radius:var(--radius);background:var(--success-soft);color:var(--success);font-weight:550}.discovery-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,1fr);gap:16px;height:calc(100vh - var(--header-h) - 140px);min-height:560px}.chat-panel{display:flex;flex-direction:column;min-height:0}.focus-chip{padding:2px 8px;border-radius:999px;background:var(--warning-soft);color:var(--warning);font-size:12px}.chat-messages{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:14px;padding:16px}.chat-bubble-row{display:flex;align-items:flex-start;gap:8px;max-width:88%}.chat-bubble-row.is-user{align-self:flex-end;flex-direction:row-reverse}.chat-role{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;font-size:11px;font-weight:650;background:var(--primary-soft);color:var(--primary)}.is-user .chat-role{background:var(--neutral-soft);color:var(--text-secondary)}.chat-bubble{padding:10px 12px;border-radius:var(--radius);background:var(--surface-muted);white-space:pre-wrap;word-break:break-word}.is-user .chat-bubble{background:var(--primary);color:#fff}.chat-bubble.is-pending{display:flex;align-items:center;gap:6px;color:var(--text-secondary)}.chat-composer,.patch-form{display:flex;flex-direction:column;gap:8px;padding:12px 16px 14px;border-top:1px solid var(--border)}.chat-composer textarea,.patch-form textarea{width:100%;resize:vertical;min-height:64px;padding:10px 12px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);outline:none}.chat-composer textarea:focus,.patch-form textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}.composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.discovery-side{display:flex;flex-direction:column;gap:16px;min-height:0}.material-panel{flex:none;max-height:34%;display:flex;flex-direction:column}.material-list{margin:0;padding:6px 8px;list-style:none;overflow-y:auto}.material-list li{display:flex;align-items:center;gap:8px;padding:6px 8px;color:var(--text-secondary)}.material-list li span:first-of-type{flex:1;color:var(--text)}.brief-panel{flex:1;min-height:0;display:flex;flex-direction:column}.counter{color:var(--text-secondary);font-size:13px}.counter strong{color:var(--success);font-size:15px}.progress-track{height:4px;background:var(--surface-muted)}.progress-fill{height:100%;background:var(--success);transition:width .4s ease}.brief-sections{overflow-y:auto;padding:4px 0 8px}.brief-section h3{padding:10px 16px 4px;font-size:12px;font-weight:600;color:var(--text-muted)}.field-list{margin:0;padding:0;list-style:none}.field-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:8px 16px;border-left:2px solid transparent}.field-row.is-focus{background:var(--warning-soft);border-left-color:var(--warning)}.field-main{display:flex;flex-direction:column;min-width:0}.field-name{font-weight:550}.field-value{color:var(--text-secondary);font-size:13px;word-break:break-word}.field-value.is-empty,.is-empty{color:var(--text-muted)}.review-page{max-width:920px;width:100%;margin:0 auto}.review-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.finalized-banner{display:flex;align-items:center;gap:6px;color:var(--success);font-weight:600}.patch-form{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}.patch-form-header{display:flex;align-items:center;justify-content:space-between;font-weight:550}.patch-result{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:var(--radius-sm);background:var(--success-soft);color:var(--success)}.brief-document{padding:40px 48px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.brief-document-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap;padding-bottom:20px;margin-bottom:8px;border-bottom:2px solid var(--text)}.eyebrow{font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--primary)}.brief-document-header h1{margin-top:4px;font-size:26px;font-weight:700}.brief-meta{display:flex;gap:24px;margin:0}.brief-meta dt{font-size:12px;color:var(--text-muted)}.brief-meta dd{margin:0;font-weight:600}.brief-doc-section{margin-top:24px;break-inside:avoid}.brief-doc-section h2{display:flex;align-items:baseline;gap:10px;margin-bottom:8px;font-size:15px;font-weight:650}.section-index{font-size:12px;color:var(--primary);font-variant-numeric:tabular-nums}.brief-table{width:100%;border-collapse:collapse}.brief-table th,.brief-table td{padding:10px 8px;border-top:1px solid var(--border);text-align:left;vertical-align:top}.brief-table th{width:28%;font-weight:550;color:var(--text-secondary)}.brief-table td{white-space:pre-wrap;word-break:break-word}.brief-status-cell{width:1%;white-space:nowrap!important;text-align:right!important}.brief-status-cell>*+*{margin-left:6px}.brief-table tr.is-patched td,.brief-table tr.is-patched th{background:var(--primary-soft);transition:background .6s}.brief-document-footer{display:flex;justify-content:space-between;gap:12px;margin-top:32px;padding-top:12px;border-top:1px solid var(--border);font-size:11px;color:var(--text-muted)}.sketch-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:16px;align-items:start}.sketch-panel{display:flex;flex-direction:column}.sketch-frame{display:grid;place-items:center;aspect-ratio:4 / 3;margin:16px;border-radius:var(--radius-sm);background:var(--surface-muted);overflow:hidden}.sketch-image{display:block;width:100%;height:100%;object-fit:contain;background:#fff}.sketch-placeholder{display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px;text-align:center;color:var(--text-secondary)}.sketch-placeholder.is-generating{color:var(--primary)}.sketch-placeholder strong{color:var(--text);font-size:15px}.sketch-feedback{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0 16px 16px}.sketch-feedback:empty{display:none}.sketch-feedback .error-notice{align-self:stretch}.sketch-brief{position:sticky;top:calc(var(--header-h) + 16px);display:flex;flex-direction:column;max-height:calc(100vh - var(--header-h) - 48px)}.sketch-brief-body{overflow-y:auto;padding-bottom:8px}.finalized-chip{display:inline-flex;align-items:center;gap:4px;color:var(--success);font-size:12px;font-weight:550}.summary-list{margin:0;padding:0 16px}.summary-list>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px;padding:5px 0;font-size:13px}.summary-list dt{color:var(--text-muted)}.summary-list dd{margin:0;word-break:break-word}@media (max-width: 960px){.app-header{grid-template-columns:1fr auto;height:auto;padding:10px 16px;row-gap:8px}.app-header .step-progress{grid-column:1 / -1;grid-row:2;justify-content:center}.app-main{padding:16px}.discovery-layout{grid-template-columns:1fr;height:auto}.chat-panel{height:70vh;min-height:420px}.material-panel{max-height:240px}.sketch-layout{grid-template-columns:1fr}.sketch-brief{position:static;max-height:none}.brief-document{padding:24px 20px}}@media (max-width: 560px){.brand-sub,.step-label{display:none}.step.is-current .step-label{display:inline}.step+.step:before{width:12px}.sketch-frame{margin:12px}.brief-meta{flex-wrap:wrap;gap:12px 20px}.brief-table th{width:36%}.ready-banner{width:100%;flex-wrap:wrap}}@page{size:A4;margin:16mm 14mm}@media print{:root{background:#fff;font-size:12px}.no-print{display:none!important}.app-main{max-width:none;padding:0}.review-page{max-width:none}.brief-document{padding:0;border:none;box-shadow:none}.brief-table tr{break-inside:avoid}.brief-table tr.is-patched td,.brief-table tr.is-patched th{background:none}.status-badge,.source-tag,.optional{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
