/* ============================================================
   烛心站点 · 防选中 / 防拖拽增强
   ------------------------------------------------------------
   目标：
     · 文字默认不可选中（避免误拖出蓝色选区，观感更「像 App」）
     · 图片不可拖拽、不可长按弹出菜单
     · 但以下内容必须保持【可选中】，否则影响使用：
         - 输入框 / 文本域 / 可编辑区域
         - 代码块、命令、仓库地址等需要复制的文本
         - 玩家中心、管理后台等后台类页面（要抄数据）
     实现上把「要可选中」的规则写在后面，靠 !important 收口。
   ============================================================ */

/* ---------- 全局：禁止选中与拖拽 ---------- */
html, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;          /* iOS 长按不弹菜单 */
  -webkit-tap-highlight-color: transparent;
}

/* 整站禁止拖拽（图片、链接等） */
img, a, svg, canvas, picture, video {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* 选中高亮统一成主题色（万一有漏网的） */
::selection {
  background: color-mix(in srgb, var(--accent, #e8a33d) 32%, transparent);
  color: inherit;
}
::-moz-selection {
  background: color-mix(in srgb, var(--accent, #e8a33d) 32%, transparent);
  color: inherit;
}

/* ---------- 例外：这些必须能选中 / 能编辑 ---------- */
input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""],
.is-selectable,
pre,
code,
kbd,
samp,
.qqg-num,
.rm-code,
.qt-num,
.mon-num,
.cmd-line,
.copyable {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default;
}

/* 代码块与命令再宽一点，方便整段复制 */
pre, code, .qqg-num, .rm-code, .copyable {
  -webkit-user-select: all;
  user-select: all;
}

/* 后台类页面：整体允许选中（管理/玩家中心要复制数据） */
body.admin-page,
body.player-page,
.admin-page,
.player-page {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* 输入框内仍然禁掉拖拽，避免拖动光标 */
input, textarea {
  -webkit-user-drag: none;
  user-drag: none;
}
