/* Системную полосу страницы прячем: её заменяет короткий индикатор из scroll-thumb.js. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

.scroll-thumb {
  position: fixed; top: 0; right: 4px; z-index: 2147483000;
  width: 5px; height: 64px; border-radius: 999px;
  background: color-mix(in srgb, var(--text, #1b1a17) 38%, transparent);
  opacity: 0; transition: opacity .35s ease, width .2s ease, background-color .2s;
  touch-action: none; cursor: grab;
}
.scroll-thumb[hidden] { display: none; }
.scroll-thumb.is-visible { opacity: 1; }
.scroll-thumb:hover, .scroll-thumb.is-dragging { width: 8px; background: color-mix(in srgb, var(--accent, #ff782e) 85%, transparent); }
.scroll-thumb.is-dragging { cursor: grabbing; }

/* Внутренние списки и окна: тонкая аккуратная полоса */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, currentColor 28%, transparent) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { border-radius: 999px; background: color-mix(in srgb, currentColor 28%, transparent); }
*::-webkit-scrollbar-track { background: transparent; }

@media (pointer: coarse) {
  .scroll-thumb { display: none; }
}

/* Индикатор внутри окон: системную полосу прячем, показываем короткую «таблетку» */
.has-thumb { scrollbar-width: none !important; }
.has-thumb::-webkit-scrollbar { display: none !important; width: 0 !important; }
.scroll-thumb--inner { position: fixed; right: auto; z-index: 2147483001; width: 5px; pointer-events: none; }
