:root {
  --ink-black: #1a1a2e;
  --gold: #c9a96e;
  --gold-light: #e8d5a3;
  --cream: #f5f0e8;
  --cream-dark: #e8e0d0;
  --paper: #faf8f2;
  --ink-gray: #6b6b80;
  --ink-light: #b0b0c0;
  --red-seal: #c0392b;
  --green-bamboo: #27ae60;
  --blue-ink: #264653;
  --purple-ink: #6a1b9a;
  --shadow: 0 2px 16px rgba(26,26,46,0.08);
  --shadow-lg: 0 8px 32px rgba(26,26,46,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 260px;
  --sidebar-collapsed: 64px;
  --stage-panel-width: 240px;
  --page-pad: 32px;
  --topbar-pad: 32px;
  --card-pad: 28px 24px;
  --grid-gap: 20px;
  --app-font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", Roboto, Arial, sans-serif;
  --app-font-mono: Consolas, Monaco, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", monospace;
}
* { margin:0; padding:0; box-sizing:border-box; }
[hidden] { display:none !important; }
body {
  font-family: var(--app-font-sans);
  background: var(--paper); color: var(--ink-black); min-height:100vh; overflow-x:hidden;
}
.muted { color:var(--ink-light); }
body[data-view="home"] { min-height:100vh; overflow-x:hidden; }
button, input, textarea { font:inherit; }
.site-shell, .workspace-shell { display:none; min-height:100vh; }
.site-shell.active, .workspace-shell.active { display:block; }
.app-container { display:flex; width:100%; min-height:100vh; }
.workspace-shell.active .app-container { display:flex; }
.workspace-shell.active .sidebar { display:flex; }
.workspace-shell.active .main-content { flex:1; }
body[data-view="workspace"] { height:100vh; min-height:100vh; overflow:hidden; }
body[data-view="workspace"] .workspace-shell.active { height:100vh; min-height:0; overflow:hidden; }
body[data-view="workspace"] .app-container { height:100vh; min-height:0; overflow:hidden; }
body[data-view="workspace"] .sidebar { height:100vh; min-height:0; }
body[data-view="workspace"] .sidebar-nav { min-height:0; }
body[data-view="workspace"] .main-content { height:100vh; min-height:0; overflow:hidden; }
body[data-view="workspace"] .page-body,
body[data-view="workspace"] #pageDeliver,
body[data-view="workspace"] #pageProfile,
body[data-view="workspace"] #pagePrivateKnowledge,
body[data-view="workspace"] #pagePublicKnowledge { min-height:0; }
body[data-view="workspace"] #pageChat { min-height:0; overflow:hidden; }
body[data-view="workspace"] .chat-main,
body[data-view="workspace"] .stage-progress-panel { min-height:0; }
body[data-view="workspace"] .chat-body { min-height:0; }
body[data-view="workspace"] .chat-input-area { flex-shrink:0; }

.landing-page,
.auth-page {
  min-height:100vh;
  background:#e8e8e6;
  color:#1f1714;
}
.landing-page { display:block; width:100%; min-height:100vh; overflow:hidden; background:#e8e8e6; }
.brand-mark {
  width:42px; height:42px; border-radius:50%; position:relative; overflow:hidden;
  background:linear-gradient(90deg,#201713 0 46%, transparent 46% 54%, #201713 54% 100%);
}
.brand-mark::after {
  content:''; position:absolute; inset:8px 17px; background:#e8e8e6; border-radius:999px;
}
.landing-main {
  width:100%; min-height:min(900px, 100vh); display:grid; grid-template-rows:auto minmax(0, 1fr);
  margin:0; padding:clamp(18px, min(4vw, 5vh), 56px); position:relative; overflow:hidden;
}
.landing-nav {
  display:flex; align-items:center; justify-content:space-between; gap:24px; position:relative; z-index:2;
}
.landing-brand { display:flex; align-items:baseline; gap:10px; color:#201713; text-decoration:none; min-width:max-content; }
.landing-brand-name { font-size:20px; font-weight:950; letter-spacing:3px; }
.landing-brand-sub { font-size:11px; color:#766b63; letter-spacing:0; }
.landing-nav-links { display:flex; align-items:center; gap:clamp(18px, 3vw, 44px); font-size:13px; font-weight:700; }
.landing-nav-links a { color:#201713; text-decoration:none; }
.landing-nav-links a:hover,
.landing-text-link:hover,
.landing-inline-action:hover { color:#9a7b3f; }
.landing-actions { display:flex; align-items:center; gap:14px; }
.pill-btn {
  min-height:34px; padding:0 24px; border-radius:999px; border:1.5px solid #201713;
  background:transparent; color:#201713; font-size:13px; font-weight:800; cursor:pointer;
  transition:transform .2s ease, background .2s ease, color .2s ease;
}
.pill-btn:hover { transform:translateY(-1px); }
.pill-btn.solid { background:#201713; color:#fff; }
.landing-hero {
  position:relative; display:grid; grid-template-columns:minmax(340px, .86fr) minmax(460px, 1.14fr);
  align-items:center; gap:clamp(24px, 5vw, 80px); min-height:0; overflow:hidden; padding:clamp(58px, 10vh, 120px) 0;
}
.landing-copy { position:relative; z-index:2; align-self:center; padding-bottom:0; }
.landing-kicker {
  font-size:clamp(16px, 1.4vw, 21px); margin-bottom:20px;
  font-weight:900; letter-spacing:4px; color:#9a7b3f;
}
.landing-title {
  font-size:clamp(44px, 5.4vw, 82px); line-height:1.08; letter-spacing:0;
  font-weight:950; max-width:9.8em;
}
.landing-text { max-width:560px; margin-top:24px; font-size:16px; line-height:1.9; color:#3e3632; }
.landing-hero-actions { display:flex; align-items:center; gap:24px; margin-top:32px; }
.landing-text-link { color:#201713; text-decoration:none; font-size:14px; font-weight:800; transition:color .2s ease; }
.landing-visual {
  position:relative; min-height:0; height:100%; display:flex; align-items:center; justify-content:center;
}
.landing-preview {
  width:min(680px, 100%); background:#f7f5ef; border:1px solid rgba(31,23,20,.16); border-radius:10px;
  box-shadow:0 22px 64px rgba(31,23,20,.14); overflow:hidden; transform:rotate(1.5deg);
}
.landing-preview-topbar {
  display:flex; align-items:center; justify-content:space-between; min-height:54px; padding:0 22px;
  border-bottom:1px solid rgba(31,23,20,.1); color:#5e554f; font-size:12px; font-weight:800;
}
.landing-preview-brand { color:#201713; font-size:14px; letter-spacing:2px; }
.landing-preview-status { padding:6px 10px; border-radius:999px; color:#806637; background:#f3ecda; }
.landing-preview-body { display:grid; grid-template-columns:150px minmax(0, 1fr); min-height:360px; }
.landing-preview-sidebar { display:flex; flex-direction:column; gap:6px; padding:24px 14px; border-right:1px solid rgba(31,23,20,.08); color:#857a71; font-size:12px; }
.landing-preview-sidebar span { padding:10px 12px; border-radius:6px; }
.landing-preview-sidebar-active { background:#efe7d3; color:#6f572e; font-weight:800; }
.landing-preview-content { padding:44px clamp(24px, 4vw, 56px); background:#fbfaf6; }
.landing-preview-label { color:#9a7b3f; font-size:12px; font-weight:800; letter-spacing:1px; }
.landing-preview-content h2 { max-width:420px; margin-top:18px; font-size:clamp(25px, 3vw, 42px); line-height:1.22; letter-spacing:0; }
.landing-preview-content p { max-width:420px; margin-top:18px; color:#6b615b; font-size:14px; line-height:1.8; }
.landing-preview-progress { height:7px; margin-top:36px; border-radius:999px; background:#e9e2d5; overflow:hidden; }
.landing-preview-progress span { display:block; width:62%; height:100%; border-radius:inherit; background:#c9a96e; }
.landing-preview-footer { display:flex; justify-content:space-between; gap:16px; margin-top:14px; color:#8a8076; font-size:11px; }
.landing-section { width:min(1180px, calc(100% - 112px)); margin:0 auto; padding:112px 0; }
.landing-section-heading { max-width:720px; }
.landing-eyebrow { color:#9a7b3f; font-size:12px; font-weight:900; letter-spacing:3px; text-transform:uppercase; }
.landing-section-heading h2 { margin-top:16px; font-size:clamp(30px, 4vw, 52px); line-height:1.15; letter-spacing:0; }
.landing-section-heading p { margin-top:18px; color:#6b615b; font-size:15px; line-height:1.8; }
.landing-audience { padding-top:100px; }
.landing-audience-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:1px; margin-top:48px; background:rgba(31,23,20,.18); border:1px solid rgba(31,23,20,.14); }
.landing-audience-item { min-height:236px; padding:28px; display:flex; flex-direction:column; align-items:flex-start; background:#e8e8e6; color:#201713; text-decoration:none; transition:background .2s ease, transform .2s ease; }
.landing-audience-item:hover { background:#f3efe6; transform:translateY(-3px); }
.landing-audience-index { color:#9a7b3f; font:700 12px/1 var(--app-font-mono); }
.landing-audience-item strong { margin-top:46px; font-size:24px; }
.landing-audience-item > span:not(.landing-audience-index):not(.landing-section-link) { margin-top:12px; color:#6b615b; font-size:13px; line-height:1.7; }
.landing-section-link { margin-top:auto; padding-top:24px; color:#9a7b3f; font-size:12px; font-weight:800; }
.landing-products { padding-top:56px; }
.landing-product-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:18px; margin-top:48px; }
.landing-product-item { min-height:340px; padding:30px; border-top:3px solid #201713; background:#f5f3ee; }
.landing-product-item:nth-child(2) { border-color:#9a7b3f; }
.landing-product-item:nth-child(3) { border-color:#58706a; }
.landing-product-code { color:#9a7b3f; font:700 11px/1 var(--app-font-mono); letter-spacing:1px; }
.landing-product-item h3 { margin-top:44px; font-size:27px; }
.landing-product-item p { margin-top:14px; color:#6b615b; font-size:13px; line-height:1.8; }
.landing-product-tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:20px; }
.landing-product-tags span { padding:5px 8px; border:1px solid rgba(31,23,20,.13); color:#6b615b; font-size:11px; }
.landing-inline-action { display:inline-flex; align-items:center; gap:8px; margin-top:26px; padding:0; border:0; background:transparent; color:#201713; font-family:inherit; font-size:13px; font-weight:800; line-height:1.4; text-decoration:none; cursor:pointer; transition:color .2s ease; }
.landing-solutions { padding-top:76px; }
.landing-solution-list { margin-top:42px; border-top:1px solid rgba(31,23,20,.18); }
.landing-solution-row { display:grid; grid-template-columns:120px minmax(0, 1fr) auto; align-items:center; gap:24px; padding:24px 0; border-bottom:1px solid rgba(31,23,20,.14); }
.landing-solution-row span { color:#9a7b3f; font-size:12px; font-weight:900; }
.landing-solution-row strong { font-size:19px; }
.landing-solution-row a { color:#6b615b; font-size:12px; font-weight:800; text-decoration:none; }
.landing-solution-row a:hover { color:#9a7b3f; }
.landing-scenes { padding-top:72px; }
.landing-scene-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; margin-top:42px; }
.landing-scene-item { padding:24px 0; border-top:1px solid rgba(31,23,20,.18); }
.landing-scene-item span, .landing-workflow-grid span { color:#9a7b3f; font:700 11px/1 var(--app-font-mono); }
.landing-scene-item strong { display:block; margin-top:38px; font-size:18px; }
.landing-scene-item p { margin-top:10px; color:#6b615b; font-size:13px; line-height:1.7; }
.landing-workflow { padding-top:72px; }
.landing-workflow-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:36px; margin-top:42px; }
.landing-workflow-grid > div { border-top:1px solid rgba(31,23,20,.18); padding-top:22px; }
.landing-workflow-grid strong { display:block; margin-top:34px; font-size:24px; }
.landing-workflow-grid p { margin-top:10px; color:#6b615b; font-size:13px; line-height:1.7; }
.landing-contact { display:flex; align-items:end; justify-content:space-between; gap:40px; padding-top:92px; padding-bottom:82px; border-top:1px solid rgba(31,23,20,.18); }
.landing-contact h2 { margin-top:16px; font-size:clamp(30px, 4vw, 50px); }
.landing-contact p { max-width:600px; margin-top:16px; color:#6b615b; font-size:14px; line-height:1.8; }
.landing-contact-actions { display:flex; flex-shrink:0; align-items:center; gap:12px; }
.landing-footer { display:flex; justify-content:space-between; gap:20px; width:min(1180px, calc(100% - 112px)); margin:0 auto; padding:22px 0 30px; border-top:1px solid rgba(31,23,20,.12); color:#81766d; font-size:11px; }
.landing-stat strong { display:block; font-size:36px; line-height:1; }
.landing-stat span { display:block; margin-top:8px; font-size:12px; line-height:1.5; color:#4a403b; }
}
.landing-stat strong { display:block; font-size:36px; line-height:1; }
.landing-stat span { display:block; margin-top:8px; font-size:12px; line-height:1.5; color:#4a403b; }

.auth-page { display:grid; grid-template-rows:76px minmax(0,1fr) 44px; width:100%; height:100vh; height:100dvh; overflow:hidden; background:#e8e8e6; }
.auth-topbar {
  position:relative; z-index:5; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:24px;
  min-height:76px; padding:0 5vw; border-bottom:1px solid rgba(31,23,20,.16); background:rgba(232,232,230,.96);
}
.auth-brand { color:#201713; font-size:17px; font-weight:900; letter-spacing:4px; text-decoration:none; }
.auth-brand:hover, .auth-home-link:hover { color:#f05a43; }
.auth-top-meta { color:#716d66; font:10px var(--app-font-mono); letter-spacing:1.5px; }
.auth-home-link { justify-self:end; color:#716d66; font-size:12px; text-decoration:none; }
.auth-stage { display:grid; grid-template-columns:minmax(0,1fr) minmax(380px,480px); min-height:0; overflow:hidden; }
.auth-visual {
  position:relative; isolation:isolate; min-width:0; min-height:0; padding:clamp(34px,5vw,72px);
  display:flex; flex-direction:column; justify-content:center; overflow:hidden;
  background-image:linear-gradient(rgba(31,23,20,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(31,23,20,.055) 1px,transparent 1px);
  background-size:52px 52px;
}
.auth-visual::after { content:''; position:absolute; inset:auto 5vw 28px; z-index:-1; height:1px; background:rgba(31,23,20,.18); }
.auth-visual img {
  position:absolute; left:52%; top:52%; z-index:-2; width:min(760px,68vw); max-height:92%; object-fit:contain;
  transform:translate(-50%,-50%) rotate(-8deg); opacity:.2; mix-blend-mode:multiply; pointer-events:none;
}
.auth-visual-copy { position:relative; z-index:1; max-width:720px; }
.auth-eyebrow, .auth-panel-eyebrow { color:#f05a43; font:10px var(--app-font-mono); letter-spacing:2px; }
.auth-slogan { max-width:720px; margin-top:18px; color:#201713; font-size:clamp(54px,6vw,86px); line-height:.98; font-weight:950; letter-spacing:0; }
.auth-slogan span { white-space:nowrap; }
.auth-visual-copy p { max-width:500px; margin-top:26px; color:#4b443f; font-size:14px; line-height:1.8; }
.auth-capabilities { position:absolute; left:5vw; bottom:34px; display:flex; gap:22px; color:#716d66; font:10px var(--app-font-mono); }
.auth-capabilities span + span { padding-left:22px; border-left:1px solid rgba(31,23,20,.2); }
.auth-panel {
  position:relative; min-width:0; min-height:0; padding:clamp(30px,4vw,54px); overflow-y:auto;
  display:flex; flex-direction:column; justify-content:center; border-left:1px solid rgba(31,23,20,.16); background:#f8f7f2;
}
.auth-panel::before { content:''; position:absolute; left:0; right:0; top:0; height:3px; background:#f05a43; }
.auth-panel h2 { margin-top:12px; color:#201713; font-size:32px; line-height:1.15; letter-spacing:0; }
.auth-panel .auth-subtitle { margin:10px 0 22px; color:#6b615b; font-size:13px; line-height:1.7; }
.auth-form { display:flex; flex-direction:column; gap:13px; }
.auth-method-tabs {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0;
  padding:0; border:1px solid rgba(31,23,20,.16); border-radius:0; background:transparent;
}
.auth-method-tab {
  min-height:38px; border:0; border-left:1px solid rgba(31,23,20,.16); border-radius:0; background:transparent; color:#716d66;
  font-size:12px; font-weight:800; cursor:pointer;
}
.auth-method-tab:first-child { border-left:0; }
.auth-method-tab.active { background:#201713; color:#fff; }
.auth-field { display:flex; flex-direction:column; gap:7px; color:#302722; font-size:12px; font-weight:700; }
.auth-field input,
.auth-field select {
  width:100%; height:44px; padding:0 13px; border:1px solid rgba(31,23,20,.18); border-radius:0;
  background:rgba(255,255,255,.66); color:#201713; outline:none;
}
.auth-field input:focus,
.auth-field select:focus { border-color:#f05a43; box-shadow:0 0 0 2px rgba(240,90,67,.1); }
.auth-phone-input { display:flex; align-items:center; height:44px; border:1px solid rgba(31,23,20,.18); background:rgba(255,255,255,.66); }
.auth-phone-input:focus-within { border-color:#f05a43; box-shadow:0 0 0 2px rgba(240,90,67,.1); }
.auth-phone-prefix { display:flex; align-items:center; align-self:stretch; padding:0 12px; border-right:1px solid rgba(31,23,20,.14); color:#514741; font-size:13px; font-weight:700; }
.auth-phone-prefix[hidden],
.auth-auto-register-hint[hidden],
.auth-switch[hidden] { display:none; }
.auth-phone-input .auth-field input,
.auth-phone-input input { height:42px; border:0; box-shadow:none; }
.auth-phone-input .auth-field input:focus,
.auth-phone-input input:focus { box-shadow:none; }
.auth-inline-field { display:grid; grid-template-columns:minmax(0, 1fr) 112px; gap:8px; }
#authPasswordGroup { display:none; }
#authPhoneCodeGroup { display:flex; }
.auth-code-btn { height:44px; justify-content:center; padding:0 12px; }
.auth-third-party { display:flex; flex-direction:column; align-items:center; gap:11px; margin-top:2px; }
.auth-divider { width:100%; display:flex; align-items:center; gap:12px; color:#7a706b; font-size:12px; }
.auth-divider::before,
.auth-divider::after { content:''; flex:1; height:1px; background:rgba(31,23,20,.12); }
.auth-social-list { display:flex; align-items:center; justify-content:center; gap:18px; }
.auth-social-btn {
  width:44px; height:44px; border:1px solid rgba(31,23,20,.1); border-radius:50%; background:rgba(255,255,255,.72);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:none; transition:transform .2s ease, border-color .2s ease;
}
.auth-social-btn:hover { transform:translateY(-1px); border-color:rgba(31,23,20,.3); }
.auth-social-btn svg { width:28px; height:28px; display:block; }
.auth-social-btn.douyin { background:#111; color:#fff; }
.auth-social-btn.qq { background:#eef7ff; color:#1683e9; }
.auth-social-glyph { font-size:18px; font-weight:900; line-height:1; letter-spacing:0; }
.auth-social-btn.qq .auth-social-glyph { font-size:16px; }
body.scan-login-active { overflow:hidden; }
body.scan-login-active #authShell { visibility:hidden; }
.modal-backdrop.auth-scan-modal {
  position:fixed; inset:0; z-index:2000; display:none; align-items:center; justify-content:center;
  width:100%; min-height:100vh; min-height:100dvh; padding:max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:#f8f7f2;
}
.modal-backdrop.auth-scan-modal.active { display:flex; }
.auth-scan-stage {
  position:relative; display:grid; justify-items:center; gap:20px; width:max-content; max-width:100%; outline:none;
}
.auth-scan-close {
  position:absolute; top:-52px; right:-52px; width:40px; height:40px; display:grid; place-items:center;
  border:1px solid rgba(31,23,20,.16); border-radius:50%; background:#f8f7f2; color:#403934;
  font:500 17px/1 inherit; cursor:pointer;
}
.auth-scan-close:hover { border-color:#c9a96e; color:#8a631d; }
.auth-scan-modal .auth-scan-qr {
  position:relative; display:grid; place-items:center; width:220px; height:220px; min-height:0;
  margin:0; padding:0; overflow:hidden; border:0; border-radius:0; box-shadow:none;
  background:#fff; color:#28231f; cursor:default; word-break:normal;
}
.auth-scan-modal .auth-scan-qr[role="button"] { cursor:pointer; }
.auth-scan-modal .auth-scan-qr[role="button"]:focus-visible { outline:2px solid #28231f; outline-offset:7px; }
.auth-scan-modal .auth-scan-qr img { display:block; width:100%; height:100%; object-fit:contain; }
.auth-scan-modal .auth-scan-qr.wechat-official-widget { width:300px; height:400px; background:transparent; overflow:hidden; }
.auth-scan-modal .auth-scan-qr.wechat-official-widget iframe { display:block; width:300px; height:400px; border:0; }
.auth-scan-modal .auth-scan-qr.is-scanned img { opacity:.55; }
.auth-scan-modal .auth-scan-qr.is-expired img { opacity:.34; }
.auth-scan-skeleton {
  width:100%; height:100%; background:linear-gradient(100deg,#eceae4 20%,#f5f3ed 42%,#eceae4 64%); background-size:240% 100%;
  animation:auth-scan-loading 1.4s ease-in-out infinite;
}
.auth-scan-state-icon { position:relative; display:block; width:72px; height:72px; color:#28231f; }
.auth-scan-success-mark::before {
  content:""; position:absolute; left:19px; top:13px; width:25px; height:42px;
  border-right:4px solid currentColor; border-bottom:4px solid currentColor; transform:rotate(42deg);
}
.auth-scan-retry-mark::before {
  content:"↻"; position:absolute; inset:0; display:grid; place-items:center;
  font:400 50px/1 system-ui,sans-serif; color:currentColor;
}
.auth-scan-refresh-overlay {
  position:absolute; inset:0; display:grid; place-items:center; background:rgba(248,247,242,.68);
}
.auth-scan-hint {
  max-width:320px; margin:0; text-align:center; color:#28231f;
  font-size:16px; font-weight:500; line-height:1.5; letter-spacing:0;
}
@keyframes auth-scan-loading { from { background-position:100% 0; } to { background-position:-100% 0; } }
@media (max-width:620px) {
  .modal-backdrop.auth-scan-modal {
    padding:max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }
  .auth-scan-modal .auth-scan-qr { width:180px; height:180px; }
  .auth-scan-modal .auth-scan-qr.wechat-official-widget { width:300px; height:400px; max-width:calc(100vw - 40px); }
  .auth-scan-close { top:-50px; right:0; }
}
@media (prefers-reduced-motion:reduce) {
  .auth-scan-skeleton { animation:none; background:#eceae4; }
}
.pill-btn.solid.auth-submit { height:46px; margin-top:4px; justify-content:center; border-radius:2px; background:#f05a43; border-color:#f05a43; color:#fff; }
.auth-auto-register-hint { margin:-4px 0 0; color:#716d66; font-size:11px; line-height:1.6; text-align:center; }
.auth-status { min-height:18px; font-size:12px; color:#6b615c; }
.auth-status.error { color:var(--red-seal); }
.phone-binding-modal { z-index:2050; background:rgba(32,23,19,.28); }
.phone-binding-card {
  position:relative; width:min(470px, 100%); max-height:calc(100dvh - 40px); overflow:auto;
  padding:30px; border:1px solid rgba(31,23,20,.16); border-radius:8px; background:#f8f7f2;
  box-shadow:0 18px 55px rgba(42,31,24,.16); color:#201713;
}
.phone-binding-accent { height:3px; margin:-30px -30px 26px; background:#c9a96e; }
.phone-binding-card h2 { margin:0; font-size:22px; line-height:1.35; letter-spacing:0; }
.phone-binding-card > p { margin:9px 0 22px; color:#6f6861; font-size:13px; line-height:1.7; }
.phone-binding-close {
  position:absolute; top:16px; right:16px; width:34px; height:34px; display:grid; place-items:center;
  border:1px solid rgba(31,23,20,.13); border-radius:50%; background:transparent; color:#6f6861; cursor:pointer;
}
.phone-binding-field { display:grid; gap:7px; margin-bottom:15px; color:#514942; font-size:12px; font-weight:600; }
.phone-binding-phone-input, .phone-binding-code-input {
  display:flex; align-items:center; min-height:46px; border:1px solid rgba(31,23,20,.16); border-radius:5px; background:#fff;
}
.phone-binding-phone-input:focus-within, .phone-binding-code-input:focus-within { border-color:#b48b43; box-shadow:0 0 0 3px rgba(201,169,110,.13); }
.phone-binding-phone-input b { padding:0 12px; border-right:1px solid rgba(31,23,20,.12); font-size:13px; }
.phone-binding-field input { min-width:0; flex:1; padding:11px 12px; border:0; outline:0; background:transparent; color:#201713; font:14px/1.5 inherit; }
.phone-binding-code-input button { align-self:stretch; padding:0 13px; border:0; border-left:1px solid rgba(31,23,20,.12); background:transparent; color:#8a631d; font:600 12px/1 inherit; cursor:pointer; }
.phone-binding-code-input button:disabled { color:#9d9892; cursor:default; }
.phone-binding-status { min-height:20px; margin:0 0 8px; color:#6f6861; font-size:12px; line-height:1.6; }
.phone-binding-status.error { color:#a74035; }
.phone-binding-submit { width:100%; min-height:46px; border:1px solid #b9934f; border-radius:5px; background:#c9a96e; color:#201713; font:700 14px/1 inherit; cursor:pointer; }
.phone-binding-submit:disabled { opacity:.55; cursor:default; }
.phone-binding-later { display:block; margin:13px auto 0; border:0; background:transparent; color:#6f6861; font:500 13px/1.4 inherit; cursor:pointer; }
.profile-phone-binding { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.profile-phone-binding button { padding:7px 11px; border:1px solid rgba(31,23,20,.16); border-radius:4px; background:#f8f7f2; color:#6c5223; font:600 12px/1 inherit; cursor:pointer; }
@media (max-width:620px) {
  .phone-binding-modal { padding:16px; align-items:flex-end; }
  .phone-binding-card { padding:24px 20px; border-radius:8px 8px 0 0; }
  .phone-binding-accent { margin:-24px -20px 22px; }
}
.auth-legal { margin:14px 0 0; color:#837872; font-size:10px; line-height:1.7; text-align:center; }
.auth-legal a { color:#514741; text-underline-offset:3px; }
.auth-legal a:hover { color:var(--red-seal); }
.auth-switch { margin-top:15px; color:#5f5550; font-size:12px; text-align:center; }
.link-btn { border:0; background:transparent; color:#201713; font-weight:800; cursor:pointer; padding:0; }
.auth-footer { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:7px 5vw; border-top:1px solid rgba(31,23,20,.12); background:#f6f4ed; color:#7f7a73; font-size:9px; }
.auth-footer a { color:#6d6862; text-decoration:none; }
.auth-footer a:hover { color:#f05a43; }

.sidebar {
  width:var(--sidebar-width); background:var(--ink-black); color:#fff;
  display:flex; flex-direction:column; flex-shrink:0; position:relative; z-index:10;
  transition:width 0.2s ease;
}
.sidebar.collapsed { width:var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar-brand .brand-cn,
.sidebar.collapsed .sidebar-brand .brand-en,
.sidebar.collapsed .sidebar-brand .brand-tagline,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-info { display:none; }
.sidebar.collapsed .nav-item { justify-content:center; padding:12px; }
.sidebar.collapsed .nav-item.active::before { display:none; }
.sidebar-brand { padding:28px 24px 20px; border-bottom:1px solid rgba(255,255,255,0.08); }
.brand-cn { font-size:22px; font-weight:700; letter-spacing:4px; color:var(--gold); }
.brand-en { font-size:10px; color:rgba(255,255,255,0.35); letter-spacing:2px; margin-top:4px; font-family:"Georgia",serif; }
.brand-tagline { font-size:11px; color:var(--gold-light); margin-top:8px; opacity:0.6; line-height:1.5; }
.sidebar-nav { flex:1; padding:16px 12px; display:flex; flex-direction:column; gap:2px; overflow-y:auto; }
.nav-section-title { font-size:10px; color:rgba(255,255,255,0.25); letter-spacing:2px; padding:16px 12px 8px; }
.nav-item {
  display:flex; align-items:center; gap:12px; padding:10px 16px; border-radius:var(--radius-sm);
  cursor:pointer; transition:all 0.2s; font-size:14px; color:rgba(255,255,255,0.65); position:relative;
}
.nav-item:hover { background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.9); }
.nav-item.active {
  background:linear-gradient(135deg,rgba(201,169,110,0.15),rgba(201,169,110,0.05));
  color:var(--gold); font-weight:500;
}
.nav-item.active::before {
  content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:3px; height:20px; background:var(--gold); border-radius:0 3px 3px 0;
}
.nav-icon { width:20px; height:20px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.nav-badge { margin-left:auto; background:var(--red-seal); color:#fff; font-size:10px; padding:1px 7px; border-radius:10px; font-weight:600; }
.sidebar-user { padding:16px 20px; border-top:1px solid rgba(255,255,255,0.08); display:flex; align-items:center; gap:12px; }
.user-avatar {
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,var(--gold),var(--gold-light));
  display:flex; align-items:center; justify-content:center;
  font-size:14px; font-weight:700; color:var(--ink-black); flex-shrink:0;
}
.user-info { flex:1; min-width:0; }
.user-name { font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-plan { font-size:11px; color:var(--gold-light); opacity:0.7; }

.main-content { flex:1; display:flex; flex-direction:column; min-width:0; background:var(--paper); }
.topbar {
  height:60px; border-bottom:1px solid var(--cream-dark);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 var(--topbar-pad); background:rgba(250,248,242,0.95); backdrop-filter:blur(8px);
  position:sticky; top:0; z-index:5;
}
.topbar-left { display:flex; align-items:center; gap:16px; }
.topbar-left #sidebarToggle { display:none; }
.breadcrumb { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-gray); }
.breadcrumb .current { color:var(--ink-black); font-weight:500; }
.topbar-right { display:flex; align-items:center; gap:12px; }
.top-btn {
  width:36px; height:36px; border-radius:50%; border:1px solid var(--cream-dark); background:#fff;
  display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.2s;
  font-size:16px; position:relative;
}
.top-btn:hover { border-color:var(--gold); background:var(--cream); }
.top-btn .dot { position:absolute; top:6px; right:6px; width:8px; height:8px; background:var(--red-seal); border-radius:50%; border:2px solid #fff; }
.top-btn:disabled, .btn-primary:disabled, .btn-outline:disabled, .input-btn:disabled { opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }
.btn-primary {
  padding:8px 20px; background:linear-gradient(135deg,var(--gold),var(--gold-light));
  color:var(--ink-black); border:none; border-radius:var(--radius-sm);
  font-size:13px; font-weight:600; cursor:pointer; transition:all 0.2s;
  font-family:inherit; letter-spacing:1px;
}
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 4px 16px rgba(201,169,110,0.3); }
.btn-outline {
  padding:8px 20px; background:transparent; color:var(--ink-black); border:1px solid var(--cream-dark);
  border-radius:var(--radius-sm); font-size:13px; cursor:pointer; transition:all 0.2s; font-family:inherit;
}
.btn-outline:hover { border-color:var(--gold); color:var(--gold); }

.page-body { flex:1; padding:var(--page-pad); overflow-y:auto; min-width:0; }
.page-title { font-size:24px; font-weight:700; letter-spacing:2px; margin-bottom:4px; }
.page-subtitle { font-size:14px; color:var(--ink-gray); margin-bottom:32px; }

#pageMode { container-type:inline-size; flex-direction:column; }
#pageMode .page-title { font-size:clamp(24px, 1.8cqw, 32px); }
#pageMode .page-subtitle { font-size:clamp(14px, 1.05cqw, 18px); margin-bottom:clamp(28px, 3cqw, 50px); }
.mode-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  grid-template-rows:repeat(2, minmax(0, 1fr));
  flex:1;
  min-height:0;
  gap:clamp(20px, 1.7cqw, 32px);
  margin-bottom:0;
}
.mode-card {
  background:#fff; border-radius:clamp(8px, .8cqw, 12px);
  padding:clamp(22px, 1.9cqw, 40px) clamp(22px, 1.7cqw, 36px);
  cursor:pointer; transition:all 0.3s; border:2px solid transparent; position:relative; overflow:hidden;
  min-width:0;
}
.mode-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }
.mode-card.selected {
  border-color:var(--gold);
  background:linear-gradient(135deg,rgba(201,169,110,0.03),rgba(201,169,110,0.08));
}
.mode-card.locked-mode {
  opacity:.58; filter:saturate(.72); border-style:dashed;
}
.mode-card.locked-mode:hover { transform:none; box-shadow:none; }
.mode-icon {
  width:clamp(48px, 3.8cqw, 72px); height:clamp(48px, 3.8cqw, 72px);
  border-radius:clamp(8px, .85cqw, 12px); display:flex; align-items:center; justify-content:center;
  font-size:clamp(24px, 1.9cqw, 34px); margin-bottom:clamp(16px, 1.35cqw, 26px);
  flex-shrink:0;
}
.mode-card.jinggong .mode-icon { background:linear-gradient(135deg,#fff3e0,#ffe0b2); }
.mode-card.lingsu .mode-icon { background:linear-gradient(135deg,#e8f5e9,#c8e6c9); }
.mode-card.linggan .mode-icon { background:linear-gradient(135deg,#e3f2fd,#bbdefb); }
.mode-card.fuhua .mode-icon { background:linear-gradient(135deg,#f3e5f5,#e1bee7); }
.mode-name {
  font-size:clamp(18px, 1.25cqw, 24px); font-weight:700;
  margin-bottom:clamp(8px, .7cqw, 12px); display:flex; align-items:center;
  gap:clamp(8px, .7cqw, 12px); flex-wrap:wrap; line-height:1.25;
}
.mode-tag {
  font-size:clamp(10px, .72cqw, 13px); padding:3px clamp(7px, .62cqw, 11px);
  border-radius:10px; font-weight:500; white-space:nowrap;
}
.mode-access {
  margin-left:auto; font-size:clamp(10px, .72cqw, 13px); padding:3px clamp(7px, .62cqw, 11px);
  border-radius:999px; background:rgba(26,26,46,.06); color:var(--ink-gray); font-weight:700; white-space:nowrap;
}
.mode-access.locked-access { background:#fff3e0; color:#b45f06; }
.mode-card.jinggong .mode-tag { background:#fff3e0; color:#e65100; }
.mode-card.lingsu .mode-tag { background:#e8f5e9; color:#2e7d32; }
.mode-card.linggan .mode-tag { background:#e3f2fd; color:#1565c0; }
.mode-card.fuhua .mode-tag { background:#f3e5f5; color:#6a1b9a; }
.mode-desc {
  font-size:clamp(13px, .88cqw, 16px); color:var(--ink-gray);
  line-height:1.65; margin-bottom:clamp(12px, 1.05cqw, 20px); overflow-wrap:anywhere;
}
.mode-meta {
  display:flex; flex-wrap:wrap; gap:clamp(8px, .85cqw, 16px);
  font-size:clamp(11px, .75cqw, 13px); color:var(--ink-light);
}
.mode-meta-item { display:flex; align-items:center; gap:4px; min-width:0; }
.mode-card[onclick*="profile"] > div:first-child {
  font-size:clamp(28px, 2.35cqw, 42px) !important;
  margin-bottom:clamp(16px, 1.25cqw, 24px) !important;
}
.mode-card[onclick*="profile"] > div:nth-child(2) {
  font-size:clamp(18px, 1.25cqw, 24px) !important;
}
.mode-card[onclick*="profile"] > div:nth-child(3) {
  font-size:clamp(13px, .88cqw, 16px) !important;
}

.section-title-bar { font-size:16px; font-weight:600; margin-bottom:16px; display:flex; align-items:center; justify-content:space-between; }
.project-list { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap:16px; }
.project-card { background:#fff; border-radius:var(--radius); padding:20px; border:1px solid var(--cream-dark); cursor:pointer; transition:all 0.2s; min-width:0; }
.project-card:hover { border-color:var(--gold); box-shadow:var(--shadow); }
.project-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:12px; }
.project-name { font-size:15px; font-weight:600; }
.project-stage-tag { font-size:11px; padding:3px 10px; border-radius:10px; font-weight:600; }
.tag-active { background:#fff3e0; color:#e65100; }
.tag-done { background:#e8f5e9; color:#2e7d32; }
.tag-paused { background:#f3e5f5; color:#6a1b9a; }
.project-info { font-size:12px; color:var(--ink-gray); line-height:1.8; }
.project-bar { margin-top:16px; height:4px; background:var(--cream); border-radius:2px; overflow:hidden; }
.project-bar-fill { height:100%; background:linear-gradient(90deg,var(--gold),var(--gold-light)); border-radius:2px; }
.project-footer { display:flex; align-items:center; justify-content:space-between; margin-top:12px; font-size:11px; color:var(--ink-light); }
.project-card.selected-project { border-color:var(--gold); box-shadow:var(--shadow); }

.project-action-modal {
  position:fixed; inset:0; z-index:1100; display:flex; align-items:center; justify-content:center;
  padding:24px; background:rgba(26,26,46,.4); animation:fadeIn .15s;
}
.project-action-modal .modal-box {
  background:#fff; border-radius:var(--radius-sm); box-shadow:var(--shadow-lg); padding:24px;
  width:100%; animation:slideUp .2s;
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes slideUp { from { opacity:0; transform:translateY(12px) } to { opacity:1; transform:translateY(0) } }

.chat-layout { display:flex; flex:1; min-height:0; position:relative; }
.chat-main { flex:1; display:flex; flex-direction:column; min-width:0; position:relative; }
/* 精工模式对用户隐藏阶段信息 */
.chat-stage-badges, #progressToggle, #modeProgressList, #workflowActionCard, #progressTitle { display:none !important; }
.stage-progress-panel { display:none !important; }

/* Workspace Tabs */
.workspace-tabs { display:flex; gap:0; padding:0 16px; border-bottom:1px solid var(--cream-dark); background:#fff; flex-shrink:0; }
.workspace-tab { padding:10px 16px; border:none; background:transparent; color:var(--ink-gray); font-size:13px; font-weight:500; cursor:pointer; border-bottom:2px solid transparent; font-family:inherit; }
.workspace-tab:hover { color:var(--ink-black); }
.workspace-tab.active { color:var(--gold); border-bottom-color:var(--gold); font-weight:700; }
.workspace-tab-content { display:none; flex:1; min-height:0; flex-direction:column; }
.workspace-tab-content.active { display:flex; }

/* More menu */
.workspace-more-menu { position:absolute; right:0; top:100%; min-width:160px; padding:6px; background:#fff; border:1px solid var(--cream-dark); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,0.12); z-index:20; display:none; flex-direction:column; }
.workspace-more-menu.show { display:flex; }
.workspace-more-menu button { width:100%; border:0; background:transparent; padding:8px 12px; text-align:left; font:inherit; font-size:13px; color:var(--ink-black); cursor:pointer; border-radius:6px; }
.workspace-more-menu button:hover { background:#f8fafc; color:var(--gold); }
.topbar-right { position:relative; }
.drag-overlay { position:absolute; inset:0; z-index:100; background:rgba(37,99,235,0.08); border:3px dashed var(--gold); border-radius:12px; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.drag-hint { padding:16px 32px; background:#fff; border-radius:12px; font-size:16px; font-weight:700; color:var(--gold); box-shadow:0 4px 24px rgba(0,0,0,0.1); }
.chat-header {
  padding:16px var(--page-pad); border-bottom:1px solid var(--cream-dark);
  display:flex; align-items:center; justify-content:space-between; background:#fff;
}
.chat-header-left { display:flex; align-items:center; gap:16px; }
.chat-project-name {
  font-size:15px; font-weight:700; padding:6px 14px;
  background:var(--paper); border:1px solid var(--cream-dark); border-radius:8px;
  cursor:pointer; transition:all .2s; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.chat-project-name:hover { border-color:var(--gold); background:#fffaf0; }
.chat-stage-badges { display:flex; gap:6px; flex-wrap:wrap; }
.stage-badge-tag { font-size:11px; padding:3px 10px; border-radius:10px; font-weight:500; border:1px solid; }
.stage-badge-tag.done { background:#e3f2fd; color:#1565c0; border-color:#bbdefb; }
.stage-badge-tag.active-stage { background:#fff3e0; color:#e65100; border-color:#ffe0b2; }
.stage-badge-tag.needs-confirmation { background:#fff7e6; color:#9a5b00; border-color:#d7b46a; }
.stage-badge-tag.pending { background:var(--cream); color:var(--ink-light); border-color:var(--cream-dark); }
.chat-body { flex:1; padding:var(--page-pad); overflow-y:auto; display:flex; flex-direction:column; gap:24px; min-width:0; }
.empty-state {
  min-height:220px; display:flex; align-items:center; justify-content:center; text-align:center;
  color:var(--ink-light); border:1px dashed var(--cream-dark); border-radius:var(--radius);
  background:rgba(255,255,255,0.45); line-height:1.8; font-size:13px;
}
.chat-timestamp { text-align:center; font-size:11px; color:#b0a89c; padding:12px 0 4px; user-select:none; }
.bubble-row { display:flex; gap:12px; max-width:min(780px, 100%); }
.bubble-row.user-row { flex-direction:row-reverse; align-self:flex-end; }
.bubble-row.ai-row { align-self:flex-start; }
.bubble-avatar { width:36px; height:36px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.bubble-avatar.ai-avatar { background:linear-gradient(135deg,var(--ink-black),#2d2d4a); color:var(--gold); }
.bubble-avatar.human-avatar { background:linear-gradient(135deg,var(--gold),var(--gold-light)); color:var(--ink-black); }
.bubble { padding:16px 20px; border-radius:16px; font-size:14px; line-height:1.8; max-width:min(820px, 100%); overflow-wrap:anywhere; }
.bubble-row.ai-row .bubble { background:#fff; border:1px solid var(--cream-dark); border-top-left-radius:4px; }
.reasoning-block {
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid #eadfca;
  border-radius:8px;
  background:#fbf8f1;
  color:#6f675b;
  font-size:12.5px;
  line-height:1.7;
}
.reasoning-title {
  font-size:12px;
  font-weight:700;
  color:#9a7b3f;
  margin-bottom:4px;
}
.reasoning-body { max-height:220px; overflow:auto; }
.answer-body { min-width:0; }
.typing-indicator { display:flex; align-items:center; gap:5px; padding:4px 0; }
.typing-indicator span { width:8px; height:8px; border-radius:50%; background:var(--ink-gray); opacity:0.4; animation:typingDot 1.4s infinite ease-in-out; }
.typing-indicator span:nth-child(2) { animation-delay:0.2s; }
.typing-indicator span:nth-child(3) { animation-delay:0.4s; }
@keyframes typingDot { 0%,80%,100%{opacity:0.3;transform:scale(0.8)} 40%{opacity:1;transform:scale(1.1)} }
.bubble-row.user-row .bubble { background:linear-gradient(135deg,var(--ink-black),#2d2d4a); color:#fff; border-top-right-radius:4px; }
.anchor-snapshot {
  background:linear-gradient(135deg,rgba(201,169,110,0.08),rgba(201,169,110,0.03));
  border:1px solid rgba(201,169,110,0.2); border-radius:var(--radius-sm);
  padding:16px; margin:12px 0; font-size:13px;
}
.anchor-title { font-weight:600; color:var(--gold); margin-bottom:8px; font-size:12px; letter-spacing:1px; }

.project-cognition-system-row {
  align-self:stretch;
  width:min(780px,100%);
}
.project-cognition-card {
  width:100%;
  padding:14px 16px;
  border:1px solid rgba(201,169,110,.28);
  border-radius:var(--radius-sm);
  background:linear-gradient(135deg,rgba(201,169,110,.08),rgba(201,169,110,.025));
}
.project-production-plan-card {
  width:100%; padding:16px; border:1px solid #dfcfaa; border-radius:var(--radius-sm);
  background:#fffdf8; box-shadow:0 8px 22px rgba(69,54,26,.06);
}
.project-production-plan-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.project-production-plan-heading { color:var(--ink-black); font-size:15px; font-weight:700; }
.project-production-plan-status { flex:0 0 auto; padding:3px 8px; border-radius:999px; background:var(--cream-dark); color:var(--ink-gray); font-size:11px; font-weight:600; }
.project-production-plan-status.status-draft,
.project-production-plan-status.status-failed,
.project-production-plan-status.status-review-failed { background:#fff0dc; color:#8a5416; }
.project-production-plan-status.status-executing,
.project-production-plan-status.status-assembling { background:#eef4ff; color:#355b91; }
.project-production-plan-status.status-reviewing { background:#edf7ef; color:#367143; }
.project-production-plan-summary,
.project-production-plan-notice { margin:8px 0 0; color:var(--ink-gray); font-size:12px; line-height:1.65; }
.project-production-plan-progress { height:6px; margin-top:11px; overflow:hidden; border-radius:999px; background:var(--cream-dark); }
.project-production-plan-progress > span { display:block; height:100%; border-radius:inherit; background:var(--gold); }
.project-production-plan-details { margin-top:12px; border-top:1px solid var(--cream-dark); padding-top:10px; }
.project-production-plan-details summary { color:var(--gold-d); cursor:pointer; font-size:12px; font-weight:600; }
.project-production-plan-details summary:focus-visible,
.project-production-plan-review-issues summary:focus-visible,
.project-production-plan-confirm:focus-visible,
.project-production-plan-review-retry:focus-visible { outline:3px solid rgba(201,169,110,.35); outline-offset:2px; }
.project-production-plan-units { display:grid; gap:7px; margin:10px 0 0; padding-left:22px; }
.project-production-plan-units li { padding-left:3px; color:var(--ink-black); font-size:12px; }
.project-production-plan-units li span { display:block; }
.project-production-plan-units li small { display:block; margin-top:2px; color:var(--ink-light); font-size:11px; }
.project-production-plan-actions { display:flex; justify-content:flex-end; margin-top:12px; }
.project-production-plan-confirm,
.project-production-plan-review-retry { min-height:36px; }
.project-production-plan-confirm:disabled,
.project-production-plan-review-retry:disabled { cursor:wait; opacity:.62; }
.project-production-plan-review-issues { margin-top:12px; padding:10px 12px; border:1px solid rgba(180,83,9,.25); border-radius:10px; background:#fff8ed; }
.project-production-plan-review-issues summary { color:#7e5720; cursor:pointer; font-size:12px; font-weight:700; }
.project-production-plan-review-issues ul { display:grid; gap:8px; margin:10px 0 0; padding-left:18px; }
.project-production-plan-review-issues li { color:var(--ink-gray); font-size:12px; line-height:1.55; }
.project-production-plan-review-issues li strong,
.project-production-plan-review-issues li span { display:block; }
.project-production-plan-review-issues li strong { color:var(--ink-black); }
.project-production-plan-draft-downloads { margin-top:12px; padding:10px 12px; border:1px solid rgba(201,169,110,.3); border-radius:10px; background:#fffdf8; }
.project-production-plan-draft-downloads p { margin:0; color:var(--ink-gray); font-size:12px; line-height:1.6; }
.project-production-plan-draft-downloads > div { display:flex; flex-wrap:wrap; gap:8px; margin-top:9px; }
.project-production-plan-draft-download { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:6px 11px; text-decoration:none; font-size:12px; }
.project-production-plan-draft-download:focus-visible { outline:3px solid rgba(201,169,110,.35); outline-offset:2px; }
@media (prefers-reduced-motion:reduce) {
  .project-production-plan-row,
  .project-production-plan-card * { animation:none!important; transition:none!important; }
}
.project-cognition-heading,
.project-cognition-insight-heading { color:var(--gold-d); font-size:14px; font-weight:700; }
.project-cognition-insight-heading { margin-top:14px; }
.project-cognition-notice { margin:4px 0 12px; color:var(--ink-gray); font-size:12px; line-height:1.65; }
.project-cognition-empty { margin:10px 0 0; color:var(--ink-gray); font-size:13px; line-height:1.6; }
.project-cognition-snapshot {
  border:1px solid #eadfc4; border-radius:10px; background:#fffdf8; padding:10px 12px;
}
.project-cognition-snapshot summary { color:var(--gold-d); cursor:pointer; font-size:12px; font-weight:600; }
.project-cognition-snapshot summary:focus-visible,
.project-fact-actions button:focus-visible,
.project-insight-candidate-actions button:focus-visible { outline:3px solid rgba(201,169,110,.35); outline-offset:2px; }
.project-cognition-facts { margin:10px 0 0; padding-left:20px; color:var(--ink-gray); font-size:12px; line-height:1.75; }
.project-cognition-facts li + li { margin-top:8px; }
.project-cognition-observer-health { margin:10px 0 12px; border:1px solid color-mix(in srgb, var(--gold) 32%, transparent); border-radius:10px; padding:9px 11px; background:color-mix(in srgb, var(--gold) 5%, transparent); }
.project-cognition-observer-health summary { color:var(--ink-gray); cursor:pointer; font-size:12px; font-weight:600; }
.project-cognition-observer-health summary:focus-visible { outline:2px solid var(--gold); outline-offset:3px; border-radius:4px; }
.project-observer-gap-list { display:grid; gap:8px; margin-top:10px; }
.project-observer-gap-item { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--ink-gray); font-size:12px; }
.project-observer-gap-retry { flex:0 0 auto; min-height:32px; padding:5px 10px; }
.project-observer-gap-retry:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
@media (max-width: 640px) {
  .project-observer-gap-item { align-items:flex-start; flex-direction:column; }
  .project-observer-gap-retry { width:100%; }
}
.project-fact-actions { display:inline-flex; flex-wrap:wrap; gap:6px; margin-left:8px; vertical-align:middle; }
.project-fact-actions button { min-height:28px; padding:3px 9px; font-size:11px; line-height:1.3; }
.project-fact-actions button:disabled { cursor:wait; opacity:.6; }
.project-insight-candidate-item { padding:12px; border:1px solid #eadfc4; border-radius:10px; background:var(--gold-50); }
.project-insight-candidate-item + .project-insight-candidate-item { margin-top:9px; }
.project-insight-candidate-meta { color:var(--gold-d); font-size:11px; font-weight:600; }
.project-insight-candidate-title { display:block; margin-top:4px; color:var(--ink-black); font-size:13px; }
.project-insight-candidate-summary { margin-top:5px; color:var(--ink-gray); font-size:13px; line-height:1.65; }
.project-insight-candidate-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.project-insight-candidate-actions button { min-width:72px; padding:6px 12px; font-size:12px; }
.project-insight-candidate-actions button:disabled { cursor:wait; opacity:.6; }

.chat-input-area { padding:16px var(--page-pad) 24px; background:#fff; border-top:1px solid var(--cream-dark); }
.chat-input-box {
  display:flex; align-items:flex-end; gap:12px; background:var(--cream);
  border-radius:var(--radius); padding:12px 16px; border:2px solid transparent; transition:all 0.2s;
}
.chat-input { flex:1; border:none; background:transparent; font-size:14px; font-family:inherit; resize:none; outline:none; min-height:24px; max-height:120px; line-height:1.6; color:var(--ink-black); }
.chat-input::placeholder { color:var(--ink-light); }
.input-btn {
  width:36px; height:36px; border-radius:50%; border:none; background:transparent;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  font-size:18px; transition:all 0.2s; color:var(--ink-light);
}
.input-btn:hover { background:var(--cream-dark); color:var(--ink-black); }
.input-btn.send-btn { background:var(--gold); color:var(--ink-black); }
.input-btn.send-btn:hover { background:var(--gold-light); }
.input-btn.send-btn.is-empty,
.input-btn.send-btn:disabled {
  opacity:0.48;
  cursor:default;
}
.input-btn.send-btn.is-empty:hover,
.input-btn.send-btn:disabled:hover {
  background:var(--gold);
  color:var(--ink-black);
}
.hidden-file { display:none; }
.attachment-strip { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.attachment-chip {
  display:inline-flex; align-items:center; gap:6px; max-width:240px; padding:5px 10px;
  border-radius:999px; background:var(--cream); border:1px solid var(--cream-dark);
  color:var(--ink-gray); font-size:11px;
}
.attachment-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attachment-chip small { color:var(--ink-light); font-size:11px; white-space:nowrap; }
.attachment-remove-btn {
  width:18px; height:18px; border:0; border-radius:50%; padding:0; margin-left:2px;
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  background:transparent; color:var(--ink-light); font:inherit; font-size:14px; line-height:1; cursor:pointer;
}
.attachment-remove-btn:hover { background:rgba(180,35,24,.1); color:var(--red-seal); }
.attachment-chip.extracting,
.attachment-chip.indexing { border-color:rgba(201,169,110,0.62); background:#fffaf0; }
.attachment-chip.indexed,
.attachment-chip.mock_indexed { border-color:rgba(39,174,96,0.35); background:#f7fbf8; }
.reference-card { border:1px solid var(--cream-dark); border-radius:var(--radius-sm); background:#fffdf8; padding:12px; color:var(--ink-black); }
.reference-title { font-weight:800; margin-bottom:8px; }
.reference-item { display:grid; gap:4px; padding:8px 0; border-top:1px solid rgba(214,202,181,0.5); }
.reference-item:first-of-type { border-top:0; padding-top:0; }
.reference-item span { color:var(--ink-light); font-size:12px; line-height:1.6; }
.input-status { font-size:11px; color:var(--ink-light); margin-top:8px; text-align:center; min-height:16px; }
.input-status.error { color:var(--red-seal); }
.compliance-bar { font-size:11px; color:var(--ink-light); text-align:center; margin-top:4px; padding:4px 0; opacity:0.7; letter-spacing:0.5px; }

/* 知识库引用面板 */
.reference-strip { display:flex; flex-wrap:wrap; gap:6px; padding:8px 16px 4px; }
.ref-tag { display:inline-flex; align-items:center; gap:4px; background:var(--cream); border:1px solid var(--cream-dark); border-radius:12px; padding:3px 10px; font-size:12px; color:var(--ink-black); max-width:200px; }
.ref-tag-source { font-size:10px; color:var(--gold); font-weight:600; }
.ref-tag-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ref-tag-remove { cursor:pointer; color:var(--ink-light); font-size:14px; line-height:1; margin-left:2px; }
.ref-tag-remove:hover { color:var(--red-seal); }
.ref-panel { position:absolute; bottom:100%; left:0; right:0; background:#fff; border:1px solid var(--cream-dark); border-bottom:none; border-radius:var(--radius) var(--radius) 0 0; box-shadow:0 -4px 16px rgba(0,0,0,0.08); max-height:280px; display:flex; flex-direction:column; z-index:100; }
.ref-panel-header { display:flex; align-items:center; gap:8px; padding:10px 14px; border-bottom:1px solid var(--cream-dark); }
.ref-search-input { flex:1; border:1px solid var(--cream-dark); border-radius:var(--radius-sm); padding:6px 10px; font-size:13px; outline:none; }
.ref-search-input:focus { border-color:var(--gold); }
.ref-panel-close { background:none; border:none; font-size:20px; cursor:pointer; color:var(--ink-light); padding:0 4px; }
.ref-panel-results { overflow-y:auto; flex:1; padding:4px 0; }
.ref-result-item { display:flex; align-items:center; gap:10px; padding:8px 14px; cursor:pointer; transition:background 0.15s; }
.ref-result-item:hover { background:var(--cream); }
.ref-result-item.selected { background:rgba(201,169,110,0.12); }
.ref-result-source { font-size:10px; font-weight:600; color:#fff; background:var(--gold); border-radius:3px; padding:1px 5px; flex-shrink:0; }
.ref-result-source.public { background:#6b8e7b; }
.ref-result-info { flex:1; min-width:0; }
.ref-result-title { font-size:13px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ref-result-desc { font-size:11px; color:var(--ink-light); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px; }
.chat-input-area { position:relative; }

.stage-progress-panel {
  width:var(--stage-panel-width); background:#fff; border-left:1px solid var(--cream-dark);
  padding:24px 20px; flex-shrink:0; overflow-y:auto;
}
.stage-progress-panel.collapsed { display:none; }
.progress-title { font-size:13px; font-weight:600; letter-spacing:1px; color:var(--ink-gray); margin-bottom:20px; }
.stage-list-vertical { display:flex; flex-direction:column; position:relative; }
.stage-list-vertical::before { content:''; position:absolute; left:15px; top:20px; bottom:20px; width:2px; background:var(--cream-dark); }
.stage-list-item { display:flex; align-items:flex-start; gap:16px; padding:12px 0; position:relative; }
.stage-dot-circle { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex-shrink:0; z-index:1; }
.stage-dot-circle.done-circle { background:var(--green-bamboo); color:#fff; }
.stage-dot-circle.active-circle { background:var(--gold); color:var(--ink-black); box-shadow:0 0 0 4px rgba(201,169,110,0.2); }
.stage-dot-circle.confirm-circle { background:#fff7e6; color:#9a5b00; border:2px solid #d7b46a; }
.stage-dot-circle.pending-circle { background:var(--cream); color:var(--ink-light); border:2px solid var(--cream-dark); }
.stage-text { flex:1; padding-top:4px; }
.stage-text .stage-label { font-size:13px; font-weight:500; }
.stage-text .stage-desc { font-size:11px; color:var(--ink-light); margin-top:2px; }

.quality-card { background:#fff; border-radius:var(--radius); padding:20px; border:1px solid var(--cream-dark); margin-top:20px; }
.quality-title { font-size:14px; font-weight:600; margin-bottom:12px; }
.quality-bar-row { display:flex; align-items:center; gap:12px; margin-bottom:8px; }
.quality-dim { font-size:12px; color:var(--ink-gray); width:100px; flex-shrink:0; }
.quality-bar-bg { flex:1; height:8px; background:var(--cream); border-radius:4px; overflow:hidden; }
.quality-bar-fill { height:100%; border-radius:4px; }
.quality-score-num { font-size:12px; font-weight:600; width:28px; text-align:right; }
.quality-total {
  text-align:center; padding:12px; background:linear-gradient(135deg,var(--ink-black),#2d2d4a);
  border-radius:var(--radius-sm); color:var(--gold); margin-top:12px;
}
.quality-total .big-num { font-size:32px; font-weight:700; }
.quality-total .total-label { font-size:11px; opacity:0.6; }
.side-card { background:#fff; border-radius:var(--radius); padding:18px; border:1px solid var(--cream-dark); margin-top:20px; }
.side-card-title { font-size:14px; font-weight:600; margin-bottom:10px; }
.side-card-body { font-size:12px; color:var(--ink-gray); line-height:1.7; }
.side-card-actions { display:flex; gap:8px; margin-top:12px; }
.side-card-actions button { flex:1; justify-content:center; display:flex; padding:6px 8px; font-size:12px; }
.route-profile-grid { display:grid; grid-template-columns:repeat(4, minmax(120px, 1fr)); gap:10px; margin-bottom:12px; }
.route-profile-grid > div { padding:12px; border:1px solid var(--cream-dark); border-radius:8px; background:#faf8f2; min-width:0; }
.route-profile-grid span { display:block; color:var(--ink-light); font-size:11px; margin-bottom:4px; }
.route-profile-grid b { display:block; color:var(--ink-black); font-size:13px; line-height:1.35; overflow-wrap:anywhere; }
.route-profile-line { margin-top:8px; color:var(--ink-gray); }
.supplement-list { margin-top:12px; padding-top:10px; border-top:1px solid var(--cream-dark); }
.supplement-list > b { display:block; margin-bottom:8px; color:var(--ink-black); }
.supplement-item {
  display:grid; grid-template-columns:72px minmax(0, 1fr); gap:8px; align-items:flex-start;
  padding:8px 0; border-top:1px solid rgba(226,218,204,.55);
}
.supplement-item:first-of-type { border-top:0; }
.supplement-item span {
  display:inline-flex; align-items:center; justify-content:center; min-height:22px;
  border-radius:999px; background:#f2f4f7; color:var(--ink-gray); font-size:11px; font-weight:700;
}
.supplement-item strong { display:block; color:var(--ink-black); font-size:12px; line-height:1.45; }
.supplement-item em { display:block; margin-top:2px; color:var(--ink-gray); font-style:normal; font-size:12px; line-height:1.5; }
.artifact-preview { margin-top:10px; padding-top:10px; border-top:1px solid var(--cream-dark); }
.artifact-list { margin:8px 0 0 16px; padding:0; display:flex; flex-direction:column; gap:6px; }
.artifact-list li { line-height:1.55; }
.artifact-list span { color:var(--ink-light); }
.artifact-note { margin-top:8px; padding:8px 10px; border-radius:var(--radius-sm); background:var(--cream); color:var(--ink-gray); }
.artifact-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.artifact-tags span { font-size:10px; padding:3px 8px; border-radius:999px; background:#fff7e6; color:#9a5b00; border:1px solid #ead49c; }

.conversation-queue {
  position:relative; width:100%; max-width:820px; margin:0 auto 4px;
  color:var(--ink-gray); font-size:14px; line-height:1;
}
.conversation-queue[hidden] { display:none; }
.conversation-queue-count {
  height:13px; padding:0 8px 2px; text-align:right; color:var(--ink-light); font-size:11px;
}
.conversation-queue-list { display:flex; flex-direction:column; gap:2px; }
.conversation-queue-row {
  display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:6px;
  min-height:28px; padding:0 8px; border:1px solid rgba(226,218,204,.58); border-radius:6px;
  background:rgba(255,255,255,.94); overflow:hidden;
}
.conversation-queue-row.is-recoverable {
  border-color:rgba(201,169,110,.5); background:rgba(255,250,239,.96);
}
.conversation-queue-row.is-running {
  border-color:rgba(201,169,110,.68); background:var(--gold-bg);
}
.conversation-queue-row.is-recoverable .conversation-queue-icon { color:var(--gold-d); }
.conversation-queue-row.is-recoverable .conversation-queue-text strong { color:var(--gold-d); font-weight:700; }
.conversation-queue-icon { color:var(--ink-light); font-size:10px; line-height:1; }
.conversation-queue-text {
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:var(--ink-black); font-size:14px; line-height:1.2;
}
.conversation-queue-actions { display:flex; align-items:center; gap:2px; white-space:nowrap; }
.conversation-queue-actions button {
  appearance:none; border:0; background:transparent; color:var(--ink-light); cursor:pointer;
  font:inherit; font-size:12px; line-height:1; margin:0; padding:0;
}
.queue-run-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:3px; min-width:48px; height:22px;
  padding:0 7px !important; border:1px solid rgba(201,169,110,.62) !important;
  border-radius:5px !important; background:#fff !important; color:var(--gold-d) !important; font-weight:700 !important;
}
.queue-run-btn > span:first-child { font-size:8px; }
.queue-run-btn:hover:not(:disabled) { background:var(--gold-bg) !important; }
.queue-run-btn:disabled { cursor:not-allowed; opacity:.52; }
.queue-run-btn.is-loading { opacity:1; }
.queue-steer-btn {
  display:inline-flex; align-items:center; gap:2px; height:18px; padding:0 3px !important;
  border-radius:4px !important;
}
.queue-steer-btn > span:first-child { font-size:10px; }
.queue-steer-btn:hover, .queue-steer-btn.is-active { background:var(--gold-bg); color:var(--gold-d); }
.queue-steer-btn:disabled { cursor:default; opacity:1; }
.queue-recover-btn {
  height:22px; padding:0 7px !important; border:1px solid rgba(201,169,110,.58) !important;
  border-radius:5px !important; background:#fff !important; color:var(--gold-d) !important; font-weight:700 !important;
}
.queue-recover-btn:hover { background:var(--gold-bg) !important; }
.conversation-queue-actions button:focus-visible { outline:2px solid var(--gold-d); outline-offset:2px; }
.queue-icon-btn {
  position:relative; display:inline-grid; place-items:center; width:18px; height:18px;
  border-radius:4px !important; font-size:10px !important;
}
.queue-icon-btn:hover { background:var(--cream); color:var(--ink-black); }
.queue-more-btn small {
  position:absolute; right:-2px; bottom:-1px; min-width:10px; padding:1px 2px; border-radius:5px;
  background:var(--cream-dark); color:var(--ink-gray); font-size:7px; line-height:1;
}
.queue-full-hint {
  align-self:flex-end; margin:-2px 0 2px; color:var(--ink-light); font-size:9px; line-height:1.2;
}

@media (max-width:620px) {
  .conversation-queue-row { grid-template-columns:8px minmax(0,1fr) auto; gap:4px; padding:2px 6px; }
  .conversation-queue-actions { gap:1px; }
  .queue-run-btn { min-width:44px; padding:0 5px !important; }
  .queue-steer-btn > span:last-child { display:none; }
}
.queue-full-hint[hidden] { display:none; }

.deliver-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap:var(--grid-gap); }
.deliver-card { background:#fff; border-radius:var(--radius); padding:var(--card-pad); border:1px solid var(--cream-dark); cursor:pointer; transition:all 0.2s; min-width:0; }
.deliver-card:hover { border-color:var(--gold); box-shadow:var(--shadow); }
.deliver-card-header { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.deliver-icon { font-size:28px; }
.deliver-name, .deliver-title { font-size:15px; font-weight:600; }
.deliver-desc { font-size:12px; color:var(--ink-gray); line-height:1.6; }
.deliver-meta { margin-top:10px; font-size:11px; color:var(--ink-gray); line-height:1.5; }
.deliver-status { margin-top:12px; font-size:11px; padding:4px 10px; border-radius:10px; display:inline-block; }
.ds-ready { background:#e8f5e9; color:#2e7d32; }
.ds-pending-tag { background:#fff3e0; color:#e65100; }
.deliver-card.selected { border-color:var(--gold); box-shadow:0 2px 16px rgba(26,26,46,0.12); }
.task-list { display:flex; flex-direction:column; gap:10px; }
.task-card { border:1px solid var(--cream-dark); border-radius:var(--radius-sm); padding:12px; background:#fff; color:var(--ink-black); }
.task-card.running { border-color:rgba(201,169,110,0.55); }
.task-card.completed { border-color:rgba(39,174,96,0.35); background:#f7fbf8; }
.task-card.failed { border-color:rgba(192,57,43,0.35); background:#fff8f7; }
.task-head { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12px; font-weight:600; }
.task-meta { margin-top:6px; font-size:11px; color:var(--ink-gray); line-height:1.5; }
.task-progress { height:6px; border-radius:999px; background:var(--cream); overflow:hidden; margin-top:8px; }
.task-progress-fill { height:100%; background:var(--gold); border-radius:999px; transition:width .25s ease; }
.task-card.completed .task-progress-fill { background:var(--green-bamboo); }
.task-status-pill { flex-shrink:0; font-size:10px; color:#fff; background:var(--ink-gray); border-radius:999px; padding:3px 8px; }
.task-card.queued .task-status-pill { background:var(--ink-light); }
.task-card.running .task-status-pill { background:var(--gold); }
.task-card.completed .task-status-pill { background:var(--green-bamboo); }
.task-card.failed .task-status-pill { background:var(--red-seal); }
.task-notice { display:flex; flex-direction:column; gap:8px; }
.task-notice-message { color:var(--ink-gray); font-size:13px; line-height:1.5; }
.task-notice-link { align-self:flex-start; color:var(--ink-black); font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.task-deliverable-preview-card {
  display:flex; flex-direction:column; gap:12px; min-width:280px; max-width:min(720px, 100%);
}
.deliverable-preview {
  border:1px solid var(--cream-dark); border-radius:8px; background:#fff; overflow:hidden;
}
.deliverable-preview-label {
  padding:10px 12px; border-bottom:1px solid var(--cream-dark);
  color:var(--ink-gray); font-size:12px; font-weight:700;
}
.deliverable-preview-body {
  max-height:240px; overflow:hidden; padding:14px 16px; color:var(--ink-black);
  font-size:13px; line-height:1.75; white-space:pre-wrap; word-break:break-word;
}
.task-download-list { display:flex; flex-direction:column; gap:8px; margin-top:2px; }
.task-download-item {
  display:flex; align-items:center; gap:10px; min-width:280px; max-width:420px;
  padding:9px 10px; border:1px solid var(--cream-dark); border-radius:10px; background:#fbfaf7;
}
.task-download-icon {
  width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid rgba(201,169,110,.32); color:var(--gold-dark);
  font-size:10px; font-weight:800; letter-spacing:0;
}
.task-download-main { flex:1; min-width:0; }
.task-download-title {
  color:var(--ink-black); font-size:13px; font-weight:700; line-height:1.35;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.task-download-meta { margin-top:2px; color:var(--ink-gray); font-size:11px; }
.task-download-btn {
  flex-shrink:0; border:1px solid rgba(201,169,110,.45); border-radius:8px; background:#fff;
  color:var(--ink-black); padding:6px 10px; font:inherit; font-size:12px; font-weight:700; cursor:pointer;
}
.task-download-btn:hover { border-color:var(--gold); color:var(--gold-dark); background:#fffaf0; }
.deliverable-summary {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 16px; margin-bottom:14px; border:1px solid rgba(201,169,110,.45);
  border-radius:10px; background:linear-gradient(135deg,rgba(201,169,110,.12),rgba(255,255,255,.92));
}
.deliverable-summary b { display:block; color:var(--ink-black); font-size:15px; margin-bottom:2px; }
.deliverable-summary span { color:var(--ink-gray); font-size:12px; }
.deliverable-list { display:flex; flex-direction:column; gap:12px; }
.deliverable-file-card {
  display:flex; gap:14px; align-items:flex-start; padding:16px; border:1px solid var(--cream-dark);
  border-radius:10px; background:#fff; box-shadow:0 4px 14px rgba(26,26,46,.04);
}
.deliverable-summary-warning {
  border-color:rgba(180,35,24,.28); background:linear-gradient(135deg,rgba(180,35,24,.06),rgba(255,255,255,.94));
}
.deliverable-file-card.primary {
  border-color:var(--cream-dark); background:#fff; box-shadow:0 6px 20px rgba(26,26,46,.06);
}
.deliverable-file-card.intermediate {
  border-color:var(--cream-dark); background:#fff; box-shadow:none;
}
.deliverable-file-card.running { border-color:rgba(201,169,110,.45); background:#fffaf0; }
.deliverable-file-icon {
  width:42px; height:42px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--cream-dark); font-size:20px; flex-shrink:0;
}
.deliverable-file-main { flex:1; min-width:0; }
.deliverable-file-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.deliverable-file-title { color:var(--ink-black); font-size:15px; font-weight:700; line-height:1.4; }
.deliverable-file-name { margin-top:3px; color:var(--ink-gray); font-size:12px; overflow-wrap:anywhere; }
.deliverable-ready-pill, .deliverable-running-pill {
  flex-shrink:0; border-radius:999px; padding:4px 10px; font-size:11px; font-weight:700;
}
.deliverable-ready-pill { color:#047857; background:#dcfce7; }
.deliverable-file-card.intermediate .deliverable-ready-pill { color:var(--ink-gray); background:#f2f4f7; }
.deliverable-running-pill { color:#9a5b00; background:#fff3d6; }
.deliverable-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; justify-content:flex-end; }
.deliverable-actions.compact { margin-top:8px; }
.deliverable-download-btn, .deliverable-share-btn {
  width:42px; height:42px; border-radius:8px; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  font:inherit; cursor:pointer; text-align:center; line-height:0;
}
.deliverable-download-btn {
  border:0; background:var(--gold); color:#fff;
}
.deliverable-download-btn.has-label {
  width:auto;min-width:42px;padding:0 14px;gap:7px;line-height:1.2;
}
.deliverable-download-btn:hover { filter:brightness(.96); }
.deliverable-download-btn:disabled { cursor:not-allowed;opacity:.55;filter:none; }
.deliverable-share-btn {
  border:1px solid rgba(201,169,110,.55); background:#fff; color:var(--ink-black);
}
.deliverable-share-btn:hover { border-color:var(--gold); color:var(--gold-dark); background:#fffaf0; }
.deliverable-download-btn svg, .deliverable-share-btn svg {
  width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round;
}
.deliverable-section-title { margin:18px 0 10px; font-size:13px; font-weight:700; color:var(--ink-black); }
.deliverable-section-note { margin:-4px 0 10px; font-size:12px; color:var(--ink-gray); line-height:1.6; }
.deliverable-failed-summary { margin-top:14px; color:var(--red-seal); font-size:12px; }
.deliverable-failed-summary button {
  border:0; background:transparent; color:var(--red-seal); font:inherit; font-weight:700; cursor:pointer; padding:0;
}
.deliverable-failed-list { margin-top:8px; padding:10px 12px; border-radius:8px; background:#fff8f7; color:var(--ink-gray); font-size:12px; line-height:1.7; }

.profile-section { max-width:min(720px, 100%); }
.profile-page-head {
  display:flex; align-items:center; gap:16px; margin-bottom:32px;
}
.profile-page-head > div:nth-child(2) { min-width:0; }
.profile-card { background:#fff; border-radius:var(--radius); padding:var(--card-pad); border:1px solid var(--cream-dark); margin-bottom:20px; }
.profile-card-title { font-size:15px; font-weight:600; margin-bottom:20px; padding-bottom:12px; border-bottom:1px solid var(--cream-dark); }
.form-row { display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.form-label { font-size:13px; color:var(--ink-gray); width:100px; flex-shrink:0; }
.form-value { font-size:14px; flex:1; }
.form-input {
  flex:1; padding:8px 12px; border:1px solid var(--cream-dark); border-radius:var(--radius-sm);
  font-size:14px; font-family:inherit; outline:none; transition:border-color 0.2s;
}
.form-input:focus { border-color:var(--gold); }
.plan-card-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap:var(--grid-gap); }
.plan-card {
  background:var(--cream); border-radius:var(--radius); padding:20px; text-align:center;
  cursor:pointer; border:2px solid transparent; transition:all 0.2s;
}
.plan-card:hover { border-color:var(--gold); }
.plan-card.selectable { position:relative; min-height:150px; }
.plan-card.selected {
  border-color:var(--gold); background:linear-gradient(135deg,rgba(201,169,110,0.08),rgba(201,169,110,0.16));
  box-shadow:0 6px 20px rgba(201,169,110,.16);
}
.plan-card.selected::after {
  content:'已选中'; position:absolute; top:12px; right:12px;
  border-radius:999px; padding:3px 8px; background:rgba(201,169,110,.18);
  color:#8a6a2c; font-size:10px; font-weight:700;
}
.plan-card.disabled-plan { opacity:.68; }
.plan-card.current { border-color:var(--gold); background:linear-gradient(135deg,rgba(201,169,110,0.05),rgba(201,169,110,0.12)); }
.plan-price { font-size:28px; font-weight:700; color:var(--ink-black); }
.plan-price small { font-size:12px; font-weight:400; color:var(--ink-gray); }
.plan-name { font-size:14px; font-weight:600; margin:8px 0 4px; }
.plan-desc { font-size:11px; color:var(--ink-gray); }

.tab-bar { display:flex; gap:0; margin-bottom:24px; border-bottom:2px solid var(--cream-dark); }
.tab-item { padding:10px 20px; font-size:14px; cursor:pointer; color:var(--ink-gray); border-bottom:2px solid transparent; margin-bottom:-2px; transition:all 0.2s; }
.tab-item.active { color:var(--ink-black); font-weight:600; border-bottom-color:var(--gold); }

.knowledge-page { display:none; }
.knowledge-header {
  display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:24px;
}
.knowledge-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.knowledge-summary {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap:var(--grid-gap); margin-bottom:24px;
}
.knowledge-stat {
  background:#fff; border:1px solid var(--cream-dark); border-radius:var(--radius);
  padding:18px 20px; min-width:0;
}
.knowledge-stat-label { font-size:12px; color:var(--ink-gray); margin-bottom:8px; }
.knowledge-stat-value { font-size:24px; font-weight:700; color:var(--ink-black); }
.knowledge-stat-meta { margin-top:6px; font-size:11px; color:var(--ink-light); }
.storage-usage-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.storage-usage-value { font-size:22px; }
.storage-usage-percent { font-size:12px; color:var(--gold); font-weight:700; white-space:nowrap; }
.storage-progress {
  width:100%; height:4px; margin-top:12px; border-radius:999px;
  background:var(--cream); overflow:hidden;
}
.storage-progress-fill {
  height:100%; width:35%; border-radius:999px;
  background:linear-gradient(90deg,var(--gold),var(--gold-light));
}
.knowledge-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:#fff; border:1px solid var(--cream-dark); border-radius:var(--radius);
  padding:14px 16px; margin-bottom:18px;
}
.knowledge-tabs { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.knowledge-tab {
  border:1px solid var(--cream-dark); background:var(--cream); color:var(--ink-gray);
  border-radius:999px; padding:6px 12px; font-size:12px; cursor:pointer;
}
.knowledge-tab.active { border-color:var(--gold); color:var(--ink-black); background:rgba(201,169,110,0.12); }
.knowledge-search {
  width:min(280px, 100%); height:34px; border:1px solid var(--cream-dark);
  border-radius:var(--radius-sm); background:var(--paper); padding:0 12px; outline:none;
}
.knowledge-search:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,169,110,0.12); }
.knowledge-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap:var(--grid-gap); }
.knowledge-card {
  background:#fff; border:1px solid var(--cream-dark); border-radius:var(--radius);
  padding:20px; min-width:0; transition:all .2s;
}
.knowledge-card:hover { border-color:var(--gold); box-shadow:var(--shadow); }
.incubation-topic-card { cursor:pointer; position:relative; }
.incubation-topic-card:focus-visible {
  outline:3px solid rgba(201,169,110,.32); outline-offset:2px;
}
.incubation-topic-card.selected-topic {
  border-color:var(--gold); box-shadow:0 6px 22px rgba(201,169,110,.18);
  background:linear-gradient(135deg,rgba(201,169,110,.05),#fff);
}
.incubation-topic-card.selected-topic::after {
  content:'已选中'; position:absolute; right:14px; bottom:14px;
  border-radius:999px; padding:4px 9px; background:rgba(201,169,110,.16);
  color:#8a6a2c; font-size:11px; font-weight:700;
}
.knowledge-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.knowledge-card-title { font-size:15px; font-weight:700; line-height:1.4; }
.knowledge-card-desc { font-size:12px; color:var(--ink-gray); line-height:1.7; margin-bottom:14px; }
/* 私有库列表式 */
.knowledge-list { display:flex; flex-direction:column; gap:1px; background:var(--cream-dark); border-radius:var(--radius); overflow:hidden; }
.pk-row { display:flex; align-items:flex-start; gap:14px; padding:14px 18px; background:#fff; cursor:pointer; transition:background 0.15s; }
.pk-row:hover { background:var(--cream); }
.pk-row-icon { font-size:22px; flex-shrink:0; width:32px; text-align:center; padding-top:2px; }
.pk-row-body { flex:1; min-width:0; }
.pk-row-title { font-size:14px; font-weight:600; line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pk-row-desc { font-size:12px; color:var(--ink-gray); line-height:1.6; margin-top:3px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pk-row-tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.pk-row-meta { display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex-shrink:0; font-size:11px; color:var(--ink-light); white-space:nowrap; }
.pk-row-delete {
  border:0; background:transparent; color:#b42318; padding:2px 0;
  font:inherit; font-size:11px; cursor:pointer;
}
.pk-row-delete:hover { color:#7a1b13; text-decoration:underline; }
.knowledge-card-tags { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:10px; }
.knowledge-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:11px; color:var(--ink-light); }
.knowledge-chip { padding:3px 8px; border-radius:999px; background:var(--cream); color:var(--ink-gray); }
.knowledge-chip.gold { background:rgba(201,169,110,0.14); color:#8a6a2c; }
.knowledge-chip.green { background:#e8f5e9; color:#2e7d32; }
.knowledge-chip.blue { background:#e3f2fd; color:#1565c0; }
.knowledge-row-list { display:flex; flex-direction:column; gap:12px; }
.knowledge-row {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:#fff; border:1px solid var(--cream-dark); border-radius:var(--radius);
  padding:14px 16px;
}
.knowledge-row-main { min-width:0; }
.knowledge-row-title { font-size:14px; font-weight:600; margin-bottom:4px; }
.knowledge-row-meta { font-size:12px; color:var(--ink-gray); }
.idea-input {
  width:100%; min-height:90px; resize:vertical; border:1px solid var(--cream-dark);
  border-radius:var(--radius-sm); padding:12px; outline:none; color:var(--ink-black);
  background:var(--paper); line-height:1.7;
}
.idea-input:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,169,110,.14); }
.modal-backdrop {
  position:fixed; inset:0; z-index:1000; display:none; align-items:center; justify-content:center;
  padding:24px; background:rgba(26,26,46,.34);
}
.modal-backdrop.active { display:flex; }
.modal-panel {
  width:min(560px, 100%); max-height:calc(100vh - 48px); overflow:auto;
  background:#fff; border:1px solid var(--cream-dark); border-radius:var(--radius-sm);
  box-shadow:var(--shadow-lg); padding:22px;
}
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.modal-title { font-size:18px; font-weight:800; letter-spacing:0; color:var(--ink-black); }
.modal-subtitle { margin-top:6px; font-size:12px; line-height:1.7; color:var(--ink-gray); }
.modal-close {
  width:32px; height:32px; border:1px solid var(--cream-dark); border-radius:50%;
  background:var(--paper); color:var(--ink-gray); cursor:pointer; font-size:20px; line-height:1;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.modal-close:hover { border-color:var(--gold); color:var(--ink-black); }
.modal-textarea { min-height:150px; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:16px; flex-wrap:wrap; }
.modal-preview {
  border:1px solid var(--cream-dark); border-radius:var(--radius-sm); background:var(--paper);
  padding:14px; display:flex; flex-direction:column; gap:12px;
}
/* 新建项目弹窗 */
.pnm-form { display:flex; flex-direction:column; }
.pnm-label { font-size:13px; font-weight:600; color:var(--ink-black); margin-bottom:6px; }
.pnm-required { color:var(--red-seal); font-size:11px; font-weight:400; }
.pnm-optional { color:var(--ink-light); font-size:11px; font-weight:400; }
.pnm-input {
  width:100%; border:1px solid var(--cream-dark); border-radius:var(--radius-sm);
  padding:10px 12px; font-size:14px; font-family:inherit; color:var(--ink-black);
  background:#fff; outline:none; transition:border-color .2s;
}
.pnm-input:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,169,110,.12); }
.pnm-input::placeholder { color:var(--ink-light); }
.pnm-textarea { resize:none; min-height:72px; line-height:1.6; }
.pnm-mode-hint {
  margin-top:16px; padding:8px 12px; background:var(--cream); border-radius:var(--radius-sm);
  font-size:12px; color:var(--ink-gray); line-height:1.5;
}
.pnm-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.pnm-actions .btn-primary:disabled { opacity:0.4; cursor:not-allowed; }
.modal-preview-row { display:flex; gap:12px; align-items:flex-start; }
.modal-preview-label { width:76px; flex-shrink:0; font-size:12px; color:var(--ink-light); }
.modal-preview-value { flex:1; min-width:0; font-size:13px; line-height:1.7; color:var(--ink-black); }
.modal-preview-list { display:flex; flex-direction:column; gap:6px; }
.modal-preview-pill {
  display:inline-flex; width:max-content; max-width:100%; padding:4px 9px; border-radius:999px;
  background:rgba(201,169,110,.14); color:#8a6a2c; font-size:12px;
}
/* 知识库详情弹窗 */
.kd-section { margin-bottom:16px; }
.kd-section-title { font-size:12px; font-weight:700; color:var(--ink-light); margin-bottom:6px; text-transform:uppercase; letter-spacing:.5px; }
.kd-field { display:flex; gap:8px; margin-bottom:4px; }
.kd-field-label { width:80px; flex-shrink:0; font-size:12px; color:var(--ink-light); }
.kd-field-value { flex:1; min-width:0; font-size:13px; word-break:break-word; }
.kd-tags { display:flex; flex-wrap:wrap; gap:4px; }
.kd-tag { display:inline-block; padding:2px 8px; border-radius:999px; background:var(--cream); border:1px solid var(--cream-dark); font-size:11px; color:var(--ink-gray); }
.kd-content-preview { background:var(--cream); border-radius:var(--radius-sm); padding:12px; font-size:13px; line-height:1.8; color:var(--ink-gray); white-space:pre-wrap; max-height:200px; overflow-y:auto; }
.kd-content-full { max-height:400px; }
.kd-expand-btn { background:none; border:none; color:var(--gold); font-size:12px; cursor:pointer; padding:4px 0; }
.kd-expand-btn:hover { text-decoration:underline; }
.payment-modal-panel { width:min(460px, 100%); }
.payment-plan-summary {
  border:1px solid var(--cream-dark); border-radius:var(--radius-sm); background:var(--paper);
  padding:14px 16px; margin-bottom:14px;
}
.payment-plan-title { font-size:15px; font-weight:800; margin-bottom:4px; color:var(--ink-black); }
.payment-plan-meta { font-size:12px; color:var(--ink-gray); line-height:1.7; }
.payment-choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.payment-choice {
  border:1px solid var(--cream-dark); border-radius:var(--radius-sm); background:#fff;
  padding:14px; display:flex; align-items:center; gap:12px; cursor:pointer; text-align:left;
  color:var(--ink-black); font-family:inherit; transition:all .2s;
}
.payment-choice:hover { border-color:var(--gold); box-shadow:var(--shadow); transform:translateY(-1px); }
.payment-choice-icon {
  width:34px; height:34px; border-radius:10px; background:#e3f2fd; color:#1565c0;
  display:flex; align-items:center; justify-content:center; font-weight:800; flex-shrink:0;
}
.payment-choice-icon.wechat { background:#e8f5e9; color:#2e7d32; }
.payment-choice b { display:block; font-size:14px; margin-bottom:3px; }
.payment-choice small { display:block; font-size:11px; color:var(--ink-gray); line-height:1.4; }
.wechat-payment-qr {
  display:grid; justify-items:center; gap:14px; padding:18px;
  border:1px solid var(--cream-dark); border-radius:var(--radius-sm); background:var(--paper);
}
.wechat-payment-qr[hidden] { display:none; }
.wechat-payment-qr img {
  width:min(280px, 72vw); aspect-ratio:1; display:block;
  border:1px solid var(--cream-dark); background:#fff;
}
.wechat-payment-qr-copy { display:grid; gap:5px; text-align:center; }
.wechat-payment-qr-copy b { font-size:15px; color:var(--ink-black); }
.wechat-payment-qr-copy span { color:var(--ink-gray); font-size:12px; line-height:1.6; }

@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.animate-in { animation:fadeIn 0.3s ease-out; }
@media (max-width:900px) {
  html[data-client="mobile"] .topbar-left #sidebarToggle { display:flex; }
  html[data-client="mobile"] .sidebar { width:var(--sidebar-collapsed); }
  html[data-client="mobile"] .sidebar.expanded-mobile {
    width:min(240px, calc(100vw - 24px)); position:absolute; inset:0 auto 0 0;
    box-shadow:var(--shadow-lg);
  }
  html[data-client="mobile"] .sidebar.expanded-mobile .sidebar-brand .brand-cn,
  html[data-client="mobile"] .sidebar.expanded-mobile .sidebar-brand .brand-en,
  html[data-client="mobile"] .sidebar.expanded-mobile .sidebar-brand .brand-tagline,
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-item span,
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-section-title,
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-badge,
  html[data-client="mobile"] .sidebar.expanded-mobile .user-info { display:block; }
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-item { justify-content:flex-start; padding:12px 16px; }
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-item.active::before { display:block; }
  html[data-client="mobile"] .sidebar-brand .brand-cn,
  html[data-client="mobile"] .sidebar-brand .brand-en,
  html[data-client="mobile"] .sidebar-brand .brand-tagline,
  html[data-client="mobile"] .nav-item span,
  html[data-client="mobile"] .nav-section-title,
  html[data-client="mobile"] .nav-badge,
  html[data-client="mobile"] .user-info { display:none; }
  html[data-client="mobile"] .nav-item { justify-content:center; padding:12px; }
  html[data-client="mobile"] .nav-item.active::before { display:none; }
  html[data-client="mobile"] .project-list { grid-template-columns:1fr; }
  html[data-client="mobile"] .stage-progress-panel {
    position:absolute; right:var(--page-pad); top:var(--page-pad); bottom:var(--page-pad);
    width:min(340px, calc(100vw - var(--sidebar-collapsed) - (var(--page-pad) * 2)));
    border-left:none; border-radius:var(--radius); box-shadow:var(--shadow-lg); z-index:20;
  }
  html[data-client="mobile"] .topbar { align-items:flex-start; }
  html[data-client="mobile"] .chat-header { align-items:flex-start; }
  html[data-client="mobile"] .chat-header > .topbar-right { min-width:100%; justify-content:flex-start; }
  html[data-client="mobile"] .knowledge-header,
  html[data-client="mobile"] .knowledge-toolbar,
  html[data-client="mobile"] .knowledge-row { align-items:flex-start; flex-direction:column; }
	  html[data-client="mobile"] .knowledge-actions { justify-content:flex-start; }
	  html[data-client="mobile"] .knowledge-search { width:100%; }
	  html[data-client="mobile"] .route-profile-grid { grid-template-columns:1fr 1fr; }
	  html[data-client="mobile"] .task-download-item { min-width:0; width:100%; }
	  html[data-client="mobile"] .deliverable-file-head { flex-direction:column; gap:8px; }
	}

@media (max-width:620px) {
  html[data-client="mobile"] {
    --page-pad: 12px;
    --topbar-pad: 12px;
    --grid-gap: 12px;
  }
  html[data-client="mobile"] .topbar { min-height:56px; }
  html[data-client="mobile"] .breadcrumb { max-width:calc(100vw - var(--sidebar-collapsed) - 196px); overflow:hidden; white-space:nowrap; }
  html[data-client="mobile"] .breadcrumb span:first-of-type { display:none; }
  html[data-client="mobile"] .topbar-right { gap:8px; }
  .profile-page-head { align-items:flex-start; flex-wrap:wrap; }
  .payment-choice-grid { grid-template-columns:1fr; }
  html[data-client="mobile"] .topbar-right > .top-btn[title="通知"],
  html[data-client="mobile"] .topbar-right > .top-btn[title="帮助"] { display:none; }
  html[data-client="mobile"] .btn-primary,
  html[data-client="mobile"] .btn-outline { padding:8px 12px; }
  html[data-client="mobile"] .chat-header { flex-direction:column; }
  html[data-client="mobile"] .chat-stage-badges { max-height:58px; overflow:auto; }
  html[data-client="mobile"] .chat-input-box { gap:8px; padding:10px 12px; }
  html[data-client="mobile"] .input-btn { width:32px; height:32px; }
  html[data-client="mobile"] .knowledge-actions .btn-primary,
  html[data-client="mobile"] .knowledge-actions .btn-outline { width:100%; justify-content:center; display:flex; }
  html[data-client="mobile"] .form-row { align-items:flex-start; flex-direction:column; gap:6px; }
  html[data-client="mobile"] .form-label { width:auto; }
}

@media (max-width:1180px) {
  :root {
    --sidebar-width: clamp(210px, 22vw, 240px);
    --stage-panel-width: clamp(232px, 26vw, 272px);
    --page-pad: clamp(16px, 2.4vw, 28px);
  }
  .landing-hero { grid-template-columns:1fr; align-content:center; gap:clamp(24px, 4vh, 46px); padding:clamp(54px, 9vh, 96px) 0; }
  .landing-copy { align-self:center; padding-bottom:0; }
  .landing-visual { height:auto; min-height:0; }
  .landing-preview { transform:none; }
  .landing-section, .landing-footer { width:min(900px, calc(100% - 64px)); }
  .landing-product-grid { grid-template-columns:1fr 1fr; }
  .landing-product-item:last-child { grid-column:1 / -1; }
  .landing-scene-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (max-width:900px) {
  .landing-main { min-height:0; padding:22px; }
  .landing-nav { align-items:flex-start; flex-wrap:wrap; }
  .landing-brand { flex:1 0 auto; }
  .landing-nav-links { gap:16px; flex-wrap:wrap; }
  .landing-nav-links { order:3; width:100%; }
  .landing-actions { flex-wrap:wrap; justify-content:flex-end; }
  .landing-copy { padding-top:clamp(8px, 2vh, 22px); }
  .landing-title { font-size:clamp(38px, 8.4vw, 64px); }
  .landing-section, .landing-footer { width:calc(100% - 44px); }
  .landing-audience-grid, .landing-product-grid { grid-template-columns:1fr; }
  .landing-product-item:last-child { grid-column:auto; }
  .landing-audience-item { min-height:190px; }
  .landing-audience-item strong { margin-top:28px; }
  .landing-contact { align-items:flex-start; flex-direction:column; }
  .auth-page { grid-template-rows:auto auto auto; height:auto; min-height:100vh; min-height:100dvh; overflow:visible; }
  .auth-topbar { grid-template-columns:1fr auto; min-height:68px; padding:0 24px; }
  .auth-top-meta { display:none; }
  .auth-stage { grid-template-columns:1fr; overflow:visible; }
  .auth-visual { min-height:360px; padding:42px 28px 68px; }
  .auth-visual img { left:68%; width:min(520px,90vw); opacity:.16; }
  .auth-slogan { max-width:580px; font-size:clamp(48px,10vw,72px); }
  .auth-capabilities { left:28px; bottom:28px; }
  .auth-panel { min-height:auto; padding:38px 28px; overflow:visible; border-top:1px solid rgba(31,23,20,.16); border-left:0; }
  .auth-footer { flex-wrap:wrap; min-height:64px; padding:14px 24px; }
  html[data-client="mobile"] .topbar-left #sidebarToggle { display:flex; }
  html[data-client="mobile"] .sidebar { width:var(--sidebar-collapsed); }
  html[data-client="mobile"] .sidebar.expanded-mobile {
    width:min(240px, calc(100vw - 24px)); position:absolute; inset:0 auto 0 0;
    box-shadow:var(--shadow-lg);
  }
  html[data-client="mobile"] .sidebar.expanded-mobile .sidebar-brand .brand-cn,
  html[data-client="mobile"] .sidebar.expanded-mobile .sidebar-brand .brand-en,
  html[data-client="mobile"] .sidebar.expanded-mobile .sidebar-brand .brand-tagline,
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-item span,
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-section-title,
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-badge,
  html[data-client="mobile"] .sidebar.expanded-mobile .user-info { display:block; }
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-item { justify-content:flex-start; padding:12px 16px; }
  html[data-client="mobile"] .sidebar.expanded-mobile .nav-item.active::before { display:block; }
  html[data-client="mobile"] .sidebar-brand .brand-cn,
  html[data-client="mobile"] .sidebar-brand .brand-en,
  html[data-client="mobile"] .sidebar-brand .brand-tagline,
  html[data-client="mobile"] .nav-item span,
  html[data-client="mobile"] .nav-section-title,
  html[data-client="mobile"] .nav-badge,
  html[data-client="mobile"] .user-info { display:none; }
  html[data-client="mobile"] .nav-item { justify-content:center; padding:12px; }
  html[data-client="mobile"] .nav-item.active::before { display:none; }
  html[data-client="mobile"] .chat-header { align-items:flex-start; gap:12px; }
  html[data-client="mobile"] .chat-header > .topbar-right { flex-wrap:wrap; justify-content:flex-start; }
}

@media (max-width:620px) {
  :root {
    --page-pad: 12px;
    --topbar-pad: 12px;
    --grid-gap: 12px;
  }
  .landing-main { min-height:0; padding:14px; }
  .landing-nav { gap:14px; }
  .landing-brand-name { font-size:17px; letter-spacing:2px; }
  .landing-brand-sub { display:none; }
  .landing-nav-links { font-size:12px; gap:12px; }
  .landing-actions { width:100%; justify-content:flex-start; }
  .pill-btn { min-height:34px; padding:0 16px; }
  .landing-hero { gap:30px; padding:52px 0 70px; }
  .landing-kicker { font-size:clamp(16px, 5vw, 22px); margin-bottom:12px; letter-spacing:2px; }
  .landing-title { font-size:clamp(34px, 12vw, 54px); }
  .landing-text { font-size:14px; margin-top:14px; line-height:1.75; }
  .landing-hero-actions { align-items:flex-start; flex-direction:column; gap:18px; margin-top:24px; }
  .landing-preview-body { grid-template-columns:1fr; min-height:0; }
  .landing-preview-sidebar { display:none; }
  .landing-preview-content { padding:30px 22px; }
  .landing-preview-content h2 { font-size:27px; }
  .landing-preview-footer { flex-direction:column; gap:6px; }
  .landing-section, .landing-footer { width:calc(100% - 28px); }
  .landing-section { padding:68px 0; }
  .landing-audience { padding-top:58px; }
  .landing-section-heading h2 { font-size:32px; }
  .landing-product-item { min-height:0; padding:24px; }
  .landing-product-item h3 { margin-top:30px; }
  .landing-solution-row { grid-template-columns:1fr; gap:8px; padding:20px 0; }
  .landing-solution-row strong { font-size:17px; }
  .landing-scene-grid, .landing-workflow-grid { grid-template-columns:1fr; gap:24px; }
  .landing-scene-item strong, .landing-workflow-grid strong { margin-top:24px; }
  .landing-contact { gap:28px; padding-top:68px; padding-bottom:58px; }
  .landing-contact-actions { align-items:flex-start; flex-direction:column; }
  .landing-footer { flex-direction:column; gap:8px; padding-bottom:24px; }
  .auth-topbar { min-height:62px; padding:0 18px; }
  .auth-brand { font-size:16px; letter-spacing:3px; }
  .auth-home-link { font-size:11px; }
  .auth-visual { min-height:320px; padding:38px 20px 82px; }
  .auth-visual img { left:62%; width:560px; }
  .auth-slogan { margin-top:14px; font-size:clamp(40px,11.5vw,48px); }
  .auth-visual-copy p { margin-top:18px; font-size:13px; }
  .auth-capabilities { left:20px; right:20px; bottom:28px; gap:12px; font-size:9px; }
  .auth-capabilities span + span { padding-left:12px; }
  .auth-panel { padding:32px 20px; }
  .auth-panel h2 { font-size:28px; }
  .auth-inline-field { grid-template-columns:minmax(0,1fr) 102px; }
  .auth-footer { min-height:78px; flex-direction:column; gap:3px; }
  .topbar { min-height:56px; height:auto; padding-top:10px; padding-bottom:10px; }
  .topbar-right > .top-btn[title="通知"],
  .topbar-right > .top-btn[title="帮助"] { display:none; }
  .btn-primary, .btn-outline { padding:8px 12px; }
  .chat-header { flex-direction:column; }
  .chat-stage-badges { max-height:58px; overflow:auto; }
  .chat-input-box { gap:8px; padding:10px 12px; }
  .input-btn { width:32px; height:32px; }
  .form-row { align-items:flex-start; flex-direction:column; gap:6px; }
  .form-label { width:auto; }
}

@media (max-height:760px) {
  .landing-main { padding:18px 32px; }
  .landing-hero { padding-top:56px; padding-bottom:56px; }
  .landing-kicker { font-size:clamp(16px, 1.4vw, 21px); margin-bottom:10px; }
  .landing-title { font-size:clamp(40px, 5vw, 68px); }
  .landing-text { margin-top:16px; font-size:14px; line-height:1.65; }
}

#pageDeliver > div,
#pageProfile > div {
  width:100% !important;
  max-width:min(960px, 100%) !important;
  padding:var(--page-pad) !important;
}

/* ===== P1.2 对话内模式选择器（收敛开启时）===== */
.chat-mode-bar { display:flex; gap:6px; background:#f2efe6; border:1px solid var(--line,#ece8de); border-radius:999px; padding:4px; margin:0 auto 10px; width:fit-content; max-width:100%; }
.chat-mode-pill { border:none; background:transparent; border-radius:999px; padding:8px 18px; font-size:13.5px; font-weight:600; color:#6b6b80; cursor:pointer; display:flex; align-items:center; gap:6px; white-space:nowrap; transition:.15s; }
.chat-mode-pill:hover { color:var(--ink-black,#1a1a2e); }
.chat-mode-pill.active { background:#fff; color:#9a7b3f; box-shadow:0 2px 7px rgba(60,50,30,.12); }
.chat-mode-pill .cm-dot { width:6px; height:6px; border-radius:50%; background:var(--gold,#c9a96e); display:none; }
.chat-mode-pill.active .cm-dot { display:inline-block; }

/* ===== 对话输入区附件菜单 ===== */
.input-plus-menu { position:absolute; bottom:100%; left:12px; margin-bottom:8px; background:#fff; border:1px solid var(--line,#ece8de); border-radius:8px; box-shadow:0 12px 34px rgba(30,30,50,.14); padding:8px; display:grid; grid-template-columns:repeat(2,1fr); gap:6px; z-index:60; }
.input-plus-menu button { display:flex; flex-direction:column; align-items:center; gap:5px; background:#f5f4f0; border:none; border-radius:6px; padding:14px 18px; font-size:13px; font-weight:600; color:var(--ink-black,#1a1a2e); cursor:pointer; }
.input-plus-menu button span { font-size:22px; }
.input-plus-menu button:hover { background:#efece4; }

/* ===== P3 历史对话抽屉 ===== */
.hist-scrim { position:fixed; inset:0; background:rgba(20,20,35,.34); z-index:2000; opacity:0; pointer-events:none; transition:.22s; }
.hist-scrim.show { opacity:1; pointer-events:auto; }
.hist-drawer { position:fixed; top:0; left:0; bottom:0; width:300px; max-width:82vw; background:var(--paper,#faf8f2); z-index:2001; transform:translateX(-104%); transition:transform .26s cubic-bezier(.3,.9,.3,1); display:flex; flex-direction:column; box-shadow:8px 0 40px rgba(20,22,40,.18); }
.hist-drawer.show { transform:translateX(0); }
.hist-hd { padding:18px 16px 8px; display:flex; align-items:center; justify-content:space-between; }
.hist-hd .t { font-size:16px; font-weight:800; color:var(--ink-black,#1a1a2e); }
.hist-hd .x { border:none; background:transparent; font-size:22px; color:#8a8a93; cursor:pointer; }
.hist-search { margin:0 14px 8px; display:flex; align-items:center; gap:7px; background:#fff; border:1px solid var(--line,#ece8de); border-radius:11px; padding:9px 11px; }
.hist-search input { border:none; outline:none; background:transparent; font-size:13.5px; width:100%; }
.hist-list { flex:1; overflow-y:auto; padding:4px 8px 16px; }
.hist-grp { font-size:11.5px; font-weight:700; color:#a29a86; padding:12px 8px 5px; }
.hist-item { padding:10px 11px; border-radius:11px; cursor:pointer; display:flex; align-items:center; gap:8px; position:relative; }
.hist-item:hover { background:#f1ede2; }
.hist-item.pinned { background:#fbf7ea; }
.hist-item .ht { flex:1; font-size:14px; font-weight:600; color:var(--ink-black,#1a1a2e); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hist-item .pin-badge { color:var(--gold,#c9a96e); font-size:12px; }
.hist-item .dots { opacity:0; border:none; background:transparent; font-size:18px; color:#8a8a93; cursor:pointer; padding:0 4px; }
.hist-item:hover .dots { opacity:1; }
.hist-menu { position:fixed; z-index:2002; background:#fff; border-radius:12px; box-shadow:0 12px 34px rgba(20,22,45,.22); padding:5px; min-width:140px; }
.hist-menu button { display:flex; align-items:center; gap:9px; width:100%; border:none; background:transparent; padding:10px 12px; border-radius:8px; font-size:14px; font-weight:600; color:var(--ink-black,#1a1a2e); cursor:pointer; }
.hist-menu button:hover { background:#f4f2ec; }
.hist-menu button.danger { color:#dc2626; }

/* ============================================================
   ===== 对话界面重构（设计稿 ba20eb27 桌面 / 7b205af0 移动）=====
   浅色对话历史侧栏 · 顶部3模式 · 🐋开场 · 金色对话框 · 响应式
   ============================================================ */
:root { --gold-d:#9a7b3f; --gold-bg:#f3ecda; --gold-50:#faf6ec; }

/* ---- 侧栏：浅色对话历史栏 ---- */
.sidebar.cv-side {
  width:264px; background:var(--paper); color:var(--ink-black);
  border-right:1px solid var(--cream-dark); box-shadow:none; z-index:12;
}
.cv-brand { padding:18px 18px 14px; }
.cv-product-brand {
  display:inline-flex; align-items:center; gap:8px; max-width:150px;
  color:var(--gold-d); text-decoration:none;
}
.cv-product-brand:hover { color:var(--ink-black); }
.cv-product-brand-mark { width:21px; height:21px; flex:0 0 21px; }
.cv-product-brand-name { font-size:18px; line-height:1; font-weight:800; white-space:nowrap; }
.cv-product-brand-name sup {
  position:relative; top:-.35em; margin-left:1px; font-size:8px;
  line-height:1; font-weight:600;
}
@media (max-width:620px) {
  .cv-product-brand { gap:6px; max-width:132px; }
  .cv-product-brand-mark { width:19px; height:19px; flex-basis:19px; }
  .cv-product-brand-name { font-size:16px; }
  .cv-product-brand-name sup { font-size:7px; }
}
.cv-newbtn {
  margin:4px 14px 10px; height:40px; border:1px solid var(--gold); color:var(--gold-d);
  background:var(--gold-50); border-radius:11px; display:flex; align-items:center;
  justify-content:center; gap:7px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; transition:.15s;
}
.cv-newbtn:hover { background:var(--gold-bg); }
.cv-plus { font-size:18px; line-height:1; }
.cv-search { margin:0 14px 8px; display:flex; align-items:center; gap:7px; background:#fff; border:1px solid var(--cream-dark); border-radius:10px; padding:8px 11px; }
.cv-search input { border:none; outline:none; background:transparent; font:inherit; font-size:13px; width:100%; color:var(--ink-black); }
.cv-search-ic { color:var(--ink-gray); font-size:13px; }
.cv-list { flex:1; overflow-y:auto; padding:6px 10px; }
.cv-empty { color:var(--ink-light); font-size:12.5px; text-align:center; padding:28px 12px; line-height:1.7; }
.cv-grp { font-size:11.5px; font-weight:700; color:#a29a86; padding:12px 8px 5px; letter-spacing:.03em; }
.cv-item { padding:9px 30px 9px 11px; border-radius:9px; cursor:pointer; display:flex; flex-direction:column; gap:2px; position:relative; }
.cv-item:hover { background:#f3efe4; }
.cv-item.active { background:var(--gold-bg); box-shadow:0 0 0 1.5px var(--gold) inset; }
.cv-item.pinned { background:#fbf7ea; }
.cv-item-t { font-size:13.5px; font-weight:600; color:var(--ink-black); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; gap:5px; align-items:center; }
.cv-item-d { font-size:12px; color:var(--ink-gray); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cv-item .cv-pin { color:var(--gold); font-size:11px; flex:0 0 auto; }
.cv-item .cv-dots { position:absolute; right:6px; top:8px; opacity:0; border:none; background:transparent; font-size:17px; color:#8a8a93; cursor:pointer; padding:0 4px; line-height:1; transition:.15s; }
.cv-item:hover .cv-dots { opacity:1; }
.cv-nav { display:flex; gap:2px; padding:8px 10px; border-top:1px solid var(--cream-dark); }
.cv-nav-btn { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; background:transparent; border:none; border-radius:9px; padding:8px 2px; font:inherit; font-size:16px; color:var(--ink-gray); cursor:pointer; transition:.15s; }
.cv-nav-btn em { font-style:normal; font-size:10px; }
.cv-nav-btn:hover { background:#f1ede2; color:var(--gold-d); }
.cv-nav-btn.active { color:var(--gold-d); background:var(--gold-50); }
.cv-user { position:relative; border-top:1px solid var(--cream-dark); padding:12px 16px; display:flex; align-items:center; gap:10px; cursor:pointer; }
.cv-user:hover { background:#f3efe4; }
.cv-user:focus-visible { outline:2px solid var(--gold); outline-offset:-3px; background:#f3efe4; }
.cv-user-name-row { min-width:0; display:flex; align-items:center; gap:5px; }
.cv-user-caret {
  width:15px; height:15px; flex:0 0 15px; color:#a19a91;
  fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
  transition:transform .16s ease,color .16s ease;
}
.cv-user:hover .cv-user-caret,
.cv-user:focus-visible .cv-user-caret { color:var(--gold-d); }
.cv-user[aria-expanded="true"] .cv-user-caret { transform:rotate(-90deg); }
.cv-user-menu { position:absolute; left:10px; right:10px; bottom:calc(100% + 6px); background:#fff; border:1px solid var(--cream-dark); border-radius:12px; box-shadow:0 12px 34px rgba(26,26,46,.18); padding:6px; z-index:40; }
.cv-user-menu[hidden] { display:none; }
.cv-user-menu-item { display:flex; align-items:center; gap:10px; width:100%; padding:10px 12px; border:none; background:transparent; border-radius:8px; font:inherit; font-size:13px; color:var(--ink-black); cursor:pointer; text-align:left; }
.cv-user-menu-item:hover { background:var(--cream); }
.cv-user-menu-item.danger { color:#b0403a; }
.cv-user-menu-item.danger:hover { background:rgba(176,64,58,.08); }
.cv-user-menu-sep { height:1px; background:var(--cream-dark); margin:4px 6px; }
/* 设置页账户卡片：退出登录 */
.profile-logout-btn { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; margin-top:16px; padding:11px 0; border:1px solid #d9b3af; background:#fff; color:#b0403a; border-radius:10px; font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; }
.profile-logout-btn:hover { background:rgba(176,64,58,.06); border-color:#c98f8a; }
.profile-logout-btn.secondary { margin-top:10px; color:var(--ink-gray); border-color:var(--cream-dark); }
.profile-logout-btn.secondary:hover { background:#f3efe4; border-color:#d8d0bc; }
/* /login 与 /register 已登录态：右侧只保留进入工作台。 */
.auth-panel.is-authenticated > :not(.auth-logged-card) { display:none; }
.auth-panel.is-authenticated { background:#f8f7f2; }
.auth-logged-card { width:100%; background:transparent; }
.cv-avatar { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,var(--gold-light),var(--gold)); color:var(--ink-black); display:grid; place-items:center; font-size:13px; font-weight:700; flex-shrink:0; }
.cv-user-info { min-width:0; flex:1; }
.cv-user-name { font-size:13.5px; font-weight:700; color:var(--ink-black); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ---- 汉堡 & 移动遮罩 ---- */
.cv-hamburger { display:none; border:none; background:transparent; font-size:20px; color:var(--ink-gray); cursor:pointer; padding:0 6px 0 0; line-height:1; }
.cv-side-scrim { position:fixed; inset:0; background:rgba(20,20,35,.34); z-index:1499; opacity:0; pointer-events:none; transition:.22s; }
.cv-side-scrim.show { opacity:1; pointer-events:auto; }

/* ---- 顶部居中 3 模式选择器（在 chat-header 内绝对居中）---- */
.chat-header { position:relative; }
.chat-header .chat-mode-bar { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); margin:0; z-index:1; }
.chat-header .chat-header-left,
.chat-header .topbar-right,
.chat-header .guest-trial-header-actions { position:relative; z-index:2; }
.chat-layout.no-project .hide-when-empty { display:none !important; }
/* 对话/首屏视图隐藏共享顶栏，只保留 chat-header 的模式栏 */
.main-content.chat-active > .topbar { display:none !important; }

/* ---- 🐋 开场 ---- */
.cv-hero { min-height:auto !important; flex:1; border:none !important; background:transparent !important; display:flex; align-items:center; justify-content:center; }
.cv-hero-inner { display:flex; flex-direction:column; align-items:center; gap:14px; }
.cv-hero-logo { display:flex; align-items:center; gap:11px; font-size:23px; font-weight:800; color:var(--ink-black); }
.cv-hero-whale { width:38px; height:38px; border-radius:11px; background:linear-gradient(135deg,var(--gold-light),var(--gold)); display:grid; place-items:center; font-size:20px; }
.cv-hero-desc { font-size:13.5px; color:var(--ink-gray); }

/* ---- 金色对话框 ---- */
.chat-input-area { background:transparent; border-top:none; padding:10px var(--page-pad) 20px; }
.chat-input-box {
  flex-direction:column; align-items:stretch; gap:0; background:#fff;
  border:1px solid rgba(176,138,67,.62); border-radius:18px; box-shadow:0 8px 26px rgba(60,50,30,.07);
  padding:11px 14px; max-width:820px; margin:0 auto; width:100%; position:relative;
}
.chat-input-box:focus-within { border-color:var(--gold); border-width:1px; }
.composer-main-row {
  display:grid; grid-template-columns:48px minmax(0,1fr) 48px; align-items:end; gap:12px; width:100%;
}
.chat-input {
  width:100%; min-width:0; min-height:52px; max-height:156px; padding:13px 6px 10px;
  flex:0 0 auto; line-height:1.6; resize:none; overflow-y:hidden; box-sizing:border-box;
  scrollbar-width:thin; scrollbar-color:rgba(176,138,67,.55) transparent;
}
.composer-main-row .input-btn {
  width:48px; height:48px; flex:0 0 48px; border:1px solid rgba(31,23,20,.12);
  transition:background .16s ease, border-color .16s ease, transform .16s ease;
}
.composer-main-row .input-btn svg {
  width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round; pointer-events:none;
}
.composer-plus-btn { align-self:end; background:#faf9f5; color:#3f3b37; font-size:30px; font-weight:300; line-height:1; }
.composer-plus-btn:hover { background:#f1eee6; border-color:rgba(176,138,67,.5); color:var(--ink-black); }
.composer-primary-action { position:relative; align-self:end; width:48px; height:48px; }
.composer-primary-action > .input-btn { position:absolute; inset:0; }
.composer-primary-action > [hidden] { display:none !important; }
.voice-btn {
  background:#f1f1ef; color:#151515; cursor:grab; touch-action:none;
  user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent;
}
.voice-btn:hover { background:#e9e8e4; color:#111; }
.voice-btn:active { cursor:grabbing; }
.voice-btn.is-recording { background:#d8b878; border-color:#c8a45d; color:#1e1a15; transform:scale(.97); }
.voice-btn.is-cancelling { background:#eee8dc; border-color:#b5a78f; color:#665f55; }
.voice-hold-tip {
  position:absolute; left:50%; bottom:calc(100% + 12px); transform:translateX(-50%); z-index:5;
  width:max-content; max-width:130px; padding:7px 10px; border:1px solid rgba(31,23,20,.14); border-radius:6px;
  background:#fff; box-shadow:0 5px 14px rgba(31,23,20,.08); color:var(--ink-black); font-size:12px; line-height:1.2;
  pointer-events:none;
}
.voice-hold-tip::after {
  content:""; position:absolute; left:50%; top:100%; width:8px; height:8px; background:#fff;
  border-right:1px solid rgba(31,23,20,.14); border-bottom:1px solid rgba(31,23,20,.14); transform:translate(-50%,-4px) rotate(45deg);
}
.voice-hold-tip.is-emphasized { border-color:rgba(176,138,67,.65); color:var(--gold-d); }
.input-btn.send-btn { background:#d8b878; border-color:#caa760; color:#4e4d51; }
.input-btn.send-btn:hover { background:#e0c389; border-color:#c39a4d; color:#343339; }
.input-btn.send-btn:disabled { opacity:.5; cursor:default; }
.input-btn.send-btn.is-stop { background:#f1eee6; border-color:rgba(31,23,20,.14); }
.composer-stop-icon { width:14px; height:14px; border-radius:3px; background:#514c45; }
.voice-recording-popover {
  position:absolute; left:50%; bottom:calc(100% + 14px); transform:translateX(-50%); z-index:65;
  display:flex; align-items:center; justify-content:center; gap:18px; width:min(340px,calc(100% - 32px));
  padding:14px 18px; border:1px solid rgba(176,138,67,.38); border-radius:8px;
  background:#fffdfa; box-shadow:0 12px 32px rgba(48,39,25,.14); color:var(--ink-black);
}
.voice-recording-popover[hidden] { display:none !important; }
.voice-recording-popover::after {
  content:""; position:absolute; left:50%; top:100%; width:10px; height:10px; background:#fffdfa;
  border-right:1px solid rgba(176,138,67,.38); border-bottom:1px solid rgba(176,138,67,.38); transform:translate(-50%,-5px) rotate(45deg);
}
.voice-recording-popover > div:last-child { display:flex; flex-direction:column; gap:2px; min-width:0; }
.voice-recording-popover strong { font-size:14px; letter-spacing:0; animation:voiceListenPulse 1.4s ease-in-out infinite; }
.voice-recording-popover span { color:var(--ink-gray); font-size:12px; letter-spacing:0; }
.voice-recording-popover.is-cancelling { border-color:rgba(120,105,83,.42); background:#f7f4ed; }
.voice-wave { display:flex; align-items:center; justify-content:center; gap:4px; height:34px; flex:0 0 auto; }
.voice-wave i { display:block; width:4px; height:9px; border-radius:2px; background:#c59a49; animation:voiceWave 820ms ease-in-out infinite alternate; }
.voice-wave i:nth-child(2), .voice-wave i:nth-child(6) { height:16px; animation-delay:-180ms; }
.voice-wave i:nth-child(3), .voice-wave i:nth-child(5) { height:24px; animation-delay:-360ms; }
.voice-wave i:nth-child(4) { height:34px; animation-delay:-520ms; }
.voice-recording-popover.is-cancelling .voice-wave i { animation-play-state:paused; background:#9c917f; }
@keyframes voiceWave { from { transform:scaleY(.45); opacity:.55; } to { transform:scaleY(1); opacity:1; } }
@keyframes voiceListenPulse { 0%,100% { opacity:.68; } 50% { opacity:1; } }
@media (prefers-reduced-motion:reduce) {
  .voice-wave i, .voice-recording-popover strong { animation:none; }
}
.chat-input::-webkit-scrollbar { width:6px; }
.chat-input::-webkit-scrollbar-track { background:transparent; }
.chat-input::-webkit-scrollbar-thumb { border-radius:3px; background:rgba(176,138,67,.45); }
.chat-input::-webkit-scrollbar-thumb:hover { background:rgba(176,138,67,.68); }
.link-preview-strip { width:100%; margin-bottom:10px; }
.link-preview-card {
  display:flex; align-items:flex-start; position:relative; min-width:0;
  border:1px solid rgba(31,23,20,.14); border-radius:6px; background:#f8f7f2;
}
.link-preview-main {
  display:flex; flex:1; min-width:0; gap:11px; align-items:center; padding:9px 40px 9px 9px;
  color:var(--ink-black); text-decoration:none;
}
.link-preview-main:hover .link-preview-title { color:var(--gold-d); }
.link-preview-image { width:68px; height:68px; flex:0 0 68px; object-fit:cover; border-radius:4px; background:#eeece5; }
.link-preview-copy { display:flex; flex-direction:column; min-width:0; gap:3px; }
.link-preview-site { color:var(--gold-d); font-size:11px; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.link-preview-title {
  display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  color:var(--ink-black); font-size:13px; line-height:1.45; font-weight:700;
}
.link-preview-description {
  display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  color:var(--ink-gray); font-size:11px; line-height:1.45;
}
.link-preview-remove {
  position:absolute; top:7px; right:7px; width:24px; height:24px; padding:0;
  display:grid; place-items:center; border:0; border-radius:4px; background:transparent;
  color:var(--ink-light); font:inherit; font-size:18px; line-height:1; cursor:pointer;
}
.link-preview-remove:hover { color:var(--red-seal); background:rgba(180,35,24,.08); }
.link-preview-loading { padding:8px 10px; color:var(--ink-light); font-size:12px; }
.message-link-previews { margin-top:9px; }
.message-link-preview-card { background:rgba(255,255,255,.68); }
.message-link-preview-card .link-preview-main { padding-right:9px; }
/* 用户气泡改金色底（设计稿）*/
.bubble-row.user-row .bubble { background:var(--gold-bg); color:var(--ink-black); border-top-right-radius:4px; }

/* ---- 首屏中央四模式选择器 ---- */
.cv-hero-modes { display:inline-flex; background:#f2efe6; border:1px solid var(--cream-dark); border-radius:999px; padding:4px; gap:2px; }
.hero-mode-pill { border:none; background:transparent; border-radius:999px; padding:8px 18px; font:inherit; font-size:14px; font-weight:600; color:var(--ink-gray); cursor:pointer; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; transition:.15s; }
.hero-mode-pill:hover { color:var(--ink-black); }
.hero-mode-pill.active { background:#fff; color:var(--gold-d); box-shadow:0 2px 7px rgba(60,50,30,.12); }
.hero-mode-pill .hm-ic { font-size:14px; }

/* ---- 顶栏只读模式小标签（发送后）---- */
.chat-mode-badge { display:none; align-items:center; gap:4px; font-size:12px; font-weight:600; color:var(--gold-d); background:var(--gold-50); border:1px solid var(--gold-light,#e6d8b8); border-radius:7px; padding:2px 9px; white-space:nowrap; }

/* ---- 场景快捷入口（对话框上方，仅空状态）---- */
.scene-chips { display:none; }
.chat-layout.no-project .scene-chips { display:flex; flex-wrap:nowrap; gap:6px; justify-content:center; align-items:center; max-width:820px; width:100%; margin:0 auto 8px; padding:0 2px; overflow-x:auto; }
.chat-layout.no-project .scene-chips::-webkit-scrollbar { display:none; }
.scene-chip { display:inline-flex; align-items:center; gap:4px; border:1px solid var(--cream-dark); background:#fff; border-radius:10px; padding:6px 11px; font:inherit; font-size:13px; font-weight:500; color:var(--ink-black); cursor:pointer; white-space:nowrap; transition:.15s; }
.scene-chip:hover { border-color:var(--gold); }
.scene-chip.on { background:var(--gold-bg); border-color:transparent; color:var(--gold-d); font-weight:600; }
.scene-chip .sc-em { font-size:13px; }

/* 游客态仅开放本地预检，历史、文件和私有能力不在未登录状态暴露。 */
body.guest-trial-active .cv-newbtn,
body.guest-trial-active .cv-search,
body.guest-trial-active .cv-list,
body.guest-trial-active .cv-nav,
body.guest-trial-active .cv-user,
body.guest-trial-active .chat-header .topbar-right,
body.guest-trial-active #historyDrawerBtn { display:none !important; }
.guest-trial-header-actions { display:none; align-items:center; gap:8px; }
body.guest-trial-active .guest-trial-header-actions { display:flex; }
body.guest-trial-active.guest-trial-submitted .chat-input-area { display:none !important; }
.guest-header-auth {
  min-height:34px; padding:0 13px; border-radius:4px; font:inherit;
  font-size:12px; font-weight:800; white-space:nowrap; cursor:pointer; transition:.15s;
}
.guest-header-auth { border:1px solid var(--gold); background:var(--gold); color:#fff; }
.guest-header-auth:hover { border-color:var(--gold-d); background:var(--gold-d); }
body.guest-trial-active .sidebar.cv-side { width:210px; }
.guest-preflight-row {
  width:min(820px, 100%); align-self:center; border:1px solid var(--cream-dark);
  border-left:3px solid var(--gold); border-radius:6px; background:#fff;
  padding:15px 17px; color:var(--ink-gray); box-shadow:0 4px 14px rgba(60,50,30,.05);
}
.guest-preflight-title { margin-bottom:8px; color:var(--ink-black); font-size:13px; font-weight:800; }
.guest-preflight-step { display:flex; align-items:center; gap:8px; min-height:27px; font-size:13px; }
.guest-preflight-step > span { width:17px; color:#aaa293; text-align:center; font-weight:800; }
.guest-preflight-step.done { color:var(--ink-gray); }
.guest-preflight-step.done > span { color:#5f8c64; }
.guest-preflight-step.active { color:var(--ink-black); font-weight:700; }
.guest-preflight-step.active > span { color:var(--gold-d); }
.guest-auth-gate,
.guest-mode-access-card,
.guest-resume-failure {
  width:min(800px, 100%); align-self:center; border:1px solid var(--cream-dark);
  border-top:3px solid var(--gold); border-radius:6px; background:#fffdf8;
  padding:24px; box-shadow:0 8px 22px rgba(60,50,30,.08);
}
.guest-auth-gate-kicker { color:var(--gold-d); font-size:11px; font-weight:800; }
.guest-auth-gate h2 { margin:7px 0 0; color:var(--ink-black); font-size:20px; line-height:1.35; }
.guest-auth-gate p,
.guest-mode-access-card p,
.guest-resume-failure p { margin:8px 0 0; color:var(--ink-gray); font-size:13px; line-height:1.7; }
.guest-auth-gate-actions { display:flex; align-items:center; gap:10px; margin-top:18px; }
.guest-auth-primary {
  min-height:38px; border-radius:4px; padding:0 15px; font:inherit; font-size:13px;
  font-weight:800; cursor:pointer;
}
.guest-auth-primary { border:1px solid var(--gold); background:var(--gold); color:#fff; }
.guest-auth-primary:hover { border-color:var(--gold-d); background:var(--gold-d); }
.guest-auth-gate ul { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:7px 18px; margin:18px 0 0; padding:13px 0 0; border-top:1px solid var(--cream-dark); list-style:none; color:var(--ink-gray); font-size:12px; }
.guest-auth-gate li::before { content:'✓'; margin-right:6px; color:var(--gold-d); font-weight:800; }
.guest-auth-gate small { display:block; margin-top:14px; color:#9b9388; font-size:11px; line-height:1.6; }
.guest-mode-access-card,
.guest-resume-failure { padding:18px 20px; }
.guest-mode-access-card > strong,
.guest-resume-failure > strong { color:var(--ink-black); font-size:15px; }
.guest-mode-access-card .guest-auth-primary,
.guest-resume-failure .guest-auth-primary { margin-top:14px; }
@media (max-width:820px) {
  body.guest-trial-active .sidebar.cv-side { width:min(300px, 84vw); }
  .guest-preflight-row { width:100%; }
  .guest-auth-gate,
  .guest-mode-access-card,
  .guest-resume-failure { width:100%; padding:18px; }
}
@media (max-width:520px) {
  body.guest-trial-active .chat-header { flex-direction:row; align-items:center; justify-content:space-between; }
  body.guest-trial-active .chat-header-left { gap:6px; min-width:0; }
  body.guest-trial-active .chat-project-name { padding:6px 8px; font-size:14px; }
  .guest-trial-header-actions { gap:6px; }
  .guest-header-auth { min-height:32px; padding:0 10px; font-size:11px; }
  .guest-auth-gate-actions { display:grid; grid-template-columns:1fr; }
  .guest-auth-primary { width:100%; }
  .guest-auth-gate ul { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .guest-preflight-row,
  .guest-auth-gate,
  .guest-mode-access-card,
  .guest-resume-failure { transition:none !important; }
}

/* ---- AI 回复下方操作条 ---- */
.bubble-actions { display:flex; align-items:center; gap:14px; margin-top:10px; padding-top:2px; }
.ba-btn { border:none; background:transparent; cursor:pointer; font-size:16px; line-height:1; color:var(--ink-gray); padding:2px; border-radius:6px; transition:.15s; opacity:.72; }
.ba-btn:hover { opacity:1; background:var(--gold-50); }

/* ---- 分享选择框 ---- */
.share-sheet { position:fixed; z-index:2200; background:#fff; border:1px solid var(--cream-dark); border-radius:14px; box-shadow:0 14px 40px rgba(40,38,60,.2); padding:8px; width:220px; }
.share-sheet .ss-title { font-size:11px; font-weight:700; letter-spacing:.04em; color:var(--ink-gray); padding:4px 8px 7px; }
.share-sheet button { display:flex; align-items:center; gap:10px; width:100%; text-align:left; border:none; background:transparent; border-radius:9px; padding:9px 9px; cursor:pointer; font:inherit; }
.share-sheet button:hover { background:var(--gold-50); }
.share-sheet .ss-ic { font-size:17px; width:22px; text-align:center; }
.share-sheet .ss-tx { display:flex; flex-direction:column; }
.share-sheet .ss-tx b { font-size:13.5px; font-weight:600; color:var(--ink-black); }
.share-sheet .ss-tx small { font-size:11px; color:var(--ink-gray); }

/* ---- 智能搜索流式过程卡 ---- */
.srch { background:var(--gold-50); border:1px solid #eadfc4; border-radius:14px; padding:12px 14px; max-width:560px; }
.srch-h { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:var(--gold-d); margin-bottom:9px; }
.srch-step { display:flex; gap:9px; align-items:flex-start; font-size:12.5px; color:#8f8a7e; padding:3px 0; line-height:1.5; }
.srch-step .dot { width:16px; height:16px; border-radius:50%; flex:0 0 auto; margin-top:1px; display:grid; place-items:center; font-size:10px; font-weight:700; }
.srch-step.done .dot { background:#e6efe3; color:#5a8f4e; } .srch-step.done { color:var(--ink-gray); }
.srch-step.act .dot { background:var(--gold-bg); color:var(--gold-d); } .srch-step.act { color:var(--ink-black); font-weight:600; }
.srch-step.wait .dot { background:#ece8de; color:#c2bdae; }
.srch-pills { display:flex; gap:5px; flex-wrap:wrap; margin:5px 0 2px 25px; }
.srch-pills .p { font-size:11px; border-radius:6px; padding:2px 7px; border:1px solid var(--cream-dark); background:#fff; color:#8f8a7e; }
.srch-pills .p.ok { color:#5a8f4e; border-color:#d3e6cd; background:#f5faf3; }
.srch-pills .p.run { color:var(--gold-d); border-color:#eadfc4; background:var(--gold-50); }

/* ---- 响应式：窄屏(<=820px)自动切换为移动布局（不依赖 UA）---- */
@media (max-width:820px) {
  .cv-hamburger { display:inline-block; }
  .app-container .sidebar.cv-side {
    position:fixed; top:0; left:0; bottom:0; width:min(300px, 84vw);
    transform:translateX(-104%); transition:transform .26s cubic-bezier(.3,.9,.3,1);
    box-shadow:8px 0 40px rgba(20,22,40,.18);
    z-index:1500;  /* 抽屉必须高于遮罩(1499)，否则遮罩盖住抽屉→整屏变灰且内容点不动 */
  }
  .app-container .sidebar.cv-side.open { transform:translateX(0); }
  .chat-header .chat-mode-bar { position:static; transform:none; order:3; width:100%; margin-top:8px; justify-content:center; }
  .chat-header { flex-wrap:wrap; row-gap:6px; }
  .chat-input-box { border-radius:16px; padding:11px 13px; }
  /* 移动端：模式-场景元素紧凑化 */
  .cv-hero-logo { font-size:19px; }
  .cv-hero-whale { width:32px; height:32px; font-size:17px; }
  .cv-hero-modes { padding:3px; }
  .hero-mode-pill { padding:7px 13px; font-size:13px; }
  .cv-hero-desc { font-size:12.5px; padding:0 16px; text-align:center; }
  .chat-mode-badge { font-size:11px; padding:2px 7px; }
  .chat-layout.no-project .scene-chips { justify-content:flex-start; padding:0 4px; }
  .scene-chip { font-size:12px; padding:5px 9px; }
  .bubble-row { max-width:100%; }
  .bubble { padding:13px 15px; }
  .project-insight-candidate-actions { align-items:stretch; flex-direction:column; }
  .project-insight-candidate-actions button { width:100%; }
  .project-fact-actions { display:flex; margin:6px 0 0; }
  .project-production-plan-header { align-items:flex-start; flex-direction:column; }
  .project-production-plan-actions,
  .project-production-plan-actions button { width:100%; }
  .project-production-plan-draft-downloads > div,
  .project-production-plan-draft-download { width:100%; }
}
@media (max-width:520px) {
  .chat-input-area { padding:8px var(--page-pad) 14px; }
  .chat-input-box { border-radius:15px; padding:10px 11px; }
  .chat-input { min-height:48px; max-height:min(34vh, 136px); font-size:14px; }
  .composer-main-row { grid-template-columns:44px minmax(0,1fr) 44px; gap:8px; }
  .composer-main-row .input-btn, .composer-primary-action { width:44px; height:44px; flex-basis:44px; }
  .composer-main-row .input-btn svg { width:21px; height:21px; }
  .composer-plus-btn { font-size:27px; }
  .voice-hold-tip { bottom:calc(100% + 10px); }
  .voice-recording-popover { width:min(310px,calc(100% - 20px)); gap:13px; padding:12px 14px; }
  .link-preview-image { width:56px; height:56px; flex-basis:56px; }
  .link-preview-main { gap:9px; padding:8px 38px 8px 8px; }
  .link-preview-description { -webkit-line-clamp:1; }
  .input-plus-menu { left:8px; grid-template-columns:repeat(2,minmax(76px,1fr)); }
}
/* 极窄屏(<=380px)：进一步收紧 */
@media (max-width:380px) {
  .hero-mode-pill { padding:6px 10px; font-size:12.5px; gap:4px; }
  .scene-chip { font-size:11.5px; padding:5px 8px; }
  .chat-input-box { padding:9px 10px; }
  .composer-main-row { grid-template-columns:42px minmax(0,1fr) 42px; gap:7px; }
  .composer-main-row .input-btn, .composer-primary-action { width:42px; height:42px; flex-basis:42px; }
  .voice-recording-popover { gap:10px; padding:11px 12px; }
  .voice-wave { gap:3px; }
}
@media (max-width:340px) {
  .composer-main-row { grid-template-columns:40px minmax(0,1fr) 40px; gap:6px; }
  .composer-main-row .input-btn, .composer-primary-action { width:40px; height:40px; flex-basis:40px; }
  .voice-hold-tip { font-size:11px; padding:6px 8px; }
}

/* ===== 新对话页：四模式独立卡片 ===== */
.sidebar.cv-side {
  width:252px;
  background:#f7f5ef;
  border-right-color:rgba(31,23,20,.12);
}
.cv-brand { padding:20px 18px 15px; }
.cv-product-brand { max-width:none; color:#201713; }
.cv-product-brand-mark { width:22px; height:22px; flex-basis:22px; }
.cv-product-brand-name { font-size:18px; }
.cv-brand-subtitle {
  margin:8px 0 0 30px;
  color:#7b736b;
  font-size:10px;
  line-height:1.45;
  white-space:nowrap;
}
.cv-newbtn {
  margin:2px 14px 12px;
  height:40px;
  justify-content:flex-start;
  padding:0 14px;
  border:1px solid #201713;
  border-radius:17px;
  background:#201713;
  color:#fff;
  box-shadow:none;
}
.cv-newbtn:hover { border-color:#332923; background:#332923; }
.cv-nav {
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:0 10px 13px;
  border-top:0;
  border-bottom:1px solid rgba(31,23,20,.1);
}
.cv-nav-btn {
  flex:0 0 auto;
  min-height:36px;
  flex-direction:row;
  justify-content:flex-start;
  gap:10px;
  padding:7px 10px;
  border-radius:5px;
  color:#5f5852;
  font-size:14px;
  text-align:left;
}
.cv-nav-btn em { font-size:12px; font-weight:650; }
.cv-nav-btn:hover { background:#eeebe3; color:#201713; }
.cv-nav-btn.active { background:#f3ead6; color:#8e641c; }
.cv-nav-icon { width:16px; height:16px; flex:0 0 16px; }
.cv-history-label {
  padding:14px 18px 7px;
  color:#8a8279;
  font-size:10px;
  font-weight:800;
}
.cv-search {
  margin:0 12px 5px;
  padding:7px 9px;
  border-radius:13px;
  background:rgba(255,255,255,.68);
}
.cv-list { padding:4px 9px 10px; }
.cv-grp { padding-left:9px; }
.cv-item { border-radius:13px; padding-left:13px; }
.cv-item.active {
  background:#f4ead4;
  box-shadow:none;
}
.cv-item.active::before {
  content:"";
  position:absolute;
  left:0;
  top:7px;
  bottom:7px;
  width:3px;
  border-radius:0 2px 2px 0;
  background:#c89b4a;
}

.chat-layout {
  --conversation-mode-color:#D88400;
  --conversation-mode-text:#8A5800;
  --conversation-mode-bg:#FFF8EB;
}
.new-conversation-heading {
  display:none;
  position:absolute;
  left:50%;
  top:50%;
  z-index:3;
  align-items:center;
  flex-direction:column;
  gap:3px;
  transform:translate(-50%,-50%);
}
.chat-layout.no-project .new-conversation-heading { display:flex; }
.chat-layout.no-project .chat-header-left .chat-project-name,
.chat-layout.no-project .chat-header-left .chat-mode-badge,
.chat-layout.no-project .chat-header > .topbar-right { display:none; }
.chat-layout.no-project .chat-header {
  min-height:72px;
  padding-top:12px;
  padding-bottom:12px;
  background:#fbfaf6;
}
.new-conversation-heading > strong {
  color:#201713;
  font-size:16px;
  line-height:1.15;
}
.new-conversation-mode-trigger {
  display:flex;
  align-items:center;
  gap:2px;
  padding:3px 5px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:var(--conversation-mode-text);
  font:inherit;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.new-conversation-mode-trigger:hover,
.new-conversation-mode-trigger:focus-visible { background:var(--conversation-mode-bg); outline:none; }
.new-conversation-mode-caret { margin-left:1px; font-size:12px; }
.new-conversation-mode-menu {
  position:absolute;
  top:calc(100% + 8px);
  left:50%;
  z-index:80;
  width:220px;
  padding:5px;
  transform:translateX(-50%);
  border:1px solid rgba(31,23,20,.14);
  border-radius:6px;
  background:#fffdf8;
  box-shadow:0 12px 28px rgba(48,39,25,.12);
}
.new-conversation-mode-menu[hidden] { display:none; }
.new-conversation-mode-menu button {
  display:grid;
  grid-template-columns:12px minmax(0,1fr) 16px;
  align-items:center;
  gap:9px;
  width:100%;
  padding:8px 9px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:#201713;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.new-conversation-mode-menu button:hover,
.new-conversation-mode-menu button:focus-visible { background:#f2efe7; outline:none; }
.new-conversation-mode-menu button > span:nth-child(2) { display:flex; flex-direction:column; gap:2px; }
.new-conversation-mode-menu strong { font-size:12px; }
.new-conversation-mode-menu small { color:#80776f; font-size:10px; }
.new-mode-menu-dot { width:7px; height:7px; border-radius:50%; background:var(--mode-color); }
.new-mode-menu-check { color:#9a6c20; font-size:12px; text-align:center; }

.chat-layout.no-project .chat-body {
  padding:34px 38px 10px;
  background:#fbfaf6;
}
.chat-layout.no-project .cv-hero {
  align-items:flex-start;
  justify-content:center;
  flex:1;
  min-height:360px !important;
}
.cv-hero-inner {
  width:min(1000px,100%);
  margin:0 auto;
  gap:27px;
  text-align:center;
}
.new-conversation-intro h1 {
  margin:0;
  color:#201713;
  font-size:36px;
  line-height:1.24;
  font-weight:850;
}
.new-conversation-intro p {
  margin:12px auto 0;
  max-width:680px;
  color:#6f6861;
  font-size:14px;
  line-height:1.75;
}
.new-conversation-mode-section {
  position:relative;
  isolation:isolate;
  width:100%;
}
.new-conversation-mode-section-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:12px;
  text-align:left;
}
.new-conversation-mode-section h2 {
  margin:0;
  color:#201713;
  font-size:15px;
  line-height:1.35;
}
.new-conversation-mode-section-head p {
  margin:4px 0 0;
  color:#817970;
  font-size:11px;
  line-height:1.5;
}
.new-mode-details-toggle {
  flex:0 0 auto;
  padding:4px 0;
  border:0;
  background:transparent;
  color:#8b641f;
  font:inherit;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.new-mode-details-toggle:hover { color:#201713; }
.cv-hero-modes {
  position:relative;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:1fr;
  gap:18px;
  width:100%;
  padding:6px 0;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
}
.cv-hero-modes::before {
  content:"";
  position:absolute;
  z-index:0;
  left:5%;
  right:5%;
  top:4px;
  height:132px;
  border:14px solid rgba(183,140,67,.045);
  border-right-color:transparent;
  border-left-color:transparent;
  border-radius:50%;
  transform:rotate(-1.5deg);
  filter:blur(.6px);
  pointer-events:none;
}
.hero-mode-pill {
  position:relative;
  z-index:1;
  display:flex;
  min-width:0;
  min-height:144px;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:7px;
  padding:24px;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--mode-color) 21%,rgba(31,23,20,.09));
  border-radius:24px;
  background:color-mix(in srgb,var(--mode-bg) 94%,#fff 6%);
  color:var(--mode-text);
  box-shadow:0 8px 22px rgba(64,49,28,.035);
  text-align:left;
  transition:background-color 160ms ease-out,border-color 160ms ease-out,transform 160ms ease-out,box-shadow 210ms ease-out;
}
.hero-mode-pill:hover {
  z-index:2;
  color:var(--mode-text);
  border-color:color-mix(in srgb,var(--mode-color) 38%,rgba(31,23,20,.09));
  background:color-mix(in srgb,var(--mode-bg) 90%,var(--mode-color) 10%);
  box-shadow:0 11px 25px rgba(64,49,28,.06);
  transform:translateY(-2px);
}
.hero-mode-pill:focus-visible { z-index:3; outline:2px solid var(--mode-color); outline-offset:3px; }
.hero-mode-pill.active {
  z-index:2;
  color:var(--mode-text);
  border-color:var(--mode-color);
  background:color-mix(in srgb,var(--mode-bg) 94%,var(--mode-color) 6%);
  box-shadow:0 12px 28px color-mix(in srgb,var(--mode-color) 11%,transparent),0 0 0 3px color-mix(in srgb,var(--mode-color) 5%,transparent);
  transform:none;
}
.new-mode-icon {
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  flex:0 0 34px;
  margin-bottom:2px;
  border:1px solid color-mix(in srgb,var(--mode-color) 24%,transparent);
  border-radius:50%;
  background:color-mix(in srgb,var(--mode-color) 10%,#fff);
  color:var(--mode-text);
  font-size:17px;
  font-weight:760;
  line-height:1;
}
.new-mode-title-row { display:flex; align-items:center; width:100%; min-width:0; gap:7px; }
.new-mode-title-row strong { color:inherit; font-size:14px; line-height:1.25; white-space:nowrap; }
.new-mode-dot { width:6px; height:6px; flex:0 0 6px; border-radius:50%; background:var(--mode-color); }
.new-mode-summary { color:var(--mode-text); font-size:11px; line-height:1.4; }
.new-mode-default {
  margin-left:auto;
  padding:2px 5px;
  border:1px solid color-mix(in srgb,var(--mode-color) 35%,transparent);
  border-radius:7px;
  background:rgba(255,255,255,.55);
  color:var(--mode-text);
  font-size:9px;
  font-weight:800;
  line-height:1.2;
}
.new-mode-suitability {
  min-height:20px;
  margin:8px 4px 0;
  color:#6f6861;
  font-size:11px;
  line-height:1.65;
  text-align:left;
}
.new-mode-details {
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-top:8px;
  padding-top:9px;
  border-top:1px solid rgba(31,23,20,.1);
  color:#6f6861;
  font-size:11px;
  line-height:1.65;
  text-align:left;
}
.new-mode-details[hidden] { display:none; }
.new-mode-details strong { flex:0 0 auto; color:var(--conversation-mode-text); }

.chat-layout.no-project .chat-input-area {
  padding:14px 38px 26px;
  background:#fbfaf6;
}
.chat-layout.no-project .chat-input-box { max-width:960px; }
.chat-input-box {
  border-color:color-mix(in srgb,var(--conversation-mode-color) 50%,rgba(31,23,20,.12));
  border-radius:28px;
  background:#fffdf9;
  box-shadow:0 13px 34px rgba(66,52,33,.075);
  padding:14px 16px 15px;
  transition:border-color 180ms ease,box-shadow 180ms ease;
}
.chat-input-box:focus-within {
  border-color:var(--conversation-mode-color);
  box-shadow:0 14px 34px color-mix(in srgb,var(--conversation-mode-color) 10%,rgba(66,52,33,.06));
}
.composer-resize-handle {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:9px;
  margin:-7px 0 1px;
  cursor:ns-resize;
  touch-action:none;
  opacity:.28;
  transition:opacity 140ms ease;
}
.composer-resize-handle span { width:32px; height:3px; border-radius:2px; background:#8a8177; }
.chat-input-box:hover .composer-resize-handle,
.chat-input-box:focus-within .composer-resize-handle,
.composer-resize-handle:focus-visible,
.composer-resize-handle.is-dragging { opacity:.72; }
.composer-resize-handle:focus-visible { outline:1px solid var(--conversation-mode-color); outline-offset:2px; }
.composer-mode-header {
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-width:0;
  padding:2px 5px 7px 7px;
  color:#746d65;
  font-size:11px;
}
.chat-layout.no-project .composer-mode-header { display:flex; }
.composer-mode-header > div { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.composer-mode-header strong { color:var(--conversation-mode-text); }
.composer-mode-header button {
  flex:0 0 auto;
  padding:3px 4px;
  border:0;
  background:transparent;
  color:#8b641f;
  font:inherit;
  font-size:10px;
  font-weight:750;
  cursor:pointer;
}
.composer-mode-header button:hover { color:#201713; }
.chat-layout.no-project .scene-chips {
  max-width:960px;
  justify-content:flex-start;
  margin-bottom:7px;
}
.scene-chip { border-radius:11px; }

.mode-connection-overlay {
  position:fixed;
  inset:0;
  z-index:45;
  overflow:visible;
  pointer-events:none;
}
.mode-connection-guide,
.mode-connection-flow {
  fill:none;
  stroke:var(--mode-flow-color);
  stroke-linecap:round;
}
.mode-connection-guide { stroke-width:1; }
.mode-connection-flow {
  stroke-width:2;
  filter:drop-shadow(0 0 4px color-mix(in srgb,var(--mode-flow-color) 28%,transparent));
}

.new-conversation-entering .new-conversation-intro { animation:newConversationEnter 300ms ease-out both; }
.new-conversation-entering .new-conversation-mode-section-head { animation:newConversationEnter 240ms 40ms ease-out both; }
.new-conversation-entering .hero-mode-pill { animation:newConversationCardEnter 220ms ease-out both; }
.new-conversation-entering .hero-mode-pill:nth-child(1) { animation-delay:40ms; }
.new-conversation-entering .hero-mode-pill:nth-child(2) { animation-delay:80ms; }
.new-conversation-entering .hero-mode-pill:nth-child(3) { animation-delay:120ms; }
.new-conversation-entering .hero-mode-pill:nth-child(4) { animation-delay:160ms; }
.new-conversation-entering .new-mode-suitability { animation:newConversationEnter 220ms 180ms ease-out both; }
.new-conversation-entering .chat-input-area { animation:newConversationEnter 240ms 100ms ease-out both; }
@keyframes newConversationEnter {
  from { opacity:0; transform:translateY(6px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes newConversationCardEnter {
  from { opacity:0; transform:translateY(5px); }
  to { opacity:1; transform:translateY(0); }
}

@media (max-width:960px) {
  .cv-hero-modes { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:820px) {
  .chat-layout.no-project .chat-header { flex-direction:row; min-height:64px; }
  .chat-layout.no-project .chat-body { padding:26px 22px 8px; }
  .chat-layout.no-project .chat-input-area { padding:8px 22px 14px; }
  .new-conversation-intro h1 { font-size:30px; }
  .cv-hero-inner { gap:26px; }
  .hero-mode-pill { min-height:128px; padding:18px 19px; }
}
@media (max-width:620px) {
  .cv-brand-subtitle { margin-left:27px; }
  .chat-layout.no-project .chat-body { padding:22px 14px 6px; }
  .chat-layout.no-project .chat-input-area { padding:7px 14px 12px; }
  .chat-layout.no-project .cv-hero { min-height:0 !important; }
  .cv-hero-inner { gap:22px; }
  .new-conversation-intro h1 { font-size:27px; line-height:1.28; }
  .new-conversation-intro p { margin-top:9px; font-size:12px; }
  .new-conversation-mode-section-head { align-items:flex-start; }
  .new-conversation-mode-section-head p { max-width:230px; }
  .cv-hero-modes { gap:12px; padding-top:4px; }
  .cv-hero-modes::before { left:2%; right:2%; top:22%; height:142px; }
  .hero-mode-pill { min-height:124px; padding:16px 15px; border-radius:22px; }
  .new-mode-icon { width:31px; height:31px; flex-basis:31px; font-size:15px; }
  .new-mode-details { flex-direction:column; gap:2px; }
  .new-conversation-heading > strong { font-size:15px; }
  .new-conversation-mode-trigger { font-size:10px; }
  .composer-mode-header { padding-left:3px; padding-right:3px; }
}
@media (max-width:380px) {
  .chat-layout.no-project .chat-body { padding-left:10px; padding-right:10px; }
  .chat-layout.no-project .chat-input-area { padding-left:10px; padding-right:10px; }
  .new-conversation-intro h1 { font-size:24px; }
  .new-mode-title-row { gap:5px; }
  .new-mode-title-row strong { font-size:13px; }
  .new-mode-default { padding-left:4px; padding-right:4px; }
  .hero-mode-pill { padding:14px 12px; }
}
@media (prefers-reduced-motion:reduce) {
  .hero-mode-pill,
  .composer-resize-handle,
  .chat-input-box,
  .mode-connection-overlay,
  .new-conversation-entering .new-conversation-intro,
  .new-conversation-entering .new-conversation-mode-section-head,
  .new-conversation-entering .new-mode-suitability,
  .new-conversation-entering .chat-input-area {
    animation:none !important;
    transition:none !important;
  }
  .mode-connection-overlay { display:none !important; }
}

/* ===== 邀请有礼 ===== */
.cv-nav-icon { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.invite-page { flex:1; min-height:0; overflow-y:auto; background:#f7f5ee; }
.invite-page-inner { width:min(820px, calc(100% - 64px)); margin:0 auto; padding:72px 0 56px; text-align:center; }
.invite-eyebrow { display:inline-flex; align-items:center; min-height:30px; padding:0 12px; border:1px solid rgba(164,123,53,.28); border-radius:4px; color:#947039; background:#f2eadb; font-size:13px; font-weight:700; letter-spacing:0; }
.invite-page h1 { margin:22px 0 14px; color:#201713; font-size:34px; line-height:1.3; letter-spacing:0; }
.invite-lead { max-width:650px; margin:0 auto; color:#6f6861; font-size:16px; line-height:1.9; }
.invite-condition { display:inline-flex; align-items:center; gap:7px; margin-top:18px; color:#77613e; font-size:13px; }
.invite-condition span { display:grid; place-items:center; width:18px; height:18px; border-radius:50%; background:#dfcfac; color:#594522; font-size:11px; }
.invite-reward-line { display:flex; justify-content:center; align-items:center; gap:24px; margin:35px auto 46px; color:#332e29; font-size:15px; }
.invite-reward-line strong { color:#a4782d; font-weight:700; }
.invite-reward-line i { display:block; width:1px; height:18px; background:rgba(31,23,20,.16); }
.invite-action-area { padding:28px; border:1px solid rgba(31,23,20,.16); border-top:2px solid #b78c43; border-radius:6px; background:#fbfaf6; text-align:left; box-shadow:0 10px 28px rgba(57,45,28,.05); }
.invite-action-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; }
.invite-action-heading h2 { margin:0; color:#201713; font-size:18px; line-height:1.4; letter-spacing:0; }
.invite-action-heading p { margin:7px 0 0; color:#6f6861; font-size:13px; }
.invite-code { flex:0 0 auto; padding:7px 10px; border:1px solid rgba(164,123,53,.25); border-radius:4px; background:#f2eadb; color:#81602b; font-size:12px; font-weight:700; }
.invite-link-field { display:block; margin-top:24px; }
.invite-link-field > span { display:block; margin-bottom:8px; color:#6f6861; font-size:12px; }
.invite-link-field input { width:100%; min-height:48px; padding:0 14px; border:1px solid rgba(31,23,20,.16); border-radius:4px; outline:none; background:#fff; color:#332d28; font:500 14px/1.4 inherit; box-sizing:border-box; }
.invite-link-field input:focus { border-color:#b78c43; box-shadow:0 0 0 2px rgba(183,140,67,.1); }
.invite-actions { display:flex; gap:12px; margin-top:16px; }
.invite-primary-btn,.invite-secondary-btn { min-height:44px; padding:0 20px; border-radius:4px; font:700 14px/1 inherit; cursor:pointer; transition:background .18s,border-color .18s,color .18s,transform .18s; }
.invite-primary-btn { border:1px solid #a77b32; background:#b78c43; color:#fff; }
.invite-primary-btn:hover { background:#a77b32; transform:translateY(-1px); }
.invite-secondary-btn { border:1px solid rgba(31,23,20,.2); background:transparent; color:#2d2723; }
.invite-secondary-btn:hover { border-color:#b78c43; color:#8a642a; }
.invite-primary-btn:disabled,.invite-secondary-btn:disabled { opacity:.45; cursor:not-allowed; transform:none; }
.invite-note { margin:24px 0 0; color:#756f68; font-size:12px; line-height:1.7; }
.invite-rules-link { margin-top:10px; padding:3px 0; border:0; border-bottom:1px solid rgba(139,103,43,.35); background:transparent; color:#8b672b; font:500 12px/1.5 inherit; cursor:pointer; }
.invite-status { min-height:22px; margin-top:12px; color:#8a642a; font-size:13px; }
.invite-status.error { color:#a34d3a; }

.invite-poster-backdrop { padding:24px; overflow-y:auto; }
.invite-poster-modal { width:min(620px, 100%); max-height:none; margin:auto; }
.invite-poster-preview { position:relative; display:grid; place-items:center; min-height:300px; padding:18px; overflow:hidden; border:1px solid rgba(31,23,20,.12); border-radius:6px; background:#e9e5da; }
.invite-poster-preview canvas { display:none; width:min(100%, 405px); height:auto; aspect-ratio:3/4; background:#f7f3e9; box-shadow:0 14px 34px rgba(42,34,23,.14); touch-action:auto; }
.invite-poster-preview canvas.ready { display:block; }
.invite-poster-loading { color:#756f68; font-size:14px; }
.invite-poster-loading[hidden] { display:none; }
.invite-poster-mobile-hint { margin:10px 0 0; text-align:center; color:#79736b; font-size:12px; }
.invite-poster-actions { flex-wrap:wrap; }
.invite-rules-modal { width:min(520px, calc(100% - 32px)); }
.invite-rules-list { margin:8px 0 0; padding-left:22px; color:#4c4640; font-size:14px; line-height:1.9; }
.invite-rules-list li + li { margin-top:7px; }

@media (max-width:820px) {
  .invite-page-inner { width:min(680px, calc(100% - 40px)); padding:48px 0 42px; }
  .invite-page h1 { font-size:30px; }
}
@media (max-width:520px) {
  .invite-page-inner { width:calc(100% - 28px); padding:34px 0 36px; }
  .invite-page h1 { margin-top:18px; font-size:26px; }
  .invite-lead { font-size:14px; line-height:1.8; }
  .invite-reward-line { gap:12px; margin:28px auto 34px; font-size:13px; }
  .invite-action-area { padding:20px 16px; }
  .invite-action-heading { flex-direction:column; gap:12px; }
  .invite-actions { flex-direction:column; }
  .invite-primary-btn,.invite-secondary-btn { width:100%; }
  .invite-poster-backdrop { align-items:flex-start; padding:12px; }
  .invite-poster-modal { margin:0 auto; }
  .invite-poster-preview { padding:10px; }
  .invite-poster-actions > button { flex:1 1 120px; }
}

/* ===== 对话操作、交付物抽屉与分享 ===== */
.topbar-right { display:flex; align-items:center; gap:6px; }
.artifact-trigger {
  display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:0 11px;
  border:1px solid var(--cream-dark); border-radius:7px; background:#fff;
  color:var(--ink-black); font:600 13px/1 inherit; cursor:pointer;
}
.artifact-trigger:hover { border-color:var(--gold); background:var(--gold-50); }
.artifact-trigger svg,
.workspace-more-trigger svg,
.workspace-more-menu svg {
  width:18px; height:18px; flex:0 0 auto; fill:none; stroke:currentColor;
  stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}
.artifact-trigger-count {
  display:inline-grid; place-items:center; min-width:19px; height:19px; padding:0 5px;
  border-radius:9px; background:#eee8dc; color:#79613a; font-size:11px; line-height:1;
}
.workspace-more-trigger { display:grid; place-items:center; }
.workspace-more-menu { top:calc(100% + 7px); min-width:176px; padding:5px; border-radius:8px; }
.workspace-more-menu button {
  display:flex; align-items:center; gap:10px; min-height:40px; padding:0 10px;
}
.workspace-more-menu button.danger { color:#a44b42; }
.workspace-more-menu button.danger:hover { color:#94372f; background:#fff5f3; }

.workspace-drawer-backdrop {
  position:fixed; inset:0; z-index:2100; display:none; justify-content:flex-end;
  background:rgba(28,25,21,.28);
}
.workspace-drawer-backdrop.active { display:flex; }
.workspace-drawer {
  width:min(440px, 100%); height:100%; display:flex; flex-direction:column;
  background:#fbfaf7; border-left:1px solid var(--cream-dark);
  box-shadow:-18px 0 46px rgba(44,37,27,.12);
}
.workspace-drawer-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:18px;
  padding:22px 22px 18px; border-bottom:1px solid var(--cream-dark); background:#fff;
}
.workspace-drawer-head h2 { margin:0; font-size:20px; line-height:1.35; letter-spacing:0; }
.workspace-drawer-head p { margin:5px 0 0; color:var(--ink-gray); font-size:12px; line-height:1.6; }
.drawer-close {
  display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:6px;
  background:transparent; color:var(--ink-gray); font-size:23px; cursor:pointer;
}
.drawer-close:hover { background:var(--gold-50); color:var(--ink-black); }
.workspace-drawer-body { flex:1; min-height:0; overflow:auto; padding:18px; }
.workspace-drawer-footer {
  padding:16px 18px; border-top:1px solid var(--cream-dark); background:#fff;
}
.workspace-drawer-footer .btn-primary { width:100%; }
.artifact-drawer-empty { padding:38px 18px; text-align:center; color:var(--ink-gray); font-size:13px; line-height:1.8; }
.artifact-conversation-info { margin-top:18px; padding-top:14px; border-top:1px solid var(--cream-dark); }
.artifact-conversation-info summary { color:#716a61; font-size:12px; font-weight:700; cursor:pointer; }
.artifact-conversation-info > div { margin-top:10px; padding:11px 12px; background:#fff; border:1px solid #ebe5da; border-radius:7px; }
.artifact-conversation-info p { display:flex; justify-content:space-between; gap:16px; margin:0; font-size:12px; line-height:1.7; }
.artifact-conversation-info p + p { margin-top:5px; }
.artifact-conversation-info span { color:#918a80; }
.artifact-conversation-info strong { color:#4a443d; font-weight:600; text-align:right; }

.bubble-avatar.ai-avatar {
  overflow:hidden; border:1px solid #e5dcc9; background:#fff; color:var(--gold);
  box-shadow:0 2px 7px rgba(63,49,29,.06);
}
.bubble-avatar.ai-avatar img { width:23px; height:23px; object-fit:contain; }
.bubble-avatar.human-avatar {
  background:#eee7d8; color:#58472f; border:1px solid #dfd4c1;
  font-size:13px; text-transform:uppercase;
}

.bubble-actions {
  display:flex; align-items:center; gap:2px; min-height:32px; margin-top:8px; padding-top:2px;
  opacity:0; pointer-events:none; transition:opacity .15s ease;
}
.ai-row:hover .bubble-actions,
.ai-row:focus-within .bubble-actions,
.ai-row.is-latest-ai-row .bubble-actions {
  opacity:1; pointer-events:auto;
}
.ba-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:5px;
  min-width:32px; height:32px; padding:0 6px; border:0; border-radius:6px;
  background:transparent; color:#86837e; font:500 12px/1 inherit; cursor:pointer;
  opacity:1; transition:background .15s,color .15s;
}
.ba-btn:hover { background:var(--gold-50); color:#785d2e; }
.ba-btn svg,
.share-sheet svg,
.composer-reply-bar > svg {
  width:20px; height:20px; flex:0 0 auto; fill:none; stroke:currentColor;
  stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}
.ba-btn .ba-status-label { white-space:nowrap; }

.share-sheet {
  width:196px; padding:5px; border:1px solid var(--cream-dark); border-radius:12px;
  box-shadow:0 14px 38px rgba(40,38,32,.16);
}
.share-sheet button {
  min-height:44px; padding:0 10px; gap:10px; border-radius:7px; color:var(--ink-black);
}
.share-sheet button:disabled { cursor:default; color:#77736c; }
.share-sheet button:disabled:hover { background:transparent; }
.share-sheet .ss-ic { display:grid; place-items:center; width:22px; }
.share-sheet .ss-ic svg { width:19px; height:19px; }
.share-sheet .ss-tx { display:block; min-width:0; }
.share-sheet .ss-tx b { display:block; font-size:13px; font-weight:600; }
.share-sheet .ss-tx small { display:none; }

.composer-reply-bar {
  display:grid; grid-template-columns:20px minmax(0,1fr) 28px; align-items:center; gap:9px;
  margin:0 0 8px; padding:8px 9px; border:1px solid #e5d9c3; border-radius:7px;
  background:#faf7f0; color:#74664e;
}
.composer-reply-bar[hidden] { display:none; }
.composer-reply-bar > svg { width:18px; height:18px; }
.composer-reply-bar > div { display:flex; min-width:0; gap:8px; align-items:baseline; }
.composer-reply-bar strong { flex:0 0 auto; font-size:12px; color:#816332; }
.composer-reply-bar span {
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:#79736b; font-size:12px;
}
.composer-reply-bar button {
  display:grid; place-items:center; width:28px; height:28px; border:0; border-radius:5px;
  background:transparent; color:#8b857c; font-size:18px; cursor:pointer;
}
.composer-reply-bar button:hover { background:#eee7d8; color:#4b443b; }

.conversation-share-modal,
.share-preview-modal { z-index:2300; }
.conversation-share-panel {
  position:relative; width:min(720px, 100%); height:min(720px, calc(100vh - 48px));
  display:flex; flex-direction:column; padding:22px 22px 82px; overflow:hidden;
}
.share-round-list { flex:1; min-height:0; overflow:auto; padding:2px 2px 12px; }
.share-round-item {
  display:grid; grid-template-columns:22px minmax(0,1fr); gap:12px; padding:15px 10px;
  border-top:1px solid #eee9df; cursor:pointer;
}
.share-round-item:first-child { border-top:0; }
.share-round-item:hover { background:#fbf8f2; }
.share-round-item input { width:17px; height:17px; margin:3px 0 0; accent-color:#a88340; }
.share-round-copy { min-width:0; }
.share-round-copy strong {
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:#302b25; font-size:14px;
}
.share-round-copy p {
  display:-webkit-box; margin:5px 0 0; overflow:hidden; -webkit-box-orient:vertical;
  -webkit-line-clamp:2; color:#77716a; font-size:12px; line-height:1.65;
}
.share-selection-footer {
  position:absolute; left:0; right:0; bottom:0; min-height:68px; padding:12px 22px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  border-top:1px solid var(--cream-dark); background:#fff;
}
.share-selection-footer > span { color:#70695f; font-size:13px; }
.share-selection-footer > div { display:flex; gap:8px; }

.share-preview-panel { width:min(820px, 100%); overflow:hidden; }
.share-card-stage {
  max-height:calc(100vh - 210px); overflow:auto; padding:22px; border:1px solid #e4ded2;
  background:#e9e5dc;
}
.conversation-share-card {
  width:680px; max-width:100%; margin:0 auto; padding:36px 38px 30px;
  background:#fff; border:1px solid #e7dfd0; color:#27231f;
  box-shadow:0 14px 34px rgba(46,39,28,.10);
}
.share-card-brand { display:flex; align-items:center; gap:10px; padding-bottom:20px; border-bottom:1px solid #eee8de; }
.share-card-brand img { width:30px; height:30px; object-fit:contain; }
.share-card-brand strong { display:block; font-size:14px; }
.share-card-brand span { display:block; margin-top:2px; color:#8c857b; font-size:11px; }
.conversation-share-card > h2 { margin:25px 0 10px; font-size:23px; line-height:1.4; letter-spacing:0; }
.share-card-round { padding:22px 0; border-top:1px solid #eee8de; }
.share-card-round:first-of-type { border-top:0; }
.share-card-role { margin-bottom:7px; color:#9a7738; font-size:10px; font-weight:700; }
.share-card-question { color:#2e2924; font-size:16px; font-weight:700; line-height:1.7; }
.share-card-answer { margin-top:19px; color:#464039; font-size:14px; line-height:1.8; }
.share-card-answer h1,.share-card-answer h2,.share-card-answer h3 { margin:16px 0 7px; font-size:16px; letter-spacing:0; }
.share-card-answer img { display:block; max-width:100%; margin:13px 0; }
.share-card-footer {
  display:grid; grid-template-columns:minmax(0,1fr) 92px; align-items:end; gap:24px;
  padding-top:20px; border-top:1px solid #eee8de;
}
.share-card-note { color:#898278; font-size:11px; line-height:1.7; }
.share-card-url { margin-top:8px; color:#6e665c; font-size:11px; word-break:break-all; }
.share-card-qr { width:92px; height:92px; }
.share-card-qr svg { display:block; width:100%; height:100%; }
.deliverable-file-icon svg {
  width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round;
}

@media (max-width:760px) {
  .artifact-trigger { padding:0 9px; }
  .artifact-trigger > span:first-of-type { display:none; }
  .conversation-share-panel { height:100%; max-height:100%; border-radius:0; padding:18px 14px 78px; }
  .conversation-share-modal { padding:0; align-items:stretch; }
  .share-selection-footer { padding:10px 14px; align-items:flex-start; }
  .share-selection-footer > div { flex:1; }
  .share-selection-footer button { flex:1; padding-left:9px; padding-right:9px; }
  .share-preview-modal { padding:0; align-items:stretch; }
  .share-preview-panel { width:100%; max-height:100%; border-radius:0; padding:14px; }
  .share-card-stage { padding:9px; max-height:calc(100vh - 180px); }
  .conversation-share-card { padding:24px 19px; }
  .share-card-footer { grid-template-columns:minmax(0,1fr) 78px; gap:14px; }
  .share-card-qr { width:78px; height:78px; }
  .bubble-actions { opacity:1; pointer-events:auto; }
}
/* ===== S1-S6 真实阶段反馈 ===== */
.generation-stage-row {
  width:min(820px,100%);
  align-self:flex-start;
  min-height:174px;
  color:var(--ink-black);
}
.generation-stage-card {
  overflow:hidden;
  border:1px solid rgba(184,144,67,.28);
  border-radius:18px;
  background:linear-gradient(145deg,#fffefb,#fbf7ee);
  box-shadow:0 12px 34px rgba(88,66,25,.07);
}
.generation-stage-track {
  display:flex;
  align-items:center;
  gap:5px;
  min-height:52px;
  padding:10px 16px;
  overflow-x:auto;
  border-bottom:1px solid rgba(184,144,67,.15);
  scrollbar-width:none;
}
.generation-stage-track::-webkit-scrollbar { display:none; }
.generation-track-item { display:flex;align-items:center;gap:6px;flex:0 0 auto;color:#aaa49b; }
.generation-track-item > span:last-child { display:flex;flex-direction:column;line-height:1.1; }
.generation-track-item b { font-size:10px;letter-spacing:.04em; }
.generation-track-item em { margin-top:3px;font-size:10px;font-style:normal;white-space:nowrap; }
.generation-track-dot {
  display:grid;place-items:center;width:18px;height:18px;border:1px solid #d8d3ca;border-radius:50%;
  background:#fff;font-size:10px;font-weight:700;
}
.generation-track-arrow { color:#d6d0c5;font-size:14px; }
.generation-track-item.is-completed { color:#94702d;opacity:.72; }
.generation-track-item.is-completed .generation-track-dot { border-color:#c4a15d;background:#fbf3df;color:#8a6729; }
.generation-track-item.is-active { color:#76561e; }
.generation-track-item.is-active .generation-track-dot { border-color:#b99043;background:#c9a65f;color:#fff;box-shadow:0 0 0 5px rgba(201,166,95,.13);animation:generation-breathe 1.8s ease-in-out infinite; }
.generation-track-item.is-needs_confirmation { color:#876621; }
.generation-track-item.is-needs_confirmation .generation-track-dot { border:2px solid #b99043;color:#8a6729; }
.generation-track-item.is-skipped { color:#aaa39a;text-decoration:line-through;text-decoration-style:dashed; }
.generation-track-item.is-skipped .generation-track-dot { border-style:dashed; }
.generation-track-item.is-failed { color:#985a4d; }
.generation-track-item.is-failed .generation-track-dot { border-color:#b97465;color:#985a4d;background:#fff5f2; }
.generation-track-item.is-stopped { color:#807970; }
.generation-stage-current { display:flex;align-items:center;gap:16px;min-height:118px;padding:18px 20px; }
.generation-stage-copy { flex:1;min-width:0; }
.generation-stage-heading { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.generation-stage-heading strong { font-family:var(--font-serif,serif);font-size:16px;letter-spacing:.01em;color:#342a1c; }
.generation-stage-heading span { font-size:12px;color:#94702d; }
.generation-stage-copy p { margin:7px 0 12px;color:#756b5e;font-size:13px;line-height:1.5; }
.generation-action-line { position:relative;width:min(340px,100%);height:3px;border-radius:3px;background:#eee8dc;overflow:hidden; }
.generation-action-line i { position:absolute;inset:0 auto 0 -28%;width:30%;border-radius:inherit;background:linear-gradient(90deg,transparent,#d3ae61,transparent);animation:generation-flow 2.2s ease-in-out infinite; }
.generation-stop-button { flex:0 0 auto;border:0;background:transparent;color:#76664e;font:inherit;font-size:12px;padding:8px 10px;cursor:pointer;text-decoration:underline;text-underline-offset:3px; }
.generation-stop-button:hover { color:#4c3921; }
.generation-visual { position:relative;flex:0 0 62px;width:62px;height:62px; }
.generation-orbit img { position:absolute;inset:20px;width:22px;height:22px;z-index:2; }
.generation-orbit i { position:absolute;border:1px solid rgba(190,149,68,.32);border-radius:50%;animation:generation-orbit 2.4s ease-out infinite; }
.generation-orbit i:nth-child(1) { inset:13px; }
.generation-orbit i:nth-child(2) { inset:6px;animation-delay:.45s; }
.generation-orbit i:nth-child(3) { inset:0;animation-delay:.9s; }
.generation-scan { display:grid;gap:6px;align-content:center;overflow:hidden; }
.generation-scan i { display:block;height:8px;border:1px solid #dfd7c7;border-radius:4px;background:#fff; }
.generation-scan span { position:absolute;top:8px;bottom:8px;width:13px;background:linear-gradient(90deg,transparent,rgba(211,174,97,.5),transparent);animation:generation-scan 2.4s ease-in-out infinite; }
.generation-radar { border:1px solid rgba(190,149,68,.3);border-radius:50%; }
.generation-radar::before,.generation-radar::after { content:"";position:absolute;background:rgba(190,149,68,.2); }
.generation-radar::before { width:1px;top:7px;bottom:7px;left:50%; }
.generation-radar::after { height:1px;left:7px;right:7px;top:50%; }
.generation-radar i { position:absolute;width:6px;height:6px;border-radius:50%;background:#cba65a;box-shadow:0 0 8px rgba(203,166,90,.5);animation:generation-node 1.8s ease-in-out infinite; }
.generation-radar i:nth-child(1) { left:14px;top:18px; }
.generation-radar i:nth-child(2) { right:12px;top:27px;animation-delay:.45s; }
.generation-radar i:nth-child(3) { left:29px;bottom:10px;animation-delay:.9s; }
.generation-radar b { position:absolute;inset:7px;border-radius:50%;border-top:1px solid #cba65a;animation:generation-spin 4s linear infinite; }
.generation-outline i { position:absolute;left:8px;width:15px;height:9px;border-radius:3px;background:#d4af62;box-shadow:27px 0 0 #eee4d1;animation:generation-node 2s ease-in-out infinite; }
.generation-outline i:nth-child(1) { top:8px; }
.generation-outline i:nth-child(2) { top:27px;animation-delay:.35s; }
.generation-outline i:nth-child(3) { top:46px;animation-delay:.7s; }
.generation-outline span { position:absolute;left:22px;width:28px;height:1px;background:#d7c59d;transform-origin:left; }
.generation-outline span:nth-of-type(1) { top:17px;transform:rotate(32deg); }
.generation-outline span:nth-of-type(2) { top:45px;transform:rotate(-32deg); }
.generation-sections { display:grid;gap:6px;align-content:center; }
.generation-sections i { display:block;height:11px;border-radius:4px;background:linear-gradient(90deg,#d0ac61 0 36%,#eee8dc 36%);background-size:220% 100%;animation:generation-fill 2.4s ease-in-out infinite; }
.generation-sections i:nth-child(2) { animation-delay:.4s; }
.generation-sections i:nth-child(3) { animation-delay:.8s; }
.generation-pipeline { display:flex;align-items:center;justify-content:space-between; }
.generation-pipeline::before { content:"";position:absolute;left:8px;right:8px;top:30px;height:1px;background:#d9ccb1; }
.generation-pipeline i { z-index:1;width:14px;height:14px;border:1px solid #caa557;border-radius:3px;background:#fffaf0; }
.generation-pipeline span { position:absolute;top:24px;width:12px;height:12px;border-radius:50%;background:rgba(203,166,90,.65);filter:blur(1px);animation:generation-pipeline 2.5s ease-in-out infinite; }
.generation-deliverables { display:grid;gap:8px;padding:0 20px 18px 98px; }
.generation-deliverables-summary { color:#776b5b;font-size:12px; }
.generation-deliverable { display:flex;align-items:center;gap:9px;min-height:42px;padding:8px 10px;border:1px solid #e8e0d2;border-radius:10px;background:#fff;overflow:hidden;position:relative; }
.generation-deliverable.is-running::after { content:"";position:absolute;inset:0 auto 0 -28%;width:25%;background:linear-gradient(90deg,transparent,rgba(221,188,119,.2),transparent);animation:generation-flow 2.3s ease-in-out infinite; }
.generation-deliverable-mark { display:grid;place-items:center;width:20px;height:20px;border:1px solid #d9c69f;border-radius:50%;color:#987127;font-size:11px;font-weight:700; }
.generation-deliverable.is-completed .generation-deliverable-mark { background:#caa65d;color:#fff;animation:generation-check .45s ease-out 1; }
.generation-deliverable.is-failed { border-color:#ead1cb;background:#fffafa; }
.generation-deliverable > div { display:flex;flex-direction:column;min-width:0; }
.generation-deliverable b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#493d2e; }
.generation-deliverable em { margin-top:2px;font-style:normal;font-size:11px;color:#8b8175; }
.generation-composer-hint { padding:5px 12px 0;color:#8b7450;font-size:11px;line-height:1.4; }
.chat-input-box.generation-locked .composer-plus-btn:disabled,.chat-input-box.generation-locked .voice-btn:disabled { opacity:.38;cursor:not-allowed; }
.workflow-final-completion { display:flex;align-items:flex-start;gap:15px;width:min(820px,100%);padding:20px;border:1px solid rgba(185,145,68,.35);border-radius:18px;background:linear-gradient(145deg,#fffefa,#fbf3df);box-shadow:0 14px 36px rgba(90,66,21,.08);position:relative;overflow:hidden; }
.workflow-final-completion h3 { margin:1px 0 5px;font-family:var(--font-serif,serif);font-size:18px;color:#3d2e1a; }
.workflow-final-completion p { margin:0;color:#776b59;font-size:13px;line-height:1.6; }
.final-completion-mark { position:relative;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:#f6eacb; }
.final-completion-mark img { width:22px;height:22px; }
.final-completion-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:13px; }
.workflow-final-completion.play-once::after { content:"";position:absolute;inset:0 auto 0 -30%;width:26%;background:linear-gradient(90deg,transparent,rgba(211,174,97,.23),transparent);animation:final-card-shine .8s ease-out 1; }
.workflow-final-completion.play-once .final-completion-mark { animation:final-mark-halo .75s ease-out 1; }
.workflow-final-completion.awaiting-confirmation { align-items:center; }
.workflow-final-completion.awaiting-confirmation > button { margin-left:auto;flex:0 0 auto; }
@keyframes generation-breathe { 50% { box-shadow:0 0 0 8px rgba(201,166,95,.05);transform:scale(1.04); } }
@keyframes generation-flow { 0% { left:-30%; } 65%,100% { left:110%; } }
@keyframes generation-orbit { 0% { opacity:.8;transform:scale(.72); } 100% { opacity:0;transform:scale(1.12); } }
@keyframes generation-scan { 0% { left:-20px; } 70%,100% { left:70px; } }
@keyframes generation-node { 50% { opacity:.35;transform:scale(.78); } }
@keyframes generation-spin { to { transform:rotate(360deg); } }
@keyframes generation-fill { 50% { background-position:100% 0; } }
@keyframes generation-pipeline { 0% { left:4px;opacity:0; } 15% { opacity:1; } 85% { opacity:1; } 100% { left:52px;opacity:0; } }
@keyframes generation-check { 0% { transform:scale(.6); } 70% { transform:scale(1.12); } }
@keyframes final-card-shine { from { left:-30%; } to { left:120%; } }
@keyframes final-mark-halo { 0% { box-shadow:0 0 0 0 rgba(198,157,74,.35); } 100% { box-shadow:0 0 0 24px rgba(198,157,74,0); } }
@media (max-width:700px) {
  .generation-stage-row { min-height:196px; }
  .generation-stage-track { padding-inline:12px; }
  .generation-stage-current { padding:15px 13px;gap:11px; }
  .generation-visual { flex-basis:50px;width:50px;height:50px;transform:scale(.82);transform-origin:center; }
  .generation-deliverables { padding:0 13px 14px; }
  .generation-stop-button { padding-inline:4px; }
  .workflow-final-completion { flex-wrap:wrap;padding:16px; }
  .workflow-final-completion.awaiting-confirmation > button { margin-left:59px; }
}
@media (prefers-reduced-motion: reduce) {
  .generation-stage-card *, .workflow-final-completion * { animation:none!important;transition:none!important; }
  .generation-action-line i { left:35%;width:30%; }
}
.generation-background .generation-stage-card *, .generation-background .workflow-final-completion * { animation-duration:8s!important; }
.deliverable-file-meta { display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:6px;color:#81786d;font-size:11px; }
.deliverable-file-meta span+span::before { content:"·";margin-right:10px;color:#c5bba9; }
.deliverable-private-saved { margin-top:7px;color:#7e642f;font-size:12px; }
.artifact-quality-state {
  margin-top:10px;padding:11px 12px;border:1px solid rgba(201,169,110,.38);
  border-radius:10px;background:#fffaf0;color:var(--ink-black);font-size:12px;line-height:1.55;
}
.artifact-quality-state.reviewed { border-color:rgba(4,120,87,.28);background:#f2fbf7; }
.artifact-quality-state.needs-input { border-color:rgba(180,83,9,.3);background:#fff8ed; }
.artifact-quality-state.needs-revision { border-color:rgba(180,83,9,.3);background:#fffbeb; }
.artifact-quality-state.manual-review { border-color:rgba(67,56,202,.25);background:#f7f7ff; }
.artifact-quality-state.blocked { border-color:rgba(180,35,24,.3);background:#fff6f5; }
.artifact-quality-title { font-weight:800; }
.artifact-quality-progress { margin-top:4px;font-weight:650;color:var(--ink-black); }
.artifact-quality-disclosure,.artifact-quality-standard { margin-top:4px;color:var(--ink-gray); }
.artifact-quality-download-wait {
  margin-top:8px;padding:7px 9px;border-radius:7px;background:rgba(180,83,9,.08);color:#7e5720;
}
.artifact-quality-retry { margin-top:7px;min-height:32px;padding:5px 10px;font-size:12px; }
.artifact-quality-sharing-limit {
  margin-top:7px;padding:7px 9px;border-radius:7px;background:rgba(67,56,202,.06);color:#5145a5;
}
.artifact-quality-guidance { margin-top:8px; }
.artifact-quality-guidance summary { cursor:pointer;font-weight:700;color:#7e5720; }
.artifact-quality-guidance-intro { margin:8px 0;color:var(--ink-gray); }
.artifact-quality-guidance ol,.artifact-quality-guidance ul { margin:8px 0 0;padding-left:20px; }
.artifact-quality-guidance li+li { margin-top:8px; }
.artifact-quality-guidance-actions { display:flex;flex-wrap:wrap;gap:7px;margin-top:10px; }
.artifact-quality-guidance-actions .btn-outline { min-height:34px;padding:6px 10px;font-size:12px; }
.artifact-quality-excerpt { color:var(--ink-gray);overflow-wrap:anywhere; }
.artifact-quality-ai-help { margin-top:2px;color:#5f4a28; }
.artifact-quality-deterministic summary,.artifact-quality-state.blocked .artifact-quality-guidance summary { color:#8f241b; }
.artifact-quality-format summary { color:#8f4a11; }
.artifact-quality-findings li {
  padding:8px 9px;border:1px solid rgba(201,169,110,.28);border-radius:7px;background:rgba(255,255,255,.72);
}
.artifact-quality-findings li.blocking { border-color:rgba(180,35,24,.26);background:#fffafa; }
.artifact-quality-finding-head { display:flex;justify-content:space-between;gap:10px;margin-bottom:3px;font-weight:700; }
.artifact-quality-remediation { margin-top:3px;color:#5f4a28; }
.artifact-quality-guidance summary:focus-visible {
  outline:2px solid var(--gold);outline-offset:3px;border-radius:3px;
}
.deliverable-card-primary-actions { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px; }
.deliverable-card-primary-actions .deliverable-actions { margin:0; }
.deliverable-card-primary-actions .btn-primary:disabled:hover { transform:none;box-shadow:none; }
.conversation-action-failure {
  border: 1px solid color-mix(in srgb, var(--danger, #b42318) 28%, transparent);
  background: color-mix(in srgb, var(--danger, #b42318) 5%, var(--surface, #fff));
}

.conversation-action-failure__title {
  margin-bottom: 6px;
  font-weight: 700;
}

.conversation-action-failure p {
  margin: 0 0 10px;
  color: var(--ink-gray);
  line-height: 1.6;
}

.conversation-action-failure [data-conversation-action-retry]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .artifact-quality-state { padding:10px; }
  .artifact-quality-finding-head { align-items:flex-start;flex-direction:column;gap:2px; }
  .conversation-action-failure {
    width: min(100%, 34rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .conversation-action-failure-row {
    animation: none !important;
  }
}
