/* 桌面端鼠标：颜色由 js/cursors.js 按主题写成 --pl-cursor-*；这里只把浏览器默认会丢掉的继承接回变量。 */
@media (any-hover: hover) and (any-pointer: fine) {
  html,
  body {
    cursor: var(--pl-cursor-default, default);
  }

  /* UA 的 a:-webkit-any-link { cursor:pointer } 是元素声明，会盖过 body 的继承 */
  a[href],
  area[href] {
    cursor: var(--pl-cursor-pointer, pointer);
  }

  /* 原生控件的 UA 声明会盖过继承（实测 btn 的 computed 是系统 default），逐个接回 */
  button,
  select,
  summary,
  [role="button"],
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  input[type="checkbox"],
  input[type="radio"] {
    cursor: var(--pl-cursor-pointer, pointer);
  }

  button:disabled,
  [aria-disabled="true"] {
    cursor: var(--pl-cursor-default, default);
  }

  /* 文本控件与可编辑区：cursor:auto 的 I 形随继承失效，显式要回 */
  textarea,
  input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="image"]),
  [contenteditable="true"],
  [contenteditable=""],
  [contenteditable="plaintext-only"] {
    cursor: var(--pl-cursor-text, text);
  }

  /* 只读长文：整块给文字光标，里面的按钮自有 pointer 声明 */
  .msg-bubble,
  .thinking-content,
  .tool-result-text,
  .tool-call-json,
  .memory-book-reader,
  .atref-preview-text {
    cursor: var(--pl-cursor-text, text);
  }

  .msg-bubble img,
  .msg-bubble video,
  .memory-book-reader img {
    cursor: var(--pl-cursor-default, default);
  }

  .pl-cursor-pointer {
    cursor: var(--pl-cursor-pointer, pointer);
  }
}
