/*
 * 全站 JS 自定义滚动条（Chrome / Edge web-compat-layer）
 * 颜色继承 --web-scroll-thumb*；滑轨绝对定位叠加，不占 flex 列宽
 */
.web-custom-scroll-wrap {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.web-scroll--custom {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.web-scroll--custom::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.web-vscroll {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--web-scroll-gutter, 8px);
  padding: 3px 1px 3px 0;
  box-sizing: border-box;
  z-index: 2;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}
.web-vscroll__track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: transparent;
  touch-action: none;
}
.web-vscroll__thumb {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 0;
  min-height: 28px;
  border-radius: 999px;
  background: var(--web-scroll-thumb);
  box-shadow: none;
  cursor: grab;
  touch-action: none;
}
.web-vscroll__thumb:hover {
  background: var(--web-scroll-thumb-hover);
}
.web-vscroll__thumb.is-dragging {
  cursor: grabbing;
  background: var(--web-scroll-thumb-active);
}
.web-vscroll.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

/* 文档级真悬浮：隐藏原生页面滚动条，固定滑轨叠在视口右侧 */
html.web-vscroll-doc-active {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html.web-vscroll-doc-active::-webkit-scrollbar,
html.web-vscroll-doc-active body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.web-vscroll--doc {
  position: fixed;
  top: var(--web-nav-h, 56px);
  right: 0;
  bottom: 0;
  width: var(--web-scroll-gutter, 8px);
  padding: 3px 1px 3px 0;
  box-sizing: border-box;
  z-index: 1040;
  pointer-events: auto;
}
