/* Natív scrollbar elrejtése */
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { width: 0; height: 0; }

  /* Pozíció: jobb oldal, 40px beljebb; 15vh magas; 1px széles */
  #custom-scrollbar{
    position: fixed;
    right: 40px;
    bottom: 10%;
    width: 1px;
    height: 15vh;
    z-index: 9999;
    pointer-events: none;
    contain: layout paint style; /* izoláljuk a festést/layoutot */
  }
  #custom-scrollbar.hidden{ display: none; }

  #custom-scrollbar .track{
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    pointer-events: none;
  }

  #custom-scrollbar .thumb{
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    /* magasságot CSS változóval kapja, JS csak ritkán állítja */
    height: var(--thumb-h, 24px);
    background: #fff;
    border-radius: 2px;
    pointer-events: none;
    user-select: none;

    /* kizárólag transformmal mozgatjuk → kompozitor-only */
    transform: translate3d(0, var(--thumb-y, 0px), 0);
    will-change: transform;
  }

  @media (prefers-reduced-motion: reduce){
    #custom-scrollbar{ display: none !important; }
  }