/* Keep wheel, touch and keyboard scrolling; only hide the browser chrome. */
*{scrollbar-width:none!important}
*::-webkit-scrollbar{display:none;width:0;height:0}

/* The fade lengths follow the remaining scroll distance, so content is fully
   visible at either end and short containers never receive a mask. */
[data-scroll-fade]{
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-top,0px),#000 calc(100% - var(--fade-bottom,0px)),transparent);
  mask-image:linear-gradient(to bottom,transparent,#000 var(--fade-top,0px),#000 calc(100% - var(--fade-bottom,0px)),transparent);
}

/* Keep the paper, its shadow and the navigation outside the faded viewport. */
.reader-scroll{display:contents}
#inspect.is-reading .reader-sheet{display:flex;flex-direction:column;overflow:visible}
#inspect.is-reading .recap-navigation{flex:none;position:relative}
#inspect.is-reading .reader-scroll{display:block;min-height:0;overflow:auto;overscroll-behavior:contain}
@media(forced-colors:active){
  [data-scroll-fade]{-webkit-mask-image:none;mask-image:none}
}
