/* ============ GammaWork 手机适配(v4 轻盈版) ============
   三层隔离第 1 层:本文件所有规则必须锁在 body.is-mobile 作用域
   (类由 lib.js 按 matchMedia(max-width:768px) 挂载/摘除)。
   桌面样式(tokens/shell/app.css)零改动 —— 包括 .app-shell 的
   min-width:1260px 也不动,只在 is-mobile 分支中和。
   设计规格:reference/mobile-ui-spec-v4.md(轻盈版 token/组件)。 */

/* ---- W0 基础解锁:解除桌面最小宽度硬阻断 ---- */
body.is-mobile .app-shell {
  min-width: 0;
}

/* ---- 轻盈版移动端 token(覆盖式,仅 is-mobile 生效) ---- */
body.is-mobile {
  --m-bg: #f6f7fb;
  --m-surf: #ffffff;
  --m-acc: #4258e6;
  --m-acc-soft: #eef0fe;
  --m-acc-ink: #2b3aa8;
  --m-grad: linear-gradient(135deg, #4f6af0 0%, #7c5cf0 100%);
  --m-grad-soft: linear-gradient(135deg, #eef1ff 0%, #f4efff 100%);
  --m-sh: 0 2px 8px rgba(26, 32, 51, .05), 0 12px 32px rgba(26, 32, 51, .08);
  --m-sh-sm: 0 1px 4px rgba(26, 32, 51, .05), 0 6px 16px rgba(26, 32, 51, .06);
  --m-r-card: 18px;
  --m-r-row: 15px;
  --m-r-btn: 13px;
  --m-r-sheet: 24px;
  --m-tab-h: 56px;
}

/* ============ W1 导航外壳 ============ */

/* 桌面左侧导航在手机隐藏(底部 Tab 接管);桌面分支不受影响 */
body.is-mobile .nav-rail { display: none; }

/* 给固定底栏让位(含 iOS 安全区) */
body.is-mobile .app-shell {
  padding-bottom: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px));
}

/* 浮动控件(反馈/客服)抬高,避免被底栏盖住;保持桌面的上下错开 */
body.is-mobile .feedback-fab {
  bottom: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px) + 12px) !important;
}
body.is-mobile .support-fab {
  bottom: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px) + 66px) !important;
}

/* ---- 底部 Tab(毛玻璃 + 选中渐变 pill) ---- */
body.is-mobile .m-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(237, 239, 245, .9);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 600;
}
body.is-mobile .m-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #9aa1b5;
  padding: 5px 10px;
  border: none;
  background: none;
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.is-mobile .m-tab .m-tab-i { display: flex; opacity: .55; }
body.is-mobile .m-tab .m-tab-i svg { width: 20px; height: 20px; }
body.is-mobile .m-tab.is-on { color: var(--m-acc); background: var(--m-acc-soft); }
body.is-mobile .m-tab.is-on .m-tab-i { opacity: 1; }

/* ---- 「更多」bottom sheet ---- */
body.is-mobile .m-sheet-dim {
  position: fixed; inset: 0;
  background: rgba(26, 32, 51, .42);
  z-index: 650;
  display: flex; flex-direction: column; justify-content: flex-end;
}
body.is-mobile .m-sheet {
  background: var(--m-surf);
  border-radius: var(--m-r-sheet) var(--m-r-sheet) 0 0;
  box-shadow: 0 -10px 32px rgba(26, 32, 51, .16);
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 78vh;
  overflow-y: auto;
}
body.is-mobile .m-sheet-grip {
  width: 36px; height: 4.5px; border-radius: 99px;
  background: #dde1ea; margin: 0 auto 11px;
}
body.is-mobile .m-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 800; color: #1a2033; margin-bottom: 10px;
}
body.is-mobile .m-sheet-search {
  font-size: 12px; font-weight: 600; color: #4a5268;
  background: var(--m-bg); border: none; border-radius: 99px;
  padding: 7px 14px; cursor: pointer;
}
body.is-mobile .m-sheet-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
}
body.is-mobile .m-sheet-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--m-bg); border: none; border-radius: 16px;
  padding: 12px; cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
