/* 星玥未眠 · 全站界面增强：自定义滚动条 + 自定义光标
 * 所有页面（含服务端生成的分享页）在 </head> 前引入本文件。
 * 注意：滚动条核心属性带 !important，页面内零散的 ::-webkit-scrollbar 规则不会把它撑粗或改色。
 */

/* ===== 1. 滚动条 =====
 * 页面级：隐藏浏览器原生滚动条，改由 ui-enhance.js 在右侧画一条悬浮的极细滑块（覆盖层，不占布局宽度）。
 * 容器级：面板内部统一 5px 圆角细条，画在面板自己的 padding 盒里，不会溢出到面板外。
 */
html {
  scrollbar-width: none !important;
  overflow-y: scroll;
  scrollbar-gutter: auto;
}
html::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
body {
  scrollbar-width: none !important;
}
body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

/* 容器内滚动条 */
html *:not(html):not(body) {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(224, 128, 160, .5) transparent !important;
}
html *:not(html):not(body)::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
  background: transparent !important;
}
html *:not(html):not(body)::-webkit-scrollbar-track,
html *:not(html):not(body)::-webkit-scrollbar-corner {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
html *:not(html):not(body)::-webkit-scrollbar-thumb {
  background: rgba(224, 128, 160, .45) !important;
  border: none !important;
  border-radius: 999px !important;
  min-height: 26px;
  min-width: 26px;
}
html *:not(html):not(body)::-webkit-scrollbar-thumb:hover {
  background: rgba(216, 96, 128, .82) !important;
}
html *:not(html):not(body)::-webkit-scrollbar-thumb:active {
  background: rgba(198, 70, 102, .95) !important;
}
/* 深色主题：粉色调亮，避免糊在暗背景里 */
html.admin-theme-dark *::-webkit-scrollbar-thumb,
html.theme-dark *::-webkit-scrollbar-thumb {
  background: rgba(232, 148, 178, .5) !important;
}
html.admin-theme-dark *::-webkit-scrollbar-thumb:hover,
html.theme-dark *::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 168, 196, .88) !important;
}
/* 横向标签栏：直接不显示滚动条，靠左右箭头/拖拽 */
.tabs, .landing-edit-bar, .chips {
  scrollbar-width: none !important;
}
.tabs::-webkit-scrollbar,
.landing-edit-bar::-webkit-scrollbar,
.chips::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ===== 2. 页面级悬浮滚动条（由 ui-enhance.js 生成） ===== */
#xySbThumb {
  position: fixed;
  top: 0;
  right: 2px;
  width: 4px;
  border-radius: 999px;
  background: rgba(224, 128, 160, .55);
  opacity: 0;
  transition: opacity .22s ease, background .15s ease;
  z-index: 2147483000;
  pointer-events: auto;
  cursor: default;
  will-change: top, height, opacity;
}
#xySbThumb.on {
  opacity: 1;
}
#xySbThumb:hover,
#xySbThumb.drag {
  background: rgba(214, 96, 130, .85);
  width: 6px;
}
html.admin-theme-dark #xySbThumb,
html.theme-dark #xySbThumb {
  background: rgba(236, 158, 186, .55);
}
html.admin-theme-dark #xySbThumb:hover,
html.theme-dark #xySbThumb:hover {
  background: rgba(246, 178, 204, .9);
}
/* ===== 3. 自定义光标（源自「Ori 鼠标光标 2.0」，32×32 PNG + 原始热点） =====
 * 页面里散落的 .xxx{cursor:pointer} 优先级可能更高，所以这里用 html body :is(...) + !important；
 * 动态渲染的元素由 ui-enhance.js 在 mouseover 时写内联 !important 兜底。
 */

/* 用 :not(#xyc) 提权到 id 级别：页面里 .modal-box .btn{cursor:pointer!important} 这类规则
 * 虽然是 class 级 + !important，也会被这里的 id 级 !important 压住，避免局部回落系统指针。 */
