/* 手机 H5 上下滑闪白修复
 * 原因：body/page 纯白底 + bgimgs(blur+translateZ) + 叠卡 will-change 在滚动时图层被回收，露出白底。
 * 播放页不加 height:auto，避免撑破播放器。 */

html.kariz-mobile,
html.kariz-mobile body,
html.kariz-ios,
html.kariz-ios body {
  background: #f6f6f6 !important;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: auto;
}

html.kariz-mobile #app,
html.kariz-mobile uni-app,
html.kariz-mobile uni-page,
html.kariz-mobile uni-page-wrapper,
html.kariz-mobile uni-page-body,
html.kariz-ios #app,
html.kariz-ios uni-app,
html.kariz-ios uni-page,
html.kariz-ios uni-page-wrapper,
html.kariz-ios uni-page-body {
  background-color: #f6f6f6 !important;
  background: #f6f6f6 !important;
}

html.kariz-ios.kariz-home-page,
html.kariz-ios.kariz-home-page body,
html.kariz-ios.kariz-home-page #app,
html.kariz-ios.kariz-home-page uni-app,
html.kariz-ios.kariz-home-page uni-page,
html.kariz-ios.kariz-home-page uni-page-wrapper,
html.kariz-ios.kariz-home-page uni-page-body,
html.kariz-mobile.kariz-home-page,
html.kariz-mobile.kariz-home-page body,
html.kariz-mobile.kariz-home-page #app,
html.kariz-mobile.kariz-home-page uni-app,
html.kariz-mobile.kariz-home-page uni-page,
html.kariz-mobile.kariz-home-page uni-page-wrapper,
html.kariz-mobile.kariz-home-page uni-page-body {
  height: auto !important;
  min-height: 100% !important;
  min-height: 100dvh !important;
}

html.kariz-ios.kariz-home-page uni-page-wrapper,
html.kariz-ios.kariz-home-page uni-page-body,
html.kariz-ios.kariz-home-page .page,
html.kariz-mobile.kariz-home-page uni-page-wrapper,
html.kariz-mobile.kariz-home-page uni-page-body,
html.kariz-mobile.kariz-home-page .page {
  -webkit-transform: none !important;
  transform: none !important;
}

html.kariz-mobile .page,
html.kariz-ios .page {
  min-height: 100% !important;
  min-height: -webkit-fill-available !important;
  min-height: 100dvh !important;
  background: #f6f6f6 !important;
  background-color: #f6f6f6 !important;
}

/* 顶部 banner：去掉 translateZ(0)，保留轻度模糊 */
html.kariz-mobile .bgImg,
html.kariz-ios .bgImg {
  overflow: hidden !important;
  contain: layout style paint !important;
  isolation: isolate;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

html.kariz-mobile .bgimgs,
html.kariz-mobile image.bgimgs,
html.kariz-mobile uni-image.bgimgs,
html.kariz-mobile .bgimgs img,
html.kariz-mobile .bgImg uni-image,
html.kariz-mobile .bgImg img,
html.kariz-ios .bgimgs,
html.kariz-ios image.bgimgs,
html.kariz-ios uni-image.bgimgs,
html.kariz-ios .bgimgs img,
html.kariz-ios .bgImg uni-image,
html.kariz-ios .bgImg img {
  filter: blur(10px) !important;
  -webkit-filter: blur(10px) !important;
  transform: scale(1.1) !important;
  -webkit-transform: scale(1.1) !important;
  will-change: auto !important;
  translate: none !important;
}

html.kariz-mobile .bgImg-fade,
html.kariz-ios .bgImg-fade {
  background: linear-gradient(to bottom, rgba(246, 246, 246, 0), rgba(246, 246, 246, 0.55) 45%, #f6f6f6) !important;
}

html.kariz-mobile .uni-scroll-view,
html.kariz-ios .uni-scroll-view {
  -webkit-overflow-scrolling: auto !important;
}

html.kariz-mobile uni-swiper-item,
html.kariz-ios uni-swiper-item {
  will-change: auto !important;
}

html.kariz-mobile .uni-swiper-wrapper,
html.kariz-ios .uni-swiper-wrapper {
  transform: none !important;
  -webkit-transform: none !important;
}

/* 叠卡轮播：白底 + GPU 图层滚动时整页闪白 */
html.kariz-mobile .sy-stack-item,
html.kariz-ios .sy-stack-item {
  will-change: auto !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
  background: #ececec !important;
}

html.kariz-mobile .sy-stack-img,
html.kariz-ios .sy-stack-img {
  background: #ececec !important;
}

html.kariz-mobile .page-loading,
html.kariz-ios .page-loading {
  background: #f6f6f6 !important;
  background-color: #f6f6f6 !important;
  min-height: 40vh !important;
}

/* 下拉刷新白圈 */
html.kariz-mobile .uni-scroll-view-refresh-inner,
html.kariz-ios .uni-scroll-view-refresh-inner {
  background-color: #f0f0f0 !important;
}

/* 兜底：窄屏也去掉 translateZ / 白底 page */
@media (max-width: 900px) {
  html, body, #app, uni-page-body {
    background-color: #f6f6f6;
  }
  .page {
    background: #f6f6f6 !important;
    background-color: #f6f6f6 !important;
  }
  .bgimgs,
  .bgImg .bgimgs,
  .bgImg uni-image.bgimgs,
  .bgImg .bgimgs img,
  .bgImg uni-image img {
    filter: blur(10px) !important;
    -webkit-filter: blur(10px) !important;
    transform: scale(1.1) !important;
    -webkit-transform: scale(1.1) !important;
    will-change: auto !important;
  }
  .bgImg-fade {
    background: linear-gradient(to bottom, rgba(246, 246, 246, 0), rgba(246, 246, 246, 0.55) 45%, #f6f6f6) !important;
  }
  .sy-stack-item {
    will-change: auto !important;
    background: #ececec !important;
  }
  .page-loading {
    background: #f6f6f6 !important;
  }
}
