  /* ───────────────── 基础 ───────────────── */
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  :root {
    --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", -apple-system, sans-serif;
    /* 字体栈与天工 render/_core.py 对齐 */
    --grot: "Inter", "Helvetica Neue", -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
    --display: "Smiley Sans Oblique", "Smiley Sans", "PingFang SC", "Noto Sans SC", sans-serif;
    --kai-family: "LXGW WenKai", "Kaiti SC", "STKaiti", "Noto Serif SC", serif;
  }

  body {
    font-family: var(--sans);
    background: #e9ebee;
    font-size: 10pt;
    line-height: 1.5;
  }

  /* ───────────────── 工具栏（仅屏幕） ───────────────── */
  .toolbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 10px 20px;
    background: #10161f; color: #e5e7eb;
  }
  .toolbar .brand { font-weight: 700; letter-spacing: 2px; }
  .toolbar .hint { font-size: 12px; color: #8b95a3; }
  .toolbar select {
    font: 13px var(--sans); color: #e5e7eb;
    background: #1c2531; border: 1px solid #37414f; border-radius: 6px;
    padding: 6px 10px; outline: none; cursor: pointer;
  }
  .theme-group { display: flex; gap: 6px; margin-left: auto; }
  .theme-btn {
    font: 12px var(--sans); color: #cbd2da; cursor: pointer;
    background: #1c2531; border: 1px solid #37414f; border-radius: 999px;
    padding: 5px 12px 5px 8px; display: flex; align-items: center; gap: 6px;
  }
  .theme-btn .dot { width: 10px; height: 10px; border-radius: 50%; }
  .theme-btn[data-theme="clean"] .dot { background: #fff; border: 1px solid #451a03; }
  .theme-btn[data-theme="kai"]   .dot { background: #a23b2e; }
  .theme-btn[data-theme="dev"]   .dot { background: #f4f692; }
  .theme-btn[data-theme="qing"]  .dot { background: #1f7cff; }
  .theme-btn[data-theme="lan"]   .dot { background: #5c9e30; }
  .theme-btn[data-theme="que"]   .dot { background: #ff4631; }
  .theme-btn.active { border-color: #94a3b8; color: #fff; background: #263140; }
  .tool-btn {
    font: 12px var(--sans); color: #cbd2da; cursor: pointer;
    background: #1c2531; border: 1px solid #37414f; border-radius: 6px; padding: 6px 12px;
  }
  .tool-btn:hover { color: #fff; border-color: #94a3b8; }
  .print-btn {
    font: 600 13px var(--sans); color: #10161f; cursor: pointer;
    background: #e5e7eb; border: none; border-radius: 6px; padding: 7px 16px;
  }
  .print-btn:hover { background: #fff; }

  /* ───────────────── 页面骨架（三主题共用，主题只改 token 与少量结构） ───────────────── */
  .page {
    width: 210mm; min-height: 297mm; position: relative;
    margin: 24px auto;
    background: var(--paper); color: var(--ink);
    box-shadow: 0 3px 22px rgba(27,29,34,.16);
  }
  [contenteditable]:focus, [contenteditable] :focus { outline: none; }

  /* 页眉：字符印 + 姓名 + 岗位徽标 + 联系行 */
  .band {
    position: relative;
    padding: 12mm 16mm 6.5mm;
    display: flex; align-items: center; gap: 5mm;
    border-bottom: 1px solid var(--hair);
  }
  .band::after {
    content: ""; position: absolute; left: 16mm; bottom: -1.5px;
    width: 22mm; border-top: 2.5px solid var(--accent);
  }
  .mono {
    flex: none; width: 13.5mm; height: 13.5mm; border-radius: 3mm;
    display: flex; align-items: center; justify-content: center;
    font-size: 7.2mm; font-weight: 700; color: #fff;
    background: var(--mono-bg, var(--accent));
  }
  .band .name-line { display: flex; align-items: center; gap: 3.5mm; }
  .band h1 { font-size: 23pt; font-weight: 700; letter-spacing: 1px; line-height: 1.15; }
  .band .role {
    font-size: 9.5pt; font-weight: 600; color: var(--accent);
    background: var(--accent-soft); border-radius: 999px; padding: .7mm 3.4mm;
  }
  .band .contact { margin-top: 1.8mm; font-size: 8.8pt; color: var(--muted); letter-spacing: .3px; }
  .band .contact span + span::before { content: "·"; margin: 0 2mm; opacity: .5; }

  .page { font-size: var(--fs, 10pt); }
  main { padding: 0 16mm 18mm; counter-reset: sec; }
  section { margin-top: var(--sec-gap, 4.6mm); counter-increment: sec; }

  h2 {
    font-size: 10pt; font-weight: 800; color: var(--ink);
    letter-spacing: 2.5px; margin-bottom: 2.4mm;
    display: flex; align-items: center; gap: 2.6mm;
  }
  h2::before {
    content: "0" counter(sec);
    font-size: 8.5pt; font-weight: 700; letter-spacing: 1px;
    color: var(--accent); font-variant-numeric: tabular-nums;
  }
  h2::after { content: ""; flex: 1; border-top: 1px solid var(--hair); }

  /* 简介：定位句 + 关键词令牌 */
  .summary .lead { font-size: 10.5pt; }
  .kws { display: flex; flex-wrap: wrap; gap: 1mm 5mm; margin-top: 1.6mm; }
  .kws span { font-size: 9.5pt; font-weight: 600; color: var(--ink); }
  .kws span::before {
    content: "●"; font-size: 6.5pt; color: var(--accent);
    margin-right: 1.6mm; vertical-align: .35mm;
  }

  .skills { display: flex; flex-wrap: wrap; gap: 1.8mm 2mm; }
  .skills span {
    font-size: 9pt; color: var(--chip-tx);
    background: var(--chip-bg); border-radius: var(--chip-r, 999px); padding: .9mm 3.4mm;
  }

  .entry + .entry { margin-top: var(--entry-gap, 3.2mm); }
  .entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; }
  .entry-title { font-size: 10.5pt; font-weight: 700; }
  .entry-title em { font-style: normal; font-weight: 600; color: var(--accent); }
  .entry-date {
    font-size: 9pt; color: var(--muted);
    white-space: nowrap; font-variant-numeric: tabular-nums;
  }

  ul { margin-top: 1.1mm; padding-left: 4.2mm; }
  li { margin-bottom: var(--li-gap, .7mm); line-height: var(--lh, 1.55); }
  li::marker { color: var(--accent); }
  li b { color: var(--ink); }

  .edu-line { display: flex; justify-content: space-between; align-items: baseline; }

  .foot {
    position: absolute; left: 16mm; right: 16mm; bottom: 7mm;
    border-top: 1px solid var(--hair); padding-top: 1.8mm;
    display: flex; justify-content: space-between;
    font-size: 7.5pt; color: var(--muted); letter-spacing: .5px;
  }

  /* ───────── 主题一：净白 · 浅色干净 grotesque（据源 tiangong language/v2/cluster-3，draft）───────── */
  body[data-theme="clean"] {
    --paper: #ffffff; --ink: #000000; --muted: #6b6b6b;  /* muted 为补值：cluster-3 未定义 */
    --accent: #451a03; --accent-soft: #f3ece6; --hair: #e6e6e6;
    --chip-bg: #f5f5f5; --chip-tx: #000000; --chip-r: 6px;  /* radii.named.sm=6 */
  }
  body[data-theme="clean"] .page { font-family: var(--grot); }
  body[data-theme="clean"] .band::after {
    width: 30mm; border: none; height: 2.5px;
    background: linear-gradient(90deg, #d9edfe, #ddeaf8, #000000);  /* cluster-3 signatureGradient */
  }
  body[data-theme="clean"] .mono { border-radius: 2mm; }

  /* ───────── 主题二：书卷 · 文学书卷（据源 tiangong language/literary-kai，final）───────── */
  body[data-theme="kai"] {
    --paper: #f6f1e7; --ink: #2b2620; --muted: #8a8175;
    --accent: #a23b2e; --accent-soft: #f0e4dc; --hair: rgba(138,129,117,.35);
    --chip-bg: transparent; --chip-tx: #2b2620;
  }
  body[data-theme="kai"] .page {
    font-family: var(--kai-family);
    background: linear-gradient(180deg, #f8f4ec, #f6f1e7);  /* backgroundLayers:1 单层暖纸微渐变 */
  }
  body[data-theme="kai"] .band h1, body[data-theme="kai"] h2,
  body[data-theme="kai"] .band .role { font-family: var(--display); }
  body[data-theme="kai"] .band { border-bottom: 3px double #a23b2e; }
  body[data-theme="kai"] .band::after { display: none; }
  body[data-theme="kai"] .mono { border-radius: 1.8mm; font-family: var(--kai-family); }
  body[data-theme="kai"] .band h1 { font-size: 24pt; letter-spacing: 2px; }
  body[data-theme="kai"] h2 { letter-spacing: 4px; font-weight: 700; }
  body[data-theme="kai"] h2::before { content: "◆"; font-size: 7pt; }
  body[data-theme="kai"] li { line-height: 1.65; }  /* literary-kai 1.78 的一页 A4 适配，见 CLAUDE.md */
  body[data-theme="kai"] .skills { gap: 1mm 0; }
  body[data-theme="kai"] .skills span { padding: 0; border-radius: 0; font-size: 9.5pt; }
  body[data-theme="kai"] .skills span + span::before { content: "·"; margin: 0 2.4mm; color: #a23b2e; }

  /* ───────── 主题三：玄黑 · 深色开发者极简（据源 tiangong language/v2/cluster-7，final）───────── */
  body[data-theme="dev"] {
    --paper: #08090a; --ink: #ffffff; --muted: #8a8f98;  /* muted 取自 cluster-7 interactionSample 前态 */
    --accent: #f4f692; --accent-soft: rgba(244,246,146,.12); --hair: rgba(255,255,255,.14);
    --chip-bg: rgba(255,255,255,.07); --chip-tx: #e6e8ea; --chip-r: 6px;
  }
  body[data-theme="dev"] .page { font-family: var(--grot); }
  body[data-theme="dev"] .mono {
    background: transparent; border: 0.5mm solid #f4f692; color: #f4f692; border-radius: 2mm;
  }

  /* ───────── 主题四：晴蓝 · 科技蓝（据源 tiangong language/site-qatalog）───────── */
  /* 字体 Plus Jakarta Sans 未自托管，沿用 --grot 栈（记于 CLAUDE.md）；muted/soft/hair/chip 为补值 */
  body[data-theme="qing"] {
    --paper: #ffffff; --ink: #292d34; --muted: #6b7480;
    --accent: #1f7cff; --accent-soft: #e9f1ff; --hair: #e4e8ef;
    --chip-bg: #eef4ff; --chip-tx: #1f5fd0; --chip-r: 6px; --mono-bg: #1f7cff;
  }
  body[data-theme="qing"] .page { font-family: var(--grot); }
  body[data-theme="qing"] .band::after { background: #1f7cff; border: none; height: 2.5px; }
  body[data-theme="qing"] .mono { border-radius: 2mm; }

  /* ───────── 主题五：兰阳 · 清新绿（据源 tiangong language/site-justfont-lanyanghei）───────── */
  body[data-theme="lan"] {
    --paper: #f8f9fa; --ink: #212529; --muted: #6b7280;
    --accent: #5c9e30; --accent-soft: #ecf4e4; --hair: #e3e7e2;
    --chip-bg: #edf3e6; --chip-tx: #3f6f22; --chip-r: 6px; --mono-bg: #5c9e30;
  }
  body[data-theme="lan"] .page { font-family: var(--grot); }
  body[data-theme="lan"] .band::after { background: #5c9e30; border: none; height: 2.5px; }
  body[data-theme="lan"] .mono { border-radius: 2mm; }

  /* ───────── 主题六：孔雀 · 朱橙暖灰（据源 tiangong language/site-thetype-kongque）───────── */
  body[data-theme="que"] {
    --paper: #edeae4; --ink: #1a1a1a; --muted: #7a756c;
    --accent: #e23b25; --accent-soft: #f7e2dc; --hair: #d9d3c8;
    --chip-bg: #e4ded3; --chip-tx: #b33320; --chip-r: 3px; --mono-bg: #ff4631;
  }
  body[data-theme="que"] .page { font-family: var(--grot); }
  body[data-theme="que"] .band::after { background: #ff4631; border: none; height: 2.5px; }
  body[data-theme="que"] .mono { border-radius: 1.6mm; }

  /* ═════════════ 原子轴：叠加在主题之上，用户可自由搭配（默认「跟随主题」不设属性） ═════════════ */

  /* 原子·强调色：覆盖 --accent，并用 color-mix 派生 accent-soft/mono-bg，安全适配任意纸色。
     只覆盖 accent 相关点睛（标题编号/竖线/印章/链接/marker），不动 chip，保证深浅主题对比度。 */
  body[data-accent] {
    --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--paper));
    --mono-bg: var(--accent);
  }
  body[data-accent="brown"]  { --accent: #451a03; }
  body[data-accent="red"]    { --accent: #a23b2e; }
  body[data-accent="blue"]   { --accent: #1f7cff; }
  body[data-accent="green"]  { --accent: #5c9e30; }
  body[data-accent="vermil"] { --accent: #ff4631; }
  body[data-accent="flame"]  { --accent: #ff5c3c; }
  body[data-accent="indigo"] { --accent: #4387f4; }
  body[data-accent="teal"]   { --accent: #12a594; }
  body[data-accent="azure"]  { --accent: #2f7ed8; }

  /* 原子·字体：覆盖主题默认字族（源序在主题之后 → 同特指度胜出） */
  body[data-font="sans"] .page  { font-family: var(--grot); }
  body[data-font="serif"] .page { font-family: var(--kai-family); }
  body[data-font="serif"] .band h1, body[data-font="serif"] h2 { font-family: var(--kai-family); }

  /* 原子·密度：缩放行距/段距/字号，帮助控制一页容量 */
  body[data-density="compact"] .page { --fs: 9.4pt; --lh: 1.42; --sec-gap: 3.4mm; --entry-gap: 2.4mm; --li-gap: .5mm; }
  body[data-density="relaxed"] .page { --fs: 10.6pt; --lh: 1.66; --sec-gap: 5.8mm; --entry-gap: 4mm; --li-gap: 1mm; }

  /* ───────────────── 版式（layout）：仅重排结构，视觉 token 全部来自主题 ───────────────── */
  /* 侧栏信息 */
  .cols { display: grid; grid-template-columns: 1fr 52mm; gap: 0 7mm; align-items: start; }
  .c-side .edu-line { display: block; }
  .c-side .edu-line .entry-date { display: block; margin-top: .6mm; }
  .c-side .skills { gap: 1.4mm 1.6mm; }
  .c-side li { margin-bottom: 1mm; }

  /* 杂志标题 */
  .band-mag { display: block; }
  .mag-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4mm; }
  .band-mag .mono { width: 10mm; height: 10mm; font-size: 5.4mm; }
  .band-mag h1 { font-size: 36pt; letter-spacing: 2px; line-height: 1.1; }
  .band-mag .name-line { margin-top: 1mm; flex-wrap: wrap; }
  .band-mag .deck { font-size: 9.5pt; color: var(--muted); letter-spacing: .5px; }
  .band-mag .stand {
    margin-top: 3.5mm; padding-top: 2.5mm; border-top: 1px solid var(--hair);
    font-size: 11pt; line-height: 1.6;
  }

  /* 咨询简报 */
  .kicker {
    font-size: 8.5pt; font-weight: 700; letter-spacing: 3px;
    color: var(--accent); margin-bottom: 1mm;
  }
  body[data-layout="brief"] .summary {
    border: 1px solid var(--hair); background: var(--accent-soft);
    padding: 3.2mm 4mm 3.6mm; border-radius: var(--chip-r, 0);
  }
  body[data-layout="brief"] .entry { border-left: 2px solid var(--accent); padding-left: 3.5mm; }

  /* 能力矩阵 */
  .matrix { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--hair); }
  .mx-cell {
    display: flex; align-items: baseline; gap: 2.6mm;
    padding: 2.1mm 3.5mm; font-size: 9.5pt; font-weight: 600;
    border-top: 1px solid var(--hair);
  }
  .mx-cell:nth-child(-n+2) { border-top: none; }
  .mx-cell:nth-child(odd) { border-right: 1px solid var(--hair); }
  .mx-cell i {
    font-style: normal; font-size: 8pt; color: var(--accent);
    font-variant-numeric: tabular-nums;
  }

  /* ═════════════ 精英双栏（pro）：彩色侧栏 + 照片 + 图标 + 时间线 ═════════════ */
  /* 图标：CSS mask 内联 SVG（自包含），用 currentColor 上色，兼容 contenteditable 与 applyProfileTo */
  :root {
    --ic-loc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-5.5 7-11a7 7 0 1 0-14 0c0 5.5 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
    --ic-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2 4.2 2 2 0 0 1 4 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.6a2 2 0 0 1-.5 2.1L8 9.6a16 16 0 0 0 6 6l1.2-1.2a2 2 0 0 1 2.1-.5c.8.3 1.7.6 2.6.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
    --ic-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m2 7 10 6 10-6'/%3E%3C/svg%3E");
    --ic-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20 15 15 0 0 1 0-20z'/%3E%3C/svg%3E");
    --ic-summary: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
    --ic-skills: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.4 5.3L20 8l-4 4 1 6-5-2.8L7 18l1-6-4-4 5.6-.7z'/%3E%3C/svg%3E");
    --ic-work: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E");
    --ic-project: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 9 5-9 5-9-5 9-5z'/%3E%3Cpath d='m3 12 9 5 9-5M3 17l9 5 9-5'/%3E%3C/svg%3E");
    --ic-edu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 9-10-5L2 9l10 5 10-5z'/%3E%3Cpath d='M6 11v5a6 3 0 0 0 12 0v-5'/%3E%3C/svg%3E");
    --ic-extra: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E");
  }

  .pro { display: grid; grid-template-columns: 64mm 1fr; min-height: 297mm; }

  .pro-side {
    background: var(--side-bg, var(--accent)); color: #fff;
    padding: 12mm 8mm; display: flex; flex-direction: column; gap: 4mm;
  }
  .pro-photo {
    width: 32mm; height: 32mm; margin: 0 auto 1mm; border-radius: 50%;
    overflow: hidden; position: relative;
    background: rgba(255,255,255,.16);
    display: flex; align-items: center; justify-content: center;
  }
  .pro-photo img { width: 100%; height: 100%; object-fit: cover; }
  .pro-photo .mono { position: absolute; font-size: 13mm; font-weight: 700; color: #fff; }
  .pro-photo img + .mono { display: none; }
  .pro-side h1 { font-size: 20pt; font-weight: 700; text-align: center; letter-spacing: 1px; line-height: 1.2; }
  .pro-role {
    text-align: center; font-size: 10pt; font-weight: 600;
    color: rgba(255,255,255,.9); margin-top: -1mm;
    padding-bottom: 3mm; border-bottom: 1px solid rgba(255,255,255,.28);
  }
  .pro-contact { display: flex; flex-direction: column; gap: 2mm; }
  .ci { display: flex; align-items: center; gap: 2.4mm; font-size: 8.6pt; color: rgba(255,255,255,.92); word-break: break-all; }
  .ci::before {
    content: ""; flex: none; width: 3.6mm; height: 3.6mm;
    background: rgba(255,255,255,.92);
    -webkit-mask: var(--ci-ic) center/contain no-repeat; mask: var(--ci-ic) center/contain no-repeat;
  }
  .ci-loc { --ci-ic: var(--ic-loc); }
  .ci-phone { --ci-ic: var(--ic-phone); }
  .ci-mail { --ci-ic: var(--ic-mail); }
  .ci-link { --ci-ic: var(--ic-link); }

  .pro-side section { margin-top: 2mm; }
  .pro-side h2 {
    color: #fff; letter-spacing: 2px; margin-bottom: 2.4mm;
    border-bottom: 1px solid rgba(255,255,255,.28); padding-bottom: 1.4mm;
  }
  .pro-side h2::before { background: #fff; }
  .pro-side h2::after { display: none; }
  .pro-side .skills { gap: 1.6mm 1.8mm; }
  .pro-side .skills span {
    background: rgba(255,255,255,.16); color: #fff; border-radius: 3px;
    padding: .8mm 2.6mm; font-size: 8.4pt;
  }
  .pro-side .skills span + span::before { content: none; }  /* 抑制 kai 主题的 · 分隔，侧栏统一用 chip */
  .pro-edu { font-size: 8.8pt; line-height: 1.5; display: flex; flex-direction: column; }
  .pro-edu em { font-style: normal; color: rgba(255,255,255,.82); }
  .pro-edu .entry-date { color: rgba(255,255,255,.7); font-size: 8pt; }

  .pro-main { padding: 12mm 12mm 14mm; }

  /* 章节图标：section 语义 → 图标变量（无条件映射，供 pro/proR/banner 及 icons 原子使用） */
  section[data-sec="summary"] { --sec-ic: var(--ic-summary); }
  section[data-sec="skills"]  { --sec-ic: var(--ic-skills); }
  section[data-sec="work"]    { --sec-ic: var(--ic-work); }
  section[data-sec="project"] { --sec-ic: var(--ic-project); }
  section[data-sec="edu"]     { --sec-ic: var(--ic-edu); }
  section[data-sec="extra"]   { --sec-ic: var(--ic-extra); }

  /* 图标模式：h2 前的 01-06 编号替换为章节图标。pro/proR/banner 恒开；icons 原子可给任意版式开启 */
  body[data-layout="pro"] h2, body[data-layout="proR"] h2,
  body[data-layout="banner"] h2, body[data-icons="on"] h2 { letter-spacing: 2px; }
  body[data-layout="pro"] h2::before, body[data-layout="proR"] h2::before,
  body[data-layout="banner"] h2::before, body[data-icons="on"] h2::before {
    content: ""; width: 4mm; height: 4mm; flex: none;
    background: var(--accent);
    -webkit-mask: var(--sec-ic) center/contain no-repeat; mask: var(--sec-ic) center/contain no-repeat;
  }
  .pro-side h2::before, .banner-contact h2::before { background: #fff; }

  /* 精英右栏：翻转两栏 */
  body[data-layout="proR"] .pro { grid-template-columns: 1fr 64mm; }
  body[data-layout="proR"] .pro-side { order: 2; }

  /* 横幅照片：顶部彩色横幅 + 单栏主体 */
  .banner {
    background: var(--side-bg, var(--accent)); color: #fff;
    padding: 10mm 14mm; display: flex; align-items: center; gap: 8mm;
  }
  .banner .pro-photo.banner-photo { width: 26mm; height: 26mm; margin: 0; }
  .banner .pro-photo.banner-photo .mono { font-size: 10mm; }
  .banner-id { flex: 1; }
  .banner-id h1 { font-size: 24pt; font-weight: 700; letter-spacing: 1px; color: #fff; }
  .banner-id .pro-role { text-align: left; border: none; padding: 0; margin-top: 1mm; }
  .banner-contact { display: flex; flex-wrap: wrap; gap: 1.6mm 6mm; margin-top: 3mm; }
  .banner-main { padding: 6mm 16mm 14mm; }

  /* 时间线：pro/proR 主栏与 banner 主体的经历条目左竖线 + 节点 */
  .pro-main .entry, .banner-main section[data-sec="work"] .entry,
  .banner-main section[data-sec="project"] .entry { position: relative; padding-left: 5mm; }
  .pro-main section[data-sec="work"] .entry::before,
  .pro-main section[data-sec="project"] .entry::before,
  .banner-main section[data-sec="work"] .entry::before,
  .banner-main section[data-sec="project"] .entry::before {
    content: ""; position: absolute; left: 0.7mm; top: 2mm; bottom: -3mm;
    border-left: 1px solid var(--hair);
  }
  .pro-main .entry::after,
  .banner-main section[data-sec="work"] .entry::after,
  .banner-main section[data-sec="project"] .entry::after {
    content: ""; position: absolute; left: 0; top: 1.4mm;
    width: 1.8mm; height: 1.8mm; border-radius: 50%; background: var(--accent);
  }
  .pro-main .entry:last-child::before,
  .banner-main .entry:last-child::before { display: none; }
  /* 深色主题的侧栏/横幅用专用深色背景（accent 太亮时白字不清） */
  body[data-theme="dev"] { --side-bg: #16202c; }

  /* ───────────────── 个人信息引导弹窗（仅屏幕） ───────────────── */
  .modal-mask {
    position: fixed; inset: 0; z-index: 20;
    background: rgba(16,22,31,.55);
    display: flex; align-items: center; justify-content: center;
  }
  .modal-mask[hidden] { display: none; }
  .modal {
    width: 340px; background: #fff; border-radius: 12px; padding: 22px 24px;
    font-family: var(--sans); box-shadow: 0 12px 40px rgba(0,0,0,.25);
  }
  .modal h3 { font-size: 16px; margin-bottom: 4px; }
  .modal .sub { font-size: 12px; color: #6b7280; margin-bottom: 14px; }
  .modal label { display: block; font-size: 12px; color: #374151; margin-bottom: 10px; }
  .modal input {
    display: block; width: 100%; margin-top: 4px; padding: 7px 10px;
    font: 13px var(--sans); border: 1px solid #d1d5db; border-radius: 6px; outline: none;
  }
  .modal input:focus { border-color: #6b7280; }
  .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
  .btn-ghost {
    font: 13px var(--sans); color: #4b5563; background: #fff;
    border: 1px solid #d1d5db; border-radius: 6px; padding: 7px 14px; cursor: pointer;
  }
  .btn-primary {
    font: 600 13px var(--sans); color: #fff; background: #10161f;
    border: none; border-radius: 6px; padding: 7px 16px; cursor: pointer;
  }
  .file-btn.sm, .btn-ghost.sm { padding: 5px 10px; font-size: 12px; display: inline-block; }
  .pf-photo-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
  .pf-photo-preview {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    background: #f1f3f5 center/cover no-repeat; border: 1px solid #e5e7eb;
  }
  .pf-photo-preview.empty::after {
    content: "无"; display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; font-size: 11px; color: #9ca3af;
  }
  .pf-photo-ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .pf-photo-hint { font-size: 11px; color: #9ca3af; width: 100%; }

  /* ───────────────── JD 匹配面板（仅屏幕） ───────────────── */
  .jd-panel {
    position: fixed; top: 64px; right: 16px; z-index: 15;
    width: 320px; max-height: calc(100vh - 96px); overflow-y: auto;
    background: #fff; border-radius: 12px; padding: 16px;
    font-family: var(--sans); box-shadow: 0 12px 40px rgba(0,0,0,.22);
  }
  .jd-panel[hidden] { display: none; }
  .jd-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .jd-head b { font-size: 14px; }
  .jd-head button {
    font-size: 18px; line-height: 1; border: none; background: none;
    color: #6b7280; cursor: pointer; padding: 2px 6px;
  }
  .jd-panel textarea {
    width: 100%; resize: vertical; font: 12px/1.6 var(--sans);
    border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px;
    outline: none; margin-bottom: 8px;
  }
  .jd-panel textarea:focus { border-color: #6b7280; }
  .jd-panel .btn-primary { width: 100%; }
  .jd-score { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 4px; }
  .jd-score b { font-size: 30px; }
  .jd-score span { font-size: 12px; color: #6b7280; }
  .jd-group { margin-top: 10px; }
  .jd-group h4 { font-size: 12px; color: #374151; margin-bottom: 6px; }
  .jd-chip {
    display: inline-block; font-size: 11px; border-radius: 999px;
    padding: 2px 8px; margin: 0 4px 4px 0;
  }
  .jd-chip.hit { background: #e8f0e6; color: #2f4c28; }
  .jd-chip.miss { background: #f7e9e4; color: #8c2f21; }
  .jd-empty { font-size: 12px; color: #9ca3af; }
  .jd-ats { list-style: none; padding: 0; }
  .jd-ats li { font-size: 12px; margin-bottom: 4px; color: #374151; }
  .jd-ats li.ok { color: #2f4c28; }
  .jd-ats li.warn { color: #8c2f21; }
  .jd-ats li.na { color: #9ca3af; }

  /* ───────────────── 侧面板：导入 / 版本（复用 jd-panel 定位） ───────────────── */
  .side-panel {
    position: fixed; top: 64px; right: 16px; z-index: 15;
    width: 320px; max-height: calc(100vh - 96px); overflow-y: auto;
    background: #fff; border-radius: 12px; padding: 16px;
    font-family: var(--sans); box-shadow: 0 12px 40px rgba(0,0,0,.22);
  }
  .side-panel[hidden] { display: none; }
  .panel-note { font-size: 12px; color: #6b7280; line-height: 1.6; margin-bottom: 10px; }
  .panel-status { font-size: 12px; color: #2f4c28; margin-top: 8px; }
  .side-panel select {
    width: 100%; font: 13px var(--sans); color: #1c2531; margin-bottom: 8px;
    border: 1px solid #d1d5db; border-radius: 6px; padding: 7px 9px; background: #fff;
  }
  #promptText { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: #111827; }
  .tool-btn.wide { display: block; width: 100%; text-align: center; margin-top: 8px; color: #10161f; background: #fff; border-color: #d1d5db; }
  .tool-btn.wide:hover { border-color: #10161f; color: #10161f; }
  .card-preview { width: 100%; border-radius: 8px; border: 1px solid #e5e7eb; margin-bottom: 10px; display: block; }
  .side-panel textarea {
    width: 100%; resize: vertical; font: 12px/1.6 var(--sans);
    border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px;
    outline: none; margin: 8px 0;
  }
  .side-panel .btn-primary { width: 100%; }
  .file-btn {
    display: block; text-align: center; cursor: pointer;
    font: 13px var(--sans); color: #10161f;
    border: 1px dashed #9ca3af; border-radius: 8px; padding: 10px;
  }
  .file-btn:hover { border-color: #10161f; }
  .ver-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
  .ver-top { display: flex; justify-content: space-between; align-items: baseline; }
  .ver-top b { font-size: 12.5px; }
  .ver-score { font-size: 11px; color: #2f4c28; background: #e8f0e6; border-radius: 999px; padding: 1px 7px; }
  .ver-row { display: flex; gap: 6px; margin-top: 6px; }
  .ver-row select, .ver-row button {
    font: 11px var(--sans); border: 1px solid #d1d5db; border-radius: 6px;
    padding: 3px 8px; background: #fff; cursor: pointer;
  }
  .ver-row select { flex: 1; }
  .ver-jd { font-size: 11px; color: #9ca3af; margin-top: 5px; }

  /* 样式搭配面板 */
  .style-group { margin-bottom: 14px; }
  .style-group h4 { font-size: 12px; color: #374151; margin-bottom: 8px; }
  .swatches { display: flex; flex-wrap: wrap; gap: 8px; }
  .swatch {
    width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
    border: 2px solid transparent; box-shadow: 0 0 0 1px #e5e7eb;
  }
  .swatch[data-accent="theme"] {
    background: conic-gradient(#a23b2e, #1f7cff, #5c9e30, #ff4631, #a23b2e);
  }
  .swatch.active { border-color: #10161f; }
  .style-row { display: flex; gap: 8px; }
  .style-row select {
    flex: 1; font: 13px var(--sans); color: #1c2531;
    border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 8px; background: #fff;
  }

  /* ───────────────── 移动端：整页等比缩放预览 ───────────────── */
  .stage { overflow: hidden; }
  body.mobile .page {
    transform-origin: top left;
    margin: 12px 8px;
  }
  body.mobile .toolbar { gap: 8px; padding: 8px 12px; }
  body.mobile .toolbar .hint { display: none; }
  body.mobile .jd-panel { left: 16px; width: auto; }

  /* App 底部公众号回流条（仅屏幕，绝不进简历/打印） */
  .app-foot {
    text-align: center; font: 12px/1.7 var(--sans); color: #6b7280;
    padding: 6px 16px 30px;
  }
  .app-foot b { color: #d95f27; }

  /* ───────────────── 打印 ───────────────── */
  @page { size: A4; margin: 0; }
  @media print {
    body { background: #fff; }
    .toolbar, .modal-mask, .jd-panel, .side-panel, .app-foot { display: none !important; }
    .stage { height: auto !important; overflow: visible; }
    /* !important：必须压过 body.mobile .page 的外边距，否则 297mm+margin 溢出第二页 */
    .page { margin: 0 !important; box-shadow: none; transform: none !important; }
  }
