/* =========================================================================
   手机 / 平板 适配（2026-10-18）
   -------------------------------------------------------------------------
   断点：
     ≥1024px       桌面 —— 本文件全部规则都不生效（原样不动）
     768 ~ 1023    平板 —— 侧栏收成 72px 图标栏；点左上按钮滑出完整抽屉
     < 768         手机 —— 侧栏变抽屉 + 底部 5 个主入口；弹窗变底部抽屉
   原则：
     · 只写「窄屏覆盖」，不改桌面既有观感；
     · 触摸优先：点击区域 ≥40px、去掉依赖 hover 的交互、输入框 16px（防 iOS 自动缩放）；
     · 一屏信息先保「看得清、点得到」，次要信息降级而不是堆叠。
   ========================================================================= */

/* ---------------- 小屏抽屉的遮罩 ---------------- */
.sidebar-scrim {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
body.drawer-open .sidebar-scrim { opacity: 1; pointer-events: auto; }

/* ---------------- 手机底部导航（默认不显示） ---------------- */
.mobile-tabs { display: none; }

/* 看板筛选摘要条（含导出图标）只在手机上出现 */
.bd-fsum { display: none; }

/* =========================================================================
   一、平板（768 ~ 1023）：侧栏收成图标栏
   ========================================================================= */
@media (min-width: 768px) and (max-width: 1023px) {
  /* ⚠️ style.css 里有一条 `@media (max-width:860px){ .sidebar{display:none} }`（老版窄屏处理），
     平板 768~860 也会命中 —— 必须显式恢复，否则整条图标栏消失。 */
  .sidebar { display: flex; width: 74px; padding: calc(18px + var(--safe-top)) 10px 14px; }
  .brand { padding: 0 0 14px; justify-content: center; }
  .brand-text, .nav-label, .nav-badge, .nav-caret, .nav-sub, .sidebar-foot { display: none !important; }
  .nav-group {
    height: 1px; padding: 0; margin: 12px 8px;
    font-size: 0; color: transparent; background: var(--line-soft); overflow: hidden;
  }
  .nav-item, .nav-fold-head { justify-content: center; padding: 12px 0; }
  .nav-item .nav-ic { margin: 0; }

  /* 点左上按钮 → 覆盖式完整导航（宽度和桌面一致，读完即走） */
  body.drawer-open .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    width: 258px; padding: calc(20px + var(--safe-top)) 12px 16px;
    border-right: 1px solid var(--line);
    box-shadow: 20px 0 60px rgba(0, 0, 0, .45);
    overflow-y: auto;
  }
  body.drawer-open .brand { padding: 0 10px 20px; justify-content: flex-start; }
  body.drawer-open .brand-text,
  body.drawer-open .nav-badge,
  body.drawer-open .nav-caret,
  body.drawer-open .sidefoot,
  body.drawer-open .sidebar-foot { display: revert !important; }
  body.drawer-open .nav-label { display: inline !important; }
  body.drawer-open .nav-sub { display: flex !important; flex-direction: column; }
  /* ⚠️ 上面那条是无条件的，会盖掉 style.css 的 `.nav-fold.collapsed .nav-sub{display:none}` ——
     平板抽屉里所有分组被强制展开、点折叠标题一点反应都没有。这里用更具体的选择器把折叠还回去。 */
  body.drawer-open .nav-fold.collapsed .nav-sub { display: none !important; }
  body.drawer-open .nav-group {
    height: auto; padding: 18px 12px 7px; margin: 0;
    font-size: 11px; color: var(--text3); background: none; overflow: visible;
  }
  body.drawer-open .nav-item,
  body.drawer-open .nav-fold-head { justify-content: flex-start; padding: 9px 12px; }

  /* 内容区：左右留白收紧一档，其余交给页面自己的响应式 */
  .main { padding: var(--safe-top) 20px 0; }
  .topbar { height: 68px; }
  .topbar h1 { font-size: 19px; }
  .page { padding-top: 16px; }

  /* 卡片按 3 列，正好一行放下 */
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .ccx-hint { display: none; }
  .ccx-head { gap: 8px; }

  /* 弹窗留出左右余量，不要贴边 */
  .modal { width: min(600px, calc(100vw - 64px)) !important; }
  .modal.pt-wide { width: min(720px, calc(100vw - 48px)) !important; }
}

/* =========================================================================
   二、手机（< 768）：抽屉导航 + 底部主入口
   ========================================================================= */
