/* Only existing content layers receive a mask; no layout or input changes. */
:root { --scroll-fade-size: 24px; }
[data-scroll-fade] {
  mask-image: linear-gradient(to bottom,
    #000 calc(var(--scroll-fade-from) - var(--scroll-fade-top)),
    transparent var(--scroll-fade-from),
    #000 calc(var(--scroll-fade-from) + var(--scroll-fade-top)),
    #000 calc(var(--scroll-fade-to) - var(--scroll-fade-bottom)),
    transparent var(--scroll-fade-to),
    #000 calc(var(--scroll-fade-to) + var(--scroll-fade-bottom)));
}
/* Keep the original bridge's static content-clipping cue available even when
   the browser reports reduced transparency in normal contrast. Explicit high
   contrast still disables the cue; reduced motion introduces no animation. */
@media (forced-colors: active), (prefers-contrast: more) {
  [data-scroll-fade] { mask-image: none; }
}
