/* ==========================================================
   续历 · 视图
   ========================================================== */

/* ---- 通用：主题色块 / 版式卡片 ---- */
.swatches { display: flex; gap: 8px; align-items: center; }
.swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); position: relative; transition: transform .15s var(--ease); }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--fg); }
.swatch span { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.swatches.lg { gap: 18px; padding-bottom: 22px; }
.swatches.lg .swatch { width: 28px; height: 28px; }

.tpl-card { display: grid; gap: 6px; text-align: left; font-size: 13px; }
.tpl-card b { font-weight: 500; }
.tpl-card .faint { font-size: 12px; }
.tpl-sheet { display: block; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair); transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.tpl-card:hover .tpl-sheet { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--hair-2), var(--sh-2); }
.tpl-card[aria-pressed="true"] .tpl-sheet { box-shadow: 0 0 0 2px var(--fg); }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================
   首页
   ========================================================== */
.home { --w: 1120px; }
.home-nav { max-width: var(--w); margin: 0 auto; height: 64px; padding: 0 28px; display: flex; align-items: center; gap: 28px; }
.home-nav .grow { flex: 1; }
.nav-slogan { font-size: 12.5px; color: var(--fg-2); padding-left: 16px; border-left: 1px solid var(--hair); white-space: nowrap; }
.home-link { font-size: 13.5px; color: var(--fg-2); }
.home-link:hover { color: var(--fg); }
.home-nav .btn-plain { margin-right: -16px; }

.hero { text-align: center; padding: clamp(72px, 14vh, 140px) 24px 72px; }
.hero h1 { font-size: clamp(44px, 7.4vw, 84px); line-height: 1.08; font-weight: 600; letter-spacing: -.035em; margin: 28px 0 24px; }
.hero > p { font-size: clamp(16px, 1.6vw, 18px); color: var(--fg-2); }
.hero-cta { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }

.stage { max-width: var(--w); margin: 0 auto; padding: 24px 28px 0; display: grid; justify-items: center; scroll-margin-top: 24px; }
.stage-paper { width: min(520px, 100%); padding: clamp(18px, 4vw, 48px); background: var(--surface-3); border-radius: var(--r-xl); }
.stage-paper .sheet { box-shadow: var(--sh-paper); border-radius: 2px; }
.stage-controls { display: flex; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.stage-note { margin-top: 16px; font-size: 13px; color: var(--fg-3); }

.feats { max-width: var(--w); margin: 0 auto; padding: 140px 28px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.feats > div { border-top: 1px solid var(--fg); padding-top: 20px; }
.feats h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.feats p { color: var(--fg-2); }

.statement { max-width: var(--w); margin: 0 auto; padding: 200px 28px; text-align: center; }
.statement h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.statement span { color: var(--fg-3); }

.closing { border-top: 1px solid var(--hair); text-align: center; padding: 120px 24px; display: grid; justify-items: center; gap: 28px; }
.closing h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.02em; }
.closing p { font-size: 13px; }
.home-foot { max-width: var(--w); margin: 0 auto; padding: 24px 28px 40px; display: flex; gap: 20px; font-size: 12.5px; color: var(--fg-3); border-top: 1px solid var(--hair); }
.home-foot .grow { flex: 1; }
.home-foot a:hover { color: var(--fg); }

@media (max-width: 760px) {
  .feats { grid-template-columns: 1fr; gap: 32px; padding-top: 96px; }
  .statement { padding: 120px 24px; }
  .home-link, .nav-slogan { display: none; }
}

/* ==========================================================
   登录 / 注册 / 找回
   ========================================================== */
.auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 0 24px; }
.auth-top { height: 64px; display: flex; align-items: center; max-width: 1120px; width: 100%; margin: 0 auto; padding: 0 4px; }
.auth-main { width: 100%; max-width: 380px; margin: 0 auto; align-self: center; padding: 32px 0 64px; }
.auth-main h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.auth-sub { color: var(--fg-2); line-height: 1.7; margin-bottom: 8px; }
.auth-sub b { color: var(--fg); font-weight: 500; }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
.auth-form .btn-block { margin-top: 8px; }
.auth-alt { margin-top: 24px; font-size: 13px; color: var(--fg-2); }
.auth-alt a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair-2); }
.auth-alt span { margin: 0 8px; color: var(--hair-2); }
.auth-foot { text-align: center; padding: 24px; font-size: 12px; }

