/* 格调简历 · 基础层
   设计基调：一张排好的纸。纸白、墨黑、发丝分隔线，品牌绿只用来指「正在发生的动作」。
   本文件前半是编辑器与通用控件，后半（.paper 起）是简历渲染层，改动会影响 PDF。 */

:root {
  --paper: #fbfaf7;
  --paper-2: #f1eee6;
  --paper-3: #e9e5da;
  --ink: #191c1d;
  --ink-2: #4b5254;
  --ink-3: #78807f;
  --line: #e2ded4;
  --line-strong: #cdc6b8;
  --accent: #2f9e83;
  --accent-ink: #17564a;
  --accent-soft: #e8f3ef;
  --dark: #16211f;
  --white: #ffffff;
  --danger: #b42318;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-paper: 0 1px 2px rgba(25, 28, 29, 0.07), 0 16px 40px rgba(25, 28, 29, 0.1);
  --shadow-pop: 0 20px 52px rgba(25, 28, 29, 0.16);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

code,
pre {
  font-family: var(--font-mono);
}

/* ── 按钮 ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-solid {
  background: var(--accent-ink);
  color: #fff;
}

.btn-solid:hover {
  background: #11453c;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: #000;
}

.btn-line {
  border-color: var(--line-strong);
  background: var(--white);
  color: var(--ink);
}

.btn-line:hover {
  border-color: var(--ink);
}

.btn-quiet {
  color: var(--ink-2);
}

.btn-quiet:hover {
  background: rgba(25, 28, 29, 0.05);
  color: var(--ink);
}

.btn-line-light {
  border-color: rgba(255, 255, 255, 0.28);
  color: #f4f2ec;
  background: rgba(255, 255, 255, 0.04);
}

.btn-line-light:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
  height: 44px;
  padding: 0 22px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.link-quiet {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.link-quiet:hover {
  color: var(--ink);
}

/* ── 品牌 ──────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.brand-mark-sm {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 13px;
}

/* 品牌位图片（logo 图案）铺满圆角容器 */
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ── 编辑器外壳 ────────────────────────────────────────── */
.page-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: saturate(140%) blur(12px);
  z-index: 10;
}

.app-bar .brand {
  padding-right: 4px;
}

/* 顶栏整体放大一档：品牌 / 按钮 / 模板选择器 / 更多菜单都更容易看到。
   只在宽屏生效（≥1151px）；窄窗仍走下方 @media 里的紧凑压缩布局 */
@media (min-width: 1151px) {
  .app-bar {
    height: 68px;
    padding: 0 20px;
    gap: 16px;
  }

  .app-bar .brand-mark {
    width: 38px;
    height: 38px;
  }

  .app-bar .brand-name {
    font-size: 17.5px;
  }

  .app-bar .app-bar-left,
  .app-bar .app-actions {
    gap: 10px;
  }

  .app-bar .btn {
    height: 42px;
    padding: 0 18px;
    font-size: 14.5px;
  }

  .app-bar .style-toggle {
    width: 40px;
    /* 必须显式抵消 .app-bar .btn 的 0 18px（特异性更高）：否则 40px 宽被
       左右内边距挤剩 4px 内容区，三列图标会压成一个点 */
    padding: 0;
  }

  .app-bar .style-toggle .cols-icon {
    width: 24px;
    height: 24px;
  }

  .app-bar .tpl-picker-label {
    font-size: 16px;
  }

  .app-bar .tpl-picker {
    height: 42px;
    padding: 0 14px;
    gap: 9px;
    font-size: 14.5px;
  }

  .app-bar .tpl-picker .dot {
    width: 10px;
    height: 10px;
  }

  .app-bar .tpl-name {
    max-width: 100px;
  }

  .app-bar .tpl-picker svg {
    width: 16px;
    height: 16px;
  }

  .app-bar .menu > summary {
    height: 42px;
    padding: 0 14px;
    font-size: 14.5px;
  }

  .app-bar .menu > summary .i-bars {
    width: 17px;
    height: 17px;
  }

  .app-bar .menu-list {
    top: 48px;
    min-width: 184px;
  }

  .app-bar .menu-list button {
    padding: 10px 12px;
    font-size: 14px;
  }
}

.doc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.doc-meta strong {
  font-size: 13px;
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s ease;
}

.save-dot[data-state="dirty"] {
  background: #c9822b;
}

.save-dot[data-state="saved"] {
  background: var(--accent);
}

.save-dot[data-state="error"] {
  background: var(--danger);
}

/* 顶栏左侧组：品牌旁的「工作台 / 样式」 */
.app-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* 切换模板按钮左侧的说明标签 */
.tpl-picker-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2, #4B5254);
  white-space: nowrap;
  margin-right: -4px; /* 抵消部分 .app-actions 的 8px 间距，和按钮贴近些 */
}

.tpl-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
}

.tpl-picker:hover {
  border-color: var(--ink);
}

.tpl-picker .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.tpl-name {
  display: inline-block;
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpl-picker svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink-3);
  fill: none;
  stroke-width: 1.6;
}

.swatch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink-2);
  font-size: 12.5px;
}

.swatch input {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.menu {
  position: relative;
}

.menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

/* 「更多」前的三横线图标（汉堡菜单），随文字同色 */
.menu > summary .i-bars {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu > summary:hover {
  background: rgba(25, 28, 29, 0.05);
  color: var(--ink);
}

.menu[open] > summary {
  background: rgba(25, 28, 29, 0.06);
  color: var(--ink);
}

.menu-list {
  position: absolute;
  right: 0;
  top: 42px;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-pop);
  z-index: 30;
}

.menu-list button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.menu-list button:hover {
  background: var(--paper-2);
}

/* ── 阶段 8.1：Web 端首用同意（隐私政策/用户协议）────────────── */

/* 只读模式横幅（拒绝同意后显示） */
.privacy-readonly-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12.5px;
}
/* 显式 display 会盖过 hidden 属性：必须补这条，否则横幅永远显示 */
.privacy-readonly-banner[hidden] {
  display: none;
}
.privacy-readonly-banner .mp-text { flex: 1 1 auto; }
.privacy-readonly-banner .btn { flex: 0 0 auto; }

/* 只读模式：编辑与样式面板只可看不可动，保存/导出按钮禁用 */
.privacy-readonly .editor-pane,
.privacy-readonly .content-pane,
.privacy-readonly .style-pane {
  pointer-events: none;
  opacity: 0.55;
  user-select: none;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 落地页首访隐私提示：底部悬浮卡（非阻塞，只出现一次） */
.site-notice {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  z-index: 60;
  font-size: 13px;
  color: var(--ink-2);
}
/* 显式 display 盖过 hidden：必须显式补回 */
.site-notice[hidden] {
  display: none;
}
.site-notice .sn-text {
  flex: 1;
  line-height: 1.6;
}
.site-notice .sn-text a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-notice .sn-btn {
  flex: 0 0 auto;
  padding: 6px 16px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.site-notice .sn-btn:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

/* 首用同意弹层 */
.privacy-consent-card {
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}
.privacy-consent-body {
  margin: 14px 0 4px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #4B5254;
}
.privacy-consent-body ul {
  margin: 8px 0;
  padding-left: 20px;
}
.privacy-consent-body a {
  color: #17564A;
  font-weight: 600;
}
.privacy-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #191C1D;
  cursor: pointer;
}
.privacy-consent-check input {
  margin-top: 3px;
  accent-color: #17564A;
}

/* ── 菜单内链接（隐私政策/用户协议等）：外观与按钮项一致 */
.menu-list a {
  display: block;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-align: left;
  color: inherit;
  text-decoration: none;
}

.menu-list a:hover {
  background: var(--paper-2);
}

.menu-swatch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}

.menu-swatch input {
  flex: 0 0 22px;
  width: 22px;
  min-width: 0;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.preview-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 编辑区 ────────────────────────────────────────────── */
/* 四栏：内容设置 | 分隔条 | 表单 | 把手 | A4 预览 | 把手 | 样式设置 */
.workspace {
  display: grid;
  /* 比例默认：内容 16.9% / 表单 20.7% / 样式 16.9%（按外接显示器实测的舒适比例），
     clamp 的下限保可读性（模块名不折行、表单不挤压），上限防超宽屏文字栏过宽。
     与 app.js 的 CONTENT_PCT/EDITOR_PCT/STYLE_PCT 及各 MIN/MAX 常量一一对应，改要两处同步 */
  grid-template-columns: clamp(273px, 16.9vw, 320px) 10px clamp(360px, 20.7vw, 470px) 10px minmax(0, 1fr) 10px clamp(200px, 16.9vw, 234px);
  flex: 1;
  min-height: 0;
}

body.style-collapsed .workspace {
  grid-template-columns: clamp(360px, 20.7vw, 470px) 10px minmax(0, 1fr);
}

/* 收起 = 两侧辅助栏一起藏（左侧内容设置 + 右侧样式设置及其把手），
   只留「表单 | 把手 | A4 预览」三列，把宽度全让给预览 */
body.style-collapsed .style-pane,
body.style-collapsed .split-handle-left,
body.style-collapsed .content-pane,
body.style-collapsed .content-pane + .split-handle {
  display: none;
}

.content-pane,
.style-pane {
  overflow-y: auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

/* 三栏硬上下限（与 app.js 拖拽 clamp 常量保持一致）：内容栏 273–320px，
   超宽屏不允许无限变宽，窄屏 dragging 也不会挤到文字折行 */
.content-pane {
  min-width: 273px;
  max-width: 320px;
  border-right: 1px solid var(--line);
}

/* 样式栏现在是最右栏，分隔线改在左侧 */
.style-pane {
  max-width: 234px;
  border-left: 1px solid var(--line);
}

.style-section {
  padding: 16px 16px 18px;
  border-bottom: 1px solid var(--line);
}

.style-section h3 {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.style-current strong {
  display: block;
  font-size: 14px;
}

/* 范文卡标题行：范文岗位名 + 「已填入」状态徽标 */
.persona-current-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.style-current p {
  margin: 4px 0 12px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 范文选择区：浅浅绿底（品牌绿的极淡衬底，只提示动作区，不加边框） */
#contentPane .style-section.persona-section {
  background: rgba(47, 158, 131, 0.16);
}

/* 范文选择 ↔ 内容模块 分区：绿色块去掉自带底边线，下方区块顶部画粗虚线，中间留出呼吸空隙 */
#contentPane .style-section.persona-section {
  border-bottom: 0;
  padding-bottom: 26px;
}

#contentPane .style-section.persona-section + .style-section {
  margin-top: 12px;
  border-top: 2px dashed #A9B2AC;
}

/* 内容设置侧栏（左栏）字号加大 + 文字加粗；仅作用于 #contentPane，右侧样式栏保持原样 */
#contentPane .style-section h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#contentPane .style-current strong {
  font-size: 17px;
  font-weight: 700;
}

