* { box-sizing: border-box; }

:root {
  --ui-primary: #6D4DF6;                                       /* 撞色一端：紫 */
  --ui-primary-2: #FF7A45;                                     /* 撞色另一端：橙 */
  --ui-grad: linear-gradient(135deg, #FF7A45 0%, #6D4DF6 100%);/* 橙→紫 活跃撞色 */
  --ui-primary-rgb: 109, 77, 246;
  --ui-bg: #eef1f8;
  --ui-card: #ffffff;
  --ui-border: #e6e9f0;
  --ui-border-strong: #d3d8e3;
  --ui-text: #1f2533;
  --ui-muted: #6b7280;
  --ui-radius: 16px;
  --ui-radius-sm: 10px;
  --ui-shadow: 0 1px 3px rgba(16,24,40,.05), 0 10px 28px rgba(16,24,40,.10), 0 18px 46px rgba(16,24,40,.06);
  --ui-shadow-sm: 0 1px 3px rgba(16,24,40,.06), 0 6px 16px rgba(16,24,40,.07);
  --ui-ring: 0 0 0 3px rgba(109, 77, 246, .20);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ui-text);
  /* 猫咪插画作为整页背景图：cover 铺满、居中、固定不随滚动；底色兜底同插画黄绿 */
  background: #dadb89 url("assets/bg-page.png") center center / cover no-repeat fixed;
  min-height: 100vh;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--ui-card);
  border-bottom: 1px solid var(--ui-border);
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 4px 16px rgba(31, 41, 55, .05);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; color: var(--ui-text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ui-grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(109, 77, 246, .35);
}
.tpl-select { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tpl-label { font-size: 13px; color: var(--ui-muted); }
#tpl-select {
  padding: 7px 12px;
  border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-border-strong);
  background: #fff;
  color: var(--ui-text);
  font-size: 13px;
  min-width: 132px;
  cursor: pointer;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#tpl-select:focus { border-color: var(--ui-primary); box-shadow: var(--ui-ring); }
