html.has-custom-scrollbar {
  scrollbar-width: none;
}

html.has-custom-scrollbar::-webkit-scrollbar {
  display: none;
}

.page-scrollbar {
  position: fixed;
  z-index: 50;
  top: 50%;
  right: 12px;
  width: 24px;
  height: min(55svh, 420px);
  max-height: calc(100svh - 48px);
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  writing-mode: vertical-lr;
  direction: ltr;
  cursor: pointer;
  touch-action: none;
  transform: translateY(-50%);
}

.page-scrollbar[hidden] {
  display: none;
}

.page-scrollbar::-webkit-slider-runnable-track {
  width: 6px;
  border-radius: 999px;
  background: #343d49;
}

.page-scrollbar::-webkit-slider-thumb {
  width: 8px;
  height: 36px;
  margin-left: -1px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #13c6a0;
  box-shadow: 0 0 7px #13c6a066, 0 0 16px #13c6a026;
}

.page-scrollbar::-moz-range-track {
  width: 6px;
  height: 100%;
  border-radius: 999px;
  background: #343d49;
}

.page-scrollbar::-moz-range-thumb {
  width: 8px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #13c6a0;
  box-shadow: 0 0 7px #13c6a066, 0 0 16px #13c6a026;
}

.page-scrollbar:focus-visible {
  outline: 1px solid #13c6a0;
  outline-offset: 4px;
  border-radius: 999px;
}

@media (max-width: 700px) {
  .page-scrollbar {
    right: 0;
  }
}
