/* ============================================================
 * styles.css — UI + A4 预览 + 打印样式
 * ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f1f5f9;
  color: #1f2937;
  font-size: 14px;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------- 顶部栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
.brand { font-size: 18px; font-weight: 700; color: #0f172a; }
.brand span { font-size: 12px; color: #94a3b8; font-weight: 400; margin-left: 6px; }
.topbar-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sep { width: 1px; height: 22px; background: #e5e7eb; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid #d1d5db; background: #fff; color: #1f2937;
  padding: 6px 14px; border-radius: 8px; font-size: 13px; transition: all .15s;
}
.btn:hover { border-color: #94a3b8; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { border: none; background: transparent; color: #475569; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-mini { border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; padding: 3px 10px; border-radius: 6px; font-size: 12px; }
.btn-mini:hover { border-color: #94a3b8; }
.btn-remove { border: none; background: transparent; color: #cbd5e1; font-size: 18px; line-height: 1; padding: 0 6px; float: right; }
.btn-remove:hover { color: #ef4444; }

/* ---------- 主体三栏 ---------- */
.main { display: grid; grid-template-columns: 240px 360px 1fr; height: calc(100vh - 55px); }
.col { overflow-y: auto; padding: 14px; }
.col-templates { background: #fff; border-right: 1px solid #e5e7eb; }
.col-form { background: #f8fafc; border-right: 1px solid #e5e7eb; }
.col-preview { background: #e2e8f0; display: flex; flex-direction: column; }
.col-title { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: #334155; }

/* ---------- 模板画廊 ---------- */
.gallery { display: flex; flex-direction: column; gap: 10px; }
.tpl-card { text-align: left; border: 2px solid #e5e7eb; border-radius: 10px; padding: 8px; background: #fff; transition: all .15s; }
.tpl-card:hover { border-color: #cbd5e1; }
.tpl-card.active { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .15); }
.tpl-thumb { height: 76px; border-radius: 6px; overflow: hidden; }
.tpl-name { font-size: 13px; font-weight: 600; margin-top: 6px; color: #1f2937; }
.tpl-desc { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* ---------- 表单 ---------- */
.section { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.section-head h3 { margin: 0; font-size: 15px; color: #0f172a; }
.section-tips { margin: 8px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.tip { border-left: 3px solid; background: #f8fafc; padding: 6px 10px; border-radius: 0 6px 6px 0; font-size: 12px; color: #475569; line-height: 1.5; }
.field { display: block; margin-bottom: 10px; }
.field-label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; }
.input {
  width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 7px 10px;
  font-size: 13px; color: #1f2937; background: #fff; transition: border .15s;
}
.input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.area { resize: vertical; min-height: 60px; line-height: 1.6; }
.field-hint { display: block; font-size: 11px; margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.item-card { position: relative; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fbfcfe; }
.hl-label { font-size: 12px; color: #64748b; margin: 6px 0 4px; }
.hl-row { display: flex; gap: 6px; margin-bottom: 6px; }
.hl-row .input { flex: 1; }

/* ---------- 自我评价模板库 ---------- */
.summary-picker { margin-top: 4px; }
.summary-list { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.summary-item { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; background: #f8fafc; }
.summary-tags { margin-bottom: 4px; }
.tag { display: inline-block; background: #e0e7ff; color: #4338ca; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-right: 4px; }
.summary-text { font-size: 12px; color: #475569; line-height: 1.6; margin-bottom: 6px; }

/* ---------- 评分面板 ---------- */
.score-panel { margin-top: 20px; border-top: 1px solid #e5e7eb; padding-top: 14px; }
.score-top { display: flex; align-items: center; gap: 12px; }
.score-grade { font-size: 16px; font-weight: 700; }
.score-advice { font-size: 12px; color: #64748b; line-height: 1.5; margin-top: 2px; }
.score-detail { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.score-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #475569; }
.score-row span { width: 60px; flex: none; }
.score-row b { width: 22px; text-align: right; flex: none; }
.bar { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.bar div { height: 100%; border-radius: 3px; }
.suggestions { margin-top: 12px; background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 10px; }
.suggest-title { font-size: 12px; font-weight: 700; color: #a16207; margin-bottom: 4px; }
.suggest-item { font-size: 12px; color: #713f12; line-height: 1.6; }

/* ---------- 评分圆环 ---------- */
.ring { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.ring-inner { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring-inner b { font-size: 18px; color: #0f172a; }
.ring-inner span { font-size: 10px; color: #94a3b8; margin-top: 2px; }

/* ---------- 预览区 ---------- */
.preview-toolbar {
  display: flex; align-items: center; gap: 14px; padding: 8px 14px;
  background: #fff; border-bottom: 1px solid #e5e7eb; flex: none;
  font-size: 13px; color: #475569;
}
.zoom { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.zoom input { width: 120px; }
.tip-count { margin-left: auto; color: #b45309; font-size: 12px; }
.preview-scroll { flex: 1; overflow: auto; padding: 24px; }
.preview-zoom { transform-origin: top left; margin: 0 auto; width: max-content; }
.preview-scroll .rs-page, .preview-scroll div[style*="width:210mm"] { box-shadow: 0 2px 12px rgba(0,0,0,.15); }

/* ---------- 提示 Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

/* ---------- 选择器 ---------- */
.select { border: 1px solid #d1d5db; border-radius: 8px; padding: 6px 8px; font-size: 13px; background: #fff; max-width: 260px; }

/* ---------- 打印：只打印简历页 ---------- */
@media print {
  body { background: #fff !important; }
  .no-print { display: none !important; }
  .main { display: block !important; height: auto !important; }
  .col-preview { display: block !important; overflow: visible !important; background: #fff !important; }
  .preview-scroll { padding: 0 !important; overflow: visible !important; }
  .preview-zoom { zoom: 1 !important; transform: none !important; margin: 0 !important; width: auto !important; }
  .preview-scroll div[style*="width:210mm"] { box-shadow: none !important; }
  .toast { display: none !important; }
}

/* ---------- AI 润色 / 设置 ---------- */
.field-label { display: flex; align-items: center; justify-content: space-between; }
.ai-btn { margin-left: 8px; color: #7c3aed; border-color: #ddd6fe; background: #f5f3ff; }
.ai-btn:hover { border-color: #a78bfa; }
.ai-btn:disabled { opacity: .5; cursor: not-allowed; }

.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: #fff; border-radius: 14px; padding: 22px; width: 440px; max-width: 92vw; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal h3 { margin: 0 0 8px; font-size: 16px; }
.modal-desc { font-size: 12px; color: #64748b; line-height: 1.6; margin: 0 0 14px; }
.modal .field { margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ---------- 照片上传 ---------- */
.avatar-picker { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #f8fafc; }
.avatar-preview { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #e2e8f0; flex: none; display: flex; align-items: center; justify-content: center; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-empty { font-size: 11px; color: #94a3b8; text-align: center; line-height: 1.3; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.avatar-hint { font-size: 11px; color: #94a3b8; width: 100%; }

/* ---------- 区块说明 ---------- */
.section-desc { font-size: 11.5px; color: #94a3b8; line-height: 1.5; margin: 2px 0 8px; }

/* ---------- 引导条 ---------- */
.guide-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; background: #eff6ff; border-bottom: 1px solid #dbeafe; font-size: 12.5px; color: #1e40af; }
.guide-steps { line-height: 1.5; }

/* ---------- 手机端 Tab（默认隐藏，小屏显示） ---------- */
.mobile-tabs { display: none; }

/* ---------- 手机端适配（仅屏幕，不影响打印） ---------- */
@media screen and (max-width: 900px) {
  .topbar { position: static; padding: 8px 10px; }
  .brand { font-size: 16px; }
  .topbar-controls { width: 100%; gap: 6px; }
  .topbar-controls .btn, .topbar-controls .btn-ghost { font-size: 12px; padding: 5px 9px; }
  .topbar-controls .select { max-width: 100%; flex: 1 1 180px; }

  .main { display: block; height: auto; }
  .col { padding: 12px; }
  .col-templates, .col-form { border-right: none; }
  .col-form, .col-preview { border-top: 1px solid #e5e7eb; }
  .col:not(.mobile-active) { display: none; }
  .col-preview.mobile-active { display: flex; min-height: calc(100vh - 120px); }

  .mobile-tabs {
    display: flex; position: sticky; top: 0; z-index: 15; background: #fff;
    border-bottom: 1px solid #e5e7eb;
  }
  .mobile-tabs .mtab { flex: 1; border: none; background: transparent; padding: 10px 4px; font-size: 13px; color: #64748b; border-bottom: 2px solid transparent; }
  .mobile-tabs .mtab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }

  .grid2 { grid-template-columns: 1fr; }
  .preview-scroll { padding: 10px; }
  .preview-zoom { zoom: 0.42 !important; }
  .preview-toolbar .zoom { display: none; }
  .guide-banner { font-size: 12px; padding: 8px 10px; }
}

@media screen and (max-width: 480px) {
  .preview-zoom { zoom: 0.36 !important; }
  .avatar-picker { flex-direction: column; align-items: flex-start; }
}

/* ---------- 进场引导页 ---------- */
.landing {
  position: fixed; inset: 0; z-index: 200; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
  color: #f8fafc;
  background:
    radial-gradient(900px 500px at 15% 0%, #1e3a8a 0%, rgba(11,17,32,0) 60%),
    radial-gradient(700px 500px at 85% 100%, #4c1d95 0%, rgba(11,17,32,0) 60%),
    #070b14;
}
.landing-inner { max-width: 860px; width: 100%; text-align: center; }
.landing-badge {
  display: inline-block; font-size: 12px; letter-spacing: 2px; color: #93c5fd;
  border: 1px solid rgba(147,197,253,.35); border-radius: 999px; padding: 5px 14px; margin-bottom: 22px;
  animation: landingUp .7s .05s both;
}
.landing-title { font-size: clamp(30px, 5vw, 54px); line-height: 1.22; margin: 0 0 16px; font-weight: 800; letter-spacing: 1px; animation: landingUp .7s .15s both; }
.landing-title em { font-style: normal; color: #60a5fa; }
.landing-sub { font-size: clamp(13px, 1.6vw, 16px); color: #94a3b8; margin: 0 0 34px; animation: landingUp .7s .25s both; }
.landing-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 34px; }
.feature-card {
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); border-radius: 14px;
  padding: 16px 12px; text-align: left; transition: transform .25s, border-color .25s;
  animation: landingUp .7s both; animation-delay: .35s;
}
.feature-card:nth-child(2) { animation-delay: .45s; }
.feature-card:nth-child(3) { animation-delay: .55s; }
.feature-card:nth-child(4) { animation-delay: .65s; }
.feature-card:hover { transform: translateY(-4px); border-color: rgba(96,165,250,.6); }
.feature-icon { font-size: 22px; display: block; margin-bottom: 8px; }
.feature-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: #e2e8f0; }
.feature-desc { font-size: 12px; line-height: 1.6; color: #94a3b8; }
.landing-cta {
  font-size: 16px; font-weight: 700; color: #0b1120; border: none; border-radius: 999px;
  padding: 15px 36px; cursor: pointer; background: linear-gradient(135deg, #93c5fd, #60a5fa);
  box-shadow: 0 10px 30px rgba(59,130,246,.4); transition: transform .2s, box-shadow .2s;
  animation: landingUp .7s .75s both;
}
.landing-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(59,130,246,.55); }
.landing-cta span { margin-left: 6px; }
.landing-note { margin: 16px 0 0; font-size: 12px; color: #64748b; animation: landingUp .7s .85s both; }
@keyframes landingUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

@media screen and (max-width: 900px) {
  .landing { padding: 28px 14px; }
  .landing-features { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 480px) {
  .landing-features { gap: 8px; }
  .feature-card { padding: 12px 10px; }
  .landing-cta { width: 100%; padding: 14px 20px; }
}

/* ---------- 粘贴识别 ---------- */
.paste-area {
  width: 100%; height: 200px; box-sizing: border-box; resize: vertical;
  border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.65; font-family: inherit; color: #1f2937; outline: none;
}
.paste-area:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.paste-err { margin-top: 8px; font-size: 12.5px; color: #b91c1c; }
.paste-result { margin-top: 10px; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.paste-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; font-size: 12.5px; color: #94a3b8; border-bottom: 1px solid #f1f5f9; }
.paste-row:last-child { border-bottom: none; }
.paste-row.ok { color: #15803d; background: #f0fdf4; }
.paste-key { color: #64748b; flex: none; }
.paste-row.ok .paste-key { color: #166534; }
.paste-val { text-align: right; word-break: break-all; }

/* ---------- 撤销 / 重做 ---------- */
.icon-btn { font-size: 15px; line-height: 1; padding: 6px 9px; }
.btn-ghost:disabled { opacity: .35; cursor: not-allowed; background: transparent; }

/* ---------- 页数提示 ---------- */
.page-badge { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.page-badge.ok { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.page-badge.warn { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.page-badge.bad { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.page-hint { margin: 0; padding: 8px 14px; font-size: 12px; color: #b45309; background: #fffbeb; border-bottom: 1px solid #fde68a; }

/* ---------- 投递分析 ---------- */
.jd-result { margin-top: 12px; }
.jd-score { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.jd-num { font-size: 40px; font-weight: 800; line-height: 1; }
.jd-num small { font-size: 16px; margin-left: 2px; }
.jd-meta { flex: 1; }
.jd-line { font-size: 12.5px; color: #475569; line-height: 1.7; }
.jd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.chip.ok { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.chip.miss { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.jd-tips { margin-top: 10px; padding: 10px 12px; background: #f8fafc; border-radius: 10px; }
.jd-tip { font-size: 12.5px; color: #475569; line-height: 1.75; }

/* ---------- 历史版本 ---------- */
.hist-list { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f1f5f9; }
.hist-row:last-child { border-bottom: none; }
.hist-name { font-size: 13.5px; color: #1f2937; font-weight: 600; }
.hist-time { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.hist-empty { font-size: 13px; color: #94a3b8; padding: 18px; text-align: center; border: 1px dashed #e2e8f0; border-radius: 10px; }

/* ---------- 自定义模板（模板工作室） ---------- */
.tpl-new {
  width: 100%; margin-bottom: 10px; padding: 9px 12px;
  border: 1px dashed #93c5fd; border-radius: 10px; background: #eff6ff;
  color: #1d4ed8; font-size: 13px; font-weight: 600;
}
.tpl-new:hover { background: #dbeafe; border-color: #60a5fa; }
.tpl-card { cursor: pointer; position: relative; }
.tpl-meta { padding: 0 8px 8px; }
.tpl-tag {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  font-size: 10px; font-weight: 600; color: #7c3aed; background: #f5f3ff; border: 1px solid #ddd6fe;
  vertical-align: 1px;
}
.tpl-acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.tpl-card:hover .tpl-acts { opacity: 1; }
.tpl-act {
  width: 22px; height: 22px; padding: 0; line-height: 1; font-size: 12px;
  border: 1px solid #e5e7eb; border-radius: 6px; background: rgba(255,255,255,.95); color: #475569;
}
.tpl-act:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }

.modal-wide { width: 860px; max-width: 96vw; }
.studio { display: flex; gap: 18px; align-items: flex-start; }
.studio-form { flex: 1; min-width: 0; }
.studio-side { width: 240px; flex: none; }
.studio-side-title { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.studio-preview {
  height: 320px; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 10px;
  background: #f8fafc; padding: 8px; text-align: center;
}
.studio-preview > div { transform-origin: top center; }
.studio-tools { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.studio-tools .btn-ghost { font-size: 12px; padding: 5px 8px; }
.studio-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.studio-half { flex: 1; min-width: 120px; }
.studio-color { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; }
.studio-color input[type="color"] {
  width: 56px; height: 30px; padding: 2px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer;
}
.order-list { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.order-row { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1px solid #f1f5f9; }
.order-row:last-child { border-bottom: none; }
.order-row.off { background: #f8fafc; }
.order-row.off .order-name { color: #94a3b8; text-decoration: line-through; }
.order-name { flex: 1; font-size: 13px; color: #1f2937; }
.order-btn {
  padding: 2px 8px; font-size: 12px; border: 1px solid #e5e7eb; border-radius: 6px;
  background: #fff; color: #475569;
}
.order-btn:disabled { opacity: .35; cursor: default; }
.order-btn.toggle { min-width: 58px; }
.order-btn.toggle.off { color: #b45309; border-color: #fde68a; background: #fffbeb; }

@media screen and (max-width: 760px) {
  .studio { flex-direction: column; }
  .studio-side { width: 100%; }
  .studio-preview { height: 240px; }
}
@media (hover: none) {
  .tpl-acts { opacity: 1; }
}

/* ===== 首次使用引导 / 安装说明 / 离线提示（PWA） ===== */
.modal-mask { z-index: 400; }

.onboard { width: 560px; max-width: 94vw; }
.onboard-head { display: flex; gap: 14px; align-items: flex-start; }
.onboard-icon { font-size: 28px; line-height: 1; background: #eff6ff; border-radius: 12px; padding: 10px; }
.onboard-body { flex: 1; min-width: 0; }
.onboard-title { margin: 0 0 8px; font-size: 17px; color: #0f172a; }
.onboard-desc { margin: 0; font-size: 13.5px; line-height: 1.75; color: #475569; }
.onboard-dots { display: flex; gap: 8px; justify-content: center; margin: 20px 0 4px; }
.onboard-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; cursor: pointer; transition: all .2s; }
.onboard-dots .dot.on { width: 22px; border-radius: 4px; background: #2563eb; }
.grow { flex: 1; }

.install-panel { width: 560px; max-width: 94vw; }
.install-lead { font-size: 13px; color: #475569; margin: 14px 0 8px; }
.install-steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.95; color: #334155; }
.install-note { font-size: 13px; border-radius: 8px; padding: 8px 10px; margin: 0 0 6px; }
.install-note.ok { background: #ecfdf5; color: #047857; }
.install-now { width: 100%; margin-top: 14px; padding: 10px; }
.install-facts { margin: 16px 0 0; display: grid; gap: 8px; }
.install-facts .fact { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 9px; padding: 9px 11px; font-size: 12.5px; color: #475569; display: flex; gap: 8px; align-items: baseline; }
.install-facts .fact b { color: #0f172a; white-space: nowrap; }
.install-warn { margin: 12px 0 0; font-size: 12.5px; line-height: 1.7; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 9px; padding: 9px 11px; }
.offline-badge { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; white-space: nowrap; }
.modal-desc-quiet { font-size: 12.5px; color: #64748b; background: #f8fafc; border-radius: 8px; padding: 8px 10px; }

@media screen and (max-width: 560px) {
  .onboard, .install-panel { width: 94vw; }
  .onboard-head { gap: 10px; }
  .onboard-icon { font-size: 24px; padding: 8px; }
  .install-facts .fact { flex-direction: column; gap: 3px; }
}

/* 小屏工具栏：一排横向滚动，不换行堆高 */
@media screen and (max-width: 900px) {
  .topbar { flex-wrap: nowrap; overflow-x: auto; }
  .topbar .brand span { display: none; }
  .topbar-controls { flex-wrap: nowrap; }
}
.modal-title { margin: 0 0 12px; font-size: 16px; color: #0f172a; }

/* ===== 分页线（预览里标出 A4 页与页的界线） ===== */
.preview-paper { position: relative; }
.pbreaks { position: absolute; inset: 0; pointer-events: none; }
.pbreak {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 2px dashed rgba(239, 68, 68, .75);
}
.pbreak span {
  position: absolute; right: 6px; top: -11px; font-size: 10px; line-height: 1;
  padding: 3px 7px; border-radius: 999px; background: #ef4444; color: #fff; white-space: nowrap;
}
.guide-toggle.on { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* ===== 投递记录 ===== */
.modal-wider { width: 720px; max-width: 94vw; }
.tracker { max-height: 88vh; display: flex; flex-direction: column; }
.tk-count { font-size: 12px; font-weight: 400; color: #64748b; margin-left: 6px; }
.tk-stats { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.tk-stat { font-size: 12.5px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 4px 11px; }
.tk-stat b { color: #0f172a; font-size: 14px; margin-right: 3px; }
.tk-stat.ok { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.tk-stat.ok b { color: #047857; }
.tk-stat.mute { color: #94a3b8; }
.tk-form { display: grid; grid-template-columns: 1fr 1fr 130px 100px; gap: 7px; align-items: center; }
.tk-form .input { font-size: 12.5px; padding: 7px 9px; }
.tk-form .btn { grid-column: span 4; }
.tk-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 8px; }
.tk-chip { font-size: 12px; padding: 4px 11px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #475569; cursor: pointer; }
.tk-chip.on { background: #1e3a8a; border-color: #1e3a8a; color: #fff; }
.tk-chip.static { cursor: default; margin-left: 2px; }
.tk-list { overflow: auto; flex: 1; min-height: 80px; border-top: 1px solid #f1f5f9; }
.tk-empty { font-size: 13px; color: #94a3b8; text-align: center; padding: 26px 10px; margin: 0; }
.tk-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f1f5f9; }
.tk-main { flex: 1; min-width: 0; }
.tk-line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: #0f172a; }
.tk-role { color: #475569; font-size: 12.5px; }
.tk-line2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: #94a3b8; }
.tk-line2 a { color: #2563eb; text-decoration: none; }
.tk-line2 a:hover { text-decoration: underline; }
.tk-note-txt { color: #64748b; }
.tk-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.tk-sel { font-size: 12px; padding: 4px 6px; border-radius: 7px; border: 1px solid #e2e8f0; background: #fff; color: #334155; }
.tk-del { width: 24px; height: 24px; border-radius: 7px; border: 1px solid #e2e8f0; background: #fff; color: #94a3b8; cursor: pointer; line-height: 1; }
.tk-del:hover { color: #dc2626; border-color: #fecaca; background: #fef2f2; }

@media screen and (max-width: 700px) {
  .tk-form { grid-template-columns: 1fr 1fr; }
  .tk-form .btn { grid-column: span 2; }
  .tk-row { align-items: flex-start; }
}

/* ===== 简历语言切换 ===== */
.lang-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.lang-label { font-size: 12.5px; color: #475569; }
.lang-opts { display: flex; border: 1px solid #e2e8f0; border-radius: 9px; overflow: hidden; }
.lang-opt {
  font-size: 12.5px; padding: 6px 12px; border: none; border-right: 1px solid #e2e8f0;
  background: #fff; color: #475569; cursor: pointer;
}
.lang-opt:last-child { border-right: none; }
.lang-opt.on { background: #1e3a8a; color: #fff; }
.lang-hint { margin: 0 0 10px; font-size: 12px; color: #94a3b8; line-height: 1.6; }
.lang-row-ai { margin: -2px 0 4px; }
.lang-badge {
  font-size: 11.5px; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0;
  padding: 3px 9px; border-radius: 999px;
}

/* ===== 模板市场（精选模板包） ===== */
.tpl-market { border-color: #ddd6fe; color: #6d28d9; }
.tpl-market:hover { background: #f5f3ff; border-color: #c4b5fd; }
.pack-list { display: flex; flex-direction: column; gap: 14px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.pack-card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; background: #fbfdff; }
.pack-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pack-name { font-size: 14px; font-weight: 700; color: #0f172a; }
.pack-desc { margin-top: 3px; font-size: 12px; color: #64748b; line-height: 1.5; }
.pack-tags { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.pack-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #4338ca; }
.pack-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pack-done { font-size: 11.5px; color: #059669; background: #ecfdf5; padding: 3px 8px; border-radius: 999px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.pack-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.pack-thumb { flex: 0 0 auto; text-align: center; }
.pack-thumb-inner {
  width: 794px; height: 1125px; zoom: 0.16; overflow: hidden; border-radius: 6px;
  border: 1px solid #e2e8f0; background: #fff; pointer-events: none;
}
.pack-thumb-name { margin-top: 4px; font-size: 11px; color: #64748b; }
@media screen and (max-width: 760px) {
  .pack-head { flex-direction: column; }
  .pack-acts { width: 100%; }
}

/* ---------- 模板搜索 / 空状态 ---------- */
.tpl-search {
  width: 100%; box-sizing: border-box; margin-bottom: 8px;
  padding: 8px 10px; font-size: 12.5px; color: #1f2937;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc;
}
.tpl-search:focus { outline: none; border-color: #6366f1; background: #fff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.tpl-empty { padding: 18px 4px; font-size: 12.5px; color: #94a3b8; text-align: center; }

/* ---------- 投递分析：一键补词 ---------- */
.jd-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e2e8f0; }
.jd-actions-hint { font-size: 11.5px; color: #94a3b8; }

/* ---------- 模板范围筛选 ---------- */
.tpl-scope { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }

/* ---------- 投递跟进 ---------- */
.tk-sort { display: inline-flex; gap: 6px; margin-left: auto; }
.tk-stat.warn b { color: #b45309; }
.tk-fu { font-size: 11px; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.tk-fu.soon { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.tk-fu.late { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }

/* ---------- 提示点击定位 ---------- */
.section.sec-flash { animation: secFlash 1.4s ease; }
@keyframes secFlash {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, .55); }
  30% { box-shadow: 0 0 0 4px rgba(99, 102, 241, .35); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.section-tips .tip { transition: background .15s ease; }
.section-tips .tip:hover { background: #f8fafc; }

/* ---------- 历史版本对比摘要 ---------- */
.hist-diff { margin-top: 3px; font-size: 11.5px; color: #b45309; }
.hist-diff.same { color: #94a3b8; }

/* ---------- 备份提醒条 ---------- */
.backup-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 8px 14px 0; padding: 9px 12px; font-size: 12.5px; color: #92400e;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
}
.backup-banner .btn-mini { flex-shrink: 0; background: #f59e0b; color: #fff; border-color: #d97706; }
.backup-banner .btn-mini:hover { background: #d97706; }

/* ---------- 预览区新手引导 ---------- */
.preview-empty { position: absolute; inset: 44px 12px 12px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.col-preview { position: relative; }
.pe-card {
  pointer-events: auto; max-width: 300px; padding: 18px 18px 16px; text-align: center;
  background: rgba(255, 255, 255, .96); border: 1px dashed #c7d2fe; border-radius: 14px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, .12);
}
.pe-title { font-size: 14px; font-weight: 700; color: #312e81; margin-bottom: 6px; }
.pe-desc { margin: 0 0 12px; font-size: 12.5px; line-height: 1.7; color: #475569; }
.pe-hint { margin-top: 10px; font-size: 11.5px; color: #94a3b8; }

/* ---------- 投递记录搜索 ---------- */
.tk-search {
  flex: 1 1 160px; min-width: 120px; padding: 5px 9px; font-size: 12.5px;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; color: #1f2937;
}
.tk-search:focus { outline: none; border-color: #6366f1; background: #fff; }

/* ---------- 超页精简建议 ---------- */
.page-hint-sub { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-hint-item {
  display: inline-block; padding: 2px 8px; font-size: 11.5px; color: #92400e;
  background: #fef3c7; border: 1px solid #fde68a; border-radius: 999px;
}

/* ---------- 亮点动词提示 ---------- */
.hl-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 6px 0 2px; }
.hl-chips-label { font-size: 11.5px; color: #94a3b8; }
.hl-chip {
  padding: 1px 8px; font-size: 11.5px; color: #4338ca; background: #eef2ff;
  border: 1px solid #e0e7ff; border-radius: 999px; cursor: pointer;
}
.hl-chip:hover { background: #e0e7ff; }
.tpl-scope-lay { margin-top: -2px; }
.app-ver { opacity: .75; font-size: 11px; letter-spacing: .3px; }

/* ---------- 投递分析：上次结果提示 ---------- */
.jd-restored {
  margin: 0 0 8px; padding: 5px 10px; font-size: 11.5px; color: #1d4ed8;
  background: #eff6ff; border: 1px solid #dbeafe; border-radius: 8px;
}



