/**
 * 视口 < 1920px 时锁定 1920px 设计稿宽度，保持布局不被挤压。
 *   - 1200 ≤ 视口 < 1920：优先 html { zoom }（不破坏 position:fixed）；无 zoom 时才 transform
 *   - 视口 < 1200：不缩放，html / body 固定 1920px，允许横向滚动
 * 视口 >= 1920px：什么都不做，按页面自身布局展示。
 */

/* === scale 模式：1200px ≤ 视口 < 1920px === */
html.kerui-adaptive-scale {
  font-size: 16px;
  --kerui-fs-root: 16px;
  --kerui-fs-logo: 1.85rem;
  --kerui-fs-logo-sub: 1.45rem;
  --kerui-fs-section-title: 1.125rem;
  --kerui-fs-stat-num: 1.0625rem;
  --kerui-fs-body: 14px;
  --kerui-fs-caption: 12px;
  --kerui-fs-small: 12px;
  overflow-x: hidden;
  /* 设计稿宽由 min-width 锁住，勿依赖 JS 写 width，避免与 zoom 叠加重排闪动 */
  min-width: 1920px;
}

html.kerui-adaptive-scale body {
  min-width: 1920px !important;
  /* 两轴同 clip，避免单独 overflow-x 把 y 算成 auto、弄坏 sticky 侧栏 */
  overflow-x: clip;
  overflow-y: clip;
}

html.kerui-adaptive-scale .kerui-page-shell,
html.kerui-adaptive-scale .kerui-layout,
html.kerui-adaptive-scale .kerui-page-footer {
  min-width: 1920px !important;
}

html.kerui-adaptive-scale .kerui-topbar {
  width: 100%;
  max-width: 100%;
}

/* transform 回退（无 zoom 的旧 Firefox）：fixed 相对整页，由 JS 补偿 top */
html.kerui-adaptive-scale-transform {
  overflow-x: hidden;
}

/* === fixed 模式：视口 < 1200px（不缩放，锁定 1920px 横向滚动） === */
html.kerui-adaptive-fixed {
  font-size: 16px;
  --kerui-fs-root: 16px;
  --kerui-fs-logo: 1.85rem;
  --kerui-fs-logo-sub: 1.45rem;
  --kerui-fs-section-title: 1.125rem;
  --kerui-fs-stat-num: 1.0625rem;
  --kerui-fs-body: 14px;
  --kerui-fs-caption: 12px;
  --kerui-fs-small: 12px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

html.kerui-adaptive-fixed body {
  min-width: 1920px !important;
  overflow-x: clip;
  overflow-y: clip;
}

html.kerui-adaptive-fixed .kerui-page-shell,
html.kerui-adaptive-fixed .kerui-layout,
html.kerui-adaptive-fixed .kerui-page-footer {
  min-width: 1920px !important;
}

html.kerui-adaptive-fixed .kerui-topbar {
  width: 1920px;
  max-width: 1920px;
}