@media (max-width: 767px) {
  /* ---- 外壳：浏览器地址栏收放时不要跳动 ---- */
  .app, .main { height: 100vh; height: 100dvh; }
  html, body { overflow-x: hidden; }
  .main { padding: var(--safe-top) 14px 0; }

  /* ---- 侧栏 = 左滑抽屉 ---- */
  .sidebar {
    display: flex;                                 /* 同上：覆盖 style.css 的老规则 */
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    width: min(284px, 84vw); height: 100dvh; overflow-y: auto;
    padding: calc(18px + var(--safe-top)) 12px calc(16px + env(safe-area-inset-bottom));
    background: var(--bg); border-right: 1px solid var(--line);
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
    box-shadow: 24px 0 70px rgba(0, 0, 0, .5);
  }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open { overflow: hidden; }
  .nav-item { padding: 11px 12px; min-height: 44px; }

  /* ---- 顶栏：菜单 + 标题 + 主题 / 刷新 / 账号 ----
     ⚠️ 头像（#btn-account）是手机端进账号面板、退出登录的唯一入口，不能隐藏。 */
  .topbar { height: 58px; gap: 8px; }
  .topbar .eyebrow { display: none; }
  .topbar h1,
  .topbar.hero-mode #page-title { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar.hero-mode #page-eyebrow { display: none; }
  .tb-date, .tb-sep { display: none; }
  .topbar-left { gap: 8px; min-width: 0; }
  .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
  .avatar { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; }
  .top-actions { gap: 6px; }
  .title-sub { display: block; margin: 2px 0 0; font-size: 11px; }

  /* ---- 页面：底部给导航条留位 ---- */
  .page { padding-top: 12px; }
  .page.active { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

  /* ---- 底部导航 ---- */
  .mobile-tabs {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--card);
    background: color-mix(in srgb, var(--card) 92%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mtab {
    position: relative; height: 56px; border: 0; background: none;
    color: var(--text3); font-size: 10.5px; letter-spacing: .2px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mtab svg { width: 21px; height: 21px; }
  .mtab.active { color: var(--blue); }
  .mtab.active::before {
    content: ''; position: absolute; top: 0; left: 50%; width: 22px; height: 2px;
    margin-left: -11px; border-radius: 0 0 2px 2px; background: var(--blue);
  }
  .mtab:active { background: color-mix(in srgb, var(--text2) 10%, transparent); }
  .mtab-dot {
    position: absolute; top: 7px; left: 50%; margin-left: 6px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--red); display: none;
  }
  .mtab-dot.on { display: block; }

  /* ---- 卡片 / 列表 ---- */
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
  .kpi { padding: 12px; gap: 10px; border-radius: 12px; }
  .kpi-ic { width: 32px; height: 32px; border-radius: 8px; }
  .kpi-value { font-size: 21px; }
  .kpi-note { font-size: 11px; }
  .panel { border-radius: 12px; }
  .panel-head { padding: 13px 14px 10px; }
  .panel-head h3 { font-size: 14px; }

  /* ---- 触摸目标：按钮统一到 38px 高，图标按钮 40px ---- */
  .btn { padding: 8px 12px; min-height: 36px; }
  .icon-btn, .pay-colset-btn { min-height: 36px; }

  /* ---- 输入框 16px：iOS 聚焦时不会自动放大页面 ---- */
  input, select, textarea { font-size: 16px; }
  .pay-search input, .pt-search input { font-size: 16px; }

  /* ---- 弹窗 = 底部抽屉（拇指够得着，长表单也能滚） ---- */
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal,
  .modal.pt-wide, .modal.pt-mid, .modal.pt-small {
    width: 100% !important; max-width: 100%;
    max-height: 90vh; max-height: 90dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    animation: sheetIn .26s cubic-bezier(.32, .72, 0, 1);
  }
  @keyframes sheetIn { from { opacity: .6; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .modal-head { position: sticky; top: 0; z-index: 2; background: var(--card); padding: 20px 16px 8px; }
  .modal-head::before {
    content: ''; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px;
    margin-left: -19px; border-radius: 2px; background: var(--line);
  }
  .modal-head h3 { font-size: 15.5px; }
  .modal-body { padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); }
  .modal-body .form-actions { position: sticky; bottom: 0; background: var(--card); padding: 10px 0 2px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .detail-row { align-items: flex-start; }
  .detail-row .dk { width: 78px; }

  /* ---- Toast：贴底，不挤占顶栏 ---- */
  .toast-wrap {
    position: fixed; left: 12px; right: 12px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    max-width: none; flex-direction: column; align-items: stretch; z-index: 80;
  }
  .toast { width: 100%; justify-content: flex-start; padding: 11px 14px; font-size: 13px; }

  /* ---- 备份提醒 ---- */

  /* ---- 合同卡条 & 筛选行 ---- */
  .ccx-block { margin-bottom: 12px; }
  .ccx-head { row-gap: 8px; }
  .ccx-title { font-size: 14px; }
  .ccx-tools { flex: 1 1 100%; gap: 6px; flex-wrap: nowrap; }
  /* 手机工具条：只留图标（文字在 title / aria-label 里），挤成等宽方形按钮 */
  .ccx-tools .btn { flex: 1 1 0; justify-content: center; padding: 0 8px; gap: 0; }
  .pay-search { order: 6; flex: 1 1 100%; width: 100%; height: 38px; border-radius: 12px; }
  .ccx { width: 212px; min-height: 116px; }
  .ccx-sbar { display: none; }                 /* 手机上直接手指滑，不需要自绘条 */
  .pay-tabsrow { gap: 8px; }
  .pay-filters { gap: 6px; justify-content: flex-start; }
  .pay-fdiv { flex: 0 0 auto; }

  /* ---- 付款表格：横向滑动查看，表头与首列保持可见 ---- */
  /* 只改排列方式，滚动容器仍交给 .page.active（原来写成 overflow:visible 会让长列表无法滚动） */
  #page-payments.active { display: block; overflow-y: auto; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  #page-payments .pay-tablewrap { max-height: 62vh; max-height: 62dvh; min-height: 0; -webkit-overflow-scrolling: touch; }
  .pay-table { font-size: 12.5px; }
  .pay-table thead th { padding: 9px 10px; font-size: 12px; }
  .pay-table tbody td { padding: 8px 10px; }
  .pay-bulkbar { padding: 8px 10px; gap: 6px; }

  /* ---- 合同看板 ---- */
  .bd-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .bd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bd-kpi { padding: 11px 12px; }
  .bd-kpi-val { font-size: 20px; }
  .bd-panel { padding: 12px 12px 10px; border-radius: 12px; }
  .bd-filters { gap: 6px; }

  /* ---- 个人待办：整页跟着页面滚，别锁死高度 ---- */
  .pt-module { height: auto; min-height: 0; }
  .pt-work { flex-direction: column; }
  .pt-listcol { overflow: visible; padding-right: 0; }
  .pt-right { width: 100% !important; max-width: none; margin-top: 10px; }
  .pt-hw { flex-direction: column; }
  .pt-lcols { flex-direction: column; }

  /* ---- 系统设置 ---- */
  .set-card { padding: 14px; border-radius: 12px; }
  .set-head h3 { font-size: 14px; }

  /* ---- 驾驶舱：内容按块堆叠，不要强行撑满一屏 ---- */
  #page-cockpit.active { display: block; }
  #page-cockpit .content-grid { display: block; min-height: 0; }
  #page-cockpit .content-grid > .panel .todo-scroll { max-height: none; }
  /* 列表上方的分段切换（全部/系统/个人）会挤成竖排 —— 锁单行并可横向滑 */
  .tabs { flex: none; max-width: 100%; overflow-x: auto; }
  .tabs button { white-space: nowrap; padding: 5px 9px; }

  /* ---- 个人待办：顶部工具条放不下 → 分两行（胶囊 + 操作 / 搜索整行） ---- */
  .pt-topbar { height: auto; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px; }
  .pt-pills { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .pt-pills::-webkit-scrollbar { display: none; }
  .pt-pill { flex: none; height: 32px; }
  .pt-search { flex: 1 1 100%; width: 100%; order: 5; height: 38px; border-radius: 12px; }
  .pt-actions { flex: none; }
  /* 问候条：日期/时间胶囊移到下一行，标题不再被挤成竖排 */
  .pt-hg { height: auto; padding: 12px 13px; align-items: flex-start; gap: 10px; border-radius: 12px; }
  .pt-hg-row { flex-wrap: wrap; gap: 6px 10px; }
  .pt-hg-hello { font-size: 18px; white-space: nowrap; }
  .pt-hg-pills { margin-left: 0; width: 100%; gap: 6px; flex-wrap: wrap; }
  .pt-hg-pill { height: 26px; padding: 0 9px; font-size: 12px; }
  .pt-hg-sub { margin-top: 6px; white-space: normal; line-height: 1.5; }
  .pt-hm { gap: 8px; }
  .pt-lcols, .pt-hw { gap: 8px; }

  /* ---- 合同看板：筛选条重排成「胶囊 + 6×2 月份格 + 整行下拉」 ---- */
  .bd-filters { padding: 10px; gap: 8px; border-radius: 12px; flex-direction: column; align-items: stretch; }
  .bd-fsum { display: flex; align-items: center; gap: 8px; }
  .bd-fsum-t {
    flex: 1; min-width: 0; font-size: 12px; color: var(--text2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .bd-fsum-btn {
    flex: none; height: 30px; padding: 0 10px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--card2); color: var(--text2);
    font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
  }
  .bd-fsum-btn svg { transition: transform .2s; }
  .bd-filters:not(.collapsed) .bd-fsum-btn svg { transform: rotate(180deg); }
  .bd-filters.collapsed { padding: 9px 10px; }
  .bd-filters.collapsed .bd-frow { display: none; }
  /* 展开后底部已经有「导出图片」了，摘要条里那个图标就不再重复出现 */
  .bd-filters:not(.collapsed) .bd-fsum .bd-export-btn { display: none; }
  .bd-frow { gap: 8px; }
  .bd-flabel-gap { margin-left: 0; }
  .bd-chips { flex-wrap: wrap; gap: 5px; }
  .bd-quick { flex: 1 1 100%; }
  .bd-qbtn { flex: 1 1 0; height: 30px; }
  .bd-mgrid { flex: 1 1 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .bd-mchip { width: auto; height: 30px; }
  .bd-f { flex: 1 1 100%; }
  .bd-f select, .bd-f input[type="date"] { flex: 1; width: 100%; min-width: 0; height: 34px; }
  .bd-f-date { flex-wrap: wrap; }
  .bd-reset { margin-left: 0; flex: 1 1 100%; height: 34px; }
  .bd-svg-h { max-height: none; }

  /* ---- 合同支付：手机上不要再冻结右侧三列（否则可视区被吃掉一半） ---- */
  .pay-table .pay-frz { position: static; box-shadow: none; }
  .pay-table.has-frz .pay-frz { position: static; }
  .ccx-tools { flex-wrap: wrap; }
  .pay-filters { justify-content: flex-start; }

  /* ---- 系统设置：单列（.set-wrap 是 flex，必须显式换列，否则卡片并排） ---- */
  .set-wrap { flex-direction: column; gap: 0; }
  .set-wrap > .set-card, .set-wrap > .set-col { width: 100%; }
  #page-settings .page-head { display: none; }   /* 顶栏已经有标题，别重复 */

  /* ---- 付款计划：手机卡片列表（替代只能露出两列的表格） ---- */
  .pm-bar { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
  .pm-count { font-size: 12px; color: var(--text3); white-space: nowrap; flex: none; }
  .pm-sort { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); white-space: nowrap; flex: none; }
  .pm-sort select {
    height: 34px; padding: 0 8px; font-size: 13px; max-width: 150px;
    background: var(--card2); border: 1px solid var(--line); border-radius: 9px; color: var(--text);
    -webkit-appearance: none; appearance: none;
  }
  .pm-dir {
    width: 34px; height: 34px; flex: none; border-radius: 9px;
    border: 1px solid var(--line); background: var(--card2); color: var(--text2); font-size: 14px;
  }
  .pm-dir:disabled { opacity: .4; }
  .pay-mlist { display: flex; flex-direction: column; gap: 8px; }

  /* ---- 设置页：吸顶分节标题 ---- */
  .set-sec-h {
    position: sticky; top: 0; z-index: 6;
    margin: 2px 0 8px; padding: 10px 4px 8px;
    font-size: 12.5px; font-weight: 700; color: var(--text2); letter-spacing: .4px;
    background: color-mix(in srgb, var(--bg, #14161a) 94%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }

  /* ---- 合同看板：手机筛选抽屉 ---- */
  body.bd-sheet-open { overflow: hidden; }
  .bd-sheet-mask { display: none; }
  .bd-filters.open .bd-sheet-mask {
    display: block; position: fixed; inset: 0; z-index: 88;
    background: rgba(0, 0, 0, .45);
  }
  .bd-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 89;
    max-height: 80vh; overflow: auto; -webkit-overflow-scrolling: touch;
    background: var(--card); border-radius: 18px 18px 0 0;
    border-top: 1px solid var(--line);
    padding: 0 14px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -14px 40px rgba(0, 0, 0, .45);
    transform: translateY(105%); transition: transform .24s ease;
  }
  .bd-filters.open .bd-sheet { transform: none; }
  .bd-sheet-h {
    position: sticky; top: 0; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 0 10px; margin-bottom: 4px;
    background: var(--card); border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .bd-sheet-done {
    height: 32px; padding: 0 14px; border-radius: 9px; border: 0;
    background: var(--blue); color: #fff; font-size: 13px; font-weight: 600;
  }
  .bd-sheet .bd-frow { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
  .bd-sheet .bd-frow:first-of-type { border-top: 0; }
  .bd-sheet .bd-fgrid, .bd-sheet .bd-f { width: 100%; }
  .bd-sheet .bd-f select, .bd-sheet .bd-f input[type="date"] { width: 100%; flex: 1; }
  .bd-sheet .bd-mgrid { flex-basis: 100%; }
  .pm-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 11px 12px; background: var(--card);
    border: 1px solid var(--line); border-radius: 12px;
    transition: border-color .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
  }
  .pm-item:active { background: var(--hover); }
  .pm-item.chk { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 9%, var(--card)); }
  .pm-chk { flex: none; padding-top: 2px; }
  .pm-chk input { width: 18px; height: 18px; }
  .pm-body { flex: 1; min-width: 0; }
  .pm-r1 { display: flex; align-items: baseline; gap: 8px; }
  .pm-no {
    font-size: 11.5px; color: var(--text3); letter-spacing: .2px;
    font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pm-amt { margin-left: auto; flex: none; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .pm-amt.money-due { color: var(--red); }
  .pm-name {
    margin-top: 4px; font-size: 13px; color: var(--text); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .pm-r2 { margin-top: 7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--text3); }
  .pm-r2 .pay-badge { margin-left: auto; }
  .pm-sep { color: var(--line); }
  .pm-go { flex: none; align-self: center; color: var(--text3); display: inline-flex; }

  /* ---- 一卡一合同：合同头 + 节点列表 ---- */
  .pm-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 13px; overflow: hidden;
  }
  .pm-card.allchk { border-color: var(--blue); }
  .pm-card-h {
    display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px 9px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--card2) 70%, transparent), transparent);
    -webkit-tap-highlight-color: transparent;
  }
  .pm-card-h:active { background: var(--hover); }
  .pm-card-t { flex: 1; min-width: 0; }
  .pm-card-no {
    font-size: 11px; color: var(--text3); letter-spacing: .2px;
    font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pm-card-name {
    margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .pm-card-meta { margin-top: 5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 11px; color: var(--text3); }
  .pm-card-meta .pm-over { color: var(--red); }
  .pm-card-r { flex: none; text-align: right; min-width: 98px; }
  .pm-card-amt { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .pm-card-paid { margin-top: 2px; font-size: 10.5px; color: var(--text3); }
  .pm-card-bar { margin-top: 5px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
  .pm-card-bar > i { display: block; height: 100%; background: var(--green); border-radius: 2px; }
  .pm-caret {
    flex: none; align-self: center; color: var(--text3); display: inline-flex;
    transition: transform .18s;
  }
  .pm-card.collapsed .pm-caret { transform: rotate(-90deg); }
  .pm-card.collapsed .pm-nodes { display: none; }
  /* 卡片里的节点行：去掉外框，用分隔线排队 */
  .pm-nodes { border-top: 1px solid var(--line); }
  .pm-card .pm-item {
    border: 0; border-radius: 0; background: transparent;
    padding: 8px 11px; gap: 8px; align-items: center;
  }
  .pm-card .pm-item + .pm-item { border-top: 1px dashed var(--line); }
  .pm-card .pm-item .pm-amt { font-size: 14px; }
  .pm-card .pm-item .pm-name { margin-top: 2px; font-size: 12.5px; -webkit-line-clamp: 1; }
  .pm-card .pm-item .pm-r2 { margin-top: 4px; }
  .pm-card .pm-item .pm-go { display: none; }
  .pm-card .pm-item .pm-no { display: none; }
  /* 节点行改成「名称 + 金额」同一行，下面一行放日期/比例/状态 */
  .pm-card .pm-item .pm-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
  .pm-card .pm-item .pm-name { grid-column: 1; grid-row: 1; margin-top: 0; align-self: center; }
  .pm-card .pm-item .pm-r1 { grid-column: 2; grid-row: 1; }
  .pm-card .pm-item .pm-r2 { grid-column: 1 / -1; grid-row: 2; }
}

/* =========================================================================
   三、手机横屏 / 很矮的窗口：再收紧一档
   ========================================================================= */
@media (max-width: 900px) and (max-height: 520px) {
  .topbar { height: 50px; }
  .page { padding-top: 8px; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 9px 10px; }
  .kpi-value { font-size: 18px; }
  .mobile-tabs .mtab { height: 48px; }
  .mtab svg { width: 19px; height: 19px; }
  .page.active { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
}

/* =========================================================================
   四、其它零碎修正
   ========================================================================= */
/* 设置页的文件夹结构图：长行在手机里会顶出卡片，允许在任意位置折行 */
.set-struct { overflow-wrap: anywhere; word-break: break-word; }

/* 手机/平板：备份提醒的「立即导出」按钮不要被挤成两行 */
@media (max-width: 767px) {
}

/* 手机：待办行右侧的「到期/等级/日期」（桌面靠 hover 才显示）在触屏上既不显示又白占宽度，
   直接隐藏，把宽度让给标题；标题与说明各放宽到 2 行。 */
@media (max-width: 767px) {
  .todo-row { padding: 10px 8px; gap: 9px; }
  .todo-row .todo-side { display: none; }
  /* 标签与标题用「行内流」排：标题接在标签后面自然折行，不会因为宽度不够把标签单独挤成一行 */
  .todo-line1 { display: block; }
  .todo-line1 .chip { display: inline-block; vertical-align: 1px; margin-right: 6px; }
  .todo-title { display: inline; white-space: normal; }
  /* 系统待办的标题是合同全名，换行会把行高顶到 100px+ —— 手机上单行省略，
     完整合同号 + 节点名在第二行，说明文字让位给「详情」。 */
  .sw-wrap[data-kind="system"] .todo-line1 { display: flex; align-items: center; gap: 6px; }
  .sw-wrap[data-kind="system"] .todo-title {
    display: block; flex: 1 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sw-wrap[data-kind="system"] .todo-desc { display: none; }
  .sw-wrap[data-kind="system"] .todo-sub { margin-top: 2px; font-size: 11.5px; }
  .todo-line2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* ============================================================================
   手机端弹窗：全屏面板 + 单列表单 + 粘底按钮（2026-10-18）
   原问题：沿用桌面「两列表单 + 88px 标签列」，390px 宽下每列只剩 ~70px，
   日期/时间控件被截成 "9:"、"可"；弹窗上下留空、正文挤在中间。
   ============================================================================ */
@media (max-width: 767px) {
  #modal { padding: 0; align-items: stretch; }

  #modal-box {
    width: 100%; max-width: 100%;
    height: 100dvh; max-height: 100dvh;
    border-radius: 0; border: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: none;
  }

  /* 头部：固定在顶上，说明最多两行 */
  #modal-box > .pt-dialog-head,
  #modal-box > .modal-head {
    flex: none; align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--card);
  }
  #modal-box > .modal-head h3 { font-size: 16px; }
  #modal-box > .pt-dialog-head .tt { font-size: 16px; }
  #modal-box > .pt-dialog-head .st {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; white-space: normal; font-size: 11.5px; line-height: 1.5; margin-top: 3px;
  }
  #modal-box > .pt-dialog-head .badge { width: 30px; height: 30px; }
  #modal-box .modal-x { width: 36px; height: 36px; flex: none; }

  /* 正文：中间滚动，不再限高 */
  #modal-box > .pt-dialog-body,
  #modal-box > .modal-body {
    flex: 1 1 auto; min-height: 0;
    max-height: none; overflow-y: auto;
    padding: 14px 16px 20px;
    -webkit-overflow-scrolling: touch;
  }

  /* 底部按钮：直接子元素天然固定；.form-actions 在正文里则粘底 */
  #modal-box > .pt-dialog-foot {
    flex: none; margin: 0; gap: 10px; flex-wrap: nowrap;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--card);
  }
  #modal-box .modal-body > .form-actions {
    position: sticky; bottom: -20px; margin: 14px -16px -20px;
    gap: 10px; flex-wrap: nowrap;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--card);
  }
  #modal-box .pt-dialog-foot .pt-dbtn,
  #modal-box .modal-body > .form-actions .btn {
    flex: 1 1 0; min-width: 0;
    height: 44px; justify-content: center; font-size: 15px;
  }

  /* 表单：单列、标签在上、控件 16px（iOS 不自动放大） */
  #modal-box .pt-form { grid-template-columns: 1fr; gap: 14px; }
  #modal-box .pt-fld { grid-template-columns: 1fr; gap: 6px; }
  #modal-box .pt-fld > label {
    text-align: left; padding-top: 0;
    font-size: 12.5px; color: var(--p-muted);
  }
  #modal-box .pt-fld input,
  #modal-box .pt-fld select,
  #modal-box .pt-fld textarea {
    font-size: 16px; padding: 10px 12px; border-radius: 9px;
  }
  #modal-box .pt-fld .pt-inline { gap: 8px; }
  #modal-box .pt-fld .pt-inline input { min-width: 0; }
  #modal-box .pt-fld .tip { font-size: 11.5px; }
  #modal-box .pt-quick { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
  #modal-box .pt-quickrow { gap: 6px; }
  #modal-box .pt-bool { padding-top: 0; }
  #modal-box .pt-group:not(:first-child) { margin-top: 16px; padding-top: 14px; }
  #modal-box .field-row { grid-template-columns: 1fr; gap: 10px; }
  #modal-box .field { margin-bottom: 14px; }
  #modal-box .field input, #modal-box .field select, #modal-box .field textarea { font-size: 16px; }

  /* 附件：按钮给足高度 */
  #modal-box .pt-attach-add, #modal-box .pt-attach .btn { min-height: 42px; }
  #modal-box .pt-attach-item { max-width: 100%; }
}

/* 修正：pt-dialog 是 #modal-box 里的包裹层，上面的选择器要落在 .pt-dialog 上 */
@media (max-width: 767px) {
  #modal-box > .pt-dialog { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  #modal-box .pt-dialog-head {
    flex: none; align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--line); background: var(--card);
  }
  #modal-box .pt-dialog-head .tt { font-size: 16px; }
  #modal-box .pt-dialog-head .st {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; white-space: normal; font-size: 11.5px; line-height: 1.5; margin-top: 3px;
  }
  #modal-box .pt-dialog-head .badge { width: 30px; height: 30px; }
  #modal-box .pt-dialog-body {
    flex: 1 1 auto; min-height: 0; max-height: none;
    overflow-y: auto; padding: 14px 16px 18px;
    -webkit-overflow-scrolling: touch;
  }
  #modal-box .pt-dialog-foot {
    flex: none; margin: 0; gap: 10px; flex-wrap: nowrap;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--card);
  }
  #modal-box .pt-dialog-foot .pt-dbtn { flex: 1 1 0; height: 44px; font-size: 15px; }
}

