/* Tiltquell: кастомный указатель одного цвета (не белый и не чёрный). Виден на любом фоне и на скриншотах:
   цвет с контрастом ≈4,0–5,3 и к белому, и к чёрному плюс тонкая светлая и тёмная кайма (для цветных кнопок). */
:root { --tq-pointer: #1f7aff; }

.tq-pointer {
  position: fixed;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  right: auto;
  bottom: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
  z-index: 2147483000;
  opacity: 0;
  transition: opacity .15s ease;
  will-change: transform;
}
.tq-pointer.is-visible { opacity: 1; }
.tq-pointer svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tq-pointer {
  color: var(--tq-pointer);
  filter: drop-shadow(0 0 .8px #fff) drop-shadow(0 0 .8px #fff) drop-shadow(0 .5px 1.2px rgba(0, 0, 0, .5));
}
.tq-pointer .s { display: none; }
.tq-pointer .s-arrow { display: inline; }
.tq-pointer[data-shape="text"] .s-arrow, .tq-pointer[data-shape="col"] .s-arrow, .tq-pointer[data-shape="row"] .s-arrow, .tq-pointer[data-shape="cross"] .s-arrow { display: none; }
.tq-pointer[data-shape="text"] .s-text { display: inline; }
.tq-pointer[data-shape="col"] .s-col { display: inline; }
.tq-pointer[data-shape="row"] .s-row { display: inline; }
.tq-pointer[data-shape="cross"] .s-cross { display: inline; }
.tq-pointer .fl { fill: currentColor; stroke: currentColor; stroke-width: 30; stroke-linejoin: round; }
.tq-pointer .ln { fill: none; stroke: currentColor; stroke-width: 44; stroke-linecap: round; stroke-linejoin: round; }

/* Родной курсор прячем только когда указатель точно работает (класс ставит скрипт). */
html.tq-pointer-on,
html.tq-pointer-on * { cursor: none !important; }

/* Обычный курсор остаётся только там, куда сайт не дотягивается (iframe капчи) и где стоит data-native-cursor. */
html.tq-pointer-on iframe,
html.tq-pointer-on [data-native-cursor],
html.tq-pointer-on [data-native-cursor] * { cursor: auto !important; }

/* Внутренние части полей (иконка календаря, стрелки числа, ползунки, кнопка выбора файла) прячут курсор отдельно.
   Каждое правило отдельно: неизвестный браузеру псевдоэлемент не должен ломать остальные. */
html.tq-pointer-on ::-webkit-calendar-picker-indicator { cursor: none !important; }
html.tq-pointer-on ::-webkit-inner-spin-button { cursor: none !important; }
html.tq-pointer-on ::-webkit-outer-spin-button { cursor: none !important; }
html.tq-pointer-on ::-webkit-search-cancel-button { cursor: none !important; }
html.tq-pointer-on ::-webkit-slider-thumb { cursor: none !important; }
html.tq-pointer-on ::-webkit-slider-runnable-track { cursor: none !important; }
html.tq-pointer-on ::-webkit-file-upload-button { cursor: none !important; }
html.tq-pointer-on ::file-selector-button { cursor: none !important; }
html.tq-pointer-on ::-moz-range-thumb { cursor: none !important; }
html.tq-pointer-on ::-moz-range-track { cursor: none !important; }
html.tq-pointer-on ::backdrop { cursor: none !important; }

@media (prefers-reduced-motion: reduce) {
  .tq-pointer { transition: none; }
}

/* Страховка: если браузер не умеет верхний слой, в окнах <dialog> остаётся обычный курсор и скрыта стрелка. */
html.tq-pointer-no-top dialog,
html.tq-pointer-no-top dialog * { cursor: auto !important; }
html.tq-pointer-no-top dialog button,
html.tq-pointer-no-top dialog a { cursor: pointer !important; }
