:root {
  color-scheme: light;
  --ink: #1d2939;
  --muted: #667085;
  --line: #e5e9ef;
  --panel: #ffffff;
  --canvas: #eef1f5;
  --brand: #12a77d;
  --brand-dark: #0d8a68;
  --shadow: 0 16px 44px rgba(28, 39, 54, 0.14);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  min-width: 1220px;
  background: var(--canvas);
}

html.template-library-mode {
  min-width: 0;
}

html.home-page-mode {
  min-width: 0;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(18, 167, 125, 0.08), transparent 24rem),
    var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 3px solid rgba(18, 167, 125, 0.18);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 70px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 4px 20px rgba(20, 32, 50, 0.07);
  backdrop-filter: blur(16px);
}

.topbar__inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 1200px;
  height: 100%;
  margin: 0 auto;
}

.primary-nav,
.editor-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a,
.editor-nav a {
  padding: 8px 10px;
  border-radius: 5px;
  color: #637083;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.primary-nav a:hover,
.primary-nav a.is-active,
.editor-nav a:hover {
  color: #087a5a;
  background: #edf9f5;
}

.editor-nav {
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid #e5e9ef;
}

.editor-nav a {
  padding: 6px 8px;
  font-size: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 190px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(28, 39, 54, 0.08);
}

.brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand__text {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.brand__badge {
  padding: 2px 6px;
  color: var(--brand-dark);
  background: #e9f8f3;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.toolbar {
  display: flex;
  align-self: stretch;
  gap: 3px;
}

.tool-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 7px 11px 5px;
  border: 0;
  color: #526070;
  background: transparent;
  cursor: pointer;
  transition: 0.18s ease;
}

.tool-button:hover {
  color: var(--brand-dark);
  background: #f2fbf8;
}

.tool-button__icon {
  height: 25px;
  font-size: 19px;
  font-weight: 700;
  line-height: 22px;
}

.tool-button > span:last-of-type {
  font-size: 12px;
  line-height: 16px;
}

.tool-button--color input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.color-dot {
  width: 20px;
  height: 20px;
  margin-bottom: 4px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #cfd6df, 0 2px 5px rgba(0, 0, 0, 0.12);
}

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

.export-format-control select {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid #d9e0e8;
  border-radius: 6px;
  color: #3d4a5d;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.template-library {
  min-height: 100vh;
  color: #243044;
  background: #f3f6f8;
}

.draft-page {
  min-height: 100vh;
  color: #243044;
  background: #f3f6f8;
}

.home-page {
  min-height: 100vh;
  background: #f3f6f8;
}

.home-main {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 72px;
}

/* ---------- Hero ---------- */
.home-overview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  min-height: 410px;
  padding: 34px 0 42px;
  border-bottom: 1px solid #dce3ea;
  /* 大范围低透明度的柔和渐变，向四周平滑过渡到页面底色，避免色块边缘突兀 */
  background:
    radial-gradient(90% 120% at 12% -8%, rgba(18, 167, 125, 0.07), transparent 62%),
    radial-gradient(80% 120% at 95% 112%, rgba(64, 148, 255, 0.05), transparent 60%);
}