#contentPane .style-current p {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

#contentPane .persona-flag {
  font-size: 12px;
  font-weight: 700;
}

#contentPane .btn {
  font-size: 15px;
  font-weight: 700;
}

#contentPane .module-btn {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 16px;
  font-weight: 700;
}

/* 名称保持单行（模块可重命名，过长时省略号），避免大字号把 4 字标签折行 */
#contentPane .module-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#contentPane .module-chip {
  font-size: 14px;
  font-weight: 700;
}

/* 原生 color input 仅作数据载体，视觉隐藏；取色由自绘 accent-picker 完成 */
.accent-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* 自定义取色器面板（仿魔方简历）：SV 渐变方 + 色相条 + HEX 输入 */
.style-section {
  position: relative;
}

.accent-picker {
  position: absolute;
  top: 52px;
  right: 16px;
  z-index: 40;
  width: 236px;
  max-width: calc(100% - 32px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(25, 28, 29, 0.16);
}

.accent-picker[hidden] {
  display: none;
}

.accent-sv {
  position: relative;
  height: 156px;
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, hsl(24, 100%, 50%));
}

.accent-hue {
  position: relative;
  height: 14px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}

.accent-dot {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.accent-sv .accent-dot {
  background: #f97316;
}

.accent-hex {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.accent-hex span {
  color: var(--ink-3);
  font-size: 13px;
}

.accent-hex input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-transform: lowercase;
}

/* 色卡：24px 圆点、换行排布，选中态 = 底色隔环 + 主色外环 */
.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.swatch-grid button {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(25, 28, 29, 0.14);
  border-radius: 50%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.swatch-grid button:hover {
  transform: scale(1.12);
  border-color: var(--ink-3);
}

/* 选中态：底色隔环 + 深色外环 + 居中白色对勾 */
.swatch-grid button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
}

.swatch-grid button[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 9px;
  height: 5px;
  margin: auto;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-radius: 1px;
  transform: rotate(-45deg) translateY(-1px);
}

/* 末尾彩色圆点：conic 彩虹渐变，点击打开自定义取色器 */
.swatch-grid button.swatch-rainbow {
  background: conic-gradient(from 0deg, #ef4444, #f97316, #facc15, #4ade80, #22d3ee, #3b82f6, #a855f7, #ef4444);
}

/* ── 排版 / 间距 / 模式（借鉴魔方简历「布局」面板）：一行 = 标签 + 控件 ── */
.style-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.style-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
}

.style-row-label {
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
}

.style-select {
  min-width: 118px;
  padding: 5px 24px 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--white)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378807f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 7px center / 11px;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  appearance: none;
  cursor: pointer;
}

.style-select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.step-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--white);
  overflow: hidden;
}

.step-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.step-btn:hover:not(:disabled) {
  background: var(--paper-2);
  color: var(--ink);
}

.step-btn:disabled {
  color: var(--line-strong);
  cursor: default;
}

.step-val {
  min-width: 62px;
  padding: 0 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.seg-ctrl {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--white);
  overflow: hidden;
}

.seg-ctrl button {
  padding: 5px 13px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.seg-ctrl button + button {
  border-left: 1px solid var(--line);
}

.seg-ctrl button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

/* 整组锁定（模板元数据 contactFixed：联系区固定结构，该模式不可切换）：
   置灰 + 禁用手型，提示用户当前模板不吃这个开关 */
.seg-ctrl.is-locked {
  opacity: 0.45;
}

.seg-ctrl.is-locked button {
  cursor: not-allowed;
}

.seg-ctrl.is-locked button[aria-pressed="true"] {
  background: var(--ink-3);
  color: var(--white);
}

/* 样式栏「模式 / 排版 / 间距」三块：字号放大 + 文字加粗。
   :has(.style-rows) 精确排除第一块「主题色」，色卡与取色器不受影响 */
#stylePane > .style-section:has(.style-rows) h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

#stylePane > .style-section:has(.style-rows) .style-row-label {
  font-size: 14px;
  font-weight: 700;
}

#stylePane > .style-section:has(.style-rows) .style-select {
  font-size: 14px;
  font-weight: 700;
}

#stylePane > .style-section:has(.style-rows) .seg-ctrl button {
  font-size: 13px;
  font-weight: 700;
}

#stylePane > .style-section:has(.style-rows) .step-btn {
  font-size: 17px;
  font-weight: 700;
}

#stylePane > .style-section:has(.style-rows) .step-val {
  font-size: 14px;
  font-weight: 700;
}

/* 分区标题行：标题 + 分区重置按钮（无边框文字形式 + 循环图标）。
   h3 原有的下间距移到 .style-head 上，标题自身 margin 归零 */
.style-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
}

.style-head h3 {
  margin: 0;
}

.style-reset-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--accent, #2f9e83);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s;
}

.style-reset-sm svg {
  width: 15px;
  height: 15px;
}

