/* ============ 自然法则 · 天空能量 ============ */
:root {
  --sky-deep: #0C7CD5;
  --sky-blue: #38BDF8;
  --sky-light: #BAE6FD;
  --sky-pale: #F0F9FF;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #64748B;
  --ink-dim: #94A3B8;
  --card: #FFFFFF;
  --card-border: #E8F1FA;
  --accent: #0EA5E9;
  --accent-deep: #0369A1;
  --indigo: #4F46E5;
  --surface: #F5FAFF;          /* 内嵌块统一淡蓝底 */
  --surface-border: #E4EFFA;   /* 内嵌块统一细边框 */
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 6px 24px rgba(14,116,214,0.07), 0 2px 6px rgba(2,60,120,0.04);
  --shadow-lg: 0 14px 40px rgba(14,116,214,0.12), 0 4px 14px rgba(2,60,120,0.06);
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--sky-pale);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

.app { max-width: 480px; margin: 0 auto; position: relative; min-height: 100vh; }

/* ============ 屏容器 ============ */
.screen {
  display: none;
  min-height: 100vh;
  padding: 0 18px 92px;
  position: relative;
  animation: screenIn .45s ease;
}
.screen.active { display: block; }
@keyframes screenIn { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: none; } }

/* ============ 屏1 AI 助手首页 ============ */
.ai-home {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #E8F4FE 0%, #F5FAFF 55%, #F8FBFF 100%);
  padding: 0 20px 92px;
}
.ai-home-head {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 10px;
  padding: 18px 4px 0;
}
.ai-home-menu { font-size: 20px; color: var(--ink-3); line-height: 1; width: 22px; text-align: center; flex: none; cursor: pointer; }
/* 仅对话屏返回键放大（不波及首页☰）；纯 flex 居中、不偏移，与标题中线对齐 */
.chat-back {
  font-size: 30px; font-weight: 700; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--ink); margin: 0;
  position: relative; top: -2px;
}
.chat-back:active { background: rgba(0,0,0,.05); }
.chat-new-btn {
  flex: none; font-size: 14px; font-weight: 700; line-height: 1;
  color: #0EA5E9; background: #E0F2FE; border: 1px solid #BAE6FD;
  border-radius: 999px; padding: 9px 14px; cursor: pointer; white-space: nowrap;
}
.chat-new-btn:active { transform: scale(.96); background: #BAE6FD; }
.ai-home-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .04em; }
.ai-home-head-sp { display: none; }
.ai-home-main {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-bottom: 40px;
}
.ai-home-greet {
  font-size: 34px; font-weight: 800; color: var(--ink);
  letter-spacing: .02em; line-height: 1.3;
}
.ai-home-greet span { color: var(--accent-deep); }
.ai-home-sub {
  margin-top: 12px; font-size: 15px; color: var(--ink-3);
  letter-spacing: .08em;
}
.ai-home-cta {
  margin-top: 40px; padding: 15px 56px;
  border: none; border-radius: 999px;
  font-size: 17px; font-weight: 800; letter-spacing: .1em;
  color: #fff; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #0EA5E9 0%, #4F8DF7 100%);
  box-shadow: 0 8px 22px rgba(14,165,233,0.32), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all .2s;
}
.ai-home-cta:active { transform: scale(.96); box-shadow: 0 4px 12px rgba(14,165,233,0.28); }
.ai-home .disclaimer { color: var(--ink-dim); text-shadow: none; }

