/* v3.3b rim light (beam.js adds .rim over the frame): after the hit, the light wraps the frame's whole rounded border.
   One radial gradient centred on the hit (--hx, set by beam.js) lights the 1px border ring; a blurred copy is the few-px bloom. */
.rim{position:absolute;z-index:4;left:var(--rl);top:var(--rt);width:var(--rw);height:var(--rh);pointer-events:none;mix-blend-mode:screen;--g:radial-gradient(circle at var(--hx,70%) 0,#ffb46e,#fff calc(var(--rh) * .12),rgba(214,224,255,.88) calc(var(--rh) * .32),rgba(140,165,255,.46) calc(var(--rh) * .62),rgba(100,130,255,.14) calc(var(--rh) * .95),rgba(100,130,255,.03) calc(var(--rh) * 1.3),transparent calc(var(--rh) * 1.6))}
.rim:before,.rim i:before{content:"";position:absolute;inset:0;padding:1px;border-radius:var(--rr);background:var(--g);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.rim i{position:absolute;inset:-2px;filter:blur(3px);opacity:.85;animation:rimb 3.2s ease-in-out infinite alternate}
.rim i:before{padding:4px;border-radius:calc(var(--rr) + 2px)}
@keyframes rimb{to{opacity:.55}}
.stagewrap:not(.lit) .rim i{animation-play-state:paused}
html.a11y-rm .rim i{animation:none}
@media (prefers-reduced-motion:reduce){.rim i{animation:none}}
