/* ============================================================
   心镜·解惑 对话版（P0）· chat.css
   ------------------------------------------------------------
   只服务新三页：首页 / 对话页 / 结论页。
   色板与字号严格照《极简首页视觉设计规范》+《对话页与结论页_界面规范 v1》：
     · 主色黛青 #2A5A6B（全页唯一强色块）
     · 文字三级 #1A1A1A / #4D4D4D / #8C8C8C；免责 #B3B3B3
     · 纯白底、标签底 #F5F7F8；留白 ≥70%；过渡 0.2s；无位移无放大
   与老站的关系：老站样式在 ui2.css / app.css，本文件不改它们、也不依赖它们。
   ============================================================ */

:root {
  --brand: #2A5A6B;
  --brand-hover: #1F4552;
  --brand-soft: #EAF0F2;
  --brand-line: #CFDDE2;
  --ink: #1A1A1A;
  --ink-2: #4D4D4D;
  --ink-3: #8C8C8C;
  --ink-4: #B3B3B3;
  --bg: #FFFFFF;
  --chip: #F5F7F8;
  --line: #EDEFF1;
  --t: .2s;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
.xjc-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.xjc-hide-scroll::-webkit-scrollbar { display: none; }

/* ---------------- 一、首页 ---------------- */
.xjc-home { flex: 1; display: flex; flex-direction: column; }
.xjc-home-inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 120px 40px 80px; text-align: center; position: relative;
}
.xjc-me {
  position: absolute; top: 24px; right: 40px;
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  color: var(--ink-3); display: flex; align-items: center; justify-content: center;
  transition: color var(--t);
}
.xjc-me:hover { color: var(--ink-2); }

.xjc-brand { font-size: 24px; font-weight: 500; color: var(--ink); letter-spacing: .5px; }
.xjc-brand-sub { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
.xjc-h1 { font-size: 36px; font-weight: 600; line-height: 1.4; color: var(--ink); margin: 48px 0 0; }
.xjc-sub { font-size: 16px; line-height: 1.6; color: var(--ink-2); margin-top: 20px; }

.xjc-ask {
  width: 560px; max-width: 100%; height: 52px; margin: 40px auto 0;
  background: var(--chip); border-radius: 8px;
  display: flex; align-items: center; gap: 10px; padding: 0 6px 0 20px;
}
.xjc-ask input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-family: var(--sans); font-size: 15px; color: var(--ink); height: 44px;
}
.xjc-ask input::placeholder { color: var(--ink-3); transition: opacity var(--t); }
.xjc-ask .go {
  width: 150px; height: 40px; flex: 0 0 auto; border: 0; cursor: pointer;
  border-radius: 6px; background: var(--brand); color: #fff;
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  transition: background var(--t);
}
.xjc-ask .go:hover { background: var(--brand-hover); }