/* 手机：日期/时间一行放不下时，让输入框独占一行，今天/日历按钮掉到下一行 */
@media (max-width: 767px) {
  #modal-box .pt-fld .pt-inline { flex-wrap: wrap; }
  #modal-box .pt-fld .pt-inline > input { flex: 1 1 100%; }
  #modal-box .pt-fld .pt-inline > .btn,
  #modal-box .pt-fld .pt-inline > button { flex: 0 0 auto; min-height: 40px; }
  #modal-box .pt-quick { min-width: 62px; }
}

/* 手机：任何弹窗的底部操作区（`.form-actions` 可能是 .modal-body 的兄弟节点） */
@media (max-width: 767px) {
  #modal-box > .form-actions,
  #modal-box .modal-body > .form-actions {
    position: sticky; bottom: 0; z-index: 3;
    display: flex; flex-wrap: nowrap; justify-content: stretch;
    gap: 8px; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--card);
  }
  #modal-box > .form-actions .btn,
  #modal-box .modal-body > .form-actions .btn {
    flex: 1 1 0; min-width: 0; height: 44px;
    padding: 0 8px; font-size: 14px; letter-spacing: 0;
    justify-content: center; white-space: nowrap; overflow: hidden;
  }
  /* 底部操作区在 body 内部时，抵消 body 的左右内边距 */
  #modal-box .modal-body > .form-actions { margin: 14px -16px -20px; }
}

