/* Shared layout primitives for the expanded template library. */
.resume-body {
  display: flex;
  flex: 1;
  align-items: stretch;
  min-height: 0;
}

.resume-side {
  flex: 0 0 60mm;
  width: 60mm;
  padding: 18mm 9mm 16mm;
  background: #f3f6f5;
  color: #1f2937;
}

.resume-main {
  flex: 1;
  min-width: 0;
  padding: 18mm 14mm 16mm;
}

.resume.layout-sidebar-left,
.resume.layout-sidebar-right,
.tpl-modern {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.layout-sidebar-right .resume-body {
  flex-direction: row-reverse;
}

.header-top-center .resume-body,
.header-top-split .resume-body,
.header-top-band .resume-body {
  min-height: 0;
}

.header-top-center > .resume-head,
.header-top-split > .resume-head,
.header-top-band > .resume-band {
  padding: 16mm 18mm 12mm;
}

.resume-band {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* 姓名块不允许被头像/联系方式挤到一字一行：CJK 文本的 min-content 只有单字宽，
   min-width:0 会让姓名被挤成竖排；fit-content 封顶在可用空间内，不会溢出页面 */
.identity {
  min-width: fit-content;
}

.head-left,
.head-right {
  align-items: center;
}

.head-left .identity,
.head-right .identity {
  flex: 1;
}

.head-left .avatar {
  margin-right: 6mm;
}

.head-right .avatar {
  margin-left: 6mm;
}

.head-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.head-center .contact {
  justify-content: center;
  max-width: 100%;
}

.head-center .avatar {
  margin-bottom: 4mm;
}

.head-main {
  margin-bottom: 2mm;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40mm;
  height: 40mm;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20pt;
  font-weight: 800;
  line-height: 1;
}

/* 真实头像图片：占位样式（尺寸/圆角）沿用 .avatar，仅替换内部表现 */
img.avatar {
  display: block;
  object-fit: cover;
  object-position: top;
}

/* 头像格位包装层（renderer 输出 <span class="avatar-cell"><img/></span>）：
   默认 display:contents 完全透明——img 仍是布局主体，既有模板零影响；
   格位式模板（tpl-doc-table / tpl-ruled-dossier / tpl-fold-dossier）把它
   升为真实盒子承载格位框线，内层 img 才能响应头像形状切换而不破坏表格外框 */
.avatar-cell {
  display: contents;
}

.side-head {
  margin-bottom: 8mm;
}

.side-head .avatar {
  margin-bottom: 6mm;
}

.side-head .resume-name {
  font-size: 24pt;
}

.side-head .resume-role {
  font-size: 10.5pt;
}

.side-head .contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
  margin-top: 6mm;
  font-size: 9.5pt;
}

/* 深色侧栏模板：联系方式别继承正文灰（#4b5563 贴深底看不清，面试官直接丢） */
.tpl-ditgar .side-head .contact,
.tpl-gengar .side-head .contact,
.tpl-caffeine .side-head .contact,
.tpl-ink-side .side-head .contact,
.tpl-noir-side .side-head .contact,
.resume[class*='tpl-c-'] .side-head .contact {
  color: inherit;
  opacity: 0.92;
}

.side-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
  font-size: 9.5pt;
  overflow-wrap: anywhere;
}

.side-heading {
  margin: 0 0 8px;
  font-size: 9pt;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.side-section {
  margin-top: 8mm;
}

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

.side-skill {
  padding: 3px 8px;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.62);
  font-size: 9pt;
}

.side-item {
  margin-bottom: 8px;
}

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

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

.side-item-meta {
  margin-top: 1px;
  font-size: 8.5pt;
  opacity: 0.82;
}

.side-item-date {
  margin-top: 1px;
  font-size: 8pt;
  opacity: 0.68;
}

