/* =====================================================================
   拾光简历 · 设计令牌 (Design Tokens)
   ===================================================================== */
:root {
  /* —— 品牌色 · 紫（主色）—— */
  --brand-50:  #f3efff;
  --brand-100: #ece5ff;
  --brand-200: #d9ceff;
  --brand-300: #bea7ff;
  --brand-400: #9d80ff;
  --brand-500: #7a5cf0;   /* 主品牌 · 略加深以保对比度 */
  --brand-600: #6848d0;   /* 当前 #7357ff 已升级语义主色 */
  --brand-700: #5337bd;
  --brand-800: #3f2a8f;
  --brand-900: #271a5c;

  /* —— 品牌色 · 酸橙绿（强调/成功点缀）—— */
  --accent-50:  #f8ffde;
  --accent-100: #efffc2;
  --accent-200: #e4ff9b;
  --accent-300: #dfff74;   /* 主色 */
  --accent-400: #c9f051;
  --accent-500: #9ec52a;
  --accent-600: #6b9631;
  --accent-700: #557b27;

  /* —— 中性色 —— */
  --neutral-0:   #ffffff;
  --neutral-50:  #faf9fb;
  --neutral-100: #f4f1f7;
  --neutral-150: #ede8f0;
  --neutral-200: #e2dae8;   /* line 主色 */
  --neutral-300: #c8c0d1;
  --neutral-400: #9d94a8;
  --neutral-500: #756d80;
  --neutral-600: #564d62;
  --neutral-700: #3d3548;
  --neutral-800: #262030;
  --neutral-850: #1d1924;
  --neutral-900: #14111b;
  --neutral-950: #0c0a12;

  /* —— 语义色 —— */
  --success-bg:    #ecf8e9;
  --success-bg-2:  #dcf7e8;
  --success-text:  #1f6a4b;
  --success-text-2:#2c6b3a;
  --success-line:  #b8e8cf;

  --warning-bg:    #fff7dd;
  --warning-bg-2:  #fff0ce;
  --warning-text:  #79531e;
  --warning-line:  #efd8a8;

  --danger-bg:     #fff4f4;
  --danger-bg-2:   #fff0eb;
  --danger-text:   #a72f2f;
  --danger-text-2: #8a4634;
  --danger-line:   #e4a8a8;

  --info-bg:       #f0ecff;
  --info-bg-2:     #ebe6ff;
  --info-text:     #5a3d8e;
  --info-line:     #c9bced;

  /* —— 语义映射（兼容老 token 名）—— */
  --ink:     var(--neutral-900);
  --muted:   var(--neutral-500);
  --line:    var(--neutral-200);
  --paper:   #fffdf9;
  --canvas:  #f5f2ed;
  --purple:  var(--brand-600);
  --purple-soft: var(--brand-100);
  --lime:    var(--accent-300);
  --coral:   #ff8065;
  --green:   #1f8f63;

  /* —— 字体 —— */
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Consolas", monospace;

  /* —— 字号阶梯 (1rem = 16px) —— */
  --text-2xs: 0.6875rem;   /* 11px · 用于最弱提示 */
  --text-xs:  0.75rem;     /* 12px · 标签/小字 */
  --text-sm:  0.8125rem;   /* 13px · 次要正文 */
  --text-base:0.875rem;    /* 14px · 正文 */
  --text-md:  1rem;        /* 16px · 强调正文 */
  --text-lg:  1.125rem;    /* 18px · 小标题 */
  --text-xl:  1.25rem;     /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 2.75rem;     /* 44px */
  --text-6xl: 3.375rem;    /* 54px */

  /* —— 行高 —— */
  --leading-tight:  1.1;
  --leading-snug:   1.25;
  --leading-normal: 1.55;
  --leading-relaxed:1.7;

  /* —— 字重 —— */
  --weight-regular:  400;
  --weight-medium:   560;
  --weight-semibold: 640;
  --weight-bold:     700;
  --weight-black:    800;

  /* —— 字距 —— */
  --tracking-tight:  -0.04em;
  --tracking-snug:   -0.025em;
  --tracking-normal:  0;
  --tracking-wide:    0.05em;
  --tracking-wider:   0.12em;

  /* —— 间距 4px 基准 —— */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  28px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* —— 圆角 —— */
  --radius-xs:   8px;
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-2xl:  36px;
  --radius-pill: 999px;

  /* —— 阴影（精致化）—— */
  --shadow-xs: 0 1px 2px rgba(20, 17, 27, 0.05);
  --shadow-sm: 0 2px 6px rgba(20, 17, 27, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 17, 27, 0.08);
  --shadow-lg: 0 24px 48px rgba(40, 29, 65, 0.10);
  --shadow-xl: 0 32px 72px rgba(40, 29, 65, 0.14);
  --shadow-glow: 0 12px 28px rgba(104, 72, 208, 0.22);
  --shadow-glow-strong: 0 18px 40px rgba(74, 50, 179, 0.32);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.4);

  /* —— 旧 token 兼容 —— */
  --shadow: var(--shadow-lg);
  --radius-xl: var(--radius-xl);
  --radius-lg: var(--radius-lg);
  --radius-md: var(--radius-md);

  /* —— 动效 —— */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
  --duration-slower: 480ms;
  --transition-fast:   var(--duration-fast) var(--ease-out);
  --transition-base:   var(--duration-base) var(--ease-out);
  --transition-slow:   var(--duration-slow) var(--ease-out);
  --transition-spring: 380ms var(--ease-out);

  /* —— z-index —— */
  --z-base:    0;
  --z-sticky:  10;
  --z-overlay: 100;
  --z-modal:   300;  /* 弹窗遮罩 */
  --z-toast:   400;  /* 全局瞬态提示，永远在最顶层（必须高于弹窗，否则验证码提示会被磨砂遮罩盖住） */

  /* —— 焦点环 —— */
  --ring-color: rgba(122, 92, 240, 0.45);
  --ring-offset: 2px;
}

/* =====================================================================
   Reset & 基础
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
button, input, textarea, select { font: inherit; color: inherit; }
button { color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* 选区样式 */
::selection { background: var(--brand-200); color: var(--brand-900); }

/* 通用焦点环（无障碍） */
:focus-visible {
  outline: 2px solid var(--ring-color);
  outline-offset: var(--ring-offset);
  border-radius: 4px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; /* 由 input 自身 border-color 与 shadow 提供 */
}

/* =====================================================================
   顶栏
   ===================================================================== */
.ambient {
  position: fixed;
  z-index: -1;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  pointer-events: none;
}
.ambient-one { top: -240px; right: -120px; background: radial-gradient(circle, #d9d0ff, transparent 70%); }
.ambient-two { bottom: -280px; left: -180px; background: radial-gradient(circle, #e7ff9b, transparent 70%); }

.topbar {
  width: min(1440px, calc(100% - 48px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-snug);
  font-size: var(--text-md);
  transition: opacity var(--transition-fast);
}
.brand:hover { opacity: 0.85; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--ink);
  transform: rotate(-4deg);
  font-size: 17px;
  box-shadow: var(--shadow-sm);
}
.brand em {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  color: #554800;
  background: var(--lime);
  font-size: var(--text-2xs);
  font-style: normal;
  letter-spacing: var(--tracking-wider);
  font-weight: var(--weight-black);
}

.topbar-actions { display: flex; align-items: center; gap: var(--space-3); }
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}
.privacy-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #45c58a;
  box-shadow: 0 0 0 4px rgba(69, 197, 138, .15);
}
.privacy-dot.demo { background: #f1a84b; box-shadow: 0 0 0 4px rgba(241, 168, 75, .14); }

/* AI 不可用横幅：首屏顶部醒目提示。部署配置错误（如缺 Key）时用户第一屏就能看到，
   而不是走到"上传简历 / 填完资料"才发现，且错误提示一闪就没了。 */
.ai-banner {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning-text);
  box-shadow: var(--shadow-sm);
}
.ai-banner[hidden] { display: none; }
.ai-banner-icon {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--warning-text);
  color: var(--warning-bg);
  font-size: 15px;
  font-weight: var(--weight-bold);
  line-height: 1;
}
.ai-banner-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-sm);
  line-height: 1.45;
}
.ai-banner-body strong { font-weight: var(--weight-bold); }
#navLibraryButton b {
  min-width: 20px; height: 20px;
  display: inline-grid; place-items: center;
  margin-left: 5px;
  border-radius: var(--radius-pill);
  color: white;
  background: var(--purple);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}

/* =====================================================================
   应用骨架
   ===================================================================== */
.app-shell {
  width: min(1440px, calc(100% - 48px));
  min-height: calc(100vh - 108px);
  margin: 0 auto var(--space-6);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: var(--space-5);
}
.app-shell [hidden] { display: none !important; }
.app-shell.library-mode { grid-template-columns: 1fr; }

/* —— 侧栏流程卡 —— */
.journey-card,
.workspace {
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
}

.journey-card {
  min-height: calc(100vh - 108px);
  padding: 36px 28px 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, #1d1924 0%, #2b2540 70%, #362a5c 100%);
  color: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: sticky;
  top: 84px;
}
.journey-card::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  right: -90px; top: 80px;
  border: 40px solid rgba(223, 255, 116, .08);
  border-radius: 50%;
  pointer-events: none;
}
.journey-card::before {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  left: -120px; bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 92, 240, .25), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  color: #b7adc6;
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider);
}
.journey-head h2 {
  margin: 14px 0 12px;
  font-size: 30px;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.journey-head p {
  margin: 0;
  max-width: 240px;
  color: #aaa4b4;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.step-list {
  margin: 36px 0 24px;
  display: grid;
  gap: var(--space-1);
}
.step-item {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: var(--radius-md);
  color: #85808e;
  background: transparent;
  text-align: left;
  cursor: default;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  font-size: var(--text-sm);
}
.step-item.available { cursor: pointer; }
.step-item.available:hover { color: white; background: rgba(255, 255, 255, .05); transform: translateX(2px); }
.step-item.active { color: white; background: rgba(255, 255, 255, .09); }
.step-item.done { color: #d5d1dc; }
.step-number {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid #4c4656;
  border-radius: 9px;
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  transition: all var(--transition-fast);
}
.step-item.active .step-number {
  color: var(--ink);
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 4px 12px rgba(223, 255, 116, .35);
}
.step-item.done .step-number { border-color: var(--purple); color: white; background: var(--purple); }
.step-label { font-weight: var(--weight-semibold); }
.step-check { color: var(--lime); font-size: var(--text-2xs); font-weight: var(--weight-bold); }

.journey-quote {
  margin-top: auto;
  padding: var(--space-4) var(--space-5);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .045);
  position: relative;
}
.journey-quote span {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--lime);
  font-size: var(--text-xs);
}
.journey-quote p {
  margin: 10px 0 0;
  color: #c7c1cf;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}

/* —— 主工作区 —— */
.workspace {
  min-height: calc(100vh - 108px);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 249, .92);
  backdrop-filter: blur(24px);
  overflow: hidden;
}