/* 兜底：某些弹窗把 .form-actions 放在 form 里面（不一定是 .modal-body 的直接子元素），
   这里用后代选择器统一底部操作区的排布，避免按钮还是桌面的右对齐小尺寸。 */
@media (max-width: 767px) {
  #modal-box .form-actions {
    display: flex; flex-wrap: nowrap; justify-content: stretch;
    gap: 8px; margin: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--card);
    position: sticky; bottom: 0; z-index: 3;
  }
  #modal-box .form-actions .btn {
    flex: 1 1 0; min-width: 0; height: 44px;
    padding: 0 8px; font-size: 14px; justify-content: center;
    white-space: nowrap; overflow: hidden;
  }
}

/* 手机：列设置每行改成「卡片」，一行放下序号/显示名，第二行放类型与两个勾选 */
@media (max-width: 767px) {
  #modal-box .pay-colhead { display: none; }
  #modal-box .pay-collist { display: grid; gap: 10px; }
  #modal-box .pay-colrow {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "no label label label del"
      "no type  ck1   ck2   del";
    align-items: center; gap: 8px 6px;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--p-field, rgba(255,255,255,.02));
  }
  #modal-box .pcr-no { grid-area: no; display: flex; align-items: center; gap: 2px; font-size: 12px; }
  #modal-box .pcr-mv { width: 20px; height: 24px; }
  #modal-box .pcr-label { grid-area: label; width: 100%; min-width: 0; font-size: 15px; padding: 8px 10px; }
  #modal-box .pcr-t { grid-area: type; font-size: 11.5px; padding: 2px 6px; }
  #modal-box .pay-colrow .pay-cb:nth-of-type(1) { grid-area: ck1; }
  #modal-box .pay-colrow .pay-cb:nth-of-type(2) { grid-area: ck2; }
  #modal-box .pay-colrow .pcr-na { grid-area: ck1 / ck1 / ck1 / ck2; font-size: 11.5px; }
  #modal-box .pcr-del { grid-area: del; align-self: center; }
  #modal-box .pay-cb { font-size: 12px; gap: 4px; }

  #modal-box .pay-coladd { display: flex; flex-wrap: wrap; gap: 8px; }
  #modal-box .pay-coladd input { flex: 1 1 100%; font-size: 15px; }
  #modal-box .pay-coladd select { flex: 0 0 92px; font-size: 14px; }
  #modal-box .pay-coladd .btn { flex: 1 1 0; height: 40px; }
}