.xjc-hint { font-size: 13px; color: var(--ink-3); margin: 22px 0 0; }
.xjc-tags-feat { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.xjc-tag-feat {
  background: #fff; border: 1px solid var(--brand-line); color: #37606F;
  border-radius: 6px; padding: 9px 20px; font-size: 14px; cursor: pointer;
  font-family: var(--sans); transition: var(--t);
}
.xjc-tag-feat:hover { border-color: var(--brand); color: var(--brand); }

.xjc-tags { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.xjc-tag { background: var(--chip); border-radius: 6px; padding: 8px 16px; font-size: 14px; color: var(--ink-2); }
.xjc-guide {
  display: inline-block; margin-top: 32px; font-size: 14px; color: var(--ink-3);
  text-decoration: underline; background: none; border: 0; cursor: pointer; font-family: var(--sans);
}
.xjc-disclaim { font-size: 12px; line-height: 1.5; color: var(--ink-4); }
.xjc-home .xjc-disclaim { margin-top: 34px; }

/* ---------------- 二、对话页 ---------------- */
.xjc-chat { height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.xjc-chat-top {
  height: 48px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff;
}
.xjc-ico-btn {
  width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
  color: var(--ink-3); display: flex; align-items: center; justify-content: center; transition: color var(--t);
}
.xjc-ico-btn:hover { color: var(--ink-2); }
.xjc-sos {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #F7F9FA; border-bottom: 1px solid var(--line);
  padding: 10px 16px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); cursor: pointer;
}
.xjc-body {
  flex: 1; overflow-y: auto; padding: 18px 16px 8px;
  display: flex; flex-direction: column; gap: 12px;
}
.xjc-body::-webkit-scrollbar { display: none; }
.xjc-msg { display: flex; gap: 8px; }
.xjc-msg.me { justify-content: flex-end; }
.xjc-bubble {
  max-width: 78%; padding: 10px 14px; font-size: 16px; line-height: 1.75;
  background: var(--brand-soft); color: var(--ink);
  border-radius: 14px 14px 4px 14px; white-space: pre-wrap; word-break: break-word;
}
.xjc-avatar {
  flex: 0 0 auto; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11px; display: flex; align-items: center; justify-content: center; user-select: none;
}
.xjc-say {
  max-width: 86%; font-size: 16px; line-height: 1.75; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.xjc-cursor {
  display: inline-block; width: 2px; height: 15px; margin-left: 2px;
  background: var(--brand); vertical-align: -2px; animation: xjc-blink 1s infinite;
}
@keyframes xjc-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.xjc-typing { display: inline-flex; gap: 4px; align-items: center; height: 16px; }
.xjc-typing i { width: 5px; height: 5px; border-radius: 50%; background: #B9C6CC; animation: xjc-tp 1.2s infinite; }
.xjc-typing i:nth-child(2) { animation-delay: .2s; }
.xjc-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes xjc-tp { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.xjc-day { text-align: center; font-size: 12px; color: var(--ink-4); margin: 8px 0; }
.xjc-retry {
  display: inline-block; margin-top: 2px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--brand); background: #fff; color: var(--brand);
  font-size: 14px; font-family: var(--sans); cursor: pointer; transition: var(--t);
}
.xjc-retry:hover { background: var(--brand-soft); }
.xjc-guest { text-align: center; font-size: 12.5px; color: var(--ink-3); padding: 10px 0 4px; }
.xjc-guest a { color: var(--brand); text-decoration: none; cursor: pointer; }

.xjc-input { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 10px 16px 14px; background: #fff; }
.xjc-input .xjc-disclaim { text-align: center; margin-bottom: 8px; }
.xjc-inputbar { display: flex; gap: 8px; align-items: center; }
.xjc-inputbar input {
  flex: 1; min-width: 0; height: 44px; border: 0; outline: none; border-radius: 22px;
  background: var(--chip); padding: 0 16px; font-family: var(--sans); font-size: 15px; color: var(--ink);
}
.xjc-inputbar input::placeholder { color: var(--ink-3); }
.xjc-send {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: var(--t);
}
.xjc-send:hover { background: var(--brand-hover); }
.xjc-send.off { background: #fff; border: 1px solid var(--brand-line); color: #B9C6CC; }

/* ---------------- 三、结论页 ---------------- */
.xjc-result { max-width: 480px; margin: 0 auto; padding: 8px 16px 32px; }
.xjc-r-title { font-size: 28px; font-weight: 600; line-height: 1.35; color: var(--ink); text-align: center; margin: 14px 0 8px; }
.xjc-r-sub { font-size: 17px; line-height: 1.65; color: var(--ink-2); text-align: center; padding: 0 6px; }
.xjc-block { background: var(--chip); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.xjc-block .lbl { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.xjc-dotline { display: flex; gap: 9px; align-items: flex-start; font-size: 15px; line-height: 1.7; color: var(--ink); margin-bottom: 8px; }
.xjc-dotline:last-child { margin-bottom: 0; }
.xjc-dotline i { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-top: 8px; }
.xjc-para { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.xjc-share { border: 1px solid var(--line); border-radius: 12px; padding: 22px 16px; text-align: center; margin: 16px 0; }
.xjc-share .t { font-size: 20px; font-weight: 600; color: var(--ink); }
.xjc-share .q { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin-top: 10px; }
.xjc-share .b { font-size: 12px; color: var(--ink-3); margin-top: 16px; letter-spacing: 1px; }
.xjc-btn-main {
  width: 100%; height: 52px; margin-top: 18px; border: 0; cursor: pointer;
  border-radius: 8px; background: var(--brand); color: #fff;
  font-family: var(--sans); font-size: 18px; font-weight: 500; transition: var(--t);
}
.xjc-btn-main:hover { background: var(--brand-hover); }
.xjc-btn-note { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); text-align: center; margin-top: 10px; }
.xjc-result .xjc-disclaim { text-align: center; margin-top: 20px; }

/* 页脚链接 + 行内链接 */
.xjc-footlinks { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.xjc-footlinks a { color: var(--ink-3); text-decoration: none; cursor: pointer; margin: 0 6px; }
.xjc-footlinks a:hover { color: var(--brand); }
.xjc-inline-link { color: var(--brand); text-decoration: underline; cursor: pointer; font-size: 14px; }
.xjc-msg .xjc-say, .xjc-msg .xjc-bubble { word-break: break-word; }

/* ---------------- 小屏 ---------------- */
@media (max-width: 768px) {
  .xjc-home-inner { padding: 80px 6% 60px; }
  .xjc-me { top: 16px; right: 16px; }
  .xjc-brand { font-size: 18px; }
  .xjc-h1 { font-size: 28px; margin-top: 40px; }
  .xjc-sub { font-size: 14px; }
  .xjc-ask { width: 100%; }
  .xjc-ask .go { width: 96px; font-size: 15px; }
  .xjc-tag-feat { padding: 8px 14px; font-size: 13px; }
  .xjc-tags { gap: 10px; }
  .xjc-tag { font-size: 13px; padding: 7px 12px; }
  .xjc-r-title { font-size: 24px; }
}
