/* v78: thin stroke scrollbar, matching the site’s 1px panel borders. Flat honey
   gold (#e2bd7a), floating inset from the edges. Native bars stay hidden once the
   overlay runs, because Chromium 121+ ignores ::-webkit-scrollbar when scrollbar-color is set. */
:root{
  --scroll-gold:#e2bd7a;
  --scroll-gold-hi:#ebcb8f;
  --scroll-gold-fill:#dbb46f;
  --scroll-gold-light:rgba(255,246,226,.55);
}

/* Fallback if JS has not started: thin gold thumb, transparent track. */
html:not(.has-brand-scroll),
body:not(.has-brand-scroll),
.sound-panel,
#os-browser,
#loginLayer .login{
  scrollbar-width:thin;
  scrollbar-color:rgba(226,189,122,.7) transparent;
}
html:not(.has-brand-scroll)::-webkit-scrollbar,
body:not(.has-brand-scroll)::-webkit-scrollbar,
.sound-panel::-webkit-scrollbar,
#os-browser::-webkit-scrollbar,
#loginLayer .login::-webkit-scrollbar{
  width:2px;height:2px;background:transparent;
}
html:not(.has-brand-scroll)::-webkit-scrollbar-track,
body:not(.has-brand-scroll)::-webkit-scrollbar-track,
.sound-panel::-webkit-scrollbar-track,
#os-browser::-webkit-scrollbar-track,
#loginLayer .login::-webkit-scrollbar-track{
  background:transparent;
}
html:not(.has-brand-scroll)::-webkit-scrollbar-thumb,
body:not(.has-brand-scroll)::-webkit-scrollbar-thumb,
.sound-panel::-webkit-scrollbar-thumb,
#os-browser::-webkit-scrollbar-thumb,
#loginLayer .login::-webkit-scrollbar-thumb{
  background:rgba(226,189,122,.7);
  border-radius:999px;
  border:0;
}
html:not(.has-brand-scroll)::-webkit-scrollbar-thumb:hover,
body:not(.has-brand-scroll)::-webkit-scrollbar-thumb:hover,
.sound-panel::-webkit-scrollbar-thumb:hover,
#os-browser::-webkit-scrollbar-thumb:hover,
#loginLayer .login::-webkit-scrollbar-thumb:hover{
  background:rgba(226,189,122,.88);
}

/* Overlay mode: hide every native bar so Chromium cannot replace ours. */
html.has-brand-scroll,
html.has-brand-scroll body,
html.has-brand-scroll .sound-panel,
html.has-brand-scroll #os-browser,
html.has-brand-scroll #os-browser .os-options,
html.has-brand-scroll #loginLayer .login{
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
html.has-brand-scroll::-webkit-scrollbar,
html.has-brand-scroll *::-webkit-scrollbar{
  width:0!important;height:0!important;display:none!important;background:transparent!important;
}

.brand-scroll{
  position:fixed;z-index:60;pointer-events:none;
  /* Wide invisible hit area; the thumb sits on the inner edge. */
  /* Hit area reaches the edge; the thumb floats in from the right. */
  width:20px;padding:0 8px 0 3px;
  box-sizing:border-box;
}
.brand-scroll.is-active{pointer-events:auto}
.brand-scroll-track{
  position:relative;height:100%;width:100%;
}
.brand-scroll-thumb{
  position:absolute;right:0;width:1px!important;min-width:1px;max-width:2px;min-height:28px;
  border:0;padding:0;margin:0;cursor:grab;box-sizing:border-box;
  border-radius:999px;
  background:rgba(226,189,122,.72);
  box-shadow:none;
  outline:0;
  opacity:0;
  transition:opacity .4s ease,width .2s ease,background-color .2s ease;
  -webkit-appearance:none;appearance:none;
}
.brand-scroll-thumb:active{cursor:grabbing}
.brand-scroll.is-visible .brand-scroll-thumb,
.brand-scroll.is-hover .brand-scroll-thumb,
.brand-scroll.is-dragging .brand-scroll-thumb{opacity:1!important}
.brand-scroll.is-hover .brand-scroll-thumb,
.brand-scroll.is-dragging .brand-scroll-thumb{
  width:2px!important;min-width:2px;
  background:rgba(226,189,122,.9);
  box-shadow:none;
}
.brand-scroll-thumb:focus-visible{
  opacity:1!important;width:2px!important;
  outline:2px solid #ebcb8f;outline-offset:2px;
}

@media (prefers-reduced-motion:reduce){
  .brand-scroll-thumb{transition:none}
  html.has-brand-scroll .brand-scroll.is-active .brand-scroll-thumb{opacity:.7}
}