/* 列设置：改用 flex 换行（grid-area 在旧样式上会被行高撑变形） */
@media (max-width: 767px) {
  #modal-box .pay-collist { display: flex; flex-direction: column; gap: 10px; max-height: none; overflow: visible; }
  #modal-box .pay-colrow {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    padding: 10px 12px; border-radius: 10px;
  }
  #modal-box .pay-colrow .pcr-no { flex: 0 0 auto; font-size: 12px; }
  #modal-box .pay-colrow .pcr-mv { width: 22px; height: 26px; }
  #modal-box .pay-colrow .pcr-label {
    flex: 1 1 150px; min-width: 0; height: 38px; box-sizing: border-box;
    font-size: 15px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: 8px; background: var(--field, rgba(255,255,255,.03));
  }
  #modal-box .pay-colrow .pcr-t { flex: 0 0 auto; font-size: 11.5px; }
  #modal-box .pay-colrow .pay-cb { flex: 0 0 auto; font-size: 12.5px; }
  #modal-box .pay-colrow .pcr-na { flex: 0 0 auto; grid-column: auto; font-size: 11.5px; }
  #modal-box .pay-colrow .pcr-del { flex: 0 0 auto; margin-left: auto; }
  #modal-box .pay-collist { max-height: none; }
}

/* 列设置：名称输入独占第一行，第二行放类型 + 两个勾选 + 删除 */
@media (max-width: 767px) {
  #modal-box .pay-colrow .pcr-label { flex: 1 1 100%; }
  #modal-box .pay-colrow .pcr-t { margin-right: 2px; }
  #modal-box .pay-colrow .pcr-del { margin-left: auto; }
}

/* 列设置：顶部两段说明在手机上收成两行，别占掉半屏 */
@media (max-width: 767px) {
  #modal-box .pay-colset > .pt-msg {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 8px; font-size: 11.5px; line-height: 1.6;
  }
}

/* 日期/时间行：手机上隐藏冗余的「今天」小按钮（下面的快捷片已有今天），
   输入框与日历/时钟图标保持同一行，不再各占一行 */
@media (max-width: 767px) {
  #modal-box .pt-fld .pt-inline { flex-wrap: nowrap; }
  #modal-box .pt-fld .pt-inline > input { flex: 1 1 auto; min-width: 0; }
  #modal-box .pt-fld .pt-inline > button[data-today] { display: none; }
  #modal-box .pt-fld .pt-inline > button { flex: 0 0 auto; min-height: 40px; }
}

/* 附件按钮铺满一行，拇指好点 */
@media (max-width: 767px) {
  #modal-box .pt-attach-add { width: 100%; justify-content: center; }
}

/* ============================================================================
   PDF 工具工作台 · 手机 / 平板
   桌面那套命令栏一行放 7 组控件，窄屏会被挤到换行、文字被压成两行，这里重排。
   ============================================================================ */