.screen {
  min-height: 100%;
  padding: 56px clamp(28px, 6vw, 80px);
  animation: rise var(--duration-slow) var(--ease-out) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 18px;
  color: var(--purple);
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 24px; height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.micro-note {
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}

/* =====================================================================
   通用按钮
   ===================================================================== */
.primary-button,
.secondary-button,
.ghost-button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-base),
              background var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}
.primary-button {
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow-sm), var(--shadow-inner);
}
.primary-button.purple {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  box-shadow: var(--shadow-glow), var(--shadow-inner);
}
.secondary-button {
  color: var(--brand-700);
  border-color: var(--brand-200);
  background: var(--brand-50);
}
.secondary-button:hover {
  border-color: var(--brand-300);
  background: var(--brand-100);
}
.ghost-button {
  color: var(--neutral-700);
  border-color: var(--neutral-200);
  background: rgba(255, 255, 255, .8);
}
.ghost-button:hover {
  border-color: var(--neutral-300);
  background: white;
}
.compact {
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: 11px;
  font-size: var(--text-xs);
}
.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.primary-button.purple:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-strong), var(--shadow-inner);
}
.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: .45;
  box-shadow: none;
  transform: none;
}
.danger-button {
  padding: 9px var(--space-3);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
  color: var(--danger-text);
  background: var(--danger-bg);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.danger-button:hover:not(:disabled) {
  background: #ffe5e5;
  border-color: #d68787;
}
.danger-button:disabled { opacity: .45; cursor: not-allowed; }

/* =====================================================================
   屏幕头部 + 卡片
   ===================================================================== */
.paper-line.short { width: 64%; }
.paper-line.mid { width: 82%; }
.floating-card.one { left: -8px; top: 22%; transform: rotate(-4deg); }
.floating-card.two { right: -10px; bottom: 18%; transform: rotate(3deg); }

.screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: 40px;
}
.screen-header h1 {
  margin: var(--space-2) 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
  color: var(--neutral-900);
}
.screen-header p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}
.screen-index {
  color: var(--neutral-300);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
  flex-shrink: 0;
}

.choice-card.selected { background: var(--brand-50); }

/* =====================================================================
   文件上传
   ===================================================================== */
.upload-panel {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px dashed #cfc6dc;
  border-radius: var(--radius-lg);
  background: #faf8fc;
}
.drop-zone {
  min-height: 130px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.drop-zone:hover { background: rgba(255, 255, 255, .5); }
.drop-zone input { display: none; }
.drop-zone strong { display: block; margin-bottom: 5px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.drop-zone span { color: var(--muted); font-size: var(--text-xs); }
.drop-zone em {
  display: block; margin-top: 7px;
  color: #91899a; font-size: var(--text-2xs); font-style: normal;
}
.upload-state {
  display: grid; gap: 5px;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--brand-100);
}
.upload-state strong { margin: 0; color: #3f3379; font-size: var(--text-sm); }
.upload-state.failed { background: var(--danger-bg-2); }
.upload-state.failed strong,
.upload-state.failed span { color: var(--danger-text-2); }
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: #3d3473;
  background: var(--purple-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

/* =====================================================================
   表单
   ===================================================================== */
.form-card {
  padding: var(--space-7);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-xs);
}
.profile-master-card { display: grid; gap: 4px; }

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-section-title > div { display: flex; align-items: center; gap: var(--space-3); }
.form-section-title span {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 9px;
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
}
.form-section-title strong { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.form-section-title small {
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: right;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--neutral-700);
}
.field label small {
  display: inline-block;
  margin-left: var(--space-2);
  color: var(--muted);
  font-weight: var(--weight-regular);
}
.field small { color: #9a94a1; font-size: var(--text-2xs); }

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  outline: 0;
  color: var(--neutral-900);
  background: white;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  font-size: var(--text-base);
}
.input, .select { height: 48px; padding: 0 var(--space-4); }
.textarea { min-height: 110px; padding: var(--space-4); line-height: var(--leading-relaxed); resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--neutral-400); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--neutral-300); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(122, 92, 240, .12);
  background: white;
}

.photo-upload {
  min-height: 144px;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  border: 1px dashed #d5cddd;
  border-radius: var(--radius-lg);
  text-align: center;
  background: #faf9fb;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.photo-upload:hover { border-color: var(--brand-300); background: var(--brand-50); }
.photo-upload input { display: none; }
.photo-preview {
  width: 88px; height: 108px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* =====================================================================
   角色选择 / 选材
   ===================================================================== */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.role-option {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}
.role-option:hover { border-color: var(--brand-200); transform: translateY(-1px); }
.role-option.selected {
  color: var(--brand-700);
  border-color: var(--brand-400);
  background: var(--brand-50);
}
.role-option strong { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.role-option span { display: block; margin-top: 6px; color: var(--muted); font-size: var(--text-2xs); }
.role-main-input {
  height: 56px;
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  border-color: var(--brand-200);
  background: var(--brand-50);
}
.role-main-input:focus { border-color: var(--brand-500); background: white; }
.role-groups {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #faf9fc;
}
.role-group {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--space-3);
  align-items: start;
}
.role-group > span {
  padding-top: 8px;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide);
}
.role-group > div { display: flex; flex-wrap: wrap; gap: 7px; }
.role-chip {
  padding: 7px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-pill);
  color: var(--neutral-600);
  background: white;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.role-chip:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
  background: var(--brand-50);
  transform: translateY(-1px);
}
.role-chip.selected {
  border-color: var(--brand-500);
  color: white;
  background: var(--brand-600);
}

/* =====================================================================
   差距诊断（分析页）
   ===================================================================== */
.analysis-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.analysis-card {
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
}
.analysis-card.accent {
  color: white;
  background: linear-gradient(160deg, #1d1924, #2b2540);
  border-color: transparent;
}
.analysis-card h3 { margin: 0 0 var(--space-4); font-size: var(--text-md); font-weight: var(--weight-semibold); }
.match-score {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-5);
}
.match-score strong {
  font-size: 56px;
  line-height: .9;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.match-score span { color: #aaa3b3; font-size: var(--text-sm); }
.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .12);
}
.score-rationale {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: #eee8ff;
  background: rgba(255, 255, 255, .1);
}
.score-rationale strong { font-size: var(--text-2xs); }
.score-rationale p { margin: 4px 0 0; font-size: var(--text-2xs); line-height: var(--leading-normal); }
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-300), var(--accent-400));
  transition: width var(--duration-slow) var(--ease-out);
}
.analysis-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.analysis-list li {
  display: flex; align-items: flex-start; gap: var(--space-3);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}
.analysis-card.accent .analysis-list li { color: #c9c2d0; }
.bullet-icon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 7px;
  color: var(--brand-700);
  background: var(--purple-soft);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.analysis-card.accent .bullet-icon { color: var(--ink); background: var(--lime); }

.skill-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.skill {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--neutral-600);
  background: var(--neutral-100);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1px solid transparent;
}
.skill.hit {
  color: var(--success-text-2);
  background: var(--success-bg-2);
  border-color: var(--success-line);
}
.skill.missing {
  color: var(--danger-text-2);
  background: var(--danger-bg-2);
  border-color: var(--danger-line);
}

.diagnosis-skills { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.analysis-card .diagnosis-columns { margin-top: 0; }

/* 旧诊断卡（兼容） */
.resume-diagnosis {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px solid #d8e4d0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f7ffe7, #fff);
}
.resume-diagnosis.needs-work {
  border-color: var(--warning-line);
  background: linear-gradient(135deg, #fff8e7, #fff);
}
.completeness-score {
  display: flex; flex-wrap: wrap;
  align-content: center; align-items: baseline;
  gap: 4px;
  padding-right: var(--space-5);
  border-right: 1px solid rgba(70, 60, 80, .12);
}
.completeness-score span { width: 100%; color: var(--muted); font-size: var(--text-2xs); font-weight: var(--weight-black); }
.completeness-score strong {
  font-size: 42px;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.completeness-score em { color: var(--muted); font-size: var(--text-2xs); font-style: normal; }
.diagnosis-content h3 { margin: 0 0 5px; font-size: var(--text-md); }
.diagnosis-content > div > p { margin: 0; color: var(--muted); font-size: var(--text-2xs); line-height: var(--leading-relaxed); }
.diagnosis-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.diagnosis-columns > div {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .75);
}
.diagnosis-columns strong { font-size: var(--text-2xs); font-weight: var(--weight-bold); }
.diagnosis-columns ul {
  margin: 7px 0 0;
  padding-left: 15px;
  color: #6c5b42;
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}
.diagnosis-columns p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: var(--text-2xs);
}
.interview-plan {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-top: var(--space-3);
}
.interview-plan span {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 9px;
  border-radius: var(--radius-md);
  color: #5e5369;
  background: #f2eef5;
  font-size: var(--text-2xs);
}
.interview-plan b {
  width: 17px; height: 17px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--purple);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}

/* =====================================================================
   访谈对话
   ===================================================================== */
.interview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-5);
}
.conversation-card {
  min-height: 560px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #f8f7fb;
  display: flex;
  flex-direction: column;
}
.interview-status {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line);
  color: var(--neutral-500);
  background: white;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}
