/* mobile.css —— 全站移动端/平板安全网（2026-11-13）
   由所有页面统一加载：只兜底，不覆盖各页面已有的精细适配 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{overflow-x:hidden}
@supports (overflow:clip){html,body{overflow-x:clip}}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
pre{overflow-x:auto;-webkit-overflow-scrolling:touch}
iframe{border:0}
/* 触屏滚动区域顺滑 */
.nav-groups,.table-scroll,.modal-body,.drawer{ -webkit-overflow-scrolling:touch }
/* 手机/窄屏平板 */
@media(max-width:640px){
  /* 宽表格变为块级横向滚动，不再撑破页面 */
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;width:fit-content;min-width:100%}
  /* 防 iOS 聚焦时页面自动放大 */
  input,select,textarea{font-size:16px !important}
  /* 弹层通用：占满宽度并限制高度内部滚动 */
  .modal,.dialog,.popup{max-width:100vw !important}
}
/* 平板竖屏（641-900px）：只做温和约束 */
@media(min-width:641px) and (max-width:900px){
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;width:fit-content;min-width:100%}
}
/* 手机/平板：iframe 内嵌页满屏铺放（消除父页与内嵌页的底色差、去掉四周露边） */
@media(max-width:900px){
  .app:has(> .frame-view){padding:0 0 24px!important}
  .frame-view .deck-frame{height:calc(100vh - 56px)!important;min-height:0!important;margin:0!important}
}

/* 内嵌页面（刷题 / 资料）：外壳不再加顶部留白，内容直接贴顶（平板尤其明显） */
body:has(#app > .frame-view) .app{padding-top:0!important}
body:has(#app > .frame-view) .deck-frame{margin-top:0!important}

/* 内嵌页面全幅铺放（2026-11-14）：内容与侧边栏、窗口上/下/右边缘完全接壤，四周零留白 */
body:has(#app > .frame-view) .content,
body:has(#app > .frame-view) .layout{min-width:0}
body:has(#app > .frame-view) .app{
  max-width:none!important;width:100%!important;
  margin:0!important;padding:0!important;
}
body:has(#app > .frame-view) .frame-view{padding:0!important;margin:0!important}
body:has(#app > .frame-view) .deck-frame{
  display:block;width:100%!important;
  height:calc(100vh - var(--topbar-h,60px))!important;
  height:calc(100dvh - var(--topbar-h,60px))!important;
  min-height:0!important;max-height:none!important;
  margin:0!important;border:0;border-radius:0;box-shadow:none;
}