/* 首页·最近对话 */
.home-chats { width: 100%; max-width: 420px; margin: 26px auto 0; padding: 0 6px; }
.home-chats-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.home-chats-title { font-size: 14px; font-weight: 800; color: var(--ink-3); letter-spacing: .06em; }
.home-chats-more { font-size: 13px; color: var(--accent); cursor: pointer; }
.home-chats-list { display: flex; flex-direction: column; gap: 9px; }
.home-chat-item {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 14px; padding: 12px 14px;
  cursor: pointer; transition: all .15s;
  box-shadow: 0 2px 8px rgba(14,165,233,0.06);
}
.home-chat-item:active { transform: scale(.98); background: #fff; }
.home-chat-ico { font-size: 17px; flex: none; width: 22px; text-align: center; }
.home-chat-main { flex: 1; min-width: 0; }
.home-chat-title {
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-chat-time { font-size: 11.5px; color: var(--ink-dim); margin-top: 2px; }
.home-chat-empty { font-size: 13px; color: var(--ink-dim); text-align: center; padding: 14px 0; }

/* 底部悬浮输入框（吸在导航栏上方，对话式胶囊条） */
.home-input-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(64px + env(safe-area-inset-bottom));
  width: calc(100% - 36px); max-width: 444px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(14,165,233,0.28);
  border-radius: 999px;
  padding: 11px 14px;
  box-shadow: 0 10px 30px rgba(14,165,233,0.18);
  z-index: 40; cursor: pointer;
  transition: all .2s;
}
.home-input-bar:active { transform: translateX(-50%) scale(.985); }
.home-input-ph {
  flex: 1; font-size: 15px; color: var(--ink);
  font-family: inherit; border: none; background: transparent; outline: none;
  padding: 0; min-width: 0;
}
.home-input-ph::placeholder { color: var(--ink-3); }
.home-input-send {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0EA5E9 0%, #4F8DF7 100%);
  color: #fff; font-size: 16px; font-family: inherit;
  box-shadow: 0 4px 12px rgba(14,165,233,0.32);
}
/* 悬浮输入框默认显示；非首页由 JS 加 .hidden 隐藏 */
#homeInputBar { display: flex; }
#homeInputBar.hidden { display: none; }

/* ============ 屏1.2 AI 对话页（平台总入口·小星） ============ */
#screenChat {
  display: none;
  flex-direction: column;
  height: 100vh; min-height: 100vh;
  padding: 0;
  background: linear-gradient(180deg, #E8F4FE 0%, #F5FAFF 40%, #F8FBFF 100%);
}
#screenChat.active { display: flex; }
.chat-head {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding: 18px 16px 12px; flex: none;
}
.chat-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .04em; }
.chat-head-sp { flex: 1; }
.chat-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 16px 16px;
}
.chat-welcome { text-align: center; padding: 40px 16px 24px; }
.chat-welcome-avatar {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  background: linear-gradient(135deg, #0EA5E9 0%, #4F8DF7 100%);
  box-shadow: 0 8px 20px rgba(14,165,233,0.3);
}
.chat-welcome p { font-size: 15px; color: var(--ink); font-weight: 600; line-height: 1.6; }
.chat-welcome-sub { font-size: 13px !important; color: var(--ink-3) !important; font-weight: 400 !important; margin-top: 8px; }
.chat-history-tip { text-align: center; font-size: 12px; color: var(--ink-3); padding: 14px 0 4px; }
.chat-bubble { display: flex; margin-bottom: 14px; }
.bubble-user { justify-content: flex-end; }
.bubble-ai { justify-content: flex-start; }
.chat-bubble-inner {
  max-width: 78%; padding: 12px 14px; border-radius: 16px;
  font-size: 15px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
  font-family: inherit;
}
.bubble-user .chat-bubble-inner {
  background: linear-gradient(135deg, #0EA5E9 0%, #4F8DF7 100%);
  color: #fff; border-bottom-right-radius: 4px;
}
.bubble-ai .chat-bubble-inner {
  background: #fff; color: var(--ink);
  border: 1px solid #E4EFFA; border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(14,165,233,0.08);
}
.chat-loading { display: flex; gap: 5px; align-items: center; padding: 14px 16px; }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .5; animation: chatBlink 1.2s infinite; }
.chat-dot:nth-child(2) { animation-delay: .2s; }
.chat-dot:nth-child(3) { animation-delay: .4s; }
@keyframes chatBlink { 0%,100% { opacity:.3; transform: translateY(0); } 50% { opacity:1; transform: translateY(-3px); } }
.chat-input-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(72px + env(safe-area-inset-bottom));
  width: calc(100% - 36px); max-width: 444px;
  flex: none; display: flex; align-items: flex-end; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148,163,184,0.2); border-radius: 18px;
  box-shadow: 0 8px 24px rgba(14,165,233,0.14);
  z-index: 41;
}
/* 对话屏底部给输入条+tabbar 留位，避免最后一条消息被遮挡 */
#screenChat .chat-body { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
.chat-input {
  flex: 1; resize: none; border: 1.5px solid #E4EFFA; border-radius: 18px;
  background: #F8FAFC; padding: 11px 14px; font-size: 15px; font-family: inherit;
  color: var(--ink); outline: none; line-height: 1.5; max-height: 120px;
  transition: all .2s;
}
.chat-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }
.chat-send {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0EA5E9 0%, #4F8DF7 100%);
  color: #fff; font-size: 17px; font-family: inherit;
  box-shadow: 0 4px 12px rgba(14,165,233,0.32);
}
.chat-send:disabled { opacity: .5; }
.chat-send:active { transform: scale(.95); }

/* 案例页顶部输入卡 */
.case-form { margin-top: 18px; }
.case-form-title {
  font-size: 17px; font-weight: 800; color: var(--ink);
  margin-bottom: 14px; letter-spacing: .06em;
  display: none;
}
.case-form-title::before {
  content:""; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--indigo));
}
#caseListArea { margin-top: 2px; }
.form-row { display: flex; gap: 10px; margin-bottom: 12px; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .04em; }
.form-group input, .form-group select {
  background: #F8FAFC;
  border: 1.5px solid #E4EFFA;
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 12px;
  font-size: 15px;
  outline: none;
  transition: all .2s;
  font-family: inherit;
  width: 100%;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.18);
  background: #fff;
}
.form-group select { appearance:none; cursor:pointer; padding-right: 30px; }

.btn-cta {
  width: 100%; margin-top: 6px;
  padding: 16px;
  border: none; border-radius: var(--radius-sm);
  font-size: 17px; font-weight: 800; letter-spacing: .1em;
  color: #fff; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #0EA5E9 0%, #4F8DF7 55%, #6366F1 100%);
  box-shadow: 0 8px 22px rgba(14,165,233,0.32), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all .2s;
}
.btn-cta:active { transform: scale(.97); box-shadow: 0 4px 12px rgba(14,165,233,0.28); }
.btn-cta:disabled { opacity:.55; transform:none; }
.input-hint { text-align:center; font-size:11px; color: var(--ink-dim); margin-top:12px; }

