/* ═══════════════════════════════════════
   responsive.css — 全界面适配 (手机 / 平板 / 电脑)
   断点: Tablet ≤1024px | Mobile ≤768px | Small ≤480px
   ★ v9.142: 本文件曾被改名为 .bak 而未被引用 → 整套适配失效。
     现在重新引入, 并补上看板/订单流/上架卡片的手机端排版。
   ═══════════════════════════════════════ */

/* ═══════════════════
   —— 平板 (≤1024px) ——
   ═══════════════════ */
@media (max-width: 1024px) {
  /* 侧边栏: 收起为抽屉 */
  .app-sidebar { left: calc(-1 * var(--sidebar-width)); transition: left var(--transition-slow); }
  .app-sidebar.open { left: 0; box-shadow: var(--shadow-xl); }
  .sidebar-overlay.open { display: block; }
  .sidebar-toggle { display: block; }
  .app-header { padding-left: var(--space-4); }
  .app-main { margin-left: 0 !important; padding: var(--space-4); }

  /* 网格: 四列 → 两列 */
  .card-grid-3, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  #wmPositionGrid { grid-template-columns: repeat(3, 1fr) !important; }

  /* 看板: 店铺卡片 2 列 */
  #storeCards { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════════
   —— 手机 (≤768px) ——
   ═══════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-width: 240px; --header-height: 48px; }

  /* 顶部: 隐藏状态涨紧 */
  .app-header { padding-left: var(--space-3); gap: var(--space-2); }
  .header-title { font-size: var(--text-sm); }
  .header-user { display: none; }

  .app-main { margin-left: 0 !important; padding: var(--space-3); }
  .section { padding: var(--space-4); border-radius: var(--radius); }
  .page-content { max-width: 100%; }

  /* 网格: 全部单列 */
  .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  #storeCards { grid-template-columns: 1fr !important; }
  #wmPositionGrid { grid-template-columns: repeat(3, 1fr) !important; max-width: 100% !important; }
  #t10_collected_grid, #t4_product_grid, #actions_grid,
  #pc_summary_cards, #pc_calc_grid, #guoo_result_grid, #rk_grid, #pl_stats {
    grid-template-columns: 1fr !important;
  }

  /* ── 看板 (TAB5) ── */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; margin-bottom: 14px !important; }
  #page-tab5 .stat-card { padding: 12px !important; }
  #page-tab5 [style*="grid-template-columns:2fr"],
  #page-tab5 [style*="grid-template-columns:repeat(3"],
  #page-tab5 [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }
  #salesChart { height: 170px !important; }
  #page-tab5 .rank-item { padding: 6px 8px !important; }
  #dash_order_flow_shop { max-width: 150px !important; }

  /* ── 订单流表格 → 手机卡片式 ── */
  #dash_order_flow_table thead { display: none; }
  #dash_order_flow_table, #dash_order_flow_table tbody,
  #dash_order_flow_table tr, #dash_order_flow_table td { display: block; width: 100%; }
  #dash_order_flow_table tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #fff;
  }
  #dash_order_flow_table td {
    padding: 3px 0 !important;
    text-align: left !important;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border: none;
    font-size: 12.5px !important;
    word-break: break-all;
  }
  #dash_order_flow_table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11.5px;
  }

  /* ── 其他表格: 横向滚动 ── */
  .data-table, table[style*="width"]:not(#dash_order_flow_table) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .data-table th, .data-table td { padding: 8px 10px; font-size: var(--text-xs); }

  /* ── 表单 / 弹窗 ── */
  input[type="text"], input[type="number"], input[type="password"],
  input[type="email"], textarea, select {
    width: 100% !important; max-width: 100% !important; box-sizing: border-box;
  }
  .modal-panel, .modal-sm, .modal-md, .modal-lg, .modal-xl {
    max-width: 95vw !important; width: 95vw !important; max-height: 90vh;
  }
  button, .btn { font-size: var(--text-sm); }
  #t10_collected_area { overflow: visible; }
  #t10_header { flex-wrap: wrap; gap: var(--space-2); }
  .t10-toolbar { padding: 10px; gap: 6px; }
  .t10-toolgroup { width: 100%; flex-wrap: wrap; }
}

/* ═══════════════════
   —— 小屏手机 (≤480px) ——
   ═══════════════════ */
