/* ==========================================================================
 * 移动端设计体系（来源：docs/design-handoff）
 * --------------------------------------------------------------------------
 * 作用域全部锁在 body.mobile 之内（≤980px 或 ?embed=h5），桌面端控制台
 * 一个像素都不受影响。
 *
 * 【几何对齐基准】设计稿 390×844（2x PNG），下列数值是从 PNG 逐像素量出来的：
 *   头部底边      212   ← 其中 62 是设计稿画的状态栏装饰；底角圆角 28
 *   统计条        132 ~ 208   高 76，左右内缩 22；底边比头部底边**高 4**（不齐平）
 *   快捷入口卡    228 ~ 327.5 高 99.5  （= 头部 212 + 16 间距）
 *   开庭卡        379 ~ 565.5 高 186.5（两行各 ~74 + 上下内边距）
 *   任务卡        617 ~ 748.5
 *   胶囊 Tab Bar  762 ~ 821.5 高 59.5，距底 22
 *   悬浮球        中心 X = 194.5（**屏幕正中**），底 731，与胶囊顶相距 31
 *
 * 两处刻意的偏离（都是按你给的第 6 条与验收清单来的，不是没量准）：
 *   1) 状态栏那条 9:41 + 信号电池是画的装饰，不做。所以头部内容高度取
 *      212 − 62 = 150，顶部改用 env(safe-area-inset-top)；套壳 App 里
 *      原生已把 web-view 整体下移，env() 为 0，两种情况都成立。
 *   2) 胶囊距底用验收清单写的 12px。PNG 量到 22，差值约等于 iOS 底部
 *      安全区，判断清单里的 12 是相对安全区而言；真机上有
 *      env(safe-area-inset-bottom) 叠加后与 PNG 一致。
 * ========================================================================== */

body.mobile {
  /* ---------------- 品牌色 ---------------- */
  --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;
}

/* ==========================================================================
 * 公共骨架（每屏复用，不要各写一遍）
 * ========================================================================== */

body.mobile .mk-page {
  font-family: var(--m-ff);
  background: var(--m-bg);
  color: var(--m-t1);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--m-tabbar-h) + var(--m-tabbar-bottom) + var(--m-safe-bottom) + 76px);
}

/* ------------------------------ 顶部蓝渐变头 ------------------------------
   01-首页.png（2x，780×1688 → 390×844）逐行实测，头部（蓝渐变块）：
     顶 0 → 底 212.0（y=423 是最后一行蓝像素，边界 424 ÷ 2）
   前两轮的 197 / 205 都是**圆角探针量早了**：x=2 处蓝止于 192.5、x=20 处止于 205.5，
   那是底角圆弧切掉的区域；平坦段（x≥44）一路到 211.5。212 与规范表「主头部高 212」一致。
   底角是圆角，用横截面 + 圆拟合：内缩 10/19/27/36/42 对应离底 24/14/8/4/2 → 解 r≈56px@2x = **28**。
   （按「切边」倒推会得到 20，偏小，是同一个坑的另一种量法。）
   底部**留 4px 蓝底**：统计条底边在 208，与头部底边 212 并**不齐平**（见下面 .mk-stats）。 */
body.mobile .mk-head {
  background: var(--m-grad-head);
  padding: calc(max(var(--m-status-h), var(--m-safe-top)) + 1px) var(--m-gutter-lg) 4px;
  color: var(--m-on-brand);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}
/* 套壳 App（html.in-app）：外壳已把 web-view 整体下移到系统状态栏之下，
   设计稿里那 62px「状态栏装饰」不能整块保留（头上会多出一条空蓝），
   但也不能直接归零 —— 归零后标题正好贴着渐变块上沿，看上去像粘在屏幕顶上。
   留 20px 呼吸位：各屏自己的额外偏移（我的 +4、案件 +6、登录 +12）继续叠加。
   放在 body.mobile 上，让所有屏（含子页面导航栏）一致生效。 */
html.in-app body.mobile { --m-status-h: 20px; }

/* 开庭行里的地点行：定位小图标 + 文字。
   注意选择器要带上 .mh-hearing-main —— 上面那条
   `.mh-hearing-main > span { display:block }` 的特异性更高，
   只写 .mh-place 会被它盖成 block，图标与文字就变成两行。 */