.interview-status strong {
  color: var(--purple);
  font-weight: var(--weight-semibold);
}
.career-verdict {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-5);
  align-items: start;
  margin-top: var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-md);
}
.career-verdict > span { font-size: var(--text-xs); font-weight: var(--weight-black); letter-spacing: var(--tracking-wide); }
.career-verdict strong { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.career-verdict p { margin: 6px 0 0; font-size: var(--text-xs); line-height: var(--leading-relaxed); }
.career-verdict.risk { color: #76442f; background: var(--danger-bg-2); }
.career-verdict.watch { color: #735b26; background: var(--warning-bg); }
.career-verdict.good { color: var(--success-text-2); background: var(--success-bg); }

.simple-gap-card {
  display: grid;
  gap: 7px;
  margin-top: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}
.simple-gap-card span { color: var(--muted); font-size: var(--text-2xs); }
.simple-gap-card strong { font-size: var(--text-sm); font-weight: var(--weight-bold); }

/* 生成路径 */
.generation-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.generation-path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  transition: all var(--transition-base);
}
.generation-path:hover {
  border-color: var(--brand-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.generation-path > span { color: var(--muted); font-size: var(--text-2xs); font-weight: var(--weight-black); letter-spacing: var(--tracking-wide); }
.generation-path h3 { margin: var(--space-2) 0 7px; font-size: var(--text-md); }
.generation-path > p {
  min-height: 38px;
  margin: 0 0 var(--space-4);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.generation-path button { width: 100%; margin-top: auto; }
.interview-path {
  border-color: var(--brand-300);
  background: linear-gradient(145deg, var(--brand-50), #fff);
  box-shadow: var(--shadow-glow);
}
.interview-path > span { color: var(--purple); }
.interview-topic-list {
  width: 100%;
  display: grid;
  gap: 6px;
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: white;
}
.interview-topic-list small { margin-bottom: 2px; color: var(--muted); font-size: var(--text-2xs); }
.interview-topic-list strong { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.gain-estimate {
  width: 100%;
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: #355d2d;
  background: var(--success-bg);
}
.gain-estimate b, .gain-estimate small { display: block; }
.gain-estimate b { font-size: var(--text-md); font-weight: var(--weight-bold); }
.gain-estimate small { margin-top: 4px; color: #66755f; font-size: var(--text-2xs); line-height: var(--leading-normal); }

.analysis-details {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid #ece7f0;
  border-radius: var(--radius-md);
  color: var(--muted);
  background: #faf9fb;
  font-size: var(--text-2xs);
}
.analysis-details summary,
.source-details summary,
.compact-revision summary,
.result-summary summary {
  cursor: pointer;
  color: var(--neutral-600);
  font-weight: var(--weight-bold);
  list-style: none;
  display: flex; align-items: center; gap: var(--space-2);
}
.analysis-details summary::-webkit-details-marker { display: none; }
.analysis-details summary::before {
  content: "▸";
  font-size: var(--text-xs);
  color: var(--brand-500);
  transition: transform var(--transition-fast);
}
.analysis-details[open] > summary::before { transform: rotate(90deg); }
.analysis-details p { margin: 10px 0 0; line-height: var(--leading-relaxed); }

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--purple);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}
.ai-orb {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: white;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: var(--shadow-glow);
}
.question-count { margin-left: auto; color: #99939f; font-size: var(--text-xs); }
.question-row { display: flex; align-items: center; }
.question-text {
  margin: var(--space-9) 0 var(--space-3);
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  font-weight: var(--weight-bold);
}
.question-help {
  margin: 0 0 var(--space-6);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.answer-box { min-height: 150px; }
.answer-box.compact-answer { min-height: 92px; }
.answer-tools {
  display: flex; align-items: center; justify-content: space-between;
  margin: var(--space-5) 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-2xs);
}

/* 对话气泡 */
.chat-stream {
  max-height: 540px;
  min-height: 300px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: var(--space-5);
  padding: var(--space-7);
  scroll-behavior: smooth;
}
.chat-stream::-webkit-scrollbar { width: 8px; }
.chat-stream::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: var(--radius-pill); }
.chat-stream::-webkit-scrollbar-thumb:hover { background: var(--neutral-300); }

.chat-exchange { display: grid; gap: var(--space-3); }
.chat-message {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.chat-message > div {
  max-width: 82%;
  padding: var(--space-3) var(--space-4);
  border-radius: 4px 18px 18px 18px;
  background: white;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--neutral-150);
}
.chat-message.user-message { flex-direction: row-reverse; }
.chat-message.user-message > div {
  border-radius: 18px 4px 18px 18px;
  color: white;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}
.chat-message small {
  display: block; margin-bottom: 6px;
  color: var(--neutral-400);
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide);
}
.chat-message.user-message small {
  color: rgba(255, 255, 255, .85);
  text-align: right;
}
.chat-message p {
  margin: 0;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}
.chat-message em {
  display: block; margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  font-style: normal;
}
.chat-avatar {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
}
.chat-avatar.ai {
  color: white;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: var(--shadow-glow);
}
.chat-avatar.user {
  color: #4d6022;
  background: var(--lime);
}
.chat-guidance {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: var(--space-2);
}
.chat-guidance span {
  padding: 5px var(--space-2);
  border-radius: var(--radius-sm);
  color: #76531a;
  background: var(--warning-bg-2);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
}
.chat-message.current > div {
  border-color: var(--brand-200);
  background: white;
  box-shadow: var(--shadow-sm);
}

.chat-composer {
  padding: var(--space-5) var(--space-6) var(--space-5);
  border-top: 1px solid var(--line);
  background: white;
}

/* 语音主按钮 */
.voice-primary {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: 0;
  border-radius: var(--radius-lg);
  color: white;
  text-align: left;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: var(--shadow-glow), var(--shadow-inner);
  cursor: pointer;
  transition: all var(--transition-base);
}
.voice-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-strong), var(--shadow-inner);
}
.voice-primary > span {
  grid-row: 1 / 3;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #ffdfdf;
  background: rgba(255, 255, 255, .18);
  font-size: var(--text-lg);
}
.voice-primary strong { font-size: var(--text-md); font-weight: var(--weight-bold); }
.voice-primary em {
  margin-top: 4px;
  opacity: .85;
  font-size: var(--text-xs);
  font-style: normal;
}
.voice-primary.listening {
  background: linear-gradient(135deg, #ef6e74, #ca4059);
  box-shadow: 0 10px 24px rgba(202, 64, 89, .3), var(--shadow-inner);
}

.quick-label { margin: var(--space-4) 0 var(--space-2); color: #77707e; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.text-answer { margin: var(--space-3) 0; }
.text-answer summary { color: #665d70; font-size: var(--text-sm); cursor: pointer; }
.text-answer .answer-box { width: 100%; margin-top: 10px; font-size: var(--text-md); }

.interview-ready {
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0 var(--space-6);
  padding: var(--space-3) var(--space-4);
  border: 1px solid #cbe89e;
  border-radius: var(--radius-md);
  background: #f2ffd8;
}
.interview-ready > span {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: white;
  background: var(--accent-600);
}
.interview-ready strong { display: block; font-size: var(--text-xs); font-weight: var(--weight-bold); }
.interview-ready p { margin: 4px 0 0; color: #607047; font-size: var(--text-2xs); line-height: var(--leading-relaxed); }

.chat-composer .suggestion-chips { margin-top: 0; }
.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.composer-actions > div { display: flex; gap: var(--space-2); flex-wrap: wrap; flex-shrink: 0; }
.composer-actions button { white-space: nowrap; flex-shrink: 0; }
.composer-primary { display: flex; gap: var(--space-2); }
.finished-actions { display: flex; justify-content: flex-end; gap: var(--space-3); }

.suggestion-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0 var(--space-6); }
.suggestion-chip {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-pill);
  color: var(--neutral-600);
  background: #faf8fc;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.suggestion-chip:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
  background: var(--brand-50);
}
.suggestion-chip.selected {
  border-color: var(--brand-500);
  color: var(--brand-700);
  background: var(--brand-100);
  box-shadow: 0 0 0 2px rgba(122, 92, 240, .12);
}

/* 提炼右侧栏 */
.insight-rail { display: grid; align-content: start; gap: var(--space-3); }
.simple-memory { position: sticky; top: 92px; min-height: 220px; }
.simple-memory .extraction-head { padding-bottom: var(--space-3); border-bottom: 1px solid #eee9f4; }
.simple-memory .extract-card { box-shadow: none; }
.resume-impact-card em {
  display: block; margin-top: var(--space-2);
  color: #6b52c7;
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-black);
}
.compact-empty { padding: var(--space-8) var(--space-3); }

.insight-box {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: #f1edf5;
}
.insight-box.lime { background: var(--accent-100); }
.insight-box strong { display: block; margin-bottom: var(--space-2); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.insight-box p { margin: 0; color: #6f6878; font-size: var(--text-2xs); line-height: var(--leading-relaxed); }

.coach-judgement {
  color: white;
  background: linear-gradient(145deg, #38276f, #6a4bc7);
}
.coach-judgement strong, .coach-judgement b { display: block; color: white; }
.coach-judgement b { margin: 6px 0; font-size: var(--text-md); }
.coach-judgement p { color: #e6ddff; }

.interview-target b { display: block; margin-bottom: 7px; color: #392763; font-size: var(--text-sm); font-weight: var(--weight-bold); }

.extraction-panel {
  padding: var(--space-4);
  border: 1px solid #d7ccef;
  border-radius: var(--radius-lg);
  background: white;
}
.extraction-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.extraction-head strong, .extraction-head span { display: block; }
.extraction-head strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.extraction-head span, .extraction-head em {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-style: normal;
}

.extract-card {
  margin-top: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #f6f3fb;
  border: 1px solid transparent;
  transition: all var(--transition-base);
}
.extract-card > span {
  color: #533da8;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.extract-card p {
  margin: 5px 0 var(--space-2);
  color: var(--neutral-700);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}
.extract-card div { display: flex; flex-wrap: wrap; gap: 4px; }
.extract-card i {
  padding: 3px 6px;
  border-radius: 6px;
  color: #675d71;
  background: white;
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-medium);
}
.extract-card i.metric { color: var(--success-text); background: var(--accent-100); }

.extract-empty {
  padding: var(--space-4) var(--space-2);
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
  text-align: center;
}
.extraction-panel > small {
  display: block;
  margin-top: var(--space-3);
  color: #9a6a36;
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}

.completion-check p { display: grid; gap: 6px; }
.completion-check p span { color: #8d8594; }
.completion-check p span.done { color: var(--success-text); font-weight: var(--weight-semibold); }

.mini-progress { display: flex; gap: 5px; margin-top: var(--space-3); }
.mini-progress i {
  height: 5px;
  flex: 1;
  border-radius: var(--radius-pill);
  background: var(--neutral-200);
}
.mini-progress i.done { background: var(--purple); }

/* =====================================================================
   经历事实卡
   ===================================================================== */
.facts-list { display: grid; gap: var(--space-3); }
.fact-card {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  transition: all var(--transition-base);
}
.fact-card:hover { border-color: var(--brand-200); }
.fact-card.confirmed { border-color: var(--success-line); background: #fbfffc; }
.fact-source {
  margin-bottom: var(--space-2);
  color: var(--purple);
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide);
}
.fact-card h3 { margin: 0 0 7px; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.fact-card p { margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-relaxed); }
.fact-actions { display: flex; align-items: flex-start; gap: 7px; }

.icon-button {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--neutral-600);
  font-size: var(--text-sm);
}
.icon-button:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
  background: var(--brand-50);
  transform: translateY(-1px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-3);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  color: #8a5b23;
  background: var(--warning-bg-2);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
}
.confirmed .status-pill {
  color: var(--success-text);
  background: var(--success-bg-2);
}

/* 手动经历录入 */
.manual-experience-card {
  margin-top: var(--space-5);
  padding: var(--space-7);
  border: 1px solid #dcd4f1;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f8f5ff 0%, #fff 65%, #f7ffe2 100%);
}
.import-review {
  margin-top: var(--space-4);
  padding: var(--space-5);
  border: 1px solid #dcd4f1;
  border-radius: var(--radius-lg);
  background: white;
}
.import-review-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  align-items: flex-start;
}
.import-review-head h3 { margin: 5px 0 5px; font-size: var(--text-md); }
.import-review-head p { margin: 0; color: var(--muted); font-size: var(--text-2xs); line-height: var(--leading-normal); }

.import-fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.import-fact {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #faf9fc;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.import-fact:hover { border-color: var(--brand-300); }
.import-fact input, .memory-consent input { accent-color: var(--purple); }
.import-fact strong, .import-fact span { display: block; }
.import-fact strong { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.import-fact p {
  margin: 5px 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}
.import-fact span { color: var(--purple); font-size: var(--text-2xs); font-weight: var(--weight-bold); }

.memory-consent {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid #e6e0ef;
  cursor: pointer;
}
.memory-consent b {
  color: #5d4a89;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}

.manual-experience-card.prominent {
  margin-top: var(--space-4);
  border-color: #c9bced;
  box-shadow: 0 10px 30px rgba(72, 52, 150, .08);
}
.manual-experience-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
}
.manual-experience-head h2 {
  margin: 5px 0 7px;
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-snug);
  font-weight: var(--weight-black);
}
.manual-experience-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.manual-experience-list { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.manual-experience-empty {
  display: grid; gap: 6px;
  padding: var(--space-7);
  border: 1px dashed #cec4e4;
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, .65);
}
.manual-experience-empty strong { color: var(--ink); font-size: var(--text-xs); }
.manual-experience-empty span { font-size: var(--text-2xs); }

.manual-experience-item {
  padding: var(--space-5);
  border: 1px solid #e3ddec;
  border-radius: var(--radius-md);
  background: white;
}
.manual-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}
.manual-item-head strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.textarea.compact-field { min-height: 72px; }

/* =====================================================================
   选材面板（简历生成）
   ===================================================================== */
.library-picker {
  margin-top: var(--space-6);
  padding: var(--space-6);
  border: 1px solid #dcd4f1;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #f8f5ff, #fff);
}
.picker-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-4);
}
.picker-head h3 { margin: 4px 0; font-size: var(--text-md); }
.picker-head p { margin: 0; color: var(--muted); font-size: var(--text-2xs); }
.picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.picker-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.picker-item:hover { border-color: var(--brand-300); }
.picker-item.selected { border-color: #ad9dec; background: var(--brand-50); }
.picker-item input { accent-color: var(--purple); margin-top: 2px; }
.picker-item strong, .picker-item small { display: block; }
.picker-item strong { margin-bottom: 5px; font-size: var(--text-xs); }
.picker-item small { color: var(--muted); font-size: var(--text-2xs); line-height: var(--leading-normal); }

.selection-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid #ddd5f4;
  border-radius: var(--radius-md);
  background: var(--brand-50);
}
.selection-toolbar strong, .selection-toolbar span { display: block; }
.selection-toolbar strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.selection-toolbar span { margin-top: 4px; color: var(--muted); font-size: var(--text-2xs); }

.resume-material-list { display: grid; gap: var(--space-3); }
.resume-material {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  cursor: pointer;
  transition: all var(--transition-base);
}
.resume-material:hover { border-color: #b9abe8; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.resume-material.selected {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: 0 8px 24px rgba(72, 52, 150, .08);
}
.resume-material.recommended { border-left: 4px solid var(--purple); }
.material-group { display: grid; gap: var(--space-3); margin-bottom: var(--space-6); }
.material-group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 4px 3px;
}
.material-group-head strong, .material-group-head span { display: block; }
.material-group-head strong { font-size: var(--text-md); }
.material-group-head span { margin-top: 4px; color: var(--muted); font-size: var(--text-xs); }
.material-group-head > em {
  color: var(--purple);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--weight-bold);
}
.recommended-group {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--brand-50);
}
.resume-material > input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--purple); }
.material-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 7px;
}
.material-meta span {
  color: var(--purple);
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide);
}
.material-meta em {
  padding: 4px var(--space-2);
  border-radius: var(--radius-pill);
  color: #8a5b23;
  background: var(--warning-bg-2);
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-semibold);
}
.resume-material.selected .material-meta em { color: var(--success-text); background: var(--success-bg-2); }
.material-body h3 { margin: 0 0 7px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.material-body p { margin: 0; color: var(--muted); font-size: var(--text-2xs); line-height: var(--leading-relaxed); }
.recommend-reason {
  margin-top: var(--space-2);
  padding: 7px var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--info-text);
  background: var(--brand-100);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}
