/* ==========================================================================
   polish.css · P2 精修层（2026-11-26）
   --------------------------------------------------------------------------
   只做**增量覆盖**，不改 main.css —— 出问题删掉这个 <link> 就能回滚。
   四件事：
     1. 骨架屏组件（复用 main.css 已有的 .skeleton shimmer）
     2. 手机端弹窗 → bottom sheet
     3. 统一焦点环（键盘可达）
     4. 窄屏 / 200% 缩放：右栏折叠，内容不再被 306px 挤爆
   ========================================================================== */

:root {
  --focus-ring: #9a9a9a;
}
html[data-theme="light"] {
  --focus-ring: #5c5c5c;
}

/* ── 1. 骨架屏 ────────────────────────────────────────────── */
.sk { display: grid; gap: 14px; padding: 2px 0; }
.sk-bar {
  height: 12px; border-radius: 6px;
  background: linear-gradient(100deg, rgba(127,127,127,.10) 30%, rgba(127,127,127,.22) 50%, rgba(127,127,127,.10) 70%);
  background-size: 220% 100%; animation: shimmer 1.5s linear infinite;
}
html[data-theme="light"] .sk-bar {
  background: linear-gradient(100deg, rgba(0,0,0,.06) 30%, rgba(0,0,0,.13) 50%, rgba(0,0,0,.06) 70%);
  background-size: 220% 100%;
}
.sk-bar.w40 { width: 40%; }
.sk-bar.w60 { width: 60%; }
.sk-bar.w80 { width: 80%; }
.sk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sk-card {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; display: grid; gap: 10px; background: var(--surface);
}
.sk-cover { width: 54px; height: 72px; border-radius: 8px; }
.sk-line { height: 10px; border-radius: 5px; }

/* ── 2. 手机端弹窗 → bottom sheet ─────────────────────────── */
@media (max-width: 767px) {
  .modal-overlay {
    align-items: flex-end; place-items: end stretch;
  }
  .modal {
    width: 100%; max-width: 100%;
    max-height: 88vh; max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform .24s var(--ease);
  }
  .modal-overlay.show .modal { transform: none; }
  /* 关闭按钮挪到右上，符合 sheet 习惯 */
  .modal-x { top: 12px; right: 12px; }
  /* 关系图谱这类全屏弹窗保持满屏，不做 sheet */
  .modal.full {
    width: 100%; max-width: 100%;
    height: 92vh; height: 92dvh; max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }
  .modal.wide { width: 100%; }
  /* sheet 顶部的小把手（纯装饰，指示可下滑） */
  .modal::before {
    content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 4px; border-radius: 4px; background: var(--border-strong);
  }
  .modal.full::before { display: none; }
}

/* ── 3. 焦点环：键盘可见、鼠标不打扰 ──────────────────────── */
:where(a, button, [role="button"], [tabindex]:not([tabindex="-1"]), summary):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 6px;
}
/* 输入类控件本来就有 border + box-shadow 的聚焦态，不再叠外环 */
:where(input, textarea, select):focus-visible {
  outline: none;
}

