/* 心理测评产品线（persona）共享样式 —— 第155次 P4
 * 与命理线分开维护：只共用品味，不共用 DOM。
 * 兼容：微信内置浏览器，禁用 ES2020+ 语法（JS 侧），CSS 只用常规属性。
 */
[v-cloak] { display: none !important; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  padding: 16px 16px 84px;      /* 底部留给 tab 栏 */
}
.container { max-width: 720px; margin: 0 auto; }
.header { text-align: center; margin-bottom: 18px; color: #fff; }
.header h1 { font-size: 1.35em; letter-spacing: 2px; font-weight: 600; }
.header p { font-size: .82em; color: rgba(255, 255, 255, .78); margin-top: 6px; letter-spacing: 1px; }

.card {
  background: #fff; border-radius: 14px; padding: 18px;
  margin-bottom: 14px; box-shadow: 0 8px 26px rgba(0, 0, 0, .16);
}
.card h2 { font-size: 1.05em; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #667eea; }
.card p { font-size: .92em; line-height: 1.75; color: #555; }
.card p + p { margin-top: 8px; }
.muted { color: #999; font-size: .82em; line-height: 1.7; }

.btn {
  display: inline-block; width: 100%; text-align: center;
  padding: 13px 18px; border: 0; border-radius: 10px; cursor: pointer;
  font-size: 1em; color: #fff; background: linear-gradient(135deg, #667eea, #764ba2);
}
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #fff; color: #667eea; border: 1px solid #667eea; }
.btn-sm { width: auto; padding: 8px 14px; font-size: .86em; border-radius: 8px; }

.consent { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; font-size: .9em; line-height: 1.6; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }

.progress { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin: 10px 0 16px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); transition: width .2s; }

.q { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.q:last-child { border-bottom: 0; }
.q-text { font-size: .95em; line-height: 1.6; margin-bottom: 10px; }
.scale { display: flex; gap: 6px; }
.scale button {
  flex: 1; padding: 9px 0; border: 1px solid #ddd; background: #fafafa;
  border-radius: 8px; font-size: .8em; color: #666; cursor: pointer;
}
.scale button.on { background: #667eea; border-color: #667eea; color: #fff; }

.row { display: flex; gap: 10px; align-items: center; }
.row > .btn { flex: 1; }
.list-item { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.list-item:last-child { border-bottom: 0; }
.list-item .title { font-size: .95em; font-weight: 600; }
.list-item .meta { font-size: .8em; color: #999; margin-top: 4px; }
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75em; padding: 3px 8px; border-radius: 10px; background: #eef0ff; color: #667eea; }
.tag.off { background: #f4f4f4; color: #aaa; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: .85em; color: #666; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: .95em; background: #fff;
}
.field .hint { font-size: .75em; color: #aaa; margin-top: 4px; }

.report-text { white-space: pre-wrap; line-height: 1.9; font-size: .92em; color: #444; }

.pc-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: #fff; border-top: 1px solid #eee;
  padding-bottom: env(safe-area-inset-bottom);
}
.pc-bottom-nav a {
  flex: 1; text-align: center; padding: 10px 0 8px; text-decoration: none;
  font-size: .78em; color: #999;
}
.pc-bottom-nav a.on { color: #667eea; font-weight: 600; }
.pc-bottom-nav a i { display: block; font-style: normal; font-size: 1.15em; margin-bottom: 2px; }

/* 专题行（报告页） */
.topic-block { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #eee; }
.tag-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.tag-row .tag { flex: 1; }
.tag-row .btn { flex: 0 0 auto; }

/* 第156次：报告正文改为 Markdown 渲染（此前是 <pre> 显示源码） */
.report-text { white-space: normal; line-height: 1.9; font-size: .92em; color: #444; }
.report-text h1 { font-size: 1.25em; margin: 18px 0 10px; color: #1f2937; }
.report-text h2 { font-size: 1.12em; margin: 16px 0 8px; color: #1f2937; }
.report-text h3 { font-size: 1.02em; margin: 14px 0 6px; color: #374151; }
.report-text h4 { font-size: .98em; margin: 12px 0 6px; color: #374151; }
.report-text p { margin: 8px 0; }
.report-text ul, .report-text ol { margin: 8px 0 8px 20px; padding: 0; }
.report-text li { margin: 4px 0; }
.report-text blockquote {
  margin: 10px 0; padding: 8px 12px; border-left: 3px solid #c7d2fe;
  background: #f5f7ff; color: #4b5563; border-radius: 4px;
}
.report-text hr { border: 0; border-top: 1px solid #e5e7eb; margin: 16px 0; }
.report-text code {
  background: #f3f4f6; padding: 1px 4px; border-radius: 3px;
  font-size: .95em; word-break: break-all;
}
.report-text table {
  width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .9em;
  display: block; overflow-x: auto;
}
.report-text th, .report-text td {
  border: 1px solid #e5e7eb; padding: 6px 8px; text-align: left; white-space: nowrap;
}
.report-text th { background: #f9fafb; font-weight: 600; color: #374151; }

/* 第156次：页头 logo 与页脚（对齐命理线版式） */
.persona-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.persona-logo { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.persona-brand-name { font-size: 1.02em; font-weight: 600; color: #1f2937; }
.persona-brand-tagline { font-size: .78em; color: #8a94a6; margin-top: 3px; }

.persona-footer { padding: 26px 16px 84px; text-align: center; }
.persona-footer-slogan { font-size: .76em; color: #9aa3b2; letter-spacing: .04em; }
.persona-footer-copyright { font-size: .72em; color: #b3bac6; margin-top: 6px; }

/* 第156次：首页入口区（四宫格，主入口高亮） */
.entry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.entry {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 8px; border: 1px solid #e6e9f0; border-radius: 12px;
  background: #fff; color: #374151; font-size: .86em; text-decoration: none;
  cursor: pointer; font-family: inherit;
}
.entry i { font-size: 20px; font-style: normal; line-height: 1; }
.entry-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-color: transparent; }
.entry:active { transform: scale(.98); }

/* 第156次：统一页头 —— logo 与「标题 + 副标题」同一行、左对齐 */
.persona-header { display: flex; align-items: center; gap: 12px; text-align: left; }
.persona-header .persona-logo { width: 48px; height: 48px; border-radius: 10px; flex: 0 0 auto; }
.persona-header-text { min-width: 0; }
.persona-header-text h1 { margin: 0; text-align: left; }
.persona-header-text p { margin: 4px 0 0; text-align: left; }

/* 第158次：在线咨询·网页对话框（chat.html） */
.chat-card { padding: 14px 14px 12px; }
.chat-msgs {
  max-height: 62vh; min-height: 220px; overflow-y: auto;
  -webkit-overflow-scrolling: touch; padding: 4px 2px 8px;
}
.chat-msg { display: flex; margin-bottom: 10px; }
.chat-msg.bot { justify-content: flex-start; }
.chat-msg.me { justify-content: flex-end; }
.chat-body {
  max-width: 86%; padding: 9px 12px; border-radius: 12px;
  font-size: .92em; line-height: 1.75; word-break: break-word;
}
.chat-msg.bot .chat-body { background: #f3f5fb; color: #374151; border-bottom-left-radius: 4px; }
.chat-msg.me .chat-body {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap;
}
/* 气泡内的 markdown 收一收间距（PersonaMD 输出 h1..h4/p/ul/blockquote） */
.chat-body p { margin: 4px 0; }
.chat-body p:first-child { margin-top: 0; }
.chat-body p:last-child { margin-bottom: 0; }
.chat-body h1, .chat-body h2, .chat-body h3, .chat-body h4 {
  font-size: 1em; margin: 8px 0 4px; color: #1f2937;
}
.chat-body ul, .chat-body ol { margin: 4px 0 4px 18px; padding: 0; }
.chat-body blockquote {
  margin: 6px 0; padding: 6px 10px; border-left: 3px solid #c7d2fe;
  background: #fff; color: #4b5563; border-radius: 4px;
}
.chat-body table { width: 100%; border-collapse: collapse; font-size: .92em; display: block; overflow-x: auto; }
.chat-body th, .chat-body td { border: 1px solid #e5e7eb; padding: 4px 6px; }

.chat-typing { font-size: .8em; color: #8a94a6; padding: 2px 2px 8px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 2px 10px; }
.chat-quick .btn-sm { width: auto; }
.chat-quiz { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chat-quiz .btn-sm { width: auto; }

.chat-composer { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid #f0f0f0; padding-top: 10px; }
.chat-composer textarea {
  flex: 1; min-width: 0; resize: none; padding: 10px 12px; font-size: .95em;
  font-family: inherit; border: 1px solid #ddd; border-radius: 10px;
  line-height: 1.5; max-height: 120px;
}
.chat-composer .btn { width: auto; flex: 0 0 auto; padding: 10px 18px; }