.selection-explainer {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  color: #665879;
  background: #f1edf5;
}
.selection-explainer strong { font-size: var(--text-2xs); font-weight: var(--weight-bold); }
.selection-explainer p { margin: 4px 0 0; font-size: var(--text-2xs); line-height: var(--leading-relaxed); }

/* =====================================================================
   简历预览
   ===================================================================== */
.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-6);
  align-items: start;
}
.resume-paper {
  min-height: 920px;
  padding: 48px 56px;
  border: 1px solid #ddd8e1;
  background: white;
  box-shadow: var(--shadow-lg);
  outline: none;
  transition: box-shadow var(--transition-fast);
}
.resume-paper:focus { box-shadow: 0 0 0 4px rgba(122, 92, 240, .16), var(--shadow-lg); }
.resume-paper:focus-visible { outline: none; }

.resume-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 2px solid var(--ink);
}
.resume-head h1 { margin: 0; font-size: 30px; letter-spacing: var(--tracking-snug); font-weight: var(--weight-black); }
.resume-head h2 { margin: 7px 0 var(--space-2); color: var(--purple); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.resume-contact { color: #76717a; font-size: var(--text-2xs); line-height: var(--leading-relaxed); }
.resume-photo {
  width: 80px; height: 96px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #eeeaf0;
}
.resume-section { margin-top: var(--space-7); }
.resume-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wide);
  color: var(--neutral-900);
}
.resume-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--neutral-150);
}
.resume-summary {
  margin: 0;
  color: #55515b;
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}
.resume-entry { margin-bottom: var(--space-5); }
.resume-entry-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 7px;
  font-size: var(--text-2xs);
}
.resume-entry-head strong { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.resume-entry ul {
  margin: 0;
  padding-left: var(--space-4);
  color: #4f4a54;
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}

.resume-sidebar {
  display: grid;
  gap: var(--space-3);
  position: sticky;
  top: 100px;
}
.side-panel {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-xs);
}
.side-panel h3 { margin: 0 0 var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.side-panel p { margin: 0; color: var(--muted); font-size: var(--text-2xs); line-height: var(--leading-relaxed); }

.version-card {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-top: var(--space-2);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.version-card:hover { border-color: var(--brand-300); }
.version-card.active {
  border-color: var(--brand-400);
  background: var(--brand-50);
}
.version-card strong { display: block; font-size: var(--text-2xs); font-weight: var(--weight-bold); }
.version-card span { color: var(--muted); font-size: var(--text-2xs); }

.footer-actions {
  justify-content: space-between;
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.footer-actions-right { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Toast */
.toast {
  position: fixed;
  z-index: var(--z-toast);
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 模态遮罩 */
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-backdrop.open .memory-modal { transform: none; }

/* =====================================================================
   账号（登录 / 注册）
   ===================================================================== */
.auth-button {
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: 11px;
  border: 1px solid var(--neutral-200);
  background: rgba(255, 255, 255, .8);
  color: var(--neutral-700);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform var(--transition-fast), border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
}
.auth-button:hover { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); transform: translateY(-1px); }
.auth-button.logged-in { color: var(--brand-700); border-color: var(--brand-200); background: var(--brand-50); }

/* =====================================================================
   未登录门禁（上线策略：注册登录后才能使用，不做匿名试用）
   层级刻意排在应用界面之上、登录弹窗之下：
   门禁 250 < 弹窗 300 < 提示 400 —— 登录时弹窗浮在门禁上，
   而"验证码已发送"之类的提示又能盖过弹窗。
   ===================================================================== */
.auth-gate {
  position: fixed; inset: 0; z-index: 250;
  /* 用 flex-start + 卡片的 margin:auto，而不是 align-items:center。
     若居中：内容比视口高时（小屏手机、横屏）顶部会被裁掉且滚不回去 ——
     实测 568x320 时卡片头被裁 145px，怎么滚都看不到。 */
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--space-5) var(--space-4);
  overflow-y: auto;
  background:
    radial-gradient(circle at 16% 14%, rgba(122, 92, 240, .16), transparent 54%),
    radial-gradient(circle at 84% 80%, rgba(223, 255, 116, .28), transparent 52%),
    linear-gradient(158deg, var(--neutral-50), #f0ebfa 60%, var(--neutral-100));
}
.auth-gate[hidden] { display: none; }
/* 门禁打开时锁住背景滚动，防止在门禁后面滚出半透明的应用界面 */
body.auth-gate-open { overflow: hidden; }

.auth-gate-inner {
  width: 100%; max-width: 520px;
  margin: auto; /* 空间够时垂直居中，不够时贴顶并可完整滚动 */
  padding: 40px 36px 30px;
  text-align: center;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--neutral-200);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}
.auth-gate-brand {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
  font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--neutral-700);
}
.auth-gate-brand .brand-mark { width: 26px; height: 26px; font-size: var(--text-sm); border-radius: 8px; }
.auth-gate-brand em {
  font-style: normal;
  padding: 1px 8px;
  font-size: var(--text-2xs); font-weight: var(--weight-bold);
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: 999px;
}
.auth-gate-title {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.05rem);
  line-height: 1.3;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
  color: var(--ink);
}
.auth-gate-sub { margin: 0 0 24px; font-size: var(--text-sm); line-height: 1.75; color: var(--muted); }
.auth-gate-points { display: grid; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; text-align: left; }
.auth-gate-points li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  font-size: var(--text-sm); color: var(--neutral-700);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-150);
  border-radius: 12px;
}
.auth-gate-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
  color: var(--brand-600);
  background: var(--brand-50);
  border-radius: 8px;
}
.auth-gate-actions { display: flex; flex-direction: column; gap: 10px; }
/* 触控目标 ≥44px（WCAG 2.2），手机上也不会点空 */
.auth-gate-actions .primary-button,
.auth-gate-actions .ghost-button { width: 100%; min-height: 48px; }
.auth-gate-note { margin: 16px 0 0; font-size: var(--text-2xs); color: var(--neutral-400); }