@media (max-width: 480px) {
  :root { --header-height: 46px; }
  .app-main { padding: var(--space-2); }
  .header-brand .header-title { display: none; }
  .header-status { display: none; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .section { padding: var(--space-3); }
}


/* ═══════════════════════════════════════════════════════════════════
   ★ v9.143 移动端适配修复（playwright 实测 390x844 / 820x1180 得出）
     实测问题 → 修复:
     · 点击目标 21~27px(顶部状态/批量工具栏) → 触摸设备统一 ≥44px
     · 输入框字号 12~14px, iOS 聚焦会放大整页 → 手机档抬到 16px
     · 100vh 含手机地址栏, 底部被切 → 改用 dvh
     · 无 safe-area, iPhone 刘海/小黑条压住按钮 → 补 env(safe-area-inset-*)
     · .data-table 缩到 306px 列全挤一起 → 给最小列宽让它横滚
     · input 固有宽度(默认 size≈20 字符)随字号变大 → 撑破 .form-grid
       (网格轨道 minmax(auto,1fr) 的下限是子项 min-content) → 轨道改 minmax(0,1fr)
     注意: 本块必须留在文件末尾, 不要插进上面的注释里(插入注释内会导致规则外泄到桌面端)。
   ═══════════════════════════════════════════════════════════════════ */

/* ── 触摸设备(手机/平板): 保证可点区域 ── */
@media (pointer: coarse) {
  .btn, .btn-sm,
  button:not(.sidebar-collapse-btn):not(.sidebar-toggle) {
    min-height: 44px;
  }
  .sidebar-item {
    min-height: 48px;
  }
  /* ★ 复选框只给最小高度(竖着好点), 不动宽度 ——
     实测给 min-width 会把上架管理工具栏撑宽 102px, 造成整页横向滚动;
     这类控件也不会触发 iOS 聚焦缩放, 无需改字号。 */
  input[type="checkbox"], input[type="radio"] {
    min-height: 18px;
    cursor: pointer;
  }
  /* 触摸屏上 :hover 会粘住, 关掉过渡避免"点完还亮着" */
  .btn:hover, .sidebar-item:hover { transition: none; }
}

/* ── 手机/平板共用: 防 iOS 聚焦放大 + 安全区 ── */
@media (max-width: 1024px) {
  /* ★ iOS Safari: 输入框字号 <16px 时聚焦会放大整页; 16px 也是触摸下的舒适字号。
     用 !important 是因为很多输入框把 font-size 写在内联 style 里(优先级最高)。 */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea,
  select {
    font-size: 16px !important;
  }
  /* ★★ 关键: input 有原生固有宽度, 字号变大后固有宽度也变大;
     grid 默认轨道 minmax(auto,1fr) 的下限 = 子项 min-content,
     不放 0 的话 .form-grid 会被两个并排数字输入框顶到 440px(容器只有 282px),
     整页横向滚动。`width:100%` 压不住这个下限, 必须 min-width:0。 */
  /* ★ 只改"下限", 不改列数 —— 平板端该是两列就还是两列,
     把列数一起覆盖会把 820px 上的两列网格压成单列(布局回归)。 */
  .form-grid > *, .form-grid-2 > *, .form-grid-3 > *,
  .form-group {
    min-width: 0;
  }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea,
  select {
    min-width: 0;
  }
  /* 安全区: iPhone 刘海 / 底部小黑条不再压住内容 */
  .app-header {
    padding-left: max(var(--space-4), env(safe-area-inset-left));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
  }
  .app-main {
    padding-left: max(var(--space-4), env(safe-area-inset-left));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  }
  .app-sidebar {
    padding-left: env(safe-area-inset-left);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sidebar-footer {
    padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  }
  .modal-panel, .modal-sm, .modal-md, .modal-lg, .modal-xl {
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  }
}

/* ── 手机 (≤768px) ── */
@media (max-width: 768px) {
  /* ★ 手机浏览器地址栏会吃掉约 100px 的 100vh; dvh 按可见区算, 底部不再被切 */
  .app-main {
    min-height: calc(100dvh - var(--header-height));
  }
  /* ★ iOS 横屏会按视口"膨胀"正文, 与竖屏字号不一致 */
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  /* ★ 手机上不该出现灰色点按高亮块 / 双击放大 */
  a, button, .btn, .sidebar-item, .stat-card, .card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .app-header {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .header-actions { gap: var(--space-2); }
  .header-actions .btn { min-height: 36px; padding: 6px 10px; }
  .header-status { padding: 5px 10px; font-size: 11px; }

  /* ── 表格: 给最小列宽 + 交给父容器横滚, 列不再挤成一团 ── */
  .data-table { min-width: 640px; }
  .data-table th, .data-table td { white-space: nowrap; }
  .section > div:has(> .data-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ── 弹窗: 手机上贴底展开(比居中更好点、更好滚) ── */
  .modal-panel, .modal-sm, .modal-md, .modal-lg, .modal-xl {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92dvh !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    margin: 0 !important;
  }
  .modal-body, .modal-content { -webkit-overflow-scrolling: touch; }
  /* 弹窗里的宽表(属性表)也能横滚 */
  .modal-panel table, .modal-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
  }

  /* ── 上架管理工具栏 / 看板工具行: 按钮不再 25px ── */
  .t10-toolbar .t10-btn,
  .t10-toolbar button { min-height: 40px; }
  #page-tab5 button { min-height: 36px; }

  /* ── 图表在窄屏下别占满整屏 ── */
  canvas { max-width: 100% !important; }
  .chart-container { height: 220px !important; }
}

/* ── 小屏手机 (≤480px) ── */
@media (max-width: 480px) {
  .btn, .btn-sm, .btn-ghost { min-height: 40px; padding: 8px 12px; }
  .page-title { font-size: var(--text-lg); }
  .page-header { margin-bottom: var(--space-4); }
  /* 超长商品名/链接强制换行, 不把容器撑开 */
  .section, .card, td, th {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   ★ 2026-10-08: 选品决策表 → 手机卡片式
   用户要求「最省事的达到手机观看 + 方便手机操作」。
   纯 CSS 实现, **完全不改 decision.js**。
   为什么用 nth-child 而不是 data-label: 仪表盘订单表是靠 JS 给每个 <td> 写
   data-label, 再用 content:attr(data-label) 显示标签的; 而选品决策的 <td> 是
   decision.js 拼字符串生成的, 没有 data-label。为了"最省事", 这里直接用
   nth-child 把 16 列的标签写死在 CSS 里 —— 一行 JS 都不用动。
   列顺序(与 index-v6.html 的 <thead> 一一对应):
     1勾选 2主图 3商品信息 4采购价 5重量 6头程 7成本 8建议售价 9竞争价
     10利润 11利润率 12销量趋势 13评分评论 14置信度 15状态 16操作
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 16 列表头在手机上毫无意义, 直接隐藏 */
  #t9_decision_table thead { display: none; }

  /* 表格/行/单元格全部转块级 → 每行变一张独立卡片 */
  #t9_decision_table,
  #t9_decision_table tbody,
  #t9_decision_table tr,
  #t9_decision_table td { display: block; width: 100%; box-sizing: border-box; }

  /* 取消通用 .data-table 的横向滚动(卡片化后不需要了) */
  #t9_decision_table {
    white-space: normal !important;
    overflow-x: visible !important;
    min-width: 0 !important;
  }

  #t9_decision_table tr {
    /* ★ !important 必须加: decision.js 给每个 <tr> 写了内联 border-bottom,
       内联样式优先级最高, 不加就盖不住, 卡片边框会缺一条边。
       ★ background 故意**不加** !important —— 不可上架的行有内联 background:#fef2f2,
       保留它才能一眼看出这行是红的(被屏蔽)。 */
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fff;
  }

  /* 每个单元格: 左边标签 + 右边数值 */
  #t9_decision_table td {
    padding: 5px 0 !important;
    text-align: left !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: none;
    font-size: 13px !important;
    white-space: normal !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word;
  }
  #t9_decision_table td::before {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11.5px;
    margin-right: 6px;
  }

  /* ── 16 列标签 ── */
  #t9_decision_table td:nth-child(1)::before  { content: '选择'; }
  #t9_decision_table td:nth-child(2)::before  { content: '主图'; }
  #t9_decision_table td:nth-child(4)::before  { content: '采购价'; }
  #t9_decision_table td:nth-child(5)::before  { content: '重量'; }
  #t9_decision_table td:nth-child(6)::before  { content: '头程'; }
  #t9_decision_table td:nth-child(7)::before  { content: '成本'; }
  #t9_decision_table td:nth-child(8)::before  { content: '建议售价'; }
  #t9_decision_table td:nth-child(9)::before  { content: '竞争价'; }
  #t9_decision_table td:nth-child(10)::before { content: '利润'; }
  #t9_decision_table td:nth-child(11)::before { content: '利润率'; }
  #t9_decision_table td:nth-child(12)::before { content: '销量趋势'; }
  #t9_decision_table td:nth-child(13)::before { content: '评分/评论'; }
  #t9_decision_table td:nth-child(14)::before { content: '置信度'; }
  #t9_decision_table td:nth-child(15)::before { content: '状态'; }

  /* ── 第3列 商品信息: 当卡片标题用, 不要标签 ── */
  #t9_decision_table td:nth-child(3) {
    display: block;
    font-size: 13.5px !important;
    font-weight: 700;
    line-height: 1.45;
    padding: 0 0 8px !important;
    margin-bottom: 6px;
    border-bottom: 1px dashed var(--border) !important;
    white-space: normal !important;
  }
  #t9_decision_table td:nth-child(3)::before { content: none; }

  /* ── 第1列 勾选: 放大, 好点 ── */
  #t9_decision_table td:nth-child(1) { padding: 0 0 6px !important; }
  #t9_decision_table td:nth-child(1) input { width: 22px; height: 22px; }

  /* ── 第16列 操作: 按钮撑满一整行 ── */
  #t9_decision_table td:nth-child(16) {
    display: block;
    padding-top: 10px !important;
    margin-top: 6px;
    border-top: 1px dashed var(--border) !important;
  }
  #t9_decision_table td:nth-child(16)::before { content: none; }
  #t9_decision_table td:nth-child(16) button,
  #t9_decision_table td:nth-child(16) a {
    display: block !important;
    width: 100% !important;
    min-height: 42px;
    font-size: 14px !important;
    margin: 0 0 6px !important;
    box-sizing: border-box;
  }

  /* ── 占位行(colspan=16 的「尚未对比价格」): 居中, 不加标签 ── */
  #t9_decision_table td[colspan] {
    display: block;
    text-align: center !important;
    padding: 34px 12px !important;
  }
  #t9_decision_table td[colspan]::before { content: none; }

  /* ── 顶部工具条: 按钮各占一整行, 手机上更好点 ── */
  #page-tab9 .section > div:has(> button[onclick*="runPriceCompare"]) {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  #page-tab9 .section > div:has(> button[onclick*="runPriceCompare"]) > button {
    flex: 1 1 100%;
    min-height: 44px;
    font-size: 14px;
  }
  #page-tab9 .section > div:has(> button[onclick*="runPriceCompare"]) > select,
  #page-tab9 .section > div:has(> button[onclick*="runPriceCompare"]) > div {
    flex: 1 1 100%;
  }
  #page-tab9 #t9_summary { margin-left: 0 !important; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ★ 2026-10-08: 修「手机端『电脑端一键上架』弹窗里 店铺选择框看不到」
   (用户报: 在选品决策板块, 手机上这个弹窗的店铺选择框看不见)

   根因 —— 就在本文件上面的 ≤768px 规则里:
       input[type="text"], input[type="number"], ..., select { width: 100% !important; }
   那条是给**竖排普通表单**用的(让输入框占满一行)。但「上架计划」每行是 flex 行
   (decision.js: _t9dAddPlanRow):
       <select class="t9d_plan_store" style="flex:1;min-width:0">   ← flex-basis:0
     + <input  class="t9d_plan_count" style="width:86px">            ← 被改成 width:100%!important
     + <button class="t9d_plan_del"   style="width:34px">
   于是 select 和 input **同时**被强制 width:100% !important:
     · select 的 flex-basis 是 0%  → 收缩时只能缩到 0, 没有任何余地
     · input  的 flex-basis 是 auto → 取 width:100%, 把整行占满
   结果 select 宽度归零 → **店铺选择框彻底看不见**(数量框反而很宽)。

   修法: 手机上把这一行改成**换行**布局 —— 店铺选择框独占一整行(看得见、好点),
   数量框和删除按钮排到第二行。只影响 .t9d_plan_row, 不动全局表单规则。
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .t9d_plan_row { flex-wrap: wrap !important; }

  /* 店铺选择框: 独占一整行 → 恢复可见, 且好点 */
  .t9d_plan_row .t9d_plan_store {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    font-size: 14px !important;
  }

  /* 数量框: 占第二行剩余宽度 */
  .t9d_plan_row .t9d_plan_count {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    height: 42px !important;
    font-size: 14px !important;
  }

  /* 删除按钮: 固定宽度, 加大点按区 */
  .t9d_plan_row .t9d_plan_del {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 42px !important;
    font-size: 18px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ★ D7 (2026-11-25): 响应式推广到 tab6/tab7/tab10/tab27 + 补漏
   第 1 步实测确认(读代码, 非猜测):
   · viewport 已有(index-v6.html:9); responsive.css 已引入;
     侧边栏抽屉 + 汉堡 + switchTab 切页自动关抽屉都已有(nav.js)。
   · tab9 D9 的 ≤900px 单列 + 表格卡片化 + 计划行修复都已有。
   · 真缺口:
     (1) tab6 Top50 三列网格、tab7 四步指南四列网格: 无任何 media 规则,
         手机上挤成 ~110px / ~85px 一列, 没法看。
     (2) tab27(D1, 未挂载, 纯内联样式): 9/6/8/5 列裸表无最小宽;
         全局 ≤768px input{width:100%!important} 会把阶梯折扣 70/90px
         数字框撑满单元格(同 10 月 t9d_plan_row 旧 bug); 日历
         min-width:320px + 260px 侧栏在 390px 下溢出。
     (3) t9d 1180px 弹窗(#t9d_modal, decision.js 生成): 面板已有
         max-width:96vw, 但内部两栏网格 + 底部操作栏手机上仍两栏挤着。
     (4) #calcFloatWin 固定 left:60vw + width:340px, 390px 屏右溢出约 184px。
     (5) tab10 上架弹窗底部两个按钮行、分页行无 flex-wrap, 窄屏可能溢出。
   只加 CSS, 不改 HTML/JS/业务逻辑; 不碰 tab20–26。
   本块追加在文件末尾, 不动上面 v9.143 块; 选择器全部限定作用域,
   避免误伤 tab5/tab8/tab11/tab14 上同形的内联网格。
   ═══════════════════════════════════════════════════════════════ */

/* ── 平板 ≤1024px: tab6 三列→两列, tab7 四步→两列 ── */
@media (max-width: 1024px) {
  #page-tab6 [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  #page-tab7 [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── t9d 1180px 弹窗 ≤900px: 两栏→单列(与 tab9 页面版 D9 的 900px 断点一致) ── */
@media (max-width: 900px) {
  #t9d_modal > div { width: 100% !important; max-width: 100vw !important; max-height: 100dvh !important; border-radius: 0 !important; }
  #t9d_modal [style*="grid-template-columns:minmax(0,1fr)"] { grid-template-columns: minmax(0, 1fr) !important; }
  #t9d_modal [style*="padding:18px 26px"] { padding: 14px 16px !important; }
  #t9d_modal [style*="border-top:1px solid #e2e8f0"] { flex-wrap: wrap !important; padding: 12px 16px !important; }
  #t9d_modal #t9d_go { flex: 1 1 100% !important; }
}

/* ── 手机 ≤768px ── */
@media (max-width: 768px) {
  /* tab6: 三列→单列; 标题行允许换行(标题 + 状态 + 刷新不再挤一行) */
  #page-tab6 [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
  #page-tab6 [style*="justify-content:space-between"] { flex-wrap: wrap !important; gap: 8px; }
  /* tab7: 四步→单列 */
  #page-tab7 [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: 1fr !important; }
  /* tab10: 分页行换行; 上架弹窗底部两个按钮换行, 窄屏各占一行 */
  #t10_pagination { flex-wrap: wrap !important; }
  #t10UploadModal .modal-footer { flex-wrap: wrap !important; }
  #t10UploadModal .modal-footer .tool-btn,
  #t10UploadModal .modal-footer .submit-btn { flex: 1 1 100% !important; }
  /* 浮动计算器: 不再 left:60vw 顶出右边缘, 改为贴右、宽随屏 */
  #calcFloatWin { left: auto !important; right: 8px !important; top: 64px !important; width: calc(100vw - 16px) !important; max-width: 340px !important; min-width: 0 !important; }

  /* ── tab27 (D1, 未挂载, 挂载后直接生效) ── */
  /* 所有表都可横滚(兜底, 含阶梯小表); 数据表给最小宽不再挤变形 */
  #activity-section-root table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  #activity-section-root table[border="1"][style*="width:100%"] { min-width: 680px; }
  /* 日历月表: 最小宽 560px 横滚, 活动名保持省略号, 不在 47px 格里换行撑高 */
  #activity-section-root table:not([border="1"]) { min-width: 560px; }
  /* 阶梯折扣数字框: 抵消全局 input{width:100%!important}, 恢复 90px 档位宽 */
  #activity-section-root table input[type="number"] { width: 90px !important; max-width: none !important; }
  /* 日历两栏: 月份区占满整行, "即将开始"侧栏另起一行占满 */
  #activity-section-root div[style*="min-width:320px"] { min-width: 0 !important; flex: 1 1 100% !important; }
  #activity-section-root div[style*="width:260px"] { width: 100% !important; }
}
