/**
 * 阿尼亚自定义鼠标指针(cursor.css)
 *
 * 资源由 .agents/skills/web-cursor-converter/scripts/cursor_convert.py 从 Windows 光标包(.ani/.cur)转换而来,
 * 帧图与热点数据在 /cursors/anya/ 下。
 *
 * 两层设计:
 *   1. 下面每条规则里 var() 的第二参数是「静态兜底」——JS 未加载时也能看到
 *      动画第 0 帧的阿尼亚光标;
 *   2. anya-cursor.js 加载后,按 .ani 的原始帧率往 :root 上写
 *      --anya-cursor-<state> 变量,实现逐帧动画;尊重"减少动态效果"设置,
 *      该设置下永远停留在静态第 0 帧。
 *
 * 全部加 !important:主题各处散落的 cursor: pointer/default 都要被接管,
 * cursor 是纯装饰属性,用 !important 不会影响任何布局与交互。
 * 触屏设备没有指针,anya-cursor.js 会直接不启用,CSS 这边也无副作用。
 *
 * 注意:iframe(如 B 站/YouTube 播放器)内部属于另一个文档,鼠标指针
 * 无法从外部接管,会显示原指针,这是所有自定义光标方案的共同限制。
 */

:root,
html {
  cursor: var(--anya-cursor-normal, url("/cursors/anya/normal/0.png") 0 0), auto !important;
}

/* 可点击元素:手指 */
a,
button,
[role="button"],
.btn,
label,
select,
summary,
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
.clickable,
/* 轮播图视口:点击可打开图片查看器 */
.carousel-viewport {
  cursor: var(--anya-cursor-link, url("/cursors/anya/link/0.png") 0 0), pointer !important;
}

/* 可编辑文本:I 形 */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
[contenteditable="true"],
[contenteditable=""] {
  cursor: var(--anya-cursor-text, url("/cursors/anya/text/0.png") 6 16), text !important;
}

/* 等待 / 后台运行 */
[aria-busy="true"] {
  cursor: var(--anya-cursor-busy, url("/cursors/anya/busy/0.png") 1 1), wait !important;
}

/* 不可用 */
[disabled],
[aria-disabled="true"] {
  cursor: var(--anya-cursor-unavailable, url("/cursors/anya/unavailable/0.png") 1 1), not-allowed !important;
}

/* 帮助 */
[data-cursor="help"] {
  cursor: var(--anya-cursor-help, url("/cursors/anya/help/0.png") 0 0), help !important;
}

/* 移动 / 抓取 */
[draggable="true"],
[aria-grabbed="true"] {
  cursor: var(--anya-cursor-move, url("/cursors/anya/move/0.png") 16 16), move !important;
}

/* 精确定位(画布等) */
[data-cursor="crosshair"] {
  cursor: var(--anya-cursor-crosshair, url("/cursors/anya/crosshair/0.png") 6 6), crosshair !important;
}

/* 各方向调整大小 */
.ew-resize,
.col-resize {
  cursor: var(--anya-cursor-ew, url("/cursors/anya/ew/0.png") 16 16), ew-resize !important;
}
.ns-resize,
.row-resize {
  cursor: var(--anya-cursor-ns, url("/cursors/anya/ns/0.png") 16 16), ns-resize !important;
}
.nwse-resize {
  cursor: var(--anya-cursor-nwse, url("/cursors/anya/nwse/0.png") 16 16), nwse-resize !important;
}
.nesw-resize {
  cursor: var(--anya-cursor-nesw, url("/cursors/anya/nesw/0.png") 16 16), nesw-resize !important;
}