@media (max-width: 440px) {
  .auth-gate-inner { padding: 30px 20px 24px; border-radius: 20px; }
  .auth-gate-points li { padding: 10px 12px; }
}

.auth-modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  background: rgba(20, 17, 27, .45);
  backdrop-filter: blur(4px);
}
.auth-modal[hidden] { display: none; }
.auth-card {
  position: relative;
  width: 100%; max-width: 400px;
  background: var(--neutral-0);
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.auth-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none; background: transparent; color: var(--neutral-400);
  font-size: 22px; line-height: 1; cursor: pointer; border-radius: 8px;
}
.auth-close:hover { background: var(--neutral-100); color: var(--neutral-700); }
.auth-title { margin: 0; font-size: var(--text-xl); color: var(--ink); }
.auth-sub { margin: 0; font-size: var(--text-sm); color: var(--muted); line-height: 1.5; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--neutral-600); }
.auth-field input {
  min-height: 46px; padding: 0 14px;
  border: 1px solid var(--neutral-200); border-radius: 12px;
  font-size: var(--text-base); color: var(--ink);
  background: var(--neutral-50);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.auth-field input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); background: white; }
.auth-error { min-height: 18px; font-size: var(--text-xs); color: var(--danger-text); }
.auth-submit { width: 100%; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--text-sm); color: var(--muted); }
.link-button { border: none; background: transparent; color: var(--brand-600); font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer; padding: 0; }
.link-button:hover { text-decoration: underline; }
/* 账号弹窗里的字段随流程显隐。注意：.auth-field 是 flex，会盖掉原生 hidden 的 display:none，
   必须显式补一条，否则验证码框在登录/注册第一步也会露出来。 */
.auth-field[hidden],
.auth-forgot[hidden] { display: none !important; }
.auth-code-field input { letter-spacing: 8px; text-align: center; font-weight: 600; font-size: 1.125rem; }
.auth-forgot { align-self: flex-start; margin-top: -8px; }

/* =====================================================================
   经历库
   ===================================================================== */
.memory-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-2);
  margin: var(--space-5) 0;
}
.memory-stat {
  padding: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: #f0ecf4;
  text-align: left;
  transition: all var(--transition-fast);
}
.filter-stat { cursor: pointer; }
.filter-stat:hover,
.filter-stat.active {
  border-color: #9d89e9;
  background: var(--brand-50);
  box-shadow: 0 5px 15px rgba(72, 52, 150, .08);
}
.memory-stat strong {
  display: block;
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.memory-stat span { color: var(--muted); font-size: var(--text-2xs); font-weight: var(--weight-medium); }

.memory-list { display: grid; gap: var(--space-3); }

.library-toolbar {
  position: sticky;
  z-index: var(--z-sticky);
  top: -30px;
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0 var(--space-4);
  background: var(--paper);
}
.batch-toolbar {
  position: sticky;
  z-index: var(--z-sticky);
  top: 43px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  border: 1px solid #d7cdef;
  border-radius: var(--radius-md);
  background: #f6f2ff;
  box-shadow: 0 8px 22px rgba(70, 50, 140, .08);
}
.batch-toolbar strong { margin-right: auto; font-size: var(--text-xs); }

.compact-select {
  width: auto;
  min-width: 150px;
  padding: 8px var(--space-7) 8px var(--space-3);
  font-size: var(--text-2xs);
  height: 36px;
  border-radius: 11px;
}

.library-search { flex: 1; }
.library-search input {
  width: 100%;
  height: 42px;
  padding: 0 var(--space-4);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: white;
  outline: none;
  font-size: var(--text-base);
  transition: all var(--transition-fast);
}
.library-search input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.library-summary {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}

.library-group { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.library-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
}
.library-group-head h3 { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.library-group-head span { color: var(--muted); font-size: var(--text-2xs); }
.library-item-actions { display: flex; gap: 6px; }

.library-editor {
  margin-bottom: var(--space-4);
  padding: var(--space-5);
  border: 1px solid #cfc3f0;
  border-radius: var(--radius-lg);
  background: #f8f5ff;
}
.library-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}
.library-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.memory-empty {
  padding: 48px var(--space-5);
  border: 1px dashed var(--neutral-200);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.memory-item {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  transition: all var(--transition-fast);
}
.memory-item.batch-selected {
  border-color: var(--brand-500);
  background: #faf8ff;
  box-shadow: 0 0 0 2px var(--brand-100);
}
.batch-check {
  float: left;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  margin: 0 10px 8px 0;
  cursor: pointer;
}
.batch-check input { width: 17px; height: 17px; accent-color: var(--brand-600); cursor: pointer; }

.memory-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.memory-item h3 { margin: 0 0 7px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.memory-item p { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-relaxed); }
.memory-trace {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-3);
  color: #81788a;
  font-size: var(--text-2xs);
}
.memory-item-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid #eeeaf2;
}

.text-action {
  border: 0;
  padding: 3px 0;
  color: var(--brand-600);
  background: transparent;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.text-action:hover { color: var(--brand-800); }

.memory-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }
.memory-tags span {
  padding: 5px var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--brand-700);
  background: var(--purple-soft);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
}

.delete-memory {
  flex: 0 0 auto;
  border: 0;
  color: #a099a5;
  background: transparent;
  cursor: pointer;
  font-size: var(--text-md);
  transition: color var(--transition-fast);
}
.delete-memory:hover { color: var(--danger-text); }

/* 加载态 */
.loading-state { padding: 80px var(--space-5); text-align: center; color: var(--muted); }
.loading-orb {
  width: 44px; height: 44px;
  margin: 0 auto var(--space-4);
  border: 3px solid #e5dffd;
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mode-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px var(--space-3);
  border-radius: var(--radius-pill);
  color: #79531e;
  background: var(--warning-bg-2);
  font-size: var(--text-2xs);
}

/* =====================================================================
   评分升级卡（成品页）
   ===================================================================== */
.score-upgrade-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-5);
  padding: var(--space-6);
  border: 1px solid #ded7fb;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f7f4ff 0%, #fff 55%, #f5ffdb 100%);
  box-shadow: 0 14px 38px rgba(70, 50, 140, .08);
}
.score-journey {
  display: flex; align-items: center; gap: var(--space-3);
  padding-right: var(--space-5);
  border-right: 1px solid #e2dcf5;
}
.score-journey div { display: grid; gap: 3px; text-align: center; }
.score-journey span { color: var(--muted); font-size: var(--text-2xs); font-weight: var(--weight-semibold); }
.score-journey strong {
  font-size: 30px;
  line-height: 1;
  color: #7e758b;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.score-journey .final strong { color: var(--brand-600); }
.score-journey i { color: #9a91ad; font-style: normal; font-size: var(--text-md); }
.score-journey em {
  align-self: flex-start;
  padding: 4px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--accent-200);
  color: #42600d;
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-black);
}
.evaluation-copy h3 { margin: 5px 0 6px; font-size: var(--text-md); }
.evaluation-copy p { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-relaxed); }
.evaluation-strengths { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--space-3); }
.evaluation-strengths span {
  padding: 5px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: #41601a;
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
}
.evaluation-dimensions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.evaluation-dimensions > div {
  position: relative;
  padding: var(--space-3) 46px var(--space-3) var(--space-3);
  border: 1px solid #e9e4f5;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .8);
}
.evaluation-dimensions span {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}
.evaluation-dimensions b {
  position: absolute;
  top: 11px;
  right: 13px;
  color: var(--brand-600);
  font-size: var(--text-md);
  font-weight: var(--weight-black);
}
.evaluation-dimensions p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}
.remaining-gaps {
  grid-column: 1 / -1;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: #76531a;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}

.resume-feedback-card {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: var(--space-4) var(--space-5);
  align-items: start;
  margin: var(--space-5) 0;
  padding: var(--space-5);
  border: 1px solid #d7cdef;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f5f1ff, #fff);
}
.resume-feedback-card h3 { margin: 5px 0 7px; font-size: var(--text-md); }
.resume-feedback-card p { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-relaxed); }
.resume-feedback-card textarea, .resume-feedback-card > button { grid-column: 2; }