.color-select { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-list { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-group { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px; border-radius: 10px; }
.color-group.group-active { background: rgba(109, 77, 246, .12); box-shadow: 0 0 0 2px rgba(109, 77, 246, .35); }
.shade-btn {
  width: 26px; height: 18px; padding: 0;
  border: 1px solid var(--ui-border-strong); background: #fff; border-radius: 6px;
  cursor: pointer; font-size: 10px; line-height: 1; color: var(--ui-muted);
  display: flex; align-items: center; justify-content: center; outline: none;
  transition: background .15s, color .15s, border-color .15s;
}
.shade-btn:hover { background: #f1ebff; color: var(--ui-primary); }
.shade-btn.active { background: var(--ui-primary); color: #fff; border-color: var(--ui-primary); box-shadow: 0 0 0 2px rgba(109, 77, 246, .3); }
.color-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ui-border-strong);
  cursor: pointer; padding: 0; outline: none;
  transition: transform .15s, box-shadow .15s;
}
.color-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--ui-primary); }
.color-btn.active { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--ui-primary); }
.primary {
  padding: 9px 18px;
  background: var(--ui-grad);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(109, 77, 246, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(109, 77, 246, .42); }
.primary:active { transform: translateY(0) scale(.98); }

/* ---------- Layout ---------- */
.main {
  display: flex;
  gap: 18px;
  padding: 18px;
  align-items: flex-start;
}
.editor { flex: 1 1 440px; min-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.preview-pane {
  flex: 1 1 480px;
  min-width: 340px;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--ui-shadow);
  border: 1px solid var(--ui-border);
  overflow: auto;
  max-height: calc(100vh - 96px);
}

/* ---------- Module card ---------- */
.card {
  position: relative;
  background: var(--ui-card);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 22px rgba(16,24,40,.09), 0 16px 34px rgba(16,24,40,.05);
  transition: box-shadow .22s, transform .22s, border-color .22s;
}
.card::before {                 /* 堆叠副卡：卡片下方露出的浅色层，强化“一叠卡片”观感 */
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: -10px;
  height: 18px;
  background: linear-gradient(180deg, #f3f5fb, #e9edf4);
  border-radius: 0 0 16px 16px;
  z-index: -1;
  box-shadow: 0 6px 14px rgba(16,24,40,.07);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 5px rgba(16,24,40,.07), 0 16px 32px rgba(16,24,40,.12), 0 26px 52px rgba(16,24,40,.07);
}
.card.dragging { opacity: .55; transform: scale(.99); }
.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--ui-border);
  background: linear-gradient(180deg, #fcfdff, #f5f7fc);
  border-radius: 15px 15px 0 0;
  position: relative;
  overflow: hidden;
}
.card-head::before {            /* 撞色顶条：品牌撞色延伸到每张卡片头部 */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--ui-grad);
}
.drag {
  cursor: grab;
  color: #aeb6c6;
  display: flex; align-items: center; justify-content: center;
  padding: 2px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.drag:hover { background: #f1ebff; color: var(--ui-primary); }
.drag:active { cursor: grabbing; }
.card-title {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ui-text);
}
.card-del {
  border: none;
  background: #fdeaea;
  color: #e0413e;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s;
}
.card-del:hover { background: #fbd5d5; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
/* 模块标题栏内、与模块名称同排的淡色小文句：水平居中悬浮，两侧渐隐细线 */
.card-motto {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 62%;
  font-size: 12px;
  letter-spacing: .12em;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  color: #a6a1c4;
  pointer-events: none;   /* 不遮挡标题输入框的点击/编辑 */
  user-select: none;
}
.card-motto::before,
.card-motto::after {
  content: "";
  flex: 1 1 auto;
  max-width: 70px;
  height: 1px;
}
.card-motto::before { background: linear-gradient(90deg, rgba(109,77,246,0), rgba(109,77,246,.26)); }
.card-motto::after  { background: linear-gradient(90deg, rgba(109,77,246,.26), rgba(109,77,246,0)); }
/* 极窄屏（手机）：标题栏空间不足时隐去小文句，避免与标题/删除按钮重叠 */
@media (max-width: 560px) {
  .card-motto { display: none; }
}

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--ui-muted); font-weight: 500; }
.field input, .field select, .field textarea {
  padding: 9px 11px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ui-text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ui-primary); box-shadow: var(--ui-ring); }
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }

.add-item {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ui-primary);
  background: #f1ebff;
  border: 1px dashed #b9c0f5;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.add-item:hover { background: #e0e4fd; transform: translateY(-1px); }