html:not(#xyc) { cursor: url('/cur/default.png?v=3') 0 0, auto !important; }
body:not(#xyc) { cursor: url('/cur/default.png?v=3') 0 0, auto !important; }

a:not(#xyc), area:not(#xyc), button:not(#xyc), label:not(#xyc), select:not(#xyc), option:not(#xyc), summary:not(#xyc),
[role="button"]:not(#xyc), [onclick]:not(#xyc), [role="tab"]:not(#xyc), [role="option"]:not(#xyc), [role="menuitem"]:not(#xyc),
input[type="submit"]:not(#xyc), input[type="button"]:not(#xyc), input[type="reset"]:not(#xyc),
input[type="checkbox"]:not(#xyc), input[type="radio"]:not(#xyc), input[type="file"]:not(#xyc),
input[type="color"]:not(#xyc), input[type="range"]:not(#xyc), input[type="image"]:not(#xyc),
.cursor-pointer:not(#xyc), .clickable:not(#xyc), .click:not(#xyc) {
  cursor: url('/cur/pointer.png?v=3') 11 5, pointer !important;
}

input:not([type]):not(#xyc), input[type="text"]:not(#xyc), input[type="search"]:not(#xyc), input[type="password"]:not(#xyc),
input[type="email"]:not(#xyc), input[type="url"]:not(#xyc), input[type="tel"]:not(#xyc), input[type="number"]:not(#xyc),
input[type="date"]:not(#xyc), input[type="datetime-local"]:not(#xyc), input[type="time"]:not(#xyc),
input[type="month"]:not(#xyc), input[type="week"]:not(#xyc), textarea:not(#xyc),
[contenteditable="true"]:not(#xyc), [contenteditable=""]:not(#xyc) {
  cursor: url('/cur/text.png?v=3') 15 15, text !important;
}

.move:not(#xyc), .cursor-move:not(#xyc), [draggable="true"]:not(#xyc), .dragging:not(#xyc) {
  cursor: url('/cur/move.png?v=3') 15 16, move !important;
}
.cursor-crosshair:not(#xyc), .crosshair:not(#xyc) {
  cursor: url('/cur/crosshair.png?v=3') 16 16, crosshair !important;
}
.cursor-copy:not(#xyc) {
  cursor: url('/cur/copy.png?v=3') 15 4, copy !important;
}
.cursor-hand:not(#xyc), .grab:not(#xyc), .drag-handle:not(#xyc) {
  cursor: url('/cur/hand.png?v=3') 2 2, grab !important;
}
.grabbing:not(#xyc), .cursor-grabbing:not(#xyc) {
  cursor: url('/cur/hand.png?v=3') 2 2, grabbing !important;
}
.help:not(#xyc), .cursor-help:not(#xyc), [data-cursor="help"]:not(#xyc) {
  cursor: url('/cur/help.png?v=3') 1 1, help !important;
}
.cursor-ns:not(#xyc), .resize-ns:not(#xyc), [data-resize="ns"]:not(#xyc) {
  cursor: url('/cur/ns.png?v=3') 16 15, ns-resize !important;
}
.cursor-ew:not(#xyc), .resize-ew:not(#xyc), [data-resize="ew"]:not(#xyc) {
  cursor: url('/cur/ew.png?v=3') 15 16, ew-resize !important;
}
.cursor-nwse:not(#xyc), .resize-nwse:not(#xyc), [data-resize="nwse"]:not(#xyc) {
  cursor: url('/cur/nwse.png?v=3') 15 16, nwse-resize !important;
}
.cursor-nesw:not(#xyc), .resize-nesw:not(#xyc), [data-resize="nesw"]:not(#xyc) {
  cursor: url('/cur/nesw.png?v=3') 16 16, nesw-resize !important;
}
.busy:not(#xyc), .cursor-wait:not(#xyc), .is-busy:not(#xyc) {
  cursor: url('/cur/busy.png?v=3') 16 16, wait !important;
}
.loading:not(#xyc), .cursor-progress:not(#xyc), .is-loading:not(#xyc) {
  cursor: url('/cur/working.png?v=3') 0 0, progress !important;
}
:disabled:not(#xyc), .disabled:not(#xyc), [aria-disabled="true"]:not(#xyc), .cursor-not-allowed:not(#xyc), .not-allowed:not(#xyc) {
  cursor: url('/cur/notallowed.png?v=3') 15 15, not-allowed !important;
}

