* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root { --primary: #1a5a96; --primary-dark: #0f3f6d; --bg: #f4f6f9; --card: #fff; --text: #2b2b2b; --muted: #777; }
html, body { height: 100%; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }

.view { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: 32px; }
.hidden { display: none !important; }

/* 顶栏 */
.topbar { display: flex; align-items: center; height: 50px; padding: 0 14px; background: var(--card); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 4px rgba(0,0,0,.06); font-weight: 600; }
.topbar .back { border: none; background: none; font-size: 26px; line-height: 1; color: var(--text); width: 34px; text-align: left; cursor: pointer; }
.topbar .logo { color: var(--primary); font-weight: 700; }
.topbar .badge { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.topbar span:nth-last-child(1) { margin-left: auto; }

/* 登录 */
#view-login { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 16px; padding: 32px 24px; box-shadow: 0 4px 24px rgba(0,0,0,.08); text-align: center; }
.brand { font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: 2px; }
.brand-sub { color: var(--muted); font-size: 13px; margin: 8px 0 24px; }
.field { margin-bottom: 14px; }
.field.row { display: flex; gap: 10px; }
.field input, textarea { width: 100%; border: 1px solid #dde3ea; border-radius: 10px; padding: 12px 14px; font-size: 15px; outline: none; background: #fafbfc; }
.field input:focus, textarea:focus { border-color: var(--primary); background: #fff; }
.field.row input { flex: 1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.6; text-align: left; }
.error { color: #c0392b; font-size: 13px; min-height: 18px; margin-top: 8px; }

/* 按钮 */
.btn { display: inline-block; border: none; border-radius: 10px; padding: 12px 20px; font-size: 15px; cursor: pointer; text-align: center; text-decoration: none; }
.btn.primary { background: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:active { background: var(--primary-dark); }
.btn.ghost { background: #eef2f7; color: var(--primary); }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn.block { display: block; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 首页 */
.home-hero { padding: 30px 20px 10px; }
.home-hero h1 { font-size: 24px; }
.home-hero p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.entry-grid { display: flex; gap: 12px; padding: 16px 16px 6px; }
.entry { flex: 1; background: var(--card); border: none; border-radius: 16px; padding: 20px 16px; text-align: left; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 6px; }
.entry-icon { font-size: 26px; }
.entry-title { font-size: 16px; font-weight: 700; color: var(--text); }
.entry-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 16px 10px; }
.section-head h2 { font-size: 16px; }
.resume-list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.resume-item { background: var(--card); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.resume-item .r-title { font-weight: 600; }
.resume-item .r-meta { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.resume-item .r-del { color: #c0392b; background: none; border: none; font-size: 12px; cursor: pointer; padding: 4px; }
.empty-list { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0; }

/* 聊天 */
.chat-messages { height: calc(100vh - 190px); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.ai { background: var(--card); align-self: flex-start; border-top-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.msg.user { background: var(--primary); color: #fff; align-self: flex-end; border-top-right-radius: 4px; }
.msg .cursor { display: inline-block; width: 2px; height: 14px; background: var(--primary); animation: blink 1s infinite; vertical-align: -2px; }
@keyframes blink { 50% { opacity: 0; } }
.chat-input-bar { position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; display: flex; gap: 10px; padding: 10px 14px; background: var(--bg); }
.chat-input-bar input { flex: 1; border: 1px solid #dde3ea; border-radius: 22px; padding: 11px 16px; font-size: 14.5px; outline: none; background: #fff; }
.chat-cta { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; padding: 10px 14px 14px; background: var(--bg); }

/* JD 页 */
.jd-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border-radius: 14px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.card textarea { resize: vertical; }
.upload-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.file-label { position: relative; overflow: hidden; }
.file-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-name { font-size: 13px; color: var(--muted); }
.progress { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--card); border-radius: 12px; font-size: 14px; color: var(--primary); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--primary); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#jd-analysis h3 { color: var(--primary); }
.ana-block { margin-top: 12px; }
.ana-block h4 { font-size: 13.5px; margin-bottom: 6px; }
.ana-block ul { margin-left: 18px; font-size: 13.5px; line-height: 1.8; color: #444; }

/* 预览 */
.theme-switch { display: flex; gap: 8px; padding: 10px 14px 0; }
.theme-btn { border: 1px solid #dde3ea; background: #fff; border-radius: 18px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; color: #555; }
.theme-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.preview-wrap { padding: 12px 14px; }
#preview-scaler { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.1); transform-origin: top left; }
#preview-frame { width: 794px; height: 1123px; border: none; display: block; }
.preview-actions { padding: 4px 14px; }
.refine { padding-bottom: 30px; }
.refine .chat-input-bar { position: static; transform: none; padding: 0 14px; }
.refine-note { margin: 0 16px 8px; padding: 10px 14px; background: #eaf3fb; border-radius: 10px; font-size: 13px; color: var(--primary); }

/* 弹层 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-body { background: #fff; border-radius: 16px; padding: 20px; width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; }
.modal-body h3 { margin-bottom: 8px; }
.modal-body .row { display: flex; gap: 10px; margin-top: 14px; }
.modal-body .row .btn { flex: 1; }
#export-image { width: 100%; border: 1px solid #eee; border-radius: 8px; margin-top: 10px; }

/* toast */
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: rgba(20,20,20,.85); color: #fff; font-size: 13.5px; padding: 10px 18px; border-radius: 20px; z-index: 200; max-width: 80vw; text-align: center; }

/* JD 补充问题：就地作答 */
.fuq { margin-bottom: 12px; }
.fuq-label { font-size: 13.5px; line-height: 1.7; margin-bottom: 6px; color: #2a2f36; }
.fuq textarea { font-size: 14px; padding: 10px 12px; }
.fuq-bar { display: flex; gap: 10px; margin-top: 14px; }
.fuq-bar .btn { flex: 1; }

/* ---- 首页商业化 hero ---- */
.home-hero {
  padding: 34px 20px 26px;
  background: linear-gradient(160deg, #eef4ff 0%, #f7f9ff 45%, #fff 100%);
  border-radius: 0 0 28px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before, .home-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .5;
}
.home-hero::before { width: 130px; height: 130px; background: radial-gradient(circle, #cfe0ff, transparent 70%); top: -30px; right: -30px; }
.home-hero::after { width: 170px; height: 170px; background: radial-gradient(circle, #ffe3e6, transparent 70%); bottom: -60px; left: -50px; }
.hero-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  background: #fff;
  border: 1px solid #d7e4ff;
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.home-hero h1 {
  font-size: 30px;
  line-height: 1.32;
  margin: 0 0 12px;
  letter-spacing: 1px;
  color: #17233a;
}
.home-hero h1 em {
  font-style: normal;
  color: var(--primary);
  position: relative;
}
.home-hero h1 em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 8px;
  background: rgba(47, 111, 231, .18);
  border-radius: 4px;
  z-index: -1;
}
.hero-sub { font-size: 14px; color: #5a6577; line-height: 1.8; margin: 0 auto 20px; max-width: 320px; }
.hero-visual { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.mini-resume {
  width: 88px;
  height: 118px;
  background: #fff;
  border-radius: 10px;
  padding: 12px 10px;
  box-shadow: 0 8px 22px rgba(23, 35, 58, .10);
  text-align: left;
}
.mr-clean { transform: rotate(-4deg) translateY(4px); }
.mr-wine { transform: translateY(-6px); z-index: 1; }
.mr-blue { transform: rotate(4deg) translateY(4px); }
.mr-name { height: 9px; width: 45%; border-radius: 3px; margin-bottom: 8px; }
.mr-clean .mr-name { background: #2f6fe7; }
.mr-wine .mr-name { background: #9d2c3c; }
.mr-blue .mr-name { background: #2e8b8b; }
.mr-clean { border-top: 4px solid #2f6fe7; }
.mr-wine { border-top: 4px solid #9d2c3c; }
.mr-blue { border-top: 4px solid #2e8b8b; }
.mr-hd { height: 5px; width: 32%; border-radius: 2px; margin: 10px 0 6px; background: #d8dee9; }
.mr-line { height: 4px; border-radius: 2px; margin-bottom: 5px; background: #eceff4; }
.mr-line.w60 { width: 60%; }
.mr-line.w70 { width: 70%; }
.mr-line.w80 { width: 80%; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hero-chips span {
  font-size: 12px;
  color: #3d4a5d;
  background: #fff;
  border: 1px solid #e3e9f2;
  border-radius: 999px;
  padding: 6px 12px;
}

/* ---- JD 截图上传 ---- */
.jd-image-preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #dde3ea;
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fafbfc;
}

/* ---- 付费 ---- */
.plan-btn { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 14px 16px; }
.plan-btn .plan-t { font-size: 15px; }
.plan-btn .plan-p { font-size: 17px; font-weight: 700; }
.link-btn { background: none; border: none; color: var(--primary); font-size: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---- 交付：微信内下载降级引导 ---- */
.wechat-tip {
  background: #fff8e6;
  border: 1px solid #f0d79a;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.9;
  color: #6b5220;
  text-align: left;
  margin: 10px 0;
}
.wechat-tip b { display: block; margin-bottom: 4px; }
.wechat-tip p { margin: 0; }

/* ---- 付费弹窗信任项 ---- */
.trust-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.trust-list li {
  font-size: 12.5px;
  color: #6b7684;
  line-height: 1.9;
  padding-left: 2px;
}

/* ---- 首页：陪跑入口与页脚 ---- */
#service-entry { margin-top: 18px; }
.service-qr {
  width: 100%;
  max-width: 240px;
  display: block;
  margin: 10px auto 0;
  border-radius: 10px;
}
.home-foot {
  margin: 18px 4px 30px;
  font-size: 12px;
  color: #9aa4b1;
  text-align: center;
  line-height: 1.8;
}
#btn-login-skip {
  display: block;
  margin: 14px auto 0;
  font-size: 13px;
}