/* ── 4. 窄屏 / 200% 缩放：别让固定 306px 右栏把内容挤爆 ───── */
@media (max-width: 1023px) {
  /* 200% 缩放时 1366 屏只剩 ~683 逻辑像素，这一条是关键 */
  .work2r { grid-template-columns: minmax(0, 1fr); }
  .work2r > .col-r { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .work3 { grid-template-columns: 1fr; gap: 12px; }
  .work3 > .col-l,
  .work3 > .col-c,
  .work3 > .col-r { grid-column: 1 / -1; }
  .pool-scroll { max-height: 260px; }
}

/* ── 5. 顶栏 / 侧栏在窄屏与 200% 缩放下的收口 ─────────────────
   200% 缩放时 683px 截图里出现过：顶栏按钮被挤成竖排单字、品牌名折三行、
   侧栏仍占 232px（1/3 屏）。这里只做"不再难看"，完整的底部 Tab 属于 P0。 */
@media (max-width: 1099px) {
  .titlebar { gap: 8px; padding-left: 10px; }
  .tb-brand { min-width: 0; }
  .tb-brand #tbBrandName {
    max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .tb-brand #tbVer, .tb-brand .web-badge { display: none; }
  .work-switch { max-width: 150px; }
  .work-switch b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 工具按钮只留图标，文字会把它挤成竖排 */
  .tb-btn { white-space: nowrap; padding: 0 8px; min-width: 32px; justify-content: center; }
  .tb-tools .tb-btn > span:not(.badge) { display: none; }
}
@media (max-width: 767px) {
  /* 固定列数的栅格在手机上会挤成"一字一行"：三列 → 两列，更窄 → 一列 */
  .g2, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  /* 注意：这里**不再**把 g2/g3/g4 压成单列。
     实测首页「快捷入口」是 9 个 icon+文字的小卡（.grid.g3），压成单列后
     每个 90px 高、整屏只放得下 5 个，比两列难用得多。
     2 列在 390px 上是 ~175px，正文级文字仍然不挤；真正放不下的是 ≤359。 */
  /* 首页三张统计卡例外：一张一行要占掉 400px，整屏都在看「0」。
     三列并排、字号收紧到 19px，一屏就能看到作品列表。 */
  .g3.stag { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .g3.stag .stat-card { padding: 10px 10px 11px; }
  .g3.stag .stat-card .lab { font-size: 10px; gap: 4px; line-height: 1.4; }
  .g3.stag .stat-card .lab .icon { width: 12px; height: 12px; }
  .g3.stag .stat-card .num { font-size: 19px; margin-top: 4px; }
  .g3.stag .stat-card .delta { font-size: 10px; line-height: 1.45; margin-top: 3px; }
}

/* ── 6. 首页两栏（最近作品 + 快捷入口） ─────────────────────────
   原来右栏写死 inline style="width:300px"，390px 屏上把左栏挤成 ~40px，
   文字变成"一字一行"并溢出压住右侧内容。改成类名，桌面仍是 300px，手机叠起来。 */
.home-side { width: 300px; flex: none; }
@media (max-width: 767px) {
  .home-cols { flex-direction: column; }
  .home-cols > .flex1 { width: 100%; }
  .home-side { width: 100%; }
}

/* 作品集分类条：原来靠内联样式排，手机上「当前版本 v…」被挤成 40px 竖条 */
.lib-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.lib-ver { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }

/* ── 侧栏「无标题分组」（2026-11-26）────────────────────────
   原来最后一组是「系统 → 系统 → API/授权/关于」，两级同名纯噪音。
   现在只剩一个「更新日志」，放在无标题分组里，用一条细线把它和上面的功能区分开。 */
.sb-sect-bare { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--border); }

/* ── 品牌标记（2026-11-26）──────────────────────────────────
   顶栏原来是「渐变方块 + ✦」的占位符，现在换成真正的 LOGO。
   LOGO 自己带白纸底，所以去掉原来的渐变背景，只留一圈极淡描边把边缘压住。 */
.tb-brand .logo {
  background: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  padding: 0; overflow: hidden;
}
.tb-brand .logo .logo-img { width: 100%; height: 100%; display: block; }
html[data-theme="light"] .tb-brand .logo { box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }

/* ══════════════════════════════════════════════════════════════════════════
   P1 · 阅读体验（2026-11-26）
   --------------------------------------------------------------------------
   1. 字号刻度：全站收敛到 10 档整数（下面 --fs-* 是唯一事实源）
   2. 稿纸：17px / 行高 1.9 / 每行约 34 个汉字
   3. 状态条：生成中从「顶部居中」统一到「右下角」，并让熊猫让位（原来同一句提示
      在顶部胶囊和熊猫气泡里各显示一次）
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 字号刻度 ─────────────────────────────────────────────
   为什么必须是整数：半像素字号（11.5 / 12.5 / 13.5）在 Windows 125% / 150% 缩放下
   落在半像素边界，浏览器按亚像素渲染 → 笔画发虚、同字号字重看着不一样。
   改之前的实际分布有 11 / 11.5 / 12 / 12.5 四档并存在同一屏里。 */
:root {
  --fs-10: 10px;   /* 徽标、极小的辅助标记 */
  --fs-11: 11px;   /* 表头、元信息 */
  --fs-12: 12px;   /* 次要 UI 正文（用得最多） */
  --fs-13: 13px;   /* 导航、标签、卡片标题 */
  --fs-14: 14px;   /* 小正文 / 按钮 */
  --fs-16: 16px;   /* 表单、标题栏 */
  --fs-17: 17px;   /* 稿纸正文 */
  --fs-19: 19px;   /* 页面标题 h1 */
  --fs-22: 22px;   /* 大标题 */
  --fs-26: 26px;   /* 统计数字 */

  --read-size: 17px;
  --read-leading: 1.9;
  --read-measure: 34em;    /* 每行 34 个汉字：超过 40 会串行 */
}

/* ── 2. 稿纸：正文列锁在 34em ────────────────────────────────
   窄屏本来就不够 34em，max-width 自然不生效；只有 1600px 以上的宽屏才真正收窄。
   padding 要加回去，否则 34em 会连内边距一起吃掉（border-box）。 */
.editor-area {
  max-width: calc(var(--read-measure) + 60px);   /* padding 30px × 2 */
  margin-left: auto; margin-right: auto;
}
.editor-body {
  max-width: calc(var(--read-measure) + 60px);
  margin-left: auto; margin-right: auto;
}
/* 行内不要撑满：中文标点挤压会让长行显窄，略微留白更稳 */
.editor-area, .editor-body { text-wrap: pretty; }

/* ── 3. 状态条统一到右下角 ──────────────────────────────────
   原来：生成中在顶部居中（手机上跟状态栏抢位置，宽屏上离眼睛很远）、
   熊猫气泡再说一遍、toast 在底部居中 —— 三个位置三种外观。 */
.gen-hint {
  top: auto; left: auto; right: 22px; bottom: 26px;
  transform: translateY(10px);
  /* 原来用 --surface-2（带透明），浮在卡片上时底下文字会透出来 —— 实测手机上
     「审核」两个字穿过胶囊，看着像叠影。改成近乎不透明 + 模糊。 */
  background: rgba(20, 20, 20, .96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
html[data-theme="light"] .gen-hint { background: rgba(250, 250, 250, .97); }
.gen-hint.show { transform: none; }
/* 生成中让熊猫让位：它的气泡和这条提示是同一句话 */
body.generating .pet { display: none; }

/* 保存状态：原来是写死的「自动保存已启用」，永远不变 */
#draftAuto[data-st="dirty"] { color: var(--muted); }
#draftAuto[data-st="saving"] { color: var(--p-300); }
#draftAuto[data-st="saved"] { color: var(--green-400); }
#draftAuto[data-st="error"] { color: var(--red-400); }

@media (max-width: 767px) {
  /* 手机上避开底部 Tab（56px）与写作条（58px） */
  .gen-hint {
    right: 12px; bottom: calc(72px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px); font-size: var(--fs-12);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gen-hint { transition: none; }
}

/* 减少动效：骨架 shimmer 与弹窗位移都关掉 */
@media (prefers-reduced-motion: reduce) {
  .sk-bar { animation: none; }
  .modal, .modal-overlay { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   P0 · 手机真的能写（2026-11-26）
   --------------------------------------------------------------------------
   上一轮（P2）只做到"手机上不再挤爆"，侧栏还是 60px 图标栏、`写作` 还是缩小版桌面。
   这一轮把骨架换掉，**全部规则只在 ≤767px 生效**，桌面/平板零改动：

     1. 侧栏 232px 固定 → 左侧抽屉（268px，遮罩点击/Esc/选中即收起）
     2. 底部 Tab 4 项（首页 / 作品 / 写作 / 更多），每项 56px 高
     3. 触控目标 ≥44px（WCAG 2.2 · 2.5.8 Target Size）
     4. 正文页 → 全屏稿纸：工具栏单行横滑、稿纸占满剩余高度、底部写作条
   ══════════════════════════════════════════════════════════════════════════ */

/* 默认全部隐藏：桌面和平板完全不受影响 */
.tabbar,
.sb-scrim,
.sb-mhead,
.sb-mclose,
.m-write-bar { display: none; }

@media (max-width: 767px) {
  /* ── 1. 侧栏改抽屉 ─────────────────────────────────────── */
  .shell > .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 268px; max-width: 84vw;
    padding-top: env(safe-area-inset-top);
    z-index: 70;
    transform: translateX(-100%);
    transition: transform .24s var(--ease);
    box-shadow: 0 0 48px rgba(0, 0, 0, .55);
    will-change: transform;
    border-right-color: var(--border-strong);
  }
  body.sb-open .shell > .sidebar { transform: none; }

  .sb-scrim {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(0, 0, 0, .56);
    opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease);
  }
  body.sb-open .sb-scrim { opacity: 1; pointer-events: auto; }

  .sb-mhead {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 10px 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--text); flex: none;
  }
  .sb-mhead b { font-weight: 600; letter-spacing: .05em; }
  .sb-mclose {
    display: grid; place-items: center;
    width: 44px; height: 44px; flex: none;
    border: 0; border-radius: 10px; background: transparent;
    color: var(--muted); font-size: 22px; line-height: 1;
    cursor: pointer; font-family: inherit;
  }
  .sb-mclose:active { background: var(--surface); color: var(--text); }

  /* 抽屉里恢复文字标签（P2 曾为了 60px 图标栏把 label 全藏了） */
  .sidebar .nav-item { height: 44px; }
  .sidebar .nav-item .label { font-size: 13px; }
  .sidebar .sb-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }

  /* ── 2. 底部 Tab ───────────────────────────────────────── */
  .tabbar {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(10, 10, 11, .95);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
  }
  html[data-theme="light"] .tabbar { background: rgba(248, 248, 248, .96); }
  .tabbar .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 56px;
    border: 0; background: none; padding: 0;
    color: var(--muted); font-family: inherit; font-size: 11px; letter-spacing: .02em;
    cursor: pointer; transition: color .16s var(--ease), transform .12s var(--ease);
  }
  .tabbar .tab .icon { width: 21px; height: 21px; opacity: .8; }
  .tabbar .tab.on { color: var(--text); }
  .tabbar .tab.on .icon { opacity: 1; }
  .tabbar .tab:active { transform: scale(.94); }

  /* ── 3. 内容区：给 Tab 条让位，页边距收紧 ───────────────── */
  .page { padding: 14px 14px calc(74px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
  .page-head h1 { font-size: 19px; }
  .page-head p { font-size: 12px; line-height: 1.6; }
  .page-head .ph-ico { width: 34px; height: 34px; border-radius: 10px; }
  /* 头部动作条：单行横向滚动，不要换行堆成三排 */
  .page-head .ph-act {
    display: flex; align-items: center; gap: 8px;
    width: 100%; overflow-x: auto; overflow-y: hidden;
    flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: 2px;
  }
  .page-head .ph-act::-webkit-scrollbar { display: none; }
  .page-head .ph-act > * { flex: none; }
  /* 同样的右缘渐隐（导出/复制/朗读… 滑得动） */
  .page-head .ph-act {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
  }

  /* 作品集分类条：4 个按钮 × 44px 在 390px 上已经占满，版本号会让它溢出成一竖条 */
  .lib-tabs { flex-wrap: wrap; row-gap: 8px; }
  .lib-ver { display: none; }

  /* 悬浮熊猫上移：底栏 56px，26px 会正好压在上面 */
  .pet { right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); }
  .pet .body { width: 44px; height: 44px; }

  /* ── 4. 触控目标 ≥44px（WCAG 2.2 · 2.5.8） ──────────────
     原来 .btn.sm 只有 25px 高，手机上根本点不中。 */
  .btn.sm { height: 44px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
  .btn { min-height: 44px; }
  .inp { min-height: 44px; font-size: 16px; }   /* 16px：iOS 聚焦时不会自动放大整页 */
  select.inp { height: 44px; }
  .tabs button, .chs button { min-height: 44px; }
  .chap { min-height: 48px; padding: 9px 10px; }
  .nav-item { min-height: 44px; }
  .modal-x { width: 44px; height: 44px; }

  /* ── 5. 正文页 → 全屏稿纸 + 底部写作条 ──────────────────
     桌面版是「章节树 246 + 稿纸 + 助手 306」三栏，手机上一栏都放不下。 */
  body[data-page="flow-draft"] .tabbar { display: none; }      /* 让位给写作条 */
  body[data-page="flow-draft"] .pet { display: none; }         /* 别压住写作条 */
  body[data-page="flow-draft"] .stepbar { display: none; }     /* 步骤条在抽屉里 */

  body[data-page="flow-draft"] #page-flow-draft {
    padding: 0 0 calc(62px + env(safe-area-inset-bottom));
  }
  /* 头部不整块藏掉（导出/复制/朗读还在里面），压成一条 44px 的横滑条 */
  body[data-page="flow-draft"] .page-head {
    margin: 0; padding: 6px 10px; gap: 0;
    border-bottom: 1px solid var(--border);
  }
  body[data-page="flow-draft"] .page-head .ph-ico,
  body[data-page="flow-draft"] .page-head h1,
  body[data-page="flow-draft"] .page-head p { display: none; }

  /* 顺序：稿纸 → 章节树 → 助手栏（原来章节树在最上面，一进来先看见列表） */
  body[data-page="flow-draft"] .work3 {
    display: flex; flex-direction: column; gap: 10px;
    /* ⚠️ 必须 stretch：main.css 里 .work3 是 grid + align-items:start，
       换成 flex 后 align-items:start 会让子项按 max-content 撑开 ——
       而工具栏是 nowrap，于是稿纸被撑到 459px（390 屏上横向溢出、placeholder 被切）。 */
    align-items: stretch;
  }
  body[data-page="flow-draft"] .work3 > * { min-width: 0; width: 100%; }
  body[data-page="flow-draft"] .col-c { order: 1; }
  body[data-page="flow-draft"] .col-l { order: 2; }
  body[data-page="flow-draft"] .col-r { order: 3; }
  body[data-page="flow-draft"] .chap-list { max-height: 44vh; }

  body[data-page="flow-draft"] .editor-wrap {
    border-radius: 0; border-left: 0; border-right: 0;
    background: transparent;
  }
  /* 9 个动作按钮在 390px 上会折成三排 —— 单行横滑，拇指一抹就到 */
  body[data-page="flow-draft"] .editor-bar {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 6px 10px; gap: 6px;
    position: sticky; top: 0; z-index: 3;
    background: var(--soft);
  }
  body[data-page="flow-draft"] .editor-bar::-webkit-scrollbar { display: none; }
  /* 右缘渐隐：告诉用户「还能往右滑」。没有它，被截断的「撤回」看起来像排版坏了 */
  body[data-page="flow-draft"] .editor-bar {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  body[data-page="flow-draft"] .editor-bar .eb { height: 40px; min-width: 40px; font-size: 12px; flex: none; }
  body[data-page="flow-draft"] .editor-bar .div { height: 22px; }

  /* 稿纸占满剩余高度：100dvh 减去 标题栏/工具条/页脚/写作条 ≈ 190px */
  body[data-page="flow-draft"] .editor-area {
    min-height: calc(100dvh - 210px);
    max-height: none; resize: none;
    font-size: 16px; line-height: 1.95; letter-spacing: .01em;
    padding: 16px 16px 28px;
  }

  /* 写作条：编辑器顶部那排按钮拇指够不着，这里重复三个最常用动作 */
  .m-write-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    align-items: center; gap: 8px;
    height: calc(58px + env(safe-area-inset-bottom));
    padding: 0 12px env(safe-area-inset-bottom);
    background: rgba(10, 10, 11, .96);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
  }
  html[data-theme="light"] .m-write-bar { background: rgba(248, 248, 248, .97); }
  body[data-page="flow-draft"] .m-write-bar { display: flex; }
  .m-write-bar .mw {
    height: 44px; padding: 0 12px; flex: 1 1 0; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    border: 1px solid var(--border-strong); border-radius: 11px;
    background: transparent; color: var(--text-2);
    font-family: inherit; font-size: 13px; white-space: nowrap;
    cursor: pointer; transition: background .15s, color .15s, transform .12s;
  }
  .m-write-bar .mw:active { transform: scale(.97); }
  .m-write-bar .mw.primary {
    flex: 1.25 1 0;
    background: #e7e9eb; color: #111; border-color: transparent; font-weight: 600;
  }
  .m-write-bar .mw-nav {
    flex: 0 0 44px; width: 44px; padding: 0;
    font-size: 0;   /* 只要图标 */
  }
  .m-write-bar .mw-nav .icon { width: 20px; height: 20px; }
}

/* 更窄（≤359，如 iPhone SE 竖屏）：栅格退回单列，写作条收紧，别挤成两行 */
@media (max-width: 359px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g3.stag { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* 统计卡仍三列（字号已缩小） */
  .m-write-bar { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .m-write-bar .mw { font-size: 12px; padding: 0 8px; }
}