.home-hero {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.home-hero .eyebrow {
  display: inline-block;
  color: var(--brand-dark);
}

.home-hero__title {
  margin: 10px 0 14px;
  font-size: 40px;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-line {
  display: block;
}

.hero-line--rotator {
  min-height: 1.22em;
}

.hero-rotator {
  background: linear-gradient(100deg, #0d8a68, #12a77d 45%, #2fbf94);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: var(--brand);
  animation: caret-blink 0.9s steps(2, start) infinite;
}

.home-hero__lead {
  margin: 0;
  color: #5b6b7f;
  font-size: 15px;
  line-height: 1.8;
}

.home-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.home-primary-action,
.home-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.home-primary-action {
  color: #fff;
  background: linear-gradient(100deg, #0d8a68, #12a77d);
  box-shadow: 0 10px 22px rgba(18, 167, 125, 0.28);
}

.home-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(18, 167, 125, 0.36);
}

.home-secondary-action {
  border: 1px solid #dce3ea;
  color: #475467;
  background: #fff;
}

.home-secondary-action:hover {
  transform: translateY(-2px);
  border-color: #69ccb0;
  color: var(--brand-dark);
}

.home-hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.home-hero__points li {
  padding: 6px 13px;
  border: 1px solid #d0e8df;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #f2fbf8;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Hero preview / AI demo ---------- */
.home-hero__preview {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.ai-demo {
  position: relative;
  width: 300px;
}

.ai-demo__prompt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 68px; /* 预留整段描述换行后的高度，避免打字过程中区域尺寸跳动 */
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(28, 39, 54, 0.08);
  font-size: 12px;
  line-height: 1.6;
  color: #3b485b;
}

.ai-demo__spark {
  color: var(--brand);
  line-height: 1.5;
}

.ai-demo__prompt-text {
  flex: 1;
}

.ai-demo__caret {
  flex: 0 0 auto;
  width: 2px;
  height: 15px;
  margin-top: 2px;
  background: var(--brand);
  animation: caret-blink 0.9s steps(2, start) infinite;
}

.ai-demo__status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 2px 10px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
}

.ai-demo__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: status-pulse 1.6s ease-out infinite;
}

.ai-demo__resume {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.ai-demo.is-filled .ai-demo__resume {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(28, 39, 54, 0.16);
}

.ai-demo__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.ai-demo__fields span {
  padding: 4px 10px;
  border: 1px solid #d0e8df;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #f2fbf8;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
}

.ai-demo.is-filled .ai-demo__fields span {
  animation: field-pop 0.35s ease forwards;
}

.ai-demo.is-filled .ai-demo__fields span:nth-child(2) { animation-delay: 0.08s; }
.ai-demo.is-filled .ai-demo__fields span:nth-child(3) { animation-delay: 0.16s; }
.ai-demo.is-filled .ai-demo__fields span:nth-child(4) { animation-delay: 0.24s; }
.ai-demo.is-filled .ai-demo__fields span:nth-child(5) { animation-delay: 0.32s; }

/* skeleton resume preview */
.home-template-preview {
  width: 260px;
  margin-left: auto;
  padding: 20px 18px;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(28, 39, 54, 0.12);
}

.htp-name {
  width: 52%;
  height: 14px;
  margin-bottom: 8px;
  border-radius: 3px;
  background: #dfe7ee;
  transition: background 0.4s ease;
}

.htp-meta {
  width: 78%;
  height: 8px;
  margin-bottom: 18px;
  border-radius: 3px;
  background: #edf1f5;
  transition: background 0.4s ease;
}

.htp-section {
  display: flex;
  align-items: center;
  margin: 14px 0 8px;
}

.htp-section i {
  width: 44px;
  height: 6px;
  border-radius: 3px;
  background: var(--brand);
}

.htp-lines {
  display: grid;
  gap: 6px;
}

.htp-lines i {
  height: 7px;
  border-radius: 3px;
  background: #e6ebf1;
  transition: background 0.4s ease;
}

.htp-lines i:nth-child(2) {
  width: 92%;
}

.htp-lines i:nth-child(3) {
  width: 78%;
}

/* filled state: skeleton -> content */
.ai-demo.is-filled .htp-name {
  background: linear-gradient(100deg, #12a77d, #2fbf94);
}

.ai-demo.is-filled .htp-meta {
  background: #cde9df;
}

.ai-demo.is-filled .htp-lines i {
  background: linear-gradient(100deg, #d7f2ea, #eefbf7);
}

/* shimmer while "generating" */
.ai-demo:not(.is-filled) .home-template-preview {
  position: relative;
  overflow: hidden;
}

.ai-demo:not(.is-filled) .home-template-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.85) 50%, transparent 80%);
  animation: shimmer 1.8s linear infinite;
  pointer-events: none;
}

/* ---------- Feature cards ---------- */
.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 34px 0 8px;
}

.feature-card {
  padding: 22px 20px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(28, 39, 54, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: #bfe6da;
  box-shadow: 0 18px 40px rgba(28, 39, 54, 0.12);
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #eefaf6;
  font-size: 20px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0;
}

.feature-card p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- Keyframes ---------- */
@keyframes caret-blink {
  50% { opacity: 0; }
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 167, 125, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(18, 167, 125, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 167, 125, 0); }
}

@keyframes field-pop {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* staggered entrance on load */
.home-hero .eyebrow,
.home-hero__title,
.home-hero__lead,
.home-hero__actions,
.home-hero__points {
  opacity: 0;
  animation: rise-in 0.6s ease forwards;
}

.home-hero .eyebrow { animation-delay: 0.05s; }
.home-hero__title { animation-delay: 0.12s; }
.home-hero__lead { animation-delay: 0.2s; }
.home-hero__actions { animation-delay: 0.28s; }
.home-hero__points { animation-delay: 0.36s; }
.home-hero__preview { opacity: 0; animation: rise-in 0.7s ease 0.15s forwards; }

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .home-hero .eyebrow,
  .home-hero__title,
  .home-hero__lead,
  .home-hero__actions,
  .home-hero__points,
  .home-hero__preview,
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .hero-caret,
  .ai-demo__caret,
  .ai-demo__pulse,
  .ai-demo:not(.is-filled) .home-template-preview::after {
    animation: none;
  }

  .ai-demo__fields span {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

.home-drafts {
  padding-top: 30px;
}

.home-drafts h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.home-draft-list {
  display: grid;
  gap: 8px;
}

.home-draft-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 12px 15px;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.home-draft-item:hover {
  border-color: #abdace;
  background: #fbfefd;
}

.home-draft-item > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.home-draft-item > span:last-child {
  align-items: flex-end;
}

.home-draft-item strong,
.home-draft-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-draft-item small,
.home-empty-state {
  color: #718096;
  font-size: 11px;
}

/* ---------- About / 平台初衷 ---------- */
.home-about {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid #e4eaef;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.home-about.is-faded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.home-about__inner {
  max-width: 640px;
  padding-left: 18px;
  border-left: 3px solid #c8e9dd;
}

.home-about h2 {
  margin: 6px 0 12px;
  font-size: 18px;
  letter-spacing: 0;
  color: #243044;
}

.home-about p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.9;
}

/* 宽屏：固定于视口左侧留白处的低调便签，不占主内容流 */
@media (min-width: 1560px) {
  .home-about {
    position: fixed;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    width: 210px;
    margin: 0;
    padding: 0;
    border-top: 0;
    z-index: 5;
  }

  .home-about__inner {
    max-width: none;
    padding: 14px 0 14px 16px;
    border-left: 2px solid #c8e9dd;
  }

  .home-about h2 {
    margin: 8px 0 10px;
    font-size: 15px;
    line-height: 1.5;
  }

  .home-about p {
    font-size: 12px;
    line-height: 1.85;
  }
}

.home-empty-state {
  padding: 32px 0;
  text-align: center;
}

.library-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
  padding: 0 max(28px, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid #dfe5eb;
  background: rgba(255, 255, 255, 0.96);
}

.library-header__meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.library-header__meta strong {
  font-size: 15px;
}

.library-header__meta span {
  color: #7a8798;
  font-size: 12px;
}

.library-main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.draft-section {
  margin-bottom: 34px;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading-row h1 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.section-count {
  color: #7a8798;
  font-size: 12px;
}

.draft-list {
  display: grid;
  gap: 8px;
}

.draft-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(250px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding: 11px 14px;
  border: 1px solid #dce3ea;
  border-radius: 6px;
  background: #fff;
}

.draft-item__identity,
.draft-item__meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.draft-item__identity strong,
.draft-item__identity span,
.draft-item__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-item__identity strong {
  font-size: 14px;
}

.draft-item__identity span,
.draft-item__meta span {
  color: #718096;
  font-size: 11px;
}

.draft-item__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.draft-item__actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b9ded3;
  border-radius: 5px;
  color: #087a5a;
  background: #f2fbf8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.draft-item__actions button:hover {
  border-color: var(--brand);
  background: #e8f8f3;
}

.draft-item__actions .draft-delete {
  border-color: transparent;
  color: #8a5260;
  background: transparent;
  font-weight: 600;
}

.draft-item__actions .draft-delete:hover {
  border-color: #efcbd2;
  color: #a33b50;
  background: #fff5f6;
}

@media screen and (max-width: 640px) {
  .library-header {
    gap: 12px;
    height: 62px;
    padding: 0 16px;
  }

  .library-header .brand {
    width: auto;
  }

  .library-header .brand__badge,
  .library-header__meta span {
    display: none;
  }

  .library-header__meta {
    margin-left: auto;
  }

  .primary-nav {
    margin-left: auto;
  }

  .primary-nav a {
    padding: 7px 6px;
    font-size: 12px;
  }

  .home-main {
    width: calc(100% - 32px);
    padding-top: 28px;
  }

  .home-overview {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
  }

  .home-hero__title {
    font-size: 28px;
  }

  .home-hero__preview {
    width: 100%;
  }

  .ai-demo {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .home-template-preview {
    width: 100%;
    margin-left: 0;
  }

  .home-features {
    grid-template-columns: 1fr;
  }

  .library-main {
    width: calc(100% - 32px);
    padding-top: 24px;
  }

  .library-toolbar {
    align-items: flex-start;
    gap: 12px;
  }

  .library-legend {
    flex-direction: column;
    gap: 5px;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }

  .template-card--featured {
    max-width: none;
  }

  .draft-item {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .draft-item__meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .draft-item__actions {
    grid-column: 2;
    grid-row: 1;
  }

  .draft-item__actions .draft-delete {
    width: 34px;
    overflow: hidden;
    padding: 0 5px;
    color: transparent;
  }

  .draft-item__actions .draft-delete::before {
    content: "×";
    color: #a33b50;
    font-size: 19px;
    line-height: 1;
  }
}

.library-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.library-toolbar h1 {
  margin: 4px 0 0;
  font-size: 25px;
  letter-spacing: 0;
}

.library-legend {
  display: flex;
  gap: 18px;
  color: #68768a;
  font-size: 12px;
}

.library-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a8b2bf;
}

.status-dot--ready {
  background: #11a77c;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.template-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(33, 47, 66, 0.07);
}

.template-preview {
  position: relative;
  aspect-ratio: 210 / 245;
  overflow: hidden;
  border-bottom: 1px solid #e3e8ed;
  background: #e9edf1;
}

.template-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.template-preview-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  background: #556275;
}

.template-preview-placeholder span {
  font-size: 48px;
  font-weight: 750;
}

.template-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #4d596a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(29, 39, 52, 0.1);
  font-size: 10px;
  font-weight: 700;
}

.template-card.is-ready .template-status {
  color: #087a5a;
  background: rgba(232, 250, 244, 0.95);
}

/* 推荐模板（极简轻）强调 */
.template-card.is-recommended {
  border-color: #35c39a;
  box-shadow: 0 12px 30px rgba(18, 167, 125, 0.16);
}

.template-card.is-recommended .template-card__body {
  background: #fbfefd;
}

.template-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(100deg, #0d8a68, #12a77d);
  box-shadow: 0 3px 10px rgba(18, 167, 125, 0.32);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* 推荐模板：单独一行，沿用卡片样式并适度放大 */
.template-featured {
  margin-bottom: 22px;
}

.template-card--featured {
  max-width: 380px;
}

.template-card--featured .template-card__body {
  padding: 18px;
}

.template-card--featured .template-card__body strong {
  font-size: 17px;
}

.template-card--featured .template-card__body button {
  height: 40px;
  font-size: 13px;
}

.template-recommend-reason {
  margin: -2px 0 14px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #087a5a;
  background: #eefaf6;
  font-size: 12px;
  line-height: 1.6;
}

.template-recommend-reason strong {
  color: #0d8a68;
}

.template-card__body {
  padding: 14px;
}

.template-card__body > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.template-card__body strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card__body > div span,
.template-card__body p {
  color: #7a8798;
  font-size: 10px;
}

.template-card__body p {
  min-height: 32px;
  margin: 9px 0 12px;
  line-height: 1.55;
}

.template-card__body button {
  width: 100%;
  height: 34px;
  border: 1px solid #10a77b;
  border-radius: 6px;
  color: #fff;
  background: #10a77b;
  font-size: 12px;
  font-weight: 700;
}

.template-card__body button:disabled {
  cursor: not-allowed;
  border-color: #d6dde4;
  color: #8792a2;
  background: #edf1f4;
}

.library-status {
  padding: 56px 0;
  color: #7a8798;
  text-align: center;
  font-size: 13px;
}

.primary-button,
.secondary-button {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: 0.18s ease;
}

.primary-button {
  border: 1px solid var(--brand);
  color: #fff;
  background: linear-gradient(135deg, #19bd8e, #0e9d76);
  box-shadow: 0 7px 16px rgba(18, 167, 125, 0.2);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(18, 167, 125, 0.28);
}

.secondary-button {
  border: 1px solid #dce2e9;
  color: #445164;
  background: #fff;
}

.secondary-button:hover {
  color: var(--brand-dark);
  border-color: #8ed9c2;
  background: #f7fffc;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.file-button input,
.inline-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.popover {
  position: absolute;
  top: 64px;
  z-index: 70;
  width: 300px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 13px;
  box-shadow: 0 18px 44px rgba(28, 39, 54, 0.18);
}

#spacingPopover {
  left: 182px;
}

#fontPopover {
  left: 250px;
}

.popover__heading {
  margin-bottom: 17px;
  font-size: 15px;
  font-weight: 700;
}

.range-field,
.select-field {
  display: block;
  margin-top: 14px;
  color: #49566a;
  font-size: 13px;
}

.range-field > span,
.select-field > span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.range-field output {
  color: var(--brand-dark);
  font-weight: 700;
}

.range-field input {
  width: 100%;
  accent-color: var(--brand);
}

.select-field select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dce2e9;
  border-radius: 8px;
  background: #fbfcfd;
}

.workspace {
  display: grid;
  grid-template-columns: 820px 360px;
  gap: 20px;
  width: 1200px;
  margin: 0 auto;
  padding: 24px 0 130px;
}

.preview-column {
  min-width: 0;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 3px;
}

.preview-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.eyebrow,
.side-card__eyebrow {
  color: #8a96a8;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.preview-toolbar strong {
  font-size: 14px;
  font-weight: 650;
}

.preview-toolbar__meta {
  display: flex;
  gap: 7px;
  color: #69768a;
  font-size: 11px;
}

.preview-toolbar__meta span {
  padding: 4px 9px;
  border: 1px solid #dce2e9;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.preview-mode {
  display: inline-flex;
  height: 26px;
  border: 1px solid #dce2e9;
  border-radius: 5px;
  background: #fff;
}

.preview-mode button {
  min-width: 42px;
  padding: 0 9px;
  border: 0;
  color: #69768a;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.preview-mode button.is-active {
  color: #fff;
  background: #168d6c;
}

.preview-mode button:disabled {
  color: #b4bdc9;
  cursor: not-allowed;
}

.preview-stage {
  position: relative;
  min-height: 1160px;
}

.fidelity-preview {
  width: 820px;
}

.fidelity-preview img {
  display: block;
  width: 820px;
  height: auto;
  margin-bottom: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(28, 39, 54, 0.18);
}

.resume-paper {
  --theme: #12a77d;
  --accent: rgba(18, 167, 125, 0.11);
  --resume-font: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-size: 14px;
  --line-height: 1.65;
  --page-padding: 38px;
  --section-gap: 18px;
  position: relative;
  width: 820px;
  min-height: 1160px;
  overflow: hidden;
  color: #334155;
  background: #fff;
  box-shadow: 0 18px 50px rgba(28, 39, 54, 0.18);
  font-family: var(--resume-font);
  transition: height 0.2s ease;
}

.resume-flow {
  position: relative;
  z-index: 1;
  min-height: 1160px;
  padding: calc(var(--page-padding) + 5px) var(--page-padding) 42px;
  font-size: var(--font-size);
  line-height: var(--line-height);
}

.resume-header {
  display: flex;
  align-items: center;
  min-height: 96px;
  cursor: pointer;
}

.resume-header:hover,
.resume-section:hover {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.resume-header__main {
  flex: 1;
  min-width: 0;
}

.resume-name-row {
  display: flex;
  align-items: flex-end;
  gap: 17px;
}

.resume-name-row h1 {
  margin: 0;
  color: #172033;
  font-size: 33px;
  font-weight: 760;
  letter-spacing: 0.11em;
  line-height: 1.1;
}

.resume-name-row > span {
  padding: 5px 12px;
  color: var(--theme);
  background: var(--accent);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  color: #64748b;
  font-size: 12px;
}

.resume-photo {
  width: 78px;
  height: 94px;
  margin-left: 24px;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 7px;
  box-shadow: 0 0 0 1px #dce3eb, 0 8px 18px rgba(30, 41, 59, 0.13);
}

.resume-photo--placeholder {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--theme), #25384d);
  font-size: 34px;
  font-weight: 700;
}

.resume-rule {
  position: relative;
  height: 7px;
  margin: 17px 0 22px;
  background: var(--theme);
}

.resume-rule::after {
  position: absolute;
  right: 0;
  bottom: 100%;
  width: 126px;
  height: 3px;
  background: var(--accent);
  content: "";
}

.resume-rule i {
  position: absolute;
  left: 34px;
  top: -5px;
  width: 17px;
  height: 17px;
  background: #fff;
  border: 4px solid var(--theme);
  border-radius: 50%;
}

.resume-sections {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.resume-section {
  position: relative;
  break-inside: avoid;
  cursor: pointer;
  transition: background 0.18s ease;
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
}

.section-heading span {
  position: relative;
  min-width: 122px;
  padding: 5px 22px 5px 18px;
  color: #fff;
  background: var(--theme);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.section-heading span::after {
  position: absolute;
  right: -11px;
  top: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 11px solid var(--theme);
  content: "";
}

.section-heading i {
  height: 1px;
  background: linear-gradient(90deg, var(--theme), rgba(148, 163, 184, 0.16));
}

.objective-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 0 2px;
}

.objective-grid > div {
  padding: 9px 10px;
  background: #f8fafc;
  border-left: 3px solid var(--theme);
  border-radius: 0 6px 6px 0;
}

.objective-grid span,
.objective-grid strong {
  display: block;
}

.objective-grid span {
  color: #8a96a8;
  font-size: 10px;
}

.objective-grid strong {
  margin-top: 3px;
  color: #334155;
  font-size: 12px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  break-inside: avoid;
}

.resume-section.has-page-break,
.timeline-item.has-page-break {
  margin-top: var(--page-break-before);
}

.timeline-item__top {
  display: grid;
  grid-template-columns: 145px 1fr auto;
  align-items: baseline;
  column-gap: 18px;
  color: #334155;
}

.timeline-item__top time {
  color: #64748b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.timeline-item__top strong {
  color: #1e293b;
  font-size: 13px;
}

.timeline-item__top span {
  color: var(--theme);
  font-size: 12px;
  font-weight: 650;
}

.rich-preview {
  margin-top: 5px;
  color: #475569;
  font-size: 12px;
  line-height: var(--line-height);
}

.rich-preview--standalone {
  font-size: 12.5px;
}

.rich-preview p,
.rich-preview ul,
.rich-preview ol {
  margin: 4px 0;
}

.rich-preview ul,
.rich-preview ol {
  padding-left: 19px;
}

.rich-preview li {
  margin: 2px 0;
  padding-left: 2px;
}

/* Adapted ResumeCollection layouts. The DOM stays structured while each
   template controls its own visual hierarchy for preview and PDF export. */
.resume-paper[data-template^="resume-collection-cn-"] .resume-name-row h1 {
  letter-spacing: 0;
}

.resume-paper[data-template="resume-collection-cn-001"] .resume-header {
  padding: 18px 24px;
  color: #fff;
  background: var(--theme);
  border-radius: 0 42px 42px 0;
}

.resume-paper[data-template="resume-collection-cn-001"] .resume-name-row h1,
.resume-paper[data-template="resume-collection-cn-001"] .contact-row {
  color: #fff;
}

.resume-paper[data-template="resume-collection-cn-001"] .resume-rule {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-001"] .section-heading span {
  min-width: 105px;
  padding: 5px 13px;
  border-radius: 16px;
}

.resume-paper[data-template="resume-collection-cn-001"] .section-heading span::after {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-002"] .resume-rule,
.resume-paper[data-template="resume-collection-cn-003"] .resume-rule {
  height: 2px;
  margin: 12px 0 18px;
}

.resume-paper[data-template="resume-collection-cn-002"] .resume-rule i,
.resume-paper[data-template="resume-collection-cn-003"] .resume-rule i,
.resume-paper[data-template="resume-collection-cn-002"] .resume-rule::after,
.resume-paper[data-template="resume-collection-cn-003"] .resume-rule::after {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-002"] .section-heading span,
.resume-paper[data-template="resume-collection-cn-003"] .section-heading span {
  min-width: 104px;
  padding: 4px 13px;
  border-radius: 0;
  font-size: 13px;
}

.resume-paper[data-template="resume-collection-cn-002"] .section-heading span::after,
.resume-paper[data-template="resume-collection-cn-003"] .section-heading span::after {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-003"] .resume-flow {
  border-top: 12px solid var(--theme);
  border-bottom: 12px solid var(--theme);
}

.resume-paper[data-template="resume-collection-cn-003"] .resume-header {
  border-bottom: 1px solid #9db0bd;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-005"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-008"] .resume-flow {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-content: start;
  gap: 0 26px;
  padding: 0 var(--page-padding) 42px 0;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-header,
.resume-paper[data-template="resume-collection-cn-005"] .resume-header,
.resume-paper[data-template="resume-collection-cn-008"] .resume-header {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: stretch;
  min-height: 1160px;
  padding: 42px 22px;
  flex-direction: column-reverse;
  justify-content: flex-end;
  color: #fff;
  background: var(--theme);
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-header {
  color: #4d5968;
  background: #f3f0f0;
  border-top: 12px solid var(--theme);
}

.resume-paper[data-template="resume-collection-cn-008"] .resume-header {
  background: linear-gradient(180deg, #359bd9 0 58%, #8ec83f 58% 100%);
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-header__main,
.resume-paper[data-template="resume-collection-cn-005"] .resume-header__main,
.resume-paper[data-template="resume-collection-cn-008"] .resume-header__main {
  width: 100%;
  flex: 0 0 auto;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-name-row,
.resume-paper[data-template="resume-collection-cn-005"] .resume-name-row,
.resume-paper[data-template="resume-collection-cn-008"] .resume-name-row {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-name-row h1,
.resume-paper[data-template="resume-collection-cn-005"] .resume-name-row h1,
.resume-paper[data-template="resume-collection-cn-008"] .resume-name-row h1 {
  color: inherit;
  font-size: 23px;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-name-row > span,
.resume-paper[data-template="resume-collection-cn-005"] .resume-name-row > span,
.resume-paper[data-template="resume-collection-cn-008"] .resume-name-row > span {
  padding: 0;
  color: inherit;
  background: transparent;
}

.resume-paper[data-template="resume-collection-cn-004"] .contact-row,
.resume-paper[data-template="resume-collection-cn-005"] .contact-row,
.resume-paper[data-template="resume-collection-cn-008"] .contact-row {
  flex-direction: column;
  color: inherit;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-photo,
.resume-paper[data-template="resume-collection-cn-005"] .resume-photo,
.resume-paper[data-template="resume-collection-cn-008"] .resume-photo {
  width: 108px;
  height: 108px;
  margin: 0 0 24px;
  border-radius: 50%;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-rule,
.resume-paper[data-template="resume-collection-cn-005"] .resume-rule,
.resume-paper[data-template="resume-collection-cn-008"] .resume-rule {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-sections,
.resume-paper[data-template="resume-collection-cn-005"] .resume-sections,
.resume-paper[data-template="resume-collection-cn-008"] .resume-sections {
  grid-column: 2;
  padding-top: 42px;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-footer,
.resume-paper[data-template="resume-collection-cn-005"] .resume-footer,
.resume-paper[data-template="resume-collection-cn-008"] .resume-footer {
  grid-column: 2;
}

.resume-paper[data-template="resume-collection-cn-004"] .section-heading span,
.resume-paper[data-template="resume-collection-cn-005"] .section-heading span,
.resume-paper[data-template="resume-collection-cn-008"] .section-heading span {
  min-width: 0;
  padding: 4px 10px;
  border-radius: 14px;
}

.resume-paper[data-template="resume-collection-cn-004"] .section-heading span::after,
.resume-paper[data-template="resume-collection-cn-005"] .section-heading span::after,
.resume-paper[data-template="resume-collection-cn-008"] .section-heading span::after {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-006"] .resume-flow {
  padding-top: 145px;
}

.resume-paper[data-template="resume-collection-cn-006"] .resume-flow::before {
  position: absolute;
  inset: 0 0 auto;
  height: 120px;
  background: linear-gradient(165deg, var(--theme) 0 78%, transparent 79%);
  content: "";
}

.resume-paper[data-template="resume-collection-cn-006"] .resume-header {
  position: absolute;
  top: 18px;
  left: 38px;
  right: 38px;
  z-index: 1;
  color: #fff;
}

.resume-paper[data-template="resume-collection-cn-006"] .resume-name-row h1,
.resume-paper[data-template="resume-collection-cn-006"] .contact-row {
  color: #fff;
}

.resume-paper[data-template="resume-collection-cn-006"] .resume-rule {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-007"] .resume-flow {
  padding-right: 245px;
}

.resume-paper[data-template="resume-collection-cn-007"] .resume-header {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 210px;
  min-height: 1160px;
  padding: 42px 24px;
  flex-direction: column-reverse;
  justify-content: flex-end;
  color: #fff;
  background: #4b4b4d;
}

.resume-paper[data-template="resume-collection-cn-007"] .resume-header__main {
  flex: 0 0 auto;
}

.resume-paper[data-template="resume-collection-cn-007"] .resume-name-row,
.resume-paper[data-template="resume-collection-cn-007"] .contact-row {
  flex-direction: column;
  align-items: flex-start;
}

.resume-paper[data-template="resume-collection-cn-007"] .resume-name-row h1,
.resume-paper[data-template="resume-collection-cn-007"] .contact-row {
  color: #fff;
}

.resume-paper[data-template="resume-collection-cn-007"] .resume-photo {
  margin: 0 0 22px;
  border-radius: 50%;
}

.resume-paper[data-template="resume-collection-cn-007"] .resume-rule {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-sections,
.resume-paper[data-template="resume-collection-cn-010"] .resume-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--section-gap) 34px;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-rule,
.resume-paper[data-template="resume-collection-cn-010"] .resume-rule {
  height: 1px;
  background: #a9b7c2;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-rule i,
.resume-paper[data-template="resume-collection-cn-010"] .resume-rule i,
.resume-paper[data-template="resume-collection-cn-009"] .resume-rule::after,
.resume-paper[data-template="resume-collection-cn-010"] .resume-rule::after {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-009"] .section-heading span,
.resume-paper[data-template="resume-collection-cn-010"] .section-heading span {
  min-width: 0;
  padding: 5px 13px;
  border-radius: 16px;
}

.resume-paper[data-template="resume-collection-cn-009"] .section-heading span::after,
.resume-paper[data-template="resume-collection-cn-010"] .section-heading span::after {
  display: none;
}

.resume-paper[data-template="resume-collection-cn-009"]::after,
.resume-paper[data-template="resume-collection-cn-010"]::after {
  position: absolute;
  right: -45px;
  bottom: -40px;
  left: -45px;
  height: 75px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(90deg, #75abc2, #e4c94f 55%, #70a9c1);
  content: "";
}

/* Native-cover layout system. These templates use distinct document
   structures; this block intentionally overrides the earlier color adapters. */
.template-decor {
  display: none;
  pointer-events: none;
}

.template-layout {
  position: relative;
  z-index: 1;
  min-height: 1160px;
}

.template-layout--sidebar {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-content: stretch;
  padding: 0;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-005"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-007"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-008"] .resume-flow {
  display: block !important;
  padding: 0 !important;
}

.template-layout--sidebar.is-right {
  grid-template-columns: minmax(0, 1fr) 224px;
}

.template-layout--sidebar .template-sidebar {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 1160px;
  padding: 42px 24px;
  color: #fff;
  background: var(--theme);
}

.template-layout--sidebar.is-right .template-sidebar {
  grid-column: 2;
  background: #45464a;
}

.template-layout--sidebar .template-main {
  grid-column: 2;
  grid-row: 1;
  gap: 19px;
  padding: 48px 42px 60px 34px;
}

.template-layout--sidebar.is-right .template-main {
  grid-column: 1;
  padding: 48px 34px 60px 44px;
}

.template-layout--sidebar .resume-header {
  min-height: 0 !important;
  padding: 0 !important;
  flex-direction: column-reverse !important;
  align-items: center;
  justify-content: flex-end;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
}

.template-layout--sidebar .resume-header__main {
  width: 100%;
  flex: 0 0 auto;
}

.template-layout--sidebar .resume-name-row,
.template-layout--sidebar .contact-row {
  flex-direction: column;
  align-items: center;
  color: inherit !important;
  text-align: center;
}

.template-layout--sidebar .resume-name-row {
  gap: 2px;
}

.template-layout--sidebar .resume-name-row h1 {
  color: inherit !important;
  font-size: 27px !important;
}

.template-layout--sidebar .resume-name-row > span {
  padding: 0;
  color: inherit;
  background: transparent;
}

.template-layout--sidebar .resume-photo {
  width: 112px !important;
  height: 112px !important;
  margin: 0 0 22px !important;
  border: 4px solid rgba(255,255,255,.86);
  border-radius: 50% !important;
}

.template-sidebar__sections {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 30px;
}

.template-sidebar .resume-section,
.template-sidebar .rich-preview,
.template-sidebar .objective-grid strong {
  color: inherit;
}

.template-sidebar .section-heading {
  margin-bottom: 10px;
}

.template-sidebar .section-heading span {
  width: 100%;
  min-width: 0 !important;
  padding: 7px 10px !important;
  border-radius: 0 !important;
  color: inherit;
  background: rgba(255,255,255,.16) !important;
  text-align: center;
}

.template-sidebar .section-heading i,
.template-sidebar .section-heading span::after {
  display: none !important;
}

.template-sidebar .objective-grid {
  grid-template-columns: 1fr;
}

.template-sidebar .objective-grid div {
  border-color: rgba(255,255,255,.28);
  background: transparent;
}

.template-sidebar .objective-grid span {
  color: rgba(255,255,255,.7);
}

.template-layout--sidebar .resume-footer {
  grid-column: 2;
  padding: 0 42px 18px;
}

.template-layout--sidebar.is-right .resume-footer {
  grid-column: 1;
}

.resume-paper[data-template="resume-collection-cn-004"] .template-sidebar {
  color: #59616b;
  background: #f1eeee;
  border-top: 12px solid #ef6464;
}

.resume-paper[data-template="resume-collection-cn-004"] .template-sidebar .section-heading span {
  color: #fff;
  background: #ef6464 !important;
}

.resume-paper[data-template="resume-collection-cn-004"] .template-main {
  border-top: 12px solid #ef6464;
}

.resume-paper[data-template="resume-collection-cn-004"] .template-main .section-heading span {
  color: #ef6464;
  background: transparent;
  border-bottom: 2px solid #ef6464;
  border-radius: 0;
}

.resume-paper[data-template="resume-collection-cn-005"] .template-sidebar {
  background: #294d70;
}

.resume-paper[data-template="resume-collection-cn-005"] .template-main .section-heading {
  border-bottom: 1px solid #9aabba;
}

.resume-paper[data-template="resume-collection-cn-005"] .template-main .section-heading span {
  padding-left: 0;
  color: #294d70;
  background: transparent;
  border-radius: 0;
}

.resume-paper[data-template="resume-collection-cn-008"] .template-sidebar {
  background: linear-gradient(180deg, #3498db 0 68%, #7ebc42 68% 100%);
}

.resume-paper[data-template="resume-collection-cn-008"] .template-sidebar::before {
  display: block;
  margin: -10px -24px 28px;
  padding: 12px 10px;
  color: #f4da28;
  background: rgba(0,0,0,.15);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  content: "专业 · 责任 · 温度";
}

.resume-paper[data-template="resume-collection-cn-007"] .template-sidebar {
  background: #48484b;
}

.resume-paper[data-template="resume-collection-cn-007"] .template-sidebar .section-heading span {
  color: #fff;
  background: #08a8de !important;
}

.resume-paper[data-template="resume-collection-cn-007"] .template-main .section-heading span {
  color: #fff;
  background: #08a8de;
  border-radius: 2px 14px 14px 2px;
}

.template-columns {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  padding: 8px 46px 88px;
}

.template-columns > div {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-header,
.resume-paper[data-template="resume-collection-cn-010"] .resume-header {
  position: relative;
  z-index: 2;
  min-height: 210px;
  padding: 42px 48px 20px;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-name-row,
.resume-paper[data-template="resume-collection-cn-010"] .resume-name-row {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-name-row h1,
.resume-paper[data-template="resume-collection-cn-010"] .resume-name-row h1 {
  color: #0798c9;
  font-size: 48px;
  font-weight: 500;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-photo,
.resume-paper[data-template="resume-collection-cn-010"] .resume-photo {
  width: 142px;
  height: 142px;
  border: 0;
}

.resume-paper[data-template="resume-collection-cn-009"] .template-decor,
.resume-paper[data-template="resume-collection-cn-010"] .template-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  overflow: hidden;
}

.resume-paper[data-template="resume-collection-cn-009"] .template-decor::before,
.resume-paper[data-template="resume-collection-cn-010"] .template-decor::before {
  position: absolute;
  top: 154px;
  right: 38px;
  left: 38px;
  height: 330px;
  border: 1px solid #a7b4ba;
  border-color: #a7b4ba transparent transparent;
  border-radius: 50%;
  transform: rotate(4deg);
  content: "";
}

.resume-paper[data-template="resume-collection-cn-009"] .template-decor i,
.resume-paper[data-template="resume-collection-cn-010"] .template-decor i {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #79adcc;
}

.resume-paper[data-template="resume-collection-cn-009"] .template-decor i:nth-child(1),
.resume-paper[data-template="resume-collection-cn-010"] .template-decor i:nth-child(1) { top: 170px; left: 28px; }
.resume-paper[data-template="resume-collection-cn-009"] .template-decor i:nth-child(2),
.resume-paper[data-template="resume-collection-cn-010"] .template-decor i:nth-child(2) { top: 330px; left: 12px; width: 62px; height: 62px; }
.resume-paper[data-template="resume-collection-cn-009"] .template-decor i:nth-child(3),
.resume-paper[data-template="resume-collection-cn-010"] .template-decor i:nth-child(3) { top: 610px; right: 4px; width: 52px; height: 52px; background: #f7cc42; }
.resume-paper[data-template="resume-collection-cn-009"] .template-decor i:nth-child(4),
.resume-paper[data-template="resume-collection-cn-010"] .template-decor i:nth-child(4) { right: 18px; bottom: 142px; width: 44px; height: 44px; background: #f7cc42; }

.resume-paper[data-template="resume-collection-cn-009"] .template-columns .section-heading span,
.resume-paper[data-template="resume-collection-cn-010"] .template-columns .section-heading span {
  color: #fff;
  background: #009dcc;
  border-radius: 4px 18px 18px 4px;
}

.resume-paper[data-template="resume-collection-cn-009"] .template-columns .section-heading i,
.resume-paper[data-template="resume-collection-cn-010"] .template-columns .section-heading i {
  background: #9bacb5;
}

.resume-paper[data-template="resume-collection-cn-001"] .template-decor,
.resume-paper[data-template="resume-collection-cn-002"] .template-decor,
.resume-paper[data-template="resume-collection-cn-003"] .template-decor,
.resume-paper[data-template="resume-collection-cn-006"] .template-decor {
  display: block;
}

.resume-paper[data-template="resume-collection-cn-001"] .resume-flow {
  padding-left: 0;
  padding-right: 34px;
}

.resume-paper[data-template="resume-collection-cn-001"] .resume-sections,
.resume-paper[data-template="resume-collection-cn-001"] .resume-footer {
  margin-left: 62px;
}

.resume-paper[data-template="resume-collection-cn-002"] .resume-flow {
  border-top: 8px solid #b79c61;
}

.resume-paper[data-template="resume-collection-cn-002"] .resume-header {
  min-height: 124px;
  border-bottom: 7px solid #3f6f78;
}

.resume-paper[data-template="resume-collection-cn-003"] .resume-flow {
  border-top-width: 18px;
  border-bottom-width: 18px;
}

.resume-paper[data-template="resume-collection-cn-006"] .resume-flow::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 82px;
  background: linear-gradient(15deg, #438fc9 0 58%, transparent 59%);
  content: "";
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-005"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-008"] .resume-flow {
  display: block;
  padding: 0 var(--page-padding) 42px 216px;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-header,
.resume-paper[data-template="resume-collection-cn-005"] .resume-header,
.resume-paper[data-template="resume-collection-cn-008"] .resume-header {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 190px;
  min-height: 1160px;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-sections,
.resume-paper[data-template="resume-collection-cn-005"] .resume-sections,
.resume-paper[data-template="resume-collection-cn-008"] .resume-sections {
  padding-top: 42px;
}

/* 004 is a right-hand profile rail in the source document. Keep this after
   the shared sidebar rules so it cannot accidentally inherit the 005/008
   left-rail geometry. */
.resume-paper[data-template="resume-collection-cn-004"] .resume-flow {
  padding: 0 216px 42px var(--page-padding);
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-header {
  inset: 0 0 0 auto;
  border-top: 0;
  border-bottom: 12px solid var(--theme);
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-sections {
  padding-top: 42px;
}

.resume-paper[data-template="resume-collection-cn-004"] .resume-footer {
  right: 216px;
}

/* 009 uses a pale-blue editorial canvas with a central timeline. The old
   white two-column fallback discarded the strongest features of the source. */
.resume-paper[data-template="resume-collection-cn-009"] {
  background: #e7f3f9;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-flow {
  padding: 38px 46px 86px;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-header {
  min-height: 122px;
  justify-content: center;
  text-align: center;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-name-row,
.resume-paper[data-template="resume-collection-cn-009"] .contact-row {
  justify-content: center;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-name-row h1 {
  color: #285d75;
  font-family: "Songti SC", SimSun, serif;
  font-size: 40px;
  font-weight: 500;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-sections {
  position: relative;
  gap: 22px 68px;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-sections::before {
  position: absolute;
  top: 16px;
  bottom: 20px;
  left: 50%;
  width: 2px;
  background: #78a9bc;
  content: "";
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-section {
  z-index: 1;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.46);
}

.resume-paper[data-template="resume-collection-cn-009"] .section-heading span {
  border-radius: 14px 14px 14px 0;
}

.resume-paper[data-template="resume-collection-cn-009"] .resume-footer {
  bottom: 54px;
}

.resume-paper[data-template="resume-collection-cn-009"]::after {
  right: 0;
  bottom: 0;
  left: 0;
}

.rich-preview strong {
  color: #253044;
}

.resume-footer {
  position: absolute;
  left: var(--page-padding);
  right: var(--page-padding);
  bottom: 17px;
  display: flex;
  justify-content: space-between;
  color: #a0a9b8;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.page-markers {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.page-marker {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  width: 100%;
  height: 18px;
  color: #e7ebf0;
  background: #455063;
  font-size: 10px;
}

.page-marker i {
  flex: 1;
  height: 1px;
  margin: 0 8px;
  background: rgba(255, 255, 255, 0.25);
}

.page-marker span {
  padding: 0 8px;
}

.side-panel {
  padding-top: 48px;
}

.side-card {
  margin-bottom: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(31, 45, 61, 0.07);
}

.completion-card {
  position: relative;
  overflow: hidden;
}

.completion-card::after {
  position: absolute;
  right: -48px;
  top: -50px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(18, 167, 125, 0.16), transparent 65%);
  content: "";
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 9px 0 13px;
}

.score-row strong {
  color: var(--brand-dark);
  font-size: 35px;
  line-height: 1;
}

.score-row span,
.side-card p {
  color: #7b8798;
  font-size: 12px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  background: #edf1f5;
  border-radius: 999px;
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #20c894, #0f9e76);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.completion-card p {
  margin: 11px 0 0;
  line-height: 1.7;
}

.side-card__heading {
  margin-bottom: 14px;
  color: #2d3a4d;
  font-size: 15px;
  font-weight: 700;
}

.save-state {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  color: #247d64;
  background: #effaf6;
  border: 1px solid #d6f1e8;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
}

.save-state i {
  width: 8px;
  height: 8px;
  background: #16b585;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22, 181, 133, 0.12);
}

.save-state.is-saving {
  color: #9a6700;
  background: #fff8e8;
  border-color: #fae4a7;
}

.save-state.is-saving i {
  background: #e7a51b;
  box-shadow: 0 0 0 4px rgba(231, 165, 27, 0.13);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 0 0;
  overflow: hidden;
  background: #edf0f4;
  border: 1px solid #edf0f4;
  border-radius: 9px;
}

.status-grid div {
  padding: 10px;
  background: #fff;
}

.status-grid dt {
  color: #98a2b3;
  font-size: 10px;
}

.status-grid dd {
  margin: 3px 0 0;
  color: #3b485b;
  font-size: 12px;
  font-weight: 650;
}

.tips-card ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tips-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #647084;
  font-size: 12px;
  line-height: 1.6;
}

.tips-card li i {
  display: grid;
  flex: 0 0 20px;
  place-items: center;
  height: 20px;
  color: var(--brand-dark);
  background: #eaf8f4;
  border-radius: 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.side-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #19bd8e, #0d9872);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(18, 167, 125, 0.22);
  cursor: pointer;
}

.side-export:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 26px rgba(18, 167, 125, 0.28);
}

.side-export span {
  font-size: 25px;
  line-height: 1;
}

.side-export strong {
  font-size: 15px;
}

.editor-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: 470px;
  background: #fff;
  border-top: 1px solid #dfe5ec;
  box-shadow: 0 -12px 40px rgba(28, 39, 54, 0.15);
  transform: translateY(calc(100% - 58px));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.editor-drawer.is-open {
  transform: translateY(0);
}

.drawer__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 1200px;
  height: 100%;
  margin: 0 auto;
}

.drawer-toggle {
  position: absolute;
  right: -42px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #dce2e9;
  color: #718096;
  background: #fff;
  border-radius: 9px;
  cursor: pointer;
  transition: 0.2s ease;
}

.editor-drawer.is-open .drawer-toggle {
  transform: rotate(180deg);
}

.module-tabs {
  display: flex;
  flex: 0 0 58px;
  width: 100%;
  height: 58px;
  overflow-x: auto;
  border-bottom: 1px solid #e8ecf1;
  scrollbar-width: thin;
}

.module-tab-wrap {
  position: relative;
  flex: 1 0 135px;
  max-width: 180px;
  min-width: 116px;
}

.module-tab-wrap.is-hidden {
  opacity: 0.52;
}

.module-tab-wrap.is-dragging {
  opacity: 0.35;
}

.module-tab {
  position: relative;
  width: 100%;
  height: 58px;
  padding: 20px 22px 5px 22px;
  overflow: hidden;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #596579;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.module-tabs > .module-tab {
  flex: 0 0 120px;
}

.module-tab:hover,
.module-tab.is-active {
  color: var(--brand-dark);
  background: #f5fcfa;
}

.module-tab.is-active {
  border-bottom-color: var(--brand);
}

.module-tab strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-add {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 10px;
  border-bottom: 1px solid #e8ecf1;
}

.module-add__button {
  width: 100%;
  padding: 8px;
  border: 1px dashed #c9d6e0;
  border-radius: 8px;
  color: #667085;
  background: #f8fafb;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.module-add__button:hover {
  border-color: #69ccb0;
  color: var(--brand-dark);
  background: #f2fbf8;
}

.module-add__menu {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% - 4px);
  z-index: 40;
  padding: 6px;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.module-add__item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: #445164;
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.module-add__item:hover {
  background: #f2fbf8;
  color: var(--brand-dark);
}

.module-tab__status {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 17px;
  height: 9px;
  background: #c5ccd5;
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.module-tab__status::after {
  position: absolute;
  left: 1px;
  top: 1px;
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  content: "";
  transition: 0.15s ease;
}

.module-tab__status.is-on,
.module-tab__status--always {
  background: var(--brand);
}

.module-tab__status.is-on::after,
.module-tab__status--always::after {
  left: 9px;
}

.module-tab__status--always {
  pointer-events: none;
}

.module-tab__ops {
  position: absolute;
  left: 5px;
  right: 5px;
  top: 5px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.module-tab-wrap:hover .module-tab__ops,
.module-tab-wrap:has(.is-active) .module-tab__ops {
  opacity: 1;
}

.module-tab__ops button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  color: var(--brand-dark);
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  font-size: 20px;
  line-height: 20px;
}

.module-tab__ops button:disabled {
  opacity: 0.15;
  cursor: default;
}

.drawer-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 23px 28px 32px;
  background: #fbfcfd;
}

.editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.editor-heading > div {
  min-width: 220px;
}

.editor-heading h2 {
  margin: 3px 0 0;
  color: #263447;
  font-size: 19px;
}

.editor-heading > p {
  max-width: 520px;
  margin: 8px 0 0;
  color: #7d899a;
  font-size: 12px;
}

.editor-heading--section {
  align-items: center;
}

.title-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #718096;
  font-size: 12px;
}

.title-edit input {
  width: 190px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dce2e9;
  border-radius: 8px;
  background: #fff;
}

.editor-heading .editor-heading__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.section-lineheight {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #718096;
  font-size: 12px;
}

.section-lineheight select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid #dce2e9;
  border-radius: 8px;
  color: #273548;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px 18px;
}

.editor-grid--profile {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.editor-grid--entry {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 15px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: #647084;
  font-size: 12px;
}

.form-field--wide {
  grid-column: span 2;
}

.form-field input {
  width: 100%;
  height: 39px;
  padding: 0 12px;
  border: 1px solid #dce2e9;
  color: #273548;
  background: #fff;
  border-radius: 9px;
  transition: 0.15s ease;
}

.form-field input:hover,
.form-field input:focus {
  border-color: #69ccb0;
}

.form-field input::placeholder {
  color: #b0b8c4;
}

.editor-footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.inline-upload,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 13px;
  border: 1px solid #b8ded3;
  color: var(--brand-dark);
  background: #f4fcfa;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.ghost-button:hover,
.inline-upload:hover {
  border-color: var(--brand);
  background: #ebfaf5;
}

.timeline-editor {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  min-height: 270px;
}

.entry-nav {
  overflow: hidden;
  background: #f6f8fa;
  border: 1px solid #e0e5eb;
  border-radius: 11px;
}

.entry-nav__heading {
  display: flex;
  justify-content: space-between;
  padding: 11px 13px;
  color: #4c596c;
  background: #eef2f5;
  border-bottom: 1px solid #e0e5eb;
  font-size: 12px;
  font-weight: 700;
}

.entry-nav__heading small {
  color: #8b96a6;
  font-weight: 500;
}

.entry-nav__list {
  max-height: 210px;
  overflow-y: auto;
  padding: 8px;
}

.entry-nav__row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 6px;
}

.entry-nav__row:last-child {
  margin-bottom: 0;
}

.entry-nav__item {
  flex: 1;
  min-width: 0;
  display: block;
  padding: 9px 10px;
  border: 1px solid #e4e8ed;
  color: #576477;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.entry-nav__item:hover,
.entry-nav__item.is-active {
  border-color: #63c9ac;
  box-shadow: 0 0 0 2px rgba(18, 167, 125, 0.08);
}

.entry-nav__item.is-active {
  background: #f3fcf9;
}

.entry-nav__delete {
  flex: 0 0 auto;
  width: 26px;
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  color: #b4bdc9;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.entry-nav__delete:hover {
  border-color: #e05b66;
  color: #e05b66;
  background: #fdf1f2;
}

.entry-nav__item strong,
.entry-nav__item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-nav__item strong {
  color: #334155;
  font-size: 12px;
}

.entry-nav__item span {
  margin-top: 4px;
  color: #8a96a8;
  font-size: 10px;
}

.add-entry-button {
  width: calc(100% - 16px);
  height: 35px;
  margin: 0 8px 8px;
  border: 1px dashed #7ccfb7;
  color: var(--brand-dark);
  background: #f2fcf9;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.entry-editor {
  min-width: 0;
}

.entry-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 14px;
  color: #98a2b3;
  font-size: 12px;
}

.entry-empty p {
  margin: 0;
}

.entry-empty .add-entry-button {
  width: auto;
  height: 32px;
  margin: 0;
  padding: 0 14px;
}

.rich-editor-box {
  overflow: hidden;
  border: 1px solid #dce2e9;
  background: #fff;
  border-radius: 10px;
}

.rich-editor-box:focus-within {
  border-color: #69ccb0;
  box-shadow: 0 0 0 3px rgba(18, 167, 125, 0.08);
}

.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 37px;
  padding: 0 8px;
  background: #f7f9fb;
  border-bottom: 1px solid #e5e9ee;
}

.rich-toolbar button {
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border: 0;
  color: #596579;
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
}

.rich-toolbar button:hover {
  color: var(--brand-dark);
  background: #e8f8f3;
}

.rich-toolbar > span {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: #dce2e9;
}

.rich-editor {
  min-height: 112px;
  max-height: 190px;
  overflow-y: auto;
  padding: 11px 13px;
  color: #344256;
  font-size: 12px;
  line-height: 1.65;
}

.rich-editor p,
.rich-editor ul,
.rich-editor ol {
  margin: 4px 0;
}

.rich-editor ul,
.rich-editor ol {
  padding-left: 22px;
}

.entry-editor__footer {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: #98a2b3;
  font-size: 10px;
}

.danger-link {
  padding: 0;
  border: 0;
  color: #e05b66;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.danger-link:disabled {
  color: #c5ccd5;
  cursor: not-allowed;
}

.standalone-rich-editor {
  max-width: 930px;
}

.standalone-rich-editor .rich-editor {
  min-height: 170px;
}

.editor-tip {
  margin: 9px 0 0;
  color: #8b96a6;
  font-size: 11px;
}

.toast-region {
  position: fixed;
  right: 24px;
  top: 88px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 240px;
  padding: 12px 15px;
  color: #2d3a4d;
  background: #fff;
  border: 1px solid #dce2e9;
  border-left: 4px solid var(--brand);
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(28, 39, 54, 0.16);
  opacity: 0;
  transform: translateX(20px);
  transition: 0.22s ease;
  font-size: 12px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast--warning { border-left-color: #e4a125; }
.toast--info { border-left-color: #4f8edc; }

@media screen and (max-height: 820px) {
  .editor-drawer {
    height: 420px;
  }
}

@media screen and (max-width: 900px) {
  html {
    min-width: 0;
  }

  .topbar__inner {
    width: calc(100% - 20px);
  }

  .brand__text,
  .brand__badge,
  .editor-nav,
  .toolbar,
  .topbar__actions .file-button,
  .topbar__actions > .secondary-button {
    display: none;
  }

  .topbar__actions {
    margin-left: auto;
  }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 20px);
    gap: 18px;
    padding-top: 12px;
  }

  .preview-column,
  .preview-toolbar,
  .preview-stage {
    width: 100%;
  }

  .preview-toolbar {
    height: 54px;
  }

  .preview-toolbar__meta > #fidelityStatus,
  .zoom-badge {
    display: none;
  }

  .preview-stage {
    --preview-scale: calc((100vw - 20px) / 820px);
    height: calc(var(--preview-height, 1160px) * var(--preview-scale));
    min-height: 0;
  }

  .resume-paper,
  .fidelity-preview {
    transform: scale(var(--preview-scale));
    transform-origin: top left;
  }

  .side-panel {
    padding-top: 0;
  }

  .drawer__inner {
    width: 100%;
  }

  .drawer-toggle {
    right: 8px;
  }

  .drawer-content {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    width: 820px;
    min-width: 820px;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .topbar,
  .preview-toolbar,
  .side-panel,
  .editor-drawer,
  .toast-region,
  .page-markers {
    display: none !important;
  }

  .workspace {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .preview-column,
  .preview-stage {
    width: 820px;
    min-height: 1160px;
    margin: 0;
    padding: 0;
  }

  .resume-paper {
    width: 820px !important;
    min-height: 1160px !important;
    overflow: hidden;
    box-shadow: none;
  }

  .resume-flow {
    min-height: 1160px;
    padding: calc(var(--page-padding) + 5px) var(--page-padding) 42px;
  }

  .resume-header:hover,
  .resume-section:hover {
    background: transparent;
  }

  .resume-section,
  .timeline-item {
    break-inside: auto;
  }
}

[data-action="export-resume"]:disabled {
  cursor: wait;
  opacity: 0.72;
}

/* Schema v2 content types and layout families. Each family owns a distinct
   composition; template colors remain a secondary part of the design. */
.compact-list,
.level-list {
  display: grid;
  gap: 8px;
}

.compact-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--theme) 22%, transparent);
}

.compact-list span,
.level-list strong {
  color: #667085;
  font-size: 0.86em;
  font-weight: 500;
}

.level-list > div {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
}

.level-list i {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  background: #e5e7eb;
  overflow: hidden;
}

.level-list i::after {
  content: "";
  display: block;
  width: var(--level);
  height: 100%;
  background: var(--theme);
}

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

.tag-list span {
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--theme) 35%, #d0d5dd);
  color: color-mix(in srgb, var(--theme) 75%, #101828);
  font-size: 0.82em;
}

.template-native-layout--single-banner .resume-header {
  margin: calc(var(--page-padding) * -1) calc(var(--page-padding) * -1) 20px;
  padding: 24px var(--page-padding);
  background: var(--theme);
  color: white;
}

.template-native-layout--single-banner .contact-row,
.template-native-layout--single-banner .resume-name-row span {
  color: rgba(255,255,255,.82);
}

.template-native-layout--single-compact .resume-header {
  padding-bottom: 10px;
  border-bottom: 4px double var(--theme);
}

.template-native-layout--single-compact .resume-sections {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.template-native-layout--single-compact .resume-section--experience,
.template-native-layout--single-compact .resume-section--campus,
.template-native-layout--single-compact .resume-section--summary {
  grid-column: 1 / -1;
}

.template-native-layout--single-rule .section-heading {
  border-left: 8px solid var(--theme);
  padding-left: 10px;
}

.template-native-layout--single-geometric::before,
.template-native-layout--single-geometric::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  background: var(--theme);
  clip-path: polygon(0 0, 100% 0, 68% 100%, 0 45%);
}

.template-native-layout--single-geometric::before { top: 0; }
.template-native-layout--single-geometric::after { bottom: 0; transform: rotate(180deg); }

.resume-paper[data-template="resume-collection-cn-005"] .template-sidebar {
  background: #294d70;
  color: white;
}

.resume-paper[data-template="resume-collection-cn-007"] .template-sidebar {
  background: #4a4a4a;
  color: white;
}

.resume-paper[data-template="resume-collection-cn-008"] .template-sidebar {
  background: #2e9ed4;
  color: white;
  border-right: 12px solid #f2d338;
}

.resume-paper[data-template="resume-collection-cn-009"] .template-columns {
  border-top: 2px solid var(--theme);
  padding-top: 16px;
}

.resume-paper[data-template="resume-collection-cn-010"] .template-columns > div:last-child {
  border-left: 2px solid color-mix(in srgb, var(--theme) 45%, #d0d5dd);
  padding-left: 24px;
}

/* Final native-layout overrides must remain after legacy adapters. */
.resume-paper[data-template="resume-collection-cn-004"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-005"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-007"] .resume-flow,
.resume-paper[data-template="resume-collection-cn-008"] .resume-flow {
  display: block !important;
  padding: 0 !important;
}

.resume-paper[data-template="resume-collection-cn-004"] .template-sidebar .resume-header,
.resume-paper[data-template="resume-collection-cn-005"] .template-sidebar .resume-header,
.resume-paper[data-template="resume-collection-cn-007"] .template-sidebar .resume-header,
.resume-paper[data-template="resume-collection-cn-008"] .template-sidebar .resume-header {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.resume-paper[data-template="resume-collection-cn-004"] .template-main,
.resume-paper[data-template="resume-collection-cn-005"] .template-main,
.resume-paper[data-template="resume-collection-cn-007"] .template-main,
.resume-paper[data-template="resume-collection-cn-008"] .template-main {
  padding-top: 48px !important;
}

.resume-paper[data-template="resume-collection-cn-004"] .template-layout--sidebar .resume-footer {
  right: auto;
}

.resume-paper[data-template="resume-collection-cn-009"] .template-columns,
.resume-paper[data-template="resume-collection-cn-010"] .template-columns {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* 账户入口与登录/设置弹窗 */
.account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 13px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #445164;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.18s ease;
}

.account-button:hover {
  color: var(--brand-dark);
  border-color: #8ed9c2;
  background: #f7fffc;
}

.topbar__actions .account-button {
  margin-left: 0;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #445164;
  background: #fff;
  transition: 0.18s ease;
}

.github-link:hover {
  color: #24292f;
  border-color: #8ed9c2;
  background: #f7fffc;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 30, 42, 0.42);
  backdrop-filter: blur(2px);
}

.auth-dialog {
  width: min(400px, 100%);
  padding: 24px;
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.auth-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-dialog__head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.auth-dialog__close {
  width: 30px;
  height: 30px;
  border: 1px solid #e0e5eb;
  border-radius: 8px;
  color: #7a8798;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.auth-dialog__close:hover {
  color: var(--ink);
  border-color: #b8c2cf;
}

.auth-dialog form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-error {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #f1c2c2;
  border-radius: 8px;
  color: #b23b3b;
  background: #fdf1f1;
  font-size: 12px;
}

.auth-submit {
  width: 100%;
}

.auth-switch {
  margin: 0;
  color: #8b96a6;
  font-size: 12px;
  text-align: center;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--brand-dark);
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.auth-email {
  margin: -6px 0 0;
  color: #8b96a6;
  font-size: 12px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid #e5e9ef;
  border-radius: 11px;
}

.settings-group legend {
  padding: 0 6px;
  color: #7a8798;
  font-size: 12px;
}

.switch-field {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #445164;
  font-size: 13px;
}

.switch-field input {
  accent-color: var(--brand);
}

.settings-group .form-field select {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #273548;
  background: #fff;
}

/* 管理端 */
.admin-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  color: #445164;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.admin-link:hover {
  color: var(--brand-dark);
  background: #f0faf6;
}

.topbar__actions .admin-link {
  padding: 8px 10px;
}

.admin-page {
  min-height: 100vh;
  color: #243044;
  background: #f3f6f8;
}

.admin-main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-heading h1 {
  margin: 4px 0 0;
  font-size: 24px;
  color: #1d2939;
}

.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  padding: 14px 16px;
  border: 1px solid #e5e9ef;
  border-radius: 11px;
  background: #fff;
}

.admin-stat__value {
  color: #1d2939;
  font-size: 20px;
  font-weight: 700;
}

.admin-stat__label {
  color: #8b96a6;
  font-size: 11px;
}

.admin-stat--status .admin-stat__value {
  font-size: 13px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e9ef;
}

.admin-tab {
  padding: 9px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #667085;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.admin-tab.is-active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.admin-panel {
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  padding: 18px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-toolbar input[type="search"] {
  width: min(320px, 100%);
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #273548;
  background: #fff;
}

.admin-toolbar input[type="search"]:focus {
  border-color: #69ccb0;
  outline: none;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #8b96a6;
  font-weight: 650;
  background: #f8fafb;
}

.admin-table tbody tr:hover {
  background: #fbfdfc;
}

.admin-table__ops {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.admin-table__ops button:not(.danger-link) {
  padding: 5px 9px;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  color: #445164;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.admin-table__ops button:not(.danger-link):hover {
  color: var(--brand-dark);
  border-color: #8ed9c2;
}

.admin-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user strong {
  color: #273548;
  font-size: 13px;
}

.admin-user small {
  color: #8b96a6;
  font-size: 11px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  color: #667085;
  background: #eef1f5;
  font-size: 11px;
  font-weight: 650;
}

.badge--admin {
  color: #0d8a68;
  background: #e2f6ef;
}

.badge--active {
  color: #0d8a68;
  background: #e2f6ef;
}

.badge--disabled {
  color: #b23b3b;
  background: #fdeeee;
}

.admin-empty {
  padding: 26px;
  color: #8b96a6;
  text-align: center;
  font-size: 13px;
}

.admin-self {
  color: #b0b8c4;
  font-size: 11px;
}

.admin-subhead {
  margin: 20px 0 10px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.admin-panel > .admin-subhead:first-of-type {
  margin-top: 0;
}

.admin-role-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  color: #445164;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.admin-role-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.admin-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field--wide {
  grid-column: 1 / -1;
}

.admin-field__label {
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

.admin-field input,
.admin-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #273548;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.admin-field input:focus,
.admin-field textarea:focus {
  border-color: #69ccb0;
  outline: none;
}

.admin-field textarea {
  resize: vertical;
}

.admin-field small {
  color: #8b96a6;
  font-size: 11px;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #273548;
  font-size: 13px;
  cursor: pointer;
}

.admin-check input {
  width: auto;
  accent-color: var(--brand);
}

.admin-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-key-row input {
  flex: 1;
}

.admin-key-hint {
  color: #8b96a6;
  font-size: 12px;
  white-space: nowrap;
}

.admin-form__footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.admin-submit {
  padding: 9px 20px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-submit:hover {
  background: var(--brand-dark);
}

/* 导航栏右侧账户入口与下拉菜单 */
.account-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar__actions .account-area {
  margin-left: 0;
}

.account-avatar__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 184px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.account-dropdown__identity {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid #eef1f5;
}

.account-dropdown__identity strong,
.account-dropdown__identity small {
  display: block;
}

.account-dropdown__identity strong {
  color: #273548;
  font-size: 13px;
}

.account-dropdown__identity small {
  color: #8b96a6;
  font-size: 11px;
}

.account-dropdown__item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: #445164;
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-dropdown__item:hover {
  background: #f6f9f8;
}

.account-dropdown__item--danger {
  color: #e05b66;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #eef1f5;
}

.login-card {
  width: min(400px, 100%);
  padding: 32px;
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.login-brand {
  width: auto;
  margin-bottom: 22px;
}

.login-card__head {
  margin-bottom: 20px;
}

.login-card__head h1 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 24px;
}

.login-card__head p {
  margin: 0;
  color: #7a8798;
  font-size: 13px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* AI 生成页 */
.ai-page {
  min-height: 100vh;
  color: #243044;
  background: #f3f6f8;
}

.ai-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.ai-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.ai-heading h1 {
  margin: 5px 0 8px;
  font-size: 26px;
  letter-spacing: 0;
}

.ai-heading p {
  margin: 0;
  color: #718096;
  font-size: 13px;
}

.ai-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ai-input-card {
  max-width: 760px;
  padding: 18px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #fff;
}

.ai-label {
  display: block;
  margin-bottom: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

.ai-input-card textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #273548;
  background: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}

.ai-input-card textarea:focus {
  border-color: #69ccb0;
  outline: none;
}

.ai-input-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.ai-input-actions select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #273548;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.ai-submit,
.ai-save {
  padding: 9px 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ai-submit:hover,
.ai-save:hover {
  background: var(--brand-dark);
}

.ai-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-privacy {
  margin: 14px 0 0;
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.6;
}

.ai-import-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ai-import-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.ai-import-btn:hover {
  background: #eef7f4;
}

.ai-import-status {
  color: #98a2b3;
  font-size: 12px;
}
.ai-import-status:empty {
  display: none;
}
.ai-import-status.is-error {
  color: #b54708;
}

.ai-char-count {
  margin-left: auto;
  color: #98a2b3;
  font-size: 12px;
}
.ai-char-count.is-over {
  color: #b54708;
  font-weight: 700;
}

.ai-input-card.is-dragging {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(18, 167, 125, 0.12);
}

.ai-result {
  min-width: 0;
}

.ai-result__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ai-result__head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.ai-result__actions {
  display: flex;
  gap: 10px;
}

.ai-regen {
  padding: 9px 16px;
  border: 1px solid #dce2e9;
  border-radius: 8px;
  color: #475467;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.ai-regen:hover {
  border-color: #69ccb0;
  color: var(--brand-dark);
}

.ai-notices {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.ai-notice {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.6;
}

.ai-notice--warn {
  border: 1px solid #f6d3a5;
  color: #8a5a14;
  background: #fff8ec;
}

.ai-notice--info {
  border: 1px solid #d7e8ef;
  color: #3d6573;
  background: #f2f8fb;
}

.ai-notice code {
  padding: 1px 5px;
  border-radius: 4px;
  color: #8a5a14;
  background: rgba(0, 0, 0, 0.05);
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.ai-preview-scroll {
  overflow: auto;
  padding: 10px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #eef1f5;
}

.ai-preview-scroll .resume-paper {
  margin: 0 auto;
}

/* ---------- 赞赏入口（右侧悬浮，点击展开） ---------- */
.support-float__trigger {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 46px;
  padding: 12px 9px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: -6px 8px 24px rgba(28, 39, 54, 0.12);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  transform: translateY(-50%);
  transition: color 0.16s ease, background 0.16s ease;
}

.support-float__trigger:hover {
  color: var(--brand-dark);
  background: #f2faf7;
}

.support-float__icon {
  font-size: 17px;
  line-height: 1;
}

.support-card {
  position: fixed;
  top: 50%;
  right: 64px;
  z-index: 80;
  width: 252px;
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translateY(-50%);
}

.support-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 7px;
  color: #98a2b3;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.support-card__close:hover {
  color: var(--ink);
  background: #f2f4f7;
}

.support-card__head strong {
  display: block;
  padding-right: 18px;
  font-size: 15px;
  letter-spacing: 0;
}

.support-card__head p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.support-card__qrcode {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}

.support-card__hint {
  display: block;
  margin-top: 10px;
  color: #98a2b3;
  font-size: 11px;
}

@media screen and (max-width: 720px) {
  .support-float__trigger {
    top: auto;
    right: 16px;
    bottom: 16px;
    flex-direction: row;
    padding: 10px 14px;
    border-right: 1px solid var(--line);
    border-radius: 24px;
    transform: none;
  }

  .support-card {
    top: auto;
    right: 12px;
    bottom: 76px;
    left: 12px;
    width: auto;
    transform: none;
  }
}

/* —— 管理端筛选/看板/新面板 —— */

.admin-toolbar select,
.admin-toolbar input[type="date"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #273548;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.admin-toolbar select:focus,
.admin-toolbar input[type="date"]:focus {
  border-color: #69ccb0;
  outline: none;
}

.admin-csv {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #445164;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.admin-csv:hover {
  color: var(--brand-dark);
  border-color: #8ed9c2;
}

.admin-toolbar__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-chart {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #fff;
}

.admin-chart svg {
  width: 100%;
  height: 200px;
  display: block;
}

.chart-title {
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  color: #667085;
  font-size: 12px;
}

.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
}

.admin-inline-form {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  background: #f8fafb;
}

.admin-user.small {
  display: block;
  color: #8b96a6;
  font-size: 11px;
  margin-top: 2px;
}

.announcement-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  padding: 12px 16px;
  border: 1px solid #cfe8de;
  border-radius: 12px;
  background: #f0faf6;
}

.announcement-banner__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.announcement-banner__body strong {
  color: #0d8a68;
  font-size: 14px;
}

.announcement-banner__body span {
  color: #445164;
  font-size: 13px;
}

.announcement-banner button {
  border: 0;
  background: transparent;
  color: #8b96a6;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.msg-badge {
  display: inline-block;
  min-width: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #fff;
  background: #e5484d;
  font-size: 11px;
  text-align: center;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  margin-bottom: 8px;
}

.message-item {
  padding: 12px 14px;
  border: 1px solid #eef1f5;
  border-radius: 10px;
  background: #fff;
}

.message-item.is-unread {
  border-color: #cfe8de;
  background: #f7fdfa;
}

.message-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.message-item__head strong {
  color: #273548;
  font-size: 14px;
}

.message-item__head small {
  color: #8b96a6;
  font-size: 11px;
}

.message-item p {
  margin: 0 0 8px;
  color: #445164;
  font-size: 13px;
  white-space: pre-wrap;
}

.message-item button {
  padding: 4px 9px;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  color: #445164;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.admin-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.admin-check-row input[type="checkbox"] {
  margin-top: 2px;
}

.admin-check-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-check-row strong {
  color: #273548;
  font-size: 13px;
}

.admin-check-row small {
  color: #8b96a6;
  font-size: 12px;
}

/* ---- 字段管理器（编辑器抽屉） ---- */
.field-manager {
  margin-top: 18px;
  border: 1px solid #e0e5eb;
  border-radius: 11px;
  background: #fbfcfd;
  overflow: hidden;
}

.field-manager summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 13px;
  color: #4c596c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.field-manager summary::-webkit-details-marker {
  display: none;
}

.field-manager summary small {
  color: #8b96a6;
  font-weight: 500;
  font-size: 11px;
}

.field-manager__list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 18px 26px 1fr 112px auto;
  gap: 8px;
  align-items: center;
}

.field-row.is-hidden {
  opacity: 0.55;
}

.field-row__grip {
  color: #c0c8d2;
  text-align: center;
  cursor: default;
  font-size: 14px;
}

.field-row__toggle {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #9aa4b2;
  font-size: 12px;
  border-radius: 6px;
}

.field-row__toggle.is-on {
  color: var(--brand);
}

.field-row__label {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  color: #273548;
  background: #fff;
  font-size: 12px;
}

.field-row__type {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  color: #4c596c;
  background: #fff;
  font-size: 12px;
}

.field-row__ops {
  display: flex;
  gap: 4px;
}

.field-row__ops button {
  width: 28px;
  height: 28px;
  border: 1px solid #e0e5eb;
  border-radius: 6px;
  background: #fff;
  color: #647084;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.field-row__ops button:hover:not(:disabled) {
  border-color: #69ccb0;
  color: var(--brand);
}

.field-row__ops button:disabled {
  opacity: 0.35;
  cursor: default;
}

.field-row__delete {
  color: #c0392b !important;
}

.field-manager__footer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #eef1f5;
}

.field-manager__add {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #eef1f5;
}

.field-manager__add-label {
  flex: 1;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  font-size: 12px;
  color: #273548;
}

.field-manager__add select {
  height: 32px;
  border: 1px solid #dce2e9;
  border-radius: 7px;
  font-size: 12px;
  color: #4c596c;
}

.field-manager__add button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #b8ded3;
  border-radius: 7px;
  background: #f4fcfa;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.form-field textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #dce2e9;
  color: #273548;
  background: #fff;
  border-radius: 9px;
  resize: vertical;
  font: inherit;
  transition: 0.15s ease;
}

.form-field textarea:hover,
.form-field textarea:focus {
  border-color: #69ccb0;
}

/* ---- 预览里的补充字段（标签:值） ---- */
.field-meta-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}

.field-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.94em;
}

.field-meta span {
  color: #94a3b8;
  min-width: 76px;
}

.field-meta strong {
  color: #334155;
  font-weight: 600;
}

.field-meta a {
  color: var(--theme);
  text-decoration: none;
}

.compact-list .field-meta-list,
.level-list .field-meta-list {
  grid-column: 1 / -1;
}

/* ---- 应用内确认 / 输入弹窗（替代 window.confirm / prompt） ---- */
.app-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 30, 42, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.app-dialog-overlay.is-visible {
  opacity: 1;
}

.app-dialog {
  width: min(420px, 100%);
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}

.app-dialog-overlay.is-visible .app-dialog {
  transform: none;
}

.app-dialog h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
}

.app-dialog p {
  margin: 0 0 18px;
  color: #4c596c;
  font-size: 13px;
  line-height: 1.7;
}

.app-dialog__input {
  width: 100%;
  height: 39px;
  margin-bottom: 18px;
  padding: 0 12px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  color: #273548;
  background: #fff;
  font-size: 13px;
}

.app-dialog__input:focus {
  border-color: #69ccb0;
}

.app-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app-dialog__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.app-dialog__submit:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.app-dialog__submit.is-danger {
  background: #d64545;
  border-color: #d64545;
}

.app-dialog__submit.is-danger:hover {
  background: #b93a3a;
  border-color: #b93a3a;
}
