/* SingleFile 的 100% 高度会把 body 变成独立滚动容器；恢复标准文档滚动。 */
html,
body {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden;
}

#__next,
#scroller,
main {
  height: auto;
  min-height: 100%;
  overflow: visible;
}

.css-11cod3t {
  height: auto;
}

/* 冻结快照中的桌面导航按钮由本地脚本恢复边界状态。 */
.css-1l13ezi {
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.css-1l13ezi::-webkit-scrollbar {
  display: none;
}

.css-q6jjr3:not(:disabled) {
  visibility: visible;
  cursor: pointer;
  opacity: 1;
}

.language-control {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: 12px;
}

.language-control label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-control select {
  max-width: 112px;
  height: 40px;
  padding: 0 26px 0 10px;
  color: #141651;
  font: 600 14px/1 "Beausite Classic", Helvetica, Arial, sans-serif;
  background: #fff;
  border: 1px solid #2436ff;
  border-radius: 999px;
}

#static-site-notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px;
  color: #fff;
  font: 500 15px/1.4 "Beausite Classic", Helvetica, Arial, sans-serif;
  background: #141651;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(20, 22, 81, 0.28);
  pointer-events: none;
}

#static-site-notice[hidden] {
  display: none;
}

html[lang="zh-CN"] body {
  font-family: "Beausite Classic", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3 {
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

@media (max-width: 640px) {
  #scroller {
    padding-top: 60px;
  }

  .css-7ctrjb {
    min-height: calc(100vh - 60px);
    margin: 0;
  }

  .css-1vldh5q {
    box-sizing: border-box;
    width: min(380px, calc(100% - 24px));
    padding: 32px 24px;
    margin: 0 auto;
  }

  /* 快照没有可验证的手机菜单节点，隐藏被截断的桌面导航轨道。 */
  .css-1pda5re {
    display: none;
  }

  .css-hrvo83 {
    margin-left: 16px;
  }

  .css-1xnd8h7 {
    padding-left: 0;
    margin-right: 12px;
  }

  .language-control {
    margin-left: auto;
  }

  .language-control select {
    max-width: 92px;
    height: 38px;
    padding-right: 22px;
  }

  #static-site-notice {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 420px) {
  .css-1rjsj58 {
    min-width: auto;
    padding-right: 14px;
    padding-left: 14px;
  }

  .language-control select {
    max-width: 78px;
    padding-left: 8px;
    font-size: 13px;
  }
}