.result-summary {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid #e3dcf2;
  border-radius: var(--radius-md);
  background: #faf8ff;
}
.result-summary > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  column-gap: var(--space-2);
}
.result-summary > div span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
}
.result-summary > div strong {
  color: var(--brand-600);
  font-size: 34px;
  line-height: 1;
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
}
.result-summary > div em { color: var(--muted); font-size: var(--text-2xs); font-style: normal; }
.result-summary > p {
  margin: 0;
  color: #61586b;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.result-summary > details { grid-column: 1 / -1; }
.result-summary .evaluation-dimensions { margin-top: var(--space-3); }

.compact-revision textarea {
  min-height: 86px;
  margin: var(--space-2) 0;
}
.compact-revision details { margin: 5px 0 var(--space-3); }
.compact-revision .feedback-chips { margin-top: var(--space-2); }
.compact-revision > button { width: 100%; }

.source-details > p { color: var(--muted); font-size: var(--text-2xs); line-height: var(--leading-relaxed); }
.feedback-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.feedback-chips button {
  padding: 7px var(--space-3);
  border: 1px solid #d9d0ed;
  border-radius: var(--radius-pill);
  color: #62566f;
  background: white;
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.feedback-chips button:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
  background: var(--brand-50);
}

.memory-used {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: #4a3b2e;
  background: var(--warning-bg);
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}

/* =====================================================================
   响应式
   ===================================================================== */
@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .journey-head h2 { font-size: 26px; }
  .screen { padding: 44px var(--space-9); }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-grid, .resume-layout { grid-template-columns: 1fr; }
  .resume-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .interview-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .picker-grid { grid-template-columns: 1fr; }
  .manual-experience-head { flex-direction: column; }
  .manual-experience-head .primary-button { width: 100%; }
  .role-group { grid-template-columns: 1fr; gap: 6px; }
  .library-toolbar, .batch-toolbar { position: static; flex-wrap: wrap; }
  .library-search { flex-basis: 100%; }
  .batch-toolbar strong { flex-basis: 100%; }
  .compact-select { flex: 1; }
  .resume-diagnosis { grid-template-columns: 1fr; }
  .completeness-score {
    border-right: 0;
    border-bottom: 1px solid rgba(70, 60, 80, .12);
    padding: 0 0 var(--space-3);
  }
  .diagnosis-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { width: calc(100% - 28px); height: 68px; }
  .privacy-pill { display: none; }
  .app-shell { width: calc(100% - 20px); margin-bottom: var(--space-3); display: block; }
  .journey-card {
    min-height: auto;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    position: static;
  }
  .journey-head, .journey-quote { display: none; }
  .step-list {
    margin: 0;
    display: flex; gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .step-list::-webkit-scrollbar { display: none; }
  .step-item {
    flex: 0 0 44px;
    display: block;
    padding: 7px;
  }
  .step-label, .step-check { display: none; }
  .step-number { width: 30px; height: 30px; }
  .workspace {
    min-height: calc(100vh - 142px);
    margin-top: var(--space-2);
    border-radius: var(--radius-lg);
  }
  .screen { padding: var(--space-9) var(--space-5); }
  .floating-card.one { left: 0; }
  .floating-card.two { right: 0; }
  .score-upgrade-card { grid-template-columns: 1fr; }
  .score-journey {
    border-right: 0;
    border-bottom: 1px solid #e2dcf5;
    padding: 0 0 var(--space-4);
    justify-content: center;
  }
  .evaluation-dimensions { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr 1fr; }
  .screen-header { display: block; }
  .screen-index { display: inline-block; margin-bottom: var(--space-3); }
  .interview-layout { display: flex; flex-direction: column; }
  .insight-rail { grid-template-columns: 1fr 1fr; }
  .conversation-card { min-height: 430px; padding: var(--space-6); }
  .fact-card { grid-template-columns: 1fr; }
  .fact-actions { justify-content: flex-end; }
  .resume-paper { min-height: 820px; padding: var(--space-8) var(--space-7); }
  .resume-sidebar { grid-template-columns: 1fr; }
  .topbar .compact { display: none; }
  .memory-stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .import-fact-list { grid-template-columns: 1fr; }
  .generation-paths { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  /* 顶栏精简：小屏下品牌只留图标，避免品牌+导航+登录三段放不下导致横向溢出 */
  .brand > span:not(.brand-mark),
  .brand em { display: none; }
  /* 登录按钮触控目标提到 44px（移动端建议最小值），高频入口更好点 */
  .auth-button { min-height: 44px; }
  .role-grid, .insight-rail { grid-template-columns: 1fr; }
  .footer-actions { align-items: stretch; flex-direction: column; }
  .footer-actions-right { display: grid; }
  .footer-actions button { width: 100%; }
  .resume-head { grid-template-columns: 1fr; }
  .resume-photo { grid-row: 1; }
}

/* =====================================================================
   打印
   ===================================================================== */
@media print {
  body { background: white; }
  .topbar, .journey-card, .resume-sidebar, .footer-actions, .ambient,
  .topbar-actions, .privacy-pill { display: none !important; }
  .app-shell, .workspace, .screen, .resume-layout {
    width: 100%; margin: 0; padding: 0;
    display: block; box-shadow: none; border: 0;
  }
  .resume-paper { min-height: 0; border: 0; box-shadow: none; }
}

/* =====================================================================
   顶部导航 · 工作台
   ===================================================================== */
.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
}
.nav-tab {
  padding: var(--space-2) var(--space-5);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
}
.nav-tab:hover { color: var(--ink); }
.nav-tab.active {
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* =====================================================================
   库页布局
   ===================================================================== */
.library-page {
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  padding: 44px 44px 36px;
  backdrop-filter: blur(24px);
}
@media (max-width: 720px) {
  .library-page { padding: var(--space-7) var(--space-5); }
}

/* —— 库页引导横幅 —— */
.library-hero { margin-bottom: var(--space-6); }
.library-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: 36px 40px;
  border-radius: var(--radius-lg);
}
.library-hero-card.empty {
  background: linear-gradient(135deg, #f0ecff 0%, #eefbff 100%);
  border: 1px solid var(--brand-200);
}
.library-hero-card.compact {
  padding: var(--space-6) var(--space-8);
  border: 1px solid var(--line);
  background: #faf8ff;
}
.library-hero-copy h1 {
  margin: var(--space-4) 0 var(--space-3);
  font-size: clamp(28px, 4vw, 42px);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.library-hero-copy h2 {
  margin: var(--space-3) 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: var(--tracking-snug);
  font-weight: var(--weight-black);
}
.library-hero-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.library-hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex-shrink: 0;
  min-width: 200px;
}
/* 移动端：hero 卡片改纵向、按钮组占满宽度，避免窄屏下 flex 不换行导致横向溢出 */
@media (max-width: 720px) {
  .library-hero-card { flex-direction: column; align-items: stretch; gap: var(--space-5); padding: var(--space-6) var(--space-5); }
  .library-hero-actions { min-width: 0; flex-shrink: 1; width: 100%; }
}

/* —— 库页快捷操作 —— */
.library-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}
@media (max-width: 900px) {
  .library-actions { grid-template-columns: 1fr; }
}
.action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}
.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}
.action-icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-1);
}
.action-card strong { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.action-card small { color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-normal); }

/* —— 库页底部 —— */
.library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.library-footer-note {
  color: var(--muted);
  font-size: var(--text-xs);
  max-width: 520px;
  line-height: var(--leading-relaxed);
}
.library-footer-actions { display: flex; gap: var(--space-3); }

/* =====================================================================
   工坊首页
   ===================================================================== */
.workshop-home { padding: var(--space-2) var(--space-1) var(--space-6); }

.workshop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  align-items: center;
  gap: var(--space-10);
  padding: 44px 48px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 0% 0%, rgba(122, 92, 240, .12), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(223, 255, 116, .15), transparent 50%),
    linear-gradient(135deg, #f3eeff 0%, #eaf3ff 60%, #fff7e8 100%);
  border: 1px solid var(--brand-200);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-7);
}
.workshop-hero::after {
  content: "";
  position: absolute;
  right: -100px; top: -100px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 87, 255, .15), transparent 70%);
  pointer-events: none;
}
.workshop-hero-text { position: relative; }
.workshop-hero-text .kicker {
  display: inline-block;
  padding: 5px var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--purple);
  background: white;
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider);
}
.workshop-hero-text h1 {
  margin: var(--space-4) 0 var(--space-3);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.workshop-hero-text p {
  margin: 0;
  max-width: 520px;
  color: var(--neutral-600);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}
.workshop-hero-cta { position: relative; }
.cta-primary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) var(--space-6);
  border: 0;
  border-radius: var(--radius-lg);
  color: white;
  text-align: left;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  box-shadow: var(--shadow-glow-strong), var(--shadow-inner);
  cursor: pointer;
  transition: all var(--transition-base);
}
.cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(74, 50, 179, .42), var(--shadow-inner);
}
.cta-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  font-size: var(--text-xl);
  font-weight: 300;
  flex-shrink: 0;
}
.cta-primary strong { display: block; font-size: var(--text-md); font-weight: var(--weight-bold); }
.cta-primary em {
  display: block;
  margin-top: 4px;
  font-size: var(--text-xs);
  font-style: normal;
  opacity: .88;
}

/* 工坊统计 */
.workshop-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.workshop-stats > div { display: flex; flex-direction: column; gap: 4px; }
.workshop-stats b {
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--neutral-900);
  letter-spacing: var(--tracking-snug);
  font-weight: var(--weight-black);
}
.workshop-stats span { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-medium); }

/* 工坊快捷链接 */
.workshop-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}
@media (max-width: 720px) {
  .workshop-hero, .workshop-stats, .workshop-quick { grid-template-columns: 1fr; }
}
.quick-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}
.quick-link:hover {
  transform: translateY(-2px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}
.quick-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
}
.quick-link strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.quick-link small { color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-normal); }

/* 工坊 section & role-card */
.workshop-section { margin-top: var(--space-8); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: var(--space-3);
}
.section-head h2 { margin: 0; font-size: var(--text-md); letter-spacing: var(--tracking-snug); font-weight: var(--weight-bold); }
.section-head span { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-medium); }

.role-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}
.role-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}
.role-card strong { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.role-card span {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.role-card small {
  color: var(--purple);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}
.role-card.version-card { border-color: #d9d0ff; background: #fbf9ff; }

/* role-card 子样式（兼容 workshop-home 中重复定义） */
.role-card-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 4px;
  width: 100%;
}
.role-card-top strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.role-tag {
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--brand-700);
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
}
.role-tag.subtle { color: #5a3d8e; background: #ede6ff; }
.role-meta {
  display: block;
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}

/* 工坊空状态 */
.workshop-empty-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding: 64px var(--space-5);
  border: 1px dashed var(--brand-200);
  border-radius: var(--radius-xl);
  background: #fbf9ff;
  text-align: center;
}
.workshop-empty-hero h3 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.workshop-empty-hero p {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.empty-orb {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
  font-size: var(--text-xl);
  box-shadow: var(--shadow-glow);
}

/* =====================================================================
   侧栏：工坊首页时改为流程预览
   ===================================================================== */
.flow-preview { padding: var(--space-1) var(--space-1) 0; }
.flow-preview .kicker {
  display: block;
  margin-bottom: var(--space-3);
  color: #b7adc6;
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider);
}
.flow-preview ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  position: relative;
}
.flow-preview li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 4px;
  color: #cdc6d6;
  font-size: var(--text-sm);
}
.flow-preview li span {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #b7adc6;
  background: rgba(255, 255, 255, .08);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
}
.flow-preview p {
  margin: var(--space-4) 4px 0;
  color: #8a8497;
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}

/* =====================================================================
   库页：经历库分析视图
   ===================================================================== */