/* 结果页账户引导条 */
.save-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 14px 16px; margin: 4px 0 14px;
  box-shadow: 0 4px 16px rgba(251,146,60,0.08);
}
.save-bar-txt { font-size: 13px; color: #9a3412; line-height: 1.4; flex: 1; }
.save-bar-btn {
  flex: 0 0 auto; white-space: nowrap;
  padding: 10px 16px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all .2s;
}
.save-bar-btn:active { transform: scale(.96); }


.disclaimer { text-align:center; font-size:11px; color: rgba(255,255,255,0.75); margin-top: 18px; text-shadow: 0 1px 6px rgba(2,60,120,0.25); }

/* ============ 屏2 结果 ============ */
#screenResult { background: linear-gradient(180deg, #E0F2FE 0%, #F5FAFF 26%, #F8FAFD 100%); }
.result-head { padding: 34px 0 20px; text-align: center; }
.result-head h2 {
  font-size: 32px; font-weight: 800; letter-spacing: .12em;
  background: linear-gradient(135deg, var(--accent-deep), #4F8DF7);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.result-head p { font-size: 13px; color: var(--ink-3); margin-top: 6px; letter-spacing: .08em; }
.ai-flag { margin: 12px auto 0; max-width: 340px; font-size: 11px; line-height: 1.6; color: var(--accent-deep); background: var(--surface); border: 1px solid var(--surface-border); border-radius: 10px; padding: 6px 12px; }

/* 真人大师版卡片 */
.master-card {
  position: relative;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffbf5 0%, #ffffff 100%);
  box-shadow: 0 4px 18px rgba(234, 140, 46, .08);
  padding: 0;
  overflow: hidden;
}
.master-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #ea8c2e, #f5b56c);
}
.master-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #fdeed4;
}
.master-label {
  font-size: 16px;
  font-weight: 700;
  color: #7a4a1a;
  letter-spacing: .02em;
}
.master-meta {
  font-size: 11px;
  color: #c48b4a;
  background: #fff5e6;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}
.master-tip {
  font-size: 12px;
  line-height: 1.7;
  color: #a36d38;
  background: #fff8ef;
  padding: 10px 16px;
  margin: 0;
  border-bottom: 1px dashed #f3dec1;
}
.master-body {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
  padding: 14px 16px 0;
}
.master-body p { margin: 0 0 10px; }
.master-body p:last-child { margin-bottom: 0; }
.pillar-line {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #7a3b00;
  background: #fff5e6;
  border: 1px solid #f3d9b0;
  border-left: 4px solid #ea8c2e;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
}
.ai-pillar { margin: 0 0 10px; }
.master-body.collapsed { max-height: 160px; overflow: hidden; position: relative; }
.master-body.collapsed::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
}
.master-toggle {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px 16px;
  padding: 10px 0;
  border: 1px solid #f0d0a8;
  border-radius: 22px;
  background: #fff8ef;
  color: #a36d38;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
}
.master-toggle:hover { background: #fff0dc; }
.master-toggle:active { transform: scale(.98); }

.card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 14px; display:flex; align-items:center; gap:8px; }
.card-title .icon { font-size:18px; }

/* AI 解读 */
.ai-loading { display:flex; flex-direction:column; align-items:center; gap:12px; padding: 18px 0 6px; color: var(--ink-3); font-size: 13px; }
.ai-loading.hide { display:none; }
.ai-pulse {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(14,165,233,0.85));
  animation: aiPulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(14,165,233,0.35);
}
@keyframes aiPulse {
  0% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(14,165,233,0.35); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 18px rgba(14,165,233,0); }
  100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(14,165,233,0); }
}
.ai-overview { font-size: 14.5px; color: var(--ink-2); line-height: 1.9; white-space: pre-wrap; }
.ai-overview .ov-badge {
  display:inline-block; font-size:11px; font-weight:700; color:var(--accent-deep);
  background: rgba(14,165,233,0.12); border-radius:20px; padding:3px 12px; margin-bottom:10px;
  letter-spacing:.06em;
}
.ai-notice { margin-top: 12px; font-size: 12px; color: var(--ink-dim); background: rgba(148,163,184,0.12); border-radius: 10px; padding: 10px 12px; display: none; }
.ai-notice.show { display: block; }