/* ==========================================================
   登录后：顶栏 / 简历廊 / 回收站 / 邀请
   ========================================================== */
.appbar { gap: 24px; }
.appbar-nav { display: flex; gap: 4px; }
.appbar-tab { height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: var(--r-sm); font-size: 13.5px; color: var(--fg-2); }
.appbar-tab:hover { color: var(--fg); background: var(--surface-3); }
.appbar-tab.on { color: var(--fg); font-weight: 500; }
.user-btn { gap: 8px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--fg); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; }

.gallery { max-width: 1120px; margin: 0 auto; padding: 48px 28px 120px; }
.gallery.narrow { max-width: 760px; }
.g-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.g-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.g-sub { margin-top: 6px; font-size: 13px; }
.g-actions { display: flex; gap: 8px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 40px 28px; }
.g-card { position: relative; display: grid; gap: 14px; cursor: pointer; border-radius: var(--r); }
.g-card:not([data-open]) { cursor: default; }
.g-thumb { aspect-ratio: 210 / 297; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.g-card[data-open]:hover .g-thumb, .g-card[data-open]:focus-visible .g-thumb { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--hair-2), var(--sh-2); }
.g-card:focus-visible { outline: none; }
.g-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-meta { margin-top: 3px; font-size: 12.5px; display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.g-live { display: inline-flex; align-items: center; gap: 5px; color: var(--fg-2); }
.g-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transform: translateY(-2px); transition: opacity .15s, transform .15s; }
.g-card:hover .g-tools, .g-card:focus-within .g-tools { opacity: 1; transform: none; }
.g-card.is-skeleton .g-thumb { box-shadow: none; }
.g-empty { grid-column: 1 / -1; border: 1px dashed var(--hair-2); border-radius: var(--r-xl); }
@media (hover: none) { .g-tools { opacity: 1; transform: none; } }

.newdoc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding-top: 8px; }
.newdoc-themes { display: flex; align-items: center; gap: 16px; margin-top: 24px; font-size: 13px; }
.newdoc-theme-name { font-size: 13px; color: var(--fg-2); }
@media (max-width: 720px) { .newdoc-grid { grid-template-columns: repeat(2, 1fr); } }