.library-page.analysis-mode .library-actions,
.library-page.analysis-mode .memory-stats,
.library-page.analysis-mode .memory-list,
.library-page.analysis-mode .library-footer { display: none; }
.library-hero-card.analysis { background: #f6f3ff; border: 1px solid var(--brand-200); }
.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: 64px var(--space-5);
  color: var(--muted);
}
.analysis-loading strong { color: var(--ink); font-size: var(--text-md); font-weight: var(--weight-semibold); }
.analysis-loading p { margin: 0; font-size: var(--text-xs); }
.loading-orb.small {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid #e4dcff;
  border-top-color: var(--brand-500);
  animation: spin .9s linear infinite;
}

.library-analysis-result { display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.analysis-block h3 { margin: 0 0 var(--space-3); font-size: var(--text-md); font-weight: var(--weight-semibold); }
.analysis-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.analysis-chips span {
  padding: 7px var(--space-3);
  border-radius: var(--radius-pill);
  color: #3c3489;
  background: #eeedfe;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.analysis-weakness {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}
.analysis-weakness li {
  padding: var(--space-3) var(--space-4);
  border: 1px solid #f5e1c8;
  border-radius: var(--radius-md);
  color: #633806;
  background: #fdf6e9;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.deepdive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}
.deepdive-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}
.deepdive-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}
.deepdive-card strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.deepdive-card span {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.deepdive-card small {
  color: var(--purple);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.analysis-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  background: var(--brand-50);
}
.analysis-cta .micro-note {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}

/* =====================================================================
   侧栏：返回工坊首页
   ===================================================================== */
.journey-nav { margin-top: 4px; }
.journey-back {
  width: 100%;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--radius-md);
  color: #e8e4f0;
  background: rgba(255, 255, 255, .06);
  font-size: var(--text-xs);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}
.journey-back:hover {
  background: rgba(255, 255, 255, .12);
  color: white;
  transform: translateX(2px);
}

/* =====================================================================
   语音按钮：录音脉冲
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .voice-primary.listening > span {
    animation: voicePulse 1.2s ease infinite;
  }
  @keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); }
    50%      { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
  }
}

/* =====================================================================
   访谈：实时收益面板
   ===================================================================== */
.gain-count { display: flex; align-items: baseline; gap: 4px; }
.gain-count b {
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--purple);
  font-weight: var(--weight-black);
}
.gain-count em { color: var(--muted); font-size: var(--text-2xs); font-style: normal; }
.gain-progress {
  height: 6px;
  margin: 2px 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: #eee9f8;
  overflow: hidden;
}
.gain-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  transition: width var(--duration-slow) var(--ease-out);
}
.gain-meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}
.extract-fresh {
  display: block;
  margin-bottom: 5px;
  color: var(--purple) !important;
  font-size: var(--text-2xs) !important;
  letter-spacing: var(--tracking-wide);
}
.extract-card.fresh { border: 1px solid #d9d0ff; }
@media (prefers-reduced-motion: no-preference) {
  .extract-card.fresh { animation: extractIn .45s var(--ease-out) both; }
  @keyframes extractIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
  }
}
.gain-summary {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: #eef7f1;
  border: 1px solid #cfe7d8;
}
.gain-summary > span {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: var(--text-xs);
}
.gain-summary strong { display: block; margin-bottom: 3px; font-size: var(--text-xs); color: #1f5c40; }
.gain-summary p { margin: 0; color: #4c6b5a; font-size: var(--text-2xs); line-height: var(--leading-relaxed); }

/* =====================================================================
   访谈：提炼结果去向确认
   ===================================================================== */
.extract-confirm {
  margin-bottom: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: 1px solid #d9d0ff;
  border-radius: var(--radius-md);
  background: #fbf9ff;
}
.extract-confirm-head strong { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.extract-confirm-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}
.extract-confirm-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.extract-confirm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.extract-confirm-foot .foot-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.memory-consent.static b { color: var(--success-text); }

/* =====================================================================
   访谈收尾 · 本次收获面板
   目标：① 每条经历可辨认（标题+时间+一句摘要）② 去向用文字标签明说，不靠颜色
        ③ 各条互不联动 ④ 触控目标 ≥32px、焦点可见（WCAG 2.2 AA）
   ===================================================================== */
.finished-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.harvest-panel {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--brand-50), var(--neutral-0));
}
.harvest-head { display: flex; align-items: flex-start; gap: var(--space-3); }
.harvest-check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  margin-top: 1px;
  border-radius: var(--radius-pill);
  background: var(--success-text);
  color: var(--neutral-0);
  font-size: var(--text-2xs);
  line-height: 1;
}
.harvest-head h3 {
  margin: 0;
  color: var(--neutral-800);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
}
.harvest-head p {
  margin: 4px 0 0;
  color: var(--neutral-600);
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}
.harvest-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
}
.harvest-item {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: var(--neutral-0);
}
.harvest-item-main h4 {
  margin: 0;
  color: var(--neutral-800);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
}
.harvest-time {
  display: inline-block;
  margin-left: var(--space-2);
  color: var(--neutral-500);
  font-size: var(--text-2xs);
}
.harvest-summary {
  margin: var(--space-2) 0 0;
  color: var(--neutral-600);
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}
.harvest-foot {
  margin: var(--space-3) 0 0;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--neutral-200);
  color: var(--neutral-600);
  font-size: var(--text-2xs);
}
.harvest-foot strong { color: var(--success-text); font-weight: var(--weight-bold); }

/* 去向二选一：文字标签式分段单选（状态不只靠颜色，选中同时改变底色与字重） */
.dest-switch {
  display: inline-flex;
  gap: 2px;
  margin-top: var(--space-3);
  padding: 2px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-pill);
  background: var(--neutral-100);
}
.dest-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}
.dest-option input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.dest-option span {
  position: relative;
  color: var(--neutral-600);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.dest-option:hover { background: rgba(255, 255, 255, .7); }
.dest-option:has(input:checked) { background: var(--neutral-0); box-shadow: 0 1px 3px rgba(38, 32, 48, .14); }
.dest-option:has(input:checked) span { color: var(--brand-700); font-weight: var(--weight-bold); }
.dest-option input:focus-visible + span { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: var(--radius-sm); }

.continue-button { white-space: nowrap; }

/* 移动优先：窄屏下操作区改为纵向、主按钮通栏优先 */
@media (max-width: 575px) {
  .harvest-panel { padding: var(--space-4); }
  .dest-switch { display: flex; width: 100%; }
  .dest-option { flex: 1 1 0; }
  .extract-confirm-foot { flex-direction: column-reverse; align-items: stretch; }
  .extract-confirm-foot .foot-left { justify-content: center; }
  .extract-confirm-foot .primary-button { width: 100%; }
}

/* =====================================================================
   工坊：从经历库选择素材
   ===================================================================== */
.material-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.material-toolbar .library-search { flex: 1; }
.material-toolbar-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.material-pick-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
}
.material-pick {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}
.material-pick:hover {
  transform: translateY(-2px);
  border-color: var(--brand-300);
  box-shadow: 0 14px 30px rgba(72, 52, 150, .08);
}
.material-pick.selected {
  border-color: var(--brand-500);
  background: #faf8ff;
  box-shadow: 0 0 0 2px var(--brand-100);
}
.material-pick input { accent-color: var(--purple); margin-top: 3px; }
.material-pick-body { flex: 1; min-width: 0; }
.material-pick-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); margin-bottom: 6px;
}
.material-pick-meta span {
  color: var(--brand-700);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.material-pick-meta em {
  color: var(--muted);
  font-size: var(--text-2xs);
  font-style: normal;
}
.material-pick.selected .material-pick-meta em {
  color: var(--purple);
  font-weight: var(--weight-bold);
}
.material-pick h3 { margin: 0 0 6px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.material-pick p {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.selection-count {
  margin: var(--space-4) 2px 0;
  color: var(--muted);
  font-size: var(--text-xs);
}
.selection-count b { color: var(--purple); font-weight: var(--weight-bold); }

.material-group-section { margin-top: var(--space-6); }
.material-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: var(--space-3);
}
.material-group-head h3 { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.material-group-head span { color: var(--muted); font-size: var(--text-xs); }

.material-pick.recommended { border-color: #c9b8ff; background: #fdfcff; }
.rec-badge {
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
  color: white;
  background: var(--purple);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
}
.rec-reason {
  margin: 2px 0 6px;
  color: var(--purple);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}

.revision-note {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: var(--leading-relaxed);
}

.resume-edit-tip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed #cfc4ef;
  border-radius: var(--radius-md);
  color: var(--brand-700);
  background: #fbf9ff;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.resume-edit-tip span { color: var(--purple); font-weight: var(--weight-black); }

.material-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: 56px var(--space-5);
  border: 1px dashed var(--brand-200);
  border-radius: var(--radius-xl);
  background: #fbf9ff;
  text-align: center;
}
.material-empty h3 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.material-empty p {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.profile-summary {
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--ink);
  list-style: none;
}
.profile-summary::-webkit-details-marker { display: none; }
.profile-summary::before {
  content: "▸ ";
  color: var(--purple);
}
details[open] > .profile-summary::before { content: "▾ "; }
.profile-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
}

/* =====================================================================
   经历库内嵌访谈
   ===================================================================== */
.library-interview-wrap { max-width: 1120px; margin: 0 auto; }
.library-interview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.library-interview-top .kicker {
  color: var(--purple);
  font-size: var(--text-2xs);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-wider);
}
.library-interview-body .screen { padding: 0; }
.library-interview-body .screen-index { display: none; }

/* =====================================================================
   快速建档
   ===================================================================== */
.profile-onboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
.profile-onboard-head h2 {
  margin: var(--space-2) 0 var(--space-2);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: var(--tracking-snug);
  font-weight: var(--weight-black);
}
.profile-onboard-head p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.profile-onboard-tip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 2px 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
  color: var(--brand-700);
  background: var(--brand-50);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.profile-onboard-tip span { color: var(--purple); }

/* =====================================================================
   差距诊断：重排（分数收敛、差距主体）
   ===================================================================== */
.analysis-overview {
  display: flex;
  align-items: center;
  gap: var(--space-7);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-xs);
}
.analysis-overview.risk { border-left: 4px solid #d97742; }
.analysis-overview.watch { border-left: 4px solid #d9a93b; }
.analysis-overview.good { border-left: 4px solid #4f9d5e; }

.analysis-score { flex-shrink: 0; width: 220px; }
.analysis-score .eyebrow { margin-bottom: var(--space-2); }
.score-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: var(--space-3);
}
.score-line b {
  font-size: 40px;
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-black);
}
.score-line span { color: var(--muted); font-size: var(--text-sm); }

.analysis-overview .progress-track { height: 7px; background: var(--brand-100); }
.analysis-overview .progress-fill { background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); }
.analysis-verdict { flex: 1; min-width: 0; }
.analysis-verdict strong { display: block; margin-bottom: 5px; font-size: var(--text-md); font-weight: var(--weight-bold); }
.analysis-verdict p { margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-relaxed); }

