:root {
  --bg: #f4f5fb;
  --card: #fff;
  --text: #1e2235;
  --text-2: #4a5068;
  --muted: #7b8199;
  --line: #e7e9f2;
  --line-strong: #d7dae7;
  --primary: #5b5bf0;
  --primary-dark: #4646d8;
  --primary-soft: #eef0ff;
  --grad: linear-gradient(135deg, #5b5bf0 0%, #8b5cf6 100%);
  --danger: #e5484d;
  --success: #16a34a;
  --radius: 16px;
  --radius-sm: 10px;
  --topbar-h: 62px;
  --shadow-sm: 0 1px 2px rgba(30, 34, 53, .05);
  --shadow: 0 1px 2px rgba(30, 34, 53, .04), 0 10px 30px -12px rgba(30, 34, 53, .10);
  --shadow-lg: 0 24px 60px -16px rgba(30, 34, 53, .30);
  --ring: 0 0 0 4px rgba(91, 91, 240, .14);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1100px 520px at -8% -12%, rgba(91, 91, 240, .11), transparent 60%),
    radial-gradient(900px 480px at 108% -10%, rgba(236, 72, 153, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font: 14px/1.65 "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; font-weight: 650; margin: 0 0 14px; color: var(--text); }
h4 { margin: 16px 0 8px; font-size: 14px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
code { background: #f1f2f8; padding: 1px 5px; border-radius: 5px; font-size: 12px; }
::selection { background: rgba(91, 91, 240, .18); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3d6e4; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #b9bdd1; }

/* 标题图标块 */
.h-icon {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: inline-grid; place-items: center; font-size: 16px; line-height: 1;
  background: var(--tint-bg, var(--primary-soft));
}
.t-blue { --tint-bg: #e8efff; }
.t-violet { --tint-bg: #f0eaff; }
.t-pink { --tint-bg: #fdeaf3; }
.t-teal { --tint-bg: #e3f6f4; }
.t-amber { --tint-bg: #fdf3dc; }
.t-green { --tint-bg: #e5f6ea; }
.t-slate { --tint-bg: #eef0f4; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; background: rgba(255, 255, 255, .75);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(231, 233, 242, .9);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; display: block; box-shadow: 0 8px 18px -6px rgba(67, 56, 202, .55); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b {
  font-size: 16.5px; letter-spacing: 1px; font-weight: 700;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 55%, #7c3aed 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text small { font-size: 11.5px; color: var(--muted); }
.nav { display: flex; gap: 2px; padding: 4px; background: rgba(238, 240, 247, .85); border: 1px solid var(--line); border-radius: 13px; }
.nav button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 7px 14px; border-radius: 9px; font: inherit; font-size: 13.5px; color: var(--text-2); transition: all .18s;
}
.nav button svg { width: 16px; height: 16px; opacity: .75; }
.nav button:hover { color: var(--text); background: rgba(255, 255, 255, .7); }
.nav button.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(30, 34, 53, .1), 0 0 0 1px rgba(91, 91, 240, .08); }
.nav button.active svg { opacity: 1; }

main { max-width: 1400px; margin: 0 auto; padding: 24px 28px 70px; }
.tab { display: none; }
.tab.active { display: block; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.card.narrow { max-width: 760px; }
.grid-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.grid-2 > .card { margin-bottom: 20px; }

/* 引导横幅 */
.hero {
  position: relative; overflow: hidden; margin-bottom: 20px; padding: 26px 30px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: center;
  border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, #4f46e5 0%, #6d5ef5 45%, #a855f7 100%);
  box-shadow: 0 20px 40px -18px rgba(91, 91, 240, .6);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
}
.hero::before { width: 380px; height: 380px; right: -120px; top: -180px; }
.hero::after { width: 260px; height: 260px; left: 32%; bottom: -170px; }
.hero h1 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.hero h1 span { color: #fde68a; }
.hero p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 13.5px; max-width: 460px; }
.hero-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
.hero-steps li {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22); transition: all .2s;
}
.hero-steps li:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.hero-steps b {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: #fff; color: #5b5bf0; font-size: 13px;
}
.hero-steps strong { display: block; font-size: 13.5px; }
.hero-steps span { display: block; font-size: 12px; color: rgba(255, 255, 255, .78); line-height: 1.45; margin-top: 2px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.form-grid.tight { grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-grid .field { margin-bottom: 0; }
.field.full { grid-column: 1 / -1; }
/* AI 润色结果面板 */
.polish-box, .polish-tips { grid-column: 1 / -1; }
.polish-box { margin: -4px 0 12px; padding: 12px 14px; border: 1px solid #f6e2b8; border-radius: 12px; background: linear-gradient(180deg, #fffcf3 0%, #fff 100%); }
.polish-head { font-weight: 600; font-size: 13px; color: #b45309; margin-bottom: 6px; }
.polish-result { white-space: pre-wrap; font-size: 13.5px; line-height: 1.7; color: var(--text); min-height: 1.7em; }
.polish-title, .polish-tip-list { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.polish-tip-list div { margin-left: 2px; }
.polish-box .row-actions { margin-top: 10px; }
.polish-tips { margin: -6px 0 12px; font-size: 12.5px; color: #92400e; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), textarea, select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; background: #fbfbfe; color: inherit; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):hover, textarea:hover, select:hover { border-color: #c3c7da; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary) !important; background: #fff; box-shadow: var(--ring); }
::placeholder { color: #a6abc0; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8199' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
textarea { resize: vertical; line-height: 1.6; }
input[type=checkbox], input[type=range] { accent-color: var(--primary); }
.input-group { display: flex; gap: 6px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); padding: 8px 16px;
  border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: all .18s;
}
.btn:hover:not(:disabled) { border-color: rgba(91, 91, 240, .45); color: var(--primary); background: #fafaff; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -6px rgba(91, 91, 240, .65); }
.btn.primary:hover:not(:disabled) { color: #fff; background: var(--grad); filter: brightness(1.07); box-shadow: 0 10px 22px -8px rgba(91, 91, 240, .75); }
.btn.danger { border-color: rgba(229, 72, 77, .45); color: var(--danger); }
.btn.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); background: #fff6f6; }
.btn.ghost-danger:hover:not(:disabled) { border-color: rgba(229, 72, 77, .5); color: var(--danger); background: #fff6f6; }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn.big { padding: 12px 24px; font-size: 15px; font-weight: 600; border-radius: 12px; }
.link-btn { border: 0; background: none; color: var(--primary); cursor: pointer; font: inherit; font-size: 12.5px; padding: 0 4px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); }
.icon-btn { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; border-radius: 8px; width: 32px; height: 32px; transition: all .15s; }
.icon-btn:hover { background: #f1f2f8; color: var(--text); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--line); background: #f7f8fc; border-radius: 999px; padding: 5px 13px;
  cursor: pointer; font: inherit; font-size: 13px; color: var(--text-2); transition: all .15s;
}
.chip:hover { border-color: rgba(91, 91, 240, .4); color: var(--primary); background: #f5f5ff; }
.chip.active { border-color: transparent; color: #fff; background: var(--grad); box-shadow: 0 4px 12px -4px rgba(91, 91, 240, .6); }

/* 资料库 */
.section { --tint: #5b5bf0; --tint-bg: #eef0ff; }
.section[data-key=work] { --tint: #4f7cf7; --tint-bg: #e8efff; }
.section[data-key=projects] { --tint: #8b5cf6; --tint-bg: #f0eaff; }
.section[data-key=education] { --tint: #16a34a; --tint-bg: #e5f6ea; }
.section[data-key=skills] { --tint: #f59e0b; --tint-bg: #fdf3dc; }
.section[data-key=awards] { --tint: #ec4899; --tint-bg: #fdeaf3; }
.section[data-key=others] { --tint: #14b8a6; --tint-bg: #e3f6f4; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
.count {
  display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 999px; text-align: center;
  background: var(--tint-bg, var(--primary-soft)); color: var(--tint, var(--primary)); font-size: 12px; font-weight: 600;
}
/* 资料库布局：左侧名片导航 + 右侧内容 */
.profile-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-main > .card, .profile-main .section { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.profile-nav {
  position: sticky; top: calc(var(--topbar-h) + 18px); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.pn-card {
  text-align: center; padding: 22px 16px 16px; position: relative;
  background: linear-gradient(160deg, #eef0ff 0%, #f6efff 60%, #fff 100%);
}
.pn-avatar {
  width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 22px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 0 0 4px #fff, 0 10px 22px -8px rgba(91, 91, 240, .55);
}
.pn-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pn-name { font-weight: 700; font-size: 16px; }
.pn-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pn-links { padding: 8px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); }
.pn-links a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; color: var(--text-2);
  font-size: 13.5px; text-decoration: none; transition: all .15s;
}
.pn-links a span { width: 22px; text-align: center; }
.pn-links a b { margin-left: auto; font-size: 12px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 0 8px; min-width: 22px; text-align: center; }
.pn-links a b.zero { color: var(--muted); background: #f1f2f7; }
.pn-links a:hover { background: #f5f6fc; color: var(--text); text-decoration: none; }
.pn-links a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.autosave { font-size: 12px; font-weight: 400; color: var(--success); background: #effaf2; border-radius: 999px; padding: 1px 9px; }
.section-hint { margin-top: -6px; }

/* 资料条目 */
.entries { display: flex; flex-direction: column; gap: 12px; }
.entry { position: relative; }
.entry-top { display: flex; align-items: flex-start; gap: 12px; }
.entry-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.entry-title strong { font-size: 15px; color: var(--text); }
.entry-sub { font-size: 13px; color: var(--text-2); }
.entry-date {
  flex-shrink: 0; font-size: 12px; color: var(--tint, var(--primary)); background: var(--tint-bg, var(--primary-soft));
  border-radius: 999px; padding: 2px 10px; font-weight: 500; white-space: nowrap;
}
.entry-body { color: var(--text-2); font-size: 13px; margin-top: 8px; line-height: 1.75; }
.entry-body ul { margin: 0; padding-left: 18px; }
.entry-body li { margin: 2px 0; }
.entry-body li::marker { color: var(--tint, var(--primary)); }
.entry-body p { margin: 2px 0; }
.entry-body.clamp { max-height: 7.2em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.entry-body.clamp.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.more-btn { margin-top: 2px; padding: 0; }
.supp-li { list-style: none; margin-left: -18px !important; }
.mini-tag { font-size: 11px; color: #b45309; background: #fdf3dc; border-radius: 5px; padding: 0 6px; margin-right: 6px; font-weight: 600; }
.entry-actions { display: flex; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity .15s; }
.entry:hover .entry-actions, .entry:focus-within .entry-actions { opacity: 1; }
.icon-act {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  display: grid; place-items: center; color: var(--text-2); transition: all .15s; padding: 0;
}
.icon-act svg { width: 15px; height: 15px; }
.icon-act:hover { color: var(--primary); border-color: rgba(91, 91, 240, .4); background: #f6f6ff; }
.icon-act.danger:hover { color: var(--danger); border-color: rgba(229, 72, 77, .4); background: #fff6f6; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-chip { font-size: 12px; padding: 1px 9px; border-radius: 6px; background: #f3f4fa; color: var(--text-2); border: 1px solid var(--line); }

/* 时间线（工作 / 项目 / 教育） */
.style-timeline { position: relative; padding-left: 26px; gap: 0; }
.style-timeline::before {
  content: ""; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--tint), color-mix(in srgb, var(--tint) 10%, transparent));
}
.tl-item { padding: 12px 16px; border-radius: 14px; border: 1px solid transparent; transition: all .18s; margin-bottom: 6px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 17px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--tint); box-shadow: 0 0 0 4px var(--tint-bg);
}
.tl-item:hover { background: #fafbff; border-color: var(--line); box-shadow: 0 10px 24px -16px rgba(30, 34, 53, .3); }

/* 技能 */
.skill-item { padding: 12px 16px; border-radius: 14px; background: #fffcf4; border: 1px solid #f6ead0; transition: all .18s; }
.skill-item:hover { box-shadow: 0 10px 24px -16px rgba(180, 120, 20, .35); }
.level-tag { font-size: 11.5px; font-weight: 600; color: #b45309; background: #fdf3dc; border-radius: 6px; padding: 1px 8px; }
.skill-chip {
  font-size: 12.5px; padding: 3px 11px; border-radius: 999px; background: #fff; color: var(--text);
  border: 1px solid #f0dfb8; box-shadow: 0 1px 2px rgba(180, 120, 20, .08);
}

/* 卡片网格（证书 / 其他素材） */
.style-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.note-card {
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); transition: all .18s;
  background: linear-gradient(180deg, var(--tint-bg) 0%, #fff 56px);
}
.note-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(30, 34, 53, .35); }
.note-card .entry-date { display: inline-block; margin-top: 6px; }
.note-icon { font-size: 16px; }

/* 空模块 */
.empty-sec {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px;
  border: 1.5px dashed var(--line-strong); background: #fafbfe;
}
.empty-sec-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--tint-bg); flex-shrink: 0; }
.empty-sec > div:nth-child(2) { flex: 1; min-width: 0; }
.empty-sec b { font-size: 14px; }
.empty-sec p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

/* 历史简历 */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.page-head .hint { margin: 0; }
.page-tools { display: flex; gap: 8px; }
.page-tools input { width: 220px !important; background: #fff !important; }
.page-tools select { width: auto !important; background-color: #fff !important; }
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.hist-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); transition: all .22s; display: flex; flex-direction: column;
}
.hist-card:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -20px rgba(30, 34, 53, .4); border-color: #d9dcf0; }
.hist-card.current { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 91, 240, .16), var(--shadow); }
.hist-thumb {
  position: relative; height: 236px; overflow: hidden; display: flex; justify-content: center; padding-top: 18px;
  background: #eef0f6 radial-gradient(rgba(120, 126, 160, .22) 1px, transparent 1px) 0 0 / 14px 14px;
  border-bottom: 1px solid var(--line);
}
.hist-paper { pointer-events: none; }
.hist-paper .paper { zoom: .28; margin: 0; box-shadow: 0 10px 30px rgba(30, 34, 53, .25); transition: transform .3s; }
.hist-card:hover .hist-paper .paper { transform: translateY(-12px); }
.hist-open {
  position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 8px); opacity: 0; transition: all .2s;
  background: rgba(24, 27, 44, .85); color: #fff; font-size: 12.5px; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.hist-card:hover .hist-open { opacity: 1; transform: translate(-50%, 0); }
.hist-current { position: absolute; top: 10px; left: 10px; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--grad); padding: 2px 9px; border-radius: 999px; }
.hist-info { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.hist-title-row { display: flex; align-items: center; gap: 8px; }
.hist-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-note { font-size: 12px; color: #b45309; background: #fef7e6; border-radius: 7px; padding: 2px 8px; align-self: flex-start; margin-top: 2px; }
.hist-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.hist-actions { display: flex; gap: 4px; }
.history-empty { grid-column: 1 / -1; text-align: center; padding: 60px 30px; color: var(--text-2); line-height: 1.9; }
.empty {
  color: var(--muted); text-align: center; padding: 22px; font-size: 13px;
  border: 1.5px dashed var(--line-strong); border-radius: 12px; background: #fafbfe;
}
#import-card { position: relative; }
.drop-mask {
  display: none; position: absolute; inset: 0; border-radius: var(--radius); border: 2px dashed var(--primary);
  background: rgba(238, 240, 255, .94); color: var(--primary); font-size: 16px; font-weight: 600;
  align-items: center; justify-content: center; pointer-events: none;
}
#import-card.dragging .drop-mask { display: flex; }
.attach-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.attach-list:empty { display: none; }
.attach {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafbff;
}
.attach.failed { border-color: #fecaca; background: #fff7f7; }
.attach-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.attach .ok { color: var(--success); }
.attach .err { color: var(--danger); }
.attach .icon-btn { margin-left: auto; font-size: 18px; width: 26px; height: 26px; }
.progress { height: 8px; background: #eef0f6; border-radius: 99px; overflow: hidden; margin: 6px 0; }
.progress > div { height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s; }

/* 资料完整度 */
.stats-top { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.ring {
  --p: 0; width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(#6d5ef5 calc(var(--p) * 1%), #eceef6 0);
}
.ring > div {
  width: 72px; height: 72px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  grid-auto-flow: column; align-items: baseline; justify-content: center; box-shadow: inset 0 0 0 1px var(--line);
}
.ring b { font-size: 24px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ring small { font-size: 12px; color: var(--muted); margin-left: 1px; }
.stats-title { font-weight: 650; font-size: 15px; }
.stats-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stats-counts span { font-size: 12px; color: var(--text-2); background: #f5f6fb; border-radius: 7px; padding: 2px 8px; }
.stats-counts b { margin-left: 4px; color: var(--primary); }
.checklist { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.checklist li { display: flex; align-items: center; gap: 7px; }
.checklist i {
  width: 17px; height: 17px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-style: normal; font-size: 11px; font-weight: 700; border: 1.5px solid #cfd3e2; color: #fff;
}
.checklist li.ok { color: var(--text); }
.checklist li.ok i { background: var(--success); border-color: var(--success); }
.import-preview .check { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.import-preview .check:hover { background: #f6f7fc; }
.import-preview .check input { width: auto; margin-top: 4px; }
.import-preview .merge-mode { width: auto; max-width: 100%; margin-left: 4px; padding: 2px 6px !important; font-size: 12px; }
.dup-list { margin-top: 14px; padding: 8px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fafbfe; }
.dup-list summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.dup-list .entry-body { opacity: .7; }
.import-photos { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 6px; }
.import-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.import-photo img { width: 96px; height: 128px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.import-photo:has(input:checked) img { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 91, 240, .2); }
.import-preview .entry-body {
  white-space: pre-wrap; margin-top: 4px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* 生成页 */
.gen-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.gen-side { position: sticky; top: calc(var(--topbar-h) + 18px); max-height: calc(100vh - var(--topbar-h) - 36px); overflow: auto; padding-right: 2px; }
#gen-btn { flex: 1; }
.status { color: var(--primary); font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; vertical-align: middle; }
.badge.good { background: #dcfce7; color: #15803d; }
.badge.mid { background: #fef3c7; color: #b45309; }
.badge.low { background: #fee2e2; color: #b91c1c; }
.md { font-size: 13px; color: var(--text-2); }
.md h2 { font-size: 13.5px; margin: 14px 0 6px; color: var(--primary); }
.md h2:first-child { margin-top: 0; }
.md ul { padding-left: 18px; margin: 4px 0; }
.md li { margin: 3px 0; }
.md table { border-collapse: collapse; width: 100%; margin: 6px 0; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 6px; text-align: left; }
.toolbar {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin: -4px -4px 14px; padding: 0 4px 14px; border-bottom: 1px solid var(--line);
}
.toolbar select { width: auto; padding: 4px 8px; font-size: 13px; }
#resume-editor {
  display: none; min-height: 600px; margin-bottom: 12px; font-size: 13px; line-height: 1.7;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, "Microsoft YaHei", monospace; background: #fbfbfe;
}
.paper-wrap {
  border-radius: 14px; padding: 26px; overflow: auto; border: 1px solid var(--line);
  background: #eef0f6 radial-gradient(rgba(120, 126, 160, .22) 1px, transparent 1px) 0 0 / 18px 18px;
}
.resume-card.loading .paper { opacity: .92; }
.paper-empty { text-align: center; color: var(--text-2); padding: 110px 30px; line-height: 1.9; }
.empty-illus {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center;
  font-size: 34px; background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(91, 91, 240, .12);
}
.spinner {
  width: 40px; height: 40px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid #e3e5fb; border-top-color: #6d5ef5; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
mark.todo { background: #fff3b0; color: #92400e; border-radius: 3px; padding: 0 2px; }

/* 补充数据 */
#supp-card { border-color: #f6e2b8; background: linear-gradient(180deg, #fffcf3 0%, #fff 140px); }
#supp-card .count { background: #fdf3dc; color: #b45309; }
#supp-card.busy #supp-list { opacity: .5; pointer-events: none; }
.supp-step { animation: fadeUp .25s ease both; }
.supp-ctx { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.supp-q { font-weight: 650; font-size: 15px; color: var(--text); line-height: 1.5; }
.supp-after { margin: 8px 0 12px; padding: 7px 10px; font-size: 12.5px; color: var(--text-2); background: #fef7e6; border-radius: 8px; line-height: 1.55; }
.supp-after span { margin-right: 6px; font-size: 11px; font-weight: 600; color: #b45309; }
.supp-after b { color: #b45309; background: #fde68a; border-radius: 3px; padding: 0 3px; }
.supp-opts { display: flex; flex-direction: column; gap: 7px; }
.supp-opt {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; padding: 9px 14px; text-align: left;
  font: inherit; font-size: 14px; color: var(--text); cursor: pointer; transition: all .15s;
}
.supp-opt:hover { border-color: var(--primary); color: var(--primary); background: #f7f7ff; transform: translateX(2px); }
.supp-opt.ghost { border-style: dashed; color: var(--text-2); font-size: 13px; }
.supp-custom { display: flex; gap: 6px; margin-top: 8px; }
.supp-custom input { flex: 1; min-width: 0; }
.supp-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12.5px; }
.supp-dots { display: flex; gap: 5px; }
.supp-dots i { width: 7px; height: 7px; border-radius: 50%; background: #e5e7ef; }
.supp-dots i.on { background: #fbbf24; }
.supp-dots i.cur { background: var(--primary); width: 16px; border-radius: 99px; }
.supp-now { display: block; margin: 10px auto 0; font-size: 12.5px; }
.supp-summary { font-size: 13px; line-height: 1.8; }
.supp-summary .btn { width: 100%; margin-top: 10px; }
.muted-link { color: var(--muted) !important; font-weight: 400; }
.supp-done { margin-top: 4px; font-size: 13px; color: #15803d; background: #effaf2; border-radius: 8px; padding: 6px 10px; }
.supp-all-done { text-align: center; padding: 10px; color: #15803d; font-size: 13px; }
.supp-skipped { font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 1px dashed var(--line); }
.supp-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.supp-foot .btn { width: 100%; }
.check-line { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check-line input { width: auto; }

/* 职业推荐 */
.private-tag {
  font-style: normal; font-weight: 500; font-size: 11.5px; color: #0f766e; background: #e3f6f4;
  border-radius: 6px; padding: 1px 7px; margin-left: 6px; white-space: nowrap;
}
#career-btn { flex: 1; }
.career-empty { text-align: center; padding: 70px 30px; color: var(--text-2); line-height: 1.9; }
.career-summary {
  background: linear-gradient(135deg, #f6f4ff 0%, #fdf4ff 100%); border-color: #e6e1fb;
}
.career-summary-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.career-summary-head h2 { margin: 0; }
.career-text { margin: 8px 0 12px; font-size: 14.5px; color: var(--text); line-height: 1.8; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.tag { font-size: 12.5px; padding: 3px 11px; border-radius: 999px; background: #fff; color: var(--primary); border: 1px solid #dcd8fb; font-weight: 500; }
.tag-row.small .tag { font-size: 12px; padding: 2px 9px; }
.tag.ghost { background: #f5f6fb; color: var(--text-2); border-color: var(--line); font-weight: 400; }
.mbti-note {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .75);
  border: 1px dashed #d8d2fa; font-size: 13px; color: var(--text-2);
}
.mbti-note b { color: #7c3aed; margin-right: 8px; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin-bottom: 20px; }
.rec-grid .card { margin: 0; }
.rec { display: flex; flex-direction: column; transition: all .2s; }
.rec:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -20px rgba(30, 34, 53, .35); }
.rec .row-actions { margin-top: auto; padding-top: 12px; }
.rec-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.rec-name { min-width: 0; }
.rec-title { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.35; }
.rec-meta { margin-top: 6px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.track { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.track-safe { background: #dcfce7; color: #15803d; }
.track-up { background: #e0e7ff; color: #4338ca; }
.track-new { background: #fdf3dc; color: #b45309; }
.rec-score {
  --p: 0; width: 62px; height: 62px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(#6d5ef5 calc(var(--p) * 1%), #eceef6 0);
}
.rec-score > div { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; line-height: 1.1; }
.rec-score b { font-size: 17px; color: var(--primary); }
.rec-score small { font-size: 10px; color: var(--muted); }
.rec-block { margin-top: 10px; }
.rec-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 3px; letter-spacing: .5px; }
.rec-block ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.rec-block li { margin: 2px 0; }
.rec-block p { margin: 0; font-size: 13px; color: var(--text-2); }
.rec-block.mbti { padding: 8px 12px; border-radius: 10px; background: #f6f3ff; }
.rec-block.mbti .rec-label { color: #7c3aed; }
.rec-block.gap .rec-label { color: #b45309; }
.avoid-list { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13.5px; }

/* 简历纸张 */
.paper {
  --accent: #222;
  margin: 0 auto; background: #fff; width: 210mm; max-width: 100%; min-height: 297mm;
  padding: 15mm 17mm; box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
  color: #222; font-size: 10.5pt; line-height: 1.55;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
.paper h1 { font-size: 22pt; margin: 0 0 4px; color: var(--accent); letter-spacing: 2px; }
.r-head { text-align: center; margin-bottom: 10px; }
.r-contact { color: #555; font-size: 9.5pt; }
.r-contact .sep { margin: 0 8px; color: #bbb; }
.paper h2 {
  font-size: 12.5pt; color: var(--accent); margin: 14px 0 6px; padding-bottom: 3px;
  border-bottom: 1.5px solid var(--accent); letter-spacing: 1px;
}
.paper h3 { font-size: 10.5pt; margin: 9px 0 3px; }
.paper h3.row { display: flex; justify-content: space-between; gap: 12px; }
.paper h3 .sub { font-weight: normal; color: #444; margin-left: 10px; }
.paper h3 .r { font-weight: normal; color: #666; white-space: nowrap; }
.paper p { margin: 3px 0; }
.paper ul, .paper ol { margin: 2px 0 6px; padding-left: 18px; }
.paper li { margin: 1.5px 0; }
.paper a { color: inherit; }
.paper .r-sec > :last-child { margin-bottom: 0; }

/* 版式：单栏标题条 */
.layout-modern .r-head { text-align: left; border-bottom: 3px solid var(--accent); padding-bottom: 8px; margin-bottom: 4px; }
.layout-modern h2 { border-bottom: 0; border-left: 4px solid var(--accent); padding: 1px 0 1px 8px; }
.layout-modern h3.row { border-bottom: 1px dashed #e2e2e2; padding-bottom: 2px; }

/* 版式：顶部色块 */
.layout-banner .r-head {
  background: var(--side); color: var(--side-fg); text-align: left;
  margin: -15mm -17mm 12px; padding: 12mm 17mm 6mm;
}
.layout-banner .r-head h1, .layout-banner .r-contact { color: var(--side-fg); }
.layout-banner .r-contact { opacity: .88; }
.layout-banner .r-contact .sep { color: inherit; opacity: .5; }
.layout-banner h2 {
  border-bottom: 0; border-left: 4px solid var(--accent); padding: 2px 0 2px 8px;
  background: color-mix(in srgb, var(--accent) 9%, white);
}

/* 版式：侧栏 */
.layout-sidebar, .layout-sidebar-right { display: flex; padding: 0; }
.layout-sidebar-right { flex-direction: row-reverse; }
.r-side {
  width: 32%; flex-shrink: 0; background: var(--side); color: var(--side-fg);
  padding: 14mm 6mm 10mm 8mm; font-size: 9.5pt; overflow-wrap: anywhere;
}
.r-side h1 { color: var(--side-fg); font-size: 20pt; }
.r-side h2 { color: var(--side-fg); border-bottom-color: currentColor; font-size: 11.5pt; }
.r-side h3.row { display: block; }
.r-side h3 .r, .r-side h3 .sub { display: block; margin: 0; color: inherit; opacity: .85; }
.r-contact-list { list-style: none; padding: 0 !important; margin: 8px 0 12px; opacity: .92; }
.r-side ul { padding-left: 16px; }
.r-main { flex: 1; min-width: 0; padding: 14mm 12mm 10mm 9mm; }
.r-main > .r-sec:first-child h2 { margin-top: 0; }

/* 版式：表格 */
.layout-table .r-head h1 { color: var(--accent); }
.r-table { width: 100%; border-collapse: collapse; }
.r-table th {
  width: 16%; border: 1px solid #c9ced6; padding: 6px; color: var(--accent); font-size: 11pt;
  background: color-mix(in srgb, var(--accent) 10%, white); vertical-align: middle;
}
.r-table td { border: 1px solid #c9ced6; padding: 6px 10px; vertical-align: top; }
.r-table td > :first-child { margin-top: 0; }
.r-table td > :last-child { margin-bottom: 0; }

/* 版式：紧凑 */
.layout-compact { font-size: 9.5pt; line-height: 1.45; padding: 12mm 14mm; }
.layout-compact .r-head { text-align: left; border-bottom: 2px solid var(--accent); padding-bottom: 6px; margin-bottom: 4px; }
.layout-compact .r-head-text { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.layout-compact .r-head h1 { margin: 0; font-size: 20pt; }
.layout-compact .r-contact { text-align: right; }
.layout-compact h2 { font-size: 11pt; margin: 10px 0 4px; border-bottom: 1px solid #ddd; }

/* 照片与正文图片 */
.r-photo { width: 25mm; height: 33mm; object-fit: cover; flex-shrink: 0; display: block; background: #f3f4f6; }
.r-photo.shape-rounded { border-radius: 3mm; }
.r-photo.shape-circle { width: 28mm; height: 28mm; border-radius: 50%; object-position: center 25%; }
.r-head.has-photo { display: flex; align-items: center; gap: 16px; text-align: left; }
.r-head-text { flex: 1; min-width: 0; }
.layout-classic .r-head.has-photo .r-head-text, .layout-table .r-head.has-photo .r-head-text { text-align: center; padding-left: calc(25mm + 16px); }
.layout-banner .r-photo { border: 2px solid rgba(255, 255, 255, .85); }
.r-side .r-photo { margin: 0 auto 6mm; border: 2px solid color-mix(in srgb, var(--side-fg) 60%, transparent); }
.paper .md-img { display: inline-block; vertical-align: top; max-width: 100%; margin: 3px 1% 3px 0; border-radius: 2px; }
.img-missing { color: #b91c1c; font-size: 9pt; }
.paper p:has(> .md-img) { margin: 6px 0; }

.basics-wrap { display: flex; gap: 24px; align-items: flex-start; }
.basics-wrap .form-grid { flex: 1; }
.photo-panel { width: 128px; flex-shrink: 0; text-align: center; }
.photo-main {
  width: 128px; height: 170px; border-radius: 14px; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: #f7f8fc;
  box-shadow: 0 10px 24px -14px rgba(30, 34, 53, .45), 0 0 0 1px var(--line); transition: all .2s;
}
.photo-main:hover { transform: translateY(-2px); }
.photo-main img { width: 100%; height: 100%; object-fit: cover; }
.photo-main.empty {
  box-shadow: none; border: 2px dashed var(--line-strong); color: var(--muted); font-size: 13px; line-height: 1.8;
  background: linear-gradient(180deg, #fafbff, #f3f4fb);
}
.photo-main.empty span::first-line { font-size: 26px; color: var(--primary); }
.photo-main.empty:hover { border-color: var(--primary); color: var(--primary); }
.photo-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; justify-content: center; }
.photo-thumbs img { width: 36px; height: 48px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; transition: all .15s; }
.photo-thumbs img:hover { transform: translateY(-1px); }
.photo-thumbs img.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(91, 91, 240, .2); }
.photo-actions { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.link-btn.danger { color: var(--danger); }
.err-text { color: var(--danger); font-size: 13px; margin: 6px 0 0; }
.cropper { display: flex; gap: 16px; align-items: flex-start; }
.cropper canvas { border-radius: 12px; cursor: grab; touch-action: none; box-shadow: 0 0 0 1px var(--line), 0 10px 24px -14px rgba(30, 34, 53, .4); }
.cropper canvas:active { cursor: grabbing; }
.crop-side { flex: 1; }
.popover-anchor { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 15; width: 270px; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: pop .16s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.popover .check { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.popover .check input { width: auto; }
.pop-label { font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.popover .chips { margin-bottom: 6px; }
.edit-only, .direct-only, .any-edit-only { display: none !important; }
.resume-card.direct-edit .direct-only, .resume-card.direct-edit .any-edit-only, .resume-card.editing .any-edit-only { display: inline-block !important; }
.resume-card.direct-edit p.direct-only { display: block !important; margin: -4px 0 10px; }

/* 直接在简历上修改 */
.direct-edit .paper [data-edit] { border-radius: 3px; outline: none; transition: background .15s, box-shadow .15s; cursor: text; }
.direct-edit .paper [data-edit]:hover { background: rgba(91, 91, 240, .07); box-shadow: 0 0 0 2px rgba(91, 91, 240, .12); }
.direct-edit .paper [data-edit]:focus { background: #fffbe6; box-shadow: 0 0 0 2px rgba(245, 158, 11, .55); }
.direct-edit .paper li > span[data-edit] { display: inline-block; min-width: 3em; min-height: 1.2em; vertical-align: top; }
.direct-edit .paper li > span[data-edit]:empty::before { content: '输入内容…'; color: #b0b4c4; }
.direct-edit .paper .just-moved { animation: moved .9s ease; }
@keyframes moved { from { background: rgba(250, 204, 21, .45); } to { background: transparent; } }
.item-tools {
  position: fixed; z-index: 40; display: flex; flex-direction: column; gap: 2px; padding: 3px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow);
}
.item-tools button { width: 26px; height: 24px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.item-tools button:hover:not(:disabled) { background: var(--primary-soft); color: var(--primary); }
.item-tools button[data-del]:hover { background: #fff1f1; color: var(--danger); }
.item-tools button:disabled { opacity: .3; cursor: default; }
.resume-card.editing .edit-only { display: inline-block !important; }
.resume-card.editing p.edit-only { display: block !important; margin: -4px 0 10px; }

/* 模板工具栏与抽屉 */
.toolbar-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.color-pick {
  display: inline-flex; width: 32px; height: 32px; border-radius: 9px; overflow: hidden; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-sm); transition: transform .15s;
}
.color-pick:hover { transform: translateY(-1px); }
.color-pick input { border: 0; padding: 0; width: 46px; height: 46px; margin: -7px; cursor: pointer; }
.drawer {
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: 440px; z-index: 20; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px); border-left: 1px solid var(--line); box-shadow: -18px 0 40px -20px rgba(30, 34, 53, .3);
  display: flex; flex-direction: column; animation: slideIn .22s ease both;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.drawer-body { padding: 14px 20px 30px; overflow: auto; }
.drawer-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.drawer-filter input { grid-column: 1 / -1; }
.drawer-filter select, .drawer-filter input { padding: 5px 8px; font-size: 13px; }
body.drawer-open main { padding-right: 464px; }
body.drawer-open .gen-layout { grid-template-columns: minmax(0, 1fr); }
body.drawer-open .gen-side { display: none; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.mini-item { cursor: pointer; border-radius: 12px; padding: 7px; border: 2px solid transparent; font-size: 12px; transition: all .15s; }
.mini-item:hover { background: #f5f6ff; transform: translateY(-2px); }
.mini-item.active { border-color: var(--primary); background: #eef0ff; }
.mini {
  height: 262px; overflow: hidden; border-radius: 8px; background: #fff; pointer-events: none;
  box-shadow: 0 0 0 1px var(--line), 0 8px 18px -12px rgba(30, 34, 53, .35);
}
.mini .paper { zoom: .225; box-shadow: none; margin: 0; }
.mini.lib img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mini-name { margin-top: 4px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }

/* 编辑模式：左编辑、右实时预览 */
.resume-card.editing .resume-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.resume-card.editing #resume-editor { display: block; margin: 0; resize: none; overflow: auto; }
/* 左右两栏同高、各自滚动，方便对照 */
.resume-card.editing #resume-editor, .resume-card.editing .paper-wrap { height: calc(100vh - 230px); min-height: 460px; }
.resume-card.editing .paper-wrap { padding: 12px; }
.resume-card.editing .paper { zoom: .56; cursor: pointer; }
.resume-card.editing .edit-outline { display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 8px; }
.edit-outline .chip { padding: 3px 11px; font-size: 12.5px; }
.paper .src-hl { background: rgba(250, 204, 21, .3); box-shadow: 0 0 0 3px rgba(250, 204, 21, .3); border-radius: 3px; }

/* 模板库 */
.tpl-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.tpl-filter .chips { margin: 0; }
.tpl-filter input { max-width: 280px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-bottom: 16px; }
.tpl {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column;
  transition: all .2s; box-shadow: var(--shadow-sm);
}
.tpl:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px rgba(30, 34, 53, .4); border-color: #dadcf0; }
.tpl img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; cursor: zoom-in; background: #f3f4f6; transition: transform .35s; }
.tpl:hover img { transform: scale(1.03); }
.tpl > img { border-bottom: 1px solid var(--line); }
.tpl-title { padding: 10px 12px 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; background: #fff; }
.tpl-actions { padding: 6px 12px 12px; display: flex; gap: 8px; align-items: center; font-size: 12.5px; background: #fff; position: relative; }
.tpl-actions > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-actions a { font-size: 12px; font-weight: 500; }
.tpl-actions .btn.small { padding: 4px 11px; }
.tpl.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 91, 240, .2); }
.tpl-big { display: block; max-width: 100%; margin: 0 auto; }

/* 弹窗与提示 */
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(22, 25, 42, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: 20px; width: 520px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: rise .22s cubic-bezier(.2, .9, .3, 1.1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal.wide .modal-box { width: 880px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 650; }
.modal-body { padding: 18px 24px; overflow: auto; }
.modal-foot { padding: 14px 24px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fafbfe; border-radius: 0 0 20px 20px; }
.modal-foot:empty { display: none; }
#toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: rgba(24, 27, 44, .92); color: #fff; padding: 11px 20px; border-radius: 999px; z-index: 100; max-width: 80vw;
  font-size: 13.5px; transition: all .25s cubic-bezier(.2, .9, .3, 1.1); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .35);
  backdrop-filter: blur(8px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: rgba(196, 43, 48, .95); }
#toast.warn { background: rgba(180, 96, 9, .95); }
#toast.success { background: rgba(21, 128, 61, .95); }

/* 公共电脑模式 */
.public-badge {
  margin-left: 6px; border: 1px solid #fcd34d; background: #fffbeb; color: #b45309; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; transition: all .15s;
}
.public-badge:hover { background: #fef3c7; border-color: #f59e0b; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; margin: 4px 0 8px; }
.check-line input { margin-top: 3px; flex-shrink: 0; }

/* 管理后台（admin.html） */
.admin-login { max-width: 420px; margin: 60px auto; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 2px;
}
.stat span { font-size: 12.5px; color: var(--muted); }
.stat b { font-size: 22px; font-weight: 700; color: var(--text); }
.stat.good b { color: var(--success); }
.stat.low b { color: var(--danger); }
.pricing-form .field { max-width: 220px; }
.cost-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.cost-grid h4 { margin-top: 4px; }
.admin-table tr.sum td { font-weight: 600; background: #fafbfe; }
@media (max-width: 1100px) { .cost-grid { grid-template-columns: 1fr; } }
.admin-top { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; }
.admin-top > .card { margin-bottom: 20px; }
.admin-top.settings-row { grid-template-columns: 1fr 1fr; }
.ai-ok { color: var(--success); }
.ai-bad { color: var(--danger); }
.gen-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.gen-form .field { margin-bottom: 0; flex: 1; min-width: 110px; }
.gen-form .btn { height: 38px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; font-weight: 600; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfe; }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tbody tr:hover { background: #fafaff; }
.plans-table td { padding: 5px 6px; vertical-align: middle; }
.plans-table input { padding: 5px 8px !important; font-size: 13px; min-width: 70px; }
.users-table .ops { white-space: nowrap; }
.users-table .ops .btn { padding: 3px 9px; font-size: 12px; }
.users-table .note-cell { max-width: 200px; word-break: break-all; }
.admin-toolbar input[type=search] { width: 200px; padding: 5px 10px; font-size: 13px; }
.lookup-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.lookup-form input { width: 250px; padding: 5px 10px; font-size: 13px; }
.focus-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--primary-soft); font-size: 13px; }
.badge.off { background: #eef0f4; color: #64748b; }
.admin-table .sel-col { width: 34px; padding-right: 0; }
.admin-table .sel-col input { width: 15px; height: 15px; cursor: pointer; }
.users-table tbody tr.selected { background: #f3f3ff; }
.batch-bar { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 5; box-shadow: var(--shadow-sm); }
.batch-bar > span { margin-right: 6px; }
.codes-box { width: 100%; font-family: Consolas, "SFMono-Regular", monospace; font-size: 14px; letter-spacing: .5px; }
@media (max-width: 1000px) { .admin-top, .admin-top.settings-row { grid-template-columns: 1fr; } }

#print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm 0; }
  body { background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  #print-root .paper { box-shadow: none; width: auto; min-height: 0; padding: 3mm 17mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-root .paper.layout-sidebar, #print-root .paper.layout-sidebar-right { padding: 0; }
  #print-root .layout-sidebar .r-side, #print-root .layout-sidebar-right .r-side { padding-top: 6mm; }
  #print-root .layout-sidebar .r-main, #print-root .layout-sidebar-right .r-main { padding-top: 6mm; }
  #print-root .layout-banner .r-head { margin-top: -3mm; padding-top: 6mm; }
  #print-root .layout-compact { padding: 3mm 14mm; }
  .paper h2, .paper h3 { break-after: avoid; }
  .paper li { break-inside: avoid; }
}

@media (max-width: 1180px) {
  .nav button { padding: 7px 10px; }
  .nav button svg { display: none; }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .grid-2, .gen-layout, .profile-layout { grid-template-columns: 1fr; }
  .profile-nav { position: static; }
  .pn-links { flex-direction: row; flex-wrap: wrap; }
  .entry-actions { opacity: 1; }
  .gen-side { position: static; max-height: none; }
  .paper { padding: 8mm; min-height: 0; }
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 16px; }
  main { padding: 16px 16px 60px; }
  .hero-steps { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}