@media (max-width: 1023px) {
  .pdf-commandbar { flex-wrap: wrap; row-gap: 6px; padding: 6px 8px; }
  .pcb-l { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .pcb-open { flex: none; height: 32px; padding: 0 12px; font-size: 12.5px; white-space: nowrap; }
  .pcb-file { font-size: 12px; max-width: 120px; }
  .pcb-c { flex: 0 0 auto; }
  .pcb-r { flex: 1 1 100%; justify-content: center; gap: 6px; }
  .pcb-views, .pcb-modes { height: 28px; }
  .pcb-views button, .pcb-modes button { padding: 0 9px; font-size: 11.5px; }
  .pcb-pager, .pcb-zoom { height: 30px; }
  .pcb-pager button, .pcb-zoom button { width: 28px; height: 28px; }
  .pcb-apply { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .pcb-focus { display: none; }          /* 手机上专注意义不大，省位置 */
  .pdf-cardbar { padding: 5px 7px; gap: 8px; }
  .pcb-back, .pcb-toribbon { height: 26px; padding: 0 9px; font-size: 11.5px; }
  .pdf-cardbar-name { font-size: 12px; }
}

@media (max-width: 767px) {
  /* 个人待办页：桌面为了「模块吃满剩余高度」把它设成了 flex + overflow:hidden，
     手机上会同时踩两个坑：① 底部 5 个 tab 压住最后一段；② 内容超出 189px 且**无处可滚**
     （内部没有任何 overflow:auto 的容器）。这里恢复纵向滚动并补回底部留白。 */
  #page-personal.active {
    overflow-y: auto;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  #page-personal .pt-module { flex: 0 0 auto; min-height: 0; }   /* 别再用 flex 吃掉高度，交给页面滚 */
  /* 资金滚动计划 / 合同暂估计划：桌面为了让表格吃满高度把 padding-bottom 压成 0，
     手机上底部合计会顶到 5 个 tab 底下（实测被遮 20~30px），这里补回来。 */
  #page-fundplan.active,
  #page-estplan.active { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* 公文排版页：它自己把 padding-bottom 压到 18px，会顶到底部导航条底下 */
  #page-gongwen.active { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .gw-shell h2 { font-size: 21px; }
  .gw-shell p { font-size: 12.5px; }
  .gw-open { height: 36px; padding: 0 18px; font-size: 13px; }
  .gw-points { gap: 6px; margin-top: 16px; }
  .gw-points li { font-size: 11px; padding: 4px 10px; }
  .gw-frame-wrap { margin-top: 10px; }

  /* 卡片首页：收紧留白，磁贴高度压下来，少滚两屏 */
  .pdf-tools-page { border-radius: 12px; }
  .pdf-cardhome { padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }
  .pdf-cardhome .wb-pdf-hero { padding: 2px 0 12px; }
  .pdf-cardhome .wb-pdf-kicker { font-size: 9.5px; letter-spacing: .12em; }
  .pdf-cardhome .wb-pdf-hero h2 { font-size: 18px; line-height: 1.3; margin: 4px 0; }
  .pdf-cardhome .wb-pdf-hero p { font-size: 12px; line-height: 1.55; }
  .pdf-cardhome .wb-pdf-cta { margin-top: 12px; gap: 8px; }
  .pdf-cardhome .wb-cta-open { height: 34px; padding: 0 16px; font-size: 12.5px; }
  .pdf-cardhome .wb-cta-tip { font-size: 11px; }
  /* 手机上 5 个分类用两列紧凑卡（只留编号 + 标题 + 入口数），一屏能看全 */
  .pdf-cardhome .wb-pdf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pdf-cardhome .wb-pdf-tile { padding: 13px 13px 12px; border-radius: 14px; }
  .pdf-cardhome .t-desc, .pdf-cardhome .t-tools { display: none; }
  .pdf-cardhome .t-title { margin-bottom: 0; }
  .pdf-cardhome .wb-pdf-tiles .wb-pdf-tile:nth-child(5) { grid-column: span 2; }
  .pdf-cardhome .t-top { margin-bottom: 10px; }
  .pdf-cardhome .t-title { font-size: 15.5px; }
  .pdf-cardhome .t-desc { font-size: 11.5px; min-height: 0; }
  .pdf-cardhome .t-tools { margin-top: 10px; }
  .pdf-cardhome .t-go { margin-top: 10px; }
  .pdf-cardhome .wb-pdf-cat-hero { gap: 10px; padding: 2px 0 12px; margin-bottom: 12px; }
  .pdf-cardhome .h-idx { display: none; }          /* 小屏省宽度，CATEGORY 04 已经写了 */
  .pdf-cardhome .h-back { height: 30px; font-size: 12.5px; }
  .pdf-cardhome .h-main h2 { font-size: 18px; }
  .pdf-cardhome .h-main p { font-size: 11.5px; }
  .pdf-cardhome .wb-pdf-entry { padding: 13px 13px 11px; min-height: 0; border-radius: 14px; }
  .pdf-cardhome .we-icon { width: 34px; height: 34px; font-size: 18px; margin-bottom: 8px; border-radius: 10px; }
  .pdf-cardhome .we-name { font-size: 14px; }
  .pdf-cardhome .we-desc { font-size: 11px; }
  .pdf-cardhome .we-modes { gap: 5px; padding-top: 8px; }
  .pcb-file { max-width: 88px; }
  .pcb-page { min-width: 62px; font-size: 12px; }
  /* 工具面板在手机上本来就窄，让预览占满、控制栏不被截 */
  .pdf-tools-page.pdf-cardview .pdf-tools-frame,
  .pdf-tools-page .pdf-tools-frame { border-radius: 12px; }
}

@media (max-width: 380px) {
  .pcb-open { padding: 0 10px; font-size: 12px; }
  .pcb-file { max-width: 64px; }
  .pdf-cardhome .wb-pdf-hero h2 { font-size: 17px; }
}

/* ==========================================================================
   2026-10-25 手机 / 平板适配修补（体检测出来才动的，逐条写清原因）
   ========================================================================== */

/* ① 提示条在手机/平板上"消失"了
      style.css 的 `@media (max-width:1080px){ .top-actions .toast-wrap{display:none} }`
      本意是别把顶栏挤爆，结果把「保存成功 / 已导入 / 删除可撤销」这些反馈也一起藏了
      —— 实测容器 display:none，手机上点什么都像没反应。
      这里只把 display 恢复回来，定位沿用文件上面手机段已有的「贴在底部 tab 栏上方」
      （列表滚动、按钮操作都不会被挡住）；768~1080 没有底部 tab，就贴底 24px。 */
@media (max-width: 1080px) {
  .top-actions .toast-wrap {
    display: flex; position: fixed; z-index: 9990;
    left: 12px; right: 12px; top: auto;
    max-width: none; flex-direction: column; align-items: stretch; gap: 6px;
    pointer-events: none;
  }
}
@media (min-width: 768px) and (max-width: 1080px) {
  .top-actions .toast-wrap { bottom: 24px; }
}

/* ② 平板上打开抽屉时页面还能跟着滚（原来只有 ≤767 锁了 body）
      拖抽屉时背后的内容会一起动，松手还会"跳位"。 */
@media (min-width: 768px) and (max-width: 1023px) {
  body.drawer-open { overflow: hidden; }
}

/* ③ 手机上的支付搜索行只有 32px 高（输入框 25px），拇指不好点中
      —— 只加高度，字号保持 16px（低于 16px 时 iOS 会自动放大整页）。 */
@media (max-width: 767px) {
  .pay-search { height: 38px; }
}

/* ④ 付款流程那四个圆形勾选点只有 24×24（平板、触屏笔记本上很难点准）
      用伪元素把热区撑到 42×42，视觉大小和表格行高都不变。 */
@media (hover: none) {
  .pay-flowck { position: relative; }
  .pay-flowck::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
}

/* ==========================================================================
   2026-10-25 第二轮优化（体检里"不算 bug、但用起来别扭"的几处）
   ========================================================================== */

/* ⑤ 手机支付页：卡片模式下「列设置」毫无意义（没有表格列），却单独占了一整行
      —— 实测 29×36 落在 y=384 的独立行，白白吃掉 44px 首屏高度。 */
@media (max-width: 767px) {
  .pay-colset-btn { display: none; }
  /* 工具条 6 个按钮 55×36 偏矮（Material 触控建议 40+），一行仍放得下 */
  .ccx-tools .btn { height: 40px; }
  /* 筛选 / 排序 / 翻页这些小按钮同样抬到 38，拇指更好点中 */
  .ds-btn, .pm-dir, [data-pg] { min-height: 38px; }
}

/* ⑥ 平板图标栏：只有图标、没有文字，新同事只能一个个点开猜（`.nav-label` 在 74px 栏里被 display:none）
      这里补 9.5px 小字标签，栏宽放到 78px。
      ⚠️ 只在竖向空间够的时候加（iPad 竖 1024、Air 1180）；
         手机横屏 844×390 那种矮窗口保持纯图标，否则 6 个带字的分组会顶出屏幕。 */
@media (min-width: 768px) and (max-width: 1023px) and (min-height: 700px) {
  body:not(.drawer-open) .sidebar { width: 78px; }
  body:not(.drawer-open) .nav-item,
  body:not(.drawer-open) .nav-fold-head {
    flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 9px 2px;
  }
  body:not(.drawer-open) .nav-item .nav-ic { margin: 0; }
  body:not(.drawer-open) .nav-label {
    display: block !important;
    font-size: 9.5px; line-height: 1.1; letter-spacing: .2px;
    max-width: 70px; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}

/* ⑦ 日历控制栏：桌面上是「左 回待办 ｜ 中 年月分段控件 ｜ 右 回到今天」三列。
      手机上这一条塞不下，「‹‹ 2026年 ›› ｜ ‹ 10月 ›」会从中间断行 —— 出现「› 单独掉到第二行」
      的怪样子（早先用 flex 断行还把分隔线撑成一根 283px 的灰条）。
      改成两行：第一行整条年月控件（单行完整），第二行左「回待办」右「回到今天」。 */
@media (max-width: 767px) {
  .wnl-bar {
    grid-template-columns: 1fr auto;
    grid-template-areas: "nav nav" "l r";
    row-gap: 10px; gap: 10px 14px;
  }
  .wnl-bar > .wnl-nav { grid-area: nav; justify-self: center; }
  .wnl-bar-l { grid-area: l; }
  .wnl-bar-r { grid-area: r; }
  .wnl-nav { gap: 4px; }
  .wnl-nav .wnl-sel { width: 76px; min-width: 0; padding: 0 4px; }
  .wnl-nav .tu-btn.icon { min-width: 24px; padding: 0 4px; }
  .wnl-top { gap: 8px; }
}

/* ⑧ 列表「显示更多」按钮在手机上偏矮（padding 9px ≈ 35px），抬到 44px 的触控高度 */
@media (max-width: 767px) {
  .list-more { padding: 12px; font-size: 13px; }
  .bd-more .btn { min-height: 40px; }
}

/* ⑨ 驾驶舱手机端"太挤"：3 行 KPI + 挤在一行的标题/tab —— 见用户 2026-10-25 截图 */
@media (max-width: 767px) {
  /* 6 张 KPI 卡 = 3 行 ≈ 293px（整屏 35%），首屏连一条待办都露不出来。
     后两张（系统 / 个人）的数字在下面 tab 里本来就有 → 手机上只留 4 张。 */
  .kpi-extra { display: none; }
  .kpi { padding: 11px 12px; }
  .kpi-value { font-size: 20px; }
  .kpi-grid { margin-bottom: 12px; }

  /* 「待办与提醒」表头：标题 + 3 个 tab 挤一行时，tab 会被 .panel 的 overflow:hidden 从右边裁掉
     （用户截图里「个人 5」只剩一半）。手机上改成上下两行，tab 撑满整行、每个 36px 高。 */
  #page-cockpit .panel-todo .panel-head {
    flex-direction: column; align-items: stretch; gap: 9px; padding: 12px 14px 11px;
  }
  #page-cockpit .panel-todo .panel-head .tabs {
    width: 100%; max-width: none; overflow: visible;
  }
  #page-cockpit .panel-todo .panel-head .tabs button {
    flex: 1 1 0; padding: 8px 0; text-align: center;
  }
}

/* 公文排版落地卡片：手机上贴左上、别居中留白（屏幕本来就窄） */
@media (max-width: 767px) {
  .gw-shell { margin: 10px 0 0; padding: 18px 16px 20px; }
}

/* =========================================================================
   触屏设备：把「高频点击的小控件」抬到 36px 以上
   -------------------------------------------------------------------------
   实测（390×844）各页 <36px 的可点元素：看板 24 个（bd-qbtn 5 / bd-mchip 12 /
   bd-chip 4 / bd-fsum-btn / bd-reset / bd-sheet-done）、暂估页 15 个（es-pg 4 /
   es-mchip 3 / as-sw 8）、个人待办 49 个。手指点 28px 高的小按钮很容易点错。
   只放大**筛选条 / 分页条**里的控件 —— 表格行内的（如 as-sw 开关）不动，
   否则每行都被撑高，一屏能看到的记录更少，反而更难用。
   桌面不受影响（这些规则挂在 body.is-touch 上）。
   ========================================================================= */
body.is-touch .es-pg,
body.is-touch .es-pgsize,
body.is-touch .bd-qbtn,
body.is-touch .bd-fsum-btn,
body.is-touch .bd-reset,
body.is-touch .bd-sheet-done,
body.is-touch .pay-pg button,
body.is-touch .fp-pg button {
  min-width: 36px;
  min-height: 36px;
  padding-left: 8px;
  padding-right: 8px;
}