body.is-mobile .m-sheet-tile:active { background: var(--m-acc-soft); }
body.is-mobile .m-sheet-icn { font-size: 20px; }
body.is-mobile .m-sheet-t { font-size: 13px; font-weight: 700; color: #1a2033; }
body.is-mobile .m-sheet-d { font-size: 10px; color: #9aa1b5; }
body.is-mobile .m-sheet-foot {
  display: flex; gap: 8px; margin-top: 11px;
}
body.is-mobile .m-sheet-foot button {
  flex: 1; font-size: 11.5px; font-weight: 600; color: #4a5268;
  background: none; border: 1px solid #edeff5; border-radius: 12px;
  padding: 9px 0; cursor: pointer;
}

/* ============ W2 多栏 → 单栏 ============ */

/* conv-col 拖拽手柄在触屏无意义 */
body.is-mobile .conv-col-resizer { display: none; }

/* 详情态(协作选中会话 / 研究/会议/通讯录恒为 main):隐藏列表栏,main 全宽 */
body.is-mobile .app-shell.m-view-detail .conv-col-frame { display: none; }

/* 列表态(协作未选会话):conv-col 全宽,main 隐藏 */
body.is-mobile .app-shell.m-view-list .conv-col-frame { width: 100% !important; }
body.is-mobile .app-shell.m-view-list .main { display: none; }

/* 聊天页:手机返回按钮(桌面隐藏) */
.m-back { display: none; }
body.is-mobile .m-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border: none; background: none;
  font-size: 20px; font-weight: 600; color: #4a5268;
  cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* 通用:页面留白收紧 + 弹窗全宽 */
body.is-mobile .page { padding: 10px 12px; }
body.is-mobile .dialog { width: min(560px, 94vw) !important; max-height: 86vh; overflow-y: auto; }

/* ---- W2b 研究详情(#/f/:id)单列堆叠 ---- */
body.is-mobile .wd-grid,
body.is-mobile .wd-grid-3 {
  grid-template-columns: 1fr;
  height: auto;
}
/* 概览容器(inline overflow:hidden)放开纵向滚动,堆叠内容可滚 */
body.is-mobile .wd-main > div:last-child { overflow-y: auto !important; }
body.is-mobile .wd-grid .wd-panel,
body.is-mobile .wd-grid-3 .wd-panel { min-height: 220px; }
/* 面板头(标题 + K线范围切换)窄屏换行:标题独占首行,范围条整行铺开;
   按钮文字不竖排,放不下时范围条内部横滑(原 nowrap 头把「价格·K线」挤成竖排、
   「近2年」溢出屏外)。 */
body.is-mobile .wd-panel-head { flex-wrap: wrap; gap: 8px; }
body.is-mobile .range-seg button { white-space: nowrap; }
body.is-mobile .wd-panel-head .range-seg {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
body.is-mobile .wd-panel-head .range-seg::-webkit-scrollbar { display: none; }

/* ---- 研究助手:🤖 FAB + 全屏覆盖层(右栏导轨的手机形态) ---- */
body.is-mobile .m-asst-fab {
  position: fixed;
  right: 14px;
  bottom: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px) + 120px);
  width: 46px; height: 46px;
  border: none; border-radius: 99px;
  background: var(--m-grad); color: #fff;
  font-size: 20px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(66, 88, 230, .4);
  z-index: 590;
  -webkit-tap-highlight-color: transparent;
}
.m-asst-fab { display: none; }
body.is-mobile .m-asst-fab { display: flex; align-items: center; justify-content: center; }
body.is-mobile .m-asst-overlay {
  position: fixed; inset: 0;
  background: var(--m-bg);
  z-index: 700;
  display: flex; flex-direction: column;
}
body.is-mobile .m-asst-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(237, 239, 245, .9);
  font-size: 14.5px; font-weight: 800; color: #1a2033;
}
body.is-mobile .m-asst-head button {
  border: none; background: none; font-size: 22px; color: #4a5268;
  cursor: pointer; line-height: 1; padding: 2px 6px;
}
body.is-mobile .m-asst-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.is-mobile .m-asst-body > * { flex: 1; min-height: 0; }