.item-block {
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fbfcfe;
}
.item-del {
  align-self: flex-end;
  font-size: 11.5px;
  font-weight: 600;
  color: #e0413e;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background .15s;
}
.item-del:hover { background: #fdeaea; }

/* ---------- Rich text ---------- */
.rt-toolbar { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.rt-btn {
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--ui-border-strong);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ui-text);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.rt-btn svg { display: block; }
.rt-btn:hover { background: #f1ebff; border-color: #b9c0f5; color: var(--ui-primary); }
.rt-btn:active { transform: scale(.94); }
.rt-editor {
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  padding: 10px;
  min-height: 70px;
  font-size: 13.5px;
  line-height: 1.6;
  outline: none;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.rt-editor:focus { border-color: var(--ui-primary); box-shadow: var(--ui-ring); }
.rt-editor:empty:before { content: attr(data-ph); color: #9aa3b2; }
.rt-editor ul, .rt-editor ol { margin: 4px 0 4px 20px; padding: 0; }

/* ---------- Photo ---------- */
.photo-wrap { display: flex; gap: 14px; align-items: flex-start; }
.photo-box {
  width: 88px;
  height: 110px;
  border: 1.5px dashed #c2c9d6;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9aa3b2;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  background: #f7f9fc;
  flex: none;
  transition: border-color .15s, background .15s, color .15s;
}
.photo-box:hover { border-color: var(--ui-primary); background: #f1ebff; color: var(--ui-primary); }
.photo-ico { margin-bottom: 2px; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-hint { font-size: 12px; color: var(--ui-muted); align-self: center; }

.custom-item { display: flex; gap: 8px; }
.custom-item input { flex: 1; }
.custom-item .ci-del {
  border: none;
  background: #fdeaea;
  color: #e0413e;
  border-radius: 8px;
  padding: 0 10px;
  cursor: pointer;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 34px;
  transition: background .15s;
}
.custom-item .ci-del:hover { background: #fbd5d5; }

/* ---------- Add module ---------- */
.add-module {
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(245,247,252,.72));
  border: 1.5px dashed var(--ui-border-strong);
  border-radius: 16px;
  padding: 16px 18px;
}
.add-title { font-weight: 700; margin-bottom: 12px; color: var(--ui-text); display: flex; align-items: center; gap: 7px; }
.add-title svg { color: var(--ui-primary); }
.add-btns { display: flex; flex-wrap: wrap; gap: 9px; }
.add-btns button {
  padding: 7px 14px;
  border: 1px solid var(--ui-border-strong);
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ui-text);
  font-weight: 500;
  transition: background .15s, border-color .15s, transform .15s, color .15s;
}
.add-btns button:hover { background: #f1ebff; border-color: var(--ui-primary); color: var(--ui-primary); transform: translateY(-1px); }

/* ============================================================
 *  简历预览 / 模板 / 主题色
 * ============================================================ */
.resume,
.resume * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.resume {
  font-size: 13px;
  line-height: 1.55;
  color: #1f2937;
  background: #fff;
  max-width: 820px;
  margin: 0 auto;
}

/* ---- 主题色（除页面白底、内容底色外的可换色部分） ----
 * --accent      : 主色（侧栏/横幅/标题条等背景）
 * --accent-weak : 浅色底纹
 * --accent-text : 落在 --accent 底色上的文字颜色（深色底配白字，浅色底配黑字）
 * --accent-ink  : 落在白色页面上的文字颜色（姓名/标题），用更深的同色系保证可读
 */
/* ---- 基础区块 ---- */
.resume .r-banner { color: var(--accent-text); }
.resume .r-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}
.resume .r-photo { width: 84px; height: 106px; border-radius: 6px; object-fit: cover; background: #e5e7eb; flex: none; }
.resume .r-name { font-size: 24px; font-weight: 700; color: var(--accent-ink); }
.resume .r-info { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 12.5px; color: #475569; }
.resume .r-info span b { color: #334155; font-weight: 600; margin-right: 3px; }
.resume .r-section { margin-bottom: 12px; }
.resume .r-section h2 {
  font-size: 15px;
  margin: 0 0 6px;
  padding-left: 8px;
  border-left: 4px solid var(--accent);
  color: #111827;
}
.resume .r-item { margin-bottom: 8px; }
.resume .r-item-head { display: flex; justify-content: space-between; gap: 10px; }
.resume .r-item-title { font-weight: 600; }
.resume .r-item-sub { color: #475569; font-size: 12.5px; }
.resume .r-item-time { color: #64748b; font-size: 12px; white-space: nowrap; }
.resume .r-item-body { margin-top: 3px; font-size: 12.5px; }
.resume ul, .resume ol { margin: 3px 0 3px 20px; padding: 0; }
.resume .r-empty { color: #cbd5e1; font-style: italic; }

/* ---- 侧栏 / 双栏布局容器 ---- */
.r-body { display: flex; align-items: stretch; }
.r-aside { flex: 0 0 30%; }
.r-main { flex: 1; min-width: 0; }

/* ============================================================
 *  模板 1：经典
 * ============================================================ */
.tpl-classic .r-name { color: var(--accent-ink); }

/* ============================================================
 *  模板：质感侧栏（原 深色侧栏，参考 1.jpg）
 * ============================================================ */
.tpl-sidebar-dark .r-aside {
  flex: 0 0 32%;
  background: var(--accent);
  color: var(--accent-text);
  padding: 20px 16px;
}
.tpl-sidebar-dark .r-aside .r-header {
  flex-direction: column;
  text-align: center;
  border-bottom: 1px solid var(--accent-text);
  padding-bottom: 14px;
}
.tpl-sidebar-dark .r-aside .r-photo { width: 96px; height: 118px; }
.tpl-sidebar-dark .r-aside .r-name { color: var(--accent-text); font-size: 20px; }
.tpl-sidebar-dark .r-aside .r-info {
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  color: var(--accent-text);
  text-align: left;
}
.tpl-sidebar-dark .r-aside .r-info span b { color: var(--accent-text); }
.tpl-sidebar-dark .r-aside .r-section { margin-top: 14px; }
.tpl-sidebar-dark .r-aside .r-section h2 {
  color: var(--accent-text);
  border-left: none;
  border-bottom: 1px solid var(--accent-text);
  padding: 0 0 4px;
  font-size: 13.5px;
}
.tpl-sidebar-dark .r-aside .r-item-body,
.tpl-sidebar-dark .r-aside .r-item-sub { color: var(--accent-text); }
.tpl-sidebar-dark .r-aside .r-empty { color: var(--accent-text); opacity: .6; }
.tpl-sidebar-dark .r-main { padding: 20px; }
.tpl-sidebar-dark .r-main .r-section h2 {
  background: var(--accent-weak);
  border-left: 4px solid var(--accent);
  padding: 4px 8px;
}

/* ============================================================
 *  模板 5：竖排侧栏（参考 2.jpg）
 * ============================================================ */
.tpl-sidebar-banner .r-aside {
  flex: 0 0 62px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tpl-sidebar-banner .r-aside .r-deco {
  writing-mode: vertical-rl;
  color: var(--accent-text);
  letter-spacing: 8px;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}
.tpl-sidebar-banner .r-main { padding: 20px; }
.tpl-sidebar-banner .r-main .r-section h2 {
  background: var(--accent);
  color: var(--accent-text);
  border-left: none;
  padding: 3px 10px;
  font-size: 13px;
}

/* ============================================================
 *  模板 6：浅蓝顶栏（参考 3.jpg）
 * ============================================================ */
.tpl-topbar-soft .r-banner {
  background: var(--accent);
  text-align: right;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 4px;
  border-radius: 6px 6px 0 0;
}
.tpl-topbar-soft .r-header { border-bottom: none; padding-top: 12px; }
.tpl-topbar-soft .r-section h2 {
  background: var(--accent-weak);
  color: var(--accent-ink);
  border-left: 4px solid var(--accent);
  padding: 4px 10px;
  font-size: 13.5px;
}

/* ============================================================
 *  模板 7：线条顶栏（参考 4.jpg）
 * ============================================================ */
.tpl-topbar-line .r-header { border-bottom: none; position: relative; }
.tpl-topbar-line .r-header::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
}
.tpl-topbar-line .r-name { color: var(--accent-ink); font-size: 26px; }
.tpl-topbar-line .r-section h2 {
  background: var(--accent);
  color: var(--accent-text);
  border-left: none;
  padding: 3px 12px;
  font-size: 13px;
}

/* ============================================================
 *  模板 8：表格（参考 5.jpg）
 * ============================================================ */
.tpl-table .r-banner {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  padding: 10px;
  border: 1px solid #d0d7de;
  border-bottom: none;
}
.tpl-table .r-header {
  border: 1px solid #d0d7de;
  border-bottom: none;
  margin: 0;
  padding: 12px;
  border-bottom-width: 1px;
}
.tpl-table .r-name { color: #111827; }
.tpl-table .r-section {
  display: grid;
  grid-template-columns: 110px 1fr;
  border: 1px solid #d0d7de;
  border-bottom: none;
  margin: 0;
}
.tpl-table .r-section:last-child { border-bottom: 1px solid #d0d7de; }
.tpl-table .r-section h2 {
  border: none;
  border-right: 1px solid #d0d7de;
  background: #f6f8fa;
  margin: 0;
  padding: 10px;
  font-size: 13px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tpl-table .r-section-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* 内容上下居中（自我评价等文本居中于单元格） */
}

/* ============================================================
 *  模板 9：蓝顶双栏（参考 6.jpg）
 * ============================================================ */
.tpl-two-col .r-banner {
  background: var(--accent);
  padding: 14px 16px;
  border-radius: 6px 6px 0 0;
  font-size: 20px;
  font-weight: 700;
}
.tpl-two-col .r-aside {
  flex: 0 0 30%;
  padding: 16px;
  border-right: 1px dashed var(--accent);
}
.tpl-two-col .r-aside .r-header {
  flex-direction: column;
  text-align: center;
  border-bottom: 2px solid var(--accent);
}
.tpl-two-col .r-aside .r-info { flex-direction: column; gap: 6px; }
.tpl-two-col .r-main { padding: 16px; }
.tpl-two-col .r-section h2 {
  color: var(--accent-ink);
  border-left: none;
  border-bottom: 2px solid var(--accent);
  padding: 0 0 4px;
  font-size: 14px;
}

/* ============================================================
 *  模板 10：灰条全宽（参考 7.jpg）
 * ============================================================ */
.tpl-graybar .r-banner {
  background: var(--accent);
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 600;
}
.tpl-graybar .r-header { border-bottom: none; }
.tpl-graybar .r-section h2 {
  background: var(--accent-weak);
  color: #111827;
  border-left: 6px solid var(--accent);
  padding: 3px 10px;
  font-size: 13.5px;
}

/* ============================================================
 *  模板 11：横幅胶囊（参考 8.jpg）
 * ============================================================ */
.tpl-banner-pill .r-header {
  background: var(--accent);
  border-radius: 6px;
  padding: 16px;
  border-bottom: none;
}
.tpl-banner-pill .r-header .r-name { color: var(--accent-text); }
.tpl-banner-pill .r-header .r-info { color: var(--accent-text); }
.tpl-banner-pill .r-header .r-info span b { color: var(--accent-text); }
.tpl-banner-pill .r-section h2 {
  background: var(--accent);
  color: var(--accent-text);
  border-left: none;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 13px;
}

/* ============================================================
 *  模板 12：居中（参考 9.jpg）
 * ============================================================ */
.tpl-centered .r-header {
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: none;
}
.tpl-centered .r-photo { width: 96px; height: 118px; }
.tpl-centered .r-name { font-size: 26px; }
.tpl-centered .r-info { justify-content: center; text-align: center; }
.tpl-centered .r-section h2 {
  color: var(--accent-ink);
  border-left: none;
  border-bottom: 2px solid var(--accent);
  padding: 0 0 4px;
  font-size: 14px;
}

/* ============================================================
 *  模板：分栏标签（参考 a0065ae22c61663ddd546bd013cbeb24.jpg）
 *  左侧浅色信息栏 + 右侧「标签」式标题；标签保留图标形状且随主题换色
 * ============================================================ */
.tpl-tag-split .r-aside {
  flex: 0 0 34%;
  background: #f4f5f7;
  padding: 22px 18px;
}
.tpl-tag-split .r-aside .r-header {
  flex-direction: column;
  text-align: center;
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}
.tpl-tag-split .r-aside .r-photo { width: 108px; height: 130px; border-radius: 4px; }
.tpl-tag-split .r-aside .r-name { font-size: 20px; color: #111827; margin-top: 10px; }
.tpl-tag-split .r-aside .r-info {
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
  text-align: left;
  color: #374151;
}
.tpl-tag-split .r-aside .r-info span b { color: #111827; }
.tpl-tag-split .r-aside .r-section { margin-top: 16px; }
.tpl-tag-split .r-aside .r-section h2 {
  font-size: 13.5px;
  color: #111827;
  border-left: 3px solid var(--accent);
  border-bottom: none;
  padding: 0 0 0 8px;
  font-weight: 700;
}
.tpl-tag-split .r-aside .r-item-body,
.tpl-tag-split .r-aside .r-item-sub { color: #374151; }
.tpl-tag-split .r-main { padding: 22px; }
.tpl-tag-split .r-main .r-section { margin-bottom: 16px; }
.tpl-tag-split .r-main .r-section h2 {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border-left: none;
  padding: 4px 22px 4px 13px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  border-radius: 2px 0 0 2px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

/* ---------- Print / PDF ---------- */
@media print {
  body { background: #fff; min-height: 0; }
  .topbar, .editor { display: none !important; }
  .main { display: block; padding: 0; }
  .preview-pane {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
    width: 100%;
    border: none;
  }
  .resume { max-width: none; width: 100%; }
  /* 打印/导出 PDF：顶部留 0.2cm，左右各 0.4cm，底部内容不足时自然留白 */
  @page { size: A4; margin: 2mm 4mm 0 4mm; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main { flex-direction: column; }
  .editor, .preview-pane { width: 100%; min-width: 0; flex: 1 1 auto; }
  .preview-pane { max-height: none; }
  .tpl-label { display: none; }
}

/* ---------- 密码门禁弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 16px;
  width: 360px; max-width: 92vw;
  padding: 24px 26px;
  box-shadow: 0 20px 60px rgba(31, 41, 55, .3);
}
.modal-title { font-size: 18px; font-weight: 700; color: var(--ui-text); margin-bottom: 8px; }
.modal-desc { font-size: 13.5px; color: var(--ui-muted); line-height: 1.6; margin-bottom: 16px; }
.modal-input {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; font-size: 15px; letter-spacing: 1px;
  border: 1px solid var(--ui-border-strong); border-radius: 10px; outline: none;
  color: var(--ui-text);
}
.modal-input:focus { border-color: var(--ui-primary); box-shadow: var(--ui-ring); }
.modal-msg { min-height: 18px; color: #e0413e; font-size: 12.5px; margin: 10px 0 4px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.modal-actions.center { justify-content: center; }
.modal-actions .primary,
.modal-actions .ghost {
  border: none; padding: 10px 18px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.modal-actions .primary { background: var(--ui-grad); color: #fff; box-shadow: 0 6px 16px rgba(109, 77, 246, .3); }
.modal-actions .primary:hover { transform: translateY(-1px); }
.modal-actions .ghost { background: #eef0f4; color: var(--ui-text); }
.modal-actions .ghost:hover { background: #e2e6ec; }

/* ---------- 开发者密码生成面板 ---------- */
.dev-panel {
  position: fixed; left: 12px; bottom: 12px;
  background: #1f2533; color: #e5e7eb; border-radius: 12px;
  padding: 14px 16px; font-size: 12.5px; width: 280px;
  z-index: 1100; box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.dev-panel[hidden] { display: none; }
.dev-panel .dev-title { font-weight: 700; margin-bottom: 8px; color: #fff; }
.dev-panel code { background: #11151f; padding: 2px 6px; border-radius: 4px; color: #6ee7b7; word-break: break-all; }
.dev-panel input[type=date] {
  background: #11151f; color: #e5e7eb; border: 1px solid #374151;
  border-radius: 6px; padding: 4px 6px; margin: 6px 0; color-scheme: dark;
}
.dev-panel button { background: var(--ui-primary); color: #fff; border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; }
.dev-panel .dev-hint { color: #9ca3af; margin-top: 8px; line-height: 1.4; }