/* 月份 / 快捷筛选芯片：加高一点，左右留白也加一点，避免两个芯片挨太近点错 */
body.is-touch .es-mchip,
body.is-touch .bd-mchip,
body.is-touch .bd-chip {
  min-height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* 触摸设备上，可点区域之间拉开一点，减少误触（只作用于这几类芯片/按钮的相邻间距） */
body.is-touch .es-months { gap: 8px; }
body.is-touch .bd-mchips,
body.is-touch .bd-chips { gap: 8px; }

/* 表格行内的开关（as-sw：是否已暂估 / 是否已评估）**不加高** ——
   加高会把整行撑起来，一屏能看到的记录更少，反而更难用（暂估页这个开关现在只有 24px）。
   改为把**垂直点击热区**上下各扩 7px：视觉完全不变，手指命中率高很多，
   而且不往左右扩，不会抢相邻控件的点击。 */
body.is-touch .as-sw { position: relative; }
body.is-touch .as-sw::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -7px; bottom: -7px;
}

/* 个人待办的视图 chip（首页 / 清单 / 生活记录 / 知识记录）：手机上最高频的切换，抬到 36px */
body.is-touch .pt-hc,
body.is-touch .pt-pill {
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* =========================================================================
   手机端 · 合同暂估计划：卡片代替表格
   -------------------------------------------------------------------------
   18 列的暂估模板在 390px 宽的手机上只能露出 5 列（序号/项目/机组/老合同编号/
   是否已暂估），金额和控制点描述全被截断。手机上换成卡片，一条一屏能看四条，
   每条都能完整读到「哪份合同、哪个控制点、多少钱、什么时候暂估的」。
   ========================================================================= */
.es-mlist { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 8px; }

/* 项目分组标题：暂估常跨多个项目，混在一起很难扫 */
.es-mg {
  padding: 10px 2px 1px;
  font-size: 11px; font-weight: 600; letter-spacing: .4px;
  color: var(--text3);
}
.es-mg:first-child { padding-top: 2px; }

.es-mc {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 12px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--card);
  transition: border-color .15s ease, background .15s ease;
}
.es-mc.chk {
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
  background: color-mix(in srgb, var(--blue) 7%, var(--card));
}

.es-mc-chk { flex: none; padding-top: 1px; }
.es-mc-chk input { width: 18px; height: 18px; accent-color: var(--blue); }

.es-mc-body { flex: 1; min-width: 0; }

.es-mc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.es-mc-no {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 11.5px; letter-spacing: -.2px; color: var(--text3);
}

