/* Static fallback while the enhanced cursor is inactive or JavaScript is off.
   Touch devices and high-contrast mode retain their system cursor behavior. */
@media (hover: hover) and (pointer: fine) and (forced-colors: none) {
  html,
  body {
    cursor: url("assets/cursor-circle.svg") 14 14, auto;
  }
  a,
  button,
  [role="button"],
  summary,
  label[for],
  select {
    cursor: url("assets/cursor-link.svg") 18 18, pointer;
  }
  .project-stage,
  .project-stage:active,
  .project-stage .project-card,
  #portrait-stage,
  #portrait-stage:active {
    cursor: url("assets/cursor-drag.svg") 18 18, grab;
  }
  /* This state also overrides the deck's explicit grabbing rule. */
  .project-stage.is-dragging,
  .project-stage.is-dragging * {
    cursor: url("assets/cursor-drag.svg") 18 18, grabbing !important;
  }
  a:active,
  button:active,
  [role="button"]:active {
    cursor: url("assets/cursor-circle.svg") 14 14, pointer;
  }
  input,
  textarea,
  [contenteditable]:not([contenteditable="false"]) {
    cursor: text;
  }
  input:is([type="checkbox"], [type="radio"], [type="range"], [type="button"], [type="submit"]) {
    cursor: pointer;
  }
  video[controls],
  audio[controls] {
    cursor: auto;
  }
  :disabled,
  [aria-disabled="true"] {
    cursor: not-allowed;
  }
}

/* Pointer positions are updated separately from the ring's hover transitions. */
.pointer-trail {
  --cursor-ready: 1;
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  overflow: clip;
  user-select: none;
}
.pointer-trail * {
  pointer-events: none;
}
.pointer-dot,
.pointer-ring {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}
.pointer-dot {
  z-index: 1;
}
.pointer-dot::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #8b0000, 0 0 4px #0009;
  transform: translate(-50%, -50%);
}
.pointer-ring-shape {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #f4f4f680;
  border-radius: 50%;
  background: #8b00000d;
  box-shadow: 0 0 0 1px #0b0c0f40;
  transform: translate(-50%, -50%);
  transition: width 160ms ease, height 160ms ease, background 160ms ease, border-color 160ms ease;
}
.pointer-label {
  opacity: 0;
  color: #fff;
  font: 600 10px/1 var(--font, sans-serif);
  letter-spacing: 0.1em;
  transition: opacity 120ms ease;
}
.pointer-trail[data-mode="link"] .pointer-ring-shape {
  width: 48px;
  height: 48px;
  border-color: #f4f4f6b3;
  background: #8b000033;
}
.pointer-trail[data-mode="drag"] .pointer-ring-shape {
  width: 66px;
  height: 66px;
  border-color: #f4f4f6a6;
  background: #500000e6;
}
.pointer-trail[data-mode="drag"] .pointer-label {
  opacity: 1;
}
.pointer-trail[data-mode="drag"] .pointer-dot::before {
  opacity: 0;
}
.pointer-trail.is-pressed .pointer-ring-shape {
  width: 30px;
  height: 30px;
  border-color: #fff;
  background: #8b000059;
}
.pointer-trail[data-mode="drag"].is-pressed .pointer-ring-shape {
  width: 58px;
  height: 58px;
  background: #8b0000eb;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  .pointer-trail:not([hidden]) {
    display: block;
  }
  html.cursor-active,
  .cursor-active *,
  .cursor-active .project-stage.is-dragging,
  .cursor-active .project-stage.is-dragging * {
    cursor: none !important;
  }
}
@media print {
  .pointer-trail {
    display: none !important;
  }
}
