:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #1a1c2e;
  --ink-soft: #5b5f73;
  --line: #e7e9f2;
  --brand: #5b5bd6;
  --brand-2: #7c7cf0;
  --brand-soft: #eef0ff;
  --ok: #1f9d6b;
  --warn: #c9821a;
  --danger: #d8453a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(40, 42, 80, 0.08);
}

/* 登录页 */
.login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-soft), #f6f7fb);
}
.login-box {
  width: 320px; background: var(--surface); border-radius: 18px;
  padding: 32px 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.login-logo {
  width: 56px; height: 56px; margin: 0 auto;
  border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
}
.login-box h3 { margin: 0 0 4px; font-size: 18px; }
.login-box input {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit;
}
.login-box input:focus { outline: none; border-color: var(--brand); }
.login-err { color: var(--danger); font-size: 12px; min-height: 16px; }
.login-box .btn-primary { width: 100%; }
.login-switch { font-size: 13px; color: var(--brand); text-decoration: none; cursor: pointer; }
.login-switch:hover { text-decoration: underline; }
.login-confirm-wrap { display: flex; }
.login-confirm-wrap input { width: 100%; }
/* 密码输入框 + 显示/隐藏按钮 */
.pwd-wrap { position: relative; display: flex; align-items: center; }
.pwd-wrap input { width: 100%; padding-right: 40px; }
.pwd-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px;
  padding: 4px 6px; line-height: 1; color: var(--ink-soft); opacity: .6;
}
.pwd-toggle:hover { opacity: 1; }
.pwd-toggle.on { opacity: 1; color: var(--brand); }
.user-badge { font-size: 12px; color: var(--ink-soft); align-self: center; padding: 0 6px; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; }
.brand-text small { color: var(--ink-soft); font-size: 12px; }
.topbar-actions { display: flex; gap: 10px; }

/* 按钮 */
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border: none; cursor: pointer;
  padding: 13px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 600;
  transition: transform .08s ease, box-shadow .2s ease, opacity .2s;
  box-shadow: 0 8px 20px rgba(91, 91, 214, 0.28);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); cursor: pointer;
  padding: 10px 16px; border-radius: 10px; font-size: 14px;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--brand-soft); border-color: var(--brand-2); }

/* 容器 */
.container { max-width: 860px; margin: 0 auto; padding: 28px 20px 60px; }

