/*
 * Native cursor rules keep one cursor visible inside each document, including
 * popup frames and same-document popup content.
 */
html,
body,
html * {
  cursor: url('../mouse/指针-cursor.png') 24 8, default !important;
}

.popup-viewport {
  cursor: url('../mouse/指针-cursor.png') 24 8, default !important;
}

iframe {
  cursor: url('../mouse/指针-cursor.png') 24 8, default !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
iframe::-webkit-scrollbar {
  cursor: url('../mouse/指针-cursor.png') 24 8, default !important;
}

/*
 * Browser chrome can briefly stop using an element cursor at the document
 * boundary.  These transparent edge guards cover the browser gutter inside the page and
 * make the supplied arrow the active cursor right up to that boundary.
 */
html::before,
html::after,
body::before,
body::after {
  content: '';
  display: block;
  position: fixed;
  z-index: 2147483647;
  height: 20px;
  width: 20px;
  pointer-events: auto;
  cursor: url('../mouse/指针-cursor.png') 24 8, default !important;
}

html::before { top: 0; right: 0; left: 0; width: auto; }
html::after { right: 0; bottom: 0; left: 0; width: auto; }
body::before { top: 0; bottom: 0; left: 0; height: auto; }
body::after { top: 0; right: 0; bottom: 0; height: auto; }

/* Existing scripts mark draggable windows and images with grab/grabbing. */
html [style*='cursor: grab'],
html [style*='cursor:grab'],
html [style*='cursor: grab'] *,
html [style*='cursor:grab'] * {
  cursor: url('../mouse/抓手-cursor.png') 26 2, grab !important;
}

html [style*='cursor: grabbing'],
html [style*='cursor:grabbing'] {
  cursor: url('../mouse/抓手-cursor.png') 26 2, grabbing !important;
}

/* Click controls inside draggable surfaces keep the ordinary arrow cursor. */
html [style*='cursor: grab'] .brain-portfolio-link,
html [style*='cursor:grab'] .brain-portfolio-link {
  cursor: url('../mouse/指针-cursor.png') 24 8, default !important;
}

/*
 * Native viewport scrollbars are owned by the browser/OS: over their ~15px
 * band Chromium always draws the system arrow and no page CSS can replace it.
 * Hide them on every page (the popup viewers already do) so the supplied
 * pointer stays active right up to the true document edge.  Content still
 * scrolls with the wheel, trackpad, keyboard and touch.
 */
html,
body {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* legacy Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;    /* Chromium / Safari */
}
