/* ============================================================
   欧克数据中心 · 全站移动端兜底样式
   仅在窄屏（≤768px）生效，桌面端零影响。
   规则说明见每段注释；页面特殊布局请在该页自身 style 内补充。
   ============================================================ */
@media (max-width: 768px) {

  /* ---------- 1. 基础：字号自适应、媒体不溢出 ---------- */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, video { max-width: 100%; height: auto; }
  pre { max-width: 100%; overflow-x: auto; }

  /* ---------- 2. 表格横向滚动 ----------
     纯 CSS 无法把 table 包进滚动容器（table{display:block} 会打散
     thead/tbody 列对齐），因此由 mobile-adapt.js 在窄屏自动加 .m-scroll 外壳。 */
  .m-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .m-scroll > table { width: max-content; min-width: 100%; }
  .m-scroll > table th,
  .m-scroll > table td { white-space: nowrap; }

  /* ---------- 3. 表单控件：避免 iOS 聚焦自动放大、避免撑破容器 ---------- */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea { font-size: 16px; max-width: 100%; }
  button { min-height: 36px; }

  /* ---------- 4. 固定宽度主容器收敛 ---------- */
  .container,
  .main-content,
  .page-wrap,
  .content-wrap,
  .wrap,
  main { max-width: 100% !important; }

  /* ---------- 5. 多列网格在手机上降为两列（Tailwind 精确类名） ---------- */
  .grid-cols-3,
  .grid-cols-4,
  .grid-cols-5,
  .grid-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* ---------- 6. 常见工具条换行 ---------- */
  .toolbar,
  .action-bar,
  .filter-bar,
  .filters { flex-wrap: wrap !important; }
}