/* ---- W2c GammaWork 屏 ---- */
/* 历史侧栏 → 左侧抽屉(☰ 历史 打开,点选/⟨⟨ 关闭) */
body.is-mobile .ac-side {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(320px, 86vw);
  z-index: 700;
  border-right: none;
  box-shadow: 12px 0 36px rgba(26, 32, 51, .22);
  border-radius: 0 var(--m-r-sheet) var(--m-r-sheet) 0;
}
/* 主区 + 右栏(参考资料/任务信息)改纵向堆叠 */
body.is-mobile .appcenter-home { flex-wrap: wrap; overflow-y: auto; }
body.is-mobile .ac-main { flex: 1 1 100%; }
body.is-mobile .ref-side {
  flex: 0 0 auto;
  width: 100%;
  max-height: 42vh;
  overflow-y: auto;
  border-left: none;
  border-top: 1px solid var(--line, #e6e9f0);
}
/* 技能表单/运行页:外层 flex 行(skills-workspace)换行,右栏(参考资料/
   任务信息/流程助手)堆到主列下方 */
body.is-mobile .skills-workspace { flex-wrap: wrap; overflow-y: auto; }
body.is-mobile .skills-workspace > .kb-ws-page { flex: 1 1 100%; min-width: 0; }
body.is-mobile .skills-workspace > .skills-assistant,
body.is-mobile .skills-workspace > .gamma-rail {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-height: 46vh;
  border-left: none;
  border-top: 1px solid var(--line, #e6e9f0);
}
body.is-mobile .gamma-rail-resizer { display: none; }
/* 技能表单/运行页所在主列留白收紧 */
body.is-mobile .ac-hero-title { font-size: 19px; }
body.is-mobile .skills-main-body { padding: 12px; }

/* ============ W3 触摸交互 ============ */

/* 触屏无 hover:全部「悬停才显」的行内操作改常显
   (新闻置顶/会话删除/技能卡操作/文件夹行操作/聊天历史删除/日历事件操作/
    消息 ⋯/知识库树行操作/画布节点 ×/气泡复制/群成员移除/运行历史删除) */
body.is-mobile .news-ctx-pin,
body.is-mobile .folder-row-actions,
body.is-mobile .chat-history-row .iconbtn,
body.is-mobile .cal-event-actions,
body.is-mobile .mw-del,
body.is-mobile .dm-msg-more,
body.is-mobile .kb-row-x,
body.is-mobile .kb-bubble-copy,
body.is-mobile .dm-member-rm,
body.is-mobile .skill-card-del,
body.is-mobile .ac-side-del { opacity: 1 !important; }
body.is-mobile .conv-row-del { display: inline-grid !important; place-items: center; }
body.is-mobile .skill-card-actions,
body.is-mobile .kb-screen .wb-tree-row .kb-row-actions { display: flex !important; }
body.is-mobile .kb-screen .kb-canvas-node-x { display: grid !important; }

/* iOS:输入聚焦字号 <16px 会触发页面自动放大 */
body.is-mobile input,
body.is-mobile textarea,
body.is-mobile select { font-size: 16px; }

/* 多选下拉(MultiSelectField)的弹层限高,触屏内滚 */
body.is-mobile .suggest { max-height: 46vh; }

/* ============ W4 重组件 + 预览 ============ */

/* ---- 会议详情:转写|纪要 双栏 → 纵向堆叠 ---- */
body.is-mobile .md-cols {
  grid-template-columns: 1fr;
  overflow-y: auto;
}
body.is-mobile .md-cols .md-panel { min-height: 280px; max-height: 60vh; }
/* 新建会议弹窗(560px 固定宽)适配窄屏 */
body.is-mobile .new-meeting-dialog { width: min(560px, 94vw) !important; }

/* ---- 会议精研分析报告:单列、无横向溢出 ---- */
body.is-mobile .md-analysis-head { padding: 11px 14px; flex-wrap: wrap; }
body.is-mobile .md-analysis-score { margin-left: 0; }
body.is-mobile .md-analysis-stop { margin-left: auto; }
body.is-mobile .md-analysis-intro,
body.is-mobile .md-analysis-progress,
body.is-mobile .md-analysis-report { padding: 14px; }
body.is-mobile .md-analysis-form { flex-direction: column; align-items: stretch; gap: 12px; }
body.is-mobile .md-analysis-field { min-width: 0; width: 100%; }
body.is-mobile .md-steps { flex-direction: column; gap: 9px; }
body.is-mobile .md-analysis-reporthead { flex-wrap: wrap; }
body.is-mobile .md-analysis-reporthead .md-analysis-score { margin-left: 0; }
body.is-mobile .md-source-item a { word-break: break-all; }
body.is-mobile .md-errata-wrap { -webkit-overflow-scrolling: touch; }
body.is-mobile .md-errata { min-width: 460px; }
body.is-mobile .md-analysis-bar { gap: 8px; }
body.is-mobile .md-analysis-bar .btn,
body.is-mobile .md-analysis-bar a.btn { flex: 1 1 auto; text-align: center; }
body.is-mobile .md-analysis-body { font-size: 14px; }

/* ---- 知识库 / 云文档:三栏 → 纵向堆叠 ----
   树栏(268px 列)与内容改上下;AI 助理栏(kb-gamma-rail)堆底部。 */
body.is-mobile .kb-workspace { flex-wrap: wrap; overflow-y: auto; }
body.is-mobile .kb-workspace > .kb-ws-page { flex: 1 1 100%; min-width: 0; }
body.is-mobile .kb-screen {
  grid-template-columns: 1fr;
  height: auto;
  min-height: 0;
}
/* 树栏限高内滚,内容区在下方铺开 */
body.is-mobile .kb-screen > :first-child {
  max-height: 36vh;
  overflow-y: auto;
}
/* 知识库/云文档助理栏不再堆叠 —— 改浮动 pill + sheet(MobileSideSheet) */

/* ---- 文档/产物预览:全屏弹层贴边 ---- */
body.is-mobile .dialog-backdrop .dialog iframe,
body.is-mobile .dialog-backdrop .dialog embed,
body.is-mobile .dialog-backdrop .dialog video {
  max-width: 100%;
}
/* K线放大弹窗/图谱画布:占满视口可双指原生缩放页面兜底 */
body.is-mobile .kline-zoom-dialog,
body.is-mobile .kb-canvas-wrap { touch-action: pan-x pan-y pinch-zoom; }

/* ============ W5 长尾屏 ============ */

/* 新闻:列表 + 详情双栏 → 纵向堆叠(详情在下,点条目后滚动可见) */
body.is-mobile .news-layout {
  grid-template-columns: 1fr;
  height: auto;
  overflow-y: auto;
}

/* 日历:月历 + 右侧事件栏 → 纵向堆叠;月格行高收紧 */
body.is-mobile .cal-layout {
  grid-template-columns: 1fr;
  height: auto;
  overflow-y: auto;
}
body.is-mobile .cal-grid { grid-auto-rows: minmax(64px, auto); }

/* 管理后台:宽表横滑(首屏不挤爆) */
body.is-mobile table.user-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

/* 工作台磁贴:两列(桌面 7/4 列在窄屏太挤) */
body.is-mobile .wb-home .wb-hero { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* 登录页(随 dev-new 焕新):420px 固定宽卡片适配窄屏 */
body.is-mobile .login-card { width: min(420px, 92vw); padding: 28px 22px 20px; }

/* ============ 体验打磨 pass(真机预防 + 轻盈视觉) ============ */

/* iOS Safari 地址栏吃 100vh → 动态视口高度兜底(关键真机修复) */
body.is-mobile .app-shell {
  height: 100vh;
  height: 100dvh;
}

/* 工作台问候头(轻盈版设计稿) */
.m-greet { display: none; }
body.is-mobile .m-greet { display: block; padding: 6px 4px 10px; }
body.is-mobile .m-greet-title { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: #1a2033; }
body.is-mobile .m-greet-sub { font-size: 12px; color: #9aa1b5; margin-top: 3px; }

/* 轻盈视觉:核心容器卡片化(大圆角 + 软投影替代描边) */
body.is-mobile .panel,
body.is-mobile .wd-panel,
body.is-mobile .ac-panel,
body.is-mobile .md-panel {
  border: none;
  border-radius: var(--m-r-card);
  box-shadow: var(--m-sh-sm);
}
body.is-mobile .wb-tile {
  border: none;
  border-radius: 16px;
  box-shadow: var(--m-sh-sm);
}
body.is-mobile .login-card { border: none; }

/* 聊天输入区贴底呼吸位 */
body.is-mobile .dm-compose { padding-bottom: 6px; }

/* ===== 新闻手机版重设计(整页自然滚动,列表为主) ===== */
/* 三栏网格在手机退化为普通块流:取消 grid/内部 flex 撑高,让 page-body 整体滚动。
   关键修复:桌面 .news-rows{flex:1;overflow:auto} 在 height:auto 容器里会塌成 0 高
   → "没有列表"。手机改为内容自然铺开,由外层页面滚动。 */
body.is-mobile .news-page .page-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.is-mobile .news-3col {
  display: block;        /* 退出 grid */
  height: auto; min-height: 0; overflow: visible;
}
/* 桌面左侧详情栏在手机隐藏(改全屏覆盖层 .m-news-detail);助手右栏由 FAB 承接 */
body.is-mobile .news-3col > .news-detail-pane,
body.is-mobile .news-3col > .news-chat-pane { display: none; }
body.is-mobile .news-list-pane {
  border: none; border-radius: 0; background: transparent;
  height: auto; overflow: visible; display: block;
}
body.is-mobile .news-list-pane .news-rows {
  flex: none; height: auto; overflow: visible;   /* 不再内部滚动 → 列表完整铺开 */
}

/* tab 行 + 筛选 chips:横滑不换行,触屏目标加高 */
body.is-mobile .news-tab-row {
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  position: sticky; top: 0; z-index: 6; background: var(--m-bg, #fff);
}
body.is-mobile .news-tab-row::-webkit-scrollbar { display: none; }
body.is-mobile .news-tab { white-space: nowrap; padding: 11px 13px; }
body.is-mobile .news-filter-bar { gap: 5px; padding: 7px 12px; }
body.is-mobile .news-filter-group {
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding-bottom: 2px;
}
body.is-mobile .news-filter-group::-webkit-scrollbar { display: none; }
body.is-mobile .news-chip { white-space: nowrap; padding: 5px 12px; }
body.is-mobile .news-watch-head { position: static; }
/* 观察卡正文手机字号略收 */
body.is-mobile .news-obs-body { font-size: 13px; line-height: 1.65; }
/* 新闻行手机加大可点区与标题字号 */
body.is-mobile .news-row { padding: 13px 14px; }
body.is-mobile .news-row-title { font-size: 15px; line-height: 1.5; }
body.is-mobile .news-row .news-ctx-pin { opacity: 1; }   /* 触屏无 hover,常显 */

/* 新闻详情全屏覆盖层(点列表行打开;与助手 overlay 同款全屏) */
body.is-mobile .m-news-detail {
  position: fixed; inset: 0;
  background: var(--m-bg, #fff);
  z-index: 695;
  display: flex; flex-direction: column;
}
body.is-mobile .m-news-detail-head {
  flex: 0 0 auto; padding: 12px 14px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line, #e2e8f0);
}
body.is-mobile .m-news-back {
  border: none; background: transparent; cursor: pointer;
  font-size: 15px; color: var(--accent, #4258e6); font-weight: 600;
  padding: 4px 0;
}
body.is-mobile .m-news-detail-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  display: flex; flex-direction: column; gap: 10px;
}
body.is-mobile .m-news-detail-body .news-detail-title { font-size: 19px; line-height: 1.4; }
body.is-mobile .m-news-detail-body .news-detail-summary { font-size: 15px; line-height: 1.7; }

/* 助手覆盖层内的聊天栏占满(新闻/知识库/云文档共用 .m-asst-body) */
body.is-mobile .m-asst-body .news-chat,
body.is-mobile .m-asst-body .kb-ai-col { height: 100%; display: flex; flex-direction: column; min-height: 0; }
/* sheet 自带标题,内层重复标题行收起(有「清空」按钮时保留以免功能丢失) */
body.is-mobile .m-side-sheet-body .news-chat-head:not(:has(button)) { display: none; }
/* 助手 overlay 已有标题栏(📰 新闻助手),内层重复标题行同样收起(无按钮时) */
body.is-mobile .m-asst-body .news-chat-head:not(:has(button)) { display: none; }
body.is-mobile .m-asst-body .kb-ai-head { display: none; }

/* 通讯录·我的团队:320px+1fr 双栏 → 单列堆叠(列表在上,详情随选中滚达) */
body.is-mobile .teams-pane { grid-template-columns: 1fr; min-height: 0; }
body.is-mobile .team-detail-pane {
  border-top: 1px solid var(--line, #e2e8f0);
  padding-top: 12px; margin-top: 4px;
}
/* 成员行:名字不竖排,操作按钮换行铺开而不是挤出屏 */
body.is-mobile .team-member { flex-wrap: wrap; row-gap: 6px; }
body.is-mobile .team-member-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
body.is-mobile .team-member-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
body.is-mobile .team-detail-head { flex-wrap: wrap; row-gap: 8px; }
body.is-mobile .team-detail-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
body.is-mobile .teams-list-head { row-gap: 6px; }

/* 运行页右栏(任务信息/参考资料)的手机形态:浮动 pill + sheet */
.m-side-pill { display: none; }
body.is-mobile .m-side-pill {
  display: inline-flex;
  position: fixed;
  right: 14px;
  bottom: calc(var(--m-tab-h) + env(safe-area-inset-bottom, 0px) + 120px);
  border: none; border-radius: 99px;
  padding: 10px 16px;
  background: var(--m-grad); color: #fff;
  font-size: 12.5px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(66, 88, 230, .4);
  z-index: 590; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
body.is-mobile .m-side-sheet-body { max-height: 58vh; overflow-y: auto; }
/* sheet 内的 ref-side 原样式去边框、占满 */
body.is-mobile .m-side-sheet-body .ref-side { width: 100%; max-height: none; border: none; box-shadow: none; }

/* ============ 平板断点(769–1024:保留多栏,整体收窄消除横滚) ============ */
@media (min-width: 769px) and (max-width: 1024px) {
  .app-shell { min-width: 0; }
  .conv-col-frame { width: 240px !important; }
  .conv-col-resizer { display: none; }
  .gamma-rail, .ws-asst-rail, .kb-gamma-rail { width: 300px !important; }
  .ref-side { width: 260px !important; flex-basis: 260px !important; }
  /* 新闻三栏挤不下:列表+详情两列,新闻助手整行垫底 */
  .news-3col { grid-template-columns: 320px minmax(0, 1fr); }
  .news-3col > .news-detail-pane { order: 2; }
  .news-3col > :nth-child(2) { order: 1; }
  .news-3col > :nth-child(3) { order: 3; grid-column: 1 / -1; max-height: 30vh; }
  .skills-main-body { padding: 14px; }
}

/* ============ 全局字阶统一(手机) ============ */
/* token 级覆盖:全站用 var(--t-*) 的字号一处统一;保留用户字号缩放设置 */
body.is-mobile {
  --t-xs:  calc(11px * var(--font-scale));
  --t-sm:  calc(12px * var(--font-scale));
  --t-md:  calc(13.5px * var(--font-scale));
  --t-lg:  calc(15px * var(--font-scale));
  --t-xl:  calc(16px * var(--font-scale));
  --t-2xl: calc(18px * var(--font-scale));
  --t-3xl: calc(19px * var(--font-scale));   /* 页标题 22 → 19,与问候头一致 */
}

/* 页头:窄屏允许换行但标题不竖排;副标题独立成行不挤竖条(新闻页灾难修复) */
body.is-mobile .page-head {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 2px;
  margin-bottom: 10px;
}
body.is-mobile .page-head .h1 { white-space: nowrap; font-weight: 700; }
body.is-mobile .page-head > .muted,
body.is-mobile .page-head > span.muted {
  flex: 1 1 100%;
  white-space: normal;
  line-height: 1.5;
}

/* 知识库/云文档树行:常显操作图标紧凑化,避免挤掉文件名 */
body.is-mobile .kb-row-actions { gap: 0; }
body.is-mobile .kb-row-icn { font-size: 12px; padding: 2px 3px; }

/* 列表行文字层级统一:主 14 / 次 12(覆盖各屏散落的 11~13px) */
body.is-mobile .conv-row-name,
body.is-mobile .ac-side-row-name,
body.is-mobile .wb-tree-label { font-size: 14px; }
body.is-mobile .conv-row-last,
body.is-mobile .ac-side-row-meta { font-size: 12px; }

/* ============ 真机验收修复(iPhone 实测反馈) ============ */

/* #40 底栏:窄机型放不下时可横向滑动(放得下仍均分;更多永在) */
body.is-mobile .m-tabbar {
  overflow-x: auto;
  scrollbar-width: none;
}
body.is-mobile .m-tabbar::-webkit-scrollbar { display: none; }
body.is-mobile .m-tab { flex: 1 0 auto; min-width: 60px; }

/* #41 右下浮动控件统一对齐:同一 right、同尺寸(原 14/24px 错位) */
body.is-mobile .m-asst-fab,
body.is-mobile .m-side-pill { right: 20px; }
body.is-mobile .m-asst-fab { width: 44px; height: 44px; font-size: 19px; }
body.is-mobile .support-fab { right: 20px !important; width: 44px !important; height: 44px !important; }
body.is-mobile .feedback-fab { right: 20px !important; }

/* #44 按钮文字永不竖排折行(产物预览顶栏 新窗口/下载/关闭 等) */
body.is-mobile .btn { white-space: nowrap; }

/* #43 知识库/云文档页:区块呼吸感 — 树区收紧、内容区放高、间距拉开 */
body.is-mobile .kb-screen { gap: 12px; }
body.is-mobile .kb-screen > :first-child { max-height: 30vh; }
body.is-mobile .kb-screen iframe { min-height: 52vh; }
body.is-mobile .kb-workspace { row-gap: 12px; }

/* #45 通讯录手机 scope pill(全员 / 我的团队) */
body.is-mobile .m-scope-tabs {
  display: flex; gap: 8px; padding: 2px 2px 10px;
}
.m-scope-tabs { display: none; }
body.is-mobile .m-scope-tabs button {
  border: none; border-radius: 99px;
  padding: 7px 16px;
  font-size: 13px; font-weight: 600;
  background: var(--m-surf); color: #4a5268;
  box-shadow: var(--m-sh-sm); cursor: pointer;
}
body.is-mobile .m-scope-tabs button.is-on {
  background: var(--m-grad); color: #fff;
  box-shadow: 0 4px 12px rgba(66, 88, 230, .3);
}
