* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f0a1a;
  color: #eae6f5;
  min-height: 100vh;
}
.app { max-width: 480px; margin: 0 auto; padding: 0 16px 40px; }
.hidden { display: none !important; }

/* Hero */
.hero { text-align: center; padding: 40px 0 20px; }
.hero-badge {
  display: inline-block; background: linear-gradient(135deg,#b8860b,#f5d58a);
  color: #1a1206; font-weight: 700; padding: 6px 16px; border-radius: 20px; font-size: 14px;
}
.hero h1 { font-size: 26px; margin: 16px 0 8px; letter-spacing: 1px; }
.hero .sub { color: #b9aed6; font-size: 14px; line-height: 1.7; }
.price-tag { margin-top: 18px; font-size: 20px; font-weight: 700; color: #f5d58a; }
.price-tag span { display: block; font-size: 12px; color: #8d84a8; font-weight: 400; margin-top: 4px; }

/* Card / form */
.card { background: #1a1328; border: 1px solid #2c2240; border-radius: 16px; padding: 20px; }
.card h2 { font-size: 18px; margin-bottom: 16px; color: #f5d58a; }
label { display: block; font-size: 13px; color: #b9aed6; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #2c2240;
  background: #120d1f; color: #eae6f5; font-size: 15px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #b8860b; }
textarea { resize: vertical; }

.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #2c2240;
  background: #120d1f; color: #b9aed6; font-size: 14px; cursor: pointer;
}
.seg button.active { background: #b8860b; border-color: #b8860b; color: #1a1206; font-weight: 700; }

.btn-primary {
  width: 100%; margin-top: 20px; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg,#b8860b,#e0b84f); color: #1a1206; font-size: 16px;
  font-weight: 700; cursor: pointer;
}
.btn-ghost {
  width: 100%; margin-top: 10px; padding: 12px; border: 1px solid #2c2240; border-radius: 12px;
  background: transparent; color: #b9aed6; font-size: 14px; cursor: pointer;
}
.tip { font-size: 11px; color: #6d6488; text-align: center; margin-top: 12px; line-height: 1.6; }

/* Chat */
.chat-head {
  position: sticky; top: 0; background: #0f0a1a; padding: 16px 0; border-bottom: 1px solid #2c2240;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-title { font-weight: 700; color: #f5d58a; font-size: 16px; }
.chat-status { font-size: 12px; color: #8d84a8; }
.chat-body { padding: 16px 0; min-height: 30vh; }
.msg { max-width: 82%; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; font-size: 15px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.msg.user { background: #b8860b; color: #1a1206; margin-left: auto; border-bottom-right-radius: 4px; }
.msg.ai { background: #1a1328; border: 1px solid #2c2240; margin-right: auto; border-bottom-left-radius: 4px; }
.msg.typing { color: #8d84a8; font-style: italic; }

/* 阶段提示 */
.phase-note { font-size: 12px; color: #8d84a8; padding: 10px 0 4px; }

/* 专家进度面板 */
.expert-panel { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 14px; }
.expert-card { background: #14101f; border: 1px solid #2c2240; border-radius: 10px; padding: 10px 12px; }
.expert-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.expert-name { font-size: 13px; color: #f5d58a; font-weight: 700; }
.expert-state { font-size: 12px; color: #8d84a8; }
.expert-state.working { color: #e0b84f; }
.expert-state.done { color: #6fbf73; }
.expert-state.fail { color: #e07a7a; }
.expert-out {
  font-size: 12px; color: #b9aed6; line-height: 1.6; max-height: 72px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
}
.expert-out:empty { display: none; }

/* 汇总卡片 */
.summary-card {
  background: linear-gradient(135deg, #1f1630, #1a1328); border: 1px solid #b8860b66;
  border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #eae6f5; line-height: 1.6;
  margin-bottom: 14px;
}
.chat-input { display: flex; gap: 8px; position: sticky; bottom: 0; background: #0f0a1a; padding: 12px 0; }
.chat-input input { flex: 1; }
.btn-send { padding: 0 20px; border: none; border-radius: 10px; background: #b8860b; color: #1a1206; font-weight: 700; cursor: pointer; }

/* ---- 报告排版美化（markdown 渲染后） ---- */
.msg.report { max-width: 94%; padding: 20px 18px; line-height: 1.85; }
.msg.report h1 { font-size: 20px; color: #f5d58a; margin: 8px 0 14px; padding-bottom: 10px; border-bottom: 1px solid #2c2240; letter-spacing: 1px; }
.msg.report h2 { font-size: 17px; color: #f5d58a; margin: 20px 0 10px; }
.msg.report h3 { font-size: 15px; color: #e0b84f; margin: 16px 0 8px; }
.msg.report h4, .msg.report h5, .msg.report h6 { font-size: 14px; color: #e0b84f; margin: 14px 0 6px; }
.msg.report p { margin: 8px 0; color: #eae6f5; }
.msg.report ul { margin: 8px 0 8px 4px; padding-left: 18px; }
.msg.report li { margin: 5px 0; color: #dcd4ef; }
.msg.report strong { color: #f5d58a; font-weight: 700; }
.msg.report em { color: #b9aed6; }
.msg.report code { background: #120d1f; padding: 1px 6px; border-radius: 4px; font-size: 13px; color: #e0b84f; }
.msg.report hr { border: none; border-top: 1px dashed #2c2240; margin: 16px 0; }
.msg.report blockquote {
  border-left: 3px solid #b8860b; padding: 8px 12px; margin: 10px 0;
  background: #14101f; border-radius: 0 8px 8px 0; color: #cdc4e6; font-style: normal;
}

/* 福利领取按钮 */
.btn-benefit {
  width: 100%; margin: 6px 0 16px; padding: 14px; border: 1px dashed #b8860b;
  border-radius: 12px; background: linear-gradient(135deg, #1f1630, #1a1328);
  color: #f5d58a; font-size: 15px; font-weight: 700; cursor: pointer;
  display: block;
}
.btn-benefit:disabled { opacity: .6; cursor: default; }

/* 福利气泡 */
.msg.benefit { border: 1px solid #b8860b55; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: #1a1328; border: 1px solid #2c2240; border-radius: 16px; padding: 28px 24px; width: 86%; max-width: 340px; text-align: center; }
.pay-qr { font-size: 56px; margin-bottom: 8px; }
.pay-amount { font-size: 30px; font-weight: 700; color: #f5d58a; margin: 8px 0; }
.pay-hint { font-size: 12px; color: #8d84a8; margin-bottom: 16px; }
