/* HNSKX_BACKGROUND_STABLE_LOCK_V1_20260630
 * 中文说明：背景稳定锁，只锁显示层，不改JS、不改API、不碰WS。
 * 中文说明：目的：禁止多套背景在路由切换/刷新/localStorage变化时来回抢背景。
 */

html#htmlRoot {
  --hnskx-stable-bg-v1: url("/assets/theme-bg/bg-night-city.webp") !important;
  background-color: #020b12 !important;
  background-image: none !important;
}

html#htmlRoot,
html#htmlRoot body {
  min-height: 100% !important;
  background-color: #020b12 !important;
  background-image: var(--hnskx-stable-bg-v1) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

html#htmlRoot body,
html#htmlRoot #app {
  background-color: transparent !important;
}

html#htmlRoot #app,
html#htmlRoot .app,
html#htmlRoot .layout,
html#htmlRoot .admin-layout,
html#htmlRoot .main-layout,
html#htmlRoot .main,
html#htmlRoot .content,
html#htmlRoot .main-content,
html#htmlRoot .page,
html#htmlRoot .page-content,
html#htmlRoot .router-view,
html#htmlRoot .app-main,
html#htmlRoot .el-container,
html#htmlRoot .el-main,
html#htmlRoot .ant-layout,
html#htmlRoot .ant-layout-content,
html#htmlRoot .n-layout,
html#htmlRoot .n-layout-content {
  background-image: none !important;
  background-color: transparent !important;
  background-attachment: scroll !important;
}

html#htmlRoot[data-hnskx-bg-theme],
html#htmlRoot[data-hnskx-bg-theme] body {
  --hnskx-bg-image: var(--hnskx-stable-bg-v1) !important;
  background-image: var(--hnskx-stable-bg-v1) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

html#htmlRoot[data-hnskx-bg-theme] #app,
html#htmlRoot[data-hnskx-bg-theme] .app,
html#htmlRoot[data-hnskx-bg-theme] .layout,
html#htmlRoot[data-hnskx-bg-theme] .admin-layout,
html#htmlRoot[data-hnskx-bg-theme] .main-layout,
html#htmlRoot[data-hnskx-bg-theme] .main,
html#htmlRoot[data-hnskx-bg-theme] .content,
html#htmlRoot[data-hnskx-bg-theme] .main-content,
html#htmlRoot[data-hnskx-bg-theme] .page,
html#htmlRoot[data-hnskx-bg-theme] .page-content,
html#htmlRoot[data-hnskx-bg-theme] .router-view,
html#htmlRoot[data-hnskx-bg-theme] .app-main,
html#htmlRoot[data-hnskx-bg-theme] .el-container,
html#htmlRoot[data-hnskx-bg-theme] .el-main,
html#htmlRoot[data-hnskx-bg-theme] .ant-layout,
html#htmlRoot[data-hnskx-bg-theme] .ant-layout-content,
html#htmlRoot[data-hnskx-bg-theme] .n-layout,
html#htmlRoot[data-hnskx-bg-theme] .n-layout-content {
  background-image: none !important;
  background-color: transparent !important;
}

html#htmlRoot .hnskx-bg-theme-page {
  background-image: none !important;
  background-color: transparent !important;
}

html#htmlRoot .hnskx-bg-theme-preview {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* 中文说明：稳定锁标记，验收时 grep 本标记。 */
html#htmlRoot::after {
  content: "HNSKX_BACKGROUND_STABLE_LOCK_V1_20260630";
  display: none !important;
}
