/* B197 · iOS App(iPhone/iPad) 适配
   只在 UA 含 ZhiXueBanApp/7(iOS壳) 时生效，普通浏览器/安卓app 零影响。
   目标：iPad 宽屏(768~1366)命中的 PC 三栏断点全部抵消，强制走手机布局，
        iPhone/iPad 表现一致，触屏可点，避开刘海/底部横条。 */

/* 1. 抵消 @media(min-width:1200px) 的 body 右留白 306px + 三栏 grid */
html.zxb-ios body{
  padding:0!important;
  display:block!important;
  min-height:100vh;
}
html.zxb-ios .screen{
  grid-template-columns:none!important;
  display:block!important;
}
html.zxb-ios .sidenav,
html.zxb-ios #dsAiRail{display:none!important;}

/* 2. 手机壳恢复：PC断点把 .phone 放大到全宽去圆角，iOS app 拉回居中手机宽 */
html.zxb-ios .phone{
  width:100%!important;
  max-width:480px!important;
  height:100vh!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:#fff!important;
}
/* 状态栏/底部指示条在 app 里由原生管理，页面内不重复显示 */
html.zxb-ios .statusbar,
html.zxb-ios .home-indicator{display:none!important;}
/* 底部 tabbar 常驻，避开 Home 指示条安全区 */
html.zxb-ios .tabbar{
  padding-bottom:env(safe-area-inset-bottom,0)!important;
}

/* 3. 内容区：PC 断点的 .view.on>*{max-width:840} 在窄壳里改成自适应 */
html.zxb-ios .view.on > *{
  max-width:100%!important;
}

/* 4. iPad 分屏(Slide Over/拆分视图)窄到 320~480 时，字号/控件不塌 */
@media (max-width:480px){
  html.zxb-ios input:not([type=range]):not([type=checkbox]):not([type=radio]),
  html.zxb-ios textarea,
  html.zxb-ios select{font-size:16px!important;}
}

/* 5. 顶部刘海安全区：原生已用 safeAreaLayoutGuide，页面内只补下拉刷新起点 */
html.zxb-ios .phone{padding-top:env(safe-area-inset-top,0)!important;}

/* 6. 禁止 iOS 长按图片/链接弹出系统菜单（干扰 app 内交互） */
html.zxb-ios img,
html.zxb-ios a{-webkit-touch-callout:none;}
