/* Shared native scrollbars. Overflow remains owned by each layout: no forced
   scrollbars, hidden scroll areas, or extra scroll containers. */
:root {
  --scroll-thumb: #8a9186;
  --scroll-thumb-hover: #596752;
}
:root[data-scroll-theme="dark"],
.shared-crew-dialog, .feedback-dialog, .arcade-account-menu, .route-panel,
.runner-showroom, .remix-console, .game .overlay {
  --scroll-thumb: #637c85;
  --scroll-thumb-hover: #a6bdab;
}
:root[data-scroll-theme="dark"] { color-scheme: dark; }
/* Standard properties cover Firefox and current Chromium. The transparent
   track also avoids the pale gutter when OS settings keep bars visible. */
html, html * {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
html :is(:hover, :focus-visible) {
  scrollbar-color: var(--scroll-thumb-hover) transparent;
}
/* Safari and older Chromium use the native WebKit scrollbar parts. */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* Respect high-contrast settings and keep native scrolling accessible. */
@media (forced-colors: active) {
  html, html * { scrollbar-color: auto; scrollbar-width: auto; }
  ::-webkit-scrollbar-thumb { background-color: ButtonText; }
}