.gap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
@media (max-width: 820px) {
  .analysis-overview { flex-direction: column; align-items: flex-start; }
  .gap-grid { grid-template-columns: 1fr; }
}
.gap-card {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-xs);
}
.gap-card.missing { border-top: 3px solid #e0a45a; }
.gap-card.proven { border-top: 3px solid #5fae6e; }
.gap-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.gap-card-head h3 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.gap-card-head span:not(.gap-icon) { color: var(--muted); font-size: var(--text-xs); }
.gap-icon {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-black);
}
.gap-card.missing .gap-icon { color: #8a4f13; background: #fdeeda; }
.gap-card.proven .gap-icon { color: #2c6b3a; background: #e4f6e6; }

.gap-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3);
}
.gap-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: #faf9fc;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--ink);
}
.gap-list li b {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: var(--text-xs);
  color: var(--brand-700);
  background: var(--brand-100);
  font-weight: var(--weight-bold);
}
.gap-card.proven .gap-list li b { color: var(--success-text-2); background: #e0f4e4; }

.gap-empty {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.score-rationale.compact {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--neutral-50);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.score-rationale.compact strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: var(--text-xs);
}

/* =====================================================================
   UI 减法优化：选材卡轻量化
   ===================================================================== */
.material-pick-list { gap: var(--space-4); }
.material-pick { padding: var(--space-4) var(--space-5); }
.material-pick h3 { margin: 0 0 5px; font-size: var(--text-sm); }
.material-pick p {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  -webkit-line-clamp: 2;
  color: #6a6473;
}
.material-pick-meta { margin-bottom: 5px; }
.material-pick-meta > span {
  color: #8b8495;
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
}
.rec-tag,
.picked-tag {
  font-style: normal;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
}
.rec-tag { color: var(--brand-700); background: var(--brand-100); border: 1px solid var(--brand-200); }
.picked-tag { color: var(--purple); background: var(--brand-100); }
.material-pick .memory-tags { gap: 4px; }
.material-pick .memory-tags span {
  padding: 2px 7px;
  font-size: var(--text-2xs);
  color: #7a7387;
  background: #f4f1fa;
  border-radius: 6px;
}
.rec-reason {
  margin: 2px 0 7px;
  font-size: var(--text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================================
   UI 减法优化：差距诊断留白与层级
   ===================================================================== */
.gap-grid { gap: var(--space-5); margin-top: var(--space-5); }
.gap-card { padding: 20px 22px; }
.gap-card-head { margin-bottom: var(--space-3); }
.gap-card-head h3 { font-size: var(--text-sm); }
.gap-icon { width: 24px; height: 24px; border-radius: 7px; }
.gap-list { gap: var(--space-2); }
.gap-list li {
  padding: var(--space-2) var(--space-3);
  border-radius: 9px;
  background: #faf9fc;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.gap-list li b { width: 18px; height: 18px; font-size: var(--text-2xs); }
.score-rationale.compact { margin-top: var(--space-3); font-size: var(--text-xs); }
.skill-cloud.diagnosis-skills { margin-top: var(--space-4); }

/* =====================================================================
   访谈提炼卡：时间标签
   ===================================================================== */
.extract-card .extract-time {
  display: block;
  margin: 2px 0 0;
  color: #9a8fb0;
  font-size: var(--text-2xs);
  font-style: normal;
}

/* =====================================================================
   访谈：经历整理进度卡
   ===================================================================== */
.interview-progress {
  padding: var(--space-4);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
  background: #faf8ff;
}
.interview-progress + * { margin-top: var(--space-3); }
.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.progress-head strong { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.progress-head span { color: #9a8fb0; font-size: var(--text-2xs); }
.progress-elements {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-bottom: var(--space-2);
}
.progress-elements .ok {
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--success-text-2);
  background: #e4f6e6;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.progress-elements .todo {
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: #8a4f13;
  background: #fdeeda;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.progress-draft {
  margin: 0;
  color: #6a6473;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}

/* =====================================================================
   访谈：预计提升收益条
   ===================================================================== */
.progress-gain {
  margin-top: var(--space-2);
  padding: 7px var(--space-3);
  border-radius: 9px;
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-xs);
}
.progress-gain b { font-size: var(--text-sm); font-weight: var(--weight-bold); }

/* =====================================================================
   访谈：分层完成选择条
   ===================================================================== */
.stage-complete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid #bfe8c6;
  border-radius: var(--radius-md);
  background: #f0fbf1;
}
.stage-complete > span { color: var(--success-text-2); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.stage-complete > div { display: flex; gap: var(--space-2); }
.progress-stage {
  margin-top: var(--space-2);
  color: #6a6473;
  font-size: var(--text-2xs);
}
/* =====================================================================
   访谈 v3：计划卡 / 检查点 / 工作台
   ===================================================================== */
/* —— 访谈计划卡 —— */
.interview-plan-card {
  margin-bottom: var(--space-6);
  padding: var(--space-7);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #f8f5ff, #fff 70%);
  box-shadow: var(--shadow-md);
}
.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.plan-card-head h3 { margin: var(--space-1) 0 0; font-size: var(--text-xl); letter-spacing: var(--tracking-snug); font-weight: var(--weight-black); }
.plan-card-head > em {
  flex-shrink: 0;
  padding: 4px var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-bold);
}
.plan-direction-list { display: grid; gap: var(--space-3); }
.plan-direction {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--neutral-150);
  border-radius: var(--radius-md);
  background: white;
}
.plan-direction-index {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.plan-direction-body { min-width: 0; }
.plan-direction-body strong { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.plan-direction-body p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-xs); line-height: var(--leading-relaxed); }
.plan-gain {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 3px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--success-text-2);
  background: var(--success-bg-2);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.plan-disclaimer {
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: #6a5b3c;
  background: var(--warning-bg);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.plan-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* —— 里程碑检查点卡 —— */
.interview-checkpoint {
  margin-bottom: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-50), #fff);
  box-shadow: var(--shadow-sm);
}
.checkpoint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.checkpoint-head span { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--brand-700); }
.checkpoint-head em { color: var(--muted); font-size: var(--text-2xs); font-style: normal; font-weight: var(--weight-medium); }
.checkpoint-progress {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
}
.interview-checkpoint p { margin: 0 0 var(--space-3); color: var(--neutral-600); font-size: var(--text-xs); line-height: var(--leading-relaxed); }
.interview-checkpoint p b { color: var(--brand-600); font-size: var(--text-sm); }
.checkpoint-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* —— 访谈工作台 —— */
.star-score {
  display: inline-block;
  margin: var(--space-2) 0 0;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-bold);
}
.workbench-block {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid #eee9f4;
}
.workbench-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.workbench-block-head strong { font-size: var(--text-xs); font-weight: var(--weight-bold); }
.workbench-block-head span { color: var(--muted); font-size: var(--text-2xs); }
.workbench-group { margin-bottom: var(--space-3); }
.workbench-group-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 5px;
}
.workbench-group-head span {
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
}
.workbench-group-head em { color: var(--muted); font-size: var(--text-2xs); font-style: normal; }
.workbench-preview {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: #faf8ff;
  border-left: 3px solid var(--brand-300);
}
.workbench-preview strong { display: block; font-size: var(--text-2xs); font-weight: var(--weight-semibold); }
.workbench-preview p { margin: 3px 0 0; color: var(--muted); font-size: var(--text-2xs); line-height: var(--leading-normal); }
.workbench-gaps { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.workbench-gaps li {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: #8a5b23;
  background: var(--warning-bg-2);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}
.workbench-gaps li.done { color: var(--success-text-2); background: var(--success-bg-2); }

/* —— 成品页访谈收益行 —— */
.interview-gain-line {
  grid-column: 1 / -1;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.interview-gain-line b { font-size: var(--text-sm); font-weight: var(--weight-bold); }

/* =====================================================================
   FIX-03/05/07：计划卡总预计行 / fallback 徽章 / 移动端补强
   ===================================================================== */
.plan-total {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--brand-700);
  background: var(--brand-100);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}
.plan-total b { font-size: var(--text-sm); font-weight: var(--weight-bold); }

.fallback-badge {
  display: inline-block;
  margin: var(--space-2) 0 0;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--neutral-500);
  background: var(--neutral-100);
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-semibold);
}

/* FIX-07：移动端补强（375px 走查） */
@media (max-width: 760px) {
  .chat-message > div { max-width: 100%; }
  .plan-direction { flex-direction: column; }
  .checkpoint-actions, .plan-actions { flex-direction: column; align-items: stretch; }
  .checkpoint-actions button, .plan-actions button { width: 100%; }
  .composer-actions { align-items: stretch; }
  .composer-actions > div { width: 100%; }
  .composer-actions .ghost-button { flex: 1; }
}

/* =====================================================================
   访谈工作台紧凑化：折叠卡片 / 截断
   ===================================================================== */
.extract-card.extract-card { padding: var(--space-2) var(--space-3); }
.extract-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.extract-card summary::-webkit-details-marker { display: none; }
.extract-card summary::before {
  content: "\25B8";
  flex: 0 0 auto;
  color: var(--brand-500);
  font-size: var(--text-xs);
  transition: transform var(--transition-base);
}
.extract-card[open] summary::before { transform: rotate(90deg); }
.extract-headline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.extract-headline strong {
  color: var(--neutral-800);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}
.extract-body {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed #e4ddf0;
}
.extract-body p {
  margin: 0 0 var(--space-2);
  color: var(--neutral-600);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================================
   工作台单一信息源：产物卡片板块标签
   ===================================================================== */
.placement-tag {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--success-text-2);
  background: var(--success-bg-2);
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-bold);
}

/* =====================================================================
   极简对话访谈：单栏聊天窗口
   ===================================================================== */
.interview-layout.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin: 0 auto;
}
.interview-layout.single .conversation-card { min-height: 560px; }
.extract-list.flat { display: grid; gap: 6px; margin: var(--space-2) 0; }
.extract-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: #f6f3fb;
  cursor: pointer;
  font-size: var(--text-xs);
}
.extract-line b { font-weight: var(--weight-semibold); color: var(--neutral-800); }
.extract-line em { color: var(--muted); font-style: normal; font-size: var(--text-2xs); margin-left: auto; }
