/* ==========================================================================
 * 08 我的（蓝渐变头部 + 四维统计卡 + 常用功能六行 + 胶囊 Tab Bar + 悬浮球）
 * --------------------------------------------------------------------------
 * 与 01/04/07 同一套骨架（底色 #F1F4F7、白卡负 spread 阴影、胶囊 TabBar、悬浮球），
 * 三处本屏特有的差异都按 08-我的.png 实测：
 *   1. 头部是**个人信息头**（大标题 + 齿轮钮 → 60 头像 + 姓名/所属/徽章），
 *      高 212，底角圆角 22（截面量得半径 ≈ 23）
 *   2. 统计卡是**四等分无分隔线**的白卡（kit 里的 .mk-stats 是头部内的半透明条，
 *      带竖分隔线，两者不是一回事，所以单独开一份）
 *   3. 功能卡六行**没有发丝线**（x=600 整列扫过全白），行高 46
 * ========================================================================== */

/* ------------------------------ 头部 ------------------------------ */
body.mobile .mm-head {
  background: var(--m-grad-head);
  color: var(--m-on-brand);
  /* 62(设计稿状态栏) + 4 → 标题行 36 → 18 → 信息块 73 → 19 = 212（实测头部底边 211.5） */
  padding: calc(max(var(--m-status-h), var(--m-safe-top)) + 4px) var(--m-gutter-lg) 19px;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}

