* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6fb; color: #1f2533; font-size: 15px; line-height: 1.6; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #fff; position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,.05); display: flex; flex-direction: column; }
.topbar { padding: 14px 16px; font-weight: 700; font-size: 17px; text-align: center; position: sticky; top: 0;
  background: #fff; z-index: 5; border-bottom: 1px solid #eef0f5; }
.topbar .back { position: absolute; left: 12px; font-size: 14px; color: #2b6cff; cursor: pointer; font-weight: 600; }
.view { padding: 18px 16px 90px; flex: 1; }
.hidden { display: none !important; }

/* 首页 */
.hero { background: linear-gradient(135deg,#2b6cff,#5b8def); color:#fff; border-radius: 16px; padding: 22px 18px; margin-bottom: 16px; }
.hero h1 { margin: 0 0 6px; font-size: 22px; }
.hero p { margin: 0; opacity: .92; font-size: 13px; }
.price-tag { display:inline-block; margin-top:12px; background: rgba(255,255,255,.18); padding:4px 12px; border-radius: 20px; font-size:13px; }
.card { border:1px solid #eef0f5; border-radius:14px; padding:16px; margin-bottom:14px; cursor:pointer; transition:.15s; background:#fff; }
.card:active { transform: scale(.99); }
.card .ico { font-size:26px; }
.card h3 { margin:8px 0 4px; font-size:17px; }
.card p { margin:0; color:#6b7280; font-size:13px; }
.card .go { float:right; color:#2b6cff; font-weight:700; }
.section-title { font-size:14px; color:#9aa3b2; margin: 18px 0 8px; font-weight:600; }

/* 问卷 */
.progress { height:6px; background:#eef0f5; border-radius:6px; overflow:hidden; margin-bottom:14px; }
.progress > i { display:block; height:100%; background:linear-gradient(90deg,#2b6cff,#5b8def); transition:.2s; }
.q { background:#fff; border:1px solid #eef0f5; border-radius:12px; padding:14px; margin-bottom:12px; }
.q .tag { display:inline-block; font-size:11px; color:#2b6cff; background:#eaf1ff; padding:1px 8px; border-radius:10px; margin-bottom:6px; }
.q .text { font-weight:600; margin-bottom:10px; }
.scale { display:flex; gap:6px; }
.scale button { flex:1; border:1px solid #dfe3ec; background:#f8fafc; border-radius:8px; padding:8px 0; font-size:12px; color:#5b6472; cursor:pointer; }
.scale button.on { background:#2b6cff; color:#fff; border-color:#2b6cff; }
.sjt button { display:block; width:100%; text-align:left; border:1px solid #dfe3ec; background:#f8fafc; border-radius:8px; padding:10px 12px; margin-bottom:8px; font-size:14px; cursor:pointer; color:#334; }
.sjt button.on { background:#eaf1ff; border-color:#2b6cff; color:#1b4fd6; }
.selrow { margin-bottom:14px; }
.selrow label { font-weight:600; display:block; margin-bottom:6px; }
.selrow select { width:100%; padding:10px; border:1px solid #dfe3ec; border-radius:8px; font-size:14px; background:#f8fafc; }

.btn { display:block; width:100%; padding:14px; border:none; border-radius:12px; font-size:16px; font-weight:700;
  background:linear-gradient(135deg,#2b6cff,#5b8def); color:#fff; cursor:pointer; }
.btn:disabled { opacity:.5; }
.btn.ghost { background:#eef1f8; color:#4b5563; }
.fixed-bar { position: fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px;
  padding:12px 16px; background:#fff; border-top:1px solid #eef0f5; z-index:6; }

/* 报告 */
.report h2 { font-size:19px; margin:6px 0 4px; }
.report .lead { background:#f6f9ff; border-left:3px solid #2b6cff; padding:10px 12px; border-radius:8px; font-size:14px; margin:10px 0; }
.kpi-row { display:flex; gap:8px; margin:12px 0; }
.kpi { flex:1; background:#f6f9ff; border-radius:10px; padding:10px 6px; text-align:center; }
.kpi b { display:block; font-size:20px; color:#2b6cff; }
.kpi span { font-size:11px; color:#6b7280; }
.block { margin:16px 0; }
.block h4 { font-size:15px; margin:0 0 8px; display:flex; align-items:center; gap:6px; }
.block h4::before { content:""; width:4px; height:14px; background:#2b6cff; border-radius:3px; display:inline-block; }
.chip { display:inline-block; background:#eaf1ff; color:#1b4fd6; border-radius:12px; padding:3px 10px; font-size:12px; margin:3px 4px 3px 0; }
.bar { height:10px; background:#eef0f5; border-radius:6px; overflow:hidden; margin:4px 0 10px; }
.bar > i { display:block; height:100%; background:linear-gradient(90deg,#2b6cff,#5b8def); }
.barlabel { display:flex; justify-content:space-between; font-size:13px; }
.note { font-size:12px; color:#9aa3b2; }
.warn { background:#fff7e6; border:1px solid #ffe1a8; color:#9a6b00; border-radius:10px; padding:10px 12px; font-size:13px; }
.unlock { text-align:center; padding:20px; }
.unlock .lock { font-size:40px; }
.pay-box { border:1px solid #eef0f5; border-radius:14px; padding:16px; text-align:center; margin:14px 0; }
.pay-box .amt { font-size:34px; font-weight:800; color:#ff7a00; }
.pay-box .qr { width:150px; height:150px; margin:12px auto; border:1px dashed #ccc; border-radius:10px; display:flex; align-items:center; justify-content:center; color:#9aa3b2; font-size:12px; background:#fafbfc; }

/* AI 区块 */
.ai-loading { color:#6b7280; font-size:14px; padding:12px 0; }
.ai-loading::after { content:''; display:inline-block; width:14px; height:14px; border:2px solid #ddd; border-top-color:#2b6cff; border-radius:50%; animation:spin .8s linear infinite; margin-left:8px; vertical-align:middle; }
@keyframes spin { to { transform:rotate(360deg); } }
.ai-open { margin-top:12px; padding:10px 12px; background:#f0f7ff; border-radius:8px; font-size:14px; color:#1b4fd6; line-height:1.7; }
#ai-block .block, #ai-block { margin-bottom:16px; }
#ai-block h4 { margin-bottom:8px; }

/* 开放题 */
.open-q { border:1px solid #e0e7ff; border-radius:12px; padding:14px; margin:10px 0; background:#fafbff; }
.open-input { width:100%; border:1px solid #d1d5db; border-radius:8px; padding:10px; font-size:14px; font-family:inherit; resize:vertical; margin-top:8px; }

/* AI 顾问对话 */
.chat-box { max-height:320px; overflow-y:auto; padding:8px 0; }
.chat-msg { max-width:85%; padding:10px 14px; border-radius:14px; margin-bottom:8px; font-size:14px; line-height:1.6; word-break:break-word; }
.chat-msg.ai { background:#f0f4ff; color:#1f2533; border-top-left-radius:4px; }
.chat-msg.user { background:#2b6cff; color:#fff; margin-left:auto; border-top-right-radius:4px; }
.chat-msg.loading { color:#9aa3b2; font-style:italic; }
.chat-input { display:flex; gap:8px; margin-top:8px; }
.chat-input input { flex:1; border:1px solid #d1d5db; border-radius:8px; padding:10px 12px; font-size:14px; }
.chat-input .btn { white-space:nowrap; }

/* 打印 */
@media print {
  .app { box-shadow:none; max-width:100%; }
  .topbar, .fixed-bar, .pay-box, .unlock, .back, .chat-input, .chat-box { display:none !important; }
  .view { padding:0; }
  body { background:#fff; }
}
