/* Main document only. Nested panels and image viewers keep their own overflow. */
html.official-preview:has(> body.deep-site) {
  scrollbar-width: auto;
  scrollbar-color: auto;
  scrollbar-gutter: stable;
}

html.official-preview:has(> body.deep-site)::-webkit-scrollbar {
  display: block;
  width: 11px;
  height: 11px;
}

html.official-preview:has(> body.deep-site)::-webkit-scrollbar-track {
  background: #0a1019;
  border-left: 1px solid rgba(111, 171, 190, 0.08);
}

html.official-preview:has(> body.deep-site)::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #497f94, #77b8c7);
  background-clip: padding-box;
  border: 3px solid transparent;
  border-radius: 20px;
}

html.official-preview:has(> body.deep-site)::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6aa6ba, #a2d9e2);
  background-clip: padding-box;
  border-width: 2px;
}

html.official-preview:has(> body.deep-site)::-webkit-scrollbar-thumb:active {
  background: #b1e5ec;
  background-clip: padding-box;
}

html.official-preview:has(> body.deep-site)::-webkit-scrollbar-corner {
  background: #0a1019;
}

html.official-preview:has(> body.deep-site)::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

html.official-preview:has(> body.deep-site dialog[open]) {
  overflow-y: hidden;
}

@supports not selector(::-webkit-scrollbar) {
  html.official-preview:has(> body.deep-site) {
    scrollbar-width: thin;
    scrollbar-color: #77b8c7 #0a1019;
  }
}

@media (max-width: 600px) {
  html.official-preview:has(> body.deep-site)::-webkit-scrollbar {
    width: 6px;
  }

  html.official-preview:has(> body.deep-site)::-webkit-scrollbar-thumb {
    border-width: 1px;
  }
}

@media (forced-colors: active) {
  html.official-preview:has(> body.deep-site) {
    scrollbar-color: auto;
  }

  html.official-preview:has(> body.deep-site)::-webkit-scrollbar-thumb {
    background: CanvasText;
    border-color: Canvas;
  }
}