.style-reset-sm:hover {
  color: var(--accent-ink, #17564A);
}

/* 显式 display 会盖过 [hidden]，必须补回隐藏规则 */
.style-reset-sm[hidden] {
  display: none;
}

/* ── 两侧面板收起 / 展开开关：纯图标 ──
   图标 = 布局示意图：两侧竖板（内容设置 + 样式设置）+ 中间主区（表单/预览）。
   展开态：两侧实心绿（表示「点一下这两块会藏起来」）；
   收起态：两侧淡出只剩描边、整体变灰（表示「点一下恢复四栏」） */
.style-toggle {
  width: 34px;
  padding: 0;
}

.style-toggle .cols-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.style-toggle .col {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.style-toggle[aria-pressed="true"] .col-side {
  fill: var(--accent);
  stroke: var(--accent);
}

.style-toggle[aria-pressed="false"] .col-side {
  opacity: 0.25;
}

.style-toggle[aria-pressed="false"] {
  color: var(--ink-3);
}

/* ── 样式侧栏：内容模块导航（单模块面板切换） ─────────── */
.module-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.module-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: grab;
}

.module-btn:active {
  cursor: grabbing;
}

/* 拖拽排序反馈：拖起半透明，落点侧边画粗线 */
.module-btn.is-dragging {
  opacity: 0.4;
}

.module-btn.drop-before {
  box-shadow: inset 0 3px 0 var(--accent-ink, #17564A);
}

.module-btn.drop-after {
  box-shadow: inset 0 -3px 0 var(--accent-ink, #17564A);
}

.module-btn:hover {
  background: var(--paper-2);
  color: var(--ink);
}

/* 模块操作区：上下移动箭头（大按钮）+ 重命名铅笔（小图标、悬停显示） */
.module-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

/* 上下移动：大号点击区 32×34px；与铅笔/垃圾桶同策略——默认隐藏，悬停模块按钮才亮出 */
.module-mv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 34px;
  border-radius: 6px;
  color: var(--ink-2, #4B5254);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.12s ease, color 0.12s ease;
}

.module-btn:hover .module-mv,
.module-btn:focus-visible .module-mv {
  opacity: 1;
}

.module-mv svg {
  display: block;
  width: 15px;
  height: 15px;
}

.module-mv:hover {
  color: var(--accent-ink, #17564A);
  background: rgba(47, 158, 131, 0.16);
}

.module-mv:active {
  background: rgba(47, 158, 131, 0.28);
}

/* 重命名铅笔：默认隐藏，悬停按钮区域才亮出；图标放大到 16px 保证可点 */
.module-btn .module-edit {
  width: 16px;
  height: 16px;
  margin-left: 3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.module-btn:hover .module-edit,
.module-btn:focus-visible .module-edit,
.module-btn.is-current .module-edit {
  opacity: 0.6;
}

.module-btn .module-edit:hover {
  opacity: 1;
}

.module-btn.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* 模块重命名铅笔：小图标，尺寸/显隐统一由上方 .module-tools 区块定义 */

.module-btn.is-renaming {
  padding: 5px 7px;
}

.module-rename-input {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
}

/* 桌面端一次只显示当前编辑的模块；移动端保持全部面板连排。
   动态板块（可插拔/自定义）面板不在静态白名单里，由 .panel-extra + .is-current-panel 接管 */
@media (min-width: 1081px) {
  body.page-app[data-module] .panel:not(.panel-extra) {
    display: none;
  }

  body.page-app[data-module] .panel-extra {
    display: none;
  }

  body.page-app[data-module] .panel-extra.is-current-panel {
    display: block;
  }

  body.page-app[data-module="basics"] #panel-basics,
  body.page-app[data-module="profile"] #panel-profile,
  body.page-app[data-module="experience"] #panel-experience,
  body.page-app[data-module="education"] #panel-education,
  body.page-app[data-module="projects"] #panel-projects,
  body.page-app[data-module="skills"] #panel-skills {
    display: block;
  }
}

.editor-pane {
  overflow-y: auto;
  background: var(--paper);
  max-width: 470px;
}

.editor-inner {
  padding: 26px 26px 80px;
}

.doc-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.doc-head h1 {
  font-size: 21px;
  line-height: 1.3;
}

.doc-head p {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.6;
}

.identity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.identity-row code {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
}

.identity-row button {
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.identity-row button:hover {
  background: rgba(23, 86, 74, 0.06);
}

.panel {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.panel:last-of-type {
  border-bottom: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.panel-head h2 small {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
}

.panel-head-note {
  color: var(--ink-3);
  font-size: 11.5px;
}

.mini-btn {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.mini-btn:hover {
  border-color: var(--ink);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 基本信息：姓名 / 求职方向 / 电话 / 城市 改为一行一个，与下方全宽字段的节奏一致。
   仅作用于 basics 面板这一组，repeat-card 里的双列字段网格保持原样 */
#panel-basics > .field-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field > span {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--white);
  font-size: 13.5px;
  line-height: 1.5;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea {
  resize: vertical;
  line-height: 1.7;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 158, 131, 0.14);
}

.repeat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repeat-card {
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.repeat-list > .repeat-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.repeat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.repeat-title {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.remove-btn {
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  font-size: 11.5px;
}

.remove-btn:hover {
  background: #fdf1ee;
  color: var(--danger);
}

.repeat-card .field-grid {
  gap: 9px;
}

/* 单数项（教育经历 5 个字段）让最后一行拉满，不留半格空位 */
.repeat-card .field-grid > .field:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.repeat-card .field {
  margin-bottom: 9px;
}

.repeat-card .field input,
.repeat-card .field textarea {
  padding: 8px 10px;
  font-size: 13px;
}

.empty-note {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
}

/* ── 预览区 ────────────────────────────────────────────── */
.preview-pane {
  overflow: auto;
  background: var(--paper-2);
}

.preview-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 24px 60px;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 210mm;
  max-width: 100%;
  padding: 0 2px 12px;
  color: var(--ink-2);
  font-size: 13px;
}

.zoom-toggle {
  display: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
}

.zoom-toggle button {
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
}

.zoom-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.preview-bar strong {
  color: var(--ink-2);
  font-weight: 600;
}

.preview-page {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font-size: 12px;
}

/* 预览纸：容器放不下整张 A4 时按比例缩小显示，导出的仍是原尺寸 */
.paper-fit {
  position: relative;
  width: 100%;
  /* 不设 max-width 硬顶：「适应」模式由 fitPreview 按预览区宽度等比缩放
     （可放大、JS 封顶 1.5），收起两侧面板后纸撑满预览区，不再留大片灰底。
     100% 模式在下方单独固定 794px */
  margin: 0 auto;
}

.paper-fit > .paper {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  transform: scale(var(--fit-scale, 1));
  transform-origin: top left;
}

body[data-zoom="100"] .paper-fit {
  width: 794px;
  max-width: none;
}

body[data-zoom="100"] .paper-fit > .paper {
  transform: none;
}

body[data-zoom="100"] .preview-pane {
  overflow-x: auto;
}

/* ── 移动端：编辑 / 预览 分栏切换 ──────────────────────── */
.mobile-tabbar {
  display: none;
}

@media (max-width: 1150px) {
  .page-app {
    height: auto;
    overflow: visible;
  }

  .app-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
    gap: 10px;
  }

  .app-bar .brand {
    border-right: 0;
    padding-right: 0;
  }

  .doc-meta {
    display: none;
  }

  .app-actions {
    gap: 5px;
  }

  /* 窄屏顶栏空间紧张，说明标签收起 */
  .tpl-picker-label {
    display: none;
  }

  .app-actions > * {
    flex: 0 0 auto;
  }

  .swatch {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .swatch span {
    display: none;
  }

  .tpl-picker {
    max-width: 112px;
    padding: 0 8px;
  }

  .menu > summary {
    padding: 0 8px;
  }

  .app-actions .btn,
  .app-bar-left .btn {
    padding: 0 11px;
    font-size: 12.5px;
  }

  .style-toggle {
    display: none;
  }

  .page-app {
    padding-bottom: calc(54px + env(safe-area-inset-bottom));
  }

  .workspace {
    display: block;
  }

  .editor-pane {
    border-right: 0;
    max-width: none;
  }

  .editor-inner {
    padding: 18px 16px 60px;
  }

  .content-pane,
  .style-pane {
    border-right: 0;
    border-left: 0;
    min-width: 0;
    max-width: none;
  }

  /* 底部三 Tab：内容 / 样式 / 预览 */
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    gap: 4px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(251, 250, 247, 0.96);
    backdrop-filter: saturate(140%) blur(12px);
  }

  .mobile-tabbar button {
    flex: 1;
    padding: 9px 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 600;
  }

  .mobile-tabbar button[aria-selected="true"] {
    background: var(--ink);
    color: #fff;
  }

  body[data-tab="edit"] .preview-pane,
  body[data-tab="edit"] .style-pane,
  body[data-tab="style"] .editor-pane,
  body[data-tab="style"] .content-pane,
  body[data-tab="style"] .preview-pane,
  body[data-tab="preview"] .editor-pane,
  body[data-tab="preview"] .content-pane,
  body[data-tab="preview"] .style-pane {
    display: none;
  }

  .preview-inner {
    padding: 14px 10px 40px;
    overflow-x: auto;
    align-items: flex-start;
  }

  .preview-bar {
    width: 100%;
  }

  .zoom-toggle {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 简历渲染层（与 PDF 共用，改动前先确认导出） ────────── */
/* 缩放页容器：794px 宽的真页按容器宽度等比缩小，排版与导出一致 */
.sheet {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 794px;
  height: 1123px;
  overflow: hidden;
  background: #fff;
  transform: scale(var(--sheet-scale, 0.5));
  transform-origin: top left;
}

.paper {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 10px 30px rgba(25, 28, 29, 0.12), 0 1px 2px rgba(25, 28, 29, 0.08);
}

/* ── 预览分页提示线：只在屏幕预览出现，@media print 里整体剔除 ──
   挂在 .paper 内部所以跟随 --fit-scale 缩放，永远和内容对位；
   先量干净内容高度再注入，提示线本身不参与页数测量。 */
.page-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.page-guide {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(214, 69, 56, 0.75);
}

.page-guide span {
  position: absolute;
  right: 8mm;
  bottom: 3px;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  color: #c94636;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.resume {
  width: 100%;
  min-height: 297mm;
  padding: 18mm 18mm 16mm;
  background: #fff;
  color: #1f2937;
  font-size: 10.5pt;
  line-height: 1.65;
}

.resume a {
  color: inherit;
  text-decoration: none;
}

.resume-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.resume-name {
  margin: 0;
  font-size: 28pt;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.resume-role {
  margin: 6px 0 0;
  color: var(--accent);
  font-size: 12pt;
  font-weight: 700;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 18px;
  max-width: 58%;
  color: #4b5563;
  font-size: 9.5pt;
}

.contact span {
  white-space: nowrap;
}

/* 页眉横排的图标项：图标与文字间距稍收紧，项与项之间靠 gap 分隔 */
.contact .ci svg {
  width: 11px;
  height: 11px;
}

.resume-section {
  margin-top: 22px;
}

.section-heading {
  margin: 0 0 10px;
  color: #111827;
  font-size: 11pt;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.item {
  margin-bottom: 14px;
  break-inside: avoid;
}

.item:last-child {
  margin-bottom: 0;
}

.item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.item-title {
  font-size: 10.5pt;
  font-weight: 700;
}

.item-date {
  color: #6b7280;
  font-size: 9.5pt;
  white-space: nowrap;
}

.item-sub {
  margin-top: 2px;
  color: var(--accent);
  font-size: 10pt;
  font-weight: 700;
}

.item-desc {
  margin: 6px 0 0;
  color: #374151;
  font-size: 10pt;
  white-space: pre-line;
}

.summary {
  margin: 0;
  color: #374151;
  font-size: 10pt;
  white-space: pre-line;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill {
  padding: 2px 9px;
  border: 1px solid #cceee4;
  border-radius: 0;
  background: #eefaf6;
  color: #237a65;
  font-size: 9pt;
  font-weight: 600;
}

/* 技能描述行（skillsMode=lines）：一行一条能力描述，「类别：」加粗。
   默认无列表标记（板块级开关 style.skillsList 控制圆点/数字，见 template-library.css 末尾） */
.skill-lines {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 5px;
  color: #374151;
  font-size: 10pt;
  list-style: none;
}

.skill-lines li::marker {
  color: var(--accent);
}

.skill-lines strong {
  color: #111827;
}

/* 联系方式图标（侧栏竖排语境）：SVG 跟随文字颜色 */
.ci {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ci svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

/* 图标模式关闭（style.icons='off'）：文字标签形式「标签：值」。
   回到内联文本流（.ci 默认 inline-flex 的 gap 会在标签与值之间多出 6px）；
   标签稍加重以区分值。标签式模板（catalog.cssContactLabels）不注入
   .ci-label，由模板自己的 ::before 标签列渲染，不受此规则影响 */
.ci:has(> .ci-label) {
  display: inline;
  gap: 0;
}

.ci-label {
  font-weight: 600;
}

/* 短词清单（兴趣爱好/语言能力/自定义 tag 版式）：纯文本一行，顿号分隔，
   不再做描边标签（标签墙观感廉价，已下线） */
.tag-line {
  margin: 0;
}

.tpl-classic .resume-head {
  padding-bottom: 14px;
  border-bottom: 3px solid var(--accent);
}

.tpl-classic .section-heading {
  color: var(--accent);
}

/* 经典简约：标签模式（icons=off，中文「标签：值」形态）下联系区改为
   双列网格，整体仍靠右但每列内左对齐，消除右对齐流式换行的参差感；
   图标模式维持原 flex 流式排布 */
/* 姓名/求职岗位固定在头部顶部不随联系行数移动。
   适用于继承基础 split 头部的模板（classic/minimal/compact）；
   editorial-ink（竖排联系区）、ats-plain（块级左对齐）有自己的布局，不在此列 */
.tpl-classic.icons-off .resume-head,
.tpl-minimal.icons-off .resume-head,
.tpl-compact.icons-off .resume-head,
.tpl-porygon.icons-off .resume-head,
.tpl-rhyhorn.icons-off .resume-head,
.tpl-timeline.icons-off .resume-head,
.tpl-badge.icons-off .resume-head,
.tpl-ink-card.icons-off .resume-head,
.tpl-air-blue.icons-off .resume-head,
.tpl-ink-block.icons-off .resume-head {
  align-items: stretch;
}

.tpl-classic.icons-off .identity,
.tpl-minimal.icons-off .identity,
.tpl-compact.icons-off .identity,
.tpl-porygon.icons-off .identity,
.tpl-rhyhorn.icons-off .identity,
.tpl-timeline.icons-off .identity,
.tpl-badge.icons-off .identity,
.tpl-ink-card.icons-off .identity,
.tpl-air-blue.icons-off .identity,
.tpl-ink-block.icons-off .identity {
  /* flex: 0 1 auto = 收回 head-left/head-right 的 flex:1（basis 0 抢占空闲空间，
     会把联系网格压到内容宽以下导致折行） */
  flex: 0 1 auto;
  align-self: flex-start;
}

.tpl-classic.icons-off .contact,
.tpl-minimal.icons-off .contact,
.tpl-compact.icons-off .contact,
.tpl-porygon.icons-off .contact,
.tpl-rhyhorn.icons-off .contact,
.tpl-smeargle.icons-off .contact,
.tpl-actual.icons-off .contact,
.tpl-timeline.icons-off .contact,
.tpl-badge.icons-off .contact,
.tpl-ink-card.icons-off .contact,
.tpl-air-blue.icons-off .contact,
.tpl-ink-block.icons-off .contact {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: end;
  align-content: start; /* 首行钉在头部顶线：与姓名/证件照顶部平齐，行数向下生长 */
  gap: 7px 44px;
  max-width: 72%;
  text-align: left;
}

/* 网格列按内容自适应（auto 不会压缩到内容以下），
   再显式禁止换行兜底，长值只会外扩不会折行 */
.tpl-classic.icons-off .contact .ci,
.tpl-minimal.icons-off .contact .ci,
.tpl-compact.icons-off .contact .ci,
.tpl-porygon.icons-off .contact .ci,
.tpl-rhyhorn.icons-off .contact .ci,
.tpl-smeargle.icons-off .contact .ci,
.tpl-actual.icons-off .contact .ci,
.tpl-timeline.icons-off .contact .ci,
.tpl-badge.icons-off .contact .ci,
.tpl-ink-card.icons-off .contact .ci,
.tpl-air-blue.icons-off .contact .ci,
.tpl-ink-block.icons-off .contact .ci {
  white-space: nowrap;
}

.tpl-modern {
  display: grid;
  grid-template-columns: 64mm minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  min-height: 297mm;
  padding: 0;
}

.tpl-modern .resume-side {
  align-self: stretch;
  min-height: 297mm;
  padding: 18mm 9mm 16mm;
  background: var(--accent-deep, #102a26);
  color: #fff;
}

.tpl-modern .resume-main {
  padding: 18mm 14mm 16mm;
}

.tpl-modern .resume-name {
  color: #fff;
  font-size: 24pt;
}

.tpl-modern .resume-role {
  color: var(--accent-ondark, #8fe3cd);
  font-size: 10.5pt;
}

.tpl-modern .avatar {
  display: grid;
  place-items: center;
  width: 40mm;
  height: 40mm;
  margin-bottom: 10mm;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20pt;
  font-weight: 800;
}

.tpl-modern .side-heading {
  margin: 0 0 8px;
  color: var(--accent-ondark, #8fe3cd);
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tpl-modern .side-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 8.5pt;
  overflow-wrap: anywhere;
}

.tpl-modern .side-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tpl-modern .side-skill {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #e8fffa;
  font-size: 8pt;
}

.tpl-modern .resume-section {
  margin-top: 18px;
}

.tpl-modern .section-heading {
  padding-bottom: 5px;
  border-bottom: 1px solid #dbe7e3;
  color: var(--accent-deep, #102a26);
}

.tpl-minimal .resume-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--accent, #111827);
}

.tpl-minimal .resume-name {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tpl-minimal .resume-role {
  color: var(--accent, #111827);
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tpl-minimal .section-heading {
  padding-bottom: 5px;
  border-bottom: 1px solid #d1d5db;
  font-size: 9pt;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tpl-minimal .item-sub {
  color: var(--accent, #111827);
}

.tpl-compact {
  padding: 14mm 15mm;
  font-size: 9.2pt;
  line-height: 1.5;
}

.tpl-compact .resume-name {
  font-size: 23pt;
}

.tpl-compact .resume-section {
  margin-top: 14px;
}

.tpl-compact .section-heading {
  font-size: 9.5pt;
}

.tpl-compact .item {
  margin-bottom: 9px;
}

.tpl-compact .item-desc {
  margin-top: 3px;
  font-size: 8.8pt;
}

/* ── 授权浮层：一张盖了章的纸笺 ───────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(22, 33, 31, 0.58);
  backdrop-filter: blur(10px);
  animation: auth-veil 0.22s ease-out;
}

.auth-overlay[hidden] {
  display: none;
}

.auth-card {
  width: min(400px, 92vw);
  padding: 30px 30px 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-pop);
  animation: auth-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes auth-veil {
  from { opacity: 0; }
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-overlay,
  .auth-card {
    animation: none;
  }
}

.auth-card h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", "SimSun", serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* tab 行：三格等宽铺满卡片，不留右侧空白；副标题已删，标题下直接接 tab */

.auth-error {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(180, 35, 24, 0.07);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}

/* 注册面板协议勾选行（PIPL 明确同意：不预勾选，未勾选拦截提交） */
.auth-agree {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  user-select: none;
}
.auth-agree-core {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.auth-agree input[type='checkbox'] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent-ink);
  cursor: pointer;
}
.auth-agree a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-alt {
  margin: 14px 0 0;
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}

/* 注册面板法务细则：注册即同意（数据收集点的即时链接，合规共识） */
.auth-fine {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}
.auth-fine a {
  color: var(--ink-2, var(--ink-3));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-alt button {
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.16s;
}

/* 两个链接并排时分主次：绿色只给当前面板要推的那一个动作 */
.auth-alt button.is-primary { color: var(--accent-ink); }

.auth-alt button[hidden] { display: none; }
.auth-alt button:not([hidden]) + button { margin-left: 12px; }

/* 授权码临时身份：编辑器顶栏下方的一次性提醒条（由 app.js 动态插入） */
.account-hint {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}

.account-hint-text {
  flex: 1 1 auto;
  min-width: 0;
}

.account-hint-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-hint-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-hint-actions .account-hint-later {
  color: var(--ink-3);
  font-weight: 400;
  text-decoration: none;
}

@media (max-width: 720px) {
  .account-hint { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px; }
}

/* ── 打印 ──────────────────────────────────────────────── */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: #fff !important;
  }

  .app-bar,
  .editor-pane,
  .content-pane,
  .style-pane,
  .preview-bar,
  .mobile-tabbar,
  .style-toggle,
  .split-handle,
  .modal,
  .page-guides {
    display: none !important;
  }

  /* 高亮是编辑态反馈：万一用户在高亮状态下打印，也绝不把绿色印进 PDF */
  .section-active,
  .is-flash {
    animation: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .page-app,
  .workspace {
    display: block;
    height: auto;
    overflow: visible;
    /* max-width:1080px 的移动端规则在打印时同样生效，会给页面塞 54px 底部
       内边距，容易多出一页空白页，这里归零 */
    padding: 0;
  }

  .preview-pane {
    /* 打印时视口按 A4 宽度（约 794px）计算，会命中 max-width:1080px 的
       移动端 tab 规则把预览区 display:none，这里必须强制恢复显示 */
    display: block !important;
    overflow: visible !important;
    background: #fff;
  }

  .preview-inner {
    padding: 0;
    overflow: visible;
  }

  .paper-fit {
    max-width: none;
    height: auto !important;
  }

  .paper-fit > .paper {
    position: static;
    transform: none;
  }

  .paper {
    width: 210mm;
    /* --pages 由 JS 按「正文末尾」实测注入（remasurePreview）：
       高度硬钳到 n 页 - 1px + overflow hidden，正文只差页边距没满一页时，
       页边距绝不会把打印撑出一页空白纸。减 1px：297mm 换算成像素带小数，
       Chrome 分页取整后可能溢出产生空白页；这 1px（约 0.26mm）肉眼不可见 */
    height: calc(var(--pages, 1) * 297mm - 1px);
    min-height: calc(297mm - 1px);
    overflow: hidden;
    margin: 0;
    box-shadow: none;
    /* 属性可继承：确保彩色模板的侧栏底色不依赖「背景图形」勾选项 */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .resume {
    min-height: calc(297mm - 1px);
  }

  /* --pages 由 JS 实测注入：末页内容不满一页时把根元素撑到整页高度，
     侧栏底色因此铺满最后一页（取 n*297mm-1px 与 .paper 同理防空白页）。
     提到 layout-sidebar-* 是为了压过 .tpl-modern { min-height: 297mm } */
  .resume.layout-sidebar-left,
  .resume.layout-sidebar-right {
    min-height: calc(var(--pages, 1) * 297mm - 1px);
  }

  /* flex 子项背景在多页续片上的绘制不可靠（侧栏截断/黑条）：
     侧栏底色已由 .resume-body 的横向渐变接管（见 template-library.css 末尾），
     打印时把子项自身背景置透明，避免第二页出现残影 */
  .layout-sidebar-left .resume-side,
  .layout-sidebar-right .resume-side {
    background: transparent !important;
  }

  .auth-overlay {
    display: none !important;
  }
}

/* ── 联系弹层（私域引流）：复用 .modal 体系，只补卡片内部排版 ──
   布局：三个推广码位并排在上一行（微信 + 小程序码），微信号/复制在下一行 */
.contact-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 4px 0;
}

.contact-qr-row {
  display: flex;
  gap: 14px;
}

.contact-qr {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.contact-qr-box {
  width: 100%;
  aspect-ratio: 1;
}

.contact-qr-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.contact-qr-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.contact-qr-cap {
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-wechat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.contact-wechat code {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-copy {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.contact-tip {
  margin: 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.7;
}

.contact-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.contact-foot .contact-never {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 12px;
  cursor: pointer;
}

.contact-foot .contact-never:hover {
  color: var(--ink-2);
}

@media (max-width: 560px) {
  .contact-qr-row {
    gap: 10px;
  }

  .contact-qr-placeholder {
    font-size: 10px;
    padding: 6px;
  }
}

/* ── 预览联系方式高亮：点左侧「联系方式顺序」箭头后，对应项闪一下品牌绿 ── */
@keyframes ci-flash {
  0% { background: rgba(47, 158, 131, 0.3); }
  70% { background: rgba(47, 158, 131, 0.12); }
  100% { background: transparent; }
}

.ci.is-flash,
.resume [data-ci].is-flash {
  animation: ci-flash 1.1s ease forwards;
  border-radius: 4px;
}

/* ── 简历列表（提示条已统一到顶部通知组件 public/toast.js） ── */

/* 小卡片弹层：带 .modal 前缀抬权重，防止被 template-library.css 后加载的
   .modal-card{width:min(1200px,100%)} 覆盖（反馈弹层曾被拉成 1200px 宽） */
.modal .modal-card-sm {
  width: min(520px, 100%);
}

.resume-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px 16px;
}

.resume-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
}

.resume-item:hover {
  background: var(--paper-2);
}

.resume-item.is-current {
  background: var(--accent-soft);
}

.resume-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.resume-item span {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 12px;
}

.resume-empty {
  padding: 24px 12px;
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
}

/* ── 授权弹层（多模式） ───────────────── */

.auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auth-title-wrap {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.auth-seal {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-ink);
  color: #fff;
  font-family: "Songti SC", "Noto Serif SC", "SimSun", serif;
  font-size: 21px;
  font-weight: 700;
  transform: rotate(-3deg);
  box-shadow: 0 2px 8px rgba(23, 86, 74, 0.3);
}

.auth-close {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 22px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  transition: color 0.18s;
}

.auth-close:hover { color: var(--ink); }

/* 下划线式文字 tab：三格等宽铺满，去底色块，只留发丝线与品牌绿下划线 */
.auth-tabs {
  display: flex;
  gap: 0;
  margin: 18px 0 18px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  padding: 4px 1px 10px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}

.auth-tabs button:hover { color: var(--ink-2); }

.auth-tabs button.active {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.auth-panel[hidden] { display: none; }

.auth-field { display: block; margin-bottom: 14px; }

.auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* 表单语言与全站 .field 统一：白底描边输入盒，聚焦绿描边 + 柔和环 */
.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.auth-field input::placeholder { color: var(--ink-3); }

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 158, 131, 0.14);
}

/* 密码框小眼睛：包装层负责定位，右侧留白避开文字；按钮 tabindex=-1 不进 Tab 流 */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.pw-eye:hover { color: var(--ink-2); background: rgba(25, 28, 29, 0.05); }
.pw-eye svg { display: block; }
.pw-eye .eye-off { display: none; }
.pw-eye.is-on { color: var(--accent); }
.pw-eye.is-on .eye-on { display: none; }
.pw-eye.is-on .eye-off { display: block; }

/* 浏览器 autofill 的浅蓝底块：用内阴影铺回白底 */
.auth-field input:-webkit-autofill,
/* 折叠说明：低频解释全部收进来，表单本身零阅读负担 */
.auth-more {
  margin: 4px 0 16px;
}

/* 已登录态注册（/connect 接回、编辑器「去设置账号」）这一块整体收起 */
.auth-more[hidden] {
  display: none;
}

/* 折叠后仍留一条提示给需要的人（授权码有效期 / 简历码绑定规则） */
.auth-hint {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}

/* 折叠项触发行=灰色小字，与展开正文（12.5px 墨灰）拉开层级 */
.auth-more summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 11.5px;
  user-select: none;
  list-style: none;
  transition: color 0.16s;
}

.auth-more summary::-webkit-details-marker { display: none; }

.auth-more summary::before {
  content: '';
  flex: none;
  width: 0;
  height: 0;
  border: 3.5px solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
  transition: transform 0.18s;
}

.auth-more[open] summary::before { transform: translateY(2px) rotate(180deg); }
.auth-more[open] summary {
  margin-bottom: 12px;
  color: var(--ink-2);
}

.auth-more > p {
  margin: 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.65;
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  font-size: 14px;
  letter-spacing: 0.14em;
}

/* 主按钮就绪态：必填项满足才转实心绿；空表单时是纸灰，不抢视线 */
.auth-submit:not(.is-ready) {
  background: var(--paper-3);
  color: var(--ink-2);
}

.auth-submit:not(.is-ready):hover {
  background: var(--paper-3);
}

/* ── 编辑器：标题行内编辑 ──────────────────────────────── */
.doc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.doc-title-row h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
}

.mini-icon-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
}

.mini-icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--white);
  color: var(--ink);
}

.mini-icon-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-title-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--white);
  outline: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 3px rgba(47, 158, 131, 0.14);
}

/* ── 编辑器：分栏拖拽把手 ─────────────────────────────── */
.split-handle {
  position: relative;
  cursor: col-resize;
  background: var(--paper-2);
  touch-action: none;
}

.split-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4.5px;
  width: 1px;
  background: var(--line);
}

.split-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  width: 12px;
  height: 46px;
  transform: translateY(-50%);
  border-radius: 7px;
  /* 抓手卡片：纸色圆角卡 + 三条横向握持纹，示意「按住可拖」 */
  --grip: var(--ink-3);
  background-color: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 3px rgba(25, 28, 29, 0.12);
  background-image:
    linear-gradient(var(--grip), var(--grip)),
    linear-gradient(var(--grip), var(--grip)),
    linear-gradient(var(--grip), var(--grip));
  background-repeat: no-repeat;
  background-size: 6px 1.5px;
  background-position: center 12px, center 22px, center 32px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.split-handle:hover::after,
body.is-splitting .split-handle::after {
  --grip: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(47, 158, 131, 0.28);
}

body.is-splitting {
  cursor: col-resize;
  user-select: none;
}

body.is-splitting iframe,
body.is-splitting * {
  pointer-events: none;
}

body.is-splitting .split-handle {
  pointer-events: auto;
}

/* ── 编辑器：预览点击定位表单 ─────────────────────────── */
.preview-hint {
  margin-left: 8px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 400;
}

.panel.is-flash {
  animation: panel-flash 1.1s ease;
}

@keyframes panel-flash {
  0% {
    background: var(--accent-soft);
    box-shadow: 0 0 0 6px var(--accent-soft);
  }

  100% {
    background: transparent;
    box-shadow: 0 0 0 6px transparent;
  }
}

/* ── 预览：切换模块时对应板块瞬态高亮（亮一下再慢慢淡去，比中间表单面板的 1.1s 略长） ──
   高亮罩层用 inset 9999px 阴影画在底色之上、内容之下，不覆盖模板自带的板块背景色；
   只做淡绿罩层，不加竖条——var(--accent) 在 .resume 里会被模板解析成简历主题色，
   深色主题色会画出黑条（2026-10-31 用户明确不要）。打印层剔除见 @media print。 */
.resume-section.section-active,
.resume-head.section-active,
.resume-band.section-active,
.side-head.section-active {
  animation: section-flash 2.8s ease;
}

@keyframes section-flash {
  0% {
    box-shadow: inset 0 0 0 9999px rgba(47, 158, 131, 0.14);
  }

  /* 先保持亮度约 0.8s，再花 2s 慢慢淡去 */
  30% {
    box-shadow: inset 0 0 0 9999px rgba(47, 158, 131, 0.12);
  }

  100% {
    box-shadow: inset 0 0 0 9999px rgba(47, 158, 131, 0);
  }
}

@media (max-width: 1150px) {
  .split-handle {
    display: none;
  }

  .preview-hint {
    display: none;
  }
}

/* ── 头像模块（编辑器基本信息面板）· 印刷规格行风格：方角、细线、无胶囊 ── */
.avatar-module {
  position: relative; /* 「移除组件」角标挂在组件区右上角 */
  margin-bottom: 18px;
  border-top: 1px solid var(--line, #E2DED4);
  border-bottom: 1px solid var(--line, #E2DED4);
  background: transparent;
}

/* 组件体：原先的 flex 行布局移到这一层（module 本身只做定位与上下边线） */
.avatar-module-body {
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* 移除组件后收起的「添加」行：整条可点 */
.avatar-module-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-3, #78807F);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.avatar-module-add:hover {
  color: var(--accent-ink, #17564A);
  background: rgba(47, 158, 131, 0.06);
}

/* 「移除组件」角标：垃圾桶 icon + 文字，危险语义用红色 */
.avatar-module-remove {
  position: absolute;
  top: 6px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #B4423A;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.avatar-module-remove .i-trash {
  flex: 0 0 auto;
}

.avatar-module-remove:hover {
  color: #8F2F28;
  text-decoration: underline;
}

/* 显式 display 会盖过 [hidden] 默认隐藏，统一兜底 */
.avatar-module[hidden],
.avatar-module-body[hidden],
.avatar-module-add[hidden],
.avatar-module-remove[hidden] {
  display: none;
}

/* 包裹层：承载头像框、下方指引与 × 删除钮。× 必须挂在这一层——
   avatar-box 是 overflow:hidden，圆形时圆角会把内部右上角的 × 裁没 */
.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  margin: 14px 0 14px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 头像框下方一句话指引：nowrap 让 72px 框两侧对称露出文字，不撑宽布局 */
.avatar-box-tip {
  margin-top: 7px;
  font-size: 10.5px;
  line-height: 1;
  color: var(--ink-3, #78807F);
  white-space: nowrap;
}

.avatar-box {
  position: relative;
  width: 72px;
  height: 100px;
  border: 1px solid var(--ink, #191C1D);
  border-radius: 0;
  background: var(--paper, #FBFAF7);
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar-box:hover {
  border-color: var(--accent-ink, #17564A);
  box-shadow: inset 0 0 0 1px var(--accent-ink, #17564A);
}

.avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  gap: 4px;
  color: var(--ink-3, #78807F);
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.avatar-placeholder em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.18em;
}

.avatar-del {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2; /* 图层压在图片之上，圆形裁剪也盖不住 */
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--ink, #191C1D);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.avatar-del:hover {
  background: #8b1e1e;
}

/* 右侧：规格化文字排布，细竖线分隔 */
.avatar-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px 0 14px 16px;
  margin-left: 16px;
  border-left: 1px solid var(--line, #E2DED4);
  font-size: 12px;
}

.avatar-meta strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink, #191C1D);
}

.avatar-meta > span {
  color: var(--ink-3, #78807F);
  line-height: 1.6;
}

.avatar-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.avatar-actions .mini-btn {
  border-radius: 0;
  white-space: nowrap;
  padding: 5px 14px;
}

.avatar-actions #avatarUploadBtn {
  border-color: var(--accent-ink, #17564A);
  background: var(--accent-ink, #17564A);
  color: #fff;
}

.avatar-actions #avatarUploadBtn:hover {
  background: #11453c;
  border-color: #11453c;
}

/* 删除头像：危险动作，红字红框与「移除组件」同语言 */
.avatar-actions #avatarRemoveBtn {
  border-color: rgba(180, 35, 24, 0.45);
  background: transparent;
  color: var(--danger, #b42318);
}

.avatar-actions #avatarRemoveBtn:hover {
  border-color: #8b1e1e;
  background: rgba(180, 35, 24, 0.08);
  color: #8b1e1e;
}

/* 形状切换：方角分段控件，与技能模式分段同语言但更利落 */
.avatar-shape-seg {
  display: inline-flex;
  gap: 0;
  margin-top: 2px;
  border: 1px solid var(--line-strong, #CFC9BC);
  border-radius: 0;
  overflow: hidden;
  background: var(--paper, #FBFAF7);
  width: fit-content;
}

.avatar-shape-seg .avatar-shape-label {
  display: none;
}

.avatar-shape-seg button {
  padding: 4px 12px;
  border: 0;
  border-right: 1px solid var(--line-strong, #CFC9BC);
  background: transparent;
  color: var(--ink-2, #4B5254);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}

/* 格位式模板固定 5:7：其余形状置灰不可点（disabled 由 app.js 按模板写入） */
.avatar-shape-seg button:disabled {
  color: #b9b4a9;
  background: #f4f2ed;
  cursor: not-allowed;
}

.avatar-shape-seg[hidden] {
  display: none;
}

.avatar-shape-seg button:last-child {
  border-right: 0;
}

.avatar-shape-seg button:hover {
  color: var(--ink, #191C1D);
  background: var(--paper-2, #F1EEE6);
}

.avatar-shape-seg button.active {
  background: var(--ink, #191C1D);
  color: #fff;
}

/* 圆形形状下的模块预览框 */
.avatar-box.avatar-box-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
}

/* 圆形形状下的裁剪相框 */
.crop-frame.crop-frame-circle {
  border-radius: 50%;
}

/* 裁剪弹层：同语言，方角。加 .modal 前缀抬权重，防止被 template-library.css
   后加载的 .modal-card{width:min(1200px,100%)} 拉成全宽（同 modal-card-sm 事故） */
.modal .avatar-crop-card {
  width: min(440px, 100%);
  border-radius: 0;
}

.avatar-crop-stage {
  position: relative;
  height: 380px;
  margin: 16px 24px 0;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid var(--line, #E2DED4);
  background:
    repeating-conic-gradient(#d9d5cb 0% 25%, #eceade 0% 50%) 0 0 / 22px 22px;
  touch-action: none;
  cursor: grab;
}

.avatar-crop-stage:active {
  cursor: grabbing;
}

.avatar-crop-stage img {
  position: absolute;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.crop-frame {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(22, 33, 31, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 0;
  pointer-events: none;
}

.crop-frame::before,
.crop-frame::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
}

.crop-frame::before {
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 1px;
}

.crop-frame::after {
  top: 50%;
  left: 6px;
  right: 6px;
  height: 1px;
}

.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px 4px;
  font-size: 12px;
  color: var(--ink-2, #4B5254);
}

.crop-zoom-row input[type='range'] {
  flex: 1;
}

.crop-foot-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.crop-foot-actions .btn {
  border-radius: 0;
}

/* [hidden] 显式兜底：上面的 display 规则优先级会盖过浏览器默认隐藏，
   导致删除头像后图片和 × 仍然显示 */
.avatar-box img[hidden],
.avatar-placeholder[hidden],
.avatar-del[hidden],
.avatar-module input[type='file'][hidden] {
  display: none;
}

/* 新增形状的模块预览框尺寸 */
.avatar-box.avatar-box-square {
  width: 88px;
  height: 88px;
}

.avatar-box.avatar-box-three-four {
  width: 78px;
  height: 104px;
}

/* ── 基本信息字段组件化：与头像组件同一套语言 ── */
/* 输入框 + 等高删除条：flex 拉伸，删除条自动和 input/textarea 一样高 */
.field-control {
  position: relative; /* combo 浮层挂这一层，对齐输入框 */
  display: flex;
  align-items: stretch;
  gap: 0;
}

.field-control input,
.field-control textarea {
  flex: 1;
  min-width: 0;
  width: auto;
}

/* 删除条：紧贴输入框右侧的等高窄列，红色垃圾桶居中 */
.field-remove {
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm, 4px);
  background: transparent;
  color: #B4423A;
  cursor: pointer;
}

.field-remove .i-trash {
  width: 17px;
  height: 17px;
}

.field-remove:hover {
  background: rgba(180, 66, 58, 0.1);
}

/* 字段被移除后收起（显式 display 会盖过 [hidden]，统一兜底） */
.field[hidden],
.field-wide[hidden] {
  display: none;
}

/* 添加条：位于头像组件下方（面板顶部），列出被移除字段的「＋ 加回」胶囊 */
.field-add-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.field-add-bar[hidden] {
  display: none;
}

.field-add-chip {
  padding: 5px 12px;
  border: 1px dashed var(--line, #E2DED4);
  border-radius: 0;
  background: transparent;
  color: var(--ink-2, #4B5254);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.field-add-chip:hover {
  border-color: var(--accent-ink, #17564A);
  color: var(--accent-ink, #17564A);
}

/* ── 板块模块化（工作/教育/项目）：与头像组件同一套语言 ── */
.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 「移除组件」：红色垃圾桶 + 文字，行内放在面板标题右侧 */
.module-remove {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #B4423A;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.module-remove:hover {
  color: #8F2F28;
  text-decoration: underline;
}

/* 移除后收起的「添加」行：整条可点 */
.module-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 10px;
  border: 1px dashed var(--line, #E2DED4);
  border-radius: 0;
  background: transparent;
  color: var(--ink-3, #78807F);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.module-add:hover {
  color: var(--accent-ink, #17564A);
  border-color: var(--accent-ink, #17564A);
  background: rgba(47, 158, 131, 0.06);
}

/* [hidden] 兜底：panel-head 是 flex、module-add 是 flex，显式 display 会盖过默认隐藏 */
.panel-head[hidden],
.panel-body[hidden],
.module-add[hidden],
.module-remove[hidden] {
  display: none;
}

/* ── 技能描述点组件（描述模式）：一条 = 一个卡片，左技能点右描述 ── */
.skill-lines-block {
  margin-top: 14px;
}

.skill-rows-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink-2, #4B5254);
  font-size: 12.5px;
}

.skill-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 大长方形外框包裹两个输入框 + 删除条 */
.skill-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 8px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: var(--radius-sm, 4px);
  background: var(--paper, #FBFAF7);
}

.skill-row input {
  min-width: 0;
  border: 1px solid var(--line, #E2DED4);
  border-radius: var(--radius-sm, 4px);
  padding: 8px 10px;
  font-size: 13px;
  background: var(--white, #fff);
  outline: none;
}

.skill-row input:focus {
  border-color: var(--accent, #2F9E83);
  box-shadow: 0 0 0 3px rgba(47, 158, 131, 0.14);
}

.skill-row .skill-name {
  flex: 0 0 32%;
  margin-right: 8px;
}

.skill-row .skill-desc {
  flex: 1;
}

/* 行内删除条：与卡片等高的右侧窄列 */
.skill-row-del {
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm, 4px);
  background: transparent;
  color: #B4423A;
  cursor: pointer;
}

.skill-row-del:hover {
  background: rgba(180, 66, 58, 0.1);
}

/* ── 自研控件（editor-controls.js）：月份区间面板 + 可搜索下拉 ── */
.field {
  position: relative; /* 浮层挂在输入框父级，给个定位上下文 */
}

.field-range {
  grid-column: 1 / -1;
}

.field-range .range-trigger {
  cursor: pointer;
  background: var(--white, #fff);
}

.field-range .range-trigger[readonly] {
  color: var(--ink, #191C1D);
}

/* 月份区间面板 */
.ym-panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 95;
  width: 248px;
  padding: 12px;
  background: var(--white, #fff);
  border: 1px solid var(--line-strong, #191C1D);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(25, 28, 29, 0.16);
  font-size: 13px;
  color: var(--ink, #191C1D);
}

.ym-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ym-year {
  font-size: 13.5px;
  font-weight: 700;
}

.ym-nav {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2, #4B5254);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.ym-nav:hover {
  border-color: var(--ink, #191C1D);
  color: var(--ink, #191C1D);
}

.ym-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.ym-cell {
  padding: 6px 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--paper-2, #F1EEE6);
  color: var(--ink, #191C1D);
  font-size: 12.5px;
  cursor: pointer;
}

.ym-cell:hover {
  border-color: var(--accent, #2F9E83);
}

/* 区间中间月份：品牌绿浅底突出 */
.ym-cell.is-in-range {
  background: rgba(47, 158, 131, 0.14);
  border-radius: 0;
}

.ym-cell.is-edge {
  background: var(--accent-ink, #17564A);
  border-color: var(--accent-ink, #17564A);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
}

/* 左起右止双栏：点开一次出现两块年月网格 */
.ym-panel-range {
  width: auto;
}

.ym-cols {
  display: flex;
  gap: 14px;
}

.ym-col {
  min-width: 216px;
}

.ym-foot {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.ym-action {
  flex: 1;
  padding: 6px 0;
  border: 1px dashed var(--line-strong, #191C1D);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2, #4B5254);
  font-size: 12.5px;
  cursor: pointer;
}

.ym-action:hover {
  border-style: solid;
  color: var(--ink, #191C1D);
}

.ym-action-quiet {
  border-color: var(--line, #E2DED4);
}

/* 可搜索下拉 */
.combo-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 95;
  max-height: 224px;
  overflow-y: auto;
  padding: 4px;
  background: var(--white, #fff);
  border: 1px solid var(--line-strong, #191C1D);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 12px 32px rgba(25, 28, 29, 0.16);
  font-size: 13px;
  color: var(--ink, #191C1D);
}

.combo-menu[hidden] {
  display: none;
}

.combo-option {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink, #191C1D);
  text-align: left;
  cursor: pointer;
}

.combo-option:hover,
.combo-option.is-active {
  background: var(--paper-2, #F1EEE6);
}

/* ── 意见反馈弹层（feedback-widget.js，工作台/编辑器共用）── */
.fb-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px 4px;
}

.fb-types {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fb-type {
  padding: 6px 16px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: 999px;
  background: var(--white, #fff);
  color: var(--ink-2, #4B5254);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.fb-type:hover {
  border-color: var(--ink-3, #78807F);
  color: var(--ink, #191C1D);
}

.fb-type.is-current {
  border-color: var(--ink, #191C1D);
  background: var(--ink, #191C1D);
  color: #f7f5ef;
}

/* 输入区：字数计数收在框内右下角，视觉归位不散行 */
.fb-field {
  position: relative;
}

.fb-input {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 12px 14px 28px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: 10px;
  background: var(--white, #fff);
  color: var(--ink, #191C1D);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  resize: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.fb-input::placeholder {
  color: var(--ink-3, #78807F);
}

.fb-input:focus {
  outline: none;
  border-color: var(--accent, #2F9E83);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(47, 158, 131, 0.18));
}

.fb-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding-left: 8px;
  color: var(--ink-3, #78807F);
  font-size: 11.5px;
  pointer-events: none;
}

.fb-error {
  margin: 0;
  color: #A33B3B;
  font-size: 12.5px;
  line-height: 1.6;
}

.fb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--line, #E2DED4);
}

.fb-note {
  color: var(--ink-3, #78807F);
  font-size: 11.5px;
}

.fb-done {
  text-align: center;
  padding: 28px 24px 36px;
}

.fb-done strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.fb-done p {
  margin: 8px 0 0;
  color: var(--ink-3, #78807F);
  font-size: 13px;
}

/* ── 范文选择（样式侧栏卡 + 范文库弹层） ── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 6px 2px 10px;
  overflow-y: auto;
}

.persona-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: var(--radius-sm, 8px);
  background: var(--paper, #FBFAF7);
  text-align: left;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.persona-card:hover {
  border-color: var(--ink, #191C1D);
}

.persona-card.active {
  border-color: var(--accent, #2F9E83);
  box-shadow: 0 0 0 1px var(--accent, #2F9E83);
}

.persona-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.persona-card-title strong {
  font-size: 14px;
}

.persona-flag {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft, rgba(47, 158, 131, 0.12));
  color: var(--accent-ink, #17564A);
  font-size: 10.5px;
  font-weight: 600;
}

.persona-card-body {
  flex: 1;
  min-width: 0;
}

.persona-card-body p {
  margin: 0;
  color: var(--ink-3, #78807F);
  font-size: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 760px) {
  .persona-grid {
    grid-template-columns: 1fr;
  }
}

/* 体验横幅：深墨底 + 香槟金，跨工作台两列 */
.member-preview-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: var(--radius-md, 8px);
  background: #16211F;
  color: #F1EEE6;
}

.member-preview-banner .mp-badge {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.16);
  border: 1px solid rgba(201, 162, 39, 0.55);
  color: #E7C568;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.member-preview-banner .mp-text {
  font-size: 13px;
  color: rgba(241, 238, 230, 0.78);
}

.member-preview-banner .mp-space {
  flex: 1;
}

.member-preview-banner .mp-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--radius-sm, 4px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.member-preview-banner .mp-btn-gold {
  border: 0;
  background: #C9A227;
  color: #16211F;
}

.member-preview-banner .mp-btn-gold:hover {
  background: #DBB545;
}

.member-preview-banner .mp-btn-ghost {
  border: 1px solid rgba(241, 238, 230, 0.35);
  background: transparent;
  color: rgba(241, 238, 230, 0.85);
}

.member-preview-banner .mp-btn-ghost:hover {
  border-color: rgba(241, 238, 230, 0.6);
  color: #fff;
}


/* 编辑器里的体验横幅挂在 app-bar 下方（workspace 里是 grid 跨列，app 里是普通块） */
.page-app .member-preview-banner {
  margin: 10px 16px 0;
}

.member-preview-banner[hidden] {
  display: none;
}

/* ── 会员体验 · 导出拦截弹窗（体验编辑器专用，深墨金主题） ── */
.mpv-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 33, 31, 0.5);
}

.mpv-dialog[hidden] {
  display: none;
}

.mpv-dialog-card {
  width: 100%;
  max-width: 360px;
  padding: 26px 26px 22px;
  border-radius: 12px;
  background: #FBFAF7;
  box-shadow: 0 18px 50px rgba(22, 33, 31, 0.25);
  text-align: center;
}

.mpv-dialog-spark {
  font-size: 18px;
  color: #C9A227;
}

.mpv-dialog-card h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  color: #191C1D;
}

.mpv-dialog-card p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #4B5254;
}

.mpv-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.mpv-dialog-gold {
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #C9A227;
  color: #16211F;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.mpv-dialog-gold:hover {
  background: #DBB545;
}

.mpv-dialog-ghost {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #E2DED4;
  border-radius: 999px;
  background: transparent;
  color: #4B5254;
  font-size: 13.5px;
  cursor: pointer;
}

.mpv-dialog-ghost:hover {
  border-color: #C9A227;
  color: #8A6A1F;
}

/* ── 内容模块 CRUD：导航垃圾桶 + 「添加模块」菜单 + 动态板块条目行 ── */

/* 导航垃圾桶：红色、与铅笔同款交互——悬停按钮区域才亮出，避免一排图标太吵 */
.module-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 30px;
  margin-left: 2px;
  border-radius: 6px;
  color: #B4423A;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.12s ease;
}

.module-btn:hover .module-del,
.module-btn:focus-visible .module-del,
.module-btn.is-current .module-del {
  opacity: 0.72;
}

.module-del svg {
  display: block;
  width: 14px;
  height: 14px;
}

.module-del:hover {
  opacity: 1;
  background: rgba(180, 66, 58, 0.14);
}

.module-del:active {
  background: rgba(180, 66, 58, 0.26);
}

/* display:flex 会盖过 [hidden] 的 UA 样式，隐藏已移除板块的导航按钮必须显式声明 */
.module-btn[hidden] {
  display: none;
}

/* 「添加模块」：可添加模块以虚线小卡平铺在导航下方，点击即追加 */
.module-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.module-chip {
  padding: 5px 12px;
  border: 1px dashed var(--line, #E2DED4);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3, #78807F);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.module-chip:hover {
  color: var(--accent-ink, #17564A);
  border-color: var(--accent, #2F9E83);
  background: var(--accent-soft, rgba(47, 158, 131, 0.08));
}

/* 自定义模块卡：实线边框做区分（点击弹输入框） */
.module-chip-custom {
  border-style: solid;
}

/* 动态板块（可插拔/自定义）的条目编辑行：名称+时间一行，说明一行 */
.extra-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.extra-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
}

.extra-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.extra-row input,
.extra-row textarea {
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: 6px;
  background: var(--paper, #FBFAF7);
  color: var(--ink, #191C1D);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.55;
}

.extra-row textarea {
  flex: 1 1 auto;
  resize: vertical;
}

.extra-row input:focus,
.extra-row textarea:focus {
  outline: none;
  border-color: var(--accent, #2F9E83);
}

/* 段落型（自我评价）：删除钮贴顶对齐第一行 */
.extra-row-paragraph {
  align-items: flex-start;
}

/* 富文本面撑满行宽，不留右侧空白 */
.extra-row-paragraph .rich-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.extra-row-paragraph .skill-row-del {
  margin-top: 4px;
}

.extra-name {
  flex: 1 1 62%;
}

.extra-meta {
  flex: 1 1 38%;
}

.extra-desc {
  width: 100%;
}

.extra-row .skill-row-del {
  flex: 0 0 auto;
}

/* ── 会员体验 · 顶栏状态旗标（体验工作台 + 体验编辑器共用） ──
   金色描边胶囊：✦ 状态 + 加粗「会员版体验中」+ 立即开通 + 退出体验 */
.mpv-flag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 6px 0 14px;
  border: 1.5px solid #C9A227;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.14), rgba(201, 162, 39, 0.08));
  box-shadow: 0 1px 6px rgba(201, 162, 39, 0.18);
  white-space: nowrap;
}

.mpv-flag-state {
  font-size: 12px;
  color: #C9A227;
}

.mpv-flag-text {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8A6A1F;
}

.mpv-flag-up {
  height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #C9A227;
  color: #16211F;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.mpv-flag-up:hover {
  background: #DBB545;
}

.mpv-flag-exit {
  padding-right: 8px;
  font-size: 12.5px;
  color: #78807F;
  text-decoration: none;
}

.mpv-flag-exit:hover {
  color: #4B5254;
  text-decoration: underline;
}

@media (max-width: 1240px) {
  .mpv-flag {
    gap: 8px;
    padding-left: 12px;
  }
}

@media (max-width: 900px) {
  .mpv-flag-text {
    display: none;
  }
}

@media (max-width: 640px) {
  .mpv-flag-exit {
    display: none;
  }
}

/* ── 条目级别徽标已下线：区间板块 meta 改为条目名后括号纯文本（genericEntriesHtml）── */

/* ── 动态板块行：日期触发行 + 快捷标签 ── */
.extra-row-top {
  position: relative; /* combo 下拉菜单挂在行上定位 */
}

.extra-row-date {
  margin-top: -2px;
}

.extra-range-trigger {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: 6px;
  background: var(--white, #fff);
  color: var(--ink, #191C1D);
  font-size: 13px;
  cursor: pointer;
}

.extra-range-trigger[readonly] {
  color: var(--ink, #191C1D);
}

.extra-range-trigger:focus {
  outline: none;
  border-color: var(--accent, #2F9E83);
}

.quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 4px;
}

.quick-chips-label {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--ink-3, #78807F);
}

.quick-chip {
  padding: 4px 10px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: 999px;
  background: var(--white, #fff);
  color: var(--ink-2, #4B5254);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.quick-chip:hover {
  color: var(--accent-ink, #17564A);
  border-color: var(--accent, #2F9E83);
  background: var(--accent-soft, rgba(47, 158, 131, 0.08));
}

/* ── 自定义板块「版式」切换（条目/标签/两列/段落）── */
.kind-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: 7px;
  background: var(--paper-2, #F1EEE6);
}

.kind-seg button {
  padding: 3px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-3, #78807F);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

.kind-seg button:hover {
  color: var(--ink, #191C1D);
}

.kind-seg button.is-current {
  background: var(--white, #fff);
  color: var(--accent-ink, #17564A);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(25, 28, 29, 0.1);
}

/* ── 会员开通弹窗：屏幕居中，预留小程序码位（后续换成会员充值页的小程序码） ── */
.mp-pay-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 33, 31, 0.55);
}

.mp-pay-modal[hidden] {
  display: none;
}

.mp-pay-card {
  position: relative;
  width: min(360px, calc(100vw - 48px));
  background: #FBFAF7;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 18px;
  padding: 30px 28px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(22, 33, 31, 0.35);
}

.mp-pay-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #78807F;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.mp-pay-close:hover {
  color: #191C1D;
}

.mp-pay-star {
  font-size: 22px;
  color: #C9A227;
}

.mp-pay-card h3 {
  margin: 8px 0 4px;
  font-size: 20px;
  color: #191C1D;
}

.mp-pay-sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: #78807F;
}

.mp-pay-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border: 2px dashed rgba(201, 162, 39, 0.55);
  border-radius: 14px;
  background: rgba(201, 162, 39, 0.06);
}

.mp-pay-qr span {
  font-size: 13px;
  color: #C9A227;
  letter-spacing: 0.04em;
}

.mp-pay-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: #78807F;
}

/* ── 富文本编辑（WYSIWYG 表面 + ** 标记存储）───────────────────────────── */
.rich-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.rich-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 158, 131, 0.14);
}

.rich-toolbar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 5px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.rich-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rich-sep {
  width: 1px;
  height: 16px;
  margin: 0 4px;
  background: var(--line);
}

.rich-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
}

.rich-btn:hover {
  background: var(--paper-2);
}

.rich-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.rich-color {
  position: relative;
  display: inline-flex;
}

.rich-color-a {
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  background: linear-gradient(to top, var(--accent) 0 3px, transparent 3px);
  padding: 0 1px;
}

/* 调色板 = 工具栏第三行（文档流）：打开时把编辑区往下推，不遮工具栏也不遮正文 */
.rich-color-pop {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.rich-color-pop[hidden] {
  display: none;
}

.rich-swatch {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--sw, transparent);
  cursor: pointer;
}

.rich-swatch:hover {
  transform: scale(1.12);
}

.rich-swatch-default {
  background: var(--white);
  position: relative;
}

.rich-swatch-default s {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  text-decoration: none;
}

.rich-editor {
  width: 100%;
  min-height: 84px;
  padding: 9px 11px;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-3);
  pointer-events: none;
}

.rich-editor strong {
  font-weight: 700;
}

.rich-editor ul,
.rich-editor ol {
  margin: 2px 0;
  padding-left: 1.5em;
}

.rich-editor mark {
  background: #FCE9A8;
  border-radius: 2px;
  padding: 0 1px;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-3);
}

/* ── 简历富文本渲染（与 resume-renderer.js rich() 配套，预览/PDF 共用）──── */
.resume mark {
  background: #FCE9A8;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.resume a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.resume .rc-red { color: #C0392B; }
.resume .rc-blue { color: #2A6BBF; }
.resume .rc-green { color: #1F7A5C; }
.resume .rc-orange { color: #B45309; }
.resume .rc-gray { color: #6B7280; }

.resume .rl-c { display: block; text-align: center; }
.resume .rl-r { display: block; text-align: right; }
.resume .rl-j { display: block; text-align: justify; }

.resume .rich-list {
  margin: 2px 0 2px;
  padding-left: 1.6em;
}

/* ── 技能描述点富文本：共享紧凑工具栏 + 单行编辑器 ────────────────────── */
.rich-wrap-skills {
  margin-bottom: 8px;
}

.rich-wrap-skills .rich-toolbar {
  flex-direction: row;
  align-items: center;
  padding: 3px 6px;
}

.skill-row .skill-desc.rich-editor {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line, #E2DED4);
  border-radius: var(--radius-sm, 4px);
  background: var(--white, #fff);
  font-size: 13px;
  line-height: 1.5;
}

.skill-row .skill-desc.rich-editor:focus {
  border-color: var(--accent);
}

/* ── 非会员导出配额用尽的转化弹窗（app.js 动态创建） ── */
.export-upsell {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 33, 31, 0.55);
}

.export-upsell[hidden] {
  display: none;
}

.export-upsell-mask {
  position: absolute;
  inset: 0;
}

.export-upsell-card {
  position: relative;
  width: min(360px, calc(100vw - 48px));
  background: #FBFAF7;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 18px;
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(22, 33, 31, 0.35);
}

.export-upsell-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: #191C1D;
}

.export-upsell-text {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.7;
  color: #78807F;
}

.export-upsell-actions {
  display: flex;
  gap: 10px;
}

.export-upsell-primary,
.export-upsell-secondary {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.12s ease, background 0.12s ease;
}

.export-upsell-primary {
  border: 0;
  background: #C9A227;
  color: #fff;
}

.export-upsell-primary:hover {
  filter: brightness(1.06);
}

.export-upsell-secondary {
  border: 1px solid #E2DED4;
  background: transparent;
  color: #78807F;
}

.export-upsell-secondary:hover {
  background: #F1EEE6;
  color: #191C1D;
}

.export-upsell-qr {
  margin: 0 0 18px;
}

.export-upsell-qr img {
  width: 148px;
  height: 148px;
  border-radius: 10px;
  border: 1px solid #E2DED4;
  background: #fff;
  display: block;
  margin: 0 auto 8px;
}

.export-upsell-qr-hint {
  margin: 0;
  font-size: 12px;
  color: #78807F;
}

/* ── 导出确认弹窗：复用 export-upsell 模态骨架，格式选择 + 生成进度反馈 ── */
.export-dialog .export-upsell-card {
  border-color: #E2DED4;
}

.export-dialog-primary {
  flex: 1;
  padding: 10px 0;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #17564A;
  color: #fff;
  transition: filter 0.12s ease, opacity 0.12s ease;
}

.export-dialog-primary:hover {
  filter: brightness(1.08);
}

.export-dialog-primary:disabled {
  opacity: 0.65;
  cursor: default;
  filter: none;
}

.export-fmt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}

.export-fmt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #E2DED4;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.export-fmt:hover {
  border-color: #B9B1A2;
}

.export-fmt.is-active {
  border-color: #17564A;
  background: #F1EEE6;
}

.export-fmt-radio {
  width: 14px;
  height: 14px;
  flex: none;
  border: 1.5px solid #B9B1A2;
  border-radius: 50%;
  box-sizing: border-box;
}

.export-fmt.is-active .export-fmt-radio {
  border-color: #17564A;
  background: #17564A;
  box-shadow: inset 0 0 0 3px #FBFAF7;
}

.export-fmt-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #191C1D;
}

.export-fmt-text span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: #78807F;
}

/* ── 头部联系行增强：字段顺序（fieldOrder）+ 自定义字段（customFields）──
   与 .field-add-chip 同一套编辑语言：细线框、无圆角、品牌绿只做动作态 */
.cf-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #E2DED4);
}

.cf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cf-head strong {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2, #4B5254);
}

.cf-hint {
  margin: 6px 0 2px;
  font-size: 11px;
  color: var(--ink-3, #78807F);
}

/* 面板顶部的说明行（个人简介面板：讲清它是独立正文板块） */
.panel-hint {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3, #78807F);
}

.cf-order-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.cf-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line, #E2DED4);
  background: var(--paper-2, #F1EEE6);
}

.cf-chip em {
  font-style: normal;
  font-size: 12px;
  padding: 4px 2px;
  color: var(--ink, #191C1D);
}

.cf-move {
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--ink-3, #78807F);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.cf-move:hover:not([disabled]) {
  color: var(--accent-ink, #17564A);
}

.cf-move[disabled] {
  opacity: 0.35;
  cursor: default;
}

.cf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line, #E2DED4);
  background: var(--paper, #FBFAF7);
}

.cf-label,
.cf-value {
  padding: 6px 8px;
  border: 1px solid var(--line, #E2DED4);
  background: #fff;
  font-size: 12px;
  color: var(--ink, #191C1D);
}

.cf-label {
  width: 132px;
  flex-shrink: 0;
}

.cf-value {
  flex: 1 1 160px;
  min-width: 0;
}

.cf-label:focus,
.cf-value:focus {
  outline: none;
  border-color: var(--accent, #2F9E83);
}

.cf-icons {
  display: flex;
  gap: 2px;
}

.cf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3, #78807F);
  cursor: pointer;
}

.cf-icon:hover {
  color: var(--ink, #191C1D);
}

.cf-icon.is-on {
  color: var(--accent-ink, #17564A);
  border-color: var(--accent, #2F9E83);
  background: rgba(47, 158, 131, 0.08);
}

.cf-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #B4423A;
  cursor: pointer;
}

.cf-del:hover {
  color: #8F2F28;
}

