/* Minimal scrollbars on all site pages and reading overlays. */
html, dialog { scrollbar-width: thin; scrollbar-color: rgba(128,128,128,.65) transparent; }
html::-webkit-scrollbar, dialog::-webkit-scrollbar { width:6px; height:6px; }
html::-webkit-scrollbar-track, dialog::-webkit-scrollbar-track, html::-webkit-scrollbar-corner, dialog::-webkit-scrollbar-corner { background:transparent; }
html::-webkit-scrollbar-thumb, dialog::-webkit-scrollbar-thumb { background:rgba(128,128,128,.65); border-radius:3px; }
html::-webkit-scrollbar-button, dialog::-webkit-scrollbar-button { display:none; width:0; height:0; }

/* Native modal dialogs occupy the browser top layer, above the simulated cursor.
   Restore a real cursor within that layer, including fullscreen media viewers. */
@media (min-width:821px) {
  html.chrome-custom-cursor-active body dialog[open],
  html.chrome-custom-cursor-active body dialog[open] *,
  html.chrome-custom-cursor-active body dialog[open] *::before,
  html.chrome-custom-cursor-active body dialog[open] *::after {
    cursor: auto !important;
  }
  html.chrome-custom-cursor-active body dialog[open] :is(a[href],button,[role="button"],[role="link"],summary,label[for]),
  html.chrome-custom-cursor-active body dialog[open] :is(a[href],button,[role="button"],[role="link"],summary,label[for]) * {
    cursor: pointer !important;
  }
  html.chrome-custom-cursor-active body dialog[open] :is(input:not([type="button"]):not([type="submit"]),textarea) {
    cursor: text !important;
  }
  html.chrome-custom-cursor-active body dialog[open] .carry-spread a,
  html.chrome-custom-cursor-active body dialog[open] .carry-spread a * { cursor: zoom-in !important; }
  html.chrome-custom-cursor-active:has(dialog[open]) #chrome-custom-cursor { display:none !important; }
}