.side-item-desc {
  margin-top: 4px;
  font-size: 8.5pt;
  line-height: 1.5;
  color: inherit;
  opacity: 0.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.side-item-desc .rich-list {
  margin: 2px 0;
  padding-left: 1.4em;
}

/* Original templates. */
.tpl-modern {
  display: block;
  min-height: 297mm;
}

.tpl-modern .resume-body {
  min-height: 0;
}

.tpl-modern .resume-side {
  flex: 0 0 64mm;
  width: 64mm;
  min-height: 0;
}

.tpl-modern .resume-main {
  flex: 1;
}

.tpl-modern .side-head .contact {
  color: rgba(255, 255, 255, 0.84);
}

.tpl-modern .side-head .resume-role {
  color: #8fe3cd;
}

.tpl-editorial-ink {
  padding: 17mm 18mm 16mm;
  color: #211d1a;
  font-family: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-size: 10pt;
  line-height: 1.62;
}

.tpl-editorial-ink .resume-head {
  align-items: flex-start;
  padding-bottom: 7mm;
  border-bottom: 1.5px solid #211d1a;
}

.tpl-editorial-ink .identity {
  flex: 1;
}

.tpl-editorial-ink .resume-name {
  font-size: 34pt;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tpl-editorial-ink .resume-role {
  margin-top: 9px;
  color: var(--accent, #9a3e2f);
  font-size: 9.5pt;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.tpl-editorial-ink .contact {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: end;
  align-content: start;
  gap: 4px 28px;
  max-width: 72%;
  color: #5c544d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  font-size: 8.5pt;
  text-align: left;
}

/* 长值不折行，列宽随内容外扩 */
.tpl-editorial-ink .contact .ci {
  white-space: nowrap;
}

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

.tpl-editorial-ink .section-heading {
  margin-bottom: 8px;
  padding-bottom: 4px;
  padding-left: 6px;
  border-bottom: 1px solid #d8cfc6;
  border-left: 3px solid var(--accent, #9a3e2f);
  color: var(--accent, #9a3e2f);
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.tpl-editorial-ink .summary {
  color: #3f3731;
  font-size: 10.8pt;
  line-height: 1.72;
}

.tpl-editorial-ink .item {
  margin-bottom: 10px;
  padding-top: 8px;
  border-top: 1px solid #ece5de;
}

.tpl-editorial-ink .section-heading + .item {
  padding-top: 0;
  border-top: 0;
}

.tpl-editorial-ink .item-title {
  font-size: 11pt;
}

.tpl-editorial-ink .item-date {
  color: #8b8178;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  font-size: 8pt;
  letter-spacing: 0.04em;
}

.tpl-editorial-ink .item-sub {
  color: var(--accent, #9a3e2f);
  font-size: 9pt;
  font-weight: 600;
}

.tpl-editorial-ink .item-desc {
  color: #4a423c;
  font-size: 9.4pt;
}

.tpl-editorial-ink .skill-list {
  gap: 0;
}

.tpl-editorial-ink .skill {
  padding: 0;
  border: 0;
  background: none;
  color: #211d1a;
  font-size: 9pt;
  font-weight: 400;
}

.tpl-editorial-ink .skill + .skill::before {
  content: " / ";
  color: #b9aea4;
}

.tpl-executive-sidebar .resume-side {
  flex-basis: 64mm;
  width: 64mm;
  background: var(--accent-deep, #14213d);
  color: #f8f4ec;
}

.tpl-executive-sidebar .side-head .avatar {
  /* 真实照片不带彩色描边圈（2026-11-01 用户拍板：更清爽正式）；底色仅作照片加载前兜底 */
  background: var(--accent, #b08d57);
}

.tpl-executive-sidebar .side-head .resume-name {
  color: #fff;
  font-family: "Optima", "Avenir Next", "PingFang SC", sans-serif;
  font-size: 25pt;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tpl-executive-sidebar .side-head .resume-role {
  color: var(--accent-ondark, #d8c08f);
  font-size: 9pt;
  letter-spacing: 0.14em;
}

.tpl-executive-sidebar .side-head .contact {
  color: rgba(248, 244, 236, 0.76);
}

.tpl-executive-sidebar .side-heading {
  color: var(--accent-ondark, #d8c08f);
  letter-spacing: 0.18em;
}

.tpl-executive-sidebar .side-skill {
  border-color: rgba(216, 192, 143, 0.45);
  background: transparent;
  color: #f8f4ec;
}

.tpl-executive-sidebar .side-item-title {
  color: #fff;
}

.tpl-executive-sidebar .side-item-meta,
.tpl-executive-sidebar .side-item-date {
  color: rgba(248, 244, 236, 0.72);
  opacity: 1;
}

.tpl-executive-sidebar .section-heading {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--accent-mist, #d9c9a8);
  color: var(--accent-deep, #14213d);
  letter-spacing: 0.08em;
}

.tpl-executive-sidebar .summary {
  color: #3f4655;
}

.tpl-executive-sidebar .item-title {
  color: var(--accent-deep, #14213d);
}

.tpl-executive-sidebar .item-sub {
  color: var(--accent-ink, #9b7a43);
  font-size: 9pt;
}

.tpl-executive-sidebar .skill {
  border-color: var(--accent-mist, #d9c9a8);
  background: #fbf8f2;
  color: var(--accent-ink, #6b542b);
}

.tpl-ats-plain {
  padding: 15mm 16mm 14mm;
  color: var(--accent-ink, #111827);
  font-family: Arial, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9.8pt;
  line-height: 1.55;
}

.tpl-ats-plain .resume-head {
  display: block;
  padding-bottom: 5mm;
  border-bottom: 1px solid var(--accent-ink, #111827);
}

.tpl-ats-plain .resume-name {
  font-size: 23pt;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.tpl-ats-plain .resume-role {
  margin-top: 3px;
  color: #374151;
  font-size: 10pt;
  font-weight: 600;
}

.tpl-ats-plain .contact {
  justify-content: flex-start;
  max-width: 100%;
  margin-top: 6px;
  gap: 2px 12px;
  color: #374151;
  font-size: 8.5pt;
}

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

.tpl-ats-plain .section-heading {
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid #d1d5db;
  color: var(--accent-ink, #111827);
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.tpl-ats-plain .item-title {
  font-size: 10pt;
}

.tpl-ats-plain .item-date {
  color: #4b5563;
  font-size: 8.5pt;
}

.tpl-ats-plain .item-sub {
  color: #374151;
  font-size: 9pt;
  font-weight: 600;
}

.tpl-ats-plain .item-desc {
  margin-top: 3px;
  color: #1f2937;
  font-size: 9.2pt;
}

.tpl-ats-plain .summary {
  color: #1f2937;
  font-size: 9.5pt;
}

.tpl-ats-plain .skill-list {
  gap: 0 10px;
}

.tpl-ats-plain .skill {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--accent-ink, #111827);
  font-size: 9pt;
  font-weight: 400;
}

.tpl-ats-plain .skill + .skill::before {
  content: "·";
  margin-right: 6px;
  color: #9ca3af;
}

/* Reactive Resume inspired layouts. */
.tpl-azurill .resume-side {
  flex-basis: 60mm;
  width: 60mm;
  background: var(--accent-soft, #e8f7f1);
  color: var(--accent-ink, #245c50);
}

.tpl-azurill .side-heading,
.tpl-azurill .section-heading,
.tpl-azurill .item-sub {
  color: var(--accent, #2f9e83);
}

.tpl-azurill .side-skill {
  border-color: var(--accent-mist, #b9e6da);
  background: #fff;
  color: var(--accent-ink, #245c50);
}

.tpl-azurill > .resume-head {
  padding-bottom: 6mm;
  border-bottom: 2px solid var(--accent, #2f9e83);
}

.tpl-azurill .section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpl-azurill .section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--accent-pale, #d9eee7);
}

.tpl-bronzor .resume-head {
  flex-direction: column;
  align-items: center;
  padding-bottom: 6mm;
  border-bottom: 2px solid var(--accent, #2f6f8f);
  text-align: center;
}

.tpl-bronzor .avatar {
  margin-bottom: 4mm;
  background: var(--accent, #2f6f8f);
}

.tpl-bronzor .contact {
  justify-content: center;
  max-width: 100%;
}

.tpl-bronzor .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-mist, #cfdfe7);
  color: var(--accent, #2f6f8f);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.tpl-bronzor .item-sub {
  color: var(--accent, #2f6f8f);
}

.tpl-chikorita .resume-side {
  flex-basis: 58mm;
  width: 58mm;
  background: var(--accent-deep, #6b2d3c);
  color: #fff;
}

.tpl-chikorita .side-heading {
  color: var(--accent-pale, #f2c7d2);
}

.tpl-chikorita .side-skill {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tpl-chikorita > .resume-head {
  /* 左内边距直接给到 6mm：头像贴近页边，分隔线保持通栏且不出页 */
  padding: 14mm 10mm 6mm 6mm;
  border-bottom: 2px solid var(--accent, #8e3b52);
  align-items: flex-start;
}

/* 联系区双列网格：整体靠右、列内左对齐，标签/图标两种模式统一；
   姓名/头像固定顶部，条目增多时联系区向下生长。
   字号与列距收紧，保证 A4 宽度下「头像+姓名+双列联系区」不溢出 */
.tpl-chikorita .contact {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: end;
  align-content: start;
  gap: 7px 26px;
  max-width: none;
  font-size: 8.8pt;
  text-align: left;
  /* 空间紧张时联系区不参与压缩（避免网格溢出压到侧栏），
     由可换行的姓名/职位区让位 */
  flex-shrink: 0;
}

/* 正文主栏与头像左缘对齐（6mm），并适当让出右侧空间给版心 */
.tpl-chikorita .resume-main {
  padding-left: 6mm;
  padding-right: 10mm;
}

.tpl-chikorita .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-mist, #ead2d8);
  color: var(--accent, #8e3b52);
}

.tpl-chikorita .item-sub {
  color: var(--accent, #8e3b52);
}

.tpl-ditgar .resume-side {
  flex-basis: 62mm;
  width: 62mm;
  background: var(--accent-deep, #4b2a6f);
  color: #fff;
}

.tpl-ditgar .side-heading {
  color: var(--accent-pale, #d8c2f0);
}

.tpl-ditgar .side-head .resume-role {
  color: var(--accent-pale, #d8c2f0);
}

.tpl-ditgar .side-skill {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tpl-ditgar .section-heading {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent, #7c4db3);
  color: var(--accent, #7c4db3);
}

.tpl-ditgar .item {
  padding-left: 10px;
  border-left: 2px solid var(--accent-pale, #e6dcf5);
}

.tpl-ditgar .item-sub {
  color: var(--accent, #7c4db3);
}

.tpl-ditto .resume-band {
  background: var(--accent-deep, #6b4a3a);
  color: #fff;
  /* 头像/姓名/联系网格三者顶线平齐，头带高度随信息行数向下生长；
     原先垂直居中会让姓名与头像悬在带子中部，信息行数一多就上下悬空 */
  align-items: flex-start;
}

.tpl-ditto .resume-band .resume-role {
  color: var(--accent-pale, #f0d8c8);
}

.tpl-ditto .resume-band .contact {
  /* 基础 .contact 是 flex-wrap + flex-end：从右往左填，字段宽度不同导致
     每行左缘参差、行中段留大洞。改 2 列网格：列内左对齐、整块贴右，
     列宽取该列最宽项，任意字段组合（含自定义字段）都自动对齐 */
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: end;
  align-content: center;
  gap: 6px 24px;
  max-width: none;
  margin-left: auto; /* 吸收头带剩余空间，整块贴右缘；空间不足时自动归零防溢出 */
  color: rgba(255, 255, 255, 0.85);
}

.tpl-ditto .resume-band .avatar-cell {
  /* 头像槽位与下方侧栏列（--side-w: 60mm）完全重合：负外边距抵消头带左内边距，
     槽内水平居中——圆形/竖长/方形等任何头像形状的中线都自动落在侧栏中线上 */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: 0 0 60mm;
  width: 60mm;
  margin-left: -18mm; /* 头带左内边距 18mm */
}

.tpl-ditto .resume-band .avatar {
  background: var(--accent, #8a5a44);
}

.tpl-ditto .resume-side {
  flex-basis: 60mm;
  width: 60mm;
  background: var(--accent-soft, #f3ebe4);
  color: var(--accent-ink, #5b3b2c);
}

.tpl-ditto .side-heading,
.tpl-ditto .section-heading,
.tpl-ditto .item-sub {
  color: var(--accent, #8a5a44);
}

.tpl-ditto .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-mist, #e4d3c6);
}

.tpl-gengar .resume-side {
  flex-basis: 60mm;
  width: 60mm;
  background: var(--accent-deep, #5b2140);
  color: #fff;
}

.tpl-gengar .side-heading {
  color: var(--accent-ondark, #f2a7c4);
}

.tpl-gengar .side-skill {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tpl-gengar .section-heading {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent, #a83b6a);
  color: var(--accent, #a83b6a);
}

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

.tpl-glalie .resume-side {
  flex-basis: 58mm;
  width: 58mm;
  background: var(--accent-soft, #dff2e8);
  color: var(--accent-ink, #1f4d3f);
}

.tpl-glalie .side-heading,
.tpl-glalie .item-sub {
  color: var(--accent, #2f9e83);
}

.tpl-glalie .side-skill {
  border-color: var(--accent-mist, #b9e6da);
  background: #fff;
  color: var(--accent-ink, #1f4d3f);
}

.tpl-glalie .section-heading {
  padding-left: 8px;
  border-left: 3px solid var(--accent, #2f9e83);
  color: var(--accent-ink, #1f4d3f);
}

.tpl-kakuna .resume-head {
  flex-direction: column;
  align-items: center;
  padding-bottom: 6mm;
  border-bottom: 2px solid var(--accent, #8a5a44);
  text-align: center;
}

.tpl-kakuna .avatar {
  margin-bottom: 4mm;
  background: var(--accent, #8a5a44);
}

.tpl-kakuna .contact {
  justify-content: center;
  max-width: 100%;
}

.tpl-kakuna .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-mist, #ead9ce);
  color: var(--accent, #8a5a44);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tpl-kakuna .item-sub {
  color: var(--accent, #8a5a44);
}

.tpl-lapras {
  background: #f7fbfd;
}

.tpl-lapras .resume-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tpl-lapras .avatar {
  margin-bottom: 4mm;
  background: var(--accent, #2f6f8f);
}

.tpl-lapras .contact {
  justify-content: center;
  max-width: 100%;
}

.tpl-lapras .resume-section {
  margin-top: 12px;
  padding: 7px 12px;
  border: 1px solid var(--accent-soft, #d7e7ef);
  border-radius: 0;
  background: #fff;
}

.tpl-lapras .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-soft, #d7e7ef);
  color: var(--accent, #2f6f8f);
}

.tpl-lapras .item-sub {
  color: var(--accent, #2f6f8f);
}

.tpl-leafish .resume-band {
  background: var(--accent-soft, #dff1f7);
  color: #1f3d4a;
}

.tpl-leafish .resume-band .resume-role {
  color: var(--accent, #3b7f9e);
}

.tpl-leafish .resume-band .contact {
  color: var(--accent-ink, #28566a);
}

.tpl-leafish .resume-side {
  flex-basis: 58mm;
  width: 58mm;
  background: var(--accent-soft, #e8f4f8);
  color: var(--accent-ink, #28566a);
}

.tpl-leafish .side-heading,
.tpl-leafish .section-heading,
.tpl-leafish .item-sub {
  color: var(--accent, #3b7f9e);
}

.tpl-leafish .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-mist, #cfe4ec);
}

.tpl-pikachu .resume-side {
  flex-basis: 58mm;
  width: 58mm;
  background: var(--accent-soft, #fbe8ef);
  color: var(--accent-ink, #7a2f4a);
}

.tpl-pikachu .side-heading,
.tpl-pikachu .section-heading,
.tpl-pikachu .item-sub {
  color: var(--accent, #d94f7a);
}

.tpl-pikachu .side-skill {
  border-color: var(--accent-mist, #f3c4d4);
  background: #fff;
  color: var(--accent-ink, #7a2f4a);
}

.tpl-pikachu .head-main {
  margin: -18mm -14mm 0;
  padding: 16mm 14mm 8mm;
  background: var(--accent-soft, #f7c9d8);
}

.tpl-onyx .resume-head {
  align-items: center;
  padding-bottom: 6mm;
  border-bottom: 3px solid var(--accent, #111827);
}

.tpl-onyx .avatar {
  width: 28mm;
  height: 40mm;
  border-radius: 0;
  background: var(--accent, #111827);
}

.tpl-onyx .resume-name {
  font-size: 26pt;
  text-transform: uppercase;
}

.tpl-onyx .section-heading {
  padding: 4px 8px;
  background: #f3f4f6;
  color: var(--accent, #111827);
}

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

.tpl-persian .resume-head {
  flex-direction: column;
  align-items: center;
  padding-bottom: 8mm;
  border-bottom: 1px solid var(--accent, #111827);
  text-align: center;
}

.tpl-persian .resume-name {
  font-size: 34pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tpl-persian .resume-role {
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.tpl-persian .contact {
  justify-content: center;
  max-width: 100%;
}

.tpl-persian .section-heading {
  padding: 4px 0;
  border-top: 1px solid var(--accent, #111827);
  border-bottom: 1px solid var(--accent, #111827);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.tpl-porygon .resume-head {
  padding-bottom: 6mm;
  border-bottom: 2px solid var(--accent, #2f6f8f);
}

.tpl-porygon .section-heading {
  padding: 5px 8px;
  background: #eef5f8;
  color: var(--accent, #2f6f8f);
}

.tpl-porygon .item {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-soft, #dbe7ec);
}

.tpl-porygon .item-sub {
  color: var(--accent, #2f6f8f);
}

.tpl-rhyhorn .resume-head {
  align-items: center;
  padding-bottom: 6mm;
  border-bottom: 3px solid var(--accent, #111827);
  /* 头部整框比正文更宽（两种图标模式都生效）：负外边距抵掉大半内边距，
     有效侧边距 ~5mm——横向空间拉满，联系信息单行放得下不折行 */
  margin-left: -13mm;
  margin-right: -13mm;
}

/* 标签模式（icons=off）联系区转两列网格后头部变高：
   证件照与姓名一同钉在顶部，头带向下生长，不再垂直居中悬空；
   头像格禁止 flex 压缩——空间不足时由联系网格折行消化，照片永不溢出框外。
   （左右外扩统一由 .tpl-rhyhorn .resume-head 的 ±13mm 负责，这里不再叠加） */
.tpl-rhyhorn.icons-off .avatar,
.tpl-rhyhorn.icons-off .avatar-cell {
  align-self: flex-start;
}

.tpl-rhyhorn.icons-off .avatar-cell {
  flex-shrink: 0;
}

/* 标签模式联系网格撑满姓名与头像之间的中段：
   两列均分宽度、列内左对齐——消除收缩布局留下的
   「姓名侧大留白 / 列间断层」，顶部整体左右铺满、间距均匀。
   identity 需收回 head-right 默认的 flex:1（basis 0 会把空闲空间
   全部吃掉、网格被推到最右），改回内容宽，让 contact 来填充。
   minmax(0,1fr) + 允许折行：真实 A4 宽度下空间不足时长值格内折行，
   而不是把头像挤出页面（宁折行不裁头像） */
.tpl-rhyhorn.icons-off .identity {
  flex: 0 1 auto;
}

.tpl-rhyhorn.icons-off .resume-head {
  gap: 16px; /* 收紧姓名/联系区/头像三段间距，给两列联系网格腾出单行宽度 */
}

.tpl-rhyhorn.icons-off .contact {
  flex: 1;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, auto));
  /* space-between：两列均匀铺满中段（左列贴姓名、右列贴证件照侧），
     空间不足时列收缩、长值折行，头像永不被挤出去 */
  justify-content: space-between;
  gap: 7px 16px;
  margin-left: 3mm;
  margin-right: 3mm;
  max-width: none;
}

.tpl-rhyhorn.icons-off .contact .ci {
  white-space: normal;
  overflow-wrap: anywhere;
}

.tpl-rhyhorn .avatar {
  width: 28mm;
  height: 40mm;
  border-radius: 4px;
  background: var(--accent, #111827);
}

.tpl-rhyhorn .resume-name {
  font-size: 26pt;
  text-transform: uppercase;
}

.tpl-rhyhorn .section-heading {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent, #111827);
  text-transform: uppercase;
}

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

.tpl-scizor .resume-head {
  align-items: center;
  padding-bottom: 6mm;
  border-bottom: 3px solid var(--accent, #8b1e1e);
}

.tpl-scizor .avatar {
  width: 28mm;
  height: 40mm;
  border-radius: 4px;
  background: var(--accent, #8b1e1e);
}

.tpl-scizor .resume-name {
  text-transform: uppercase;
}

.tpl-scizor .section-heading {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent, #8b1e1e);
  color: var(--accent, #8b1e1e);
}

.tpl-scizor .item-sub {
  color: var(--accent, #8b1e1e);
}

.tpl-smeargle {
  padding: 20mm 20mm 18mm;
}

.tpl-smeargle .resume-head {
  align-items: flex-start;
  padding-bottom: 8mm;
  border-bottom: 1px solid #e5e7eb;
  /* 头部整框比正文更宽：负外边距抵掉大半内边距（有效侧边距 ~5mm），
     大字姓名 + 联系网格 + 证件照横向拉满，长邮箱/主页不再折行 */
  margin-left: -13mm;
  margin-right: -13mm;
}

.tpl-smeargle .resume-name {
  font-size: 30pt;
  letter-spacing: -0.04em;
}

.tpl-smeargle .avatar {
  width: 24mm;
  height: 34mm;
  border-radius: 2px;
  background: #f3f4f6;
  color: var(--accent, #111827);
}

/* 标签模式（icons=off）：大字号姓名吃掉大量宽度，联系网格若坚持 nowrap
   会把固定尺寸的头像挤出页边。网格列允许收缩（minmax(0,auto)），
   长值（邮箱/主页）在格内换行——宁折行不裁头像。
   identity 收回 head-right 默认 flex:1：basis 0 会把空闲空间全部吃掉、
   联系网格被压到内容宽以下导致折行——改回内容宽，空间优先给信息 */
.tpl-smeargle.icons-off .identity {
  flex: 0 1 auto;
}

.tpl-smeargle.icons-off .contact {
  grid-template-columns: repeat(2, minmax(0, auto));
  min-width: 0;
  gap: 7px 28px;
}

.tpl-smeargle.icons-off .contact .ci {
  white-space: normal;
  overflow-wrap: anywhere;
}

.tpl-smeargle .section-heading {
  color: #6b7280;
  font-size: 8.5pt;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

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

/* JSON Resume inspired layouts. */
.tpl-stackoverflow {
  font-size: 9.5pt;
}

.tpl-stackoverflow .resume-head {
  align-items: center;
  padding-bottom: 6mm;
  border-bottom: 3px solid var(--accent, #f48024);
}

.tpl-stackoverflow .resume-name {
  font-size: 26pt;
}

.tpl-stackoverflow .resume-role {
  color: var(--accent, #111827);
  font-size: 10pt;
}

.tpl-stackoverflow .section-heading {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent, #f48024);
  color: var(--accent, #111827);
  text-transform: uppercase;
}

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

.tpl-even .resume-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tpl-even .contact {
  justify-content: center;
  max-width: 100%;
}

.tpl-even .resume-name {
  font-size: 30pt;
  font-weight: 600;
}

.tpl-even .resume-role {
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.tpl-even .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-soft, #cde8d8);
  color: var(--accent, #2f855a);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.tpl-even .item-sub {
  color: var(--accent, #2f855a);
}

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

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

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

.tpl-onepage .section-heading {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--accent-soft, #dbeafe);
  color: var(--accent, #2563eb);
  font-size: 9.5pt;
}

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

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

.tpl-actual {
  padding: 20mm;
}

.tpl-actual .resume-head {
  align-items: flex-start;
  padding-bottom: 8mm;
  border-bottom: 2px solid var(--accent, #111827);
}

/* 标签模式（icons=off）：identity 收回 head-left 默认 flex:1——
   basis 0 会抢占空闲空间、挤压联系网格致其折行；改回内容宽 */
.tpl-actual.icons-off .identity {
  flex: 0 1 auto;
}

.tpl-actual .resume-name {
  font-size: 36pt;
  font-weight: 800;
  letter-spacing: -0.05em;
}

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

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

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

.tpl-caffeine .resume-side {
  flex-basis: 60mm;
  width: 60mm;
  background: var(--accent-deep, #3b2f2a);
  color: #fff;
}

.tpl-caffeine .side-heading {
  color: var(--accent-ondark, #e0b77e);
}

.tpl-caffeine .side-head .resume-role {
  color: var(--accent-ondark, #e0b77e);
}

.tpl-caffeine .side-skill {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tpl-caffeine .section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent-mist, #eadcc8);
  color: var(--accent, #b07a3a);
}

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

/* ── 原创模板：时序（垂直时间线节点） ─────────────────── */
.tpl-timeline {
  padding: 16mm 16mm 14mm;
}

.tpl-timeline .section-heading {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
}

.tpl-timeline .item {
  position: relative;
  margin-bottom: 6mm;
  padding-left: 8mm;
  border-left: 1px solid #dfe5f0;
}

.tpl-timeline .item::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -3.5px;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 0 2px #fff;
}

.tpl-timeline .skill {
  border-color: #dfe5f0;
  background: #fff;
  color: #374151;
}

/* ── 原创模板：徽章（日期徽章 + 方形标签） ─────────────── */
.tpl-badge {
  padding: 16mm 16mm 14mm;
}

.tpl-badge .resume-head {
  padding-bottom: 5mm;
  border-bottom: 3px solid var(--accent);
}

.tpl-badge .resume-name {
  font-size: 17pt;
}

.tpl-badge .section-heading {
  padding-left: 7px;
  border-left: 4px solid var(--accent);
}

.tpl-badge .item-top {
  align-items: center;
}

.tpl-badge .item-date {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 8.5pt;
  font-weight: 600;
}

.tpl-badge .skill {
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  color: #1f2937;
}

/* ── 原创模板：竖签名（深色侧栏 + 竖排姓名） ───────────── */
.tpl-vertical-ink .resume-side {
  flex-basis: 62mm;
  width: 62mm;
  background: var(--accent-deep, #1c1b22);
  color: #f2efe8;
}

.tpl-vertical-ink .side-head .identity {
  display: flex;
  align-items: flex-start;
  gap: 5mm;
}

.tpl-vertical-ink .side-head .resume-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  max-height: 64mm;
  color: #fff;
  font-size: 21pt;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
}

.tpl-vertical-ink .side-head .resume-role {
  margin-top: 0;
  color: var(--accent, #c9a227);
}

.tpl-vertical-ink .side-head .contact {
  color: rgba(255, 255, 255, 0.78);
}

.tpl-vertical-ink .side-heading {
  color: var(--accent, #c9a227);
}

.tpl-vertical-ink .side-skill {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

.tpl-vertical-ink .section-heading {
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent, #c9a227);
  color: var(--accent-deep, #1c1b22);
}

.tpl-vertical-ink .item-sub {
  color: var(--accent-ink, #a98b1f);
}

/* ── 模板库弹层 ─────────────────────────────────────────── */
body.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 33, 31, 0.44);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1200px, 100%);
  max-height: min(90vh, 920px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(22, 33, 31, 0.32);
}

.modal-head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 20px;
}

.modal-sub {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 12.5px;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1;
}

.modal-close:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.modal-filters {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.filter-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 28px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1;
  font-weight: 500;
}

.filter-btn em {
  margin-left: 5px;
  font-style: normal;
  opacity: 0.55;
  font-weight: 500;
}

.filter-btn.active em {
  opacity: 0.72;
}

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

.filter-btn.active {
  border-color: var(--accent-ink);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.template-grid {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 20px 16px;
  padding: 18px 24px 26px;
  overflow-y: auto;
}

.template-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.template-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 26px rgba(25, 28, 29, 0.12);
  transform: translateY(-2px);
}

.template-card.active {
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 2px rgba(23, 86, 74, 0.18);
}

/* 使用中的模板：左上角小标，不需要 hover 就能认出来 */
.template-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.template-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 794 / 1123;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.template-thumb .sheet {
  box-shadow: none;
}

.template-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px 12px 12px;
}

.template-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.template-card-title strong {
  font-size: 13px;
  font-weight: 600;
}

.template-card-title span {
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}

.template-card-body p {
  flex: 1;
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.modal-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
}

.modal-foot a:not(.btn) {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: 94vh;
  }

  .modal-head,
  .modal-filters,
  .template-grid,
  .modal-foot {
    padding-right: 14px;
    padding-left: 14px;
  }

  .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px 10px;
  }

  .modal-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

/* ── 墨蓝系（原创家族）：藏蓝头带 / 黛蓝侧栏 / 素笺卡片 ──
   家族签名：墨蓝标题 + 尾随细线；方角头像；克制无装饰。
   结构思路参考市面常见简历版式，视觉表达全部原创。 */

.tpl-ink-band .avatar,
.tpl-ink-side .avatar,
.tpl-ink-card .avatar {
  border-radius: 2mm;
}

.tpl-ink-band {
  padding: 0 0 14mm;
  color: #232a33;
}

.tpl-ink-band .resume-band {
  align-items: center;
  gap: 20px;
  padding: 11mm 18mm 10mm;
  background: var(--accent-deep, #1d3550);
  color: #fff;
}

.tpl-ink-band .resume-band .identity {
  order: 1;
  flex: 1;
}

.tpl-ink-band .resume-band .contact {
  order: 2;
  /* 双列网格：10 个字段单列把头带撑得很高、下半截空荡——双排高度减半，
     与姓名/头像体量均衡；列内左对齐，长值格内折行（minmax(0,auto)）不挤头像 */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  justify-content: start;
  align-content: center;
  gap: 4px 28px;
  min-width: 0;
  max-width: none;
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 8.5pt;
}

.tpl-ink-band .resume-band .contact .ci {
  white-space: normal;
  overflow-wrap: anywhere;
}

.tpl-ink-band .resume-band .avatar {
  order: 3;
  width: 20mm;
  height: 28mm;
  background: var(--accent, #2e5984);
}

.tpl-ink-band .resume-name {
  color: #fff;
  font-size: 26pt;
  letter-spacing: 0.02em;
}

.tpl-ink-band .resume-role {
  margin-top: 8px;
  color: var(--accent-ondark, #9fc3e8);
  font-size: 10.5pt;
  letter-spacing: 0.06em;
}

.tpl-ink-band .resume-section {
  margin-right: 18mm;
  margin-left: 18mm;
}

.tpl-ink-band .section-heading,
.tpl-ink-side .section-heading,
.tpl-ink-card .section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tpl-ink-band .section-heading::after,
.tpl-ink-side .section-heading::after,
.tpl-ink-card .section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2ded4;
}

.tpl-ink-band .section-heading {
  color: var(--accent, #23405e);
}

.tpl-ink-band .item-sub {
  color: var(--accent, #2e5984);
}

.tpl-ink-band .skill {
  border-color: var(--accent-mist, #c9d8e8);
  border-radius: 4px;
  background: #eef3f9;
  color: var(--accent, #23405e);
}

.tpl-ink-side .resume-side {
  flex-basis: 60mm;
  width: 60mm;
  padding: 16mm 8mm 14mm;
  background: var(--accent-deep, #1b2f4a);
  color: #fff;
}

.tpl-ink-side .side-head .resume-name {
  color: #fff;
  font-size: 22pt;
}

.tpl-ink-side .side-head .resume-role {
  color: var(--accent-ondark, #9fc3e8);
  font-size: 10pt;
}

.tpl-ink-side .avatar {
  width: 23mm;
  height: 32mm;
  background: var(--accent, #2e5984);
}

.tpl-ink-side .side-head .contact {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  max-width: none;
  color: rgba(255, 255, 255, 0.84);
}

.tpl-ink-side .side-heading {
  color: var(--accent-ondark, #9fc3e8);
  letter-spacing: 0.12em;
}

.tpl-ink-side .side-skill {
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-pale, #e8f0fa);
}

.tpl-ink-side .side-item-date {
  color: rgba(255, 255, 255, 0.66);
}

.tpl-ink-side .section-heading {
  color: var(--accent-deep, #1b2f4a);
}

.tpl-ink-side .item-sub {
  color: var(--accent, #2e5984);
}

.tpl-ink-card {
  background: #fbfaf7;
}

.tpl-ink-card .resume-head {
  gap: 18px;
  padding: 12px 16px;
  border-radius: 0;
  background: #f1eee6;
}

/* 标签模式（icons=off）：头部卡片比正文更宽（±13mm，与证件右图同思路）——
   中段联系网格获得充足宽度单行均匀放入，头像不再被 flex 压缩挤出卡片 */
.tpl-ink-card.icons-off .resume-head {
  margin-left: -13mm;
  margin-right: -13mm;
}

.tpl-ink-card.icons-off .contact {
  flex: 1;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, auto));
  /* space-between：左列贴姓名、右列贴证件照侧，均匀铺满中段 */
  justify-content: space-between;
  gap: 7px 24px;
  margin-left: 3mm;
  margin-right: 3mm;
}

/* 卡片内证件照不允许被压缩（img 是 flex 项：avatar-cell 为 display:contents） */
.tpl-ink-card.icons-off .avatar {
  flex-shrink: 0;
}

.tpl-ink-card .resume-name {
  color: #232a33;
  font-size: 24pt;
}

.tpl-ink-card .resume-role {
  color: var(--accent, #3a5a83);
}

.tpl-ink-card .avatar {
  width: 23mm;
  height: 32mm;
  background: var(--accent, #3a5a83);
}

.tpl-ink-card .resume-section {
  padding: 12px 14px 13px;
  border-radius: 0;
  background: #f4f2ec;
}

.tpl-ink-card .section-heading {
  margin-bottom: 8px;
  color: var(--accent, #3a5a83);
}

.tpl-ink-card .section-heading::after {
  background: #ddd8cc;
}

.tpl-ink-card .item {
  margin-bottom: 10px;
}

.tpl-ink-card .item-sub {
  color: var(--accent, #3a5a83);
}

.tpl-ink-card .skill {
  border-color: #d8d5cc;
  border-radius: 4px;
  background: #fff;
  color: var(--accent, #3a5a83);
}

/* ── 玄金系（原创家族）：玄金头版 / 鎏金侧栏 / 玄墨巨字 / 疏朗蓝灰 ──
   大气路线：近黑底 + 香槟金、巨字姓名大字距、宽松行距充足留白。 */

.tpl-noir-gold {
  padding: 0 0 14mm;
  color: #232a33;
}

.tpl-noir-gold .resume-band {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 26px;
  padding: 13mm 18mm 11mm;
  background: var(--accent-deep, #14202e);
  color: #fff;
}

.tpl-noir-gold .resume-band .identity {
  order: 1;
  flex: 1;
}

.tpl-noir-gold .resume-band .avatar {
  order: 2;
  width: 23mm;
  height: 32mm;
  border-radius: 2mm;
  background: #1d2f40;
}

.tpl-noir-gold .resume-band .contact {
  order: 3;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 5px 20px;
  width: 100%;
  max-width: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(200, 169, 106, 0.35);
  color: rgba(255, 255, 255, 0.78);
}

.tpl-noir-gold .resume-name {
  color: #fff;
  font-size: 30pt;
  letter-spacing: 0.05em;
}

.tpl-noir-gold .resume-role {
  margin-top: 10px;
  color: var(--accent, #c8a96a);
  font-size: 10.5pt;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.tpl-noir-gold .resume-section {
  margin-right: 18mm;
  margin-left: 18mm;
}

.tpl-noir-gold .section-heading {
  color: var(--accent-deep, #14202e);
  letter-spacing: 0.14em;
}

.tpl-noir-gold .section-heading::after {
  background: var(--accent-pale, #ddd5c4);
}

.tpl-noir-gold .item-sub {
  color: var(--accent-ink, #a9853f);
}

.tpl-noir-gold .skill {
  border-color: rgba(169, 133, 63, 0.45);
  border-radius: 3px;
  background: transparent;
  color: var(--accent-ink, #8a6d33);
}

.tpl-noir-side .resume-side {
  flex-basis: 62mm;
  width: 62mm;
  padding: 16mm 8mm 14mm;
  background: var(--accent-deep, #16211f);
  color: #fff;
}

.tpl-noir-side .side-head .resume-name {
  color: #fff;
  font-size: 24pt;
  letter-spacing: 0.06em;
}

.tpl-noir-side .side-head .resume-role {
  color: var(--accent-ondark, #c8a96a);
  font-size: 10pt;
  letter-spacing: 0.1em;
}

.tpl-noir-side .avatar {
  width: 22mm;
  height: 30mm;
  border-radius: 2mm;
  background: #233230;
}

.tpl-noir-side .side-head .contact {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  max-width: none;
  color: rgba(255, 255, 255, 0.8);
}

.tpl-noir-side .side-heading {
  color: var(--accent-ondark, #c8a96a);
  letter-spacing: 0.14em;
}

.tpl-noir-side .side-skill {
  border-color: rgba(200, 169, 106, 0.4);
  border-radius: 3px;
  background: rgba(200, 169, 106, 0.12);
  color: var(--accent-pale, #ead9b0);
}

.tpl-noir-side .side-item-date {
  color: rgba(255, 255, 255, 0.62);
}

.tpl-noir-side .section-heading {
  color: var(--accent-deep, #16211f);
  letter-spacing: 0.14em;
}

.tpl-noir-side .section-heading::after {
  background: var(--accent-mist, #d8c79b);
}

.tpl-noir-side .item-sub {
  color: var(--accent, #a9853f);
}

.tpl-noir-name {
  padding: 20mm 20mm 18mm;
}

.tpl-noir-name .resume-head {
  padding-bottom: 9mm;
  border-bottom: 2px solid var(--accent, #16211f);
}

.tpl-noir-name .resume-name {
  color: var(--accent, #16211f);
  font-size: 34pt;
  letter-spacing: 0.22em;
  margin-right: -0.22em;
}

.tpl-noir-name .resume-role {
  margin-top: 12px;
  color: #8a8578;
  font-size: 10pt;
  font-weight: 600;
  letter-spacing: 0.42em;
  margin-right: -0.42em;
}

.tpl-noir-name .contact {
  justify-content: center;
  gap: 5px 22px;
  max-width: 100%;
  margin-top: 12px;
  color: #4b5254;
}

.tpl-noir-name .section-heading {
  justify-content: center;
  gap: 14px;
  color: var(--accent, #16211f);
  letter-spacing: 0.24em;
}

.tpl-noir-name .section-heading::before {
  content: '';
  flex: 1;
  height: 1px;
  background: #d9d4c8;
}

.tpl-noir-name .section-heading::after {
  background: #d9d4c8;
}

.tpl-noir-name .item-sub {
  color: var(--accent, #16211f);
}

.tpl-noir-name .skill {
  border-color: #cfcbc0;
  border-radius: 3px;
  background: #faf9f6;
  color: var(--accent, #16211f);
}

.tpl-air-blue {
  padding: 20mm 20mm 18mm;
  color: #232a33;
}

.tpl-air-blue .resume-head {
  gap: 26px;
  padding-bottom: 12mm;
  border-bottom: 1px solid #d9d5cb;
}

.tpl-air-blue .avatar {
  width: 25mm;
  height: 34mm;
  border-radius: 2mm;
  background: var(--accent, #46617a);
}

.tpl-air-blue .resume-name {
  color: #1d2733;
  font-size: 30pt;
  letter-spacing: 0.06em;
}

.tpl-air-blue .resume-role {
  margin-top: 10px;
  color: var(--accent, #46617a);
  font-size: 11pt;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.tpl-air-blue .contact {
  color: #5c6670;
  font-size: 9pt;
}

/* 标签模式：头部比正文更宽（±13mm，与证件右图同思路）——
   两列联系信息 space-between 均匀铺满，不挤压换行、不顶出纸张右缘 */
.tpl-air-blue.icons-off .resume-head {
  margin-left: -13mm;
  margin-right: -13mm;
}

.tpl-air-blue.icons-off .contact {
  flex: 1;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, auto));
  /* space-between：左列贴姓名、右列贴证件照侧，均匀铺满中段 */
  justify-content: space-between;
  gap: 7px 24px;
  margin-left: 3mm;
  margin-right: 3mm;
}

/* 证件照不允许被 flex 压缩 */
.tpl-air-blue.icons-off .avatar {
  flex-shrink: 0;
}

.tpl-air-blue .resume-section {
  margin-top: 26px;
}

.tpl-air-blue .section-heading {
  color: #1d2733;
  letter-spacing: 0.18em;
}

.tpl-air-blue .item {
  margin-bottom: 17px;
}

.tpl-air-blue .item-sub {
  color: var(--accent, #46617a);
}

.tpl-air-blue .skill {
  border-color: var(--accent-mist, #ccd4dc);
  border-radius: 3px;
  background: #f2f5f8;
  color: var(--accent, #46617a);
}

/* ── 墨块分区（原创家族）：借鉴满宽色块标题的结构思路（外站参考只取骨架，
   不复刻其图标/装饰），自研墨青主色 + 品牌派生色表达。
   特征：分区标题为通栏出血深色块、白字反白、左端一道主色竖条。 ── */
.tpl-ink-block {
  padding: 16mm 18mm 16mm;
  color: #232a33;
}

.tpl-ink-block .resume-head {
  align-items: center;
  gap: 26px;
  padding-bottom: 9mm;
  border-bottom: 2px solid var(--accent-deep, #0d2628);
}

/* 标签模式（icons=off）：头部整框比正文更宽（±13mm，证件右图同思路）——
   中段联系网格充足宽度单行均匀放入，头像不再被压缩挤出 */
.tpl-ink-block.icons-off .resume-head {
  margin-left: -13mm;
  margin-right: -13mm;
}

.tpl-ink-block.icons-off .contact {
  flex: 1;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, auto));
  justify-content: space-between;
  gap: 7px 24px;
  margin-left: 3mm;
  margin-right: 3mm;
  max-width: none;
}

.tpl-ink-block.icons-off .avatar {
  flex-shrink: 0;
}

.tpl-ink-block .avatar {
  width: 25mm;
  height: 35mm;
  border-radius: 2mm;
  background: var(--accent-deep, #0d2628);
}

.tpl-ink-block .resume-name {
  color: #1d2733;
  font-size: 27pt;
  letter-spacing: 0.08em;
}

.tpl-ink-block .resume-role {
  margin-top: 8px;
  color: var(--accent, #1d6e75);
  font-size: 11pt;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.tpl-ink-block .contact {
  color: #5c6670;
  font-size: 9pt;
}

.tpl-ink-block .resume-section {
  margin-top: 20px;
}

/* 通栏标题条：负 margin 吃掉页边距，标题色块顶到纸边（页边距被用户改过时跟随 --tpl-page-margin） */
.tpl-ink-block .section-heading {
  margin: 0 calc(-1 * var(--tpl-page-margin, 18mm)) 12px;
  padding: 6px var(--tpl-page-margin, 18mm);
  border-left: 2.5mm solid var(--accent, #1d6e75);
  background: var(--accent-deep, #0d2628);
  color: #fff;
  font-size: 10.5pt;
  letter-spacing: 0.22em;
  /* 打印导出：标题条永远跟正文同页，不孤悬在页底 */
  break-after: avoid-page;
  page-break-after: avoid;
}

.tpl-ink-block .item {
  margin-bottom: 15px;
}

.tpl-ink-block .item-sub {
  color: var(--accent, #1d6e75);
}

.tpl-ink-block .skill {
  border-color: var(--accent-mist, #badcde);
  border-radius: 3px;
  background: var(--accent-soft, #e7f2f3);
  color: var(--accent-ink, #0d3134);
}

/* ── 墨签头版（结构还原，视觉表达自研）──────────────────────────────────
   骨架取自参考版式：白底「个人简历 | RESUME」文档头 + 右上三枚金色简笔圆章、
   满宽青金双色斜切横带、基本信息两列字段配右侧 5:7 证件照、
   斜切标签标题（右端白色斜纹）配贯穿细线、三段式加粗条目与编号列表。
   青色消费 --accent（默认 #4E6C78），金棕 #c29f69 为结构装饰色。
   头带标题由 ::before/::after 注入，真实姓名经 data-name 落到基本信息首格。 ── */
.tpl-ink-cut {
  padding: 0 0 14mm;
  color: #232a33;
}

/* 头带：白底，内容按「文档标题 → 双色横带 → 基本信息」纵向排；
   所有装饰用伪元素绝对定位，不占文档流，保证没有头像时左栏也不塌。 */
.tpl-ink-cut .resume-band {
  position: relative;
  /* 网格骨架：标题通栏一行，下面左列信息格 + 右列证件照。
     照片进网格随信息格高度自适应，不再绝对定位（旧写法固定 46mm 高，
     字段少时下缘压进教育经历；删头像时右侧还会留空） */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 33mm;
  grid-template-rows: 13mm auto;
  column-gap: 7mm;
  padding: 8mm 15mm 0;
  background: #fff;
  color: #232a33;
}

/* 无头像：收掉照片列，信息格铺满 */
.tpl-ink-cut .resume-band:not(:has(.avatar)) {
  grid-template-columns: minmax(0, 1fr);
}

/* 满宽双色横带：青段右端向右下斜切 → 白色细缝 → 金段续接到右缘 */
.tpl-ink-cut .resume-band::after {
  content: '';
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: 24mm;
  height: 5mm;
  background: linear-gradient(
    100deg,
    var(--accent, #4e6c78) 0 57.2%,
    rgba(255, 255, 255, 0) 57.2% 58.1%,
    #c29f69 58.1% 100%
  );
}

/* 姓名（含「姓　名：」标签）已改为联系格表的真实首格（renderer contactLeadName），
   由格表自动排布与电话同行配对——不再用绝对定位硬编码 top 对齐（脆性错位） */

/* 文档标题：细体「个人简历」+ 竖线 + 宽字距 RESUME，白底深色字 */
.tpl-ink-cut .resume-band .identity {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: fit-content;
}

.tpl-ink-cut .resume-band .resume-name {
  margin: 0;
  font-size: 0;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--accent, #4e6c78);
}

.tpl-ink-cut .resume-band .resume-name::before {
  content: '个人简历';
  font-size: 30pt;
  font-weight: 400;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.tpl-ink-cut .resume-band .resume-name::after {
  content: 'RESUME';
  margin-left: 11px;
  /* 竖向 padding 只撑边框画线高度、不撑行盒，竖线才能与中文大字等高 */
  padding: 4.5mm 0 4.5mm 11px;
  border-left: 1px solid var(--accent, #4e6c78);
  font-size: 14pt;
  font-weight: 400;
  letter-spacing: 0.26em;
  line-height: 1.2;
  vertical-align: 2px;
}

.tpl-ink-cut .resume-band .resume-role {
  display: none;
}

/* 右上三枚金棕圆章：自绘简笔（学士帽 / 公文包 / 书签），不用参考图素材 */
.tpl-ink-cut .resume-band .identity::after {
  content: '';
  position: absolute;
  top: 12mm;
  right: 15mm;
  width: 28mm;
  height: 8mm;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 24'%3E%3Cg fill='%23C29F69'%3E%3Ccircle cx='12' cy='12' r='11.5'/%3E%3Ccircle cx='42' cy='12' r='11.5'/%3E%3Ccircle cx='72' cy='12' r='11.5'/%3E%3C/g%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.5 12 7l8 3.5-8 3.5-8-3.5Z'/%3E%3Cpath d='M7.5 12.5v3.2c2.2 1.6 6.8 1.6 9 0v-3.2M20 10.5v5'/%3E%3Crect x='35' y='9' width='14' height='9.5' rx='1.4'/%3E%3Cpath d='M39 9V7.4c0-.8.6-1.4 1.4-1.4h3.2c.8 0 1.4.6 1.4 1.4V9M35 13h14'/%3E%3Cpath d='M67 5.5h10v13l-5-3.4-5 3.4v-13Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28mm 8mm;
}

/* 基本信息：两列字段 + 右列证件照，无表格框线。
   网格第 1 列即信息区（照片在头部网格第 2 列），不再手写预留宽度 */
.tpl-ink-cut .resume-band .contact {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10mm;
  row-gap: 1.2mm;
  width: auto;
  max-width: none; /* 覆盖全局 .contact 的 58% 限宽 */
  margin: 16mm 0 0;
  padding: 11mm 0 0;
  color: #2b3237;
  font-size: 9.5pt;
  line-height: 1.7;
}

/* 证件照：网格第 2 列，单元格占满第 2 行；
   照片绝对定位锚定（16mm 下沉 + 抵到行底）——
   height:100% 对自动高度网格中拉伸项的百分比解析不可靠，改用锚定，
   顶线与「基本信息」徽章严格平齐，底线随信息格表拉伸 */
.tpl-ink-cut .resume-band .avatar-cell {
  display: block;
  grid-column: 2;
  grid-row: 2;
  position: relative;
  align-self: stretch; /* 覆盖头带的 align-items:center，单元格须占满第 2 行 */
}

.tpl-ink-cut .resume-band .avatar {
  position: absolute;
  /* 顶线锚在第一行文字（姓名/电话）顶部：头带下沉 16mm + 格表 padding-top 11mm，
     即徽章与贯穿横线以下——照片不压线；与 .contact 的 margin-top/padding-top
     保持同步，改其一必须同步另一个 */
  top: 27mm;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  /* 替换元素 height:auto 会走固有比例而非上下锚定，须显式算高 */
  height: calc(100% - 27mm);
  min-height: 40mm;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: top;
  background: #eef0f0;
}

/* ── 头像形状动态响应（编辑区切换形状必须可见，用户原则）──
   portrait / 无形状类 = 模板原生满铺格位（顶线齐第一行、底边齐信息区底）；
   square / circle = 取格宽做 1:1 方框（底边自然留白），circle 加全圆角；
   three-four = 按 3:4 从锚定高度收窄，水平居中 */
/* portrait = 模板原生满铺格位（顶线齐第一行、底边齐信息区底），
   覆盖全局形状类强设的 28×40mm 小图 */
.tpl-ink-cut .resume-band .avatar.avatar-shape-portrait {
  width: 100%;
  height: calc(100% - 27mm);
  border-radius: 0;
}

.tpl-ink-cut .resume-band .avatar.avatar-shape-square,
.tpl-ink-cut .resume-band .avatar.avatar-shape-circle {
  bottom: auto;
  width: 100%;
  height: auto;
  min-height: 0; /* 基规则的 min-height:40mm 会撑破 1:1，必须清掉 */
  aspect-ratio: 1 / 1;
  border-radius: 4px;
}

.tpl-ink-cut .resume-band .avatar.avatar-shape-circle {
  border-radius: 50%;
}

.tpl-ink-cut .resume-band .avatar.avatar-shape-three-four {
  right: auto;
  left: 50%;
  width: auto;
  height: calc(100% - 27mm);
  aspect-ratio: 3 / 4;
  transform: translateX(-50%);
  border-radius: 4px;
}

/* 姓名是格表第一项（contactLeadName），格表自动排布：
   姓名|电话 同行、邮箱|微信 同行……行行严格对齐，无需手工指定列 */
.tpl-ink-cut .resume-band .contact span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* 参考版信息格是纯文字，去掉通用联系图标 */
.tpl-ink-cut .resume-band .contact .ci {
  display: inline;
  gap: 0;
}

.tpl-ink-cut .resume-band .contact svg {
  display: none;
}

.tpl-ink-cut .resume-band .contact span::before {
  color: inherit;
  white-space: pre;
}

.tpl-ink-cut .resume-band .contact [data-ci='phone']::before { content: '电　话：'; }
.tpl-ink-cut .resume-band .contact [data-ci='email']::before { content: '邮　箱：'; }
.tpl-ink-cut .resume-band .contact [data-ci='wechat']::before { content: '微　信：'; }
.tpl-ink-cut .resume-band .contact [data-ci='city']::before { content: '住　址：'; }
.tpl-ink-cut .resume-band .contact [data-ci='website']::before { content: '个人主页：'; }
.tpl-ink-cut .resume-band .contact [data-ci='birthDate']::before { content: '出生年月：'; }
.tpl-ink-cut .resume-band .contact [data-ci='gender']::before { content: '性　别：'; }
.tpl-ink-cut .resume-band .contact [data-ci='ethnicity']::before { content: '民　族：'; }
.tpl-ink-cut .resume-band .contact [data-ci='degree']::before { content: '学　历：'; }
.tpl-ink-cut .resume-band .contact [data-ci='political']::before { content: '政治面貌：'; }
.tpl-ink-cut .resume-band .contact [data-ci='name']::before { content: '姓　名：'; }
.tpl-ink-cut .resume-band .contact [data-ci^='cf-']::before { content: attr(title) '：'; }

/* 基本信息标签：主色块 + 右端斜切，斜切区内两道白色斜纹 */
.tpl-ink-cut .resume-band .contact::before {
  content: '基本信息';
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 33mm;
  height: 7mm;
  padding-left: 3mm;
  color: #fff;
  font-size: 10pt;
  font-weight: 700;
  letter-spacing: 0.16em;
  background-color: var(--accent, #4e6c78);
  background-image: repeating-linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0 5px,
    #fff 5px 6.4px,
    rgba(255, 255, 255, 0) 6.4px 10px
  );
  background-position: right center;
  background-size: 9mm 100%;
  background-repeat: no-repeat;
  clip-path: polygon(0 0, calc(100% - 7mm) 0, 100% 100%, 0 100%);
}

/* 标签底边延伸出去的贯穿细线，一直抵到右页边距 */
.tpl-ink-cut .resume-band .contact::after {
  content: '';
  position: absolute;
  top: 6.7mm;
  left: 34mm;
  right: -40mm;
  height: 1px;
  background: #b1c2c9;
}

/* .resume 左右 padding 已清零（头带满宽出血），正文补回页边距 */
.tpl-ink-cut .resume-section {
  margin: 7mm 15mm 0;
}

/* 分节标题：斜切标签（右端白色斜纹）+ 与标签底边平齐的贯穿细线 */
.tpl-ink-cut .section-heading {
  display: flex;
  align-items: flex-end;
  margin: 0 0 3.5mm;
  color: #fff;
  letter-spacing: 0.16em;
  break-after: avoid-page;
  page-break-after: avoid;
}

.tpl-ink-cut .section-heading-text {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-width: 33mm;
  padding: 1.1mm 8mm 1.1mm 3mm;
  color: #fff;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1.35;
  background-color: var(--accent, #4e6c78);
  background-image: repeating-linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0 5px,
    #fff 5px 6.4px,
    rgba(255, 255, 255, 0) 6.4px 10px
  );
  background-position: right center;
  background-size: 9mm 100%;
  background-repeat: no-repeat;
  clip-path: polygon(0 0, calc(100% - 7mm) 0, 100% 100%, 0 100%);
}

.tpl-ink-cut .section-heading::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: #b1c2c9;
}

/* 条目三段式：日期（左）｜单位（中）｜职务 / 专业（右），描述另起一行 */
.tpl-ink-cut .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: baseline;
  margin-bottom: 2.5mm;
}

.tpl-ink-cut .item-top {
  display: contents;
}

.tpl-ink-cut .item-date,
.tpl-ink-cut .item-title,
.tpl-ink-cut .item-sub {
  grid-row: 1;
  margin: 0;
  color: #1d2429;
  font-size: 10pt;
  font-weight: 700;
  line-height: 1.5;
}

.tpl-ink-cut .item-date {
  grid-column: 1;
  justify-self: start;
}

.tpl-ink-cut .item-title {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-ink-cut .item-sub {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

/* 工作经历的 DOM 是 title=职位 / sub=公司，对调成「公司居中、职位居右」 */
.tpl-ink-cut [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-ink-cut [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-ink-cut .item-desc,
.tpl-ink-cut .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 1.5mm 0 0;
  color: #394248;
  font-size: 9.5pt;
  line-height: 1.75;
}

/* 列表跟随用户设置（2026-11-14 修正：不再把 `- ` 强制排成数字，与编辑器所见一致）：
   `- ` 行 → 圆点列表；`1. ` 行 → 由文件末尾全局规则接管为原生 decimal；
   未设置列表的普通行不出现任何标记 */
.tpl-ink-cut .resume-section .rich-list,
.tpl-ink-cut .resume-section .skill-lines {
  margin: 1mm 0 0;
  padding-left: 2.3em;
  list-style: none;
  color: #394248;
  font-size: 9.5pt;
  line-height: 1.75;
}

.tpl-ink-cut .resume-section .rich-list li,
.tpl-ink-cut .resume-section .skill-lines li {
  position: relative;
  padding-left: 0.5em;
}

.tpl-ink-cut .resume-section ul.rich-list > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #394248;
}

.tpl-ink-cut .skill {
  border-color: var(--accent-mist, #c6cfd2);
  border-radius: 3px;
  background: var(--accent-soft, #ebeeef);
  color: var(--accent-ink, #2e3f47);
}

/* ---------- 配置式自定义模板（id 前缀 c-，配色由 renderer 注入 CSS 变量） ---------- */
.resume[class*='tpl-c-'] {
  padding-top: 0;
}

.resume[class*='tpl-c-'] .resume-band {
  align-items: center;
  gap: 20px;
  margin: 0 -18mm 8mm;
  padding: 12mm 18mm 10mm;
  background: var(--cfg-band, #16324a);
  color: var(--cfg-band-ink, #fff);
}

.resume[class*='tpl-c-'] .resume-band .identity {
  order: 1;
  flex: 1;
}

.resume[class*='tpl-c-'] .resume-band .contact {
  order: 2;
  width: auto;
  text-align: right;
  color: var(--cfg-band-ink, #fff);
  opacity: 0.88;
}

.resume[class*='tpl-c-'] .resume-band .avatar {
  order: 3;
  width: 23mm;
  height: 32mm;
  border-radius: 2mm;
  background: rgba(255, 255, 255, 0.18);
}

.resume[class*='tpl-c-'] .resume-band .resume-name {
  color: inherit;
  font-size: 26pt;
  letter-spacing: 0.04em;
}

.resume[class*='tpl-c-'] .resume-band .resume-role {
  color: inherit;
  opacity: 0.85;
}

.resume[class*='tpl-c-'] .resume-side {
  flex-basis: 60mm;
  width: 60mm;
  padding: 16mm 8mm 14mm;
  background: var(--cfg-side, #1d2f40);
  color: var(--cfg-side-ink, #fff);
}

.resume[class*='tpl-c-'] .resume-side .side-head .resume-name {
  color: inherit;
  font-size: 22pt;
}

.resume[class*='tpl-c-'] .resume-side .side-head .resume-role {
  color: inherit;
  opacity: 0.85;
}

.resume[class*='tpl-c-'] .resume-side .avatar {
  width: 22mm;
  height: 30mm;
  border-radius: 2mm;
  background: rgba(255, 255, 255, 0.18);
}

.resume[class*='tpl-c-'] .side-heading {
  color: var(--cfg-side-ink, #fff);
  opacity: 0.75;
  letter-spacing: 0.12em;
}

.resume[class*='tpl-c-'] .side-skill {
  border-color: rgba(255, 255, 255, 0.3);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.resume[class*='tpl-c-'] .side-item-date {
  color: inherit;
  opacity: 0.66;
}

.resume[class*='tpl-c-'] .side-contact {
  color: inherit;
  opacity: 0.88;
}

.resume[class*='tpl-c-'] .section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cfg-heading, var(--accent));
}

.resume[class*='tpl-c-'] .section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2ded4;
}

.resume[class*='tpl-c-'] .item-sub {
  color: var(--cfg-heading, var(--accent));
}

.resume[class*='tpl-c-'] .skill {
  border-color: var(--cfg-heading, var(--accent));
  border-radius: 4px;
  background: transparent;
  color: var(--cfg-heading, var(--accent));
  opacity: 0.9;
}

.resume[class*='tpl-c-'] .avatar {
  border-radius: 2mm;
}

/* ── 头像形状：用户选择（profile.avatarShape）优先于模板默认 ──
   avatar-shape-circle = 圆形证件照；avatar-shape-portrait = 5:7 竖版 */
.resume .avatar.avatar-shape-circle {
  width: 40mm;
  height: 40mm;
  border-radius: 50%;
  object-position: top;
}

.resume .avatar.avatar-shape-portrait {
  width: 28mm;
  height: 40mm;
  border-radius: 4px;
  object-position: top;
}

/* 更多头像比例：3:4 与方形 1:1（用户在编辑器选择后生效） */
.resume .avatar.avatar-shape-three-four {
  width: 30mm;
  height: 40mm;
  border-radius: 4px;
  object-position: top;
}

.resume .avatar.avatar-shape-square {
  width: 36mm;
  height: 36mm;
  border-radius: 4px;
  object-position: top;
}

/* ── 文档表格（原创家族）：经典「个人简历」表单样式。 ──
   特征：居中文档大标题 + 通栏细线表格；基本信息区两列排布、
   右侧竖版证件照通栏贯穿；正文板块 = 左侧标签列 + 右侧内容列，
   整表一个外框。纯 CSS 复用标准 DOM（header/identity/contact/section）：
   identity 与 contact 以 display: contents 摊平成信息格，
   字段标签用 data-ci 选择器注入（标签文案不进数据模型）。 ── */
.tpl-doc-table {
  padding: 12mm 12mm 10mm;
  color: #262626;
  font-size: 10pt;
}

/* 头部 = 信息表：前 4 列信息格 + 第 5 列照片列。
   框线画在单元格上（外框 2px / 内线 1px），标题行无框线留在表格外——
   与参考版式一致：个人简历标题独立于表格上方，照片列贯穿整张信息表。
   照片列取 26mm ≈ 标准一寸照宽 25mm（A4 内容宽 186mm 的 14%）；
   照片格高度 = 固定 4 行信息格（--dt-row-h × 4），与参考版式一致；
   行数不足 4 行时退化为「撑满除末行外的全部行」 */
.tpl-doc-table .resume-head.head-center {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 26mm;
  /* 单行信息格高度：字段格、照片格、衬底格共用同一基准。
     取 36px ≥ 任一行变体的自然高（首行含 2px 顶框 ≈ 35.7px），
     保证每行都是整齐的 36px 节距，照片格 4 行封顶才能与横线严丝合缝 */
  --dt-row-h: 36px;
  align-items: stretch;
  gap: 0;
  text-align: left;
}

/* 未上传/移除头像时收掉照片列（:has 现代浏览器可用；打印导出走 Chrome） */
.tpl-doc-table .resume-head.head-center:not(:has(.avatar)) {
  grid-template-columns: repeat(4, 1fr);
}

/* 文档大标题：首行、无边框（视觉上位于表格外），
   h1 里真实姓名数据保留在 DOM（下方以「姓名」信息格展示） */
.tpl-doc-table .resume-head.head-center::before {
  content: '个人简历';
  grid-column: 1 / -1;
  grid-row: 1;
  /* 固定行高：表格首行永远从 48px 处开始，照片格 top 与之对齐
     （伪元素不被 * 通配选中，box-sizing 需显式声明） */
  height: 48px;
  box-sizing: border-box;
  align-self: stretch;
  padding: 2px 0 12px;
  color: #1a1a1a;
  font-size: 20pt;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.35em;
  /* 抵消末字字距，保证视觉居中 */
  text-indent: 0.35em;
  text-align: center;
}

/* identity 摊平：h1（姓名格）与 p（求职意向行）直接成为网格项 */
.tpl-doc-table .identity {
  display: contents;
}

/* 联系方式容器摊平：每个字段一格 */
.tpl-doc-table .contact {
  display: contents;
}

/* 信息格通用外观：值在标签列右侧居中（参考版式），左内边距让出标签列。
   标签列宽 = 正文板块标签列（25mm），上下两段表格的纵向框线完全对齐 */
.tpl-doc-table .resume-name,
.tpl-doc-table .contact span,
.tpl-doc-table .resume-role {
  position: relative;
  margin: 0;
  padding: 6px 10px 6px calc(25mm + 12px);
  background: #fff;
  color: #262626;
  font-size: 10pt;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  /* 空白格（ghost）也保持整行高度，避免塌成半高；行高统一走 --dt-row-h */
  min-height: var(--dt-row-h);
  border-bottom: 1px solid #4d4d4d;
}

/* 动态槽位：字段按渲染顺序自动流成对排布（每格占 2 列 = 标签列 + 值列），
   姓名占首格、求职意向通栏收尾；未填/已删除字段不渲染，表格整体收紧不破版。
   渲染器在字段数为偶数时给末格打 data-slot-full——该格本落在左列、行尾会空出
   半个槽位，标记后通栏收口（有照片止于照片列，无照片通到右缘，表格线零断口） */
.tpl-doc-table .resume-name {
  order: 0;
  grid-column: span 2;
  border-top: 2px solid #2b2b2b;
}

.tpl-doc-table .contact span {
  order: 1;
  grid-column: span 2;
}

/* 首个字段行 = 表格顶缘 */
.tpl-doc-table .contact span:first-child {
  border-top: 2px solid #2b2b2b;
}

/* 末行成对：最后一个联系字段（如政治面貌）占左两列，求职意向占右侧两列
   （3/5 = 标签+值两格，右缘止于照片列——照片格贯穿到表底，不再从其下方过），
   两者同排收口。底线统一 2px 外框：否则左半 1px 灰、右半 2px 黑拼出「两层线」 */
.tpl-doc-table .contact span:last-child {
  order: 9;
  grid-column: 1 / 3;
  border-bottom: 2px solid #2b2b2b;
}

.tpl-doc-table .resume-role {
  order: 10;
  grid-column: 3 / 5;
  border-bottom: 2px solid #2b2b2b;
}

/* 末格被移走后，前面若剩半行空位：倒数第二格通栏补满（字段数为奇数时） */
.tpl-doc-table .resume-head.head-center:has(.contact > span:nth-child(odd):last-child)
  .contact span:nth-last-child(2) {
  grid-column: 1 / 5;
}

/* 删除求职意向后：末字段收口到前 4 列、照片格贯穿到底覆盖第 5 列 */
.tpl-doc-table .resume-head.head-center:not(:has(.resume-role)) .contact span:last-child {
  grid-column: 1 / 5;
}

/* 偶数个字段时 renderer 打的通栏标记不再需要（末格已改作末行左格） */
.tpl-doc-table .contact span[data-slot-full] {
  grid-column: 1 / 3;
}

/* 无照片列：右列格 / 通栏格 / 求职意向的右缘即表格外框
   （末行左格已改作配对格，排除掉，避免中间多一条 2px 竖线） */
.tpl-doc-table .resume-head.head-center:not(:has(.avatar)) .contact span:nth-child(odd):not(:last-child),
.tpl-doc-table .resume-head.head-center:not(:has(.avatar)) .contact span[data-slot-full]:not(:last-child),
.tpl-doc-table .resume-head.head-center:not(:has(.avatar)) .resume-role {
  border-right: 2px solid #2b2b2b;
}

/* 求职意向被移除时：末字段行成为表格末行，底线用外框规格收口 */
.tpl-doc-table .resume-head.head-center:not(:has(.resume-role)) .contact span:last-child {
  border-bottom: 2px solid #2b2b2b;
}

/* 一个联系字段都没有时：姓名格通栏（1/5 兼容有无照片两种列数），照片隐藏 */
.tpl-doc-table .resume-head.head-center:not(:has(.contact)) .resume-name {
  grid-column: 1 / 5;
  border-right: 2px solid #2b2b2b;
}

.tpl-doc-table .resume-head.head-center:not(:has(.contact)) .avatar-cell {
  display: none;
}

/* 字段标签：独立标签列（绝对定位贴满格子左缘，浅灰底、左右框线；
   宽度与正文板块标签列一致，均为 25mm） */
.tpl-doc-table .contact span::before,
.tpl-doc-table .resume-name::before,
.tpl-doc-table .resume-role::before {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 25mm;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f3;
  border-right: 1px solid #4d4d4d;
  /* 右列格的标签左缘 = 表格内线（左列格由下方规则升为外框 2px） */
  border-left: 1px solid #4d4d4d;
  color: #1a1a1a;
  font-weight: 700;
}

/* 标签列左缘框线：左列/通栏行 = 外框 2px；右列格 = 内线 1px */
.tpl-doc-table .resume-name::before,
.tpl-doc-table .contact span:nth-child(even)::before,
.tpl-doc-table .contact span[data-slot-full]::before,
.tpl-doc-table .contact span:last-child::before {
  border-left: 2px solid #2b2b2b;
}

/* 求职意向落在末行右格，标签左缘是表格内线 */
.tpl-doc-table .resume-role::before {
  border-left: 1px solid #4d4d4d;
}

.tpl-doc-table [data-ci='phone']::before { content: '电话'; }
.tpl-doc-table [data-ci='email']::before { content: '邮箱'; }
.tpl-doc-table [data-ci='wechat']::before { content: '微信'; }
.tpl-doc-table [data-ci='city']::before { content: '现住'; }
.tpl-doc-table [data-ci='website']::before { content: '主页'; }
.tpl-doc-table [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-doc-table [data-ci='gender']::before { content: '性别'; }
.tpl-doc-table [data-ci='ethnicity']::before { content: '民族'; }
.tpl-doc-table [data-ci='degree']::before { content: '学历'; }
.tpl-doc-table .resume-name::before { content: '姓名'; }
.tpl-doc-table [data-ci='political']::before { content: '政治面貌'; }
.tpl-doc-table [data-ci^='cf-']::before { content: attr(title); }

/* 参考模板无图标：图标模式下也一律隐藏（标签列已承担字段分区） */
.tpl-doc-table .contact .ci svg {
  display: none;
}

/* .ci 基础样式是 inline-flex（侧栏图标对齐用）——网格项 blockify 成 flex 后
   text-align 失效、值会靠左，与姓名格（h1 走 text-align 居中）不一致；
   本模板图标已隐藏，改回块级让值随 text-align 居中 */
.tpl-doc-table .contact .ci {
  display: block;
}

/* 证件照：照片列 26mm ≈ 一寸照宽 25mm。
   照片格绝对定位：顶到表格首行、贯穿到表格末行（求职意向行不再从照片列下方过）；
   高度封顶 = 4 行信息格（--dt-row-h × 4）：信息表正好 4 行时照片满贯，
   更长时照片仍只占前 4 行，余下由 ::after 衬底格接续；
   照片 cover 满铺格位（无白边，见 .avatar 规则），顶部锚定保住头部 */
.tpl-doc-table .resume-head .avatar-cell {
  position: absolute;
  /* 显式 block：基础 .avatar-cell 是 display:contents（包装层透明），
     不覆盖会吞掉格位盒，绝对定位直接失效 */
  display: block;
  /* 48px = 标题「个人简历」行高（固定 height，见 ::before），
     让照片格顶边正好落在表格首行 */
  top: 48px;
  right: 0;
  bottom: 0;
  max-height: calc(var(--dt-row-h) * 4);
  width: 26mm;
  height: auto;
  min-height: 0;
  background: #f5f5f3;
  border: 1px solid #4d4d4d;
  border-top: 2px solid #2b2b2b;
  border-bottom: 2px solid #2b2b2b;
  border-right: 2px solid #2b2b2b;
  overflow: hidden;
}

/* 照片只占 4 行、信息表更长时：照片下方第 5 列余下的行
   用一个衬底空格补到表底（末行求职意向只占前 4 列，照片列整列归照片区），
   保持表单格的框线连续（读作预留空格）。
   触发条件：联系字段 ≥ 8 个（照片 4 行只覆盖姓名 + 3 行字段格） */
.tpl-doc-table .resume-head.head-center:has(.contact > span:nth-child(8))::after {
  content: '';
  position: absolute;
  top: calc(48px + var(--dt-row-h) * 4);
  right: 0;
  bottom: 0;
  width: 26mm;
  box-sizing: border-box;
  /* 逐行横线：衬底格高度是 36px 的整数倍，按节距画线与左侧字段行对齐 */
  background: repeating-linear-gradient(
      to bottom,
      transparent 0 35px,
      #4d4d4d 35px 36px
    ),
    #f5f5f3;
  border-right: 2px solid #2b2b2b;
  border-bottom: 2px solid #2b2b2b;
  border-left: 1px solid #4d4d4d;
}

.tpl-doc-table .resume-head .avatar-cell .avatar {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-height: none;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  /* cover 填满格位：格位比例随字段行数变化（3~4 行），contain 会留白边；
     顶部锚定保住头部，证件照裁切集中在肩部以下 */
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：非 5:7 比例按所选比例取形（元素小于格位时余白铺标签列同色），
   元素内部同样 cover 不留白边 */
.tpl-doc-table .resume-head .avatar-cell .avatar.avatar-shape-three-four,
.tpl-doc-table .resume-head .avatar-cell .avatar.avatar-shape-square,
.tpl-doc-table .resume-head .avatar-cell .avatar.avatar-shape-circle {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-position: center top;
}

.tpl-doc-table .resume-head .avatar-cell .avatar.avatar-shape-three-four {
  aspect-ratio: 3 / 4;
}

.tpl-doc-table .resume-head .avatar-cell .avatar.avatar-shape-square {
  aspect-ratio: 1 / 1;
}

.tpl-doc-table .resume-head .avatar-cell .avatar.avatar-shape-circle {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

/* 求职意向：末行右格（标签 + 值两列），右缘由照片格的左框线收口；
   值随通用规则 text-align 居中（与其他信息格一致）。
   无照片时右缘即表格外框，由下方 :not(:has(.avatar)) 规则补 2px 右框 */
.tpl-doc-table .resume-role {
  order: 10;
  grid-column: 3 / 5;
  border-bottom: 2px solid #2b2b2b;
}

.tpl-doc-table .resume-role::before { content: '求职意向'; }

/* ── 正文板块：表格行 = 左侧标签列（25mm）+ 右侧内容列 ──
   标签用绝对定位贴左成整列（section 内容是多个兄弟节点，不适合网格布局）；
   margin 用高优先级锁 0，防止「模块间距」微调把表格行拆出裂缝 */
.resume.tpl-doc-table .resume-section {
  position: relative;
  margin: 0 !important;
  padding: 9px 12px 10px calc(25mm + 12px);
  border-top: 0;
  border-right: 2px solid #2b2b2b;
  border-bottom: 1px solid #4d4d4d;
  border-left: 2px solid #2b2b2b;
  min-height: 11mm;
}

/* 末个板块的底线 = 表格外框 */
.resume.tpl-doc-table .resume-section:last-of-type {
  border-bottom: 2px solid #2b2b2b;
}

.tpl-doc-table .section-heading {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25mm;
  margin: 0;
  padding: 8px 0;
  background: #f5f5f3;
  border-right: 1px solid #4d4d4d;
  color: #1a1a1a;
  font-size: 10.5pt;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-align: center;
}

/* 条目观感贴近参考图：公司与日期用正文黑，不用强调色 */
.tpl-doc-table .item-sub {
  color: #262626;
}

.tpl-doc-table .item-date {
  color: #262626;
  font-weight: 700;
}

/* ── 三段式条目头（参考版式）：日期居左 · 实体居中 · 角色/学历居右 ──
   item-top 以 display: contents 摊开，title/date 与 sub 成为同一网格的项；
   行列全部显式指定（auto-placement 会被 desc 的通栏跨行打乱）：
   默认 title 居中、sub 居右（教育：学校 | 专业·学历）；
   工作经历实体是公司（sub），与职位（title）语义相反，按 data-section 对调 */
.tpl-doc-table .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  margin-bottom: 10px;
}

.tpl-doc-table .item-top {
  display: contents;
}

.tpl-doc-table .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
}

.tpl-doc-table .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-doc-table .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  text-align: right;
}

.tpl-doc-table .item-desc {
  grid-row: 2;
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 9.5pt;
  line-height: 1.55;
}

/* 工作经历：日期 | 公司（居中） | 职位（居右） */
.tpl-doc-table [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-doc-table [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

/* ── 描述行圆点列表（参考版式 ●）：富文本 '- ' 行渲染为 rich-list ── */
.tpl-doc-table .rich-list {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
}

.tpl-doc-table .rich-list li {
  position: relative;
  padding-left: 14px;
  margin-top: 2px;
}

.tpl-doc-table .rich-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #262626;
}

/* ── 飘带侧栏（原创家族）：浅灰侧栏 + 深青飘带分组 + 图标标题主区。 ──
   侧栏：大证件照、姓名、求职意向居中；「基本信息 / 联系方式」两条飘带
   由 contact 容器的 ::before/::after 充当（contact 摊成单列网格，
   字段按 data-ci 显式定位到分组内，空字段行自动塌缩不露断口）。
   主区：深色方块图标标题（data-section 注入白色线性图标）+ 贯穿细线；
   条目三段式（日期左 · 实体中 · 角色右）与 ● 圆点列表同文档表格家族。 ── */
.tpl-ribbon {
  color: #262626;
}

/* 侧栏：浅灰底、内边距收窄，飘带可通栏到两缘 */
.tpl-ribbon .resume-side {
  display: flex;
  flex-direction: column;
  padding: 10mm 0 14mm;
  background: #f2f2f0;
}

/* 侧栏头部：照片/姓名/求职意向与飘带同宽（内层留白 5mm，给长邮箱留空间） */
.tpl-ribbon .side-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 5mm 9mm;
  text-align: center;
}

/* 头像形状跟随编辑器选择（profile.avatarShape）：默认 5:7 竖版，
   各形状按侧栏宽度给尺寸，不用全局单栏头部的小尺寸 */
.tpl-ribbon .side-head .avatar {
  width: 34mm;
  height: 48mm;
  margin-bottom: 7mm;
  border-radius: 2px;
  object-position: top;
}

.tpl-ribbon .side-head .avatar.avatar-shape-three-four {
  width: 36mm;
  height: 48mm;
  border-radius: 2px;
}

.tpl-ribbon .side-head .avatar.avatar-shape-square {
  width: 40mm;
  height: 40mm;
  border-radius: 2px;
}

.tpl-ribbon .side-head .avatar.avatar-shape-circle {
  width: 40mm;
  height: 40mm;
  border-radius: 50%;
}

.tpl-ribbon .side-head .resume-name {
  font-size: 20pt;
  letter-spacing: 0.06em;
}

.tpl-ribbon .side-head .resume-role {
  margin-top: 5px;
  color: #666;
  font-size: 9.5pt;
  font-weight: 400;
}

.tpl-ribbon .side-head .resume-role::before {
  content: '求职意向：';
}

/* 飘带分组：真实分组元素——组标题飘带条 + 字段行，字段随填写自动增减 */
.tpl-ribbon .side-group {
  margin-top: 9mm;
  /* 关键修复：side-head 是 align-items:center 的 flex 列，分组默认按内容收缩再居中，
     两组飘带起点随字段多少漂移——必须强制通栏，两条飘带才能左端对齐 */
  align-self: stretch;
  /* 飘带右端伸出侧栏，抬高层级避免被白色主栏遮盖 */
  position: relative;
  z-index: 1;
}

.tpl-ribbon .side-ribbon {
  /* 左端距页边 3mm（下方留折角），右端伸出侧栏 4mm（side-head 留白 5mm） */
  margin: 0 calc(-5mm - 4mm) 0 -2mm;
  height: 8mm;
  line-height: 8mm;
  background: var(--accent, #5B7A8C);
  color: #fff;
  font-size: 11pt;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-align: center;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
  /* 左端平直、右端燕尾切口 */
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%);
}

/* 左端折角：飘带绕到页背面的折叠示意（参考版式）；
   注意不能用条自身的伪元素——clip-path 会连同伪元素一起裁掉 */
.tpl-ribbon .side-group::after {
  content: '';
  position: absolute;
  left: -2mm;
  top: 8mm;
  width: 3.5mm;
  height: 2.6mm;
  background: color-mix(in srgb, var(--accent, #5B7A8C) 66%, #000);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.tpl-ribbon .side-head .contact {
  margin: 10px 0 0;
}

/* 字段行：纯文本，标签由 data-ci 注入（无图标，参考版式）。
   悬挂缩进：首行从标签起排，长值换行后对齐到值的起始位置 */
.tpl-ribbon .side-head .contact span {
  display: block;
  color: #444;
  font-size: 8pt;
  line-height: 1.6;
  text-align: left;
  white-space: normal;
  padding-left: 5em;
  text-indent: -5em;
  /* 长邮箱等值逐字符断行，避免整段换行导致标签后留空 */
  word-break: break-all;
}

/* 邮箱普遍 20+ 字符，单独收半号避免折行（仍超长时由 break-all 兜底） */
.tpl-ribbon .side-head .contact [data-ci='email'] {
  font-size: 7.5pt;
}

.tpl-ribbon .side-head .contact .ci {
  display: block;
}

.tpl-ribbon .side-head .contact .ci svg {
  display: none;
}

/* 标签列两端对齐：2 字标签（籍贯/手机）拉伸到 4 字宽，冒号统一收在列尾（参考版式）。
   宽度 5em = 4 字标签 + 冒号，所有行的冒号对齐同一竖线 */
.tpl-ribbon .side-head .contact span::before {
  display: inline-block;
  width: 5em;
  text-align: justify;
  text-align-last: justify;
  /* 阻断 span 的 text-indent:-5em 继承，否则标签整体左移被裁切 */
  text-indent: 0;
  color: #444;
  font-weight: 400;
}

/* 标签文案（city 在本模板语境下作籍贯；冒号并入标签参与对齐） */
.tpl-ribbon .side-head .contact [data-ci='birthDate']::before { content: '出生日期：'; }
.tpl-ribbon .side-head .contact [data-ci='gender']::before { content: '性别：'; }
.tpl-ribbon .side-head .contact [data-ci='ethnicity']::before { content: '民族：'; }
.tpl-ribbon .side-head .contact [data-ci='city']::before { content: '籍贯：'; }
.tpl-ribbon .side-head .contact [data-ci='degree']::before { content: '学历：'; }
.tpl-ribbon .side-head .contact [data-ci='political']::before { content: '政治面貌：'; }
.tpl-ribbon .side-head .contact [data-ci='phone']::before { content: '手机：'; }
.tpl-ribbon .side-head .contact [data-ci='email']::before { content: '邮箱：'; }
.tpl-ribbon .side-head .contact [data-ci='wechat']::before { content: '微信：'; }
.tpl-ribbon .side-head .contact [data-ci='website']::before { content: '网站：'; }
.tpl-ribbon .side-head .contact [data-ci^='cf-']::before { content: attr(title) '：'; }

/* 主区：标题 = 深色方块图标 + 板块名 + 贯穿细线 */
.tpl-ribbon .resume-main {
  padding: 12mm 12mm 14mm;
}

.tpl-ribbon .section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: #1a1a1a;
  font-size: 12pt;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 图标方块：默认星形兜底图标（低特异性，位于分区规则之前），
   按 data-section 注入对应白色线性图标 */
.tpl-ribbon .section-heading::before {
  content: '';
  flex: 0 0 auto;
  width: 8mm;
  height: 8mm;
  background-color: var(--accent, #5B7A8C);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 62%;
}

.tpl-ribbon .section-heading::after {
  content: '';
  flex: 1;
  height: 2px;
  margin-left: 2px;
  background: #3a3a3a;
}

/* 线性图标（data URI，白色描边与方块同色系） */
.tpl-ribbon [data-section='education'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 10 12 5 2 10l10 5 10-5Z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/svg%3E");
}

.tpl-ribbon [data-section='experience'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3Crect width='20' height='14' x='2' y='6' rx='2'/%3E%3C/svg%3E");
}

.tpl-ribbon [data-section='projects'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E");
}

.tpl-ribbon [data-section='skills'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E");
}

.tpl-ribbon [data-section='honors'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9H4.5a2.5 2.5 0 0 1 0-5H6'/%3E%3Cpath d='M18 9h1.5a2.5 2.5 0 0 0 0-5H18'/%3E%3Cpath d='M4 22h16'/%3E%3Cpath d='M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22'/%3E%3Cpath d='M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22'/%3E%3Cpath d='M18 2H6v7a6 6 0 0 0 12 0V2Z'/%3E%3C/svg%3E");
}

.tpl-ribbon [data-section='certs'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.477 12.89 17 22l-5-3-5 3 1.523-9.11'/%3E%3C/svg%3E");
}

.tpl-ribbon [data-section='profile'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* 其余板块（志愿/科研/语言/爱好/自定义等）走上方星形兜底图标 */

/* ── 条目三段式 + 圆点列表（与文档表格家族同款）── */
.tpl-ribbon .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  margin-bottom: 12px;
}

.tpl-ribbon .item-top {
  display: contents;
}

.tpl-ribbon .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: #262626;
  font-weight: 700;
}

.tpl-ribbon .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-ribbon .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  text-align: right;
  color: #262626;
  font-weight: 700;
}

.tpl-ribbon .item-desc {
  grid-row: 2;
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 9.5pt;
  line-height: 1.6;
}

/* 工作经验：日期 | 公司（居中） | 职位（居右） */
.tpl-ribbon [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-ribbon [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-ribbon .rich-list {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
}

.tpl-ribbon .rich-list li {
  position: relative;
  padding-left: 14px;
  margin-top: 3px;
}

.tpl-ribbon .rich-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #262626;
}

/* ── 凹口书签（结构还原，视觉表达自研）──────────────────────────────────
   骨架取自参考版式：满宽藏蓝色带中央下凸梯形书签、右侧 5:7 证件照 +
   双列下划线信息格、深色斜切标签配贯穿粗线、条目三段式与圆点成果列表。
   图标/配色/间距均为自研参数；深色身份结构色统一消费 --accent
   （默认 #36394C 由 catalog 注入；用户改主题色时整条色带与标签跟随）。 ── */
.tpl-notch-tab {
  position: relative;
  padding: 24mm 15mm 14mm;
  color: #2b2f3a;
  font-size: 9.5pt;
  line-height: 1.62;
}

/* 顶部满宽出血色带 + 中央下凸梯形（书签凹口）：20px 色带 + 19px 下凸，
   按 800px / 210mm 参考图换算为 5.3mm + 5mm、下凸宽 62mm */
.tpl-notch-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5.3mm;
  background: var(--accent, #36394c);
}

.tpl-notch-tab::after {
  content: '';
  position: absolute;
  /* 上移 1px 与色带重叠：5.3mm 换算成像素是非整数，精确相接会留一条亚像素白缝 */
  top: calc(5.3mm - 1px);
  left: 50%;
  width: 62mm;
  height: calc(5mm + 1px);
  transform: translateX(-50%);
  /* 上宽下窄：两侧斜边各内收约 3mm */
  clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%);
  background: var(--accent, #36394c);
}

/* 抬头：左 58% 姓名/信息格，右侧证件照跨两行 */
.tpl-notch-tab .resume-head {
  display: grid;
  grid-template-columns: minmax(0, 58%) 1fr;
  grid-template-rows: auto auto;
  column-gap: 8mm;
  align-items: start;
  padding-bottom: 2mm;
}

/* 用户移除头像后左栏铺满，右侧不留空槽 */
.tpl-notch-tab .resume-head:not(:has(.avatar)) {
  grid-template-columns: minmax(0, 1fr) 0;
  column-gap: 0;
}

.tpl-notch-tab .identity {
  grid-column: 1;
  grid-row: 1;
  min-width: fit-content;
}

.tpl-notch-tab .resume-name {
  color: #23262e;
  font-size: 24pt;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.16em;
}

/* 求职意向自带前缀并压一条细线，与下方信息格形成三线表格感 */
.tpl-notch-tab .resume-role {
  width: 100%;
  margin: 7px 0 0;
  padding-bottom: 7px;
  border-bottom: 1px solid #7b8398;
  color: #3c414c;
  font-size: 10pt;
  font-weight: 400;
}

.tpl-notch-tab .resume-role::before {
  content: '求职意向：';
}

/* 联系格：两列、逐行底边线，标签由 data-ci 注入（不显示 SVG 图标） */
.tpl-notch-tab .contact {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: none;
  margin-top: 6px;
  color: #3c414c;
  font-size: 9pt;
}

.tpl-notch-tab .contact span {
  display: block;
  min-width: 0;
  padding: 4px 10px 4px 0;
  border-bottom: 1px solid #7b8398;
  /* 联系信息绝不省略：只在整串放不下时才断行（break-word 不参与
     min-content 计算，短邮箱保持「标签+值」同一行），格子由 grid 拉齐等高 */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

/* 奇数个字段时末格占满整行，底边线不半途而断 */
.tpl-notch-tab .contact span:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.tpl-notch-tab .contact .ci svg {
  display: none;
}

.tpl-notch-tab .contact span::before {
  font-weight: 400;
}

.tpl-notch-tab .contact [data-ci='birthDate']::before { content: '生日：'; }
.tpl-notch-tab .contact [data-ci='gender']::before { content: '性别：'; }
.tpl-notch-tab .contact [data-ci='ethnicity']::before { content: '民族：'; }
.tpl-notch-tab .contact [data-ci='city']::before { content: '地址：'; }
.tpl-notch-tab .contact [data-ci='degree']::before { content: '学历：'; }
.tpl-notch-tab .contact [data-ci='political']::before { content: '政治面貌：'; }
.tpl-notch-tab .contact [data-ci='phone']::before { content: '电话：'; }
.tpl-notch-tab .contact [data-ci='email']::before { content: '邮箱：'; }
.tpl-notch-tab .contact [data-ci='wechat']::before { content: '微信：'; }
.tpl-notch-tab .contact [data-ci='website']::before { content: '网站：'; }
.tpl-notch-tab .contact [data-ci^='cf-']::before { content: attr(title) '：'; }

/* 竖版 5:7 证件照：极细浅框 + 内白边，直角 */
.tpl-notch-tab .avatar {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  /* 底边与左栏联系字段底线对齐（头部 align-items:start，这里单独下沉） */
  align-self: end;
  width: 34mm;
  height: 47.5mm;
  padding: 2px;
  border: 1px solid #d8dce6;
  border-radius: 1px;
  background: #fff;
  object-position: top;
}

.tpl-notch-tab .avatar.avatar-shape-three-four {
  width: 36mm;
  height: 48mm;
}

.tpl-notch-tab .avatar.avatar-shape-square {
  width: 42mm;
  height: 42mm;
  border-radius: 1px;
}

.tpl-notch-tab .avatar.avatar-shape-circle {
  width: 42mm;
  height: 42mm;
  padding: 0;
  border-radius: 50%;
}

/* 分节标题：实心斜切标签压在一条贯穿版心的细基线上。
   深蓝只集中在标签（与顶部满宽书签同一套语言），基线做秩序引导而非第二块色块，
   避免「标签—断口—粗线」三段错位，也把版面墨量让给正文。 */
.tpl-notch-tab .resume-section {
  margin-top: 6.5mm;
}

.tpl-notch-tab .section-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  margin: 0 0 8px;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.12em;
  break-after: avoid-page;
  page-break-after: avoid;
}

.tpl-notch-tab .section-heading::after {
  content: '';
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent, #36394c);
  opacity: 0.5;
}

.tpl-notch-tab .section-heading-text {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 39mm;
  padding: 5px 20px 6px 12px;
  /* 斜切口朝上：底边与基线平齐，尖角不再压在横线上 */
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  background: var(--accent, #36394c);
  color: #fff;
}

/* 白色线性小图标：按板块切换，兜底为四格方块 */
.tpl-notch-tab .section-heading-text::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.tpl-notch-tab [data-section='education'] .section-heading-text::before,
.tpl-notch-tab [data-section='certs'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9 12 4l10 5-10 5L2 9Z'/%3E%3Cpath d='M6 11v5c3 2.5 9 2.5 12 0v-5'/%3E%3C/svg%3E");
}

.tpl-notch-tab [data-section='experience'] .section-heading-text::before,
.tpl-notch-tab [data-section='projects'] .section-heading-text::before,
.tpl-notch-tab [data-section='campus'] .section-heading-text::before,
.tpl-notch-tab [data-section='research'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h12M9 12h12M9 18h12'/%3E%3Ccircle cx='4' cy='6' r='1' fill='%23fff' stroke='none'/%3E%3Ccircle cx='4' cy='12' r='1' fill='%23fff' stroke='none'/%3E%3Ccircle cx='4' cy='18' r='1' fill='%23fff' stroke='none'/%3E%3C/svg%3E");
}

.tpl-notch-tab [data-section='skills'] .section-heading-text::before,
.tpl-notch-tab [data-section='languages'] .section-heading-text::before,
.tpl-notch-tab [data-section='honors'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.6 6.4L21 11l-6.4 2.6L12 20l-2.6-6.4L3 11l6.4-2.6L12 2Z'/%3E%3C/svg%3E");
}

.tpl-notch-tab [data-section='profile'] .section-heading-text::before,
.tpl-notch-tab [data-section='selfEval'] .section-heading-text::before,
.tpl-notch-tab [data-section='hobbies'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z'/%3E%3C/svg%3E");
}

/* 条目三段式：日期（左）｜单位（中）｜职务/专业（右），描述另起一行 */
.tpl-notch-tab .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  margin-bottom: 7px;
}

.tpl-notch-tab .item-top {
  display: contents;
}

.tpl-notch-tab .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: #23262e;
  font-size: 9.5pt;
  font-weight: 700;
}

.tpl-notch-tab .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  color: #23262e;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
}

.tpl-notch-tab .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #23262e;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: right;
}

/* 工作经历的 DOM 是 title=职位 / sub=公司，与参考版的「公司居中、职位居右」对调 */
.tpl-notch-tab [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-notch-tab [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-notch-tab .item-desc,
.tpl-notch-tab .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #3c414c;
  font-size: 9pt;
  line-height: 1.65;
}

/* 圆点成果列表（用户以 `- ` 开头即生效） */
.tpl-notch-tab .rich-list,
.tpl-notch-tab .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #3c414c;
  font-size: 9pt;
}

.tpl-notch-tab .rich-list li,
.tpl-notch-tab .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-notch-tab .rich-list li::before,
.tpl-notch-tab .skill-lines li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2b2f3a;
}

.tpl-notch-tab .skill-lines strong {
  color: #23262e;
}

/* ── 档案头带（结构借鉴，视觉表达自研）──────────────────────────────────
   骨架取自参考版式：版心内浅灰通栏头带（非出血）、头带内姓名与求职意向
   同行居中、双列「标签＋值」信息格配右侧 5:7 直角证件照、标题后拖尾细线、
   日期/单位/岗位三段式条目与实心圆点成果列表。
   字体、字号、灰阶、间距、字段标签均为自研参数；不使用参考图人像素材
   （统一走 /demo-avatar.jpg）。细线与圆点消费 --accent，默认石板灰
   #4A4E55 由 catalog 注入，用户改主题色时细节跟随、灰带身份色不变。
   头带位置跟随 --tpl-page-margin，用户调整页边距时不会与抬头错位。 ── */
.tpl-archive-band {
  position: relative;
  padding: 10mm 13mm 12mm;
  color: #232626;
  font-family: "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
  font-size: 9.5pt;
  line-height: 1.6;
}

/* 头带：版心满宽、上下不出血；左右各外扩 2mm 让色带略宽于正文栏 */
.tpl-archive-band::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: var(--tpl-page-margin, 10mm);
  left: max(0mm, calc(var(--tpl-page-margin, 13mm) - 2mm));
  right: max(0mm, calc(var(--tpl-page-margin, 13mm) - 2mm));
  height: 12mm;
  background: #e1e0dc;
}

.tpl-archive-band .resume-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34mm;
  grid-template-rows: 12mm auto;
  column-gap: 4mm;
  row-gap: 5mm;
  align-items: start;
}

/* 用户移除头像后信息格铺满，右侧不留空槽 */
.tpl-archive-band .resume-head:not(:has(.avatar)) {
  grid-template-columns: minmax(0, 1fr) 0;
  column-gap: 0;
}

/* 姓名与求职意向同行居中，整行落在浅灰头带内 */
.tpl-archive-band .identity {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6mm;
  min-width: fit-content;
  height: 12mm;
  text-align: center;
}

.tpl-archive-band .resume-name {
  margin: 0;
  color: #1b1e1f;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 20pt;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.tpl-archive-band .resume-role {
  margin: 0;
  color: #4b5254;
  font-size: 10pt;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.tpl-archive-band .resume-role::before {
  content: '求职意向：';
}

/* 双列标签式信息格：标签粗黑、值列对齐；格子随有值字段自动增减 */
.tpl-archive-band .contact {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10mm;
  row-gap: 1.8mm;
  align-content: start;
  max-width: none;
  margin: 0;
  color: #232626;
  font-size: 9.5pt;
  justify-content: flex-start;
}

.tpl-archive-band .contact span {
  display: grid;
  grid-template-columns: 4.6em minmax(0, 1fr);
  column-gap: 1mm;
  align-items: baseline;
  min-width: 0;
  white-space: normal;
  /* 联系方式绝不省略：长邮箱只在整串放不下时折行，折行后仍落在值列 */
  overflow-wrap: break-word;
  word-break: normal;
}

.tpl-archive-band .contact .ci svg {
  display: none;
}

.tpl-archive-band .contact span::before {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 9pt;
  font-weight: 700;
  color: #1b1e1f;
  white-space: nowrap;
}

.tpl-archive-band .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-archive-band .contact [data-ci='gender']::before { content: '性　别'; }
.tpl-archive-band .contact [data-ci='ethnicity']::before { content: '民　族'; }
.tpl-archive-band .contact [data-ci='city']::before { content: '住　址'; }
.tpl-archive-band .contact [data-ci='degree']::before { content: '学　历'; }
.tpl-archive-band .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-archive-band .contact [data-ci='phone']::before { content: '电　话'; }
.tpl-archive-band .contact [data-ci='email']::before { content: '邮　箱'; }
.tpl-archive-band .contact [data-ci='wechat']::before { content: '微　信'; }
.tpl-archive-band .contact [data-ci='website']::before { content: '主页'; }
.tpl-archive-band .contact [data-ci^='cf-']::before { content: attr(title); }

/* 竖版 5:7 证件照：直角、极细浅框，与信息格顶部齐平 */
.tpl-archive-band .avatar {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: start;
  width: 34mm;
  height: 47.5mm;
  border: 1px solid #e3e1dc;
  border-radius: 0;
  background: #fff;
  object-position: top;
  margin-left: 0;
}

.tpl-archive-band .avatar.avatar-shape-three-four {
  width: 35mm;
  height: 47mm;
}

.tpl-archive-band .avatar.avatar-shape-square,
.tpl-archive-band .avatar.avatar-shape-circle {
  width: 38mm;
  height: 38mm;
}

.tpl-archive-band .avatar.avatar-shape-circle {
  border-radius: 50%;
}

/* 板块标题：粗黑小标题 + 一条贯穿版心的细拖尾线（无描边徽标、无色块） */
.tpl-archive-band .resume-section {
  margin-top: 4.5mm;
}

.tpl-archive-band .section-heading {
  display: flex;
  align-items: center;
  gap: 3mm;
  margin: 0 0 2.5mm;
  color: #1b1e1f;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  break-after: avoid-page;
  page-break-after: avoid;
}

.tpl-archive-band .section-heading-text {
  flex: 0 0 auto;
}

.tpl-archive-band .section-heading::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--accent, #4a4e55);
  opacity: 0.5;
}

/* 三段式条目：日期（左）｜单位（中）｜职务/专业（右），描述另起一行铺满 */
.tpl-archive-band .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
  margin-bottom: 2.5mm;
}

.tpl-archive-band .item-top {
  display: contents;
}

.tpl-archive-band .item-date,
.tpl-archive-band .item-title,
.tpl-archive-band .item-sub {
  grid-row: 1;
  margin: 0;
  color: #1b1e1f;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 9.5pt;
  font-weight: 700;
  white-space: nowrap;
}

.tpl-archive-band .item-date {
  grid-column: 1;
  justify-self: start;
}

.tpl-archive-band .item-title {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  white-space: normal;
}

.tpl-archive-band .item-sub {
  grid-column: 3;
  justify-self: end;
  text-align: right;
  white-space: normal;
}

/* 工作经历的 DOM 是 title=职位 / sub=公司，与参考版「公司居中、职位居右」对调 */
.tpl-archive-band [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-archive-band [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-archive-band .item-desc,
.tpl-archive-band .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 1mm 0 0;
  color: #232626;
  font-size: 9pt;
  line-height: 1.62;
}

/* 实心圆点成果列表（用户以 `- ` 开头即生效） */
.tpl-archive-band .rich-list,
.tpl-archive-band .skill-lines {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 1mm 0 0;
  padding-left: 0;
  list-style: none;
  color: #232626;
  font-size: 9pt;
}

.tpl-archive-band .rich-list li,
.tpl-archive-band .skill-lines li {
  position: relative;
  padding-left: 5mm;
  margin: 0;
}

.tpl-archive-band .rich-list li::before,
.tpl-archive-band .skill-lines li::before {
  content: '';
  position: absolute;
  left: 1mm;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent, #4a4e55);
}

.tpl-archive-band .skill-lines strong {
  color: #1b1e1f;
}

/* ── 灰带格表（结构还原，视觉参数自研）──────────────────────────────────
   参考版式：居中「个人简历」大标题独立于表格之外；整页一个通栏细线外框，
   由信息表与每个板块的左右边框拼接而成（随内容伸缩，不写死框的高度）；
   信息表 = 4 行双字段 + 跨 4 行的证件照 + 求职意向通栏行；
   板块标题 = 浅灰通栏带（居中粗黑字），内容通栏铺满，
   与「文档表格」的左标签列 + 右内容列是两种不同的分节骨架。
   列宽按参考图采样：30 / 53 / 27 / 45 / 35（合计 190mm，用 fr 自适应页边距）。 ── */

.tpl-ruled-dossier {
  color: #1a1a1a;
  font-family: 'Songti SC', 'SimSun', 'Noto Serif CJK SC', serif;
  font-size: 10.5pt;
  line-height: 1.6;
}

/* 外框距纸边约 10mm；用户自定义页边距时由渲染器的内联覆盖层接管 */
.resume.tpl-ruled-dossier {
  padding: 12mm 10mm 8mm;
}

/* ── 信息表：标题行 + 4 行字段 + 求职意向行 + 自动补充行 ── */
.tpl-ruled-dossier .resume-head.head-center {
  display: grid;
  grid-template-columns: 30fr 53fr 27fr 45fr 35fr;
  grid-template-rows: auto repeat(4, minmax(11.4mm, auto)) auto;
  grid-auto-rows: minmax(11.4mm, auto);
  align-items: stretch;
  gap: 0;
  text-align: left;
}

/* 无头像时收掉照片列，末列吸收其余宽度 */
.tpl-ruled-dossier .resume-head.head-center:not(:has(.avatar)) {
  grid-template-columns: 30fr 53fr 27fr 80fr;
}

/* 文档大标题：独立于表格上方，无边框 */
.tpl-ruled-dossier .resume-head.head-center::before {
  content: '个人简历';
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 0 0 4mm;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 20pt;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-indent: 0.02em;
  text-align: center;
}

/* identity / contact 摊平成网格项，字段各自成为一个信息格 */
.tpl-ruled-dossier .identity,
.tpl-ruled-dossier .contact {
  display: contents;
}

.tpl-ruled-dossier .contact {
  max-width: none;
}

/* 信息格：标签列用 ::before 绝对定位，值在剩余空间居中 */
.tpl-ruled-dossier .resume-name,
.tpl-ruled-dossier .contact span,
.tpl-ruled-dossier .resume-role {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 11.4mm;
  margin: 0;
  padding: 2mm 2mm 2mm calc(var(--label-w, 36%) + 2mm);
  background: #fff;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 10.5pt;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #8a8a8a;
  --label-w: 36%;
}

/* 格位按 DOM 顺序（第 1～7 格）而非字段键：contactFlowLocked + ghostContact
   保证恒 7 格，用户在编辑器调序（fieldOrder）时格位框架不动、字段对号入座。
   默认 flow（出生年月/性别/现住/民族/学历/电话/邮箱）与参考版式逐格一致 */
/* 左半格（第 2/4/6 格）：外框左缘 1.5px */
.tpl-ruled-dossier .resume-name,
.tpl-ruled-dossier .contact > span:nth-of-type(2),
.tpl-ruled-dossier .contact > span:nth-of-type(4),
.tpl-ruled-dossier .contact > span:nth-of-type(6) {
  grid-column: 1 / 3;
  border-left: 1.5px solid #2b2b2b;
}

/* 右半格（第 1/3/5/7 格）：与左半格之间的内竖线 */
.tpl-ruled-dossier .contact > span:nth-of-type(1),
.tpl-ruled-dossier .contact > span:nth-of-type(3),
.tpl-ruled-dossier .contact > span:nth-of-type(5),
.tpl-ruled-dossier .contact > span:nth-of-type(7) {
  grid-column: 3 / 5;
  border-left: 1px solid #8a8a8a;
}

/* 行位：第 1 格与姓名同行（第 2 行），其余每两格一行 */
.tpl-ruled-dossier .resume-name,
.tpl-ruled-dossier .contact > span:nth-of-type(1) {
  grid-row: 2;
  border-top: 1.5px solid #2b2b2b;
}

.tpl-ruled-dossier .contact > span:nth-of-type(2),
.tpl-ruled-dossier .contact > span:nth-of-type(3) {
  grid-row: 3;
}

.tpl-ruled-dossier .contact > span:nth-of-type(4),
.tpl-ruled-dossier .contact > span:nth-of-type(5) {
  grid-row: 4;
}

.tpl-ruled-dossier .contact > span:nth-of-type(6),
.tpl-ruled-dossier .contact > span:nth-of-type(7) {
  grid-row: 5;
}

/* 证件照：外层 avatar-cell 占第 5 列、精确贯穿 4 行字段并承载框线
   （框线不随照片形状断开）；内层 img 响应头像形状——默认贴满格位，
   方形/3:4/圆形在格内按比例居中呈现 */
.tpl-ruled-dossier .resume-head .avatar-cell {
  grid-column: 5 / 6;
  grid-row: 2 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #ececec;
  border-top: 1.5px solid #2b2b2b;
  border-right: 1.5px solid #2b2b2b;
  border-bottom: 1px solid #8a8a8a;
  border-left: 1px solid #8a8a8a;
  overflow: hidden;
}

.tpl-ruled-dossier .resume-head .avatar-cell .avatar {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：按所选比例在格内居中，格位框线保持完整 */
.tpl-ruled-dossier .resume-head .avatar-cell .avatar.avatar-shape-three-four {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  max-height: 100%;
}

.tpl-ruled-dossier .resume-head .avatar-cell .avatar.avatar-shape-square {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 100%;
}

.tpl-ruled-dossier .resume-head .avatar-cell .avatar.avatar-shape-circle {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 100%;
  border-radius: 50%;
}

/* 求职意向：第 6 行通栏，标签与主表第一标签列同宽，值水平居中 */
.tpl-ruled-dossier .resume-role {
  grid-column: 1 / -1;
  grid-row: 6;
  text-align: center;
  /* 通栏行的左右都是外框竖线：缺左线会在这里断开一整行 */
  border-left: 1.5px solid #2b2b2b;
  border-right: 1.5px solid #2b2b2b;
  border-bottom: 1px solid #8a8a8a;
  --label-w: 15.8%;
}

/* 基础联系字段带 SVG 图标且 .ci 是 inline-flex：表格版式一律去掉图标，
   并改回块级，让 text-align:center 真正作用在值上 */
.tpl-ruled-dossier .contact span.ci {
  display: block;
}

.tpl-ruled-dossier .contact .ci svg {
  display: none;
}

/* 参考版式是固定 8 格表单：微信 / 主页 / 政治面貌 / 自定义字段不进这张表。
   数据仍保存在简历里（其它模板可展示），本模板不额外撑出补充行，
   保证「4 行字段 + 求职意向」的收口关系与参考图一致。
   本段必须排在 span.ci 的 display:block 之后（同特异性靠后者生效）。 */
.tpl-ruled-dossier .contact span[data-ci='wechat'],
.tpl-ruled-dossier .contact span[data-ci='website'],
.tpl-ruled-dossier .contact span[data-ci='political'],
.tpl-ruled-dossier .contact span[data-ci^='cf-'] {
  display: none;
}

/* 无头像时右半格自己收口成外框右缘（按 DOM 位置：第 1/3/5/7 格） */
.tpl-ruled-dossier .resume-head:not(:has(.avatar)) .contact > span:nth-of-type(1),
.tpl-ruled-dossier .resume-head:not(:has(.avatar)) .contact > span:nth-of-type(3),
.tpl-ruled-dossier .resume-head:not(:has(.avatar)) .contact > span:nth-of-type(5),
.tpl-ruled-dossier .resume-head:not(:has(.avatar)) .contact > span:nth-of-type(7) {
  border-right: 1.5px solid #2b2b2b;
}

/* 旧「移除补位」规则已删：contactFlowLocked + ghostContact 下 7 格恒存在，
   不再有缺格补位场景（标签仍按 data-ci 随字段走，见下方 ::before 内容表） */

/* 标签列：浅灰底、右侧内竖线、粗黑字居中 */
.tpl-ruled-dossier .resume-name::before,
.tpl-ruled-dossier .contact span::before,
.tpl-ruled-dossier .resume-role::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--label-w, 36%);
  background: #f2f2f2;
  border-right: 1px solid #8a8a8a;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 10.5pt;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.tpl-ruled-dossier .resume-name::before { content: '姓名'; }
.tpl-ruled-dossier .resume-role::before { content: '求职意向'; }
.tpl-ruled-dossier .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-ruled-dossier .contact [data-ci='gender']::before { content: '性别'; }
.tpl-ruled-dossier .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-ruled-dossier .contact [data-ci='phone']::before { content: '电话'; }
.tpl-ruled-dossier .contact [data-ci='city']::before { content: '现住'; }
.tpl-ruled-dossier .contact [data-ci='degree']::before { content: '学历'; }
.tpl-ruled-dossier .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-ruled-dossier .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-ruled-dossier .contact [data-ci='website']::before { content: '主页'; }
.tpl-ruled-dossier .contact [data-ci^='cf-']::before { content: '补充信息'; }
.tpl-ruled-dossier .contact [data-ci^='cf-'][title]:not([title=''])::before { content: attr(title); }

/* 长邮箱单独收半号：常见邮箱在右列一行内完整显示，不省略、不截断 */
.tpl-ruled-dossier .contact [data-ci='email'] {
  font-size: 9.5pt;
}

/* ── 正文板块：通栏浅灰分节带 + 通栏内容，左右边框与信息表拼成整页外框 ── */
.resume.tpl-ruled-dossier .resume-section {
  position: relative;
  margin: 0 !important;
  padding: 0 0 4.5mm;
  border-left: 1.5px solid #2b2b2b;
  border-right: 1.5px solid #2b2b2b;
  border-bottom: 1px solid #8a8a8a;
}

/* 末个板块底线收口为外框 */
.resume.tpl-ruled-dossier .resume-section:last-of-type {
  border-bottom: 1.5px solid #2b2b2b;
}

.tpl-ruled-dossier .section-heading {
  margin: 0 0 3.5mm;
  padding: 3.1mm 3mm;
  background: #f2f2f2;
  border-top: 0;
  border-bottom: 1px solid #8a8a8a;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 11.5pt;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-align: center;
  break-after: avoid-page;
  page-break-after: avoid;
}

/* 内容区左右各留 3mm，灰带与横线仍通栏到外框 */
.tpl-ruled-dossier .resume-section > *:not(.section-heading) {
  margin-left: 3mm;
  margin-right: 3mm;
}

.tpl-ruled-dossier .resume-section > .section-heading + * {
  margin-top: 3.5mm;
}

/* 三段式条目：日期（左）｜单位（中）｜职务/专业（右），首行加粗 */
.tpl-ruled-dossier .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
  break-inside: avoid;
}

.tpl-ruled-dossier .item-top {
  display: contents;
}

.tpl-ruled-dossier .item-date,
.tpl-ruled-dossier .item-title,
.tpl-ruled-dossier .item-sub {
  grid-row: 1;
  margin: 0;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 10.5pt;
  font-weight: 700;
}

.tpl-ruled-dossier .item-date {
  grid-column: 1;
  justify-self: start;
}

.tpl-ruled-dossier .item-title {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-ruled-dossier .item-sub {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

/* 工作经历的 DOM 是 title=职位 / sub=公司，与参考版「公司居中、职位居右」对调 */
.tpl-ruled-dossier [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-ruled-dossier [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-ruled-dossier .item-desc {
  grid-row: 2;
  grid-column: 1 / -1;
  margin-top: 3px;
  font-size: 10pt;
  line-height: 1.6;
}

/* 实心圆点列表：条目成果与技能描述行 */
.tpl-ruled-dossier .rich-list,
.tpl-ruled-dossier .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
}

.tpl-ruled-dossier .rich-list li,
.tpl-ruled-dossier .skill-lines li {
  position: relative;
  padding-left: 16px;
  margin-top: 2px;
}

.tpl-ruled-dossier .rich-list li::before,
.tpl-ruled-dossier .skill-lines li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1a1a1a;
}

.tpl-ruled-dossier .skill-lines strong {
  color: #111;
}

/* 纯文本板块（自我评价等）与框线之间保持同样的左右留白 */
.tpl-ruled-dossier .summary {
  font-size: 10pt;
  line-height: 1.65;
}

/* 表格式版式不使用任何强调色，主题色切换只影响极少数继承元素 */
.tpl-ruled-dossier .item-title,
.tpl-ruled-dossier .item-sub {
  color: #1a1a1a;
}

/* ── 折角档案（结构还原，视觉参数自研）──────────────────────────────────
   参考版式：顶部满宽浅灰刊头居中压缩粗体「PERSONAL RESUME」；
   分节标题 = 通栏细线边框条 + 左端深藏蓝圆形图标（白色简笔 glyph）+
   右上狗耳折角；「基本信息」条内嵌在抬头区，照片居左、
   姓名大字距 + 双列「两端分散对齐标签：值」字段；
   条目三段式「日期｜单位｜职务」加粗，列表统一编号数字。
   全篇黑白灰 + 藏蓝图标（#393C4D），宋黑皆黑体无衬线。 ── */

.tpl-fold-dossier {
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 10.5pt;
  line-height: 1.7;
}

/* 折角与图标统一走主题色；刊头/边条是身份结构色保持硬编码 */
.tpl-fold-dossier {
  --fold-ink: var(--accent, #393c4d);
  --fold-line: #454a63;
}

/* ── 顶部浅灰刊头：满宽出血，绝对定位在纸张顶边 ──
   用户页边距 8–28mm 内联 !important 注入，用 max() 保证内容
   始终落在刊头（14.5mm）之下并留 ≥3mm 间距 */
.resume.tpl-fold-dossier::before {
  content: 'PERSONAL RESUME';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14.5mm;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
  color: #111;
  font-family: 'Oswald', 'Arial Narrow', 'Helvetica Neue', 'PingFang SC', sans-serif;
  font-size: 16.5pt;
  font-weight: 700;
  font-stretch: condensed;
  letter-spacing: 0.05em;
}

/* ── 抬头区：刊头下留白 + 网格（照片列 + 双列字段）── */
.tpl-fold-dossier .resume-head.head-center {
  position: relative;
  display: grid;
  grid-template-columns: 30mm 1fr 1fr;
  column-gap: 5mm;
  row-gap: 0;
  margin-top: max(3mm, calc(17.5mm - var(--tpl-page-margin, 18mm)));
  text-align: left;
}

/* 无头像时收掉照片列 */
.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) {
  grid-template-columns: 1fr 1fr;
}

/* 「基本信息」分节条：与正文分节条同构（细线边框 + 折角），
   边框不用 border 属性（折角三角要盖住角落线），全部用背景渐变画线 */
.tpl-fold-dossier .resume-head.head-center::before {
  content: '基本信息';
  grid-column: 1 / -1;
  grid-row: 1;
  height: 9.5mm;
  margin-bottom: 5mm;
  padding-left: 12mm;
  display: flex;
  align-items: center;
  color: #111;
  font-size: 11pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  background:
    /* 狗耳折角：右上角深色三角 */
    linear-gradient(to bottom left, var(--fold-ink) 50%, rgba(255, 255, 255, 0) 50.5%)
      no-repeat right top / 5mm 5mm,
    /* 顶线：右端给折角让位 */
    linear-gradient(var(--fold-line), var(--fold-line))
      no-repeat left top / calc(100% - 5mm) 1.5px,
    /* 右线：从折角下沿到底 */
    linear-gradient(var(--fold-line), var(--fold-line))
      no-repeat right bottom / 1.5px calc(100% - 5mm),
    linear-gradient(var(--fold-line), var(--fold-line))
      no-repeat left bottom / 100% 1.5px,
    linear-gradient(var(--fold-line), var(--fold-line))
      no-repeat left top / 1.5px 100%,
    #fff;
}

/* 基本信息条的人形圆标：压在条左端上，绝对定位不占格 */
.tpl-fold-dossier .resume-head.head-center::after {
  content: '';
  position: absolute;
  /* 条是抬头网格第一行（高 9.5mm）：圆 11.5mm 居中于条 → top = (9.5-11.5)/2 */
  top: -1mm;
  left: -5.5mm;
  width: 11.5mm;
  height: 11.5mm;
  border-radius: 50%;
  background:
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 12.2a4.3 4.3 0 1 0 0-8.6 4.3 4.3 0 0 0 0 8.6Zm-8.2 9.6v-.9c0-4 3.7-6.5 8.2-6.5s8.2 2.5 8.2 6.5v.9H3.8Z'/%3E%3C/svg%3E")
      center / 55% no-repeat,
    var(--fold-ink);
}

.tpl-fold-dossier .identity,
.tpl-fold-dossier .contact {
  display: contents;
}

.tpl-fold-dossier .contact {
  max-width: none;
}

/* 姓名：大字距档案头 */
.tpl-fold-dossier .resume-name {
  grid-column: 2 / -1;
  grid-row: 2;
  margin: 0 0 2mm;
  color: #111;
  font-size: 16.5pt;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.3em;
}

.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .resume-name {
  grid-column: 1 / -1;
}

/* 求职意向行 */
.tpl-fold-dossier .resume-role {
  grid-column: 2 / -1;
  grid-row: 3;
  margin: 0 0 3.5mm;
  color: #222;
  font-size: 10.5pt;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}

.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .resume-role {
  grid-column: 1 / -1;
}

/* 无头像：字段列整体左移一格（原 2/3 列在两列网格里会挤出隐式第 3 列） */
.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .contact [data-ci='birthDate'],
.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .contact [data-ci='city'],
.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .contact [data-ci='ethnicity'] {
  grid-column: 1;
}

.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .contact [data-ci='phone'],
.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .contact [data-ci='email'],
.tpl-fold-dossier .resume-head.head-center:not(:has(.avatar)) .contact [data-ci='wechat'] {
  grid-column: 2;
}

.tpl-fold-dossier .resume-role::before {
  content: '求职意向：';
  color: #222;
  font-weight: 600;
}

/* 字段格：浮动标签两端分散对齐（content 由下方各字段规则给），
   冒号绝对定位在标签列之后，值从 5.4em 起（折行悬挂对齐）。
   标签列 4.2em：容纳最长的 4 字标签「出生年月」，2 字标签分散铺满 */
.tpl-fold-dossier .contact span.ci {
  display: block;
  position: relative;
  min-width: 0;
  margin: 0 0 2.6mm;
  padding-left: 5.4em;
  color: #333;
  font-size: 10pt;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.tpl-fold-dossier .contact .ci svg {
  display: none;
}

.tpl-fold-dossier .contact span.ci::before {
  float: left;
  width: 4.2em;
  /* 负缩进与 padding-left(5.4em) 对齐：标签从格子左缘起，
     结束于 4.2em 处，冒号紧随其后，值从 5.4em 起 */
  margin-left: -5.4em;
  color: #333;
  font-weight: 400;
  text-align: justify;
  text-align-last: justify;
}

.tpl-fold-dossier .contact span.ci::after {
  content: '：';
  position: absolute;
  left: 4.2em;
  top: 0;
}

/* 双列布局：左列 出生年月/现居/籍贯，右列 手机/邮箱/微信 */
.tpl-fold-dossier .contact [data-ci='birthDate'] { grid-column: 2; grid-row: 4; }
.tpl-fold-dossier .contact [data-ci='phone']     { grid-column: 3; grid-row: 4; }
.tpl-fold-dossier .contact [data-ci='city']      { grid-column: 2; grid-row: 5; }
.tpl-fold-dossier .contact [data-ci='email']     { grid-column: 3; grid-row: 5; }
.tpl-fold-dossier .contact [data-ci='ethnicity'] { grid-column: 2; grid-row: 6; }
.tpl-fold-dossier .contact [data-ci='wechat']    { grid-column: 3; grid-row: 6; }

/* 参考版式是固定 6 格：性别/学历/主页/政治面貌/自定义字段不进信息区，
   数据保留（其它模板可展示） */
.tpl-fold-dossier .contact span[data-ci='gender'],
.tpl-fold-dossier .contact span[data-ci='degree'],
.tpl-fold-dossier .contact span[data-ci='website'],
.tpl-fold-dossier .contact span[data-ci='political'],
.tpl-fold-dossier .contact span[data-ci^='cf-'] {
  display: none;
}

/* 标签文案 */
.tpl-fold-dossier .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-fold-dossier .contact [data-ci='phone']::before { content: '手机'; }
.tpl-fold-dossier .contact [data-ci='city']::before { content: '现居'; }
.tpl-fold-dossier .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-fold-dossier .contact [data-ci='ethnicity']::before { content: '籍贯'; }
.tpl-fold-dossier .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-fold-dossier .contact [data-ci^='cf-']::before { content: attr(title); }

/* 同行另一半缺失时占满整行，不留空列 */
.tpl-fold-dossier .resume-head:not(:has([data-ci='phone'])) [data-ci='birthDate'],
.tpl-fold-dossier .resume-head:not(:has([data-ci='birthDate'])) [data-ci='phone'],
.tpl-fold-dossier .resume-head:not(:has([data-ci='email'])) [data-ci='city'],
.tpl-fold-dossier .resume-head:not(:has([data-ci='city'])) [data-ci='email'],
.tpl-fold-dossier .resume-head:not(:has([data-ci='wechat'])) [data-ci='ethnicity'],
.tpl-fold-dossier .resume-head:not(:has([data-ci='ethnicity'])) [data-ci='wechat'] {
  grid-column: 2 / -1;
}


/* 证件照：左侧通贯字段区，5:7 直角 */
/* 证件照：外层 avatar-cell 占左列格位（min-height 保证抬头高度），
   内层 img 响应头像形状——默认贴满格位，方形/3:4/圆形按比例居中 */
.tpl-fold-dossier .resume-head .avatar-cell {
  grid-column: 1;
  grid-row: 2 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 40mm;
  overflow: hidden;
}

.tpl-fold-dossier .resume-head .avatar-cell .avatar {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：按所选比例在格内居中 */
.tpl-fold-dossier .resume-head .avatar-cell .avatar.avatar-shape-three-four {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  max-height: 100%;
}

.tpl-fold-dossier .resume-head .avatar-cell .avatar.avatar-shape-square {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 100%;
}

.tpl-fold-dossier .resume-head .avatar-cell .avatar.avatar-shape-circle {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 100%;
  border-radius: 50%;
}

/* ── 正文分节条：细线边框 + 左端圆标 + 右上狗耳折角 ── */
.resume.tpl-fold-dossier .resume-section {
  margin-top: 7mm;
}

.tpl-fold-dossier .section-heading {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 9.5mm;
  margin: 0 0 5mm;
  padding: 0 10px 0 12mm;
  border: 1.5px solid var(--fold-line);
  background: #fff;
  color: #111;
  font-size: 11pt;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  break-after: avoid-page;
  page-break-after: avoid;
}

/* 圆形图标：压在条左端上 */
.tpl-fold-dossier .section-heading::before {
  content: '';
  position: absolute;
  left: -5.5mm;
  top: 50%;
  transform: translateY(-50%);
  width: 11.5mm;
  height: 11.5mm;
  border-radius: 50%;
  background:
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M7 2h11a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5l2-3Zm1 8h8v1.6H8V10Zm0 4h8v1.6H8V14Z'/%3E%3C/svg%3E")
      center / 55% no-repeat,
    var(--fold-ink);
}

/* 狗耳折角：盖住右上角边框线 */
.tpl-fold-dossier .section-heading::after {
  content: '';
  position: absolute;
  top: -1.5px;
  right: -1.5px;
  width: 5.2mm;
  height: 5.2mm;
  background: linear-gradient(to bottom left, var(--fold-ink) 50%, rgba(255, 255, 255, 0) 50.5%);
}

/* 分节图标：教育=学位帽 工作=公文包 项目=文件夹 技能=奖杯 自评=对话泡 */
.tpl-fold-dossier [data-section='education'] .section-heading::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 3 1 8.3l11 5.3 9-4.3v6h2V8.3L12 3Zm-6.2 8.7v3.5c0 1.9 2.8 3.4 6.2 3.4s6.2-1.5 6.2-3.4v-3.5L12 14.6l-6.2-2.9Z'/%3E%3C/svg%3E");
}

.tpl-fold-dossier [data-section='experience'] .section-heading::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M9 6V5a3 3 0 0 1 6 0v1h4a1 1 0 0 1 1 1v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a1 1 0 0 1 1-1h4Zm2 0h2V5a1 1 0 0 0-2 0v1Zm-2 4.5h6V12H9v-1.5Z'/%3E%3C/svg%3E");
}

.tpl-fold-dossier [data-section='projects'] .section-heading::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3 6a2 2 0 0 1 2-2h4.6l2 2H19a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6Z'/%3E%3C/svg%3E");
}

.tpl-fold-dossier [data-section='skills'] .section-heading::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M7 2h10v2h4v3a5 5 0 0 1-5 5h-.4a6 6 0 0 1-2.1 2.4V17h3v3H8v-3h3v-2.2A6 6 0 0 1 8.9 12H8a5 5 0 0 1-5-5V4h4V2ZM5 6v1a3 3 0 0 0 2 2.8V6H5Zm14 0h-2v3.8A3 3 0 0 0 19 7V6Z'/%3E%3C/svg%3E");
}

.tpl-fold-dossier [data-section='profile'] .section-heading::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M7 3h12a3 3 0 0 1 3 3v7a3 3 0 0 1-3 3h-8.4L5 20.6V6a3 3 0 0 1 2-3Z'/%3E%3C/svg%3E");
}

/* ── 条目：三段式「日期｜单位｜职务」，全部加粗 ──
   item-top 以 display:contents 摊开，title/date 与 sub 成为同一网格的项 */
.tpl-fold-dossier .item-top {
  display: contents;
}

.tpl-fold-dossier .resume-section .item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 14px;
  align-items: baseline;
  margin: 0 0 3mm;
}

.tpl-fold-dossier .item-date,
.tpl-fold-dossier .item-title,
.tpl-fold-dossier .item-sub {
  grid-row: 1;
  margin: 0;
  color: #111;
  font-size: 10.5pt;
  font-weight: 700;
}

.tpl-fold-dossier .item-date {
  grid-column: 1;
  justify-self: start;
}

.tpl-fold-dossier .item-title {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-fold-dossier .item-sub {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

/* 工作经历 DOM 是 title=职位 / sub=公司，对调成「公司居中、职位居右」 */
.tpl-fold-dossier [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-fold-dossier [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-fold-dossier .item-desc {
  grid-row: 2;
  grid-column: 1 / -1;
  margin-top: 2px;
  color: #333;
  font-size: 10pt;
  line-height: 1.75;
}

/* ── 技能行 / 普通圆点列表：默认只用圆点，不出编号；
   用户显式有序列表（ol[data-list='number']，来自富文本「有序列表」）
   由文件末尾全局规则接管为原生 decimal ── */
.tpl-fold-dossier .rich-list,
.tpl-fold-dossier .skill-lines {
  margin: 1mm 0 0;
  padding-left: 0;
  list-style: none;
  color: #333;
  font-size: 10pt;
  line-height: 1.75;
}

.tpl-fold-dossier .rich-list > li,
.tpl-fold-dossier .skill-lines > li {
  position: relative;
  margin-top: 2px;
  padding-left: 15px;
}

.tpl-fold-dossier .rich-list > li::before,
.tpl-fold-dossier .skill-lines > li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #333;
}

.tpl-fold-dossier .skill-lines strong {
  color: #111;
}

/* 自我评价等纯文本段落：宽行距 */
.tpl-fold-dossier .summary {
  color: #333;
  font-size: 10pt;
  line-height: 1.9;
}

/* 主题色只染圆标与折角，正文保持全黑灰 */
.tpl-fold-dossier .item-title,
.tpl-fold-dossier .item-sub {
  color: #111;
}

/* ── 显式数字列表（data-list='number'）的全局渲染保障 ─────────────────────
   富文本工具栏「有序列表」把行序列化成 `1. ` 前缀，rich() 原样还原成
   ol.rich-list[data-list='number']；数字走原生 decimal，
   并清掉 47 套模板各自的 `.tpl-xxx .rich-list li::before` 圆点参数。
   本段必须放在模板库末尾：预览 / PDF / 缩略图同源。 ── */
.resume .resume-section ol.rich-list[data-list='number'],
.resume .resume-section ol.skill-lines[data-list='number'] {
  list-style: decimal outside !important;
  padding-left: 1.7em !important;
}

.resume .resume-section [data-list='number'] > li::marker {
  color: var(--accent, #111827);
  font-weight: 700;
}

.resume .resume-section ol[data-list='number'] > li {
  padding-left: 0 !important;
}

.resume .resume-section ol[data-list='number'] > li::before {
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  border-radius: 0 !important;
}

/* ── 技能板块列表标记（板块级开关，2026-11-07 定稿）────────────────────
   默认无任何标记（压掉 47 套模板各自的 .skill-lines li::before 圆点）；
   编辑器「无序/有序列表」按钮整块切换 style.skillsList → 渲染成 data-list。
   本段必须放在模板库末尾：预览 / PDF / 缩略图同源。 ── */
.resume .resume-section ul.skill-lines:not([data-list]) {
  list-style: none !important;
}
.resume .resume-section ul.skill-lines:not([data-list]) > li {
  padding-left: 0 !important;
}
.resume .resume-section ul.skill-lines:not([data-list]) > li::before {
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  border-radius: 0 !important;
}
.resume .resume-section ul.skill-lines[data-list='bullet'] {
  /* 圆点由下方 li::before 提供，关掉原生 disc 防双标记（打印/缩略图不加载 styles.css） */
  list-style: none !important;
}
.resume .resume-section ul.skill-lines[data-list='bullet'] > li {
  position: relative !important;
  padding-left: 15px !important;
}
.resume .resume-section ul.skill-lines[data-list='bullet'] > li::before {
  content: '' !important;
  position: absolute !important;
  left: 2px !important;
  top: 0.62em !important;
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: currentColor !important;
}
.resume .resume-section ul.skill-lines[data-list='number'] {
  list-style: decimal outside !important;
  padding-left: 1.7em !important;
}
.resume .resume-section ul.skill-lines[data-list='number'] > li {
  padding-left: 0 !important;
}
.resume .resume-section ul.skill-lines[data-list='number'] > li::before {
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  border-radius: 0 !important;
}


/* ── 钢蓝灰带（结构借鉴，视觉表达自研）──────────────────────────────────
   骨架取自参考版式：版心内浅灰通栏头带（非出血）、头带内姓名与求职意向
   同行居中、双列分散对齐标签字段配右侧 3:4 直角证件照；分节标题 = 左端
   钢蓝实心色块（白字）接浅灰通栏带；日期/单位/身份三段式条目 + 实心
   圆点成果列表，全篇黑体无衬线。
   与 archive-band 的差异：分节标题是通栏色带（非拖尾细线）、全黑体、
   照片 3:4；蓝块消费 --accent（默认钢蓝 #5589B8 由 catalog 注入），
   灰带身份色 #D9D9D9 硬编码；头带位置跟随 --tpl-page-margin。 ── */
.tpl-steel-band {
  position: relative;
  padding: 10mm 13mm 12mm;
  color: #262626;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 9.5pt;
  line-height: 1.6;
}

/* 头带：版心满宽浅灰，上下不出血 */
.tpl-steel-band::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: var(--tpl-page-margin, 10mm);
  left: max(0mm, calc(var(--tpl-page-margin, 13mm) - 2mm));
  right: max(0mm, calc(var(--tpl-page-margin, 13mm) - 2mm));
  height: 12mm;
  background: #d9d9d9;
}

.tpl-steel-band .resume-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32mm;
  grid-template-rows: 12mm auto;
  column-gap: 4mm;
  row-gap: 2.5mm;
  align-items: start;
}

/* 用户移除头像后信息格铺满，右侧不留空槽 */
.tpl-steel-band .resume-head:not(:has(.avatar-cell)) {
  grid-template-columns: minmax(0, 1fr) 0;
  column-gap: 0;
}

/* 姓名与求职意向同行居中，整行落在浅灰头带内 */
.tpl-steel-band .identity {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6mm;
  min-width: fit-content;
  height: 12mm;
  text-align: center;
}

.tpl-steel-band .resume-name {
  margin: 0;
  color: #1a1a1a;
  font-size: 20pt;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.06em;
}

.tpl-steel-band .resume-role {
  margin: 0;
  color: #333;
  font-size: 10pt;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.tpl-steel-band .resume-role::before {
  content: '求职意向：';
  font-weight: 700;
  color: #1a1a1a;
}

/* 双列分散对齐标签字段：标签 justify 拉开到 4 字宽（出 生 年 月），值左对齐 */
/* 双列字段：列优先（multicol 垂直流动，先填满左列再到右列，同参考版式），
   列高自动平衡，字段多少都不会溢出。全局 .contact 是 flex，必须显式覆盖为块级 */
.tpl-steel-band .contact {
  display: block;
  grid-column: 1;
  grid-row: 2;
  column-count: 2;
  column-gap: 10mm;
  max-width: none;
  margin: 0;
  color: #262626;
  font-size: 9.5pt;
}

.tpl-steel-band .contact span.ci {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  column-gap: 1.5mm;
  align-items: baseline;
  min-width: 0;
  margin: 0 0 1.8mm;
  break-inside: avoid;
  white-space: normal;
  /* 联系方式绝不省略：长邮箱整串放不下时折行，折行后仍落在值列 */
  overflow-wrap: break-word;
  word-break: normal;
}

.tpl-steel-band .contact .ci svg {
  display: none;
}

/* 标签分散对齐：占满 4.2em 标签列（民 族 / 出 生 年 月 都撑满同宽）。
   这里只提供排版属性、不写 content——content 由下方各 [data-ci] 规则
   （特异性 0,3,0）注入，避免高特异性伪元素压掉字段文案 */
.tpl-steel-band .contact span.ci::before {
  text-align: justify;
  text-align-last: justify;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.tpl-steel-band .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-steel-band .contact [data-ci='gender']::before { content: '性别'; }
.tpl-steel-band .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-steel-band .contact [data-ci='city']::before { content: '住址'; }
.tpl-steel-band .contact [data-ci='degree']::before { content: '学历'; }
.tpl-steel-band .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-steel-band .contact [data-ci='height']::before { content: '身高'; }
.tpl-steel-band .contact [data-ci='school']::before { content: '毕业院校'; }
.tpl-steel-band .contact [data-ci='phone']::before { content: '电话'; }
.tpl-steel-band .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-steel-band .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-steel-band .contact [data-ci='website']::before { content: '主页'; }
.tpl-steel-band .contact [data-ci^='cf-']::before { content: attr(title); }

/* 3:4 直角证件照：绝对定位填满格位盒（不贡献行高），高度精确贯穿字段区；
   字段太少时由 min-height 保底 42mm，避免照片被压扁 */
.tpl-steel-band .avatar-cell {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  display: block;
  width: 32mm;
  min-height: 42mm;
  justify-self: end;
  align-self: stretch;
}

.tpl-steel-band .avatar-cell .avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #f3f3f3;
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：用户选择优先于模板默认贯穿式，退回固定尺寸 */
.tpl-steel-band .avatar-cell .avatar.avatar-shape-square,
.tpl-steel-band .avatar-cell .avatar.avatar-shape-circle {
  position: static;
  inset: auto;
  width: 34mm;
  height: 34mm;
}

.tpl-steel-band .avatar-cell .avatar.avatar-shape-circle {
  border-radius: 50%;
}

.tpl-steel-band .avatar-cell:has(.avatar-shape-square),
.tpl-steel-band .avatar-cell:has(.avatar-shape-circle) {
  min-height: 0;
  align-self: start;
}

/* 分节标题：左端钢蓝实心块（白粗体）+ 通栏浅灰带，等高相连 */
.tpl-steel-band .resume-section {
  margin-top: 5mm;
}

.tpl-steel-band .section-heading {
  display: flex;
  align-items: stretch;
  margin: 0 0 2.5mm;
  height: 7mm;
  background: #d9d9d9;
  color: #1a1a1a;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  break-after: avoid-page;
  page-break-after: avoid;
}

.tpl-steel-band .section-heading-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 25mm;
  padding: 0 3mm;
  background: var(--accent, #5589b8);
  color: #fff;
  text-align: center;
}

/* 三段式条目：日期（左）｜单位（中）｜身份（右），描述另起一行铺满 */
.tpl-steel-band .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.tpl-steel-band .item-top {
  display: contents;
}

.tpl-steel-band .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
}

.tpl-steel-band .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
}

.tpl-steel-band .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: right;
}

/* 工作经历 DOM 是 title=职位 / sub=公司：对调成「公司居中、职位居右」 */
.tpl-steel-band [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-steel-band [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-steel-band .item-desc,
.tpl-steel-band .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #333;
  font-size: 9pt;
  line-height: 1.65;
}

/* 圆点成果列表（用户以 `- ` 开头即生效）：实心黑点 + 悬挂缩进 */
.tpl-steel-band .rich-list,
.tpl-steel-band .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #333;
  font-size: 9pt;
}

.tpl-steel-band .rich-list li,
.tpl-steel-band .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-steel-band .rich-list li::before,
.tpl-steel-band .skill-lines li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a1a1a;
}

.tpl-steel-band .skill-lines strong {
  color: #1a1a1a;
}

/* ── 胶囊刊头（结构借鉴，视觉表达自研）──────────────────────────────────
   参考版式：钢蓝圆角刊头「个人简历｜RESUME」置顶，姓名入字段区成为
   首个字段格；双列「分散标签＋冒号＋值」字段（标签撑满 3.5em 同宽），
   右侧 5:7 直角证件照贯穿字段行；分节标题 = 两端圆角胶囊（白粗体）
   ＋钢蓝细拖尾线贯穿版心右缘；三段式条目 + 实心圆点列表。
   蓝色消费 --accent（默认 #5589B8 由 catalog 注入）。求职意向参考版式
   不显示（数据保留）。 ── */
.tpl-capsule-head {
  padding: 10mm 13mm 12mm;
  color: #262626;
  font-size: 9.5pt;
  line-height: 1.6;
}

.tpl-capsule-head .resume-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30mm;
  grid-template-rows: 12mm repeat(5, auto);
  column-gap: 6mm;
  row-gap: 1.6mm;
  grid-auto-flow: column;
  align-items: start;
}

/* 无头像：收掉照片列 */
/* 无头像：彻底收掉照片列并改行优先（左→右逐行填两列），
   避免列优先把字段堆在一列、另一列只剩一两个字段；
   0 宽第三列也要去掉，否则行流下每行第 3 个字段会被挤爆 */
.tpl-capsule-head .resume-head:not(:has(.avatar-cell)) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-auto-flow: row;
  column-gap: 4mm;
}

/* 刊头：钢蓝圆角大块（右端半圆），白粗体标题。
   占满整行（1/-1）防止 auto-flow column 的字段钻进第一行，块宽固定 */
.tpl-capsule-head .resume-head::before {
  content: '个人简历｜RESUME';
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-self: start;
  padding: 0 8mm;
  width: 78mm;
  height: 12mm;
  background: var(--accent, #5589b8);
  border-radius: 0 999px 999px 0;
  color: #fff;
  font-size: 16pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
}

/* 姓名成为字段区首个字段格（分散标签＋冒号）。
   order：before(-2) → after 冒号(-1) → 值文本(匿名 item 默认 0)，
   保证冒号紧跟标签而不是排在值后面 */
.tpl-capsule-head .resume-name {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  /* 全局 .ci 的 flex gap:6px 会插进标签/冒号/值之间，必须归零 */
  gap: 0;
  align-items: baseline;
  margin: 0;
  min-width: 0;
  color: #262626;
  font-size: 9.5pt;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tpl-capsule-head .resume-name::before {
  content: '姓名';
  order: -2;
  flex: 0 0 3.5em;
  margin-right: 0.5em;
  text-align: justify;
  text-align-last: justify;
  font-weight: 700;
  color: #1a1a1a;
}

.tpl-capsule-head .resume-name::after {
  content: '：';
  order: -1;
  font-weight: 700;
  color: #1a1a1a;
}

/* 求职意向：参考版式无此行，不渲染（数据保留） */
.tpl-capsule-head .resume-role {
  display: none;
}

/* 字段格：分散标签＋冒号＋值；auto-flow column 自动填左列余下行再到右列 */
.tpl-capsule-head .contact {
  display: contents;
  max-width: none;
}

.tpl-capsule-head .contact span.ci {
  display: flex;
  gap: 0;
  align-items: baseline;
  min-width: 0;
  margin: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;

  /* 长邮箱可收缩换行：anywhere 会降低匿名文本项的 min-content，避免压到相邻列 */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;}

.tpl-capsule-head .contact .ci svg {
  display: none;
}

/* 标签：只提供排版属性，content 由 [data-ci] 规则注入。
   order：before(-2) → after 冒号(-1) → 值文本(匿名 item 默认 0) */
.tpl-capsule-head .contact span.ci::before {
  order: -2;
  flex: 0 0 3.5em;
  margin-right: 0.5em;
  text-align: justify;
  text-align-last: justify;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;

  /* 标签不参与收缩，避免被压成竖排 */
  flex: 0 0 auto;
  white-space: nowrap;}

.tpl-capsule-head .contact span.ci::after {
  content: '：';
  order: -1;
  font-weight: 700;
  color: #1a1a1a;
}

.tpl-capsule-head .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-capsule-head .contact [data-ci='gender']::before { content: '性别'; }
.tpl-capsule-head .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-capsule-head .contact [data-ci='city']::before { content: '住址'; }
.tpl-capsule-head .contact [data-ci='degree']::before { content: '学历'; }
.tpl-capsule-head .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-capsule-head .contact [data-ci='height']::before { content: '身高'; }
.tpl-capsule-head .contact [data-ci='school']::before { content: '毕业院校'; }
.tpl-capsule-head .contact [data-ci='phone']::before { content: '电话'; }
.tpl-capsule-head .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-capsule-head .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-capsule-head .contact [data-ci='website']::before { content: '主页'; }
.tpl-capsule-head .contact [data-ci^='cf-']::before { content: attr(title); }

/* 字段容量：2 列 × 5 行 − 姓名格 = 9 个，多余字段不渲染（数据保留）。
   必须拦在 9 个：auto-flow column 扫描会先填 col1(姓名下方 4 格) 再 col2，
   第 10 个 span 会钻进照片列之外或第一行 */
.tpl-capsule-head .contact span:nth-of-type(n + 9) {
  display: none;
}

/* 证件照：第 3 列贯穿字段行，直角无边框 */
.tpl-capsule-head .avatar-cell {
  grid-column: 3;
  grid-row: 2 / 7;
  display: block;
  width: 30mm;
  justify-self: end;
  align-self: start;
}

.tpl-capsule-head .avatar-cell .avatar {
  width: 30mm;
  height: 42mm;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #f3f3f3;
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：用户选择优先于模板默认 5:7 */
.tpl-capsule-head .avatar-cell .avatar.avatar-shape-three-four {
  width: 30mm;
  height: 40mm;
}

.tpl-capsule-head .avatar-cell .avatar.avatar-shape-square {
  width: 32mm;
  height: 32mm;
}

.tpl-capsule-head .avatar-cell .avatar.avatar-shape-circle {
  width: 32mm;
  height: 32mm;
  border-radius: 50%;
}

/* 分节标题：两端圆角胶囊（白粗体）＋ 钢蓝细拖尾线贯穿版心右缘 */
.tpl-capsule-head .resume-section {
  margin-top: 5mm;
}

.tpl-capsule-head .section-heading {
  display: flex;
  align-items: center;
  gap: 4mm;
  margin: 0 0 2.5mm;
  color: #1a1a1a;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  break-after: avoid-page;
  page-break-after: avoid;
}

.tpl-capsule-head .section-heading-text {
  flex: 0 0 auto;
  padding: 1.2mm 6mm 1.6mm;
  background: var(--accent, #5589b8);
  border-radius: 999px;
  color: #fff;
  text-align: center;
}

.tpl-capsule-head .section-heading::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--accent, #5589b8);
  opacity: 0.75;
}

/* 三段式条目：日期（左）｜单位（中）｜身份（右），描述另起一行铺满 */
.tpl-capsule-head .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.tpl-capsule-head .item-top {
  display: contents;
}

.tpl-capsule-head .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
}

.tpl-capsule-head .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
}

.tpl-capsule-head .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: right;
}

/* 工作经历 DOM 是 title=职位 / sub=公司：对调成「公司居中、职位居右」 */
.tpl-capsule-head [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-capsule-head [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-capsule-head .item-desc,
.tpl-capsule-head .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #333;
  font-size: 9pt;
  line-height: 1.65;
}

/* 圆点成果列表（用户以 `- ` 开头即生效） */
.tpl-capsule-head .rich-list,
.tpl-capsule-head .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #333;
  font-size: 9pt;
}

.tpl-capsule-head .rich-list li,
.tpl-capsule-head .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-capsule-head .rich-list li::before,
.tpl-capsule-head .skill-lines li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a1a1a;
}

.tpl-capsule-head .skill-lines strong {
  color: #1a1a1a;
}

/* ── 图标色签（结构借鉴，视觉表达自研）──────────────────────────────────
   参考版式：左侧 5:7 直角证件照，右侧姓名大字、求职意向与双列「粗体标签＋
   冒号＋值」字段；分节标题 = 白图标小方块（钢蓝底）＋ 蓝色标题块（右端
   箭头尖）＋ 浅灰错位箭头影子 ＋ 浅灰细线贯穿版心右缘；三段式条目 +
   实心圆点列表。标题块固定宽（四字标题对齐），图标按板块切换。
   蓝色消费 --accent（默认 #4E85B5 由 catalog 注入）。 ── */
.tpl-icon-chip {
  padding: 10mm 13mm 12mm;
  color: #262626;
  font-size: 9.5pt;
  line-height: 1.6;
}

.tpl-icon-chip .resume-head {
  display: grid;
  grid-template-columns: 30mm minmax(0, 1fr);
  column-gap: 7mm;
  row-gap: 3mm;
  align-items: start;
}

/* 无头像：信息区铺满 */
.tpl-icon-chip .resume-head:not(:has(.avatar-cell)) {
  grid-template-columns: minmax(0, 1fr);
}

/* 无头像：身份与字段块移回第 1 列（原 grid-column:2 会在单列网格里落入隐式列，左侧留大空白） */
.tpl-icon-chip .resume-head:not(:has(.avatar-cell)) .identity,
.tpl-icon-chip .resume-head:not(:has(.avatar-cell)) .contact {
  grid-column: 1;
}

.tpl-icon-chip .avatar-cell {
  grid-column: 1;
  grid-row: 1 / 3;
  display: block;
  width: 30mm;
}

.tpl-icon-chip .avatar-cell .avatar {
  width: 30mm;
  height: 42mm;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #f3f3f3;
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：用户选择优先于模板默认 5:7 */
.tpl-icon-chip .avatar-cell .avatar.avatar-shape-three-four {
  width: 30mm;
  height: 40mm;
}

.tpl-icon-chip .avatar-cell .avatar.avatar-shape-square {
  width: 32mm;
  height: 32mm;
}

.tpl-icon-chip .avatar-cell .avatar.avatar-shape-circle {
  width: 32mm;
  height: 32mm;
  border-radius: 50%;
}

/* 姓名 + 求职意向：左对齐堆叠（head-center 全局样式默认居中，必须覆盖） */
.tpl-icon-chip .identity {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  text-align: left;
  justify-items: start;
}

.tpl-icon-chip .resume-name {
  margin: 0 0 2mm;
  color: #1a1a1a;
  font-size: 20pt;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.tpl-icon-chip .resume-role {
  margin: 0;
  color: #333;
  font-size: 10pt;
  font-weight: 400;
}

.tpl-icon-chip .resume-role::before {
  content: '求职意向：';
  font-weight: 700;
  color: #1a1a1a;
}

/* 双列字段：粗体标签＋冒号＋值 */
.tpl-icon-chip .contact {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10mm;
  row-gap: 1.8mm;
  align-content: start;
  max-width: none;
  margin: 0;
  font-size: 9.5pt;
  justify-content: flex-start;
}

.tpl-icon-chip .contact span.ci {
  display: flex;
  /* 全局 .ci 的 flex gap:6px 会插进标签/冒号/值之间，必须归零 */
  gap: 0;
  align-items: baseline;
  min-width: 0;
  margin: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;

  /* 长邮箱可收缩换行：anywhere 会降低匿名文本项的 min-content，避免压到相邻列 */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;}

.tpl-icon-chip .contact .ci svg {
  display: none;
}

/* 标签：只提供排版属性，content 由 [data-ci] 规则注入。
   order：before(-2) → after 冒号(-1) → 值文本(匿名 item 默认 0)，
   保证冒号紧跟标签 */
.tpl-icon-chip .contact span.ci::before {
  order: -2;
  flex: 0 0 auto;
  margin-right: 0.25em;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.tpl-icon-chip .contact span.ci::after {
  content: '：';
  order: -1;
  font-weight: 700;
  color: #1a1a1a;
}

.tpl-icon-chip .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-icon-chip .contact [data-ci='gender']::before { content: '性别'; }
.tpl-icon-chip .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-icon-chip .contact [data-ci='city']::before { content: '现居'; }
.tpl-icon-chip .contact [data-ci='degree']::before { content: '学历'; }
.tpl-icon-chip .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-icon-chip .contact [data-ci='height']::before { content: '身高'; }
.tpl-icon-chip .contact [data-ci='school']::before { content: '毕业院校'; }
.tpl-icon-chip .contact [data-ci='phone']::before { content: '手机'; }
.tpl-icon-chip .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-icon-chip .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-icon-chip .contact [data-ci='website']::before { content: '主页'; }
.tpl-icon-chip .contact [data-ci^='cf-']::before { content: attr(title); }

/* 分节标题：图标方块 ＋ 箭头标题块 ＋ 浅灰错位箭头影子 ＋ 细线拖尾。
   标题块固定宽（四字标题对齐，短标题居中）；细线画在 heading 背景
   垂直中心，蓝块不透明自然盖住左段 */
.tpl-icon-chip .resume-section {
  margin-top: 5mm;
}

.tpl-icon-chip .section-heading {
  position: relative;
  display: flex;
  align-items: center;
  height: 9mm;
  margin: 0 0 2.5mm;
  background: linear-gradient(#c9c9c9, #c9c9c9) no-repeat 0 50% / 100% 1px;
  color: #1a1a1a;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  break-after: avoid-page;
  page-break-after: avoid;
}

/* 图标方块：钢蓝底白图标（随板块切换），与标题块之间留白缝 */
.tpl-icon-chip .section-heading::before {
  content: '';
  flex: 0 0 auto;
  width: 9mm;
  height: 9mm;
  margin-right: 2.5mm;
  background-color: var(--accent, #4e85b5);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 55%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.tpl-icon-chip [data-section='education'] .section-heading::before,
.tpl-icon-chip [data-section='certs'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9 12 4l10 5-10 5L2 9Z'/%3E%3Cpath d='M6 11v5c3 2.5 9 2.5 12 0v-5'/%3E%3C/svg%3E");
}

.tpl-icon-chip [data-section='experience'] .section-heading::before,
.tpl-icon-chip [data-section='projects'] .section-heading::before,
.tpl-icon-chip [data-section='campus'] .section-heading::before,
.tpl-icon-chip [data-section='research'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E");
}

.tpl-icon-chip [data-section='skills'] .section-heading::before,
.tpl-icon-chip [data-section='languages'] .section-heading::before,
.tpl-icon-chip [data-section='honors'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.6 6.4L21 11l-6.4 2.6L12 20l-2.6-6.4L3 11l6.4-2.6L12 2Z'/%3E%3C/svg%3E");
}

.tpl-icon-chip [data-section='profile'] .section-heading::before,
.tpl-icon-chip [data-section='selfEval'] .section-heading::before,
.tpl-icon-chip [data-section='hobbies'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z'/%3E%3C/svg%3E");
}

/* 标题块：固定宽 + 右端箭头尖（::after 无缝衔接） */
.tpl-icon-chip .section-heading-text {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34mm;
  height: 9mm;
  padding: 0 4mm;
  background: var(--accent, #4e85b5);
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

.tpl-icon-chip .section-heading-text::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 0;
  width: 5mm;
  height: 100%;
  background: var(--accent, #4e85b5);
  clip-path: polygon(0 0, 0 100%, 100% 50%);
}

/* 浅灰错位箭头影子：绝对定位在标题块右侧（块宽固定所以可算） */
.tpl-icon-chip .section-heading::after {
  content: '';
  position: absolute;
  left: calc(9mm + 2.5mm + 34mm + 3.5mm);
  top: 0;
  width: 5mm;
  height: 9mm;
  background: #d9d9d9;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
}

/* 三段式条目：日期（左）｜单位（中）｜身份（右），描述另起一行铺满 */
.tpl-icon-chip .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.tpl-icon-chip .item-top {
  display: contents;
}

.tpl-icon-chip .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
}

.tpl-icon-chip .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
}

.tpl-icon-chip .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: right;
}

/* 工作经历 DOM 是 title=职位 / sub=公司：对调成「公司居中、职位居右」 */
.tpl-icon-chip [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-icon-chip [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-icon-chip .item-desc,
.tpl-icon-chip .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #333;
  font-size: 9pt;
  line-height: 1.65;
}

/* 圆点成果列表（用户以 `- ` 开头即生效） */
.tpl-icon-chip .rich-list,
.tpl-icon-chip .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #333;
  font-size: 9pt;
}

.tpl-icon-chip .rich-list li,
.tpl-icon-chip .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-icon-chip .rich-list li::before,
.tpl-icon-chip .skill-lines li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a1a1a;
}

.tpl-icon-chip .skill-lines strong {
  color: #1a1a1a;
}

/* ── 蓝笺卡纸（结构借鉴，视觉表达自研）──────────────────────────────────
   参考版式：整页钢蓝出血底 + 白色圆角大卡纸（蓝边约 5mm、卡圆角 3mm），
   卡内姓名与求职意向同行、双列信息字段（列优先）配右上 3:4 证件照；
   分节标题 = 钢蓝圆角块（白图标 + 白字连体，无拖尾线）；三段式条目 +
   圆点/数字列表。蓝色消费 --accent（默认 #5589B8 由 catalog 注入）。
   print 链路中 .resume 即整页盒（页边距是其 padding）：蓝底 = .resume
   自身背景铺满全页，白卡 = ::after 固定 inset 5mm，随页边距无关恒定。 ── */
.tpl-paper-card {
  position: relative;
  background: var(--accent, #558bb9);
  padding: calc(var(--tpl-page-margin, 14mm) + 3mm);
  color: #262626;
  font-size: 9.5pt;
  line-height: 1.6;
}

/* 白色圆角卡纸：距页缘恒 5mm（蓝边 5mm） */
.tpl-paper-card::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 5mm;
  left: 5mm;
  right: 5mm;
  bottom: 5mm;
  background: #fff;
  border-radius: 3mm;
}

.tpl-paper-card > * {
  position: relative;
  z-index: 1;
}

/* 头部：姓名+意向（左两列同行）｜右上照片，下方双列字段 */
.tpl-paper-card .resume-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30mm;
  grid-template-rows: auto auto;
  column-gap: 6mm;
  row-gap: 3mm;
  align-items: start;
}

/* 无头像：信息区铺满 */
.tpl-paper-card .resume-head:not(:has(.avatar-cell)) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tpl-paper-card .identity {
  grid-column: 1 / 3;
  grid-row: 1;
  display: flex;
  align-items: baseline;
  gap: 5mm;
  min-width: 0;
}

.tpl-paper-card .resume-name {
  margin: 0;
  color: #1a1a1a;
  font-size: 17pt;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.tpl-paper-card .resume-role {
  margin: 0;
  color: #333;
  font-size: 10pt;
  font-weight: 400;
}

.tpl-paper-card .resume-role::before {
  content: '求职意向：';
  font-weight: 700;
  color: #1a1a1a;
}

/* 双列字段：列优先（multicol，先填满左列再到右列），标签+冒号+值 */
.tpl-paper-card .contact {
  display: block;
  grid-column: 1 / 3;
  grid-row: 2;
  column-count: 2;
  column-gap: 8mm;
  max-width: none;
  margin: 0;
  font-size: 9.5pt;
}

.tpl-paper-card .contact span.ci {
  display: flex;
  align-items: baseline;
  min-width: 0;
  margin: 0 0 1.8mm;
  gap: 0;
  break-inside: avoid;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;

  /* 长邮箱可收缩换行：anywhere 会降低匿名文本项的 min-content，避免压到相邻列 */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;}

.tpl-paper-card .contact .ci svg {
  display: none;
}

/* 冒号紧跟标签（值是匿名 item，默认 order 会排到冒号后面） */
.tpl-paper-card .contact span.ci::before {
  order: -2;
  flex: 0 0 auto;
  margin-right: 0.25em;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.tpl-paper-card .contact span.ci::after {
  content: '：';
  order: -1;
  font-weight: 700;
  color: #1a1a1a;
}

.tpl-paper-card .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-paper-card .contact [data-ci='age']::before { content: '年龄'; }
.tpl-paper-card .contact [data-ci='gender']::before { content: '性别'; }
.tpl-paper-card .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-paper-card .contact [data-ci='city']::before { content: '现居'; }
.tpl-paper-card .contact [data-ci='degree']::before { content: '学历'; }
.tpl-paper-card .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-paper-card .contact [data-ci='height']::before { content: '身高'; }
.tpl-paper-card .contact [data-ci='marital']::before { content: '婚姻'; }
.tpl-paper-card .contact [data-ci='school']::before { content: '毕业院校'; }
.tpl-paper-card .contact [data-ci='phone']::before { content: '手机'; }
.tpl-paper-card .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-paper-card .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-paper-card .contact [data-ci='website']::before { content: '主页'; }
.tpl-paper-card .contact [data-ci^='cf-']::before { content: attr(title); }

/* 3:4 直角证件照：右上，直角无边框 */
.tpl-paper-card .avatar-cell {
  grid-column: 3;
  grid-row: 1 / 3;
  display: block;
  width: 30mm;
  justify-self: end;
  align-self: start;
}

.tpl-paper-card .avatar-cell .avatar {
  width: 30mm;
  height: 40mm;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #eef4f9;
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：用户选择优先于模板默认 3:4 */
.tpl-paper-card .avatar-cell .avatar.avatar-shape-portrait {
  width: 28mm;
  height: 39mm;
}

.tpl-paper-card .avatar-cell .avatar.avatar-shape-square {
  width: 32mm;
  height: 32mm;
}

.tpl-paper-card .avatar-cell .avatar.avatar-shape-circle {
  width: 32mm;
  height: 32mm;
  border-radius: 50%;
}

/* 分节标题：钢蓝圆角块（白图标 + 白字连体），无拖尾线 */
.tpl-paper-card .resume-section {
  margin-top: 5mm;
}

.tpl-paper-card .section-heading {
  display: flex;
  align-items: center;
  width: fit-content;
  height: 7mm;
  margin: 0 0 2.5mm;
  padding: 0 4.5mm 0 1.6mm;
  background: var(--accent, #5589b8);
  border-radius: 1.8mm;
  color: #fff;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  break-after: avoid-page;
  page-break-after: avoid;
}

.tpl-paper-card .section-heading::before {
  content: '';
  flex: 0 0 auto;
  width: 4.8mm;
  height: 4.8mm;
  margin-right: 2mm;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.tpl-paper-card [data-section='education'] .section-heading::before,
.tpl-paper-card [data-section='certs'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9 12 4l10 5-10 5L2 9Z'/%3E%3Cpath d='M6 11v5c3 2.5 9 2.5 12 0v-5'/%3E%3C/svg%3E");
}

.tpl-paper-card [data-section='experience'] .section-heading::before,
.tpl-paper-card [data-section='projects'] .section-heading::before,
.tpl-paper-card [data-section='campus'] .section-heading::before,
.tpl-paper-card [data-section='research'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E");
}

.tpl-paper-card [data-section='skills'] .section-heading::before,
.tpl-paper-card [data-section='languages'] .section-heading::before,
.tpl-paper-card [data-section='honors'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.6 6.4L21 11l-6.4 2.6L12 20l-2.6-6.4L3 11l6.4-2.6L12 2Z'/%3E%3C/svg%3E");
}

.tpl-paper-card [data-section='profile'] .section-heading::before,
.tpl-paper-card [data-section='selfEval'] .section-heading::before,
.tpl-paper-card [data-section='hobbies'] .section-heading::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z'/%3E%3C/svg%3E");
}

/* 三段式条目：日期（左）｜单位（中）｜身份（右），描述另起一行铺满 */
.tpl-paper-card .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.tpl-paper-card .item-top {
  display: contents;
}

.tpl-paper-card .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
}

.tpl-paper-card .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
}

.tpl-paper-card .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: right;
}

/* 工作经历 DOM 是 title=职位 / sub=公司：对调成「公司居中、职位居右」 */
.tpl-paper-card [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-paper-card [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.tpl-paper-card .item-desc,
.tpl-paper-card .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #333;
  font-size: 9pt;
  line-height: 1.65;
}

/* 圆点/数字成果列表（用户以 `- `/`1. ` 开头即生效） */
.tpl-paper-card .rich-list,
.tpl-paper-card .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #333;
  font-size: 9pt;
}

.tpl-paper-card .rich-list li,
.tpl-paper-card .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-paper-card .rich-list li::before,
.tpl-paper-card .skill-lines li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a1a1a;
}

/* 数字列表恢复序号（压过圆点） */
.tpl-paper-card ol.rich-list[data-list='number'] {
  list-style: decimal;
  padding-left: 18px;
}

.tpl-paper-card ol.rich-list[data-list='number'] li::before {
  content: none;
}

.tpl-paper-card .skill-lines strong {
  color: #1a1a1a;
}

/* ── 宝蓝旗标（结构借鉴，视觉表达自研）──────────────────────────────────
   参考版式：宝蓝缎带分节标题贯穿版心 —— 蓝块（白图标+白字）右端斜切、
   右上深蓝折角小三角，下方浅灰通栏带与蓝块底对齐（高约蓝块 60%）；
   头部整体置于「基本信息」带之下：左 3:4 证件照 + 右侧姓名/求职意向/
   双列字段（列优先）；三段式条目 + 实心圆点列表。
   蓝色消费 --accent（默认 #2F5FAE 由 catalog 注入），折角深蓝为
   同系加深（color-mix 派生），灰带身份色 #E9E9E9 硬编码。 ── */
.tpl-flag-banner {
  padding: 10mm 13mm 12mm;
  color: #262626;
  font-size: 9.5pt;
  line-height: 1.6;
}

/* 头部：第 1 行 = 「基本信息」缎带通栏带（head::before 灰带 + head::after 蓝块） */
.tpl-flag-banner .resume-head {
  display: grid;
  grid-template-columns: 30mm minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 7mm auto auto;
  column-gap: 6mm;
  row-gap: 2.5mm;
  align-items: start;
}

/* 无头像：信息区铺满——除了改列定义，还要把写死在第 2 列起的
   身份/字段块整体前移到第 1 列，否则左列空留一截 */
.tpl-flag-banner .resume-head:not(:has(.avatar-cell)) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tpl-flag-banner .resume-head:not(:has(.avatar-cell)) .identity {
  grid-column: 1 / -1;
}

.tpl-flag-banner .resume-head:not(:has(.avatar-cell)) .contact {
  grid-column: 1 / -1;
}

/* 通栏浅灰带：与蓝块底对齐，顶边在色块 30% 高度（2.1mm）处 */
.tpl-flag-banner .resume-head::before {
  content: '';
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: end;
  height: 4.9mm;
  background: #e9e9e9;
}

/* 「基本信息」缎带蓝块：右端 45° 斜切自 2.1mm 起 + 右上深蓝折角楔形
   （顶点在左上、向右下展开，底边 = 灰带顶边） */
.tpl-flag-banner .resume-head::after {
  content: '基本信息';
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-self: start;
  height: 7mm;
  padding: 0 6mm 0 7.5mm;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 0,100 100,100' fill='%231E3F7C'/%3E%3C/svg%3E") no-repeat right 0 / 2.2mm 2.1mm,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-6.5 8-6.5s8 2.5 8 6.5'/%3E%3C/svg%3E") no-repeat 2.4mm center / 3.4mm 3.4mm,
    var(--accent, #2f5fae);
  clip-path: polygon(0 0, 100% 0, 100% 2.1mm, calc(100% - 4.4mm) 100%, 0 100%);
  color: #fff;
  font-size: 10.5pt;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* 照片：左列，贯穿姓名与字段两行 */
.tpl-flag-banner .avatar-cell {
  grid-column: 1;
  grid-row: 2 / 4;
  display: block;
  width: 30mm;
}

.tpl-flag-banner .avatar-cell .avatar {
  width: 30mm;
  height: 40mm;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #eef2f8;
  object-fit: cover;
  object-position: center top;
}

/* 形状切换：用户选择优先于模板默认 3:4 */
.tpl-flag-banner .avatar-cell .avatar.avatar-shape-portrait {
  width: 28mm;
  height: 39mm;
}

.tpl-flag-banner .avatar-cell .avatar.avatar-shape-square {
  width: 32mm;
  height: 32mm;
}

.tpl-flag-banner .avatar-cell .avatar.avatar-shape-circle {
  width: 32mm;
  height: 32mm;
  border-radius: 50%;
}

/* 姓名 + 求职意向：左对齐堆叠（head-center 全局居中必须覆盖） */
.tpl-flag-banner .identity {
  grid-column: 2 / -1;
  grid-row: 2;
  min-width: 0;
  text-align: left;
}

.tpl-flag-banner .resume-name {
  margin: 0 0 1.5mm;
  color: #1a1a1a;
  font-size: 19pt;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.tpl-flag-banner .resume-role {
  margin: 0;
  color: #333;
  font-size: 10pt;
  font-weight: 400;
}

.tpl-flag-banner .resume-role::before {
  content: '求职意向：';
  font-weight: 700;
  color: #1a1a1a;
}

/* 双列字段：列优先（multicol），标签+冒号+值 */
.tpl-flag-banner .contact {
  display: block;
  grid-column: 2 / -1;
  grid-row: 3;
  column-count: 2;
  column-gap: 8mm;
  max-width: none;
  margin: 0;
  font-size: 9.5pt;
  align-self: start;
}

.tpl-flag-banner .contact span.ci {
  display: flex;
  align-items: baseline;
  min-width: 0;
  margin: 0 0 1.8mm;
  gap: 0;
  break-inside: avoid;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;

  /* 长邮箱可收缩换行：anywhere 会降低匿名文本项的 min-content，避免压到相邻列 */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;}

.tpl-flag-banner .contact .ci svg {
  display: none;
}

.tpl-flag-banner .contact span.ci::before {
  order: -2;
  flex: 0 0 auto;
  margin-right: 0.25em;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.tpl-flag-banner .contact span.ci::after {
  content: '：';
  order: -1;
  font-weight: 700;
  color: #1a1a1a;
}

.tpl-flag-banner .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-flag-banner .contact [data-ci='age']::before { content: '年龄'; }
.tpl-flag-banner .contact [data-ci='gender']::before { content: '性别'; }
.tpl-flag-banner .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-flag-banner .contact [data-ci='city']::before { content: '现居'; }
.tpl-flag-banner .contact [data-ci='degree']::before { content: '学历'; }
.tpl-flag-banner .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-flag-banner .contact [data-ci='height']::before { content: '身高'; }
.tpl-flag-banner .contact [data-ci='marital']::before { content: '婚姻'; }
.tpl-flag-banner .contact [data-ci='school']::before { content: '毕业院校'; }
.tpl-flag-banner .contact [data-ci='phone']::before { content: '手机'; }
.tpl-flag-banner .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-flag-banner .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-flag-banner .contact [data-ci='website']::before { content: '主页'; }
.tpl-flag-banner .contact [data-ci^='cf-']::before { content: attr(title); }

/* 分节标题：通栏浅灰带 + 缎带蓝块（图标+白字、右端斜切+折角） */
.tpl-flag-banner .resume-section {
  margin-top: 5mm;
}

.tpl-flag-banner .section-heading {
  position: relative;
  display: flex;
  align-items: flex-start;
  height: 7mm;
  margin: 0 0 2.5mm;
  color: #1a1a1a;
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  break-after: avoid-page;
  page-break-after: avoid;
}

/* 浅灰通栏带：底对齐，顶边在色块 30% 高度（2.1mm）处，与折角楔形底边齐平 */
.tpl-flag-banner .section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4.9mm;
  background: #e9e9e9;
}

/* 缎带蓝块：右端 45° 斜切自 2.1mm 高度起；右上角折角楔形
   （顶点在左上、向右下展开的深色三角，底边 = 灰带顶边） */
.tpl-flag-banner .section-heading-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 7mm;
  padding: 0 6mm 0 2.2mm;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 0,100 100,100' fill='%231E3F7C'/%3E%3C/svg%3E") no-repeat right 0 / 2.2mm 2.1mm,
    var(--accent, #2f5fae);
  clip-path: polygon(0 0, 100% 0, 100% 2.1mm, calc(100% - 4.4mm) 100%, 0 100%);
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

/* 白色板块图标 */
.tpl-flag-banner .section-heading-text::before {
  content: '';
  flex: 0 0 auto;
  width: 3.6mm;
  height: 3.6mm;
  margin-right: 2mm;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.tpl-flag-banner [data-section='education'] .section-heading-text::before,
.tpl-flag-banner [data-section='certs'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9 12 4l10 5-10 5L2 9Z'/%3E%3Cpath d='M6 11v5c3 2.5 9 2.5 12 0v-5'/%3E%3C/svg%3E");
}

.tpl-flag-banner [data-section='experience'] .section-heading-text::before,
.tpl-flag-banner [data-section='projects'] .section-heading-text::before,
.tpl-flag-banner [data-section='campus'] .section-heading-text::before,
.tpl-flag-banner [data-section='research'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E");
}

.tpl-flag-banner [data-section='skills'] .section-heading-text::before,
.tpl-flag-banner [data-section='languages'] .section-heading-text::before,
.tpl-flag-banner [data-section='honors'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.6 6.4L21 11l-6.4 2.6L12 20l-2.6-6.4L3 11l6.4-2.6L12 2Z'/%3E%3C/svg%3E");
}

.tpl-flag-banner [data-section='profile'] .section-heading-text::before,
.tpl-flag-banner [data-section='selfEval'] .section-heading-text::before,
.tpl-flag-banner [data-section='hobbies'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z'/%3E%3C/svg%3E");
}

/* 三段式条目：日期（左，主题色）｜单位（居中）｜身份（右对齐），描述另起一行铺满。
   1fr auto 1fr：中间列按内容收缩、两侧均分剩余空间——单位严格落在整行正中
   （auto 1fr auto 会让中列中心随左右列宽度差偏移） */
.tpl-flag-banner .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  margin-bottom: 6px;
}

.tpl-flag-banner .item-top {
  display: contents;
}

.tpl-flag-banner .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: var(--accent, #2f5fae);
  font-size: 9.5pt;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tpl-flag-banner .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
  text-align: center;
}

.tpl-flag-banner .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #4b5254;
  font-size: 9.5pt;
  font-weight: 500;
  text-align: right;
}

/* 工作经历 DOM 是 title=职位 / sub=公司：对调成「公司左对齐、职位居右」 */
.tpl-flag-banner [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-flag-banner [data-section='experience'] .item-sub {
  grid-column: 2;
  /* 与其他板块的中列一致：公司名在日期与职位之间居中 */
  justify-self: center;
  text-align: center;
  color: #1a1a1a;
  font-weight: 700;
}

.tpl-flag-banner .item-desc,
.tpl-flag-banner .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #333;
  font-size: 9pt;
  line-height: 1.65;
}

/* 圆点成果列表（用户以 `- ` 开头即生效） */
.tpl-flag-banner .rich-list,
.tpl-flag-banner .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #333;
  font-size: 9pt;
}

.tpl-flag-banner .rich-list li,
.tpl-flag-banner .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-flag-banner .rich-list li::before,
.tpl-flag-banner .skill-lines li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a1a1a;
}

.tpl-flag-banner .skill-lines strong {
  color: #1a1a1a;
}

/* ═══════════════ 贯通蓝带 span-band（bimg6）═══════════════
   骨架：横版头部（姓名+求职意向同行、双列字段，右侧证件照与基本信息
   平行居中对齐）+ 满宽蓝色贯通横带压头部下缘做隔离；分节标题＝圆角
   图标色块接浅灰通栏带；三段式条目 */
.tpl-span-band .resume-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10mm;
  align-items: start;
  /* 头部内容与下方蓝带留出空隙：蓝带只做分隔条，不与照片叠压 */
  padding-bottom: 8mm;
}

/* 满宽贯通蓝带：出血到页边、落在头部下缘，作头部与正文的隔离条 */
.tpl-span-band .resume-head::after {
  content: '';
  position: absolute;
  left: calc(-1 * var(--tpl-page-margin, 18mm));
  right: calc(-1 * var(--tpl-page-margin, 18mm));
  bottom: 0;
  height: 7mm;
  background: var(--accent, #2c6bb0);
}

.tpl-span-band .identity {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 6mm;
  margin: 0 0 5mm;
}

.tpl-span-band .resume-name {
  font-size: 21pt;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #16211f;
  line-height: 1.15;
}

.tpl-span-band .resume-role {
  margin: 0;
  font-size: 10pt;
  color: #4b5254;
}

.tpl-span-band .resume-role::before {
  content: '求职意向：';
  color: #78807f;
}

.tpl-span-band .contact {
  grid-column: 1;
  grid-row: 2;
  display: block;
  column-count: 2;
  column-gap: 8mm;
  margin: 0;
}

/* 头像在独立 grid 列（column 2），不会与字段叠压：无条件解除全局 58% 宽度帽。
   带帽时双列字段被压到约 58% 头部宽，长邮箱/主页必然折行（用户反馈「挤压」） */
.tpl-span-band .resume-head .contact {
  max-width: none;
}

.tpl-span-band .contact span.ci {
  display: flex;
  gap: 0;
  align-items: baseline;
  break-inside: avoid;
  margin: 0 0 2.6mm;
  font-size: 9pt;
  color: #333;

  /* 长邮箱可收缩换行：anywhere 会降低匿名文本项的 min-content，避免压到相邻列 */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;}

.tpl-span-band .contact .ci svg {
  display: none;
}

.tpl-span-band .contact span.ci::before {
  order: -2;
  color: #78807f;

  /* 标签不参与收缩，避免被压成竖排 */
  flex: 0 0 auto;
  white-space: nowrap;}

.tpl-span-band .contact span.ci::after {
  content: '：';
  order: -1;
  color: #78807f;
}

.tpl-span-band .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-span-band .contact [data-ci='age']::before { content: '年龄'; }
.tpl-span-band .contact [data-ci='gender']::before { content: '性别'; }
.tpl-span-band .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-span-band .contact [data-ci='city']::before { content: '现居'; }
.tpl-span-band .contact [data-ci='degree']::before { content: '学历'; }
.tpl-span-band .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-span-band .contact [data-ci='height']::before { content: '身高'; }
.tpl-span-band .contact [data-ci='marital']::before { content: '婚姻'; }
.tpl-span-band .contact [data-ci='school']::before { content: '毕业院校'; }
.tpl-span-band .contact [data-ci='phone']::before { content: '手机'; }
.tpl-span-band .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-span-band .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-span-band .contact [data-ci='website']::before { content: '主页'; }
.tpl-span-band .contact [data-ci^='cf-']::before { content: attr(title); }

/* 证件照：升真实盒、跨「姓名+基本信息」两行并垂直居中，与基本信息平行对齐；
   底部只到蓝带上缘空隙处，不再骑带 */
.tpl-span-band .avatar-cell {
  display: block;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  position: relative;
  z-index: 1;
}

.tpl-span-band .avatar-cell .avatar {
  width: 26mm;
  height: 36.4mm;
  object-fit: cover;
  box-shadow: 0 0 0 1.2mm #fff;
}

/* 圆角图标色块 + 浅灰通栏带（带底对齐） */
.tpl-span-band .section-heading {
  position: relative;
  margin: 0 0 12px;
}

.tpl-span-band .section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4.2mm;
  background: #ececec;
}

.tpl-span-band .section-heading-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 7mm;
  padding: 0 5.5mm 0 3mm;
  border-radius: 0.8mm;
  background: var(--accent, #2c6bb0);
  color: #fff;
  font-size: 11pt;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.tpl-span-band .section-heading-text::before {
  content: '';
  flex: 0 0 auto;
  width: 3.8mm;
  height: 3.8mm;
  margin-right: 2mm;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.tpl-span-band [data-section='education'] .section-heading-text::before,
.tpl-span-band [data-section='certs'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9 12 4l10 5-10 5L2 9Z'/%3E%3Cpath d='M6 11v5c3 2.5 9 2.5 12 0v-5'/%3E%3C/svg%3E");
}

.tpl-span-band [data-section='experience'] .section-heading-text::before,
.tpl-span-band [data-section='projects'] .section-heading-text::before,
.tpl-span-band [data-section='campus'] .section-heading-text::before,
.tpl-span-band [data-section='research'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E");
}

.tpl-span-band [data-section='skills'] .section-heading-text::before,
.tpl-span-band [data-section='languages'] .section-heading-text::before,
.tpl-span-band [data-section='honors'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.6 6.4L21 11l-6.4 2.6L12 20l-2.6-6.4L3 11l6.4-2.6L12 2Z'/%3E%3C/svg%3E");
}

.tpl-span-band [data-section='profile'] .section-heading-text::before,
.tpl-span-band [data-section='selfEval'] .section-heading-text::before,
.tpl-span-band [data-section='hobbies'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z'/%3E%3C/svg%3E");
}

/* 三段式条目：日期（主题色）｜单位（左对齐）｜身份（右对齐） */
.tpl-span-band .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  margin-bottom: 6px;
}

.tpl-span-band .item-top {
  display: contents;
}

.tpl-span-band .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: var(--accent, #2c6bb0);
  font-size: 9.5pt;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tpl-span-band .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  text-align: center;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
}

.tpl-span-band .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #4b5254;
  font-size: 9.5pt;
  font-weight: 500;
  text-align: right;
}

.tpl-span-band [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-span-band [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  color: #1a1a1a;
  font-weight: 700;
}

.tpl-span-band .item-desc,
.tpl-span-band .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #333;
  font-size: 9pt;
  line-height: 1.65;
}

.tpl-span-band .rich-list,
.tpl-span-band .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #333;
  font-size: 9pt;
}

.tpl-span-band .rich-list li,
.tpl-span-band .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-span-band .rich-list li::before,
.tpl-span-band .skill-lines li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, #2c6bb0);
}

.tpl-span-band .rich-list strong,
.tpl-span-band .skill-lines strong {
  color: #1a1a1a;
}

/* ═══════════════ 侧栏蓝签 side-banner（bimg11）═══════════════
   骨架：左窄栏（居中证件照 + 姓名/意向 + 蓝色满宽小签「基本信息」分组字段）
   + 右主栏（满宽实心色块分节标题、三段式条目、圆点列表） */
.tpl-side-banner .resume-side {
  /* 加宽到 66mm：内容宽 = 66 - 6 - 7 = 53mm，9pt 下「邮箱：zhaoqiming@example.com」
     等长值单行放得下（此前 58mm 内容仅 42mm，长邮箱/主页必然折行） */
  flex-basis: 66mm;
  width: 66mm;
  padding: 14mm 6mm 12mm 7mm;
  background: #fff;
  border-right: 1px solid #e2ded4;
}

.tpl-side-banner .side-head {
  text-align: center;
}

.tpl-side-banner .side-head .avatar {
  width: 30mm;
  height: 42mm;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

.tpl-side-banner .side-head .identity {
  margin: 6mm 0 2mm;
}

.tpl-side-banner .side-head .resume-name {
  font-size: 19pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #16211f;
  line-height: 1.2;
}

.tpl-side-banner .side-head .resume-role {
  margin: 0;
  font-size: 9pt;
  color: #78807f;
}

.tpl-side-banner .side-head .resume-role::before {
  content: '求职意向：';
}

/* 分组彩带：renderer ribbonGroups 输出「基本信息 / 联系方式」两组，
   组签为满宽蓝签（与旧版单一「基本信息」签同款，负 margin 出血到侧栏边缘） */
.tpl-side-banner .side-group {
  margin-top: 8mm;
}

.tpl-side-banner .side-group + .side-group {
  margin-top: 7mm;
}

.tpl-side-banner .side-ribbon {
  display: block;
  margin: 0 -6mm 4mm -7mm;
  padding: 2.2mm 4mm;
  /* side-head 是 text-align:center，组签按参考版式左对齐 */
  text-align: left;
  background: var(--accent, #5b8db8);
  color: #fff;
  font-size: 10.5pt;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tpl-side-banner .side-head .contact {
  text-align: left;
}

/* 分组渲染的 span 不带 .ci 类（ribbonContactHtml 输出 <span data-ci=...>），
   布局/冒号规则必须挂在 span 上而非 span.ci，否则标签值挤在一起且丢冒号 */
.tpl-side-banner .side-head .contact span.ci,
.tpl-side-banner .side-head .contact span {
  display: flex;
  gap: 0;
  align-items: baseline;
  margin: 0 0 3mm;
  font-size: 9pt;
  color: #333;

  /* 长邮箱可收缩换行：anywhere 会降低匿名文本项的 min-content，避免压到相邻列 */
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;}

.tpl-side-banner .side-head .contact .ci svg {
  display: none;
}

.tpl-side-banner .side-head .contact span.ci::before,
.tpl-side-banner .side-head .contact span::before {
  order: -2;
  color: #78807f;

  /* 标签不参与收缩，避免被压成竖排 */
  flex: 0 0 auto;
  white-space: nowrap;}

.tpl-side-banner .side-head .contact span.ci::after,
.tpl-side-banner .side-head .contact span::after {
  content: '：';
  order: -1;
  color: #78807f;
}

.tpl-side-banner .side-head .contact [data-ci='birthDate']::before { content: '出生年月'; }
.tpl-side-banner .side-head .contact [data-ci='age']::before { content: '年龄'; }
.tpl-side-banner .side-head .contact [data-ci='gender']::before { content: '性别'; }
.tpl-side-banner .side-head .contact [data-ci='ethnicity']::before { content: '民族'; }
.tpl-side-banner .side-head .contact [data-ci='city']::before { content: '现居'; }
.tpl-side-banner .side-head .contact [data-ci='degree']::before { content: '学历'; }
.tpl-side-banner .side-head .contact [data-ci='political']::before { content: '政治面貌'; }
.tpl-side-banner .side-head .contact [data-ci='height']::before { content: '身高'; }
.tpl-side-banner .side-head .contact [data-ci='marital']::before { content: '婚姻'; }
.tpl-side-banner .side-head .contact [data-ci='school']::before { content: '毕业院校'; }
.tpl-side-banner .side-head .contact [data-ci='phone']::before { content: '手机'; }
.tpl-side-banner .side-head .contact [data-ci='email']::before { content: '邮箱'; }
.tpl-side-banner .side-head .contact [data-ci='wechat']::before { content: '微信'; }
.tpl-side-banner .side-head .contact [data-ci='website']::before { content: '主页'; }
.tpl-side-banner .side-head .contact [data-ci^='cf-']::before { content: attr(title); }

/* 主栏：满宽实心色块分节标题（白字 + 白图标） */
.tpl-side-banner .resume-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14mm 10mm 12mm 8mm;
}

.tpl-side-banner .section-heading {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 2.4mm 4mm;
  background: var(--accent, #5b8db8);
  border-radius: 0.6mm;
  color: #fff;
}

.tpl-side-banner .section-heading-text {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 11pt;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tpl-side-banner .section-heading-text::before {
  content: '';
  flex: 0 0 auto;
  width: 3.8mm;
  height: 3.8mm;
  margin-right: 2.2mm;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.tpl-side-banner [data-section='education'] .section-heading-text::before,
.tpl-side-banner [data-section='certs'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9 12 4l10 5-10 5L2 9Z'/%3E%3Cpath d='M6 11v5c3 2.5 9 2.5 12 0v-5'/%3E%3C/svg%3E");
}

.tpl-side-banner [data-section='experience'] .section-heading-text::before,
.tpl-side-banner [data-section='projects'] .section-heading-text::before,
.tpl-side-banner [data-section='campus'] .section-heading-text::before,
.tpl-side-banner [data-section='research'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E");
}

.tpl-side-banner [data-section='skills'] .section-heading-text::before,
.tpl-side-banner [data-section='languages'] .section-heading-text::before,
.tpl-side-banner [data-section='honors'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 2 2.6 6.4L21 11l-6.4 2.6L12 20l-2.6-6.4L3 11l6.4-2.6L12 2Z'/%3E%3C/svg%3E");
}

.tpl-side-banner [data-section='profile'] .section-heading-text::before,
.tpl-side-banner [data-section='selfEval'] .section-heading-text::before,
.tpl-side-banner [data-section='hobbies'] .section-heading-text::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z'/%3E%3C/svg%3E");
}

/* 三段式条目（与 span-band 同一套现代排法） */
.tpl-side-banner .resume-section .item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  margin-bottom: 6px;
}

.tpl-side-banner .item-top {
  display: contents;
}

.tpl-side-banner .item-date {
  grid-row: 1;
  grid-column: 1;
  justify-self: start;
  color: var(--accent, #5b8db8);
  font-size: 9.5pt;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tpl-side-banner .item-title {
  grid-row: 1;
  grid-column: 2;
  justify-self: center;
  text-align: center;
  color: #1a1a1a;
  font-size: 9.5pt;
  font-weight: 700;
}

.tpl-side-banner .item-sub {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: #4b5254;
  font-size: 9.5pt;
  font-weight: 500;
  text-align: right;
}

.tpl-side-banner [data-section='experience'] .item-title {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.tpl-side-banner [data-section='experience'] .item-sub {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  color: #1a1a1a;
  font-weight: 700;
}

.tpl-side-banner .item-desc,
.tpl-side-banner .summary {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #333;
  font-size: 9pt;
  line-height: 1.65;
}

.tpl-side-banner .rich-list,
.tpl-side-banner .skill-lines {
  margin: 2px 0 0;
  padding-left: 0;
  list-style: none;
  gap: 3px;
  color: #333;
  font-size: 9pt;
}

.tpl-side-banner .rich-list li,
.tpl-side-banner .skill-lines li {
  position: relative;
  padding-left: 15px;
}

.tpl-side-banner .rich-list li::before,
.tpl-side-banner .skill-lines li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, #5b8db8);
}

.tpl-side-banner .rich-list strong,
.tpl-side-banner .skill-lines strong {
  color: #1a1a1a;
}

/* ═══════════════════════════════════════════════════════════════════════
   图标模式切换层（icons-on / icons-off，状态类由 resume-renderer.js 注入根节点）

   标签式模板（catalog.cssContactLabels）的联系格标签由各模板 ::before/::after
   恒定渲染、svg 图标被各自规则 display:none 焊死——「图标模式」开关曾对它们
   完全无反应。本层统一约定：
     icons-on（默认/开）  = 「图标 值」形式：隐藏模板 CSS 标签列，显示 SVG 图标；
     icons-off（关）      = 「标签：值」文字形式：模板原生观感，无图标（渲染器
                            在 off 时本就不输出 svg，无需此处处理）。
   例外：文档表格(doc-table) / 灰带格表(ruled-dossier) 是 contactFixed 表单格表，
   联系区固定不变，不参与本层（编辑器对这两套置灰开关）。
   ═══════════════════════════════════════════════════════════════════════ */

/* 开：隐藏各模板恒定渲染的字段标签（::before）与冒号（::after） */
.resume.icons-on.tpl-ink-cut .resume-band .contact span.ci::before,
.resume.icons-on.tpl-ribbon .side-head .contact span.ci::before,
.resume.icons-on.tpl-side-banner .side-head .contact span.ci::before,
.resume.icons-on.tpl-notch-tab .contact span.ci::before,
.resume.icons-on.tpl-archive-band .contact span.ci::before,
.resume.icons-on.tpl-fold-dossier .contact span.ci::before,
.resume.icons-on.tpl-steel-band .contact span.ci::before,
.resume.icons-on.tpl-capsule-head .contact span.ci::before,
.resume.icons-on.tpl-icon-chip .contact span.ci::before,
.resume.icons-on.tpl-paper-card .contact span.ci::before,
.resume.icons-on.tpl-flag-banner .contact span.ci::before,
.resume.icons-on.tpl-span-band .contact span.ci::before {
  content: none;
}

.resume.icons-on.tpl-fold-dossier .contact span.ci::after,
.resume.icons-on.tpl-side-banner .side-head .contact span.ci::after,
.resume.icons-on.tpl-capsule-head .contact span.ci::after,
.resume.icons-on.tpl-icon-chip .contact span.ci::after,
.resume.icons-on.tpl-paper-card .contact span.ci::after,
.resume.icons-on.tpl-flag-banner .contact span.ci::after,
.resume.icons-on.tpl-span-band .contact span.ci::after {
  content: none;
}

/* 开：解除各模板对联系图标的 display:none 焊死，svg 顶上标签列 */
.resume.icons-on.tpl-ink-cut .resume-band .contact .ci svg,
.resume.icons-on.tpl-ribbon .side-head .contact .ci svg,
.resume.icons-on.tpl-side-banner .side-head .contact .ci svg,
.resume.icons-on.tpl-notch-tab .contact .ci svg,
.resume.icons-on.tpl-archive-band .contact .ci svg,
.resume.icons-on.tpl-fold-dossier .contact .ci svg,
.resume.icons-on.tpl-steel-band .contact .ci svg,
.resume.icons-on.tpl-capsule-head .contact .ci svg,
.resume.icons-on.tpl-icon-chip .contact .ci svg,
.resume.icons-on.tpl-paper-card .contact .ci svg,
.resume.icons-on.tpl-flag-banner .contact .ci svg,
.resume.icons-on.tpl-span-band .contact .ci svg {
  display: inline-flex;
}

/* 开：格内间距适配——图标接管标签列后的对齐微调 */

/* grid 标签列家族（钢蓝灰带/档案头带）：标签列宽收为图标宽，值列位置不变 */
.resume.icons-on.tpl-steel-band .contact span.ci,
.resume.icons-on.tpl-archive-band .contact span.ci {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 6px;
}

/* flex 家族（胶囊刊头/图标色签/蓝笺卡纸/宝蓝旗标/贯通蓝带）：图标与值之间留呼吸 */
.resume.icons-on.tpl-capsule-head .contact span.ci,
.resume.icons-on.tpl-icon-chip .contact span.ci,
.resume.icons-on.tpl-paper-card .contact span.ci,
.resume.icons-on.tpl-flag-banner .contact span.ci,
.resume.icons-on.tpl-span-band .contact span.ci {
  gap: 6px;
}

/* block 家族（凹口书签/折角档案）：块内图标与值留间距；折角档案撤销标签列缩进 */
.resume.icons-on.tpl-notch-tab .contact .ci svg,
.resume.icons-on.tpl-fold-dossier .contact .ci svg {
  margin-right: 6px;
}

/* 墨签头版：头带信息格是内联文本流，图标与值留间距 */
.resume.icons-on.tpl-ink-cut .resume-band .contact .ci svg {
  margin-right: 6px;
}

.resume.icons-on.tpl-fold-dossier .contact span.ci {
  padding-left: 0;
}

/* 缩进家族（飘带侧栏/侧栏蓝签）：撤销标签列的 padding/text-indent 悬挂缩进 */
.resume.icons-on.tpl-ribbon .side-head .contact span.ci,
.resume.icons-on.tpl-side-banner .side-head .contact span.ci {
  padding-left: 0;
  text-indent: 0;
}

.resume.icons-on.tpl-ribbon .side-head .contact .ci svg,
.resume.icons-on.tpl-side-banner .side-head .contact .ci svg {
  margin-right: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════
   头像形状切换补全（格位模板缺规则的补齐，对齐「模板必须动态响应编辑器」原则）
   编辑器「方形 / 5:7 / 3:4 / 圆形」对每套带头像模板都必须可见地生效；
   格位模板的 avatar-cell 框由版式决定保持不动，img 在格内换形状。
   ═══════════════════════════════════════════════════════════════════════ */

/* 钢蓝灰带：默认贯穿式竖版；方形/圆形已有 34×34 退回规则，补 3:4 */
.tpl-steel-band .avatar-cell .avatar.avatar-shape-three-four {
  position: static;
  inset: auto;
  width: 30mm;
  height: 40mm;
}

.tpl-steel-band .avatar-cell:has(.avatar-shape-three-four) {
  min-height: 0;
  align-self: start;
}

/* 蓝笺卡纸：默认 3:4；补 3:4 显式规则（与用户所选形状严格对应） */
.tpl-paper-card .avatar-cell .avatar.avatar-shape-three-four {
  width: 30mm;
  height: 40mm;
}

/* 宝蓝旗标：默认 3:4；补 3:4 显式规则 */
.tpl-flag-banner .avatar-cell .avatar.avatar-shape-three-four {
  width: 30mm;
  height: 40mm;
}

/* 贯通蓝带：默认 5:7 贯穿头带（26×36.4）；此前无任何形状规则，
   四种形状全部回落模板默认 → 开关无反应。按版式比例逐形状退回固定尺寸 */
.tpl-span-band .avatar-cell .avatar.avatar-shape-three-four {
  width: 26mm;
  height: 34.7mm;
}

.tpl-span-band .avatar-cell .avatar.avatar-shape-square {
  width: 30mm;
  height: 30mm;
}

.tpl-span-band .avatar-cell .avatar.avatar-shape-circle {
  width: 30mm;
  height: 30mm;
  border-radius: 50%;
}

/* 侧栏蓝签：默认 5:7 侧栏证件照（30×42）；此前无形状规则，圆形呈椭圆。
   同样逐形状退回固定尺寸 */
.tpl-side-banner .side-head .avatar.avatar-shape-three-four {
  width: 30mm;
  height: 40mm;
}

.tpl-side-banner .side-head .avatar.avatar-shape-square {
  width: 34mm;
  height: 34mm;
}

.tpl-side-banner .side-head .avatar.avatar-shape-circle {
  width: 34mm;
  height: 34mm;
  border-radius: 50%;
}

/* ── 多页侧栏底色（分页续排修复）──────────────────────────────
   问题：.resume-side 是 flex 子项，浏览器/Playwright 把连续文档切成多页时，
   flex 子项的背景在第二页的「续片」上绘制不可靠（Chromium 分片问题），
   表现为侧栏截断、页边界黑条。解法：整列底色改画在 .resume-body 的水平
   线性渐变上——渐变只沿横向变化，纵向随元素高度自然铺满每一页；
   .resume-side 自身背景在 @media print 里置透明（见 styles.css），避免续片残影。
   每套侧栏模板在下方登记自己的 --side-bg / --side-w（可直接引用
   accent/cfg 变量，用户改主题色仍然生效）；未登记的模板回退到
   .resume-side 的默认底色/宽度。 */
.layout-sidebar-left > .resume-body {
  background-image: linear-gradient(
    90deg,
    var(--side-bg, #f3f6f5) 0 var(--side-w, 60mm),
    transparent var(--side-w, 60mm)
  );
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.layout-sidebar-right > .resume-body {
  background-image: linear-gradient(
    270deg,
    var(--side-bg, #f3f6f5) 0 var(--side-w, 60mm),
    transparent var(--side-w, 60mm)
  );
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* 各模板侧栏底色/宽度登记（与上方 .resume-side 的视觉定义保持一致） */
.tpl-modern { --side-bg: var(--accent-deep, #102a26); --side-w: 64mm; }
.tpl-executive-sidebar { --side-bg: var(--accent-deep, #14213d); --side-w: 64mm; }
.tpl-azurill { --side-bg: var(--accent-soft, #e8f7f1); --side-w: 60mm; }
.tpl-chikorita { --side-bg: var(--accent-deep, #6b2d3c); --side-w: 58mm; }
.tpl-ditgar { --side-bg: var(--accent-deep, #4b2a6f); --side-w: 62mm; }
.tpl-ditto { --side-bg: var(--accent-soft, #f3ebe4); --side-w: 60mm; }
.tpl-gengar { --side-bg: var(--accent-deep, #5b2140); --side-w: 60mm; }
.tpl-glalie { --side-bg: var(--accent-soft, #dff2e8); --side-w: 58mm; }
.tpl-leafish { --side-bg: var(--accent-soft, #e8f4f8); --side-w: 58mm; }
.tpl-pikachu { --side-bg: var(--accent-soft, #fbe8ef); --side-w: 58mm; }
.tpl-caffeine { --side-bg: var(--accent-deep, #3b2f2a); --side-w: 60mm; }
.tpl-vertical-ink { --side-bg: var(--accent-deep, #1c1b22); --side-w: 62mm; }
.tpl-ink-side { --side-bg: var(--accent-deep, #1b2f4a); --side-w: 60mm; }
.tpl-noir-side { --side-bg: var(--accent-deep, #16211f); --side-w: 62mm; }
.tpl-ribbon { --side-bg: #f2f2f0; --side-w: 60mm; }
.tpl-side-banner { --side-bg: #fff; --side-w: 66mm; }
.resume[class*='tpl-c-'] { --side-bg: var(--cfg-side, #1d2f40); --side-w: 60mm; }