/* 控制点描述 = 这条暂估的主角，允许两行 */
.es-mc-ctr {
  margin-top: 6px;
  font-size: 14px; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.es-mc-m { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px; }
.es-mc-amt { font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.es-mc-amt i { margin: 0 2px; font-style: normal; font-size: 11px; font-weight: 500; color: var(--text3); }
.es-mc-date { flex: none; font-size: 11.5px; color: var(--text3); font-variant-numeric: tabular-nums; }

.es-mc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.es-mc-tag {
  padding: 4px 7px; border-radius: 6px;
  border: 1px solid var(--line-soft); background: var(--card2);
  font-size: 10.5px; line-height: 1; color: var(--text3);
  font-variant-numeric: tabular-nums;
}
/* 系统控制点编号：能查到就给蓝色（和表里那一列呼应），查不到给橙色「待补」 */
.es-mc-tag.ctl {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 30%, transparent);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
}
.es-mc-tag.ctl.empty {
  color: var(--orange);
  border-color: color-mix(in srgb, var(--orange) 30%, transparent);
  background: color-mix(in srgb, var(--orange) 10%, transparent);
}

/* =========================================================================
   手机端 · 付款计划卡片：层次修正
   -------------------------------------------------------------------------
   原来的问题：合同总额是「2,098,000.00」（元 + 两位小数），下面的节点是
   「209,800.00」，两者视觉重量几乎一样，要数位数才知道谁大；合同头和节点之间
   也没有分界线，两块白底粘在一起分不清层级。
   ========================================================================= */
.pm-card-amt,
.pm-amt {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}
/* 「万」只是单位，别跟着数字一起放大 */
.pm-card-amt i,
.pm-amt i {
  margin-left: 2px;
  font-style: normal; font-size: 11px; font-weight: 500;
  letter-spacing: 0; color: var(--text3);
}
.pm-card-amt { font-size: 19px; }

/* 合同头与节点之间拉一条分界线，层级立刻清楚 */
.pm-card-h { border-bottom: 1px solid var(--line-soft); }

/* 「已付 0/6」比「已付 0%」信息量大：一眼知道还差几笔 */
.pm-card-paid { white-space: nowrap; }

/* =========================================================================
   手机端 · 资金滚动计划 / 供应商评估：16 列表格 → 每行一张卡
   -------------------------------------------------------------------------
   这两页实测表宽 2321 / 2360px，手机 390px 只能露出 1~2 列（用户："一团糟"）。
   用纯 CSS 把每行变成一张卡：隐藏表头、单元格变「标签 值」、按 data-i
   （列索引，稳定，不随拖列顺序变）挑出要显示的列并安排视觉权重。
   **不动 JS 取值逻辑** —— 这两页的列值是渲染时按索引算出来的，重写风险太大。
   ========================================================================= */
@media (max-width: 767px) {
  /* ① 容器：去掉横向滚动与固定宽高 */
  .fp-tablewrap, .as-tablewrap {
    overflow: visible !important;
    max-height: none !important;
    border: 0 !important;
    background: none !important;
    padding: 0 !important;
  }
  .fp-table, .as-table {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
  }
  .fp-table colgroup, .as-table colgroup,
  .fp-table thead, .as-table thead { display: none !important; }
  .fp-table tbody, .as-table tbody { display: block !important; }

  /* ② 每行 = 一张卡（flex 换行，好控制「同一行两端对齐」） */
  .fp-table tbody tr, .as-table tbody tr {
    display: flex !important;
    flex-wrap: wrap;
    /* ⚠️ 必须 flex-start：用 baseline 时，多行（flex-wrap）的后续行会被拉到
       第一行的基线上去，表现就是「控制点」和下面那行文字叠在一起（用户截图那个重叠 bug） */
    align-items: flex-start;
    gap: 3px 10px;
    margin: 0 0 8px !important;
    padding: 11px 12px 10px !important;
    border: 1px solid var(--line-soft) !important;
    border-radius: 12px;
    background: var(--card);
  }
  .fp-table tbody tr.chk, .as-table tbody tr.chk {
    border-color: color-mix(in srgb, var(--blue) 55%, transparent) !important;
    background: color-mix(in srgb, var(--blue) 7%, var(--card));
  }

  /* ③ 单元格统一清干净：干掉冻结列的 sticky、固定宽高、内联宽度 */
  .fp-table tbody td, .as-table tbody td {
    display: none;                       /* 默认全藏，下面逐列挑出来 */
    align-items: baseline;
    gap: 6px;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    position: static !important;
    left: auto !important;
    font-size: 12.5px !important;
    line-height: 1.5;
    white-space: normal !important;
    text-align: left !important;
    color: var(--text2);
  }

  /* ④ 勾选框：放左侧垂直居中（iOS 列表式）——
     原来贴右上角，合同名两行时会孤零零悬在中间，还挤掉标题的宽度。
     扔到左边后标题能占满一行，勾选语义也更明显。卡片整体左移 42px 让位。 */
  .fp-table tbody tr, .as-table tbody tr {
    position: relative;
    padding-left: 42px !important;
  }
  .fp-table tbody td.fp-chkw, .as-table tbody td.pay-chkw {
    display: flex !important;
    align-items: center;
    position: absolute !important;
    left: 14px !important;
    top: 13px !important;             /* 和标题第一行同基线，别落到金额行上去 */
    transform: none;
    margin: 0 !important;
    padding: 0 !important;
    width: 20px !important;
    order: 0;
  }
  .fp-table tbody td.fp-chkw input, .as-table tbody td.pay-chkw input {
    width: 18px !important; height: 18px !important; margin: 0 !important;
  }
  .fp-table tbody td.fp-chkw::before, .as-table tbody td.pay-chkw::before { content: none !important; }
  /* 标题本来为右上角勾选框留了 26px，现在勾选框在左边，这个右内边距可以撤掉 */
  .fp-table tbody td[data-i="4"], .as-table tbody td[data-i="6"] { padding-right: 0 !important; }

  /* ===== 资金滚动计划：合同名当标题，控制点当副标题，金额大字 ===== */
  .fp-table tbody td[data-i="4"] {
    display: -webkit-box !important; order: 1; flex: 0 0 100%;
    font-size: 14px !important; font-weight: 650; color: var(--text);
    line-height: 1.35;
    /* 合同名普遍很长，给两行、超了才省略 —— 只给一行会丢掉关键的后半段 */
    white-space: normal !important;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .fp-table tbody td[data-i="7"] {
    display: block !important; order: 2; flex: 0 0 100%;
    font-size: 12px !important; color: var(--text3);
    line-height: 1.4;
    white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis;
  }
  .fp-table tbody td[data-i="10"] {
    display: block !important; order: 3; margin-top: 5px;
    flex: 0 0 auto;
    font-size: 19px !important; font-weight: 700; color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .fp-table tbody td[data-i="14"] {
    display: block !important; order: 4;
    flex: 0 0 auto; margin-left: auto; text-align: right; align-self: flex-end;
    font-size: 11.5px !important; color: var(--text3);
    font-variant-numeric: tabular-nums;
  }
  /* 对手方：独占一行、淡色文本（公司名长短不一，做成胶囊会出现
     「有的挤在金额行、有的掉到下一行」的不稳定观感） */
  .fp-table tbody td[data-i="8"] {
    display: flex !important; order: 5; flex: 0 0 100%; gap: 6px;
    margin-top: 4px;
    font-size: 11.5px !important; color: var(--text3);
    overflow: hidden; white-space: nowrap !important; text-overflow: ellipsis;
  }
  .fp-table tbody td[data-i="8"]::before { content: '对手方'; flex: none; opacity: .75; }
  /* 中小 / 农民工：源数据大面积是 NA，显示出来只有噪音，手机端不展示
     （要看这两项去桌面表格或导出，优先级本来就低于合同 / 控制点 / 金额） */
  .fp-table tbody td[data-i="15"],
  .fp-table tbody td[data-i="16"] { display: none !important; }
  .fp-table tbody td[data-i="5"] {
    display: block !important; order: 7; flex: 0 0 100%; margin-top: 3px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10.5px !important; color: var(--text3); opacity: .75;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* ===== 供应商评估：供应商当标题（看评估最先关心哪家），合同名当副标题 ===== */
  .as-table tbody td[data-i="6"] {
    display: block !important; order: 1; flex: 0 0 100%;
    padding-right: 26px !important;
    font-size: 14.5px !important; font-weight: 650; color: var(--text);
    line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .as-table tbody td[data-i="2"] {
    display: block !important; order: 2; flex: 0 0 100%;
    font-size: 12px !important; font-weight: 400; color: var(--text3);
    line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .as-table tbody td[data-i="7"] {
    display: block !important; order: 3; margin-top: 5px;
    flex: 0 0 auto;
    font-size: 19px !important; font-weight: 700; color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .as-table tbody td[data-i="8"] {
    display: block !important; order: 4;
    flex: 0 0 auto; margin-left: auto; text-align: right; align-self: flex-end;
    font-size: 11.5px !important; color: var(--text3);
    font-variant-numeric: tabular-nums;
  }
  /* 控制点 / 板块 → 胶囊（不再用「标签: 值」，那样一排排对齐像表单） */
  /* 控制点：独占一行、淡色文本（不用胶囊 —— 内容宽度不一致时胶囊会出现
     「有时挤在金额行、有时掉到下一行」的不稳定观感，看着反而乱） */
  .as-table tbody td[data-i="5"] {
    display: flex !important; order: 5; flex: 0 0 100%; gap: 6px;
    margin-top: 4px;
    font-size: 11.5px !important; color: var(--text3);
    overflow: hidden; white-space: nowrap !important; text-overflow: ellipsis;
  }
  .as-table tbody td[data-i="5"]::before { content: '控制点'; flex: none; opacity: .75; }
  /* 板块：胶囊（短、稳定） */
  .as-table tbody td[data-i="9"] {
    display: block !important; order: 6;
    padding: 3px 8px !important; border-radius: 7px;
    background: var(--card2); border: 1px solid var(--line-soft) !important;
    font-size: 11px !important; color: var(--text2);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important;
  }

  /* 板块没值时（渲染成「—」)整列藏掉，别留一个只有横杠的胶囊 */
  .as-table tbody td[data-i="9"]:has(.pay-dash) { display: none !important; }
  /* 上游支持 / 风险 = 行内开关，缩小成小胶囊 */
  .as-table tbody td[data-i="13"],
  .as-table tbody td[data-i="14"] {
    display: flex !important; align-items: center; gap: 4px; order: 7;
  }
  .as-table tbody td[data-i="13"]::before { content: '上游'; font-size: 10.5px; color: var(--text3); }
  .as-table tbody td[data-i="14"]::before { content: '风险'; font-size: 10.5px; color: var(--text3); }
  .as-table tbody td[data-i="13"] .as-sw,
  .as-table tbody td[data-i="14"] .as-sw {
    height: 24px !important; padding: 0 9px !important; font-size: 11px !important;
  }
  /* 风险 = 是：必须红，绿色在这里会被误读成「没问题」 */
  .as-table tbody td[data-i="14"] .as-sw.on {
    background: color-mix(in srgb, var(--red) 15%, transparent) !important;
    border-color: color-mix(in srgb, var(--red) 55%, transparent) !important;
    color: var(--red) !important;
  }
  .as-table tbody td[data-i="14"] .as-sw.on i { background: var(--red) !important; }
  .as-table tbody td[data-i="3"] {
    display: block !important; order: 8; flex: 0 0 100%; margin-top: 3px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10.5px !important; color: var(--text3); opacity: .75;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

}

/* -------------------------------------------------------------------------
   表头隐藏后，列自己带的单位（万元 / 元）会丢 —— 必须补回来，
   否则「4686.90」看不出是万元还是元，比不显示单位更误导。
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .fp-table tbody td[data-i="10"]::after {
    content: ' 万';
    font-size: 12px; font-weight: 500; color: var(--text3); margin-left: 2px;
  }
  .as-table tbody td[data-i="7"]::after {
    content: ' 元';
    font-size: 12px; font-weight: 500; color: var(--text3); margin-left: 2px;
  }
  /* 中小 / 农民工两列本来也是万元 */
  .fp-table tbody td[data-i="15"]::after,
  .fp-table tbody td[data-i="16"]::after { content: '万'; font-size: 10.5px; color: var(--text3); }
}

/* =========================================================================
   层次感 · 卡片左侧状态色条
   -------------------------------------------------------------------------
   原来一组卡片长得一模一样，扫不出「哪条已经处理、哪条还欠着」。
   在卡片左边加一条 3px 色条：已暂估 / 已付款 = 绿，超期 = 红，其余透明。
   用 :has() 判断卡片内部状态，老浏览器不支持时只是没有色条，不影响任何功能。
   ========================================================================= */
.es-mc { border-left: 3px solid transparent; }
.es-mc:has(.as-sw.on) { border-left-color: var(--green); }

.pm-item { border-left: 3px solid transparent; }
.pm-item:has(.pay-badge.b-done),
.pm-item:has(.b-已付款) { border-left-color: var(--green); }
.pm-item:has(.money-due) { border-left-color: var(--red); }

/* 分组标题强化：加一条短竖线 + 条数胶囊，组与组之间留足呼吸空间 */
.es-mg {
  margin-top: 14px;
  padding: 0 2px 0 10px;
  position: relative;
  font-size: 12px; letter-spacing: .3px;
  color: var(--text2);
}
.es-mg::before {
  content: '';
  position: absolute; left: 0; top: 1px; bottom: 1px;
  width: 3px; border-radius: 2px;
  background: color-mix(in srgb, var(--blue) 65%, transparent);
}
.es-mg:first-child { margin-top: 2px; }