/* 标题行：左「我的」右齿轮，行高 36（齿轮的直径），两者垂直居中 */
body.mobile .mm-bar { display: flex; align-items: center; gap: 10px; min-height: 36px; }
body.mobile .mm-bar h1 {
  margin: 0; flex: 1; min-width: 0;
  font-size: 21px; font-weight: 600; line-height: 26px;
  letter-spacing: -.01em; color: var(--m-on-brand);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.mobile .mm-gear {
  width: 36px; height: 36px; flex: none; padding: 0; border: none;
  border-radius: 50%; background: rgba(255, 255, 255, .16); color: var(--m-on-brand);
  display: flex; align-items: center; justify-content: center;
}
body.mobile .mm-gear:active { background: rgba(255, 255, 255, .26); }

/* 信息块：头像是 60 的纯白圆（名字首字用品牌蓝），右侧三行文字与它垂直居中。
   上边距 18 是实测值：信息块（73）上 119.5 下 192.5，头像（60）居中落在 126~186 */
body.mobile .mm-me { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
body.mobile .mm-ava {
  width: 60px; height: 60px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--m-card); color: var(--m-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600; line-height: 1;
}
body.mobile .mm-ava img { width: 100%; height: 100%; object-fit: cover; }
body.mobile .mm-info { flex: 1; min-width: 0; }
body.mobile .mm-name {
  margin: 0; font-size: 19px; font-weight: 600; line-height: 24px;
  color: var(--m-on-brand);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.mobile .mm-sub {
  margin-top: 6px; font-size: 12.5px; line-height: 17px;
  color: var(--m-on-brand-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 徽章胶囊：高 21、内边距 9、圆角半高（实测 139×21，内边距 9） */
body.mobile .mm-badge {
  margin-top: 5px; display: inline-flex; align-items: center;
  height: 21px; padding: 0 9px; border-radius: 11px;
  background: rgba(255, 255, 255, .20); color: var(--m-on-brand);
  font-size: 11px; line-height: 1; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}

/* 骨架屏（加载中用微光扫过） */
body.mobile .mm-sk-head {
  background: var(--m-grad-head);
  padding: calc(max(var(--m-status-h), var(--m-safe-top)) + 4px) var(--m-gutter-lg) 13px;
  border-bottom-left-radius: 22px; border-bottom-right-radius: 22px;
}
body.mobile .mm-sk-me { display: flex; align-items: center; gap: 14px; margin-top: 24px; }

/* ------------------------------ 内容区 ------------------------------ */
/* 不用 .mk-body：它的「首张卡上边距 31」是 01 首页的口径，本屏实测是 16 */
body.mobile .mm-body { padding: 0 var(--m-gutter); }

/* ------------------------------ 四维统计卡 ------------------------------ */
/* 高 84 = 上 21 + 数值 25 + 4 + 标签 15 + 下 19；四等分、无分隔线 */
body.mobile .mm-stats {
  display: flex; margin-top: 16px;
  padding: 21px 0 19px;
  background: var(--m-card); border-radius: var(--m-r-card);
  box-shadow: var(--m-sh-card);
}
body.mobile .mm-stat { flex: 1; min-width: 0; text-align: center; }
body.mobile .mm-stat b {
  display: block; font-size: 20px; font-weight: 600; line-height: 25px;
  color: var(--m-brand);
  /* 数字等宽，四列数字位数不同时上下标签仍对得齐 */
  font-variant-numeric: tabular-nums;
}
body.mobile .mm-stat span {
  display: block; margin-top: 4px; font-size: 11.5px; line-height: 15px;
  color: var(--m-t3);
}

/* ------------------------------ 常用功能 ------------------------------ */
/* 区块标题上下 22 / 11（kit 的 .mk-sec 是 20 / 10，本屏实测略大，单独覆盖） */
body.mobile .mm-sec { margin: 22px 0 11px; }
body.mobile .mm-sec h3 { font-size: 13.5px; }
body.mobile .mm-sec button { font-size: 11.5px; }

/* 卡片上下各 6 的内边距：六行 ×46 = 276，加上 12 才是实测的 288 */
body.mobile .mm-menu { padding: 6px 0; border-radius: var(--m-r-card); }
/* 行高 46（图标 20 + 上下 13）；行间**不加发丝线**，与设计稿一致 */
body.mobile .mm-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 16px; text-align: left;
  background: none; border: none; cursor: pointer; font-family: var(--m-ff);
}
body.mobile .mm-row:active { background: #FAFBFC; }
body.mobile .mm-ic {
  width: 20px; height: 20px; flex: none; color: var(--m-brand);
  display: flex; align-items: center; justify-content: center;
}
body.mobile .mm-ic svg { width: 100%; height: 100%; display: block; }
body.mobile .mm-label {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500;
  line-height: 20px; color: var(--m-t1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.mobile .mm-arrow { flex: none; color: #CFD0D3; display: flex; }

/* ------------------------------ 设置面板（无设计稿，只放已有操作） -------- */
body.mobile .mm-set-sec {
  padding: 14px 2px 8px; font-size: 12px; color: var(--m-t3);
}
body.mobile .mm-set-th { display: flex; gap: 8px; }
body.mobile .mm-set-th button {
  flex: 1; height: 40px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-t2);
  font-size: 13px; font-family: var(--m-ff);
}
body.mobile .mm-set-th button.on {
  border-color: var(--m-brand); background: var(--m-tint); color: var(--m-brand); font-weight: 600;
}
body.mobile .mm-set-row { padding: 13px 2px; }

/* ------------------------------ 我的二维码名片 ------------------------------ */
body.mobile .mm-card{display:flex;flex-direction:column;gap:14px}
body.mobile .mm-card-top{display:flex;align-items:center;gap:12px}
body.mobile .mm-card-ava{
  flex:none;width:48px;height:48px;border-radius:16px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(140deg,var(--m-brand),#5B7CFA);color:#fff;font-size:19px;font-weight:700;
}
body.mobile .mm-card-top b{display:block;font-size:16px;color:var(--m-t1)}
body.mobile .mm-qr{
  display:flex;align-items:center;justify-content:center;
  padding:14px;border-radius:16px;background:#fff;border:1px solid var(--m-line);
}
body.mobile .mm-qr img{width:200px;height:200px;display:block}
body.mobile .mm-qr-err{text-align:center;font-size:12px;color:var(--m-warn);line-height:1.8;padding:26px 0}
body.mobile .mm-card-link{
  font-size:11px;color:var(--m-t4);word-break:break-all;line-height:1.6;
  background:var(--m-line-2,#F2F5F9);border-radius:10px;padding:8px 10px;
}


/* ==========================================================================
 * 页面标题统一（对齐「案件」的标题字）
 * --------------------------------------------------------------------------
 * 之前各屏标题各写一套：首页 26px/600、我的 21px/600、案件 20px/700，
 * 字距还是 -0.01em —— 中文用负字距会显得挤且发闷，跨屏切换时字号忽大忽小。
 * 这里统一成：20px / 700 / 字距 .2px / 同一字体栈，四屏一致。
 * 本文件在 mobile-kit、mobile-cases、mobile-me 之后加载，能覆盖这些旧值。
 * ========================================================================== */
body.mobile .mk-head h1,
body.mobile .mm-bar h1,
body.mobile .mc-head h1,
body.mobile .mct-head h1 {
  margin: 0;
  font-family: var(--m-ff);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .2px;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}
/* 副标题同步收一档，避免 15px 压过标题 */
body.mobile .mk-head-sub {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .86);
  letter-spacing: 0;
}

/* C 端（注册用户）：不显示律所内部导航与悬浮球 */
/* C 端：外壳那五个 Tab 仍隐藏，改用页面内自绘的三格导航 */
body.mobile.consumer-mode .tabbar,
body.mobile.consumer-mode .mk-fab { display: none !important; }
/* 导航改为 sticky 后不再占据固定层，页面无需为它预留 72px */
body.mobile.consumer-mode .mk-page { padding-bottom: 0 !important; }

/* C 端布局：.view 变成「页面 + 导航」两行的弹性列。
   导航是固定的一行，页面自己滚动 —— 不依赖 fixed / sticky，
   所以既不会被视口顶出屏幕，也不会在内容短时飘到中间。 */
body.mobile.consumer-mode .view {
  display: flex;
  flex-direction: column;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
}
body.mobile.consumer-mode .view > .mk-page {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* 底部留白 = 胶囊高(约64) + 距底24 + 余量，内容不会被胶囊压住 */
  padding-bottom: calc(40px + 58px + 14px + 8px) !important;
}
/* C 端（注册用户）：隐藏律所侧边栏、顶栏与汉堡按钮 */
body.mobile.consumer-mode .sidebar,
body.mobile.consumer-mode .topbar,
body.mobile.consumer-mode .hamburger { display: none !important; }
/* 与 mk-screen 同一套做法：整页交给 .mk-page，不要动 .app 的栅格。
   上一版用 grid-template-columns: 0 1fr 强行抽掉侧栏，把整个 C 端页面的
   宽度与内边距全部带偏了 —— 这才是「用户端全变了」的原因。 */
body.mobile.consumer-mode .app { display: block; }
body.mobile.consumer-mode .main { width: 100%; }
body.mobile.consumer-mode .view { padding: 0; }

/* ==========================================================================
 * 能力页（#/m/xx）在手机上的布局
 * --------------------------------------------------------------------------
 * 工作台原本是桌面两栏：grid-template-columns: minmax(340px,412px) 1fr。
 * 手机宽度只有 360~430，强制两栏会横向溢出；而外壳在整屏模式下锁了高度，
 * 结果就是「上面被状态栏切掉、下面滚不动」。
 * 这里在手机上改成单列：标题区留出安全区，表单与结果顺序排列，整页可滚。
 * ========================================================================== */
@media (max-width: 900px) {
  body.mobile.mk-module .app,
  body.mobile.mk-module .main,
  body.mobile.mk-module .view {
    height: auto !important;
    overflow: visible !important;
  }
  body.mobile.mk-module .view { background: #F2F6FD; }

  body.mobile.mk-module .wb-head {
    padding: calc(max(var(--m-status-h, 62px), var(--m-safe-top)) + 14px) 16px 4px;
    margin-bottom: 10px;
    align-items: center;
    gap: 12px;
  }
  body.mobile.mk-module .wb-head .icobox {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
  }
  body.mobile.mk-module .wb-head h2 { font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
  body.mobile.mk-module .wb-head p { font-size: 12px; line-height: 1.6; }

  body.mobile.mk-module .workbench {
    display: block;
    padding: 0 14px calc(var(--m-tabbar-h) + var(--m-tabbar-bottom) + var(--m-safe-bottom) + 28px);
  }
  body.mobile.mk-module .workbench > .wb-form { padding: 14px; }
  body.mobile.mk-module .workbench > .wb-result { margin-top: 14px; min-height: 300px; }
  body.mobile.mk-module .result.is-waiting { min-height: 300px; }
  body.mobile.mk-module .wb-head p { max-width: none; }

  /* C 端没有底部导航，底部留白相应收窄 */
  body.mobile.mk-module.consumer-mode .workbench { padding-bottom: 28px; }
}

/* 能力页返回键：它在最上面，安全区留白由它承担，标题区就不用再让一次 */
body.mobile.mk-module .wb-back {
  display: inline-flex; align-items: center;
  align-self: flex-start;          /* .view 是弹性列，子项默认横向拉伸成通栏 */
  width: auto;
  margin: calc(max(var(--m-status-h, 62px), var(--m-safe-top)) + 10px) 16px 0;
  height: 32px; padding: 0 14px; border: 1px solid #E3EAF6; border-radius: 999px;
  background: #fff; color: #2C5FA8; font-size: 12.5px; font-weight: 600;
}
body.mobile.mk-module .wb-head { padding-top: 8px; }
/* 能力页滚动修正：不要把外壳改成 auto，而是让 .view 自己成为滚动容器。
   桌面布局 .app 是 100vh + overflow:hidden，上一层让 body 滚动行不通，
   必须把高度约束留在 .app/.main，把 overflow-y 交给 .view。 */
@media (max-width: 900px) {
  body.mobile.mk-module .app {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: block !important;
  }
  body.mobile.mk-module .main {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
  }
  body.mobile.mk-module .view {
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 24px !important;
  }
}
/* 页面自带 min-height:100vh（写在 style 属性里），在弹性列里会把导航挤出可视区，
   这里用 !important 压回 0，让页面只占「剩余高度」并自己滚动，导航才有位置。 */
body.mobile.consumer-mode .view > .mk-page {
  min-height: 0 !important;
  height: auto !important;
}

/* ==========================================================================
 * C 端（注册用户）在 PC 网页上的处理
 * --------------------------------------------------------------------------
 * 外壳保持原样（侧栏 + 顶栏 + 品牌），侧栏菜单内容由 shell.renderNav
 * 针对 C 端单独渲染（只有 首页 / AI 咨询 / 个人中心 三项）。
 * 这里只做两件样式收尾：底部胶囊在 PC 上居中限宽；挡板在 PC 隐藏
 * （PC 上没有手势条，胶囊直接贴可视区底部即可）。
 * ========================================================================== */
body.consumer-mode nav[data-cnav-bar] {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: min(652px, calc(100vw - 28px));
}
body.consumer-mode [data-cnav-cover] { display: none !important; }

body.consumer-mode {
  /* ---------------- 品牌色 ---------------- */
  --m-brand: #0064E0;          /* 主色：激活态 / 主按钮 / 图标描边 */
  --m-brand-lt: #0091FF;       /* 亮色：渐变终点 */
  --m-brand-dp: #0545C4;       /* 头部渐变起点 */
  --m-brand-deep: #03216B;     /* 登录页渐变起点 */
  --m-tint: #E7F0FF;           /* 浅蓝底：徽章 / 选中态 / 图标砖 */
  --m-tint-tx: #0A4FA8;        /* 浅蓝底上的正文 */

  /* ---------------- 文字 ---------------- */
  --m-t1: #1C1E21;             /* 主标题 / 重要数值 */
  --m-t2: #5D6C7B;             /* 正文 / 次级标题 */
  --m-t3: #8595A4;             /* 辅助说明 / 时间戳 */
  --m-t4: #BCC0C4;             /* 占位符 / 禁用 */
  --m-on-brand: #FFFFFF;
  --m-on-brand-2: rgba(255, 255, 255, .82);
  --m-on-brand-3: rgba(255, 255, 255, .62);

  /* ---------------- 背景与描边 ---------------- */
  --m-bg: #F1F4F7;             /* 页面底色（浅灰蓝，不是纯白也不是纯灰） */
  --m-card: #FFFFFF;
  --m-line: #EDF0F3;           /* 发丝线 / 卡片描边 */

  /* ---------------- 功能色 ---------------- */
  --m-danger: #E41E3F;
  --m-warn: #FF8F1F;
  --m-ok: #07C160;
  --m-danger-bg: rgba(228, 30, 63, .10);
  --m-warn-bg: rgba(255, 143, 31, .12);
  --m-ok-bg: rgba(7, 193, 96, .10);

  /* ---------------- 渐变 ---------------- */
  /* 头部 / FAB：135° 左上深蓝 → 右下亮蓝。方向反了整页会发暗 */
  --m-grad-head: linear-gradient(135deg, #0545C4 0%, #0A8CFF 100%);
  --m-grad-btn: linear-gradient(90deg, #0064E0 0%, #0091FF 100%);
  /* 登录页整屏底色。规范表写的是 135°，但按 24-登录页.png 实测：等色线连
     (350,0)-(195,292.5)、(50,292.5)-(195,0)，两组都指向 116~118°，所以是 117°
     而不是 135°；三个色停也是在 PNG 上反解出来的（误差 ≤ 一个色阶）。 */
  --m-grad-login: linear-gradient(117deg, #043C70 0%, #0450BE 35%, #0091FF 74%);
  --m-grad-fab: radial-gradient(120% 120% at 20% 10%, #2E9BFF 0%, #0064E0 62%, #0545C4 100%);

  /* ---------------- 圆角 ---------------- */
  --m-r-tab: 36px;
  --m-r-pill: 26px;
  --m-r-fab: 29px;
  --m-r-btn: 24px;
  --m-r-card-lg: 22px;
  --m-r-card: 20px;
  --m-r-cap: 19px;
  --m-r-grid: 14px;
  --m-r-chip: 6px;

  /* ---------------- 阴影（统一深蓝色相，带负 spread） ---------------- */
  --m-sh-card: 0 6px 18px -2px rgba(8, 33, 77, .07);
  --m-sh-tabbar: 0 8px 24px -4px rgba(8, 33, 77, .14);
  --m-sh-fab: 0 8px 18px -2px rgba(0, 100, 224, .40);
  --m-sh-btn: 0 6px 14px -2px rgba(0, 100, 224, .35);
  --m-sh-bar: 0 -6px 16px -2px rgba(8, 33, 77, .10);

  /* ---------------- 字号 ---------------- */
  --m-fs-display: 27px;
  --m-fs-h1: 21px;
  --m-fs-h2: 16.5px;
  --m-fs-h3: 16px;
  --m-fs-title: 15px;
  --m-fs-section: 13.5px;
  --m-fs-group: 13px;
  --m-fs-body: 12.5px;
  --m-fs-sub: 12px;
  --m-fs-note: 11.5px;
  --m-fs-grid: 11px;
  --m-fs-tab: 10px;
  --m-fs-micro: 10.5px;

  --m-lh-loose: 21px;          /* 中文长段落，必须显式给，别用自动行距 */

  /* ---------------- 字体 ---------------- */
  /* 系统字体优先、Noto 兜底：全量中文 Noto 自托管要 10MB+，
     为视觉几乎无差的效果付出首屏体积不划算（已确认这个取舍）。 */
  --m-ff: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Noto Sans SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;

  /* ---------------- 布局 ---------------- */
  --m-gutter: 20px;
  --m-gutter-lg: 22px;
  --m-tabbar-h: 62px;
  /* 按设计稿 PNG 实测值（胶囊 762~821.5 → 距底 22）。
     先前我用验收清单里写的 12，那是我的选择，不是设计稿的值。 */
  --m-tabbar-bottom: 22px;
  --m-fab: 58px;
  --m-safe-top: env(safe-area-inset-top, 0px);
  /* 底部安全区必须走 --m-safe-b，不能直接写 env()。
     安卓 WebView 不实现 env(safe-area-inset-*)（恒为 0），而套壳 App 的
     web-view 是画到屏幕最底边的 —— app-ui.css 因此用一个固定值顶替了
     --m-safe-b（html.in-app 时 34px）。kit 里如果自己再定义一份 env()，
     等于把那层兜底绕开了：胶囊 Tab Bar、悬浮球、底部按钮条的安全区全算 0，
     于是被系统手势条/三键导航压住，图标发暗、文字缺一半。
     这里改成优先取 --m-safe-b，浏览器里它本身就等于 env()，两边都对。 */
  --m-safe-bottom: var(--m-safe-b, env(safe-area-inset-bottom, 0px));
  /* 设计稿顶部那条 62px 状态栏装饰：图标不画，但保留高度占位，
     预览才与设计稿位置一致。放在根作用域，各屏（含子页面导航栏）都能用。
     套壳 App 里由 html.in-app 改成一个小的固定值，见下面那条规则。 */
  --m-status-h: 62px;
}
/* ==========================================================================
 * 03 AI 对话（子页面：白底导航栏，无胶囊 TabBar、无悬浮球，底部输入条）
 * --------------------------------------------------------------------------
 * 与 01/02 的骨架不同，逐条对照设计稿：
 *   · 顶部白底导航栏（不是蓝渐变头）：左返回圆钮 · 居中标题 16.5px（规范 H2）
 *     · 右 + 圆钮；副标题是成功绿的「已接入本地裁判文书库」
 *   · 没有底部胶囊 Tab Bar、没有悬浮 AI 按钮 —— 底部整块让给输入条
 *   · 页面底色 #F1F4F7，气泡与卡片浮在其上（卡片阴影）
 *
 * 尺寸取自规范（字号 / 圆角 / 颜色 / 阴影）；规范没逐项给出的（气泡内边距、
 * 卡片密度、输入条高度）按设计稿实测密度取整，并用逐屏比对收敛 ——
 * 第一版偏松，类案卡第二行被挤出屏外，这一版是收紧后的值。
 * ========================================================================== */

/* ------------------------------ 顶部导航栏 ------------------------------ */
body.consumer-mode .ma-nav {
  position: sticky; top: 0; z-index: 6;
  background: var(--m-card);
  border-bottom: 1px solid var(--m-line);
  /* 与 01/02 同一套状态栏占位：62px 占位 与 真机安全区 取较大者；
     套壳 App 里 --m-status-h 由 mobile-kit.css 归零，不会叠出两条。 */
  padding-top: max(var(--m-status-h, 62px), var(--m-safe-top));
}
body.consumer-mode .ma-nav-in {
  position: relative; height: 48px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 var(--m-gutter);
}
body.consumer-mode .ma-round {
  width: 32px; height: 32px; flex: none; padding: 0; border: none;
  border-radius: 50%; background: #F1F4F7; color: var(--m-t1);
  display: flex; align-items: center; justify-content: center;
}
body.consumer-mode .ma-round.back { position: absolute; left: var(--m-gutter); }
body.consumer-mode .ma-round.plus { position: absolute; right: var(--m-gutter); }
body.consumer-mode .ma-round:active { background: #E7EBF0; }
/* 图标集只有右向 chevron，「返回」语义必须朝左 —— 翻过来，不另造图标 */
body.consumer-mode .ma-round.back svg { transform: rotate(180deg); }

body.consumer-mode .ma-title { text-align: center; min-width: 0; }
body.consumer-mode .ma-title b {
  display: block; font-size: var(--m-fs-h2); font-weight: 600; color: var(--m-t1);
  line-height: 1.25;
}
body.consumer-mode .ma-title span {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  margin-top: 1px; font-size: var(--m-fs-micro); color: var(--m-ok);
}
body.consumer-mode .ma-title span .mk-ic { color: var(--m-ok); }

/* ------------------------------ 消息流 ------------------------------ */
body.consumer-mode .ma-body {
  padding: 12px var(--m-gutter) 10px;
  display: flex; flex-direction: column; gap: 11px;
}
body.consumer-mode .ma-msg { display: flex; align-items: flex-start; gap: 9px; }
body.consumer-mode .ma-ava {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--m-grad-head); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--m-sh-card);
}
body.consumer-mode .ma-bubble {
  max-width: 232px; padding: 10px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--m-card); color: var(--m-t1);
  font-size: 13.5px; line-height: 1.68;
  box-shadow: var(--m-sh-card);
}
/* 用户消息：右对齐、品牌蓝实心 */
body.consumer-mode .ma-msg.me { justify-content: flex-end; }
body.consumer-mode .ma-msg.me .ma-bubble {
  border-radius: 14px 14px 4px 14px;
  background: var(--m-brand); color: #fff;
}

/* ------------------------------ 研判卡 ------------------------------ */
body.consumer-mode .ma-card {
  background: var(--m-card); border: 1px solid var(--m-line);
  border-radius: var(--m-r-card); box-shadow: var(--m-sh-card);
  padding: 12px 12px 11px;
}
body.consumer-mode .ma-card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
body.consumer-mode .ma-card-h em {
  font-style: normal; height: 20px; padding: 0 7px; border-radius: var(--m-r-chip);
  background: var(--m-tint); color: var(--m-tint-tx);
  font-size: var(--m-fs-micro); font-weight: 600;
  display: inline-flex; align-items: center;
}
body.consumer-mode .ma-card-h span { font-size: var(--m-fs-micro); color: var(--m-t3); }

/* 研判条目：左侧标记 + 一段文字 */
body.consumer-mode .ma-item { display: flex; gap: 8px; }
body.consumer-mode .ma-item + .ma-item { margin-top: 9px; }
body.consumer-mode .ma-item .mk-ic { flex: none; margin-top: 2px; }
body.consumer-mode .ma-item.ok .mk-ic { color: var(--m-ok); }
body.consumer-mode .ma-item.warn .mk-ic { color: var(--m-warn); }
body.consumer-mode .ma-item p {
  margin: 0; font-size: 12.5px; line-height: 1.68; color: var(--m-t2);
}
body.consumer-mode .ma-item p b { color: var(--m-t1); font-weight: 600; }

/* 卡片底部两枚动作按钮 */
body.consumer-mode .ma-acts { display: flex; gap: 9px; margin-top: 12px; }
body.consumer-mode .ma-btn {
  flex: 1; height: 36px; border-radius: 18px; border: none;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-family: var(--m-ff);
}
body.consumer-mode .ma-btn.solid { background: var(--m-grad-btn); color: #fff; box-shadow: var(--m-sh-btn); }
body.consumer-mode .ma-btn.ghost { background: var(--m-card); color: var(--m-t1); border: 1px solid var(--m-line); }
body.consumer-mode .ma-btn:active { transform: scale(.98); }

/* ------------------------------ 追问建议（横向胶囊） ------------------------------ */
body.consumer-mode .ma-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
body.consumer-mode .ma-chips::-webkit-scrollbar { display: none; }
body.consumer-mode .ma-chip {
  flex: none; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--m-card); border: 1px solid var(--m-line);
  color: var(--m-t1); font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; cursor: pointer;
  font-family: var(--m-ff);
}
body.consumer-mode .ma-chip:active { background: #F7F9FB; }

/* ------------------------------ 关联类案推送 ------------------------------ */
body.consumer-mode .ma-case { display: flex; gap: 8px; align-items: flex-start; }
body.consumer-mode .ma-case + .ma-case { margin-top: 10px; }
body.consumer-mode .ma-case .mk-ic { flex: none; color: var(--m-brand); margin-top: 2px; }
body.consumer-mode .ma-case p {
  margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--m-t1);
}
body.consumer-mode .ma-case p i { font-style: normal; color: var(--m-t3); }

/* ------------------------------ 底部输入条 ------------------------------ */
body.consumer-mode .ma-input {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--m-card);
  border-top: 1px solid var(--m-line);
  padding: 9px var(--m-gutter) calc(9px + var(--m-safe-bottom));
  display: flex; align-items: center; gap: 9px;
}
body.consumer-mode .ma-input .ma-round { width: 32px; height: 32px; }
body.consumer-mode .ma-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 18px;
  background: #F1F4F7; color: var(--m-t4);
  font-size: 12.5px; font-family: var(--m-ff);
  border: none; outline: none;
}
body.consumer-mode .ma-field.mk-on { color: var(--m-t1); }
body.consumer-mode .ma-send {
  width: 36px; height: 36px; flex: none; padding: 0; border: none;
  border-radius: 50%; background: var(--m-grad-fab); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--m-sh-fab);
}
body.consumer-mode .ma-send:active { transform: scale(.95); }
body.consumer-mode .ma-send:disabled { background: #C6D6E6; box-shadow: none; }

/* 输入条高度补偿：不让最后一条消息被压在输入条下面 */
body.consumer-mode .ma-page { padding-bottom: calc(54px + var(--m-safe-bottom) + 10px); }

/* ------------------------------ 真实会话的补充样式 ------------------------------
   上面那套版式是照设计稿做的静态帧，气泡里是一段段短文案。
   换成真实会话后多了三样东西，这里只补这三样，版式一行未改：
     · 模型输出的 Markdown（小标题 / 列表 / 引用 / 加粗 / 行内代码）
     · 等待回复的动态提示
     · 失败气泡（接口未配置、额度不足、密钥无效都走这里，原样显示服务端原因）
   ---------- */

/* 助手气泡装得下一段正文：比用户短句略宽，仍不占满一行 */
body.consumer-mode .ma-bubble.ma-md { max-width: 262px; }
body.consumer-mode .ma-md > *:first-child { margin-top: 0; }
body.consumer-mode .ma-md > *:last-child { margin-bottom: 0; }
body.consumer-mode .ma-md p { margin: 0 0 7px; }
body.consumer-mode .ma-md h4 { margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--m-t1); }
body.consumer-mode .ma-md ul, body.consumer-mode .ma-md ol { margin: 0 0 7px; padding-left: 17px; }
body.consumer-mode .ma-md li { margin: 2px 0; }
body.consumer-mode .ma-md strong { font-weight: 600; color: var(--m-t1); }
body.consumer-mode .ma-md em { font-style: normal; color: var(--m-brand); }
body.consumer-mode .ma-md code {
  background: #EEF3FA; border-radius: 4px; padding: 1px 5px;
  font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
body.consumer-mode .ma-md blockquote {
  margin: 0 0 7px; padding: 2px 0 2px 9px;
  border-left: 2px solid var(--m-line); color: var(--m-t2);
}
body.consumer-mode .ma-md hr { border: none; border-top: 1px solid var(--m-line); margin: 8px 0; }
body.consumer-mode .ma-md a { color: var(--m-brand); }

/* Markdown 表格：气泡内横向滚动，表头固定底色，避免竖线原文糊成一团 */
body.consumer-mode .ma-md .ma-table-wrap {
  max-width: 100%;
  margin: 8px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--m-line);
  border-radius: 8px;
  background: #fff;
}
body.consumer-mode .ma-md .ma-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
  line-height: 18px;
  color: var(--m-t1);
}
body.consumer-mode .ma-md .ma-table th,
body.consumer-mode .ma-md .ma-table td {
  padding: 7px 9px;
  border-right: 1px solid var(--m-line);
  border-bottom: 1px solid var(--m-line);
  vertical-align: top;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body.consumer-mode .ma-md .ma-table th {
  background: #F3F6FB;
  font-weight: 600;
  white-space: nowrap;
}
body.consumer-mode .ma-md .ma-table tr:last-child td { border-bottom: none; }
body.consumer-mode .ma-md .ma-table th:last-child,
body.consumer-mode .ma-md .ma-table td:last-child { border-right: none; }

/* 等待回复：三点呼吸。与首屏骨架同一取向 —— 不用转圈 */
body.consumer-mode .ma-typing { display: flex; align-items: center; gap: 4px; min-width: 46px; }
body.consumer-mode .ma-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--m-t4);
  animation: ma-dot 1.1s infinite ease-in-out;
}
body.consumer-mode .ma-typing i:nth-child(2) { animation-delay: .16s; }
body.consumer-mode .ma-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes ma-dot {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* 失败气泡 */
body.consumer-mode .ma-ava.err { background: #FFF4E5; color: var(--m-warn); box-shadow: none; }
body.consumer-mode .ma-bubble.ma-err { background: #FFF9F0; border: 1px solid #F4E0BE; box-shadow: none; }
body.consumer-mode .ma-bubble.ma-err p { margin: 0; color: #8A5A06; }
body.consumer-mode .ma-retry {
  margin-top: 8px; height: 28px; padding: 0 14px; border-radius: 14px;
  border: 1px solid #E9CFA0; background: #fff; color: #8A5A06;
  font-size: 12px; font-family: var(--m-ff);
}

/* 顶部副标题：没接上接口时用提醒色，别让「已接入」一直显示成成功绿 */
body.consumer-mode .ma-title span.off { color: var(--m-warn); }
body.consumer-mode .ma-title span.off .mk-ic { color: var(--m-warn); }

/* ---------------- PC 端 C 用户：对话页与页面容器适配 ---------------- */
body.consumer-mode .ma-nav { padding-top: 0 !important; }
body.consumer-mode .ma-page {
  max-width: 780px; margin: 0 auto;
  background: transparent; padding-bottom: 96px !important;
}
body.consumer-mode .ma-body { padding: 18px 24px 12px; gap: 14px; }
body.consumer-mode .ma-bubble { max-width: 560px; font-size: 14px; line-height: 1.75; }
body.consumer-mode .ma-bubble.ma-md { max-width: 620px; }
body.consumer-mode .ma-msg.me .ma-bubble { font-size: 14px; }
body.consumer-mode .ma-nav-in { max-width: 780px; margin: 0 auto; }
body.consumer-mode .ma-input {
  left: 50%; right: auto; transform: translateX(-50%);
  width: min(780px, calc(100vw - 40px));
  border-radius: 18px 18px 0 0; border: 1px solid var(--m-line); border-bottom: none;
  padding: 10px 16px;
}
body.consumer-mode .ma-field { height: 40px; font-size: 13.5px; }
body.consumer-mode .ma-send, body.consumer-mode .ma-input .ma-round { width: 38px; height: 38px; }

/* ==========================================================================
 * PC 端 C 用户（第二轮）
 * --------------------------------------------------------------------------
 * ① 底部胶囊导航：PC 上删除 —— 侧栏已有「首页 / AI 咨询 / 个人中心」，
 *    两条导航重复；手机端保留（手机没有侧栏）。
 * ② AI 对话页：不再居中窄卡，铺满顶栏以下的整个内容区
 *    （顶栏约 57px），消息区自己滚动，输入条贴在页面底部。
 * ========================================================================== */
body.consumer-mode:not(.mobile) [data-cnav] { display: none !important; }

body.consumer-mode:not(.mobile) .ma-page {
  max-width: none;
  width: 100%;
  height: calc(100vh - 57px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #F6F8FC;
  padding-bottom: 0 !important;
}
body.consumer-mode:not(.mobile) .ma-nav {
  flex: none;
  border-bottom: 1px solid #E8EEF8;
  background: #fff;
}
body.consumer-mode:not(.mobile) .ma-body {
  flex: 1 1 auto;
  /* 关键：弹性列里的可滚动子项必须有 min-height:0，
     否则内容多高它就多高，把页面顶得比容器高 —— 顶部导航
     看起来就『压在消息上』了 */
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 22px 32px;
}
body.consumer-mode:not(.mobile) .ma-nav { position: static !important; }
body.consumer-mode:not(.mobile) .ma-input {
  position: static;
  transform: none;
  width: auto;
  border: none;
  border-top: 1px solid #E8EEF8;
  border-radius: 0;
  padding: 12px 32px;
  background: #fff;
}
body.consumer-mode:not(.mobile) .ma-field { height: 42px; border-radius: 21px; }
body.consumer-mode:not(.mobile) .ma-send,
body.consumer-mode:not(.mobile) .ma-input .ma-round { width: 38px; height: 38px; }

/* PC 对话页细节：返回/新建圆钮贴两端；追问胶囊居中 */
body.consumer-mode:not(.mobile) .ma-round.back { left: 16px; }
body.consumer-mode:not(.mobile) .ma-round.plus { right: 16px; }
body.consumer-mode:not(.mobile) .ma-chips { justify-content: center; }
/* PC 对话页补充：‹/＋ 绝对定位到导航条两端（这些定位规则原本只在
   body.mobile 作用域里，PC 上从未生效过 —— 所以按钮一直挤在中间） */
body.consumer-mode:not(.mobile) .ma-nav-in { position: relative; }
body.consumer-mode:not(.mobile) .ma-round.back { position: absolute; left: 16px; }
body.consumer-mode:not(.mobile) .ma-round.plus { position: absolute; right: 16px; }
/* 追问胶囊与上方气泡对齐：先缩进一个头像位（32 + 间距9），再在剩余宽度里居中 */
body.consumer-mode:not(.mobile) .ma-chips { margin-left: 41px; justify-content: center; }

/* ==========================================================================
 * PC 端 C 用户 · AI 咨询页（重新设计）
 * --------------------------------------------------------------------------
 * 之前只是把手机版样式镜像过来，结果：灰条导航、气泡挤在左上、
 * 追问胶囊漂浮、输入条还跑到视口外。这次按桌面聊天的常态重做：
 *   · 顶部：白色圆角标题条（含品牌徽标 / 标题 / 新对话）
 *   · 中部：居中内容列，助手气泡为白卡 + 渐变头像
 *   · 空状态：三个建议卡片横排（不是漂浮的胶囊）
 *   · 底部：白色浮动输入卡，始终贴在视口底部、与内容列同宽
 * 输入卡用 fixed + JS 注入的 --chat-left/--chat-w 对齐主区（侧栏宽度会变）。
 * ========================================================================== */
body.consumer-mode:not(.mobile) .ma-page {
  background: #F5F8FD;
  padding-bottom: 130px !important;   /* 给底部输入卡让位 */
}

/* 顶部标题条：白卡，不再是通栏灰条 */
body.consumer-mode:not(.mobile) .ma-nav {
  background: transparent;
  border-bottom: none;
  padding: 14px 24px 0;
}
body.consumer-mode:not(.mobile) .ma-nav-in {
  position: relative;
  height: 56px;
  background: #fff;
  border: 1px solid #E9EFF8;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(20, 50, 120, .06);
}
/* 标题左侧加一个品牌徽标，视觉上不再是一行干字 */
body.consumer-mode:not(.mobile) .ma-title b::before {
  content: 'AI';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1F6BFF, #59A6FF);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  vertical-align: -6px;
}
body.consumer-mode:not(.mobile) .ma-title b { font-size: 16px; }
body.consumer-mode:not(.mobile) .ma-title span { font-size: 11.5px; }

/* 内容列 */
body.consumer-mode:not(.mobile) .ma-body {
  padding: 20px 32px 12px;
  gap: 16px;
}
body.consumer-mode:not(.mobile) .ma-ava {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #1F6BFF, #59A6FF);
  box-shadow: 0 6px 14px rgba(31, 107, 255, .25);
}
body.consumer-mode:not(.mobile) .ma-bubble {
  max-width: 640px;
  padding: 14px 18px;
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  border: 1px solid #EDF1F7;
  box-shadow: 0 8px 22px rgba(20, 50, 120, .06);
  font-size: 14px;
  line-height: 1.8;
}
body.consumer-mode:not(.mobile) .ma-msg.me .ma-bubble {
  border-radius: 16px 16px 6px 16px;
  background: linear-gradient(135deg, #1F6BFF, #3B8BFF);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(31, 107, 255, .24);
}

/* 空状态建议：三张卡片横排，与气泡左缘对齐 */
body.consumer-mode:not(.mobile) .ma-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 0 43px;
  overflow: visible;
}
body.consumer-mode:not(.mobile) .ma-chip {
  height: auto;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #E6EEFB;
  box-shadow: 0 6px 16px rgba(20, 50, 120, .05);
  font-size: 13px;
  font-weight: 500;
  color: #1B2740;
  justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
body.consumer-mode:not(.mobile) .ma-chip:hover {
  transform: translateY(-1px);
  border-color: #C9DCFA;
  box-shadow: 0 10px 22px rgba(20, 50, 120, .1);
}

/* 底部输入卡：白色浮动，与内容列同宽、贴视口底 */
body.consumer-mode:not(.mobile) .ma-input {
  position: fixed !important;
  left: var(--chat-left, 262px);
  right: auto;
  transform: none;
  bottom: 18px;
  width: min(880px, calc(var(--chat-w, 100vw) - 64px));
  margin: 0 auto;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #E6EEFB;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(20, 50, 120, .12);
  z-index: 20;
}
body.consumer-mode:not(.mobile) .ma-field {
  height: 44px;
  border-radius: 22px;
  background: #F4F7FC;
  font-size: 14px;
  padding: 0 16px;
}
body.consumer-mode:not(.mobile) .ma-send,
body.consumer-mode:not(.mobile) .ma-input .ma-round { width: 40px; height: 40px; }
body.consumer-mode:not(.mobile) .ma-send {
  background: linear-gradient(135deg, #1F6BFF, #59A6FF);
  box-shadow: 0 8px 18px rgba(31, 107, 255, .3);
}

/* ==========================================================================
 * PC 对话页 · 定版布局
 *  · 顶部标题条 / 底部输入卡：通栏（左右只留 16px），不再居中留白
 *  · 页面整体不滚动：flex 列，高度 = 视口 − 顶栏，只有消息区滚动
 * ========================================================================== */
body.consumer-mode:not(.mobile) .ma-page {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  padding: 0 !important;
  background: #F5F8FD;
}
body.consumer-mode:not(.mobile) .ma-nav {
  flex: none;
  padding: 12px 16px 0 !important;
  background: transparent !important;
  border: none !important;
}
body.consumer-mode:not(.mobile) .ma-nav-in {
  margin: 0 !important;
  width: 100% !important;
  height: 56px;
  background: #fff;
  border: 1px solid #E9EFF8;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(20, 50, 120, .06);
}
body.consumer-mode:not(.mobile) .ma-body {
  flex: 1 1 auto;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 16px 24px 12px !important;
}
body.consumer-mode:not(.mobile) .ma-chips {
  margin: 4px 0 0 43px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.consumer-mode:not(.mobile) .ma-input {
  position: static !important;
  left: auto !important;
  width: auto !important;
  flex: none;
  transform: none !important;
  margin: 8px 16px 16px !important;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #E6EEFB;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(20, 50, 120, .10);
}

/* ==========================================================================
 * PC 端 C 用户 · AI 咨询页（最终版式）
 * --------------------------------------------------------------------------
 * 反馈里最刺眼的是：标题条是块悬空白卡、右边还多出一块空盒子、
 * 三个建议被拉成通栏长条、输入条贴不到底。根因是前面几轮改样式时
 * 留下的定位/宽度/外边距互相叠加。这里**不再叠加**，而是把该页所有
 * 关键属性一次性重写（位置、宽度、外边距、圆角、阴影全部显式声明），
 * 并把「返回 / 新建」改成 grid 三栏的静态布局，彻底摆脱 absolute 的漂移。
 *
 * 版式：通栏白顶栏（60px）→ 内容列（限宽 860，居中）→ 白底输入栏。
 * 页面整体不滚，只有消息列滚动。
 * ========================================================================== */
body.consumer-mode:not(.mobile) .ma-page {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: #F4F7FC !important;
}

/* ---------- 顶栏：通栏白条 ---------- */
body.consumer-mode:not(.mobile) .ma-nav {
  flex: none !important;
  position: static !important;
  padding: 0 !important;
  background: #fff !important;
  border-bottom: 1px solid #E8EEF8 !important;
}
body.consumer-mode:not(.mobile) .ma-nav-in {
  position: static !important;
  display: grid !important;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  width: 100% !important;
  max-width: none !important;
  height: 60px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  background: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.consumer-mode:not(.mobile) .ma-round.back { position: static !important; justify-self: start; }
body.consumer-mode:not(.mobile) .ma-round.plus { position: static !important; justify-self: end; }
body.consumer-mode:not(.mobile) .ma-round {
  background: #F2F5FA !important;
  color: #1B2740 !important;
  width: 34px !important; height: 34px !important;
}
body.consumer-mode:not(.mobile) .ma-round:hover { background: #E8EEF8 !important; }
body.consumer-mode:not(.mobile) .ma-title { text-align: center !important; }
body.consumer-mode:not(.mobile) .ma-title b { font-size: 15.5px !important; }
body.consumer-mode:not(.mobile) .ma-title span { font-size: 11.5px !important; margin-top: 0 !important; }

/* ---------- 消息列 ---------- */
body.consumer-mode:not(.mobile) .ma-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 24px 24px 12px !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 860px;
  margin: 0 auto !important;
}
body.consumer-mode:not(.mobile) .ma-ava {
  width: 34px !important; height: 34px !important;
  background: linear-gradient(135deg, #1F6BFF, #59A6FF) !important;
  box-shadow: 0 6px 14px rgba(31, 107, 255, .22) !important;
}
body.consumer-mode:not(.mobile) .ma-bubble {
  max-width: 620px !important;
  padding: 13px 17px !important;
  border-radius: 14px 14px 14px 4px !important;
  background: #fff !important;
  border: 1px solid #EDF1F7 !important;
  box-shadow: 0 6px 18px rgba(20, 50, 120, .05) !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
  color: #1B2740 !important;
}
body.consumer-mode:not(.mobile) .ma-msg.me .ma-bubble {
  border-radius: 14px 14px 4px 14px !important;
  background: linear-gradient(135deg, #1F6BFF, #3B8BFF) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(31, 107, 255, .22) !important;
}

/* ---------- 建议：紧凑胶囊，左对齐排在气泡下 ---------- */
body.consumer-mode:not(.mobile) .ma-chips {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px !important;
  margin: 2px 0 0 43px !important;
  overflow: visible !important;
}
body.consumer-mode:not(.mobile) .ma-chip {
  flex: 0 0 auto !important;
  width: auto !important;
  height: 34px !important;
  min-height: 0 !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid #E3EBF8 !important;
  box-shadow: 0 2px 8px rgba(20, 50, 120, .05) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #2C5FA8 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
body.consumer-mode:not(.mobile) .ma-chip:hover {
  background: #F4F8FF !important;
  border-color: #C9DCFA !important;
  transform: translateY(-1px);
}

/* ---------- 底部输入栏：通栏白底 ---------- */
body.consumer-mode:not(.mobile) .ma-input {
  flex: none !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 12px 24px 14px !important;
  background: #fff !important;
  border: none !important;
  border-top: 1px solid #E8EEF8 !important;
  border-radius: 0 !important;
  box-shadow: 0 -6px 18px rgba(20, 50, 120, .04) !important;
  z-index: auto !important;
}
body.consumer-mode:not(.mobile) .ma-input > * { max-width: 860px; }
body.consumer-mode:not(.mobile) .ma-field {
  height: 42px !important;
  border-radius: 21px !important;
  background: #F4F7FC !important;
  border: 1px solid #E9EFF8 !important;
  font-size: 13.5px !important;
  padding: 0 16px !important;
}
body.consumer-mode:not(.mobile) .ma-field:focus { border-color: #BBD3F7 !important; background: #fff !important; }
body.consumer-mode:not(.mobile) .ma-send,
body.consumer-mode:not(.mobile) .ma-input .ma-round { width: 38px !important; height: 38px !important; }
body.consumer-mode:not(.mobile) .ma-send {
  background: linear-gradient(135deg, #1F6BFF, #59A6FF) !important;
  box-shadow: 0 6px 14px rgba(31, 107, 255, .28) !important;
}


/* ==========================================================================
 * PC 端 C 用户 · AI 咨询「空状态」欢迎区
 * --------------------------------------------------------------------------
 * 之前空对话就是一句白气泡 + 一排胶囊，中间一大片空白 —— 显得空且敷衍。
 * 这里把「无对话」变成一个居中的欢迎区：
 *   · 顶部一团蓝色光晕做氛围；
 *   · 品牌徽标放大成 64px 圆；
 *   · 问候语去掉气泡壳，变成居中的大字导语；
 *   · 三个建议从胶囊变成可点击的圆角卡片，横向居中。
 * 发出第一条消息后 `ma-empty` 被移除，自动回到普通消息流，无需任何 JS 干预。
 * ========================================================================== */
body.consumer-mode:not(.mobile) .ma-page { position: relative; }

/* 顶部氛围光晕 */
body.consumer-mode:not(.mobile) .ma-page::before {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(31, 107, 255, .12), transparent 72%);
  pointer-events: none;
}

body.consumer-mode:not(.mobile) .ma-body.ma-empty {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 0 !important;
}

/* 徽标放大 */
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-msg:first-child {
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-ava {
  width: 64px !important;
  height: 64px !important;
  background: linear-gradient(135deg, #1F6BFF, #59A6FF) !important;
  box-shadow: 0 16px 32px rgba(31, 107, 255, .3) !important;
}
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-ava svg {
  width: 30px !important;
  height: 30px !important;
}

/* 问候语：去掉气泡壳，变导语 */
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-bubble {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  max-width: 620px !important;
  padding: 0 !important;
  text-align: center;
  font-size: 17px !important;
  line-height: 1.95 !important;
  font-weight: 500;
  color: #33475F !important;
}
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-bubble strong { color: #1B2740 !important; }

/* 建议：卡片式，居中横排 */
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-chips {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px !important;
  margin: 20px 0 0 0 !important;
  overflow: visible !important;
}
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-chip {
  padding: 13px 22px !important;
  border-radius: 14px !important;
  font-size: 13.5px !important;
  min-height: 0 !important;
  height: auto !important;
  color: #2C5FA8 !important;
}
body.consumer-mode:not(.mobile) .ma-body.ma-empty .ma-chip::before {
  content: '✦';
  color: #4C9BFF;
  font-size: 12px;
}


/* PC 对话页高度：不再用 JS 写 px（顶栏实际高度与估算值有出入时会裁掉输入条）。
   改用纯弹性：.view 本身就是 .main 弹性列里的剩余空间，页面 flex:1 填满它，
   高度永远精确等于「视口 − 顶栏实际高度」。 */
body.consumer-mode:not(.mobile) .view {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.consumer-mode:not(.mobile) .view > .ma-page {
  flex: 1 1 auto !important;
  height: auto !important;   /* 覆盖 JS 写入的内联高度 */
  min-height: 0 !important;
}

/* 页内灰色副标题条撤掉：标题/状态并入顶栏，「新对话」也在顶栏。
   消息区顶部补足留白。 */
body.consumer-mode:not(.mobile) .ma-nav { display: none !important; }
body.consumer-mode:not(.mobile) .ma-body { padding-top: 30px !important; }

/* 「我的」统计卡内的算力行：统计卡是 flex 横排（不是 grid！）——
   必须让容器允许换行、分隔线与算力行独占一整行（flex-basis:100%），
   否则它们会挤进同一行，把四个统计格压成竖排乱码 */
body.mobile .mm-stats { flex-wrap: wrap; }
.mm-stat-divider { flex: 0 0 100%; width: 100%; height: 1px; background: #F1F4F8; margin: 2px 14px; }
.mm-credit-row { flex: 0 0 100%; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px 4px; border: none; background: none; text-align: left; cursor: pointer; }
.mm-credit-ic { width: 34px; height: 34px; border-radius: 50%; background: #EAF2FF; color: #2C7BFF; display: flex; align-items: center; justify-content: center; flex: none; }
.mm-credit-row b { font-weight: 600; }

/* 齿轮 → 滑出 B 端深色侧边栏（覆盖移动端 mk-screen 对侧栏的 display:none，
   选择器必须匹配 body.mobile.nav-open —— 「我的」页没有 mk-screen 类） */
body.mobile.nav-open .sidebar {
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  width: min(78%, 340px); z-index: 210;
  transform: none !important;
  box-shadow: 6px 0 30px rgba(10, 22, 54, .45);
}
body.mobile.nav-open .nav-mask {
  display: block; position: fixed; inset: 0;
  background: rgba(10, 22, 54, .5); z-index: 200;
  opacity: 1; pointer-events: auto;
}

/* 抽屉层级修复：一级分组标题（核心/业务能力/平台管理）必须 ≥ 二级菜单项。
   app-ui.css 把移动端标题压到 10.5~11px，这里用更高特异性拉回正轨。 */
body.mobile .sidebar .sb-label .sb-label-t {
  font-size: 13.5px; font-weight: 700; letter-spacing: .02em;
  color: #E8EEF9;
}
body.mobile .sidebar .sb-label {
  color: #E8EEF9;
}
body.mobile .sidebar .sb-label .arw { color: #8FA3C4; }

/* ==========================================================================
 * PC 端 C 用户 · 消息流「两端对齐」
 * --------------------------------------------------------------------------
 * 反馈：气泡各自收缩、右边参差不齐。改成整宽对齐——
 *   · AI 消息：头像在左，白卡占满剩余宽度（左缘贴头像、右缘贴内容区右缘）；
 *   · 用户消息：整行蓝底卡，文字右对齐容器右缘（与 AI 卡左右两缘对齐）；
 *   · 追问胶囊行：同样左缘对齐头像，右缘贴齐内容区右缘。
 * 消息列不再限宽 860，直接占满 .ma-body 内边距之间的全部宽度。
 * ========================================================================== */
body.consumer-mode:not(.mobile) .ma-body {
  max-width: none !important;
  padding: 24px 32px 16px !important;
}
body.consumer-mode:not(.mobile) .ma-msg { align-items: stretch; }
body.consumer-mode:not(.mobile) .ma-bubble { flex: 1 1 auto; max-width: none !important; }
body.consumer-mode:not(.mobile) .ma-msg.me .ma-bubble { text-align: left; }
body.consumer-mode:not(.mobile) .ma-bubble.ma-md { max-width: none !important; }

/* 追问胶囊：左缘与头像后文本对齐，右缘贴齐内容区右缘 */
body.consumer-mode:not(.mobile) .ma-chips {
  margin: 2px 0 0 43px !important;
}
