/**
 * 性能收尾层 — 必须在 page-home / bm-components 之后加载
 */

/* 滚动：fixed 背景每帧重绘，是卡顿主因之一 */
body {
  background-attachment: scroll !important;
}

/* 低配：关闭 Hero 伪元素网格（高配由 bm-premium / bm-enterprise 绘制） */
html.bm-lite .bm-hero-mesh::before,
html.bm-lite .bm-hero-mesh::after {
  display: none !important;
}

/* 骨架屏 shimmer */
.bm-skeleton-block {
  animation: none !important;
  background: var(--bm-surface-section) !important;
}

/* 减少滚动时 paint */
.hero-section .search-rim {
  transition: border-color 0.15s ease !important;
}

.hero-section .search-rim:focus-within {
  transition: border-color 0.15s ease !important;
}

/* 视口外区块延迟绘制 */
.bm-tools-section,
.categories-section,
.featured-section,
.bm-cta-band {
  content-visibility: auto;
  contain-intrinsic-size: 1px 400px;
}

html.bm-lite .hero-section,
html.bm-lite .bm-page .bm-search-hero-premium {
  background:
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
}

/* 低配：砖块略放大、渐变更实，减少层叠计算 */
html.bm-lite body {
  --bm-brick-size: 160px 80px;
  background-image:
    linear-gradient(180deg, rgba(248, 250, 252, 0.94) 0%, rgba(241, 245, 249, 0.9) 100%),
    var(--bm-brick-tile) !important;
  background-size: auto, var(--bm-brick-size) !important;
  background-repeat: no-repeat, repeat !important;
}
