:root {
  --navy: #1B2A4A;
  --navy-2: #24375f;
  --blue: #2f6fed;
  --bg: #F4F6FA;
  --card: #ffffff;
  --text: #1f2733;
  --muted: #8A93A6;
  --line: #e9edf3;
  --red: #e0573e;
  --green: #2bb673;
  --gold: #c79a3a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: 60px;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* 顶部返回条（子页面） */
.sub-header {
  display: flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff;
  padding: 14px 16px; position: sticky; top: 0; z-index: 5;
}
.sub-header .back {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  padding: 4px 12px; border-radius: 16px; font-size: 14px;
}
.sub-header .title { font-size: 16px; font-weight: 600; }

/* 通用容器 */
.wrap { padding: 16px; }
.section-title { font-size: 15px; font-weight: 700; color: var(--navy); margin: 18px 0 10px; }
.muted { color: var(--muted); font-size: 13px; }

/* 卡片 */
.card {
  background: var(--card); border-radius: 14px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 2px 10px rgba(27,42,74,.05);
}

/* 首页 hero */
.hero {
  position: relative;
  background:
    radial-gradient(120% 70% at 85% -10%, rgba(199,154,58,.28), transparent 55%),
    linear-gradient(150deg, #16233e 0%, var(--navy) 45%, #2a4069 100%);
  color: #fff; padding: 16px 18px 18px;
  border-radius: 0 0 22px 22px;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(199,154,58,.15); pointer-events: none;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hero h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: 1px; }
.hero p { margin: 0; color: #c5d0e4; font-size: 13px; }
.hero-badge {
  flex: none; margin-top: 4px; font-size: 11px; color: #ffe9c2;
  background: rgba(199,154,58,.22); border: 1px solid rgba(199,154,58,.45);
  padding: 4px 10px; border-radius: 12px;
}

/* 顾问形象卡（首页正中）——高度受控，保证首屏能看到两个按钮 */
.advisor-card {
  position: relative; z-index: 1;
  margin: 12px auto 0; max-width: 230px;
  background: rgba(255,255,255,.97); border-radius: 16px; padding: 6px 6px 0;
  box-shadow: 0 8px 22px rgba(0,0,0,.26);
}
.advisor-img {
  display: block; width: 100%; max-height: 25vh; object-fit: cover; object-position: center 18%;
  border-radius: 11px 11px 0 0;
}
.advisor-cap {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 6px 9px; text-align: center;
}
.advisor-cap b { color: var(--navy); font-size: 13.5px; }
.advisor-cap span { color: var(--muted); font-size: 11px; }

/* hero 双按钮 */
.hero-actions {
  position: relative; z-index: 1;
  display: flex; gap: 10px; margin-top: 12px;
}
.ha {
  flex: 1; text-align: center; padding: 12px 0; border-radius: 12px;
  font-size: 14.5px; font-weight: 700;
}
.ha.primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(47,111,237,.4); }
.ha.gold { background: rgba(255,255,255,.12); color: #ffe9c2; border: 1px solid rgba(199,154,58,.55); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile {
  background: var(--card); border-radius: 14px; padding: 16px 14px;
  text-align: center; box-shadow: 0 2px 10px rgba(27,42,74,.05);
}
.tile .em { font-size: 26px; }
.tile .lb { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.tile .desc { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }

/* 咨询流程 */
.steps-card {
  background: var(--card); border-radius: 14px; padding: 16px; margin-top: 12px;
  box-shadow: 0 2px 10px rgba(27,42,74,.05);
}
.steps { display: flex; gap: 8px; }
.step { flex: 1; text-align: center; }
.step i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #2a4069); color: #ffe9c2;
  font-style: normal; font-size: 13px; font-weight: 700;
}
.step b { display: block; margin-top: 6px; font-size: 13px; color: var(--navy); }
.step span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 按钮 */
.btn {
  display: block; width: 100%; border: none; border-radius: 12px;
  padding: 13px; font-size: 16px; font-weight: 600; color: #fff;
  background: var(--blue); margin-top: 12px;
}
.btn.ghost { background: #eef2f8; color: var(--navy); }
.btn.gold { background: var(--gold); }
.btn:active { opacity: .85; }
.btn[disabled] { opacity: .5; }

/* 列表 */
.list-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(27,42,74,.04);
}
.list-item .name { font-weight: 600; color: var(--navy); }
.list-item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-item .arrow { color: var(--muted); font-size: 18px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--navy); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-size: 15px; background: #fff; color: var(--text);
}
.field textarea { min-height: 96px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 进度条 */
.progress { height: 8px; background: #eef2f8; border-radius: 6px; overflow: hidden; margin: 6px 0 4px; }
.progress > i { display: block; height: 100%; background: var(--blue); width: 0; transition: width .3s; }

/* 状态徽标 */
.badge-st { font-size: 12px; padding: 2px 9px; border-radius: 10px; }
.badge-pending { background: #fff3e0; color: #c77c1a; }
.badge-paid { background: #e6f7ee; color: var(--green); }
/* 预约三状态：已发送 / 已阅读 / 已安排预约 */
.badge-sent { background: #fff3e0; color: #c77c1a; }
.badge-read { background: #e8f0ff; color: #2f6fed; }
.badge-scheduled { background: #e6f7ee; color: var(--green); }
.badge-done { background: #eef1f6; color: #5c6880; }
.badge-cancelled { background: #f2f4f8; color: #97a0b3; }
.badge-cancelled { background: #f0f1f3; color: var(--muted); }

/* 通话条 */
.call-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 14px; margin-top: 12px;
}
.call-bar a { color: #fff; font-weight: 700; }

/* 聊天气泡 */
.chat-box { padding: 14px; }
.msg { display: flex; margin-bottom: 12px; }
.msg .bubble {
  max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 14px; white-space: pre-wrap;
  word-break: break-word;
}
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot .bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; position: sticky; bottom: 60px; background: var(--bg); }
.chat-input input { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; font-size: 15px; }
.chat-input button { background: var(--blue); color: #fff; border: none; border-radius: 20px; padding: 0 18px; font-size: 15px; }
.notice { background: #fff7e6; border: 1px solid #ffe0a3; color: #9a6b00; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 8px 14px; }

/* ===== 结构化采集流程 ===== */
.step-bar { padding: 14px 16px 4px; }
.step-dots { display: flex; gap: 6px; }
.step-dots i {
  flex: 1; height: 4px; border-radius: 2px; background: #e2e7ef;
}
.step-dots i.on { background: var(--blue); }
.step-label { margin-top: 6px; font-size: 12px; color: var(--muted); }

.q-title { font-size: 17px; font-weight: 700; color: var(--navy); margin: 10px 16px 4px; }
.q-sub { font-size: 13px; color: var(--muted); margin: 0 16px 14px; line-height: 1.7; }

/* 类型选择卡（九宫格） */
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pick {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 6px; text-align: center; transition: .15s;
}
.pick.on { border-color: var(--blue); background: #eef4ff; box-shadow: 0 2px 8px rgba(47,111,237,.15); }
.pick .pi { display: block; font-size: 22px; }
.pick b { display: block; font-size: 13px; color: var(--navy); margin-top: 4px; }
.pick .ph { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* 选项 chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; padding: 8px 14px; border-radius: 18px;
  background: #fff; border: 1px solid var(--line); color: var(--text);
  font-size: 13.5px; line-height: 1.4;
}
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 风险 / 安全提示 */
.risk-tip {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  background: #fff1ee; border: 1px solid #ffd0c4; color: #b3412a;
  font-size: 13px; line-height: 1.7;
}
.safe-note {
  margin-top: 6px; padding: 10px 12px; border-radius: 10px;
  background: #eef7f0; border: 1px solid #c9e7d3; color: #1f7a45;
  font-size: 12.5px; line-height: 1.6;
}

/* 聊天阶段 */
.chat-meta { padding: 8px 16px 0; font-size: 12px; color: var(--muted); }
.chat-sug {
  padding: 4px 14px 8px; background: var(--bg);
}
.sug-title { font-size: 12px; color: var(--muted); margin: 6px 0 8px; }
.chat-sug textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 15px; font-family: inherit; resize: vertical;
}
.chat-sug .btn { margin-top: 8px; }
.chat-foot { padding: 0 16px 12px; }

/* 摘要预览 */
.summary {
  margin: 0; white-space: pre-wrap; word-break: break-all;
  font-family: inherit; font-size: 13px; line-height: 1.8; color: var(--text);
}

/* 设置 */
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting-row input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 60%; font-size: 13px; }

/* 底部导航 */
#nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: 56px;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; z-index: 10;
}
#nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; gap: 2px; }
#nav a .ic { font-size: 20px; }
#nav a.active { color: var(--navy); }

/* toast / loading */
.toast {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 99; max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; }
.loading {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.7); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px;
  display: none; z-index: 99;
}
.loading.show { display: block; }
.service-desc { font-size: 13px; color: var(--muted); margin-top: 4px; }
.price-note { color: var(--gold); font-weight: 600; }

/* 首页连接状态横幅 */
.conn-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff4e5; color: #b45309; border-bottom: 1px solid #f0c987;
  padding: 8px 12px; font-size: 13px; position: sticky; top: 0; z-index: 40;
}
.conn-banner .cb-text { flex: 1; line-height: 1.3; }
.conn-banner .cb-fix {
  flex: 0 0 auto; background: #b45309; color: #fff; padding: 5px 10px;
  border-radius: 8px; text-decoration: none; font-weight: 600; white-space: nowrap;
}

/* ============ 多角色系统：意向登记 / 代理工作台 / 总部后台 ============ */
.lead-hero { background: linear-gradient(135deg, var(--navy), #1b2f55); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.lead-hero b { font-size: 18px; }
.lead-hero span { font-size: 13px; opacity: .85; }
.req { color: #d33; font-style: normal; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 14px; font-family: inherit; box-sizing: border-box; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-row { display: flex; gap: 8px; margin-bottom: 12px; }
.stat { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; }
.stat b { display: block; font-size: 20px; color: var(--navy); }
.stat span { font-size: 12px; color: var(--muted); }
.tab-line { display: flex; gap: 6px; margin-bottom: 10px; }
.tl { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 9px 4px; font-size: 14px; color: var(--muted); position: relative; }
.tl.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tl-badge { display: none; background: #d33; color: #fff; border-radius: 9px; font-size: 11px; padding: 1px 6px; font-style: normal; margin-left: 4px; }
.lead-card { margin-bottom: 10px; }
.lc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.lc-top b { font-size: 15px; color: var(--navy); }
.lc-line { font-size: 13px; color: var(--text); margin-top: 3px; word-break: break-all; }
.lc-desc { font-size: 13px; color: var(--muted); margin-top: 6px; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.lc-note { font-size: 12px; color: #8a6d1c; background: #fdf6e3; border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
.lc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.badge { font-size: 12px; border-radius: 10px; padding: 2px 10px; background: #eef1f6; color: var(--muted); }
.b-ok { background: #e6f6ec; color: #1a7f4b; }
.b-off { background: #fdecec; color: #c0392b; }
.b-urg-urgent { background: #fdecec; color: #c0392b; }
.b-urg-high { background: #fdf3e0; color: #b9770e; }
.empty-card { text-align: center; padding: 26px 12px; color: var(--muted); line-height: 1.8; }
.invite-card { text-align: center; }
.inv-code { font-size: 30px; font-weight: 800; letter-spacing: 6px; color: var(--navy); margin: 8px 0; }
.inv-link { font-size: 12px; background: var(--bg); border-radius: 8px; padding: 8px 10px; word-break: break-all; margin-bottom: 10px; }
.inv-mini { color: var(--navy); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.sel { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px; font-size: 14px; background: #fff; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.ok-card { text-align: center; padding: 26px 14px; }
.ok-icon { font-size: 40px; margin-bottom: 8px; }
.ok-card b { font-size: 17px; color: var(--navy); }
.ok-card p { margin: 10px 0 14px; }
@media (min-width: 760px) {
  .wrap { max-width: 720px; margin: 0 auto; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { max-width: 720px; margin-left: auto; margin-right: auto; }
}

/* ===== 采集页悬浮操作条：吸附在底部导航上方，不出画面 ===== */
.action-dock {
  position: fixed; left: 0; right: 0; bottom: 56px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(244,246,250,0), var(--bg) 40%);
  z-index: 40;
}
.action-dock .btn { box-shadow: 0 8px 20px rgba(0,0,0,.22); }

/* ===== 聊天页防呆：记录限高内部滚，答题区常驻吸底 ===== */
.chat-box {
  max-height: 34vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  margin: 8px 14px; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.chat-bottom {
  position: sticky; bottom: 56px; z-index: 30;
  background: var(--bg); padding-bottom: 4px;
}
.chat-bottom .chat-input { position: static; }
.chat-sug {
  background: #eef4ff; border: 1px solid #c7d8f8; border-radius: 12px;
  margin: 8px 14px; padding: 10px 12px;
}
.sug-title { font-weight: 600; color: var(--navy); }
@keyframes sugPulse {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.45); }
  100% { box-shadow: 0 0 0 18px rgba(37,99,235,0); }
}
.chat-sug.pulse { animation: sugPulse 1.1s ease-out 2; }
.chat-foot { padding: 4px 16px 6px; }

/* ===== 首页 AI 悬浮对话按钮（律师形象右下角） ===== */
.advisor-card .ai-fab {
  position: absolute; right: 10px; bottom: 52px; z-index: 5;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.3); text-decoration: none;
  animation: fabBreath 2.4s ease-in-out infinite;
}
@keyframes fabBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ===== 聊天语音按钮与录音状态 ===== */
/* 圆形麦克风：大号、简约线条、卡通感 */
.chat-input .mic {
  flex: 0 0 62px; width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(160deg, #4a86f7, #2f6fed);
  color: #fff; border: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; box-shadow: 0 6px 16px rgba(47,111,237,.32);
  position: relative;
}
.chat-input .mic svg { width: 27px; height: 27px; }
.chat-input .mic .mic-word { font-size: 9px; line-height: 1.05; letter-spacing: .5px; opacity: .95; }
.chat-input .mic:active { transform: scale(.96); }
.chat-input .mic.rec {
  background: linear-gradient(160deg, #f0654b, #e0452c);
  box-shadow: 0 6px 20px rgba(224,69,44,.42);
  animation: fabBreath 1.1s ease-in-out infinite;
}
.mic-hint {
  font-size: 11.5px; color: var(--muted); text-align: center;
  padding: 2px 16px 8px; line-height: 1.5;
}
.mic-hint.ok { color: var(--blue); font-weight: 600; }
#chat-send.ready { animation: sugPulse 1.1s ease-out 3; }
.rec-tip {
  position: fixed; left: 50%; bottom: 130px; transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 13px;
  padding: 8px 16px; border-radius: 20px; z-index: 60; pointer-events: none;
}
/* 即时反馈占位气泡 */
.bubble.typing { color: var(--muted); }
.bubble.typing::after {
  content: '…'; display: inline-block; overflow: hidden; vertical-align: bottom;
  animation: typingDots 1.2s steps(4) infinite; width: 1.2em;
}
@keyframes typingDots { 0% { width: 0; } 100% { width: 1.2em; } }

/* ===== 语音对话引导与播报 ===== */
.voice-guide {
  margin: 8px 14px 0; padding: 10px 12px;
  background: #FAEEDA; border: 1px solid #EF9F27; border-radius: 12px;
  color: #633806; font-size: 13px; line-height: 1.5;
}
.notice.compact { margin: 6px 14px 0; font-size: 11px; opacity: .85; }
.chat-input .mic {
  flex: 0 0 auto; min-width: 0; max-width: 40%;
  white-space: nowrap; font-size: 13px; font-weight: 500;
  background: var(--blue); color: #fff; border: none; border-radius: 22px; padding: 0 12px;
}
.chat-input .mic.rec { background: #e74c3c; animation: fabBreath 1s ease-in-out infinite; }

/* 输入行防溢出：输入框可压缩，麦克风和发送按钮固定宽度，整行不出屏 */
.chat-input {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; box-sizing: border-box; width: 100%; overflow: hidden;
}
.chat-input input {
  flex: 1 1 0; min-width: 0; width: 100%;
  padding: 10px 12px; font-size: 15px; box-sizing: border-box;
}
.chat-input #chat-send, .chat-input button#chat-send {
  flex: 0 0 auto; padding: 0 12px; height: 40px; font-size: 14px; border-radius: 20px;
}

/* ===== 我的：个人信息卡 ===== */
.profile-card { padding: 16px; }
.pf-row { display: flex; align-items: center; gap: 12px; }
.pf-avatar {
  width: 54px; height: 54px; border-radius: 50%; flex: 0 0 54px;
  background: linear-gradient(160deg, var(--navy-2), var(--navy));
  color: #E8C87A; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pf-main { flex: 1; min-width: 0; }
.pf-name { font-size: 17px; font-weight: 700; color: var(--navy); }
.pf-phone { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pf-edit {
  flex: 0 0 auto; font-size: 13px; color: var(--blue);
  border: 1px solid #c7d8f8; background: #f4f8ff;
  padding: 5px 12px; border-radius: 16px;
}
.pf-stats { display: flex; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.pf-stat { flex: 1; text-align: center; }
.pf-stat b { display: block; font-size: 18px; color: var(--navy); line-height: 1.3; }
.pf-stat span { font-size: 11.5px; color: var(--muted); }

/* ===== 我的：列表入口 ===== */
.list-card { padding: 0; overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }
.list-row:active { background: #f7f9fd; }
.lr-ico { flex: 0 0 22px; font-size: 18px; text-align: center; }
.lr-txt { flex: 1; min-width: 0; font-size: 15px; color: var(--text); }
.lr-txt em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lr-arrow { color: #c3cad8; font-size: 18px; }

/* ===== 案件材料 ===== */
.upload-btn { width: 100%; padding: 14px; font-size: 16px; }
.upload-ok { font-size: 12.5px; color: var(--blue); margin-top: 8px; }
.mat-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; }
.mat-thumb {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 10px;
  background: #eef2f9; display: flex; align-items: center; justify-content: center;
  font-size: 20px; overflow: hidden;
}
.mat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mat-meta { flex: 1; min-width: 0; }
.mat-name {
  font-size: 14px; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mat-del {
  flex: 0 0 auto; border: 1px solid #f0d3cd; background: #fff6f4;
  color: var(--red); font-size: 12.5px; padding: 5px 10px; border-radius: 14px;
}

/* ===== 对话记录 ===== */
.dlg-item { display: block; margin-bottom: 10px; }
.dlg-head {
  font-size: 14.5px; font-weight: 600; color: var(--navy);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dlg-box { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.dlg-msg { display: flex; }
.dlg-msg.me { justify-content: flex-end; }
.dlg-bubble {
  max-width: 82%; padding: 9px 12px; border-radius: 14px;
  font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.dlg-msg.bot .dlg-bubble { background: #fff; border: 1px solid var(--line); border-top-left-radius: 4px; }
.dlg-msg.me .dlg-bubble { background: var(--blue); color: #fff; border-top-right-radius: 4px; }

/* ===== 预约卡片（客户端 / 员工端共用） ===== */
.appt-card { margin-bottom: 12px; }
.ap-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ap-title { font-size: 15.5px; font-weight: 700; color: var(--navy); flex: 1; min-width: 0; }
.ap-line { font-size: 13px; color: var(--text); margin-top: 4px; }
.ap-line.muted { color: var(--muted); }
.ap-agent {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #f6f9ff; border: 1px solid #dde8fb; border-radius: 10px;
  padding: 8px 10px; margin-top: 10px; font-size: 13px;
}
.ap-agent-lb { color: var(--muted); font-size: 12px; }
.ap-agent b { color: var(--navy); }
.ap-call {
  margin-left: auto; color: var(--blue); font-weight: 600; font-size: 13px;
  background: #fff; border: 1px solid #c7d8f8; border-radius: 14px; padding: 3px 10px;
}
.ap-reply {
  margin-top: 10px; background: #f7fbf8; border: 1px solid #d6ecdd;
  border-radius: 10px; padding: 9px 11px;
}
.ap-reply-t { font-size: 11.5px; color: #4a8a63; margin-bottom: 3px; }
.ap-reply-c { font-size: 13.5px; color: var(--text); line-height: 1.6; white-space: pre-wrap; }
.ap-wait { margin-top: 10px; font-size: 12px; color: #c77c1a; background: #fff8ed; border-radius: 8px; padding: 6px 10px; }
.ap-detail { margin-top: 10px; }
.ap-detail summary { font-size: 12.5px; color: var(--blue); cursor: pointer; }
.ap-detail-c {
  font-size: 13px; color: #55607a; background: #f7f9fd;
  border-radius: 8px; padding: 8px 10px; margin-top: 6px; line-height: 1.7;
}
.ap-actions { display: flex; gap: 8px; margin-top: 12px; }
.ap-actions .btn { flex: 1; }

/* ============================================================
   派单 / 履约进度 / 收款 / 支付弹层（v1.5.0）
   ============================================================ */

/* —— 进度徽标：和「回复状态」badge 分开，两条线同时成立 —— */
.f-badge {
  display: inline-block; font-size: 11.5px; padding: 2px 8px;
  border-radius: 9px; font-weight: 600;
}
.f-unassigned { background: #fdecea; color: #c0392b; }
.f-dispatched { background: #fff3e0; color: #c77c1a; }
.f-accepted { background: #e8f0ff; color: #2f6fed; }
.f-contacted { background: #e6f7ee; color: #1f8f5f; }
.f-closed { background: #eef1f6; color: #5c6880; }
.f-returned { background: #f0f1f3; color: #97a0b3; }

.ap-fl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.f-agent { font-size: 12px; color: #4a5878; }
.f-agent.muted { color: var(--muted); }

.dp-badge { font-size: 11.5px; padding: 2px 8px; border-radius: 9px; margin-left: auto; }
.dp-unpaid { background: #fdecea; color: #c0392b; }
.dp-proof_submitted { background: #fff8e6; color: #b8860b; }
.dp-paid { background: #e6f7ee; color: #1f8f5f; }

/* —— 客户侧支付条 —— */
.pay-bar {
  margin-top: 12px; display: flex; align-items: center; gap: 10px;
  border-radius: 11px; padding: 10px 12px;
}
.pay-due { background: #fff8ed; border: 1px solid #ffe0b2; }
.pay-wait { background: #f2f7ff; border: 1px solid #d6e4ff; }
.pay-ok { background: #f3fbf6; border: 1px solid #d3ecdf; }
.pb-ico { font-size: 18px; flex: 0 0 auto; }
.pb-txt { flex: 1; font-size: 13px; line-height: 1.5; color: var(--text); }
.pb-txt b { color: var(--red); font-size: 15px; }
.pb-txt em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pb-btn {
  flex: 0 0 auto; border: none; border-radius: 16px; padding: 7px 13px;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 600;
}
.pb-btn.ghost { background: #fff; color: var(--blue); border: 1px solid #c7d8f8; }

.pay-line {
  margin-top: 10px; display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #55607a; background: #f7f9fd;
  border-radius: 8px; padding: 7px 10px;
}
.pay-line.compact { margin-top: 6px; padding: 5px 9px; font-size: 12px; }
.pay-line .due { color: var(--red); }
.pay-line .clear { color: var(--green); }
.pay-flag {
  margin-top: 8px; font-size: 12.5px; color: #a33; background: #fdecea;
  border-radius: 8px; padding: 6px 10px;
}
.ap-proof-tip {
  margin-top: 8px; font-size: 12px; color: #b8860b; background: #fffaeb;
  border-radius: 8px; padding: 6px 10px;
}

/* —— 我的页待支付提醒 —— */
.pay-alert {
  margin-top: 12px; display: flex; align-items: center; gap: 11px;
  background: linear-gradient(135deg, #fff6e8, #fffdf8);
  border: 1px solid #ffe0b2; border-radius: 13px; padding: 13px 14px;
}
.pay-alert.wait { background: linear-gradient(135deg, #f0f6ff, #fbfdff); border-color: #d6e4ff; }
.pa-ico { font-size: 22px; flex: 0 0 auto; }
.pa-main { flex: 1; min-width: 0; }
.pa-main b { display: block; font-size: 14px; color: var(--navy); }
.pa-main em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pa-btn {
  flex: 0 0 auto; border: none; border-radius: 17px; padding: 8px 14px;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 600;
}
.pa-btn.ghost { background: #fff; color: var(--blue); border: 1px solid #c7d8f8; }

/* —— 底部弹层 —— */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .55);
  z-index: 90; display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 18px 18px 0 0; padding: 20px 18px 26px;
  position: relative; animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.sheet-x {
  position: absolute; right: 12px; top: 10px; border: none; background: #f2f4f8;
  width: 30px; height: 30px; border-radius: 15px; font-size: 19px; color: #6b7590; line-height: 1;
}
.sheet-head {
  font-size: 17px; font-weight: 700; color: var(--navy);
  text-align: center; margin: 4px 0 14px;
}
.sheet-inner .btn { width: 100%; }
.sheet-inner .btn + .btn { margin-top: 8px; }

/* —— 支付弹层内容 —— */
.pay-amt {
  font-size: 30px; font-weight: 800; color: var(--red);
  text-align: center; letter-spacing: -.5px;
}
.pay-payee { text-align: center; font-size: 12.5px; color: var(--muted); margin: 2px 0 12px; }
.pay-qr-box {
  background: #f8fafc; border: 1px dashed #d9e1ec; border-radius: 14px;
  padding: 14px; text-align: center;
}
.pay-qr-box img { width: 62%; max-width: 220px; border-radius: 8px; background: #fff; }
.pay-qr-lb { font-size: 12px; color: var(--muted); margin-top: 8px; }
.pay-empty {
  background: #fdf6ec; border-radius: 12px; padding: 22px 14px;
  text-align: center; font-size: 13.5px; color: #a5710f; line-height: 1.7;
}
.pay-steps { margin: 14px 0; }
.pay-step {
  display: flex; align-items: center; gap: 9px; font-size: 13px;
  color: #4a5878; padding: 5px 0;
}
.pay-step i {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 10px;
  background: var(--navy); color: #fff; font-style: normal;
  font-size: 11.5px; display: flex; align-items: center; justify-content: center;
}
.pay-step b { color: var(--navy); }
.pay-warn {
  font-size: 11.5px; color: var(--muted); line-height: 1.65;
  background: #f7f9fd; border-radius: 8px; padding: 9px 11px; margin-top: 10px;
}
.pay-preview { text-align: center; margin-bottom: 12px; }
.pay-preview img { max-width: 100%; max-height: 46vh; border-radius: 10px; border: 1px solid var(--line); }
.pay-state { text-align: center; padding: 10px 4px 4px; font-size: 13.5px; line-height: 1.8; color: #4a5878; }
.pay-state-ico { font-size: 40px; margin-bottom: 6px; }

/* —— 履约进度轨道 —— */
.flow-track { display: flex; align-items: flex-start; gap: 2px; margin-top: 4px; }
.ft-step { flex: 1; text-align: center; position: relative; }
.ft-step i {
  display: block; width: 24px; height: 24px; margin: 0 auto 4px; border-radius: 12px;
  background: #eef1f6; color: #97a0b3; font-style: normal; font-size: 12px;
  line-height: 24px;
}
.ft-step span { font-size: 11px; color: #97a0b3; }
.ft-step.done i { background: #d9f0e4; color: #1f8f5f; }
.ft-step.cur i { background: var(--navy); color: #fff; }
.ft-step.cur span { color: var(--navy); font-weight: 600; }

/* —— 金额三宫格 —— */
.money-grid {
  display: flex; gap: 8px; margin: 6px 0 12px;
}
.money-grid > div {
  flex: 1; background: #f7f9fd; border-radius: 10px; padding: 9px 6px; text-align: center;
}
.money-grid span { display: block; font-size: 11.5px; color: var(--muted); }
.money-grid b { display: block; font-size: 15px; color: var(--navy); margin-top: 2px; }
.money-grid b.c-green { color: var(--green); }
.money-grid b.c-red { color: var(--red); }

.c-green { color: var(--green) !important; }
.c-red { color: var(--red) !important; }
.c-orange { color: #c77c1a !important; }

.ok-line {
  font-size: 13px; color: #1f8f5f; background: #f3fbf6; border: 1px solid #d3ecdf;
  border-radius: 9px; padding: 8px 11px; margin-top: 10px;
}
.wait-line {
  font-size: 13px; color: #a5710f; background: #fdf8ee; border-radius: 9px;
  padding: 8px 11px; margin-top: 10px;
}
.sec-sub {
  font-size: 12.5px; font-weight: 600; color: var(--navy);
  margin: 16px 0 8px; padding-left: 8px; border-left: 3px solid var(--navy);
}
.field-row { display: flex; gap: 8px; align-items: center; }
.field-row input, .field-row select { flex: 1; min-width: 0; }

/* —— 付款凭证核对 —— */
.proof-card {
  margin-top: 12px; border: 1px solid #ffe0b2; background: #fffdf7;
  border-radius: 12px; padding: 12px;
}
.proof-head { font-size: 13px; font-weight: 600; color: #a5710f; margin-bottom: 8px; }
.proof-img {
  width: 100%; max-height: 300px; object-fit: contain;
  border-radius: 8px; background: #fff; border: 1px solid var(--line); cursor: zoom-in;
}

/* —— 收款记录 / 操作流水 —— */
.pay-row {
  border-bottom: 1px solid var(--line); padding: 10px 0;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
}
.pay-row:last-child { border-bottom: none; }
.pr-main { flex: 1; min-width: 0; }
.pr-main b { font-size: 15px; color: var(--navy); margin-right: 6px; }
.pr-main span { font-size: 12px; color: var(--muted); }
.pr-side { text-align: right; font-size: 11.5px; }
.pr-side span { display: block; font-weight: 600; }
.pr-side em { font-style: normal; color: var(--muted); font-size: 11px; }
.pr-proof { font-size: 11.5px; color: var(--blue); }
.pr-note { flex: 0 0 100%; font-size: 12px; color: #55607a; }

.timeline { padding-left: 4px; }
.tl-item { display: flex; gap: 10px; padding-bottom: 12px; position: relative; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 4px; top: 14px; bottom: 0;
  width: 1px; background: var(--line);
}
.tl-dot {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 5px;
  background: #c7d2e3; margin-top: 5px; position: relative; z-index: 1;
}
.tl-body { flex: 1; min-width: 0; }
.tl-t { font-size: 13px; color: var(--navy); font-weight: 600; }
.tl-m { font-size: 11.5px; color: var(--muted); }
.tl-n { font-size: 12px; color: #55607a; margin-top: 2px; }

/* —— 汇总条 / 二级筛选 —— */
.flow-sum {
  display: flex; gap: 8px; background: var(--navy); border-radius: 12px;
  padding: 10px 6px; margin-bottom: 10px;
}
.flow-sum > div { flex: 1; text-align: center; }
.flow-sum b { display: block; color: #fff; font-size: 14px; }
.flow-sum b.due { color: #ffb4a2; }
.flow-sum b.warn { color: #ffd479; }
.flow-sum span { display: block; font-size: 10.5px; color: rgba(255,255,255,.65); }

.tab-line.sub { margin-top: 8px; }
.tl2 {
  flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 5px 4px; font-size: 12.5px; color: var(--muted);
}
.tl2.on { background: #eef3ff; color: var(--blue); border-color: #c7d8f8; font-weight: 600; }

.stat b.sm { font-size: 14px; }

/* —— 收款码预览 —— */
.qr-preview {
  display: block; width: 62%; max-width: 240px; margin: 10px auto;
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
}

/* —— 防诈骗提示：收款码只有一个 —— */
.pay-safe {
  font-size: 11.5px; line-height: 1.65; color: #a33;
  background: #fdf2f0; border: 1px solid #f6d7d1;
  border-radius: 8px; padding: 9px 11px; margin-top: 8px;
}

/* —— 付款备注提示（个人收款码必须靠备注对账） —— */
.pay-note-tip {
  margin: 10px 0 12px;
  font-size: 12px; line-height: 1.65; color: #7a5a1e;
  background: #fffaf0; border: 1px solid #ffe9c2;
  border-radius: 9px; padding: 8px 11px;
}

/* ================================================================
   对话页 v2（全屏三段式）· 20261104
   解决三个实测问题：
   1. 答题卡 position:sticky(bottom:56px) 在小屏上压到聊天记录正中间
   2. 答题卡的 textarea 与底部输入框同时存在，客户不知道该写哪儿
   3. 每换一题 scrollIntoView 把页面拽走，正在打字/看记录时被打断
   新结构：顶部(定高) + 聊天记录(吃掉剩余) + 底部(答题卡+输入行，自然流)
   ================================================================ */
body.chat-mode {
  padding-bottom: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body.chat-mode #nav { display: none !important; }

body.chat-mode #app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- 顶部：压到最扁 ---- */
body.chat-mode .sub-header { flex: 0 0 auto; padding: 9px 14px; }
body.chat-mode .sub-header .title { font-size: 15px; }
body.chat-mode .sub-header .back { padding: 3px 11px; font-size: 13px; }

body.chat-mode #flow {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.chat-mode #flow > * { flex: 0 0 auto; }

body.chat-mode .step-bar { padding: 8px 14px 0; }
body.chat-mode .step-dots { gap: 5px; }
body.chat-mode .step-dots i { height: 3px; }
body.chat-mode .step-label { margin-top: 4px; font-size: 11px; }

body.chat-mode .chat-meta {
  padding: 2px 14px 0;
  font-size: 11.5px;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
body.chat-mode .chat-meta .meta-spacer { flex: 1 1 auto; }
body.chat-mode .chat-meta .meta-btn {
  font-size: 11.5px; color: var(--blue);
  border: 1px solid #cfdcf5; background: #f2f7ff;
  padding: 1px 9px; border-radius: 10px; line-height: 1.6;
}

/* 语音引导：压成一行，点一下才展开全文 */
body.chat-mode .voice-guide {
  margin: 6px 12px 0;
  padding: 7px 11px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 10px;
  cursor: pointer;
}
body.chat-mode .voice-guide.fold {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.chat-mode .voice-guide.fold::after { content: " 展开"; color: var(--blue); }

/* ---- 聊天记录：吃掉所有剩余高度 ----
   选择器必须带上 #flow > 才能压过上面的 `#flow > *{flex:0 0 auto}`（id 权重） */
body.chat-mode #flow > .chat-box {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 6px 12px;
  padding: 12px 12px 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
body.chat-mode .msg { margin-bottom: 10px; }
body.chat-mode .msg .bubble { font-size: 14.5px; padding: 10px 14px; max-width: 84%; }
body.chat-mode .msg.bot .bubble { background: #f7f9fc; border-color: #e6ebf3; }

/* ---- 底部：答题卡 + 输入行，正常文档流，绝不吸底 ---- */
body.chat-mode .chat-bottom {
  flex: 0 0 auto;
  position: static;
  background: var(--bg);
  padding: 0 0 calc(4px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 14px rgba(27,42,74,.05);
}

body.chat-mode .chat-sug {
  margin: 0;
  padding: 10px 12px 8px;
  background: #eef4ff;
  border: none;
  border-top: 1px solid #d9e4fa;
  border-radius: 0;
  max-height: 36vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.chat-mode .chat-sug:empty { display: none; }
body.chat-mode .sug-title {
  font-size: 12.5px; font-weight: 600; color: var(--navy);
  margin: 0 0 9px;
}
body.chat-mode .sug-title .sug-sub { font-weight: 400; color: var(--muted); font-size: 11.5px; }

/* 选项：加大点击区，按下有反馈，选中态明确 */
body.chat-mode .chips { gap: 8px; }
body.chat-mode .chip {
  display: inline-flex; align-items: center;
  min-height: 42px; padding: 10px 16px;
  font-size: 14px; border-radius: 21px;
  background: #fff; border: 1.5px solid #dbe3f1; color: var(--text);
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
body.chat-mode .chip:active { transform: scale(.955); }
body.chat-mode .chip.on {
  background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600;
}

/* 多选确认按钮：未选置灰，选了才亮 */
body.chat-mode .chat-sug .btn { margin-top: 10px; height: 44px; border-radius: 22px; font-size: 15px; }
body.chat-mode .chat-sug .btn[disabled] { opacity: .45; }

/* 输入行 */
body.chat-mode .chat-input {
  position: static;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 2px;
  background: var(--bg);
  box-sizing: border-box; width: 100%; overflow: visible;
}
body.chat-mode .chat-input input {
  flex: 1 1 0; min-width: 0; width: auto;
  height: 46px; padding: 0 16px;
  font-size: 15px; border-radius: 23px;
  border: 1px solid #dfe5ef; background: #fff;
  box-sizing: border-box;
}
body.chat-mode .chat-input input:focus { outline: none; border-color: var(--blue); }
body.chat-mode .chat-input .mic {
  flex: 0 0 50px; width: 50px; height: 50px;
  min-width: 0; max-width: 50px; padding: 0;
  border-radius: 50%; border: none;
  background: linear-gradient(160deg, #4a86f7, #2f6fed);
  color: #fff; font-size: 11px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; box-shadow: 0 4px 12px rgba(47,111,237,.3);
}
body.chat-mode .chat-input .mic svg { width: 22px; height: 22px; }
body.chat-mode .chat-input .mic .mic-word { font-size: 8.5px; line-height: 1; letter-spacing: .3px; margin-top: 1px; }
body.chat-mode .chat-input .mic.rec {
  background: linear-gradient(160deg, #f0654b, #e0452c);
  animation: fabBreath 1.1s ease-in-out infinite;
  box-shadow: 0 4px 16px rgba(224,69,44,.4);
}
body.chat-mode .chat-input #chat-send {
  flex: 0 0 auto; height: 46px; padding: 0 18px;
  font-size: 15px; font-weight: 600; border-radius: 23px;
  background: var(--blue); color: #fff; border: none;
}
body.chat-mode .chat-input #chat-send:disabled { opacity: .5; }

/* 提示小字：一行，不抢视线 */
body.chat-mode .mic-hint {
  font-size: 11px; color: var(--muted); text-align: center;
  padding: 1px 14px 4px; line-height: 1.4;
}
body.chat-mode .mic-hint.ok { color: var(--blue); font-weight: 600; }

/* 去掉一切打扰性动画 */
body.chat-mode .chat-sug.pulse { animation: none; }
body.chat-mode #chat-send.ready { animation: none; }

/* 「已记录」轻提示：替代整卡重绘造成的跳动 */
body.chat-mode .sug-done {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--green); font-weight: 600;
  padding: 4px 0;
}

/* 说明面板（隐私与提醒，点「ℹ️ 说明」才展开） */
body.chat-mode .chat-notice {
  margin: 6px 12px 0; padding: 9px 11px;
  background: #fff8e8; border: 1px solid #ffe1ac; border-radius: 10px;
  font-size: 11.5px; line-height: 1.6; color: #7a5a00;
  max-height: 30vh; overflow-y: auto;
}
body.chat-mode .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
body.chat-mode .chat-foot .btn { height: 34px; font-size: 13px; border-radius: 17px; }
body.chat-mode .chat-input .mic .mic-word { white-space: nowrap; font-size: 8px; letter-spacing: 0; }

/* ================================================================
   选项弹层（v1.5.5）· 选项太多挤掉聊天记录 → 收进底部弹出菜单
   ================================================================ */

/* 底部入口按钮：一行高，不再吃掉记录区 */
body.chat-mode .sug-picker {
  display: flex; align-items: center; gap: 8px;
  width: calc(100% - 24px); margin: 8px 12px;
  padding: 13px 16px;
  background: #fff; border: 1.5px solid #c9d9f8; border-radius: 14px;
  font-size: 15px; color: var(--navy);
  box-shadow: 0 2px 10px rgba(47,111,237,.10);
  text-align: left;
}
body.chat-mode .sug-picker:active { background: #f0f5ff; }
body.chat-mode .sug-picker b { font-size: 15.5px; }
body.chat-mode .sug-picker-sub { flex: 1; text-align: right; font-size: 11.5px; color: var(--muted); }

/* 弹层：整体不滚动，只有选项区滚 —— 确认/取消键永远钉在底部可见 */
.sheet-mask {
  position: fixed; left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(15,23,42,.45); z-index: 80;
  display: flex; align-items: flex-end;
  animation: sheetFade .18s ease-out;
}
@keyframes sheetFade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: #fff; width: 100%;
  max-height: 80vh;
  display: flex; flex-direction: column;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(12px + env(safe-area-inset-bottom));
  animation: sheetUp .22s ease-out;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-title { flex: 0 0 auto; font-size: 15.5px; font-weight: 700; color: var(--navy); line-height: 1.5; margin-bottom: 2px; }
.sheet-sub { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.sheet-opts {
  margin-top: 10px; min-height: 0;
  flex: 0 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.sheet-opt {
  display: block; width: 100%; text-align: left;
  padding: 13px 16px; margin-bottom: 8px;
  font-size: 15px; line-height: 1.45; color: var(--text);
  background: #f7f9fc; border: 1.5px solid #e4eaf4; border-radius: 12px;
  transition: .12s;
}
.sheet-opt:active { transform: scale(.98); }
.sheet-opt.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.sheet-ok {
  flex: 0 0 auto;
  display: block; width: 100%; height: 46px; margin-top: 4px;
  background: var(--blue); color: #fff; border: none; border-radius: 23px;
  font-size: 15.5px; font-weight: 600;
}
.sheet-ok[disabled] { opacity: .45; }
.sheet-cancel {
  flex: 0 0 auto;
  display: block; width: 100%; height: 42px; margin-top: 8px;
  background: transparent; border: none; color: var(--muted); font-size: 13.5px;
}

/* ================================================================
   首页示例情景卡片（2026-11-05）· 假设场景，非真实案例
   ================================================================ */
.cases-wrap { margin-top: 14px; }
.cases-note {
  font-size: 10.5px; font-weight: 400; color: #8a6d1a;
  background: #fdf6e3; border: 1px solid #f0e2b6;
  border-radius: 8px; padding: 2px 7px; vertical-align: 2px;
}
.cases {
  display: flex; gap: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
  scroll-snap-type: x mandatory;
}
.cases::-webkit-scrollbar { display: none; }
.case-card {
  flex: 0 0 236px; scroll-snap-align: start;
  background: #fff; border: 1.5px solid #e4eaf4; border-radius: 14px;
  padding: 12px 14px;
}
.case-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.case-ico { font-size: 17px; }
.case-tag {
  font-size: 11px; font-weight: 600; color: var(--blue);
  background: #eef4ff; border-radius: 8px; padding: 2px 8px;
}
.case-q { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.5; }
.case-a {
  margin-top: 7px; font-size: 11.5px; color: var(--muted); line-height: 1.5;
  padding-top: 7px; border-top: 1px dashed #eef1f6;
}
.cases-foot { font-size: 10.5px; color: #9aa6b8; margin-top: 2px; line-height: 1.5; }