body.mobile .mh-hearing-main > .mh-place {
  display: flex; align-items: center; gap: 4px;
}
body.mobile .mh-hearing-main > .mh-place svg { flex: none; }
body.mobile .mk-head-top { display: flex; align-items: center; gap: 12px; }
body.mobile .mk-head-txt { min-width: 0; flex: 1; }
/* 字号以 PNG 实测为准：标题 26 / 副标题 15。
   注意规范表里写的是 H1 21 / Sub 12，**比设计稿本身小**，
   以「1:1 复刻设计稿」为准，这里取实测值。 */
body.mobile .mk-head h1 {
  margin: 0; font-size: 26px; font-weight: 600; line-height: 32px;
  letter-spacing: -.01em; color: var(--m-on-brand);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.mobile .mk-head-sub {
  margin-top: 1px; font-size: 15px; line-height: 20px;
  color: var(--m-on-brand-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.mobile .mk-bell-slot { flex: none; }
body.mobile .mk-avatar {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  background: var(--m-card); color: var(--m-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; text-decoration: none;
  overflow: hidden;   /* 头像图铺满时按容器裁圆，不留直角边 */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .28);
}
/* 头像图（用户传过头像时由 avatarHTML 输出 <img class="avatar-img">）。
   尺寸与容器对齐 + cover 才裁得出人像；app-ui.css 里有一条全局兜底
   （[class*="avatar"] > img），但那是给旧外壳写的，kit 自己声明一份，
   免得哪天兜底被收掉就在蓝底上露出一个白直角。 */
body.mobile .mk-avatar > img,
body.mobile .mk-avatar > .avatar-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: inherit;
  display: block;
}

/* 头部里的统计条：半透明白，圆角 19。
   01-首页.png 实测：卡在头部内从 132 到 208 —— 高 76，左右 22（宽 346），
   底边比头部底边(212)高 **4**，即两者不齐平（原来写的「齐平」是错的）。
   76 = 1(描边) + 16(上内边距) + 25(数值行) + 4(行距) + 15(标签行) + 14(下内边距) + 1(描边) */
body.mobile .mk-stats {
  display: flex; margin-top: 16px; padding: 16px 0 14px;
  background: rgba(255, 255, 255, .17);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--m-r-cap);
}
body.mobile .mk-stat { flex: 1; text-align: center; min-width: 0; }
/* 三列之间**没有**竖分隔线：01-首页.png 在 x=274.7 / 505.3（两个 1/3 分界）
   处是均匀色带 —— y=300 那一行 x=269~283 全为 #2c8df2、x=503~518 全为 #2d9afd，
   中间没有 1px 的增亮。原来是照「玻璃卡习惯」加的，设计稿里不存在。 */
body.mobile .mk-stat b {
  display: block; font-size: 22px; font-weight: 600; line-height: 25px;
  color: var(--m-on-brand); font-variant-numeric: tabular-nums;
}
body.mobile .mk-stat span {
  /* 行距 4（01 实测：数值框底 174 → 标签框顶 178） */
  display: block; margin-top: 4px; font-size: 12px; line-height: 15px;
  color: var(--m-on-brand-2);
}

/* ------------------------------ 内容区与白卡 ------------------------------ */
body.mobile .mk-body { padding: 0 var(--m-gutter); }
body.mobile .mk-card {
  background: var(--m-card); border-radius: var(--m-r-card-lg);
  box-shadow: var(--m-sh-card); overflow: hidden;
}
body.mobile .mk-card + .mk-card { margin-top: 12px; }
/* 头部与第一张卡之间：PNG 实测 16px。
   （原写 31，是拿「头部底边 197」算的：197+31=228 刚好蒙对卡片顶边，
     但头部真实底边是 212，所以正确间距是 228−212=**16**。
     头部一改对，这 15px 就会把整页往下推，必须同批改。）
   这条只作用于 01 首页：全区只有它把 .mk-card 当 .mk-body 的第一个子元素
   （工作台那处的 margin-top 是行内样式，优先级更高）。 */
body.mobile .mk-body > .mk-card:first-child { margin-top: 16px; }

/* 区块标题：PNG 量得「卡片底 → 标题 → 下一卡片顶」共 88.5px */
body.mobile .mk-sec {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 20px 0 10px;
}
body.mobile .mk-sec h3 { margin: 0; font-size: var(--m-fs-h3); font-weight: 600; color: var(--m-t1); }
body.mobile .mk-sec a,
body.mobile .mk-sec button {
  font-size: var(--m-fs-note); color: var(--m-t3); text-decoration: none;
  background: none; border: none; padding: 0; cursor: pointer;
}

/* 列表行：1px 发丝线分隔，不做悬空小卡 */
body.mobile .mk-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; text-decoration: none; color: inherit;
  background: none; border: none; width: 100%; text-align: left; cursor: pointer;
}
body.mobile .mk-row + .mk-row { border-top: 1px solid var(--m-line); }
body.mobile .mk-row:active { background: #FAFBFC; transform: scale(.995); }

/* 图标砖：浅蓝底 + 品牌色线性图标 */
body.mobile .mk-brick {
  width: 44px; height: 44px; flex: none; border-radius: var(--m-r-grid);
  background: var(--m-tint); color: var(--m-brand);
  display: flex; align-items: center; justify-content: center;
}
body.mobile .mk-ic { display: inline-flex; width: var(--mk-ic, 22px); height: var(--mk-ic, 22px); }
body.mobile .mk-ic svg { width: 100%; height: 100%; display: block; }

/* 标签：浅底 + 同色系文字 */
body.mobile .mk-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: var(--m-r-chip); font-size: var(--m-fs-micro); font-weight: 500;
  background: var(--m-tint); color: var(--m-tint-tx); white-space: nowrap;
}
body.mobile .mk-tag.warn { background: var(--m-warn-bg); color: #B25E00; }
body.mobile .mk-tag.danger { background: var(--m-danger-bg); color: var(--m-danger); }
body.mobile .mk-tag.ok { background: var(--m-ok-bg); color: #058C46; }
body.mobile .mk-tag.mute { background: #F1F4F7; color: var(--m-t3); }

/* ------------------------------ 底部胶囊 Tab Bar ------------------------------
   PNG 量得：762~821.5（高 59.5≈62），左右 21，距底 22=12+safe。 */
body.mobile .tabbar {
  position: fixed; left: 21px; right: 21px;
  bottom: calc(var(--m-tabbar-bottom) + var(--m-safe-bottom));
  height: var(--m-tabbar-h); z-index: 10;
  display: flex; align-items: stretch; padding: 4px;
  background: var(--m-card); border-radius: var(--m-r-tab);
  box-shadow: var(--m-sh-tabbar);
  border-top: none;
}
body.mobile .tabbar .tab {
  flex: 1; min-width: 0; border: none; background: transparent;
  border-radius: var(--m-r-pill);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--m-t3); text-decoration: none;
  font-size: var(--m-fs-tab); font-weight: 500;
  transition: background .18s var(--ease, ease), color .18s var(--ease, ease);
}
body.mobile .tabbar .tab .ic { display: flex; width: 22px; height: 22px; }
body.mobile .tabbar .tab .ic svg { width: 100%; height: 100%; display: block; }
body.mobile .tabbar .tab.on { background: var(--m-brand); color: #fff; }
body.mobile .tabbar .tab.on span:last-of-type { color: #fff; }
body.mobile .tabbar .tab:active { transform: scale(.97); }
body.mobile .tabbar .nav-badge {
  position: absolute; top: 5px; left: 50%; margin-left: 2px; transform: none;
  min-width: 8px; height: 8px; padding: 0; border: 2px solid #fff;
  background: var(--m-danger); color: transparent; border-radius: 99px;
}
body.mobile .tabbar .nav-badge[hidden] { display: none; }
/* 老外观里「激活项顶部那道渐变记号」的伪元素还在，必须显式关掉 */
body.mobile .tabbar .tab.on::before { display: none; content: none; }

/* --------------------- 头部里的通知铃铛（复用 notify.js 的挂载点） --------------------- */
body.mobile .mk-head .bell-wrap { position: relative; flex: none; }
body.mobile .mk-head .bell {
  /* PNG 实测圆的直径是 38；同时要满足 ≥44 的可点区，
     所以元素给 44、用 background-clip:content-box 只把底圆画在 38 的内容盒里。 */
  width: 38px; height: 38px; padding: 3px; box-sizing: content-box;
  background-clip: content-box;
  border: none; border-radius: 50%;
  background-color: rgba(255, 255, 255, .16); color: var(--m-on-brand);
  display: flex; align-items: center; justify-content: center;
}
body.mobile .mk-head .bell:active { background: rgba(255, 255, 255, .26); }
body.mobile .mk-head .bell .bell-badge {
  position: absolute; top: 7px; right: 8px; left: auto;
  min-width: 9px; height: 9px; border-radius: 99px; padding: 0;
  background: var(--m-danger); color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}

/* ------------------------------ 悬浮 AI 按钮 ------------------------------
   PNG 量得中心 X = 194.5，即 390 宽的**正中**（不是偏右 2/3）。
   尺寸取规范值 58×58 / 圆角 29。原按设计稿与胶囊顶相距 31，
   实机看空隙偏大，收到 12 —— 视觉上贴着 Tab Bar 但不压住它。 */
body.mobile .mk-fab {
  position: fixed; z-index: 20;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--m-tabbar-bottom) + var(--m-tabbar-h) + var(--m-safe-bottom) + 12px);
  width: var(--m-fab); height: var(--m-fab);
  border-radius: var(--m-r-fab); border: none; padding: 0;
  background: var(--m-grad-fab); color: #fff;
  box-shadow: var(--m-sh-fab);
  display: flex; align-items: center; justify-content: center;
}
body.mobile .mk-fab:active { transform: translateX(-50%) scale(.96); }

/* 总部配了文字（fabLabel）时展开成胶囊：图标缩一档、右侧接一句短标签。
   文字限 6 个字，服务端与前端各截一次，不会把按钮撑变形。 */
body.mobile .mk-fab.has-label {
  width: auto; min-width: var(--m-fab);
  padding: 0 20px; border-radius: calc(var(--m-fab) / 2); gap: 7px;
}
body.mobile .mk-fab.has-label .mk-fab-tx {
  font-family: var(--m-ff); font-size: 14px; font-weight: 600;
  color: #fff; letter-spacing: .5px; white-space: nowrap;
}

/* ------------------------------ 空态与骨架 ------------------------------ */
body.mobile .mk-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 16px; text-align: center;
}
body.mobile .mk-empty .mk-ic { color: var(--m-t4); }
body.mobile .mk-empty b { font-size: var(--m-fs-body); font-weight: 500; color: var(--m-t3); }
body.mobile .mk-empty span { font-size: var(--m-fs-note); color: var(--m-t4); }
body.mobile .mk-sk {
  border-radius: 8px;
  background: linear-gradient(90deg, #F1F4F7 25%, #E9EEF3 37%, #F1F4F7 63%);
  background-size: 400% 100%;
  animation: mkShine 1.4s ease infinite;
}
@keyframes mkShine {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ==========================================================================
 * 01 首页
 * ========================================================================== */
body.mobile .mh-quick { padding: 14px 8px; display: flex; }
body.mobile .mh-quick-item {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; padding: 0; cursor: pointer; text-decoration: none;
}
/* 只给「文案」上色，必须用直接子选择器 —— 图标容器也是 span，
   用后代选择器会把它一起改成近黑色，SVG 里的 currentColor 就跟着变黑
   （实测就是这个原因导致图标颜色不对，与设计稿的蓝色不符）。 */
body.mobile .mh-quick-item > span {
  font-size: var(--m-fs-grid); font-weight: 500; color: var(--m-t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
/* 图标颜色一律跟随图标砖，避免被外层的文字色带跑 */
body.mobile .mk-brick .mk-ic { color: inherit; }
body.mobile .mh-quick-item:active .mk-brick { transform: scale(.94); }

/* 开庭行：左侧时间块 + 中间两行 + 右侧箭头（行高对齐 PNG 的 ~74） */
body.mobile .mh-hearing-time {
  width: 56px; height: 56px; flex: none; border-radius: var(--m-r-grid);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: #EEF1F5; color: var(--m-t2);
}
body.mobile .mh-hearing-time.today { background: var(--m-brand); color: #fff; }
body.mobile .mh-hearing-time b { font-size: var(--m-fs-title); font-weight: 600; line-height: 1.1; }
body.mobile .mh-hearing-time span { font-size: var(--m-fs-micro); }
body.mobile .mh-hearing-main { flex: 1; min-width: 0; }
body.mobile .mh-hearing-main b {
  display: block; font-size: var(--m-fs-title); font-weight: 600; color: var(--m-t1);
  line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 同样用直接子选择器：里面的 .mk-ic 也是 span，不能被文字色带跑 */
body.mobile .mh-hearing-main > span {
  display: block; margin-top: 4px; font-size: var(--m-fs-note); line-height: 16px; color: var(--m-t3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.mobile .mh-hearing-main .mk-tag { display: inline-flex; margin-top: 6px; }
body.mobile .mh-arrow { flex: none; color: var(--m-t4); display: flex; }

/* 今日任务卡 */
body.mobile .mh-task-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 13px 16px 11px; border-bottom: 1px solid var(--m-line);
}
body.mobile .mh-task-head b { font-size: var(--m-fs-h3); font-weight: 600; color: var(--m-t1); }
body.mobile .mh-task-head span { font-size: var(--m-fs-note); color: var(--m-t3); }
body.mobile .mh-task { padding: 12px 16px; display: flex; align-items: flex-start; gap: 11px; }
body.mobile .mh-task + .mh-task { border-top: 1px solid var(--m-line); }
body.mobile .mh-check {
  width: 20px; height: 20px; flex: none; border-radius: 50%; margin-top: 1px;
  border: 1.5px solid var(--m-t4); background: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
body.mobile .mh-check.on { background: var(--m-brand); border-color: var(--m-brand); }
body.mobile .mh-task-main { flex: 1; min-width: 0; }
body.mobile .mh-task-main b {
  display: block; font-size: var(--m-fs-group); font-weight: 500; color: var(--m-t1); line-height: 19px;
}
body.mobile .mh-task.done .mh-task-main b { color: var(--m-t3); text-decoration: line-through; }
body.mobile .mh-task-main > span {
  display: block; margin-top: 4px; font-size: var(--m-fs-note); line-height: 16px; color: var(--m-t3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.mobile .mh-task .mk-tag { margin-top: 1px; }

/* 首页骨架屏（加载中用微光扫过，不用转圈） */
body.mobile .mh-sk-head { padding: 18px var(--m-gutter-lg) 20px; }
body.mobile .mh-sk-row { display: flex; gap: 12px; }

/* ========== 01 首页 · 与旧外壳共存时的修正（实测出来的问题） ========== */

/* 这一版页面自带头部与底部胶囊 Tab Bar：
   ① 旧外壳的顶栏与侧边导航必须让位，否则屏幕上会叠出第二条导航；
   ② .view 在移动端本来有左右内边距，不清零的话头部两侧会露出底色，
      整页元素统一右移 16px（实测就是这个问题）。 */
body.mobile.mk-screen .topbar,
body.mobile.mk-screen .sidebar,
body.mobile.mk-screen .deploy-bar { display: none; }
/* 子页面（03 AI 对话等）：没有底部胶囊 Tab Bar、没有悬浮球，
   底部整块让给页面自己的操作条（如输入条）。 */
body.mobile.mk-sub .tabbar,
body.mobile.mk-sub .mk-fab { display: none; }
body.mobile.mk-screen .app { display: block; }
body.mobile.mk-screen .main { width: 100%; }
body.mobile.mk-screen .view { padding: 0; }

/* 上面那条把 .view 的左右内边距清零是必须的（头部要通栏）；
   但**底部不能也是 0**：案件详情这类「桌面视图 + 移动皮肤」的页面没有 .mk-page，
   底部就一点留白都没有，最后一块正好压在胶囊 Tab Bar 底下（实测被遮 84px，
   表现就是「滑到底了但最后一条看不全」）。
   这里补回底部留白，同时用负外边距把 .mk-page 版式自留的 160px 抵消掉，
   两种版式互不影响（不抵消的话 kit 页面底部会多出一段死白）。 */
body.mobile.mk-screen .view {
  padding-bottom: calc(var(--m-tabbar-h) + var(--m-tabbar-bottom) + var(--m-safe-bottom) + 20px);
}
body.mobile.mk-screen .view > .mk-page:last-child {
  margin-bottom: calc(-1 * (var(--m-tabbar-h) + var(--m-tabbar-bottom) + var(--m-safe-bottom) + 20px));
}

/* 上面把 .app 改成 block 是为了让旧外壳的网格轨道彻底让位；
   但这样一来 .main 就成了「块级 + height:auto」，会被内容撑高
   （实测 .view 970px 时 .main 也变成 970px），而 .app 还是固定视口高 + overflow:hidden
   —— 于是 .view 的 flex:1 失去参照、不再滚动，整页比一屏长时多出来的一截
   被直接裁掉，**怎么划都划不出来**（用户报的「没法下滑」就是这个）。
   这里把高度重新约束回视口，让 .view 继续当滚动容器（与桌面端同一套机制）。
   100dvh 是为了手机浏览器地址栏收起时不至于在底部留一条空白；
   老浏览器不认 dvh 会忽略这行，回落到 layout.css 的 100vh。 */
body.mobile.mk-screen .app { height: 100dvh; }
body.mobile.mk-screen .main { height: 100%; min-height: 0; }
body.mobile.mk-screen .view { min-height: 0; }

/* 滚动容器跟页面同底色。
   .mk-page 只覆盖自己的盒子，滚动区的 padding 与「内容不足一屏」的余下部分
   属于 .view —— 那里用的是外壳底色，与页面色 #F1F4F7 差一个色阶，
   于是在页面上显出一块矩形色差（AI 对话页最明显：气泡下面一条方形色块）。 */
body.mobile.mk-screen .view { background: var(--m-bg); }

/* 子页面（AI 对话、开庭排期、任务日历）没有底部胶囊 Tab Bar：
   上面给 .view 预留的 138px 底部留白与配套负边距在这里纯属多余，
   反而在输入条上方拉出一条不同色的带子。一并去掉。 */
body.mobile.mk-screen.mk-sub .view { padding-bottom: 0; }
body.mobile.mk-screen.mk-sub .view > .mk-page:last-child { margin-bottom: 0; }


/* ==========================================================================
 * 移动端统一皮肤（工作台 2.0 同款）
 * --------------------------------------------------------------------------
 * 案件 / 通讯录原本是白底 + 深色标题，与新版工作台的蓝渐变头不一致。
 * 这里把这两屏的头部统一成渐变头，并给页面加同一套浅蓝底；
 * 首页与「我的」本来就是渐变头，仅统一页底与圆角。
 * 头像一律用 avatarHTML 渲染（传过头像显示图片，没传才回退首字），
 * 因此这里只负责外壳尺寸与裁切，不再自己算首字。
 * ========================================================================== */
body.mobile .mk-page {
  background: linear-gradient(180deg, #EAF2FF 0, #F5F9FF 300px, #F5F9FF 100%);
}

/* ---------- 案件 / 通讯录：渐变头 ---------- */
body.mobile .mc-head,
body.mobile .mct-head {
  background: linear-gradient(180deg, #1F6BFF 0%, #2F86FF 100%);
  color: #fff;
  padding: calc(max(var(--m-status-h, 62px), var(--m-safe-top)) + 6px) var(--m-gutter-lg) 18px;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 24px rgba(31, 107, 255, .2);
}
body.mobile .mc-head h1,
body.mobile .mct-head h1 { color: #fff; }
body.mobile .mc-round,
body.mobile .mct-round {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
body.mobile .mc-round:active,
body.mobile .mct-round:active { background: rgba(255, 255, 255, .32); }
body.mobile .mc-round.add,
body.mobile .mct-round.add {
  background: #fff;
  color: #2C7BFF;
  box-shadow: 0 6px 14px rgba(10, 40, 100, .18);
}

/* 头像外壳：统一 36，内层图片/首字由 avatarHTML 给尺寸 */
body.mobile .mc-ava,
body.mobile .mct-ava,
body.mobile .wd-ava {
  width: 36px; height: 36px; flex: none;
  border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .55);
  text-decoration: none;
}
body.mobile .mc-ava img,
body.mobile .mct-ava img,
body.mobile .wd-ava img,
body.mobile .mc-ava span,
body.mobile .mct-ava span,
body.mobile .wd-ava span {
  width: 100% !important; height: 100% !important;
  object-fit: cover; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px !important; font-weight: 600; color: #fff;
}

/* 页面底部的列表/卡片沿用浅色，不跟着渐变 */
body.mobile .mc-page .mc-list,
body.mobile .mct-page .mct-list { position: relative; z-index: 1; }


/* ==========================================================================
 * 案件 / 通讯录 头部返工（第二版）
 * --------------------------------------------------------------------------
 * 上一版只把标题行染成蓝色，搜索框还留在渐变块外面 —— 视觉上像一条蓝带
 * 下面挂了个白色胶囊，接缝很生硬。这次把搜索框收进渐变头，
 * 整块一起圆角收口；标题降到 22px（原来 26.5 在渐变头里偏大、压不住右侧按钮）。
 * ========================================================================== */
body.mobile .mc-head {
  /* 原规则是 flex（标题与按钮同一行）。现在内部多了一层 .mc-head-top + 搜索框，
     必须改回 block，否则搜索框会挤到标题右边去 */
  display: block;
  padding: calc(max(var(--m-status-h, 62px), var(--m-safe-top)) + 12px) 18px 18px;
}
body.mobile .mc-head-top { display: flex; align-items: center; gap: 8px; }
body.mobile .mc-head h1 { font-size: 24px; line-height: 1.2; color: #fff; }
body.mobile .mc-head .mc-search { padding: 12px 0 0; }
body.mobile .mc-head .mc-search input {
  height: 42px; border-radius: 21px; box-shadow: none;
  font-size: 13.5px; color: #1B2740; padding: 0 16px;
}
body.mobile .mc-head .mc-search input::placeholder { color: #9AA7BC; }
body.mobile .mc-tabs { padding: 12px 18px 2px; }
body.mobile .mc-tab { background: #E8F0FE; color: #3B5B86; }
body.mobile .mc-tab.on { background: var(--m-brand); color: #fff; }

body.mobile .mct-top {
  background: linear-gradient(180deg, #1F6BFF 0%, #2F86FF 100%);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 24px rgba(31, 107, 255, .2);
  padding-bottom: 16px;
}
body.mobile .mct-head {
  background: none; box-shadow: none; border-radius: 0;
  padding: 0 18px; display: flex; align-items: center; gap: 8px;
}
body.mobile .mct-head h1 { font-size: 24px; color: #fff; }
body.mobile .mct-search { padding: 12px 18px 0; }
body.mobile .mct-search-in { background: #fff; height: 42px; border-radius: 21px; }
body.mobile .mct-tabs { padding: 12px 18px 2px; }


/* ==========================================================================
 * 案件页头部（第三版）
 * --------------------------------------------------------------------------
 * 前两版的毛病：标题右边挤了 3 个圆钮 + 头像，圆钮直径还不一致（34 / 40），
 * 看上去是「一个词后面挂了四个圈」。这一版把操作挪到头部下方做成带文字的
 * 按钮（新建 / 接洽），头部只留标题、副标题与头像 —— 与工作台同构，也更点得准。
 * ========================================================================== */
body.mobile .mc-head {
  padding: calc(max(var(--m-status-h, 62px), var(--m-safe-top)) + 14px) 18px 20px;
}
body.mobile .mc-head-top { display: flex; align-items: center; gap: 12px; }
body.mobile .mc-head-txt { flex: 1; min-width: 0; }
body.mobile .mc-head h1 { font-size: 24px; line-height: 1.15; color: #fff; }
body.mobile .mc-sub {
  margin-top: 5px; font-size: 11.5px; color: rgba(255, 255, 255, .82);
  letter-spacing: .2px;
}
body.mobile .mc-head .mc-search { padding: 14px 0 0; }
body.mobile .mc-head .mc-search input {
  height: 42px; border-radius: 21px; box-shadow: none; padding: 0 16px;
  font-size: 13px; color: #1B2740;
}
body.mobile .mc-head .mc-search input::placeholder { color: #9AA7BC; }

/* 操作条：新建（主）+ 接洽（次），等宽并排 */
body.mobile .mc-acts { display: flex; gap: 10px; padding: 12px 18px 0; }
body.mobile .mc-act {
  flex: 1; height: 44px; border-radius: 14px; border: 1px solid #D9E5F8;
  background: #fff; color: #2C5FA8;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; font-family: var(--m-ff);
  box-shadow: 0 4px 12px rgba(31, 72, 150, .06);
}
body.mobile .mc-act:active { transform: scale(.985); }
body.mobile .mc-act.primary {
  border: none; color: #fff;
  background: linear-gradient(135deg, #2C7BFF, #59A6FF);
  box-shadow: 0 8px 18px rgba(44, 123, 255, .28);
}
body.mobile .mc-tabs { padding: 14px 18px 2px; }
body.mobile .mc-acts:empty { display: none; }


/* ==========================================================================
 * 案件 / 通讯录 头部（终版：字号收敛、头像归右侧）
 * --------------------------------------------------------------------------
 * 上一版标题 24px 偏大、副标题 11.5px 偏小，两个反差叠在一起显得头重脚轻；
 * 操作按钮 44px 也压过了正文。这一版统一收一档：
 *   标题 20 / 副标题 12 / 搜索 13 / 按钮 13 / 胶囊 12.5，
 * 头像 34，固定在标题行最右侧，垂直居中。
 * ========================================================================== */
body.mobile .mc-head {
  padding: calc(max(var(--m-status-h, 62px), var(--m-safe-top)) + 10px) 18px 16px;
}
body.mobile .mc-head-top { display: flex; align-items: center; gap: 10px; }
body.mobile .mc-head h1 {
  font-size: 20px; font-weight: 700; letter-spacing: .2px; line-height: 1.2; color: #fff;
}
body.mobile .mc-sub {
  margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .86); letter-spacing: 0;
}
body.mobile .mc-ava { width: 34px; height: 34px; margin-left: auto; }
body.mobile .mc-head .mc-search { padding: 12px 0 0; }
body.mobile .mc-head .mc-search input {
  height: 40px; border-radius: 20px; padding: 0 15px;
  font-size: 13px; color: #1B2740; box-shadow: none;
}
body.mobile .mc-acts { padding: 10px 18px 0; gap: 10px; }
body.mobile .mc-act { height: 40px; border-radius: 12px; font-size: 13px; }
body.mobile .mc-tabs { padding: 12px 18px 2px; }
body.mobile .mc-tab { height: 33px; font-size: 12.5px; padding: 0 14px; }

/* 通讯录同步收档 */
body.mobile .mct-head { padding: 0 18px; gap: 10px; }
body.mobile .mct-head h1 { font-size: 20px; font-weight: 700; letter-spacing: .2px; }
body.mobile .mct-ava { width: 34px; height: 34px; }
body.mobile .mct-search { padding: 12px 18px 0; }
body.mobile .mct-search-in { height: 40px; border-radius: 20px; }
body.mobile .mct-tabs { padding: 12px 18px 2px; }
body.mobile .mct-top { padding-bottom: 14px; }


/* ==========================================================================
 * 字体与底色（全局微调）
 * --------------------------------------------------------------------------
 * 1) 字体：中文优先苹方 / 鸿蒙 / 思源，西文交给系统 UI 字体；
 *    Android WebView 默认会把中文落到 Noto Sans CJK、西文落到 Roboto，
 *    行内数字与汉字字重不齐，这里统一指定，数字用等宽字形。
 * 2) 底色：页面渐变只铺到 260px，再往下与页面底色同色 ——
 *    之前渐变的终点色与 body 底色不一致，页面中段会出现一条色带。
 * ========================================================================== */
:root {
  --ff: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-num: "SF Pro Display", "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
body.mobile {
  --m-ff: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #F3F7FE !important;
  font-family: var(--m-ff);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.mobile .mk-page {
  background: linear-gradient(180deg, #EAF2FF 0, #F3F7FE 260px, #F3F7FE 100%);
}
/* 数字统一用等宽字形，统计数字不会因字宽跳动 */
body.mobile .mm-stat b,
body.mobile .wd-todo-nums b,
body.mobile .mc-tab { font-variant-numeric: tabular-nums; }

/* 「我的」头像可点击更换 */
body.mobile button.mm-ava {
  position: relative; padding: 0; border: none; background: none;
  display: flex; align-items: center; justify-content: center;
}
body.mobile .mm-ava-edit {
  position: absolute; right: -2px; bottom: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: #2C7BFF;
  font-size: 10px; font-weight: 700; line-height: 20px; text-align: center;
  box-shadow: 0 2px 6px rgba(10, 40, 100, .22);
}


/* ==========================================================================
 * 工作台 / 我的：细节对齐
 * ========================================================================== */
/* 待办卡：与右侧智能助手卡等高，数字加大，标签压淡；两列之间加一条浅分隔线 */
body.mobile .wd-row2 { align-items: stretch; }
body.mobile .wd-todo {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 15px 16px 14px;
}
body.mobile .wd-todo-nums { display: flex; gap: 0; margin-top: 2px; }
body.mobile .wd-todo-nums > div { flex: 1; padding-left: 14px; }
body.mobile .wd-todo-nums > div:first-child { padding-left: 0; }
body.mobile .wd-todo-nums > div + div { border-left: 1px solid rgba(255, 255, 255, .28); }
body.mobile .wd-todo-nums span { font-size: 11px; opacity: .88; }
body.mobile .wd-todo-nums b { font-size: 28px; line-height: 1.05; }
body.mobile .wd-assist { justify-content: space-between; padding: 14px 8px 13px; }
body.mobile .wd-assist b { font-size: 13px; }
body.mobile .wd-assist-row span { font-size: 11px; }

/* 「我的」页：四格统计等分、两端对齐，数字与标签各自居中 */
body.mobile .mm-stats { display: flex; }
body.mobile .mm-stat { flex: 1 1 0; min-width: 0; text-align: center; }
body.mobile .mm-stat b { font-variant-numeric: tabular-nums; }

/* 「我的」页功能行：图标与文字两端对齐，箭头贴右 */
body.mobile .mm-row { display: flex; align-items: center; }
body.mobile .mm-row .mm-arrow { margin-left: auto; }
