/* 全站移动端适配增强
   目标：手机与电脑内容一致、不裁切、不溢出；宽屏下完全不生效 */
@media (max-width: 700px) {
  /* 1. 内联写死的多列 grid → 单列（属性选择器覆盖内联 style） */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:1fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* 2. 等级配置等 flex 行 → 可横向滚动，不再撑破页面 */
  .lv-row, .lv-head {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .lv-row > *, .lv-head > * { flex: 0 0 auto; }

  /* 3. 任何表格外层都能横向滚动 */
  table, table.data { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
  .table-wrap { overflow-x: auto; max-width: 100%; }

  /* 4. 卡片/面板不超出视口 */
  .card, .stat-grid, .acc-grid, .quick-grid, .cfg-box, .dlg {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* 5. 图片自适应，不撑破容器 */
  img { max-width: 100%; height: auto; }

  /* 6. 弹层内表格/卡密区不溢出 */
  .mask .dlg { width: calc(100% - 24px) !important; max-height: 88vh; overflow-y: auto; }
  #pay-qr img { max-width: 78vw !important; max-height: 78vw !important; }

  /* 7. 代码块/订单号长文本换行 */
  .mono { word-break: break-all; overflow-wrap: anywhere; }

  /* 8. 顶部统计四宫格 → 两宫格 */
  .stat-grid { grid-template-columns: 1fr 1fr !important; }
  .acc-grid  { grid-template-columns: 1fr 1fr !important; }
}
/* 阶梯利润表：手机端保持 4 列但压缩列宽，删除按钮固定小宽，防止撑破 */
@media (max-width: 700px) {
  .tier-row, .tier-head {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) 62px 28px !important;
    gap: 5px !important;
  }
  .tier-row input { width: 100% !important; min-width: 0; padding: 7px 5px; font-size: 13px; }
  .tier-head span { font-size: 11px; }
}
/* 主 banner：手机端增高/收紧间距，防止标题被 overflow 裁掉 */
@media (max-width: 700px) {
  .main-banner { height: auto !important; min-height: 250px; padding: 22px 18px; }
  .main-banner h2 { font-size: 20px !important; line-height: 1.35; }
  .main-banner .rows { margin-top: 14px; gap: 8px; }
  .main-banner .prow { font-size: 13px; gap: 6px; }
  .main-banner .prow .b1 { padding: 4px 10px; }
  .main-banner .buy { margin-top: 16px; font-size: 15px; padding: 9px 20px; }
  .main-banner .note-icon { right: 12px; opacity: .35; }
  .main-banner .note-icon svg { width: 80px; height: 80px; }
}
/* 悬浮客服球：手机端下移+缩小，避免遮挡快捷入口 */
@media (max-width: 700px) {
  .float-kf { right: 10px !important; bottom: 18px !important; gap: 6px; }
  .float-kf .kf { width: 44px; height: 44px; font-size: 9px; opacity: .92; }
  .float-kf .top { width: 34px; height: 34px; }
}
@media (max-width: 400px) {
  .stat-grid, .acc-grid { grid-template-columns: 1fr !important; }
}
