/* DELIRA cursor: ink dot (exact hotspot) + chrome ring with a red cut notch + cobalt ribbon trail.
   Only transform/opacity animate. Shown only after the first real mouse move (html.dcur). */
html.dcur, html.dcur *:not(textarea):not(select):not([contenteditable=""]):not([contenteditable="true"]):not([contenteditable="plaintext-only"]):not([contenteditable]:not([contenteditable="false"]) *):not(input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=range]):not([type=file]):not([type=color]):not([type=image])){cursor:none !important}
/* cursor is inherited: an editable host has no UA cursor, so give it (and its children) the native one back */
html.dcur [contenteditable]:not([contenteditable="false"]),html.dcur [contenteditable]:not([contenteditable="false"]) *{cursor:auto}

#dcur{--dc-ink:#05081a;--dc-cob:#1f3bff;--dc-cut:#ff3b1f;--dc-spring:cubic-bezier(.34,1.45,.5,1);
  position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:none;
  overflow:visible;pointer-events:none;user-select:none;z-index:2147483647}
#dcur:not(:popover-open){display:block}   /* fallback when popover API is missing: plain fixed layer */
#dcur canvas{position:absolute;left:0;top:0;pointer-events:none}
#dcur canvas[hidden]{display:none}

#dcur .dc-dot,#dcur .dc-ring{position:absolute;left:0;top:0;width:0;height:0;opacity:0;transition:opacity .18s linear}
#dcur.is-on .dc-dot,#dcur.is-on .dc-ring{opacity:1}
#dcur.is-field .dc-dot,#dcur.is-field .dc-ring{opacity:0}
#dcur .dc-dot,#dcur .dc-ring{will-change:transform}

/* dot: ink core, white rim, thin ink halo -> readable on ice, cobalt, chrome and ink */
#dcur .dc-dot i{position:absolute;left:-5px;top:-5px;width:10px;height:10px;border-radius:50%;background:var(--dc-ink);
  box-shadow:0 0 0 1.5px #fff,0 0 0 2.5px rgba(5,8,26,.5);transition:transform .25s var(--dc-spring)}
#dcur .dc-dot i::after{content:"";position:absolute;inset:0;border-radius:50%;background:var(--dc-cut);opacity:0;transition:opacity .15s linear}
#dcur.is-hot .dc-dot i{transform:scale(.7)}
#dcur.is-hot .dc-dot i::after{opacity:1}
#dcur.is-down .dc-dot i{transform:scale(1.25)}
#dcur.is-down .dc-dot i::after{opacity:1}
#dcur.is-off .dc-dot i{transform:scale(.8)}

/* ring: polished chrome band + ink hairline + white rim; the red notch leads the motion */
#dcur .dc-rs{position:absolute;left:-17px;top:-17px;width:34px;height:34px;transition:transform .4s var(--dc-spring),opacity .2s linear}
#dcur .dc-rs::before{content:"";position:absolute;inset:0;border-radius:50%;background:rgba(31,59,255,.14);opacity:0;transition:opacity .2s linear}
#dcur .dc-rot{position:absolute;inset:0;border-radius:50%;border:1.25px solid var(--dc-ink);box-shadow:0 0 0 1.25px rgba(255,255,255,.95)}
#dcur .dc-rot::before{content:"";position:absolute;inset:0;border-radius:50%;
  background:conic-gradient(from 0deg,#fff 0,#a9b9ff 11%,#1f3bff 27%,#05081a 39%,#dfe6ff 51%,#fff 60%,#6d84ff 77%,#2a1fd6 90%,#fff 100%);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3.5px),#000 calc(100% - 3px));
          mask:radial-gradient(farthest-side,transparent calc(100% - 3.5px),#000 calc(100% - 3px))}
#dcur .dc-rot::after{content:"";position:absolute;left:50%;top:-5.5px;width:3px;height:9px;margin-left:-1.5px;border-radius:2px;
  background:var(--dc-cut);box-shadow:0 0 0 1px #fff}
#dcur.is-hot .dc-rs{transform:scale(1.55)}
#dcur.is-hot .dc-rs::before{opacity:1}
#dcur.is-down .dc-rs{transform:scale(.72)}
#dcur.is-hot.is-down .dc-rs{transform:scale(1.2)}
#dcur.is-off .dc-rs{transform:scale(.85);opacity:.55}
#dcur.is-off .dc-rs::before{opacity:1;background:rgba(255,59,31,.18)}

/* mono label from data-cursor */
#dcur .dc-tag{position:absolute;left:26px;top:20px;display:flex;align-items:center;gap:6px;padding:6px 9px 6px 8px;border-radius:999px;
  background:var(--dc-ink);color:#fff;font:600 11px/1 "JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;letter-spacing:.02em;white-space:nowrap;
  box-shadow:0 0 0 1px rgba(255,255,255,.85);opacity:0;transform:translate3d(-8px,-6px,0) scale(.8);transform-origin:0 0;
  transition:opacity .15s linear,transform .32s var(--dc-spring)}
#dcur .dc-tag::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--dc-cut);flex:none}
#dcur.has-tag .dc-tag{opacity:1;transform:none}
#dcur.is-flip .dc-tag{left:auto;right:26px;transform-origin:100% 0}
#dcur.is-field .dc-tag{opacity:0}

@media (prefers-reduced-motion:reduce){
  #dcur .dc-dot i,#dcur .dc-rs,#dcur .dc-tag{transition-duration:.01s}
}