/* 时间线（重要时间节点） */
.timeline-list { position: relative; padding-left: 22px; }
.timeline-list::before { content:""; position:absolute; left:6px; top:6px; bottom:6px; width:2px; background: linear-gradient(180deg, #38BDF8, rgba(56,189,248,0.1)); border-radius:1px; }
.tl-item { position: relative; margin-bottom: 16px; }
.tl-item:last-child { margin-bottom: 2px; }
.tl-node { position:absolute; left:-21px; top:6px; width:11px; height:11px; border-radius:50%; background:#38BDF8; border:2.5px solid #fff; box-shadow: 0 0 0 3px rgba(56,189,248,0.25); }
.tl-head { font-size: 13px; color: var(--ink); font-weight:700; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.tl-tag { font-size:10px; font-weight:700; padding:2px 8px; border-radius:10px; background: rgba(14,165,233,0.14); color:var(--accent-deep); }
.tl-content { font-size: 13.5px; color: var(--ink-2); line-height:1.7; margin-top:4px; }

/* 七大领域 */
.domain-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.domain-item { background: var(--surface); border:1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 14px; }
.d-head { font-size: 13px; font-weight:700; color: var(--ink); margin-bottom:6px; display:flex; align-items:center; gap:6px; }
.d-icon { font-size:15px; }
.d-body { font-size: 12.5px; color: var(--ink-2); line-height:1.65; }

/* 大运 */
.dayun-line { font-size: 11.5px; color: var(--ink-3); background: var(--surface); border:1px solid var(--surface-border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.7; word-break: break-all; }

/* 四柱 */
.bazi-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:8px; text-align:center; margin-bottom:14px; }
.bazi-pillar { background: linear-gradient(180deg, #FFFFFF 0%, #F5FAFF 100%); border:1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 12px 4px; }
.bazi-pillar .label { font-size:11px; color: var(--ink-dim); margin-bottom:5px; }
.bazi-pillar .gan { font-size:30px; font-weight:800; line-height:1.15; color: var(--accent-deep); }
.bazi-pillar .zhi { font-size:30px; font-weight:800; line-height:1.15; margin-top:2px; color: var(--indigo); }

.info-row { display:flex; gap:8px; margin-bottom:14px; }
.info-tag { flex:1; background: var(--surface); border:1px solid var(--surface-border); border-radius:12px; padding:9px 4px; text-align:center; font-size:12px; font-weight:600; }
.info-tag .tag-label { color: var(--ink-dim); font-size:10px; margin-bottom:2px; font-weight:500; }
.info-tag .tag-val { color: var(--ink); font-size:13px; }

.fe-bar { display:flex; gap:8px; align-items:flex-end; height:72px; margin-bottom:8px; }
.fe-item { flex:1; border-radius:8px 8px 0 0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; padding-bottom:4px; font-size:11px; font-weight:700; color:rgba(255,255,255,0.92); transition:height .8s cubic-bezier(.4,0,.2,1); }
.fe-item .pct { font-size:10px; opacity:.85; }
.fe-legend { font-size:12px; color: var(--ink-dim); text-align:center; }

/* 雷达 */
.radar-wrap { position:relative; height: 360px; margin: 0 auto; }
.radar-wrap canvas { width:100% !important; height:100% !important; }

/* 维度 */
.talent-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.talent-item { background: var(--surface); border:1px solid var(--surface-border); border-radius: var(--radius-sm); padding:14px 12px; text-align:center; }
.talent-item .t-name { font-size:13px; color: var(--ink-3); margin-bottom:6px; font-weight:600; }
.talent-item .t-score { font-size:28px; font-weight:800; line-height:1.1; min-height:32px; }
.talent-item .t-bar-wrap { height:4px; background:#E8F1FA; border-radius:2px; margin-top:8px; overflow:hidden; }
.talent-item .t-bar { height:100%; border-radius:2px; transition:width 1.2s cubic-bezier(.4,0,.2,1); }
.talent-item .t-desc { font-size:11px; color: var(--ink-dim); margin-top:6px; line-height:1.5; }

/* 名字 */
.name-source { font-size:11px; color: var(--ink-dim); margin-bottom:10px; }
.name-list { display:flex; flex-direction:column; gap:10px; }
.name-card { background: var(--surface); border:1.5px solid var(--surface-border); border-radius: var(--radius-sm); padding:15px 16px; display:flex; align-items:center; gap:14px; transition:all .2s; }
.name-card:active { border-color: var(--accent); background: #E0F2FE; }
.name-card .nc-main { font-size:24px; font-weight:800; letter-spacing:.08em; min-width:64px; text-align:center; color: var(--ink); }
.name-card .nc-info { flex:1; }
.name-card .nc-meaning { font-size:13px; color: var(--ink-2); line-height:1.5; }
.name-card .nc-reason { font-size:11px; color: var(--ink-dim); margin-top:4px; line-height:1.5; }
.name-card .nc-badge { font-size:11px; font-weight:700; padding:3px 10px; border-radius:12px; flex-shrink:0; }
.badge-best { background: #FEF3C7; color:#D97706; }

/* ============ 屏3 我的（H5 设置页风格） ============ */
#screenMe { background: linear-gradient(180deg, #E8F4FE 0%, #F2F7FC 40%, #F5F8FC 100%); padding-top: 24px; }

/* 顶部账户卡 */
.me-header {
  background: #fff; border-radius: 22px 22px 22px 22px;
  padding: 18px 18px; margin: 0 0 12px;
  box-shadow: var(--shadow);
  text-align: left;
}
.me-logout-txt {
  border:none; background:none; font-size: 13px; color: var(--ink-dim); font-weight: 600;
  cursor: pointer; font-family: inherit; padding: 4px 6px;
}
.me-logout-txt:active { color: var(--accent); }
.me-user { display: flex; align-items: center; gap: 14px; }
.me-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display:flex; align-items:center; justify-content:center; font-size: 24px;
  background: #F1F5F9; border: 1px solid #E2E8F0;
  overflow: hidden; /* 裁切内部 SVG/图片为圆形，避免露出蓝色渐变底 */
}
.me-avatar svg { width: 100%; height: 100%; display: block; }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-avatar.logged {
  background: linear-gradient(135deg, #0EA5E9, #4F8DF7); color:#fff; font-size: 22px;
  box-shadow: 0 4px 12px rgba(14,165,233,0.28);
}
.me-user-info { flex: 1; min-width: 0; }
.me-title { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing:.02em; }
.me-title b { font-weight: 800; }
.me-role {
  font-size: 11px; font-weight: 700; color:#fff; background: linear-gradient(135deg,#0EA5E9,#6366F1);
  padding: 2px 8px; border-radius: 10px; margin-left: 6px; vertical-align: middle;
}
.me-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; letter-spacing:.02em; }

/* 登录表单 */
.me-form { display:flex; flex-direction:column; gap:10px; margin: 16px 0 12px; text-align: left; }
.me-form input {
  width: 100%; padding: 13px 14px; border: 1px solid #E2E8F0; border-radius: var(--radius-sm);
  background: #F8FAFC; font-size: 15px; color: var(--ink); font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.me-form input:focus { outline:none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
.me-form input::placeholder { color: var(--ink-dim); }
.me-link {
  display:block; width: 100%; margin-top: 12px;
  border: 1.5px solid rgba(14,165,233,0.4);
  background: rgba(14,165,233,0.05);
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 15px; color: var(--accent-deep); font-weight: 700;
  font-family: inherit; text-align: center; cursor: pointer;
  transition: all .2s;
}
.me-link:active { transform: scale(.97); background: rgba(14,165,233,0.1); }
.me-msg { font-size: 12.5px; color: #DC2626; margin-top: 10px; text-align:center; min-height: 0; }
.me-msg:empty { margin-top: 0; }

/* 通用白色卡片 */
.me-card {
  background: #fff; border-radius: var(--radius-sm);
  margin: 0 0 12px; padding: 14px 0;
  box-shadow: var(--shadow);
}
.me-card-title {
  font-size: 13px; font-weight: 700; color: var(--ink-3);
  padding: 0 16px 10px; letter-spacing:.02em;
}

/* 设置列表 */
.me-list { display:flex; flex-direction:column; }
.me-row {
  display:flex; align-items:center; padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9; cursor: pointer;
}
.me-row:last-child { border-bottom: none; }
.me-row:active { background: #F8FAFC; }
.me-row-l { font-size: 15px; color: var(--ink); font-weight: 600; flex-shrink:0; }
.me-row-r {
  flex:1; min-width:0; text-align: right;
  font-size: 14px; color: var(--ink-3);
  margin: 0 6px 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.me-arrow { font-size: 18px; color: #CBD5E1; flex-shrink:0; }

/* 命书列表 */
.books-list { display:flex; flex-direction:column; gap:8px; padding: 0 16px; }

/* 推广员中心 */
.promo-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.promo-line { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; word-break: break-all; }
.promo-line b { color: var(--ink); font-weight: 700; }
.promo-link { color: #0369A1; font-size: 12.5px; }
.promo-earn { color: #E8590C; font-weight: 800; font-size: 15px; }
.promo-sub { font-size: 11px; color: var(--ink-dim); }
.promo-tip { font-size: 11.5px; color: var(--ink-dim); line-height: 1.6; margin-top: 2px; }
/* 推广活动横幅：疯狂薅羊毛（红金渐变，限时强调） */
.promo-activity {
  margin: 2px 14px 12px;
  padding: 11px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 13.5px; font-weight: 700; line-height: 1.6;
  color: #fff;
  background: linear-gradient(135deg, #FF512F 0%, #F09819 55%, #FFD200 130%);
  box-shadow: 0 4px 14px rgba(240, 100, 20, 0.35);
  letter-spacing: .03em;
}
.promo-activity b { font-size: 20px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
/* 站内通知红点：客户提交成功 → 推广卡亮起 */
.promo-dot {
  display: inline-block; margin-left: 6px;
  font-size: 11px; font-weight: 800; color: #fff;
  background: #E11D48; border-radius: 10px; padding: 2px 8px;
  vertical-align: middle; animation: dotPulse 1.6s ease infinite;
}
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.book-item {
  display:flex; align-items:center; gap:12px; padding: 13px 14px;
  background: #F8FAFC; border: 1px solid #F1F5F9; border-radius: var(--radius-sm);
}
.book-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.book-info b { font-size: 14.5px; color: var(--ink); font-weight: 700; }
.book-time { font-size: 11.5px; color: var(--ink-dim); }
.book-del {
  flex-shrink:0; border: 1px solid rgba(220,38,38,0.18); background: #fff;
  color: #DC2626; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 18px; cursor:pointer; font-family:inherit;
}
.book-del:active { background: rgba(220,38,38,0.06); }

/* 大师案例展示样式已随 C 端渲染代码于 v2026082901 移除（master.html 用自身内联样式） */

/* 底部退出按钮 */
.me-logout-bottom {
  width: 100%; padding: 14px; margin: 4px 0 12px;
  border: none; border-radius: var(--radius-sm); background: #fff;
  color: #DC2626; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: var(--shadow);
}
.me-logout-bottom:active { background: #FFF1F2; }

/* Footer */
.footer { text-align:center; padding: 28px 0 16px; font-size:12px; color: var(--ink-dim); letter-spacing:.05em; line-height:1.9; }
.footer .divider { width:40px; height:2px; border-radius:1px; background: linear-gradient(90deg, transparent, #38BDF8 30%, #6366F1 70%, transparent); margin:0 auto 12px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(148,163,184,0.2);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.tab { flex:1; background:none; border:none; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 0; color: var(--ink-dim); font-family:inherit; }
.tab .tab-icon { font-size:20px; line-height:1; }
.tab .tab-label { font-size:11px; font-weight:600; }
.tab.active { color: var(--accent); font-weight: 800; }
.tab.active .tab-icon { transform: translateY(-1px); filter: drop-shadow(0 1px 2px rgba(14,165,233,0.45)); }
/* 登录后「我的」TAB 加亮（未登录保持灰暗） */
.tab.logged { color: var(--accent); }
.tab.logged .tab-icon { filter: drop-shadow(0 1px 3px rgba(14,165,233,0.5)); }
.tab.logged .tab-label { font-weight: 700; color: var(--accent-deep); }

/* Toast */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(15,23,42,0.92); color:#fff; padding: 11px 22px; border-radius: 14px;
  font-size: 14px; font-weight:600; z-index: 1000; opacity:0; transition:opacity .3s; pointer-events:none;
  max-width: 84vw; text-align:center;
}
.toast.show { opacity:1; }

/* ============ 分享 ============ */
.btn-share {
  width: 100%; margin-top: 14px;
  padding: 13px; border-radius: var(--radius-sm);
  border: 1.5px solid rgba(14,165,233,0.35);
  background: rgba(255,255,255,0.55);
  color: var(--accent-deep); cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .2s;
}
.btn-share:active { transform: scale(.98); background: rgba(255,255,255,0.8); }
.share-ico { font-size: 15px; }

.share-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(15,23,42,0.4);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.share-mask.show { opacity: 1; pointer-events: auto; }
.share-sheet {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -8px 32px rgba(2,60,120,0.18);
}
.share-mask.show .share-sheet { transform: translateY(0); }
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.share-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .04em; }
.share-close { background: none; border: none; font-size: 20px; color: var(--ink-dim); cursor: pointer; line-height: 1; padding: 4px; }
.share-tip { font-size: 13px; color: var(--ink-3); line-height: 1.7; margin-bottom: 16px; }
.share-link { display: flex; gap: 8px; margin-bottom: 14px; }
.share-link input {
  flex: 1; min-width: 0; padding: 11px 12px; font-size: 13px;
  border: 1.5px solid rgba(148,163,184,0.35); border-radius: 12px;
  background: #F1F5F9; color: var(--ink-2); outline: none; font-family: inherit;
}
.share-copy {
  flex-shrink: 0; padding: 0 18px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #0EA5E9, #6366F1); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.share-copy:active { transform: scale(.96); }
.btn-share-native {
  width: 100%; padding: 14px; border: none; border-radius: 14px;
  background: var(--surface); color: var(--accent-deep);
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-share-native:active { background: #E0F2FE; }

/* ============ 起名收费解锁弹层 ============ */
.unlock-mask {
  position: fixed; inset: 0; z-index: 940;
  background: rgba(15,23,42,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.unlock-mask.show { opacity: 1; pointer-events: auto; }
.unlock-sheet {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
}
.unlock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.unlock-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.unlock-close { width: 30px; height: 30px; border: none; background: #F1F5F9; border-radius: 50%; font-size: 15px; color: #64748B; cursor: pointer; }
.unlock-price { font-size: 34px; font-weight: 800; color: #E11D48; margin: 8px 0 4px; }
.unlock-desc { font-size: 13px; color: var(--ink-3); line-height: 1.6; margin: 0 0 14px; }
.unlock-ways { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.unlock-way { font-size: 13px; color: var(--ink-2); line-height: 1.6; background: #F8FAFC; border-radius: 10px; padding: 12px 14px; }
.unlock-way b { color: #0369A1; }
.unlock-way input { width: 100%; margin-top: 8px; padding: 9px 12px; border: 1.5px solid #E4EFFA; border-radius: 9px; font-size: 14px; font-family: inherit; outline: none; }
.unlock-way input:focus { border-color: #0EA5E9; }
.unlock-btn { width: 100%; padding: 13px; border: none; border-radius: 12px; background: linear-gradient(135deg, #0EA5E9, #4F8DF7); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.unlock-btn:active { transform: scale(.98); }
.unlock-pay { background: linear-gradient(135deg, #07C160, #06AD56); font-size: 16px; padding: 14px; margin-bottom: 4px; } /* 微信绿，主按钮 */
.unlock-alt { background: linear-gradient(135deg, #94A3B8, #64748B); font-size: 14px; } /* 备选方式 */
.unlock-mini { display: inline-block; margin-left: 6px; padding: 3px 10px; border: 1.5px solid #0EA5E9; background: #fff; color: #0369A1; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.unlock-mini:active { transform: scale(.96); }
.unlock-sub { margin-top: 8px; font-size: 12px; color: var(--ink-3); line-height: 1.55; }
.unlock-sub b { color: #0369A1; }
.unlock-notify { background: linear-gradient(135deg, #F59E0B, #EA8C00); font-size: 15px; margin-bottom: 8px; } /* 已转账通知，橙 */
.unlock-tip { font-size: 12px; color: #94A3B8; text-align: center; margin: 10px 0 0; }

/* 起名双档 tab */
.unlock-tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.unlock-tab {
  flex: 1; padding: 10px 6px; border: 1.5px solid #E2E8F0; background: #F8FAFC;
  border-radius: 10px; font-size: 13px; color: #64748B; font-weight: 700;
  cursor: pointer; font-family: inherit; text-align: center; line-height: 1.4;
}
.unlock-tab b { display: block; font-size: 17px; color: #94A3B8; margin-top: 2px; }
.unlock-tab.active { border-color: #0EA5E9; background: #EFF8FF; color: #0369A1; }
.unlock-tab.active b { color: #E11D48; }
.unlock-pane .unlock-price { font-size: 34px; font-weight: 800; color: #E11D48; margin: 8px 0 4px; }

/* 支付前建号弹层表单 */
.unlock-form { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.unlock-form input {
  width: 100%; box-sizing: border-box; padding: 11px 13px;
  border: 1.5px solid #E2E8F0; border-radius: 10px; font-size: 15px;
  font-family: inherit; color: #0F172A; background: #F8FAFC; outline: none;
}
.unlock-form input:focus { border-color: #0EA5E9; background: #fff; }
.unlock-cred-err { min-height: 16px; margin: 2px 0 6px; font-size: 12px; color: #E11D48; text-align: center; }

/* ============ 隐私政策弹层 ============ */
.doc-mask {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(15,23,42,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.doc-mask.show { opacity: 1; pointer-events: auto; }
.doc-sheet {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -8px 32px rgba(2,60,120,0.18);
  max-height: 84vh; display: flex; flex-direction: column;
}
.doc-mask.show .doc-sheet { transform: translateY(0); }
.doc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; flex-shrink:0; }
.doc-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .03em; }
.doc-close { background: none; border: none; font-size: 20px; color: var(--ink-dim); cursor: pointer; line-height: 1; padding: 4px; }
.doc-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 2px 0; }
.doc-body h4 { font-size: 15px; font-weight: 800; color: var(--ink); margin: 18px 0 8px; }
.doc-body h4:first-of-type { margin-top: 6px; }
.doc-body p { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; margin-bottom: 8px; }
.doc-update { font-size: 12.5px; color: var(--ink-dim); margin-bottom: 4px; }
.doc-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid #F1F5F9; color: var(--ink-3); font-size: 13px; }

/* ---------- 问题反馈 弹层 ---------- */
.fb-field { margin: 14px 0 4px; }
.fb-field > label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.fb-textarea {
  width: 100%; min-height: 110px; box-sizing: border-box; resize: vertical;
  border: 1px solid var(--surface-border, #E2E8F0); border-radius: 12px;
  padding: 12px 13px; font-size: 14px; line-height: 1.7; color: var(--ink);
  font-family: inherit; background: var(--surface, #F8FAFC); outline: none;
}
.fb-textarea:focus { border-color: var(--accent, #2563EB); }
.fb-input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--surface-border, #E2E8F0); border-radius: 12px;
  padding: 11px 13px; font-size: 14px; color: var(--ink);
  font-family: inherit; background: var(--surface, #F8FAFC); outline: none;
}
.fb-input:focus { border-color: var(--accent, #2563EB); }
.fb-counter { text-align: right; font-size: 12px; color: var(--ink-dim); margin-top: 5px; }
.fb-submit {
  width: 100%; margin-top: 16px; padding: 13px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent, #2563EB), var(--accent-deep, #1E40AF));
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: .04em;
}
.fb-submit:disabled { opacity: .6; cursor: default; }
.fb-hint { font-size: 12.5px; color: var(--ink-dim); text-align: center; margin-top: 10px; min-height: 16px; }
.doc-tip { font-size: 13px; color: var(--ink-2); line-height: 1.75; margin: 4px 0 2px; }


@media (max-width:360px) {
  .ai-home-greet { font-size: 28px; }
  .talent-grid { gap:6px; }
  .radar-wrap { height: 300px; }
}

/* ============ 案例页：三功能入口卡片（居中 · 拉高 · 精致） ============ */
#screenCases {
  background: linear-gradient(180deg, #E0F2FE 0%, #F5FAFF 30%, #F8FAFD 100%);
  padding: 0 20px;
}
#screenCases.active {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; box-sizing: border-box;
}
.case-func-grid {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 36px; /* 内容略上移，给下方（tabbar 上方）更多留白，视觉均衡 */
}
.case-func-card {
  position: relative; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 9px;
  min-height: 148px; padding: 24px 16px 22px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
  border: 1.5px solid rgba(14,165,233,0.12);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(14,165,233,0.10);
  transition: all .2s;
}
.case-func-card:active { transform: scale(.97); }
.case-func-card.active {
  border-color: var(--accent); background: #E0F2FE;
  box-shadow: 0 10px 28px rgba(14,165,233,0.22);
}
.case-func-ico {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; line-height: 1;
  background: #E0F2FE;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.case-func-card:nth-child(2) .case-func-ico { background: #E0E7FF; }
.case-func-card:nth-child(3) .case-func-ico { background: #FCE7F3; }
.case-func-main { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.case-func-t { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .04em; }
.case-func-card.active .case-func-t { color: var(--accent-deep); }
.case-func-d { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.case-func-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: rgba(14,165,233,0.45); font-size: 20px; font-weight: 700;
}

/* 功能页（二级）：顶部返回条 */
.case-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 14px 6px;
}
.case-back {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 28px; font-weight: 700; color: var(--ink); margin: 0;
  position: relative; top: -3px; /* 与标题中线对齐（chat-back 同款处理） */
}
.case-back:active { background: rgba(0,0,0,.05); }
.case-topbar-title { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .04em; }
.case-topbar-sp { flex: 1; }

.naming-sub { margin-bottom:14px; }
.sub-label { font-size:12px; color: var(--ink-3); font-weight:600; margin-bottom:8px; }
.sub-row { display:flex; gap:8px; }
.sub-opt {
  flex:1; cursor:pointer; font-family:inherit; font-size:12.5px; font-weight:700;
  padding:9px 4px; border-radius:10px; border:1.5px solid #E4EFFA;
  background: #F8FAFC; color: var(--ink-2); transition: all .2s;
}
.sub-opt:active { transform: scale(.97); }
.sub-opt.active { border-color: var(--indigo); background: rgba(99,102,241,0.1); color: var(--indigo); }

/* 阳历 / 农历 切换 */
.cal-switch { display:flex; align-items:center; gap:8px; margin: 2px 0 12px; }
.cal-opt {
  cursor:pointer; font-family:inherit; font-size:13px; font-weight:700;
  padding:7px 16px; border-radius:18px; border:1.5px solid #E4EFFA;
  background:#F8FAFC; color: var(--ink-2); transition: all .2s;
}
.cal-opt:active { transform: scale(.96); }
.cal-opt.active {
  border-color: var(--accent); background: var(--accent); color:#fff;
  box-shadow: 0 3px 10px rgba(14,165,233,0.25);
}
.cal-hint {
  flex:1; min-width:0; text-align:right; font-size:12px; color: var(--accent-deep);
  font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.group-title {
  font-size:13px; font-weight:800; color: var(--ink-2);
  letter-spacing:.06em; margin: 4px 0 12px; display:flex; align-items:center; gap:7px;
}
.group-title::before { content:""; width:4px; height:14px; border-radius:2px; background: linear-gradient(180deg, var(--accent), var(--indigo)); }
.group-title.sub { margin-top: 4px; font-size:12.5px; color: var(--ink-3); }
.group-title.sub::before { background: var(--indigo); }

.parent-group { margin-bottom:4px; padding-top:4px; }
.pg-static { font-size:14px; font-weight:700; color: var(--ink); align-self:center; }

/* ============ 功能页（二级）：输入表单 + 案例库 ============ */
#screenFunc { background: linear-gradient(180deg, #E0F2FE 0%, #F5FAFF 26%, #F8FAFD 100%); }
#screenFunc .result-head { padding: 22px 0 14px; }
#screenFunc .result-head h2 { font-size: 22px; letter-spacing: .1em; }
.case-list { display:flex; flex-direction:column; gap:12px; }
.case-card {
  display:flex; align-items:stretch; gap:8px;
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 16px;
  box-shadow: var(--shadow);
  cursor:pointer; transition: all .2s;
}
.case-card:active { transform: scale(.985); border-color: var(--accent); }
.cc-main { flex:1; min-width:0; }
.cc-head { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.cc-tag {
  flex-shrink:0; font-size:10.5px; font-weight:800; letter-spacing:.06em;
  padding:2.5px 9px; border-radius:10px;
  background: rgba(14,165,233,0.14); color:var(--accent-deep);
}
.cc-tag.tag-naming { background: rgba(99,102,241,0.12); color:#4F46E5; }
.cc-tag.tag-relation { background: rgba(236,72,153,0.12); color:#DB2777; }
.case-empty {
  text-align: center; padding: 26px 16px; font-size: 13px; color: var(--ink-dim);
  background: rgba(255,255,255,0.7); border: 1.5px dashed rgba(148,163,184,0.35);
  border-radius: var(--radius); letter-spacing: .04em;
}
.cc-title { font-size:16px; font-weight:800; color: var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cc-birth { font-size:12px; color: var(--ink-3); margin-bottom:6px; }
.cc-snippet {
  font-size:12.5px; color: var(--ink-2); line-height:1.6; margin-bottom:8px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.cc-meta { font-size:11px; color: var(--ink-dim); }
.cc-del {
  flex-shrink:0; align-self:flex-start;
  width:26px; height:26px; border-radius:50%; border:none;
  background: rgba(148,163,184,0.14); color: var(--ink-dim);
  font-size:13px; cursor:pointer; font-family:inherit;
  display:flex; align-items:center; justify-content:center; transition:all .2s;
}
.cc-del:active { background: rgba(244,63,94,0.15); color:#E11D48; }

/* 相处之道·双方四柱对照 */
.rel-vs-head {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  font-size: 12px; letter-spacing: .1em; text-align: center; margin: 2px 0 6px;
}
.rel-vs-head b { font-size: 14px; font-weight: 800; color: var(--accent-deep); }
.rel-vs-birth { font-size: 10.5px; color: var(--ink-dim); letter-spacing: .02em; font-weight: 500; }
.rel-vs-grid { margin-bottom: 0; }
.rel-vs-sep {
  text-align: center; font-size: 16px; font-weight: 800; color: var(--accent);
  padding: 8px 0; line-height: 1;
}
/* 相处之道信息区：双方日主+用神（2 项并排，不挤） */
#pillarCard .info-row { gap: 10px; margin-top: 12px; }
#pillarCard .info-tag .tag-label { font-size: 10.5px; }
#pillarCard .info-tag .tag-val { font-size: 13px; font-weight: 700; color: var(--accent-deep); }

/* 详情页返回栏 */
.back-bar {
  margin: 14px 0 -6px; padding: 9px 14px;
  border: 1.5px solid #D7EAFB;
  background: #FFFFFF;
  border-radius: 999px;
  font-size: 13px; font-weight:700; color: var(--accent-deep);
  cursor:pointer; font-family:inherit;
  display:inline-flex; align-items:center; gap:4px;
  transition: all .2s;
  box-shadow: var(--shadow);
}
.back-bar:active { transform: scale(.97); background: #E0F2FE; }
.back-arrow { font-size:16px; line-height:1; font-weight:800; }

/* ============ 客户模式 + 提交结束页 ============ */
.client-done { text-align: center; padding: 48px 20px 40px; }
.client-done .done-ico { font-size: 56px; line-height: 1; margin-bottom: 16px; }
.client-done h2 { font-size: 22px; color: var(--ink); margin: 0 0 8px; }
.client-done .done-sub { color: var(--ink-3); font-size: 14px; margin: 0 0 28px; line-height: 1.6; }
.client-done .done-tip { color: var(--ink-dim); font-size: 12px; margin: 16px 0 0; }
.client-done .btn-cta { width: 100%; max-width: 280px; }

/* ============ 对话历史抽屉 ============ */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.42);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  z-index: 60;
}
.drawer-mask.show { opacity: 1; visibility: visible; }
.history-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 78%; max-width: 320px;
  background: #fff; z-index: 61;
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: 4px 0 28px rgba(15,23,42,.18);
}
.history-drawer.show { transform: translateX(0); }
.drawer-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 16px 14px; border-bottom: 1px solid #EEF2F7;
}
.drawer-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.drawer-new {
  border: none; background: linear-gradient(135deg,#0EA5E9,#4F8DF7); color: #fff;
  font-size: 13px; font-family: inherit; padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.drawer-list { flex: 1; overflow-y: auto; padding: 8px; }
.drawer-empty { display: none; text-align: center; color: var(--ink-3); font-size: 13px; padding: 40px 0; }
.drawer-empty.show { display: block; }
.drawer-item {
  padding: 12px 12px; border-radius: 12px; cursor: pointer; margin-bottom: 4px;
  transition: background .15s;
}
.drawer-item:active { background: #EFF6FF; }
.drawer-item.active { background: #E8F4FE; }
.drawer-item-title {
  font-size: 14px; color: var(--ink); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drawer-item-time { font-size: 11px; color: var(--ink-3); margin-top: 3px; }

/* 头像选择弹层 */
.avatar-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,0.45);
  opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 60;
}
.avatar-mask.show { opacity: 1; visibility: visible; }
.avatar-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 20px 20px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  transition: transform .28s cubic-bezier(.22,1,.36,1); z-index: 61;
}
.avatar-sheet.show { transform: translate(-50%, 0); }
.avatar-sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.avatar-sheet-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.avatar-sheet-close { font-size: 18px; color: var(--ink-3); cursor: pointer; padding: 4px 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.avatar-cell {
  aspect-ratio: 1; border-radius: 16px; border: 2px solid transparent;
  background: #F1F5F9; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; overflow: hidden;
}
.avatar-cell:active { transform: scale(.94); }
.avatar-cell.sel { border-color: var(--accent); background: #E8F4FE; }
.avatar-cell svg { width: 100%; height: 100%; display: block; }
/* 文件选择框：视觉隐藏但保留可点击（iOS Safari 对 display:none 的 input[type=file] 调 click() 无效） */
.avatar-file-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; padding: 0; margin: -1px;
}
.avatar-upload { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.avatar-upload-btn {
  width: 100%; padding: 12px; border: none; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.avatar-upload-btn:active { opacity: .9; }
.avatar-upload-btn.ghost { background: #fff; color: var(--ink-2); border: 1px solid #ddd; font-weight: 600; }

/* 客户模式结果页：来源署名条 */
.client-ref-bar {
  margin: 0 0 12px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(90deg, #E8F4FE, #F1F5F9);
  border: 1px solid #D6E9FB;
  font-size: 13px; color: var(--ink-2); font-weight: 600;
}

/* 首页右上角分享按钮（低调、缩小、靠右） */
.ai-home-share {
  width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.35);
  color: rgba(40,50,70,0.55); font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  margin-left: auto; opacity: 0.7;
}
.ai-home-share:active { transform: scale(0.94); opacity: 1; }