/* Hero */
.hero { text-align: center; padding: 18px 0 26px; }
.hero h1 { font-size: 30px; line-height: 1.35; margin: 0 0 12px; font-weight: 800; }
.hero-sub { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* 步骤 */
.steps {
  display: flex; gap: 10px; list-style: none;
  padding: 0; margin: 0 0 22px; justify-content: center;
}
.step {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-soft); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.step span {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px;
  background: var(--line); color: var(--ink-soft);
}
.step.active { color: var(--brand); border-color: var(--brand-2); background: var(--brand-soft); }
.step.active span { background: var(--brand); color: #fff; }

/* 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-head h2 { font-size: 17px; margin: 0; }
.card-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid transparent; cursor: pointer;
  padding: 7px 13px; border-radius: 9px; font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.chip:hover { background: #e3e6ff; }

.text-area {
  width: 100%; min-height: 150px; resize: vertical;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font-size: 14px; line-height: 1.6;
  font-family: inherit; color: var(--ink); background: #fbfbfe;
}
.text-area:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }

.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; gap: 12px; flex-wrap: wrap;
}
.hint { color: var(--ink-soft); font-size: 12px; }
.counter { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }

/* 生成行 */
.generate-row { display: flex; gap: 12px; justify-content: center; margin: 22px 0; }

/* 结果 */
.result-card .status {
  font-size: 12px; color: var(--brand);
  background: var(--brand-soft); padding: 4px 10px; border-radius: 999px;
}
.markdown-body { font-size: 14.5px; line-height: 1.75; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 18px 0 10px; line-height: 1.4; }
.markdown-body h2 { font-size: 18px; border-left: 4px solid var(--brand); padding-left: 10px; }
.markdown-body h3 { font-size: 15.5px; color: var(--brand); }
.markdown-body ul, .markdown-body ol { padding-left: 22px; }
.markdown-body li { margin: 6px 0; }
.markdown-body code {
  background: #f0f1f8; padding: 2px 6px; border-radius: 6px;
  font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.markdown-body pre { background: #1a1c2e; color: #e6e7f5; padding: 14px; border-radius: 10px; overflow: auto; }
.markdown-body pre code { background: none; color: inherit; padding: 0; }
.markdown-body blockquote {
  margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--line);
  color: var(--ink-soft); background: #fafbff;
}
.markdown-body table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.markdown-body strong { color: var(--ink); }

.footer-note { text-align: center; color: var(--ink-soft); font-size: 12px; margin-top: 26px; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 22, 40, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal.show { z-index: 70; }
.modal-box {
  background: var(--surface); width: 100%; max-width: 460px;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close {
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--ink-soft); line-height: 1;
}
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-body.center { text-align: center; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--line);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.field input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.field small { color: var(--ink-soft); font-size: 12px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 10px; }
.field.checkbox input { width: auto; }
.warn {
  background: #fff7e8; border: 1px solid #f3dca0; color: var(--warn);
  padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
}
.warn strong { color: var(--warn); }

/* 二维码 */
.qr-box {
  width: 220px; height: 220px; margin: 6px auto 14px;
  display: grid; place-items: center; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.qr-box img, .qr-box canvas { max-width: 100%; max-height: 100%; }

/* Toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; z-index: 10000; box-shadow: var(--shadow);
}

.hidden { display: none !important; }

/* 标签页 */
.tabs {
  display: flex; gap: 6px; margin: 6px 0 22px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px; overflow: auto;
}
.tab-btn {
  flex: 1; white-space: nowrap; cursor: pointer;
  border: none; background: transparent; color: var(--ink-soft);
  padding: 10px 8px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: background .15s, color .15s;
}
.tab-btn:hover { background: var(--brand-soft); }
.tab-btn.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

.panel-head { margin: 4px 0 16px; }
.panel-head h2 { font-size: 20px; margin: 0 0 6px; }
.panel-head .hint { margin: 0; }

/* 资料类型分段 */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn {
  cursor: pointer; border: 1px solid var(--line); background: #fbfbfe;
  color: var(--ink-soft); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.seg-btn.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-2); }

.text-input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.text-input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }

/* 资料库 */
.lib-list { display: flex; flex-direction: column; gap: 10px; }
.lib-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfbfe; }
.lib-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lib-type { font-weight: 700; color: var(--brand); font-size: 14px; }
.lib-date { color: var(--ink-soft); font-size: 12px; }
.lib-prev { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.lib-actions { display: flex; gap: 8px; margin-top: 8px; }
.mini {
  cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
}
.mini:hover { background: var(--brand-soft); border-color: var(--brand-2); }
.mini.danger { color: var(--danger); }
.mini.danger:hover { background: #fdecea; border-color: var(--danger); }
.mini.boss { color: #00bebd; border-color: #00bebd; }
.mini.boss:hover { background: #e6fbfa; border-color: #00bebd; }
.btn-boss { background: #00bebd; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; cursor: pointer; line-height: 1.4; }
.btn-boss:hover { background: #00a8a7; }
.src-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,0.25); margin-left: 6px; vertical-align: middle; }
.src-tag.light { background: rgba(0,0,0,0.12); }
.src-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; margin-right: 6px; vertical-align: middle; }
.src-badge.official { background: rgba(79,111,255,0.12); color: #4f6fff; }
.src-badge.boss { background: rgba(0,190,189,0.16); color: #00a8a7; }
.src-legend { font-size: 12px; color: #8a8f99; margin: 8px 0 4px; }
.empty { color: var(--ink-soft); font-size: 13px; padding: 6px 0; }

/* 求职动态 */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid;
  border-radius: 12px; padding: 12px; text-align: center;
}
.stat-n { display: block; font-size: 22px; font-weight: 800; }
.stat-l { font-size: 12px; color: var(--ink-soft); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-wide { grid-column: 1 / -1; }
.form-grid select, .form-grid input { font-family: inherit; }

.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-card {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.app-top strong { font-size: 15px; }
.badge { color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.app-meta { color: var(--ink-soft); font-size: 12.5px; margin-top: 4px; }
.app-note { font-size: 13px; margin-top: 8px; background: #fafbff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.app-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 子标签（面板内） */
.subtabs { display: flex; gap: 6px; margin: 4px 0 16px; flex-wrap: wrap; }
.subtab-btn {
  cursor: pointer; border: 1px solid var(--line); background: #fbfbfe;
  color: var(--ink-soft); padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
}
.subtab-btn.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-2); }
.sub-panel { margin-bottom: 8px; }
.func-group { margin-top: 4px; }

/* 区块标题（工作台分组） */
.section-title { font-size: 15px; font-weight: 700; margin: 22px 0 10px; color: var(--ink); }
.jd-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 160px; overflow: auto; background: #fafbff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* 校招资讯：筛选栏 + 卡片 */
.filter-bar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 16px;
}
.filter-field { display: flex; flex-direction: column; gap: 5px; }
.filter-field > span { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.filter-field .text-input { width: 170px; }
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.camp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.camp-pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 18px 0 4px; flex-wrap: wrap; }
.camp-page-btn { min-width: 96px; }
.camp-page-info { color: var(--muted, #8a8f99); font-size: 14px; }
.camp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.camp-top strong { font-size: 15px; }
.camp-meta { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.camp-k { display: inline-block; min-width: 34px; color: var(--brand); font-weight: 700; }
.camp-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; background: #fafbff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; line-height: 1.5; }
.camp-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.camp-actions a.mini { text-decoration: none; }
/* 校招搜索加载状态 */
.cp-loading { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-size: 13px; font-weight: 600; align-self: center; }
.cp-spinner { width: 16px; height: 16px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: cp-spin .7s linear infinite; }
@keyframes cp-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .hero h1 { font-size: 24px; }
  .card-tools { width: 100%; }
  .card-head { align-items: flex-start; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .active-grid { grid-template-columns: 1fr; }
  .resume-grid { grid-template-columns: 1fr; }
  .tabs { gap: 4px; }
  .tab-btn { font-size: 13px; padding: 9px 6px; }
  .filter-field .text-input { width: 100%; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .camp-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   移动端适配（≤ 600px）：重排顶栏、标签滚动、卡片去溢出、弹窗全屏化
   ============================================================ */
@media (max-width: 600px) {
  /* 全局：防水平溢出 */
  body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
  .container { padding: 14px 12px 80px; max-width: 100%; }

  /* 顶栏：紧凑 + 按钮换行 */
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .brand-logo { width: 32px; height: 32px; }
  .brand-text strong { font-size: 15px; }
  .brand-text small { font-size: 11px; }
  .topbar-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-start; width: 100%; padding-top: 4px; }
  .btn-ghost { padding: 8px 10px; font-size: 13px; }
  .user-badge { font-size: 11px; order: -1; width: 100%; padding: 0; }

  /* 标签栏：横向滚动 + 不缩小 */
  .tabs { margin: 6px 0 16px; padding: 4px; gap: 4px; }
  .tab-btn { flex: 0 0 auto; padding: 9px 12px; font-size: 13px; }

  /* 卡片：减内距、圆角收小 */
  .card { padding: 14px; margin-bottom: 14px; border-radius: 13px; }
  .card-head { margin-bottom: 10px; }
  .card-head h2 { font-size: 15px; }
  .panel-head h2 { font-size: 17px; }
  .panel-head .hint, .hint { font-size: 12px; line-height: 1.6; }

  /* 表单：单列、输入框够高（易点） */
  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .field { margin-bottom: 10px; }
  .field > span { font-size: 13px; }
  .field input, .text-input, .form-grid select {
    padding: 12px 12px; font-size: 16px; /* 16px 防 iOS 自动放大 */
    width: 100%; box-sizing: border-box;
  }
  .text-area { min-height: 140px; font-size: 16px; padding: 12px; }

  /* 按钮：够大、不溢出 */
  .btn-primary { padding: 13px 18px; font-size: 15px; width: 100%; }
  .btn-ghost { padding: 11px 14px; }
  .generate-row { flex-wrap: wrap; justify-content: stretch; gap: 8px; margin: 14px 0; }
  .generate-row > * { width: 100%; }

  /* 弹窗：全屏，避免在小屏被键盘挡 */
  .modal { padding: 0; align-items: stretch; justify-content: stretch; }
  .modal-box {
    max-width: 100%; width: 100%; max-height: 100vh;
    border-radius: 0; margin: 0; height: 100%;
  }
  .modal-head { padding: 14px 14px; }
  .modal-head h3 { font-size: 15px; }
  .modal-body { padding: 14px; }
  .modal-foot { padding: 12px 14px; }
  .modal-foot .btn-primary, .modal-foot .btn-ghost { flex: 1; }

  /* 求职动态统计：3 列 */
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 10px 8px; }
  .stat-n { font-size: 18px; }
  .stat-l { font-size: 11px; }

  /* 投递卡片 */
  .app-card { padding: 12px; border-radius: 11px; }
  .app-top { flex-wrap: wrap; gap: 6px; }
  .app-top strong { font-size: 14px; }
  .app-meta { font-size: 12px; }
  .app-actions { flex-wrap: wrap; gap: 6px; }
  .mini { padding: 7px 10px; font-size: 12px; }

  /* 校招卡片 + 分页 */
  .camp-card { padding: 12px; border-radius: 11px; }
  .camp-top strong { font-size: 14px; }
  .camp-meta { font-size: 12.5px; }
  .camp-k { min-width: 30px; }
  .camp-actions { gap: 6px; }
  .camp-pager { gap: 8px; }
  .camp-page-btn { min-width: 80px; padding: 9px 12px; }
  .src-legend { font-size: 11.5px; line-height: 1.6; }
  .src-tag { font-size: 10px; padding: 1px 6px; }

  /* 资料库 / 简历卡 */
  .lib-item { padding: 10px 12px; }
  .resume-card { padding: 12px; border-radius: 11px; }
  .resume-actions { gap: 6px; }

  /* 历史记录 */
  .hist-item { padding: 12px; border-radius: 11px; }
  .hist-head { flex-wrap: wrap; gap: 6px; }
  .hist-mod { font-size: 14px; }
  .hist-time { font-size: 11px; }

  /* 模拟面试聊天 */
  .chat-box { height: 56vh; padding: 10px; }
  .bubble { max-width: 88%; font-size: 13px; padding: 9px 11px; }
  .chat-input-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .chat-input-row .text-input { min-width: 0; }

  /* Markdown 表格水平滚动（防溢出） */
  .markdown-body { font-size: 14px; }
  .markdown-body table { display: block; overflow-x: auto; white-space: nowrap; max-width: 100%; }
  .markdown-body pre { font-size: 12px; padding: 10px; }
  .markdown-body h2 { font-size: 16px; }
  .markdown-body h3 { font-size: 14.5px; }

  /* 二维码弹窗内容居中 */
  .qr-box { width: 200px; height: 200px; }
  .modal-body.center { padding: 16px 14px; }

  /* 当前数据源块 */
  .ds-row { flex-wrap: wrap; gap: 6px; }
  .ds-label { width: auto; }

  /* 子标签横向滚动 */
  .subtabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 6px; }
  .subtab-btn { flex: 0 0 auto; white-space: nowrap; }

  /* 分段按钮 */
  .seg { flex-wrap: wrap; gap: 6px; }
  .seg-btn { padding: 7px 12px; font-size: 12.5px; }
  .chip { padding: 6px 11px; font-size: 12.5px; }
  .card-tools { gap: 6px; }

  /* JD 多选框 */
  .jd-checks { max-height: 140px; padding: 8px 10px; }

  /* footer */
  .footer-note { font-size: 11px; padding: 0 4px; }

  /* 触摸：去掉 hover 闪烁，按钮 active 反馈 */
  .btn-primary:hover, .btn-ghost:hover { transform: none; }
  .btn-primary:active { transform: scale(0.98); opacity: .9; }
  .btn-ghost:active { background: var(--brand-soft); }

  /* 安全区域：iPhone 底部 home 条 */
  .toast { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; transform: none; max-width: none; }
}

/* 模拟面试聊天 */
.chat-box {
  border: 1px solid var(--line); border-radius: 12px; background: #fafbff;
  padding: 14px; height: 320px; overflow-y: auto; margin: 12px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.6; word-break: break-word; }
.bubble-ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.bubble-user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.bubble-user :where(p, ul, ol) { margin: 0; }
.chat-input-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chat-input-row .text-input { flex: 1; min-width: 200px; }

/* 空状态 */
.emptybig {
  color: var(--ink-soft); font-size: 14.5px; line-height: 1.7;
  background: var(--brand-soft); border: 1px dashed var(--brand-2);
  border-radius: 14px; padding: 22px; text-align: center;
}
.muted { color: var(--ink-soft); }

/* 当前使用（数据源概览） */
.active-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.active-col {
  background: #fafbff; border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}
.active-label { font-size: 12px; color: var(--ink-soft); font-weight: 700; margin-bottom: 6px; }
.active-name { font-size: 16px; font-weight: 700; word-break: break-word; }
.active-meta { font-size: 12px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }

/* 数据源状态块（功能面板内） */
.ds-block {
  background: #fafbff; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.ds-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ds-row + .ds-row { margin-top: 6px; }
.ds-label {
  flex: none; width: 46px; color: var(--ink-soft); font-weight: 700;
}
.ds-val {
  flex: 1; color: var(--ink); word-break: break-word;
  font-weight: 600;
}
.ds-link {
  margin-top: 10px; background: none; border: none; cursor: pointer;
  color: var(--brand); font-size: 13px; font-weight: 700; padding: 0;
}
.ds-link:hover { text-decoration: underline; }

/* 简历卡片网格 */
.resume-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px; margin-top: 16px;
}
.resume-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; transition: border-color .15s, box-shadow .15s;
}
.resume-card.active { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.resume-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.resume-top strong { font-size: 15px; word-break: break-word; }
.resume-meta { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 12px; }
.resume-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* 历史记录 */
.hist-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
}
.hist-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hist-mod { font-size: 15px; font-weight: 700; color: var(--brand); }
.hist-time { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.hist-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.hist-prev {
  font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 8px 0;
  background: #fafbff; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; max-height: 64px; overflow: hidden;
}
.hist-actions { display: flex; gap: 8px; }

/* 原始文本查看 */
.raw {
  white-space: pre-wrap; word-break: break-word; font-size: 13.5px;
  line-height: 1.7; font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #fafbff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin: 0; max-height: 60vh; overflow: auto;
}

@media (max-width: 560px) {
  .hero h1 { font-size: 24px; }
}
