/* 旧内核（模块脚本无法执行）下的降级样式 */

/* 搜索、主题切换依赖 JS，无脚本时点了没反应，直接隐藏 */
.vp-no-hydration .VPNavBarSearch,
.vp-no-hydration .VPSwitchAppearance,
.vp-no-hydration .VPNavBarAppearance {
  display: none !important;
}

/* 自建侧边栏遮罩（VitePress 的 .curtain 在 transform 容器内 fixed 定位失效，只能覆盖面板本身） */
.vp-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 49;
  background: rgba(0, 0, 0, 0.5);
}
html.vp-nav-locked .vp-mobile-overlay {
  display: block;
}
html.vp-nav-locked body {
  overflow: hidden;
}

/* 侧边栏必须盖在遮罩之上 */
@media (max-width: 959px) {
  .VPSidebar.open {
    z-index: 50;
  }
}
