:root {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --accent: #f59e0b;
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --danger: #dc2626;
  --ok: #059669;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}
#app { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }

/* 导航 */
.nav { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.nav-inner { max-width: 760px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 12px; font-weight: 400; opacity: .75; margin-left: 8px; }
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links a { color: #fff; text-decoration: none; font-size: 14px; opacity: .9; }
.btn-nav { background: var(--accent); color: #1f2937 !important; padding: 6px 14px; border-radius: 20px; font-weight: 600; opacity: 1 !important; }

/* 落地页 */
.hero { text-align: center; padding: 40px 8px 24px; }
.hero h1 { font-size: 28px; line-height: 1.3; margin-bottom: 12px; }
.hero h1 em { color: var(--primary); font-style: normal; }
.hero p.lead { color: var(--muted); font-size: 15px; max-width: 520px; margin: 0 auto 24px; }
.price-tag { font-size: 13px; color: var(--muted); margin-top: 10px; }
.price-tag b { color: var(--accent); font-size: 22px; }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.step { background: var(--card); border-radius: var(--radius); padding: 16px; text-align: left; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.step .no { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; text-align: center; line-height: 22px; font-size: 12px; margin-bottom: 8px; }
.step h3 { font-size: 14px; margin-bottom: 4px; }
.step p { font-size: 12.5px; color: var(--muted); }

/* 卡片与表单 */
.card { background: var(--card); border-radius: var(--radius); padding: 22px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-top: 18px; }
.card h2 { font-size: 17px; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input { width: 100%; padding: 11px 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 15px; outline: none; transition: border .15s; }
.field input:focus { border-color: var(--primary); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn { display: block; width: 100%; padding: 13px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.gold { background: var(--accent); color: #1f2937; }
.btn.plain { background: #eef2ff; color: var(--primary); }
.tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.tab { flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: #f3f4f6; font-size: 14px; cursor: pointer; border: 1.5px solid transparent; }
.tab.on { background: #eef2ff; border-color: var(--primary); color: var(--primary); font-weight: 600; }

/* 任务列表 */
.task { background: var(--card); border-radius: var(--radius); padding: 16px; margin-top: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); cursor: pointer; }
.task .row1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.task .co { font-weight: 600; font-size: 15px; }
.task .meta { font-size: 12.5px; color: var(--muted); }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.badge.QUEUED { background: #f3f4f6; color: var(--muted); }
.badge.RUNNING { background: #dbeafe; color: var(--primary); }
.badge.WAIT_INPUT { background: #fef3c7; color: #b45309; animation: pulse 1.6s infinite; }
.badge.STALLED { background: #fef3c7; color: #b45309; }
.badge.DONE { background: #d1fae5; color: var(--ok); }
.badge.FAILED { background: #fee2e2; color: var(--danger); }
.badge.PENDING_PAY { background: #fef3c7; color: #b45309; }
.paybox { margin-top: 14px; background: #f8fafc; border: 1px solid #dfe7f2; border-radius: 10px; padding: 14px; }
.expect { margin-top: 12px; font-size: 13px; color: var(--muted); background: #f0f7ff; border-left: 3px solid var(--primary); border-radius: 6px; padding: 10px 12px; }
.field textarea { width: 100%; padding: 10px 12px; border: 1px solid #d7dee8; border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; }
@keyframes pulse { 50% { opacity: .6; } }

.progress-bar { height: 6px; border-radius: 3px; background: #eef2ff; overflow: hidden; margin-top: 10px; }
.progress-bar i { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width .5s; }

.report-link { display: block; text-align: center; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--ok); color: #fff; text-decoration: none; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14px; }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 99; padding: 20px; }
.dialog { background: #fff; border-radius: 16px; padding: 24px 20px; width: 100%; max-width: 380px; }
.dialog h3 { font-size: 16px; margin-bottom: 10px; }
.dialog .q { font-size: 14px; color: var(--text); background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px; margin-bottom: 14px; }

.toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; z-index: 999; max-width: 86vw; }

.qr-wrap { text-align: center; }
.qr-wrap img { width: 210px; height: 210px; margin: 8px auto; display: block; }

.footer { text-align: center; padding: 20px 12px 28px; color: #9ca3af; font-size: 12px; }
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 34px; }
}

/* 微信扫码支付弹窗 */
.dialog.wxpay #wx-qr { display: flex; justify-content: center; padding: 6px 0; }
.dialog.wxpay #wx-qr svg { width: 224px; height: 224px; }

/* ==================== v14：下单三步向导 ==================== */
.wiz-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.wiz-steps .ws { flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding: 8px 2px; border-radius: 10px; background: #f3f4f6; }
.wiz-steps .ws i { display: inline-block; width: 18px; height: 18px; line-height: 18px; border-radius: 50%; background: #d1d5db; color: #fff; font-style: normal; font-size: 11px; margin-right: 4px; }
.wiz-steps .ws.on { background: #eef2ff; color: var(--primary); font-weight: 600; }
.wiz-steps .ws.on i { background: var(--primary); }
.wiz-steps .ws.done { color: var(--ok); }
.wiz-steps .ws.done i { background: var(--ok); }
.field select { width: 100%; padding: 11px 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 15px; outline: none; background: #fff; }

/* 预登录面板 */
.pf-panel { border: 1.5px solid #dbeafe; background: #f4f8ff; border-radius: 12px; padding: 16px; text-align: center; }
.pf-panel.ok { border-color: #a7f3d0; background: #f0fdf9; }
.pf-panel .pf-done { width: 40px; height: 40px; line-height: 40px; margin: 0 auto 8px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 20px; }
.pf-panel.sms { text-align: left; }
.spinner { width: 26px; height: 26px; margin: 0 auto 8px; border: 3px solid #dbeafe; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== v14：任务对话页 ==================== */
.chat-card { padding: 18px 14px; }
.chat-back { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.chat-open-tip { font-size: 12px; color: var(--muted); background: #f8fafc; border-radius: 8px; padding: 6px 10px; margin: 8px 0 4px; }
.stage-line { font-size: 12.5px; color: var(--muted); background: #f8fafc; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.link-btn { margin-top: 8px; background: none; border: none; color: var(--primary); font-size: 12.5px; cursor: pointer; padding: 0; }
.thread { margin-top: 14px; max-height: 46vh; overflow-y: auto; padding: 4px 2px; scroll-behavior: smooth; }
.m-row { display: flex; flex-direction: column; margin-bottom: 10px; }
.m-row.me { align-items: flex-end; }
.m { max-width: 86%; border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.65; }
.m.ai { background: #f1f5f9; border-top-left-radius: 4px; }
.m.ai.waiting { background: #fffbeb; border: 1px solid #fde68a; }
.m.me { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.m-tag { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.m.ai.waiting .m-tag { color: #b45309; }
.m-text { white-space: pre-wrap; word-break: break-word; }
.m-time { font-size: 11px; opacity: .65; margin-top: 4px; }
.m-waiting { font-size: 12px; color: #b45309; margin-top: 6px; }
.composer { margin-top: 12px; border-top: 1px solid #eef2f7; padding-top: 12px; }
.composer.ask .c-label { color: #b45309; font-weight: 600; }
.c-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.c-row { display: flex; gap: 8px; }
.c-row input, .composer textarea { flex: 1; width: 100%; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 14px; outline: none; }
.composer.ask .c-row input { text-align: center; letter-spacing: 6px; font-size: 18px; border-color: var(--primary); }
.composer textarea { border-radius: 10px; font-family: inherit; resize: vertical; margin-bottom: 8px; }
.task.task-hot { border: 1.5px solid #fdba74; }

/* ==================== v14：首页差异化与安全 ==================== */
.diff-card { border: 1.5px solid #dbeafe; }
.diff-lead { font-size: 14.5px; }
.chat-mock { margin-top: 14px; background: #f8fafc; border-radius: 12px; padding: 12px; }
.cm-row { display: flex; margin-bottom: 8px; }
.cm-row:last-child { margin-bottom: 0; }
.cm-row .cm { max-width: 88%; border-radius: 11px; padding: 8px 11px; font-size: 12.5px; line-height: 1.6; }
.cm.ai { background: #e8eef7; color: #334155; }
.cm.me { background: var(--primary); color: #fff; margin-left: auto; }
.cm-tag { display: inline-block; font-size: 10.5px; color: var(--muted); margin-right: 6px; }
.cm-tag.ok { color: var(--ok); font-weight: 600; }
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sec-item { background: #f8fafc; border-radius: 10px; padding: 12px; }
.sec-item b { display: block; font-size: 13px; margin-bottom: 4px; }
.sec-item span { font-size: 12px; color: var(--muted); }
.faq { border-bottom: 1px solid #eef2f7; padding: 10px 0; }
.faq summary { font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::before { content: '＋ '; color: var(--primary); }
.faq[open] summary::before { content: '－ '; }
.faq p { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
