/* ==========================================================================
   AI 文档生成 · 前台样式（原生 CSS，零依赖）
   手机端优先；≥900px 时内容居中成固定宽画布，不拉成一条纸带。
   ========================================================================== */

:root {
    --primary: #1657ff;
    --accent: #ff7a45;
    --radius: 12px;
    --ink: #14181f;
    --muted: #6b7280;
    --line: #e8ebf0;
    --soft: #f5f7fb;
    --ok: #15803d;
    --warn: #b45309;
    --danger: #b91c1c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.cv {
    font: 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--soft);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, strong, b { font-weight: 600; }
img { max-width: 100%; }

/* ── 顶部 ───────────────────────────────────────────────── */
.cv-top {
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #7c3aed));
    color: #fff;
    padding: 14px 16px 16px;
}
.cv-top-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cv-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cv-logo {
    width: 34px; height: 34px; border-radius: 10px; flex: none;
    background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.cv-brand-text { display: flex; flex-direction: column; min-width: 0; }
.cv-brand-text strong { font-size: 16px; }
.cv-slogan { font-size: 12px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-me {
    flex: none; font-size: 13px; padding: 5px 12px; border-radius: 999px;
    background: rgba(255,255,255,.18); max-width: 40%; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}

.cv-ticker {
    display: flex; gap: 8px; align-items: center;
    padding: 7px 16px; background: #fff8e6; color: #92400e; font-size: 12px;
}
.cv-ticker-tag { flex: none; background: #fde68a; border-radius: 4px; padding: 1px 6px; }
.cv-ticker-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 主体 ───────────────────────────────────────────────── */
.cv-wrap { padding: 14px 16px 90px; max-width: 720px; margin: 0 auto; }
.cv-page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cv-flex { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cv-mt { margin-top: 12px; }
.cv-link { color: var(--primary); font-size: 13px; }
.cv-danger { color: var(--danger); }
.cv-ok { color: var(--ok); }

/* ── 卡片 ───────────────────────────────────────────────── */
.cv-card {
    background: #fff; border-radius: var(--radius);
    padding: 14px; margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.04);
}
.cv-card-soft { background: #f8fafc; box-shadow: none; border: 1px dashed var(--line); }
.cv-card-warn { background: #fff7ed; border: 1px solid #fed7aa; }
/* 卡片里的小标题：以前用 <strong> 跟正文一个字号，一屏两张卡看不出主次（客户 2026-10-02） */
.cv-card-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin: 0 0 8px; }
.cv-empty { text-align: center; padding: 28px 14px; color: var(--muted); }

/* ── 首页 hero ─────────────────────────────────────────── */
.cv-hero {
    background: #fff; border-radius: var(--radius); padding: 18px 16px;
    margin-bottom: 12px; box-shadow: 0 6px 20px rgba(22,87,255,.08);
}
.cv-hero h1 { margin: 0 0 6px; font-size: 22px; }
.cv-hero p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.cv-hero-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* ── 按钮 ───────────────────────────────────────────────── */
.cv-btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--primary); background: var(--primary); color: #fff;
    border-radius: 10px; padding: 10px 16px; font-size: 15px;
    font-family: inherit; cursor: pointer; line-height: 1.2;
}
.cv-btn-lg { padding: 14px 18px; font-size: 16px; font-weight: 600; width: 100%; }
.cv-btn-block { width: 100%; }
.cv-btn-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.cv-btn-text {
    border: 0; background: none; color: var(--primary); font-size: 13px;
    font-family: inherit; cursor: pointer; padding: 4px 0; text-align: left;
}

/* ── 档位 ───────────────────────────────────────────────── */
/* 手机上**一行一个**，宽屏才并排：窄屏两列会把文案挤成三四行（客户反馈过） */
.cv-tiers { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
@media (min-width: 700px) {
    .cv-tiers { grid-template-columns: 1fr 1fr; gap: 12px; }
}
.cv-tiers-pick { align-items: stretch; }
.cv-tier {
    position: relative; display: block; background: #fff; color: inherit;
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px; text-align: left; font-family: inherit; cursor: pointer;
    width: 100%; height: 100%;
}
.cv-tier.on { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,87,255,.12); }
.cv-tier:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); }
.cv-tier-pro { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cv-tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
/* 档位卡片里那一句卖点：小一号、灰色，压在标题下面一行 */
.cv-tier-sub { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.cv-price { color: var(--primary); font-weight: 700; }
.cv-price-lg { color: var(--primary); font-size: 22px; font-weight: 700; }
.cv-badge {
    position: absolute; top: -8px; right: 10px; font-size: 11px;
    background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 8px;
}
.cv-tier-pick { margin: 0; }
.cv-card .cv-tiers .cv-tier-pick .cv-tier { margin: 0; }

/* ── 表单 ───────────────────────────────────────────────── */
.cv-label { display: block; font-size: 14px; margin: 14px 0 6px; }
.cv-req { color: var(--danger); }
.cv-textarea, .cv-input {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    padding: 10px 12px; font: inherit; background: #fff; color: var(--ink);
}
.cv-textarea { min-height: 220px; resize: vertical; line-height: 1.7; }
.cv-input { margin-bottom: 8px; }
.cv-textarea:focus, .cv-input:focus { outline: none; border-color: var(--primary); }
.cv-warn { color: var(--warn); }
.cv-clip { margin-top: 10px; }

.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-chip {
    border: 1px solid var(--line); background: #fff; border-radius: 999px;
    padding: 7px 14px; font-size: 13px; color: var(--ink); cursor: pointer;
    font-family: inherit; display: inline-flex; align-items: center; gap: 6px;
}
.cv-chip input { display: none; }
.cv-chip:has(input:checked) { border-color: var(--primary); color: var(--primary); background: rgba(22,87,255,.06); }
.cv-chip-wide { width: 100%; border-radius: 10px; justify-content: space-between; }
.cv-chips-copy .cv-chip { font-size: 12px; }

/* ── 列表 / 步骤 / 折叠 ────────────────────────────────── */
.cv-steps { list-style: none; margin: 10px 0 0; padding: 0; }
.cv-steps li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--muted); }
.cv-steps b {
    width: 22px; height: 22px; border-radius: 50%; background: var(--soft);
    color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.cv-checks { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.cv-checks li { padding: 3px 0; }
.cv-checks-extra li { color: var(--accent); }
.cv-extra-title { margin: 10px 0 0; color: var(--accent); }
.cv-list { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.cv-list li { margin-bottom: 4px; }
.cv-faq { border-top: 1px solid var(--line); padding: 10px 0 6px; }
.cv-faq:first-of-type { border-top: 0; }
.cv-faq summary { cursor: pointer; font-size: 14px; }
.cv-faq p { margin: 8px 0 0; }
.cv-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.cv-row:first-of-type { border-top: 0; }
.cv-record { display: block; }
.cv-pre, .cv-resume {
    white-space: pre-wrap; word-break: break-word; font: inherit;
    margin: 10px 0 0; font-size: 14px; line-height: 1.8; max-height: 60vh; overflow: auto;
}

/* ── 我的 ───────────────────────────────────────────────── */
.cv-me-head { display: flex; align-items: center; gap: 12px; }
.cv-me-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 名字旁边的 UID 小徽标（客户报号 / 客服查人都用它） */
.cv-uid {
    font-size: 12px; font-weight: 600; line-height: 1.6;
    color: var(--primary); background: rgba(22,87,255,.08);
    border: 1px solid rgba(22,87,255,.18); border-radius: 999px; padding: 0 8px;
}
.cv-avatar {
    width: 46px; height: 46px; border-radius: 14px; flex: none;
    background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.cv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.cv-stat {
    background: #fff; border-radius: var(--radius); padding: 12px; text-align: center;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.cv-stat b { display: block; font-size: 20px; color: var(--primary); }
.cv-menu a { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.cv-menu a:first-child { border-top: 0; }
.cv-kv { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.cv-kv th, .cv-kv td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cv-kv th { color: var(--muted); font-weight: 400; width: 96px; }
.cv-qr { width: 140px; border-radius: 10px; }

/* ── 电脑端当面付扫码页（类名别和上面那个 .cv-qr 撞：那是小程序二维码图片） ── */
.cv-payqr { text-align: center; padding: 20px 16px 16px; }
.cv-payqr-title { margin: 0 0 6px; font-size: 19px; }
.cv-payqr-title b { color: var(--primary); }
.cv-payqr-box {
    display: flex; align-items: center; justify-content: center;
    width: 280px; max-width: 100%; margin: 16px auto; padding: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.cv-payqr-box svg { display: block; width: 240px; height: 240px; }
.cv-payqr-hint { margin: 0 0 14px; }
.cv-payqr-actions { justify-content: center; gap: 14px; }

/* ── 生成中 ─────────────────────────────────────────────── */
.cv-task { background: #fff; border-radius: var(--radius); padding: 26px 16px; text-align: center; margin-bottom: 12px; }
.cv-spinner {
    width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
    border: 3px solid rgba(22,87,255,.15); border-top-color: var(--primary);
    animation: cv-spin 1s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }
.cv-task-title { font-size: 17px; margin: 0 0 6px; }
.cv-progress { list-style: none; margin: 18px 0 12px; padding: 0; text-align: left; }
.cv-progress li {
    position: relative; padding: 8px 0 8px 26px; font-size: 14px; color: #b6bcc8;
    border-left: 2px solid var(--line); margin-left: 6px;
}
.cv-progress li::before {
    content: ''; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px;
    border-radius: 50%; background: #fff; border: 2px solid var(--line);
}
.cv-progress li.on { color: var(--ink); border-color: var(--primary); }
.cv-progress li.on::before { border-color: var(--primary); background: var(--primary); }
.cv-task-actions { justify-content: center; margin-top: 14px; }

/* ── 结果页 ─────────────────────────────────────────────── */
.cv-score { display: flex; align-items: center; gap: 14px; }
.cv-ring {
    width: 84px; height: 84px; flex: none; border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--score) * 1%), #eef1f6 0);
    display: flex; align-items: center; justify-content: center;
}
.cv-ring span {
    width: 66px; height: 66px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: var(--primary);
}
.cv-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.cv-tabs button {
    flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
    background: #fff; font-family: inherit; font-size: 14px; cursor: pointer; color: var(--muted);
}
.cv-tabs button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
/* 页签里的表单：默认 hidden 属性在各家样式表里常被 author 样式盖掉，这里明写一条 */
.cv-card [hidden] { display: none !important; }
.cv-diff { border-top: 1px dashed var(--line); padding: 10px 0 4px; }
.cv-diff:first-of-type { border-top: 0; }
.cv-diff-before { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.cv-diff-after { font-size: 14px; margin: 0 0 4px; }
.cv-qa { border-top: 1px dashed var(--line); padding: 10px 0 4px; }
.cv-qa:first-of-type { border-top: 0; }
.cv-qa p { margin: 0 0 4px; font-size: 14px; }
.cv-actions { margin-top: 4px; }
.cv-actions-sub { margin-top: 8px; justify-content: space-around; }
.cv-ai-notice { text-align: center; color: var(--muted); font-size: 12px; margin: 12px 0; }

/* ── 底部导航 / 提示 ───────────────────────────────────── */
.cv-tab {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; background: rgba(255,255,255,.96);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(8px);
}
.cv-tab a {
    flex: 1; text-align: center; padding: 10px 0 12px; font-size: 12px; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
/* 图标：以前是个 6px 小圆点（客户截图里就是几个方块），换成 20px 线性 SVG */
.cv-tab-ico { display: block; width: 22px; height: 22px; }
.cv-tab-ico svg { width: 100%; height: 100%; display: block; }
.cv-tab a.on { color: var(--primary); }
.cv-tab a.on .cv-tab-ico svg { stroke-width: 2.1; }

.cv-flash { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.cv-flash-success { background: #e8f7ee; color: #14663a; }
.cv-flash-error { background: #fdecec; color: #a11d1d; }
.cv-flash-info { background: #eef2ff; color: #3730a3; }
.cv-toast {
    position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
    background: rgba(17,24,39,.9); color: #fff; padding: 9px 16px; border-radius: 999px;
    font-size: 13px; z-index: 50;
}
.cv-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }

/* ── 电脑端：内容居中成固定宽画布 ───────────────────────── */
@media (min-width: 900px) {
    .cv-top { padding: 22px 0 24px; }
    .cv-top-in, .cv-ticker, .cv-wrap { max-width: 720px; margin: 0 auto; }
    .cv-ticker { border-radius: 0 0 10px 10px; padding: 8px 14px; }
    .cv-wrap { padding: 22px 0 60px; }
    /*
     * 底栏在电脑端**保留**（以前这里写的是 display:none）。
     *
     * 隐藏它等于把"我的"这个入口从电脑端拿掉了 —— 客户在电脑上找不到"我的"
     * （2026-10-01 反馈："电脑端不显示我的"）。现在只是收成同宽的圆角条，
     * 和内容对齐，看着是"居中一条"，不再是横跨整屏的横杠。
     */
    .cv-tab {
        max-width: 720px; margin: 0 auto; border-radius: 12px 12px 0 0;
        border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    }
    .cv-textarea { min-height: 300px; }
    .cv-tiers { gap: 14px; }
}
