/* =========================================================
   qdauto 移动端适配层
   规则全部包在 @media 内，仅 ≤768px 生效，桌面端零影响。
   仅做"加法"：多列网格塌单列 / 媒体自适应 / 按钮跟手 /
   固定头不再遮挡内容。导航、备案号、64px 头、模块数均不动。
   ========================================================= */
*,*::before,*::after{box-sizing:border-box}
img,video,canvas,svg,iframe{max-width:100%;height:auto}
html,body{max-width:100%;overflow-x:hidden;word-wrap:break-word}
table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

@media (max-width:768px){
  /* 基础排版 */
  body{font-size:15px;line-height:1.65}
  h1{font-size:1.7rem!important;line-height:1.25}
  h2{font-size:1.4rem!important;line-height:1.3}
  h3{font-size:1.15rem!important}
  p,li{font-size:.95rem}

  /* 固定头占位：避免内容被 64px 头挡住（桌面端已有处理，这里只补手机缺漏） */
  body{padding-top:64px}

  /* 容器内边距收窄，避免两侧留白过大 */
  .wrap,.container,.sec-head,.ft-grid,.ft-bottom,
  .nav-in,.nav-container,.phead{
    padding-left:16px!important;padding-right:16px!important;
  }

  /* 多列网格 → 单列（仅对网格容器生效；对 flex 容器此属性无效，安全） */
  .grid,.prod-grid,.g3,.cgrid,.stat-grid,.ft-grid,.screens,
  .about-grid,.contact-grid,.tool-grid,.kv,.hbtns,.sc-body,
  .hero-in,.features,.card-grid,.doc-grid,.modules{
    grid-template-columns:1fr!important;
  }
  /* 行内 style 写的网格也塌单列 */
  [style*="grid-template-columns"]{grid-template-columns:1fr!important}

  /* 弹性行允许换行 */
  .flex,.cards,.nav-links,.nav-cta,.dlc,.step,.model,.ci,
  .hero-cta,.card-btns,.ctrl-bar,.hero-stats,.model-row,
  .row,.tabs,.cta,.pbtns,.cbtns{flex-wrap:wrap!important}
  .dlc,.step,.model,.hero-stats,.model-row{flex-direction:column!important}

  /* 表单与主要按钮在手机上占满、16px 防 iOS 自动缩放 */
  input,select,textarea,.btn,.field,.ctrl{
    width:100%!important;max-width:100%!important;font-size:16px!important;
  }
  .hero-cta,.pbtns,.cbtns,.cta{gap:12px!important}
  .hero-cta .btn,.pbtns .btn,.cbtns .btn,.cta .btn{width:100%!important}

  /* 弹窗近乎满屏 */
  .modal{width:calc(100% - 24px)!important;max-width:440px!important;margin:12px auto!important}

  /* 区块留白收敛，手机上不空旷 */
  section,.section,.hero,.phead{padding-top:44px!important;padding-bottom:44px!important}

  /* 卡片内间距收敛 */
  .card,.prod,.box,.panel{padding:18px!important}
}

@media (max-width:480px){
  body{font-size:14.5px}
  h1{font-size:1.5rem!important}
  .ft-grid{grid-template-columns:1fr!important}
  section,.section,.hero,.phead{padding-top:36px!important;padding-bottom:36px!important}
}
