/* ===== v11.3 — one source of truth for token lift (rings can never drift off the oval again) + Humble veil ===== */

/* ---- 1. Selection / ready / target rings ----
   Root cause of the "big offset circle": the hover rule moved .tbody to (-8px, 1.07) while the ring (::after) was still moved to the
   SELECTED pose (-24px, 1.17) – or the other way round – because body and ring each had their own hover/sel rules with different specificity
   (and the reticle keyframes replaced the ring's transform altogether). Now .tbody, and every ring on the token root, read the SAME variables.
   Priority (highest wins): selected/lifted > attack source > braced > targetable hover > ready hover > rest. */
.tok{--ly:0px;--ls:1;--ins:2px;isolation:isolate}   /* ring sits 2px outside the token's own oval frame (.tring, 112x128) */
.tok .tbody{transform:translateY(var(--ly)) scale(var(--ls))}
.tok.tok.tok.tok::after{inset:calc(var(--ins) * -1);border-radius:50%;z-index:-1;transform:translateY(var(--ly)) scale(var(--ls));transform-origin:50% calc(96px + var(--ins))}   /* z -1: the ring is always UNDER its own token (never across badges / name plate) */
.tok.tok.tok.tok::after,.tok .tbody{transition:transform .2s cubic-bezier(.2,.8,.3,1.15),opacity .25s,box-shadow .25s}
.tok.mine.ready:hover{--ly:-8px;--ls:1.07}
.tok.targetable{--ins:4px}
.tok.targetable.targetable:hover{--ly:-6px;--ls:1.08}
.tok.braced.braced.braced.braced{--ly:0px;--ls:.97}
.tok.hl-src.hl-src.hl-src.hl-src.hl-src.hl-src,.tok.hl-dst.hl-dst.hl-dst.hl-dst.hl-dst.hl-dst{--ins:3px}
.tok.hl-src.hl-src.hl-src.hl-src.hl-src.hl-src{--ly:-12px;--ls:1.09}
.tok.sel.sel.sel.sel.sel.sel.sel,.tok.lifted.lifted.lifted.lifted.lifted.lifted.lifted{--ly:-24px;--ls:1.17;--ins:2px}
/* the selection glow: a tight, token-hugging halo (the old 34px/6px spread read as a second, bigger circle) */
.tok.tok.sel.sel::after{animation:none!important;opacity:1;box-shadow:0 0 0 2px #fff0b8,0 0 14px 3px rgba(255,208,100,.85)!important}
.tok.sel,.tok.lifted{z-index:5}

/* ---- 2. HUMBLE: a pearl-silver mist veil (clearly NOT the gold Blessed bubble) ---- */
.tok .tname,.tok .stat,.tok .zz{z-index:2}
.tok .hveil{position:absolute;inset:0;border-radius:50%;pointer-events:none;z-index:1;overflow:hidden;-webkit-mask-image:radial-gradient(ellipse at 50% 50%,#000 58%,rgba(0,0,0,.65) 78%,rgba(0,0,0,.15) 96%);mask-image:radial-gradient(ellipse at 50% 50%,#000 58%,rgba(0,0,0,.65) 78%,rgba(0,0,0,.15) 96%);
  background:radial-gradient(ellipse at 50% 38%,rgba(226,238,250,.30) 0,rgba(196,214,236,.34) 48%,rgba(160,184,214,.46) 78%,rgba(214,228,246,.52) 100%);animation:hvBreath 3.6s ease-in-out infinite}
.tok .hveil::before,.tok .hveil::after{content:"";position:absolute;inset:-30% -40%;pointer-events:none}
.tok .hveil::before{background:radial-gradient(ellipse 46% 30% at 30% 62%,rgba(240,248,255,.62),transparent 70%),radial-gradient(ellipse 40% 26% at 72% 30%,rgba(224,236,252,.5),transparent 70%);animation:hvMist 7s ease-in-out infinite alternate}
.tok .hveil::after{background:radial-gradient(ellipse 52% 28% at 66% 76%,rgba(230,242,255,.5),transparent 72%),radial-gradient(ellipse 34% 24% at 20% 28%,rgba(250,252,255,.42),transparent 70%);animation:hvMist2 9s ease-in-out infinite alternate}
.tok .hveil .hv-s{position:absolute;top:-10%;bottom:-10%;left:-40%;width:34%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.62) 50%,transparent);transform:skewX(-18deg) translateX(0);animation:hvSweep 5.2s ease-in-out infinite;opacity:.0}
.tok .hveil u{position:absolute;display:block;width:3px;height:3px;border-radius:50%;background:radial-gradient(circle,#fff,rgba(214,232,255,.9) 45%,rgba(190,214,245,0) 72%);box-shadow:0 0 6px 2px rgba(214,232,255,.85);bottom:12%;opacity:0;animation:hvMote 4.4s ease-in-out infinite}
.tok .hveil u:nth-of-type(1){left:22%;animation-delay:0s}.tok .hveil u:nth-of-type(2){left:40%;animation-delay:-1.1s;width:2px;height:2px}.tok .hveil u:nth-of-type(3){left:58%;animation-delay:-2.2s}
.tok .hveil u:nth-of-type(4){left:74%;animation-delay:-.6s;width:2px;height:2px}.tok .hveil u:nth-of-type(5){left:32%;animation-delay:-3.1s;width:2px;height:2px}.tok .hveil u:nth-of-type(6){left:66%;animation-delay:-3.7s}
/* the picture under the veil: hazier, paler, slightly cool – plainly "not quite there" */
.tok.humble .tart .pic{filter:saturate(.5) brightness(1.05) contrast(.88) sepia(.12) hue-rotate(168deg) blur(.35px)}
.tok.humble{opacity:1}
/* a soft pearl halo on the token root (not a ring; no hard edge, so it never reads as the Blessed bubble or the select ring) */
.tok.humble:not(.blessed)::before{content:"";position:absolute;inset:-1px;border-radius:50%;pointer-events:none;box-shadow:0 0 16px 4px rgba(190,214,245,.6),0 0 34px 8px rgba(170,196,232,.28);z-index:0;transform:translateY(var(--ly)) scale(var(--ls));transform-origin:50% 96px;transition:transform .2s cubic-bezier(.2,.8,.3,1.15)}
@keyframes hvBreath{0%,100%{opacity:.78}50%{opacity:1}}
@keyframes hvMist{0%{transform:translate3d(-7%,3%,0) scale(1)}100%{transform:translate3d(8%,-4%,0) scale(1.08)}}
@keyframes hvMist2{0%{transform:translate3d(6%,-2%,0) scale(1.05)}100%{transform:translate3d(-9%,4%,0) scale(1)}}
@keyframes hvSweep{0%,38%{transform:skewX(-18deg) translateX(0);opacity:0}48%{opacity:.85}70%,100%{transform:skewX(-18deg) translateX(520%);opacity:0}}
@keyframes hvMote{0%{transform:translate3d(0,0,0) scale(.6);opacity:0}18%{opacity:.95}60%{opacity:.7}100%{transform:translate3d(6px,-84px,0) scale(1);opacity:0}}

/* ---- Humble lost (after challenging): the mist lifts away in a soft ring of motes, the picture warms back to full colour ---- */
.tok .hveil-out{position:absolute;inset:0;border-radius:50%;pointer-events:none;z-index:3;
  background:radial-gradient(ellipse at 50% 42%,rgba(232,242,255,.55) 0,rgba(196,214,238,.55) 55%,rgba(220,234,252,.6) 100%);
  -webkit-mask-image:radial-gradient(ellipse at 50% 50%,#000 58%,rgba(0,0,0,.6) 80%,transparent 98%);mask-image:radial-gradient(ellipse at 50% 50%,#000 58%,rgba(0,0,0,.6) 80%,transparent 98%);
  animation:hvLift 1.25s cubic-bezier(.3,.6,.3,1) var(--ud,0ms) both}
.tok .hveil-out::before{content:"";position:absolute;inset:-4%;border-radius:50%;box-shadow:0 0 0 2px rgba(240,248,255,.9),0 0 22px 6px rgba(205,226,252,.75);animation:hvFlare 1.05s ease-out var(--ud,0ms) both}
.tok .hveil-out u{position:absolute;display:block;width:4px;height:4px;border-radius:50%;background:radial-gradient(circle,#fff,rgba(210,230,255,.9) 50%,rgba(190,214,245,0) 75%);box-shadow:0 0 7px 2px rgba(214,232,255,.9);left:50%;top:50%;opacity:0;animation:hvBurst 1.2s ease-out var(--ud,0ms) both}
.tok .hveil-out u:nth-of-type(1){--dx:-44px;--dy:-58px}.tok .hveil-out u:nth-of-type(2){--dx:-18px;--dy:-78px}.tok .hveil-out u:nth-of-type(3){--dx:16px;--dy:-72px}
.tok .hveil-out u:nth-of-type(4){--dx:44px;--dy:-50px}.tok .hveil-out u:nth-of-type(5){--dx:-52px;--dy:-14px}.tok .hveil-out u:nth-of-type(6){--dx:50px;--dy:-10px}
.tok .hveil-out u:nth-of-type(7){--dx:-30px;--dy:-38px}.tok .hveil-out u:nth-of-type(8){--dx:30px;--dy:-34px}
.tok.unveil .tart .pic{animation:hvColour 1.2s ease-out var(--ud,0ms) both}
@keyframes hvLift{0%{opacity:1;transform:scale(1)}55%{opacity:.55;transform:scale(1.12) translateY(-4px)}100%{opacity:0;transform:scale(1.3) translateY(-12px)}}
@keyframes hvFlare{0%{opacity:.95;transform:scale(.9)}100%{opacity:0;transform:scale(1.4)}}
@keyframes hvBurst{0%{opacity:0;transform:translate3d(-50%,-50%,0) scale(.5)}20%{opacity:1}100%{opacity:0;transform:translate3d(calc(-50% + var(--dx)),calc(-50% + var(--dy)),0) scale(1.1)}}
@keyframes hvColour{0%{filter:saturate(.5) brightness(1.05) contrast(.88) sepia(.12) hue-rotate(168deg) blur(.35px)}100%{filter:none}}
@media (prefers-reduced-motion:reduce){.tok .hveil,.tok .hveil::before,.tok .hveil::after,.tok .hveil .hv-s,.tok .hveil u{animation:none!important}.tok .hveil u{opacity:.7}.tok .hveil-out{animation-duration:.01s!important}.tok .hveil-out::before,.tok .hveil-out u{display:none}}