.import { display: grid; gap: 16px; }
.import .seg { justify-self: start; }
.drop { display: grid; place-items: center; gap: 6px; min-height: 220px; border: 1px dashed var(--hair-2); border-radius: var(--r-lg); cursor: pointer; text-align: center; font-size: 13px; transition: background .15s, border-color .15s; }
.drop.over, .drop:hover { background: var(--surface-2); border-color: var(--fg-3); }
.drop b { font-size: 15px; font-weight: 500; }
.drop-name { font-style: normal; color: var(--fg); }
.kvlist { display: grid; grid-template-columns: 80px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.kvlist dt { color: var(--fg-3); font-size: 13px; }
.kvlist dd { margin: 0; }
.issues { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 6px; }
.issues li { font-size: 13px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--cursor-soft); color: #8A3200; }
.issues li.info { background: var(--surface-3); color: var(--fg-2); }

.invite-form { display: flex; gap: 8px; margin-bottom: 40px; }
.invite-form .input { flex: 1; }
.inv-sum { font-size: 12.5px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.inv-row { display: grid; grid-template-columns: 1fr auto 120px; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.inv-who { display: grid; gap: 2px; min-width: 0; }
.inv-who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.inv-who .faint { font-size: 12.5px; }
.inv-acts { display: flex; gap: 4px; justify-content: flex-end; }
@media (max-width: 640px) { .inv-row { grid-template-columns: 1fr; gap: 8px; } .inv-acts { justify-content: flex-start; } }

/* ==========================================================
   一份简历：顶栏 + 画布 + 抽屉
   ========================================================== */
.doc-page { min-height: 100vh; background: var(--surface-3); }
.tl-version .tl-content { display: grid; gap: 6px; min-width: 0; flex: 1; }
.tl-version .tl-heading { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.tl-version .tl-heading b { font-weight: 500; }
.tl-version .tl-changes { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; color: var(--fg-2); }
.tl-version .tl-preview { font-size: 12px; }
.doc-bar { background: rgba(255, 255, 255, .9); }
.doc-actions { display: flex; align-items: center; gap: 2px; }
.doc-actions .bar-sep { margin: 0 8px; }
.doc-actions .btn-plain .dot { margin-right: 2px; }
.doc-actions .btn-plain .dot:not(.live) { display: none; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-3); font-weight: 400; white-space: nowrap; }
.save-state:empty { display: none; }
.save-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hair-2); }
.save-state.is-pending::before, .save-state.is-saving::before { background: var(--cursor); }
.save-state.is-saving::before { animation: blink 1s steps(1) infinite; }
.save-state.is-saved::before { background: var(--fg); }
.save-state.is-error { color: var(--danger); cursor: pointer; }
.save-state.is-error::before { background: var(--danger); }

.doc-notice { position: sticky; top: var(--bar-h); z-index: 30; display: flex; justify-content: center; padding: 12px 16px 0; pointer-events: none; }
.notice-inner { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: min(210mm, 100%); padding: 8px 8px 8px 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-2); font-size: 13px; }
.notice-inner .grow { flex: 1; }

.canvas { padding: 28px 16px 120px; overflow-x: auto; }
.canvas-inner { width: max-content; margin: 0 auto; }
.canvas .resume { box-shadow: var(--sh-paper); }
.doc-page.is-editing .canvas .resume { box-shadow: 0 0 0 1px var(--hair-2), var(--sh-paper); }
@media (max-width: 880px) {
  .canvas { padding: 0; }
  .canvas-inner { width: auto; }
  .canvas .resume.is-fluid { box-shadow: none; }
  .doc-actions .bar-sep { display: none; }
}
@media (max-width: 600px) {
  .doc-actions .btn-plain[data-act="layout"], .doc-actions .btn-plain[data-act="pdf"] { display: none; }
}

.tpl-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px; }
.fs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fs-grid label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--fg-2); }
.fs-grid .input { width: 72px; height: 32px; font-size: 13px; text-align: center; padding: 0 6px; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 3px; top: 12px; bottom: 12px; width: 1px; background: var(--hair); }
.tl-row { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 8px; margin: 0 -8px; border-radius: var(--r-sm); font-size: 13.5px; }
a.tl-row:hover { background: var(--surface-3); }
.tl-row .faint { font-size: 12.5px; }
.tl-dot { position: absolute; left: -18px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--fg-3); }
.tl-row.is-now .tl-dot { background: var(--cursor); border-color: var(--cursor); box-shadow: 0 0 0 3px var(--cursor-soft); }
.tl-row.is-now b { font-weight: 600; }

.share-off { padding: 24px 0; }
.share-lead { font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.share-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
.share-meta a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================
   公开页
   ========================================================== */
.public-page { min-height: 100vh; background: var(--surface-3); }
.public-tools { position: fixed; top: 16px; right: 16px; z-index: 20; }
.public-tools .btn { box-shadow: var(--sh-1); }
.public-page .canvas { padding-top: 48px; }
.public-msg { padding: 120px 0; text-align: center; width: 210mm; max-width: 100%; }
.public-page .empty { width: min(210mm, calc(100vw - 32px)); background: var(--surface); border-radius: var(--r-xl); }
.public-foot { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 0 0 48px; font-size: 12px; margin-top: -72px; }
.public-foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--fg-2); }
.public-foot .mark { width: 14px; height: 14px; }
@media (max-width: 880px) { .public-page .canvas { padding-top: 0; } .public-foot { margin-top: 0; padding-top: 32px; } .public-tools { top: auto; bottom: 16px; } }

