/* Magina V3. Decorative layers are silent and never intercept card controls. */
.mgc-field,.mgc-status{position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:5;isolation:isolate}
.mgc-field{--mgc-level:0;transition:opacity .35s;overflow:visible}
.magina-casting>.mgc-field{opacity:.12}
.magina-casting>.mgc-field.mgc-level-up{opacity:.8}
.mgc-aura{position:absolute;inset:9% -12% 22%;border-radius:50%;background:radial-gradient(ellipse,transparent 34%,color-mix(in srgb,var(--mgc-primary) 15%,transparent) 58%,transparent 74%);animation:mgc-breathe 5s ease-in-out infinite}
/* Two small, horizontal metal rings travel around the card on a wide, flat
   ellipse. The far half fades behind the portrait instead of covering it. */
.mgc-orbits{position:absolute;left:-1%;right:-1%;top:40%;height:20%;overflow:visible}
.mgc-orbit{--mgc-start:0%;position:absolute;left:0;top:0;width:clamp(40px,22%,66px);aspect-ratio:2.5;box-sizing:border-box;border:3px solid var(--mgc-metal);border-left-color:var(--mgc-shade);border-bottom-color:var(--mgc-light);border-radius:50%;box-shadow:inset 0 0 3px var(--mgc-dark),0 0 9px color-mix(in srgb,var(--mgc-primary) 65%,transparent);offset-path:ellipse(50% 50% at 50% 50%);offset-anchor:center;offset-rotate:0deg;offset-distance:var(--mgc-start);animation:mgc-orbit calc(12s - var(--mgc-level)*2s) linear infinite,mgc-orbit-depth calc(12s - var(--mgc-level)*2s) linear infinite}
.mgc-orbit:nth-child(2){--mgc-start:50%;animation-direction:reverse,normal}
.mgc-orbit::before{content:"";position:absolute;inset:3px;border:1px solid var(--mgc-secondary);border-left-color:transparent;border-right-color:transparent;border-radius:50%;filter:drop-shadow(0 0 4px var(--mgc-secondary))}
.mgc-orbit::after{content:"";position:absolute;left:50%;top:0;width:8px;height:8px;transform:translate(-50%,-50%);background:var(--mgc-light);clip-path:polygon(50% 0,62% 36%,100% 50%,62% 62%,50% 100%,36% 62%,0 50%,36% 36%)}
.mgc-field[data-level="2"] .mgc-orbit{box-shadow:0 0 13px var(--mgc-primary),inset 0 0 4px var(--mgc-secondary)}
.mgc-particles{position:absolute;inset:5% -11% 26%;opacity:.82}
.mgc-motif{position:absolute;width:23px;height:23px;left:calc(50% - 11px);top:calc(50% - 11px);overflow:visible;fill:var(--mgc-primary);stroke:var(--mgc-light);stroke-width:1.4;transform:rotate(var(--a)) translateY(-88px) rotate(calc(-1*var(--a)));filter:drop-shadow(0 0 4px var(--mgc-primary));animation:mgc-motif 8s ease-in-out infinite;animation-delay:calc(var(--i)*-.7s)}
.mgc-field[data-theme="mese"] .mgc-motif:nth-child(3n){fill:var(--mgc-metal)}
.mgc-field[data-theme="mese"] .mgc-motif:nth-child(3n+2){stroke:var(--mgc-secondary)}
.mgc-field[data-level="0"] .mgc-motif:nth-child(n+5){display:none}
.mgc-charge{position:absolute;right:4%;top:21%;display:flex;gap:5px;opacity:0}
.mgc-field[data-level="2"] .mgc-charge{opacity:1}
.mgc-charge i{display:block;width:7px;height:7px;border:1px solid var(--mgc-metal);border-radius:50%;background:var(--mgc-dark)}
.mgc-charge i.is-lit{background:var(--mgc-light);box-shadow:0 0 8px var(--mgc-primary)}
.mgc-field[data-theme="mese"] .mgc-charge i{border-radius:0;clip-path:polygon(50% 0,62% 34%,100% 38%,72% 61%,82% 100%,50% 78%,18% 100%,28% 61%,0 38%,38% 34%)}
.mgc-level-wave{position:absolute;left:-10%;top:8%;width:120%;height:63%;border:3px solid var(--mgc-secondary);border-radius:50%;opacity:0;box-shadow:0 0 25px var(--mgc-primary)}
.mgc-level-up .mgc-level-wave{animation:mgc-level-rise 1.6s ease-out both}
.mgc-level-up .mgc-orbits{animation:mgc-polarize 1.5s ease-in-out}
.mgc-status{z-index:6;overflow:visible}
.mgc-state{position:absolute;inset:9% -8% 26%;pointer-events:none}
.mgc-state>.mgc-motif{width:18px;height:18px;opacity:.65;transform:rotate(var(--a)) translateY(-67px) rotate(calc(-1*var(--a)))}
.mgc-bind>i{position:absolute;inset:20% -3% 25%;border:5px solid var(--mgc-metal);border-top-color:var(--mgc-shade);border-bottom-color:var(--mgc-light);border-radius:50%;box-shadow:0 0 9px var(--mgc-primary),inset 0 0 5px var(--mgc-secondary);transform:rotate(-28deg) scaleY(.57);animation:mgc-lock-breathe 4s ease-in-out infinite}
.mgc-bind>i:nth-child(2){transform:rotate(35deg) scaleY(.6);animation-delay:-1.8s}
.mgc-bind>i:nth-child(3){transform:rotate(90deg) scaleY(.5)}
.mgc-bind:not([data-level="2"])>i:nth-child(3){display:none}
.mgc-shock>i{position:absolute;left:8%;top:25%;height:27%;width:8px;background:var(--mgc-secondary);clip-path:polygon(60% 0,100% 0,55% 42%,100% 40%,0 100%,30% 55%,0 58%);opacity:.65;filter:drop-shadow(0 0 5px var(--mgc-primary));animation:mgc-shock-idle 3.7s ease-in-out infinite}
.mgc-shock>i:nth-child(2){left:auto;right:9%;top:35%;animation-delay:-1.4s}
.mgc-shock>i:nth-child(3){left:48%;top:7%;height:15%;transform:rotate(70deg);animation-delay:-2.2s}
.mgc-slow>i,.mgc-speed>i{position:absolute;left:9%;right:9%;bottom:9%;height:20%;border-bottom:2px solid var(--mgc-secondary);border-radius:50%;transform:rotate(-12deg);opacity:.65}
.mgc-slow>i:nth-child(2),.mgc-speed>i:nth-child(2){bottom:3%;left:17%;right:17%}
.mgc-slow>i:nth-child(3),.mgc-speed>i:nth-child(3){bottom:-3%;left:25%;right:25%}
.mgc-speed>i{animation:mgc-speed-flow 1.8s ease-out infinite}
.mgc-speed>i:nth-child(2){animation-delay:.3s}.mgc-speed>i:nth-child(3){animation-delay:.6s}
.mgc-shred>i{position:absolute;inset:10%;border:2px solid transparent;border-left-color:var(--mgc-primary);border-right-color:var(--mgc-secondary);border-radius:50%;transform:rotate(25deg);opacity:.65}
.mgc-shred>i:nth-child(2){inset:16%;transform:rotate(-20deg)}.mgc-shred>i:nth-child(3){display:none}
.mgc-tick .mgc-bind>i{animation:mgc-lock-tick .8s ease-out}
.mgc-tick .mgc-shock>i{animation:mgc-shock-tick .8s ease-out}
.v3-vfx-disabled .mgc-field,.v3-vfx-disabled .mgc-status{display:none}
/* Glam Spy jewelry shares both base-ring orbit animations and their depth.
   Only the ring artwork changes; no extra portrait aura or particles. */
.mgc-orbit.mgc-spy-orbit{aspect-ratio:2;border:0;border-radius:0;box-shadow:none;filter:drop-shadow(0 1px 2px #302c3a88)}
.mgc-spy-orbit svg{display:block;width:100%;height:100%;overflow:visible}
.mgc-spy-orbit::before,.mgc-spy-orbit::after{display:none}
.mgc-field[data-theme="divatkem"] .mgc-charge{top:74%;right:5%;gap:3px}
.mgc-field[data-theme="divatkem"] .mgc-charge i{width:5px;height:5px;box-shadow:none}
.mgc-field[data-theme="divatkem"][data-level="2"] .mgc-spy-orbit{box-shadow:none;filter:drop-shadow(0 0 3px #6dc4ff88)}
.mgc-state[data-theme="divatkem"]{inset:0}
.mgc-state[data-theme="divatkem"]>.mgc-motif{display:none}
.mgc-bind[data-theme="divatkem"]>i{inset:auto;left:23%;top:64%;width:54%;height:10%;border-width:2px;transform:rotate(0);box-shadow:0 0 3px #6dc4ff66;animation:none}
.mgc-bind[data-theme="divatkem"]>i:nth-child(n+2){display:none}
.mgc-bind[data-theme="divatkem"]>i:first-child::after{content:"";position:absolute;right:-4px;top:1px;width:7px;height:7px;border:1px solid #8c7d93;border-radius:3px;background:#6dc4ff}
.mgc-shock[data-theme="divatkem"]>i{left:5%;top:61%;width:5px;height:12%;filter:none;opacity:.65}
.mgc-shock[data-theme="divatkem"]>i:nth-child(n+2){display:none}
.mgc-slow[data-theme="divatkem"]>i,.mgc-speed[data-theme="divatkem"]>i{bottom:17%;left:30%;right:30%;height:7%;border-width:1px;opacity:.45}
.mgc-slow[data-theme="divatkem"]>i:nth-child(n+2),.mgc-speed[data-theme="divatkem"]>i:nth-child(n+2){display:none}
.mgc-shred[data-theme="divatkem"]>i{inset:63% 4% 25%;transform:none;border-width:1px;border-radius:3px;opacity:.5}
.mgc-shred[data-theme="divatkem"]>i:nth-child(n+2){display:none}
.mgc-tick .mgc-bind[data-theme="divatkem"]>i{animation:mgc-spy-tick .5s ease-out}
@keyframes mgc-spy-tick{50%{border-color:#6dc4ff;box-shadow:0 0 4px #6dc4ff88}}
/* Holographic rings and persistent debuffs retain the source skin snapshot. */
.mgc-field[data-theme="cyber"] .mgc-aura{background:repeating-linear-gradient(0deg,transparent 0 6px,#FBBDFB0d 7px 8px),radial-gradient(ellipse,#852DAC33,transparent 70%);border:1px solid #7670C333;border-radius:14%}
.mgc-field[data-theme="cyber"] .mgc-orbit{border-style:dashed;border-color:#FBBDFB #7670C3 #852DAC;border-width:2px;box-shadow:0 0 7px #FBBDFB88,inset 0 0 5px #852DAC}
.mgc-field[data-theme="cyber"] .mgc-orbit::after{border-radius:1px;clip-path:none;background:#FBBDFB;box-shadow:0 0 6px #FBBDFB}
.mgc-field[data-theme="cyber"] .mgc-charge i{border-radius:1px;border-color:#7670C3;background:#482C6A}
.mgc-field[data-theme="cyber"] .mgc-charge i.is-lit{background:#FBBDFB;box-shadow:0 0 9px #852DAC}
.mgc-field[data-theme="cyber"] .mgc-level-wave{border-radius:12%;border-style:dashed;border-color:#FBBDFB;box-shadow:0 0 22px #852DAC}
.mgc-field[data-theme="cyber"] .mgc-motif,.mgc-state[data-theme="cyber"]>.mgc-motif{fill:#58419B55;stroke:#FBBDFB;stroke-width:1.7;filter:drop-shadow(0 0 3px #852DAC)}
.mgc-bind[data-theme="cyber"]>i{border-style:dashed;border-width:2px;border-radius:8%;border-color:#FBBDFB;box-shadow:0 0 7px #852DAC,inset 0 0 8px #7670C3;transform:rotate(-14deg) scaleY(.7)}
.mgc-bind[data-theme="cyber"]>i:nth-child(2){transform:rotate(14deg) scaleY(.7)}
.mgc-bind[data-theme="cyber"]>i:nth-child(3){transform:rotate(90deg) scaleY(.65)}
.mgc-shock[data-theme="cyber"]>i{width:10px;clip-path:polygon(0 0,35% 0,35% 38%,100% 38%,100% 100%,65% 100%,65% 62%,0 62%);background:#FBBDFB;filter:drop-shadow(0 0 4px #852DAC)}
.mgc-slow[data-theme="cyber"]>i,.mgc-speed[data-theme="cyber"]>i{border-radius:0;border-style:dashed;border-color:#7670C3}
.mgc-shred[data-theme="cyber"]>i{border-radius:8%;border-style:dashed;border-color:#FBBDFB transparent;box-shadow:0 0 5px #852DAC55}
@keyframes mgc-breathe{50%{opacity:.48;transform:scale(.94)}}
@keyframes mgc-orbit{from{offset-distance:var(--mgc-start)}to{offset-distance:calc(var(--mgc-start) + 100%)}}
@keyframes mgc-orbit-depth{0%,50%,100%{opacity:.85;scale:.9}25%{opacity:1;scale:1.08}65%,85%{opacity:.18;scale:.78}75%{opacity:0;scale:.72}}
@keyframes mgc-motif{0%,100%{translate:0 0;opacity:.55}50%{translate:3px -8px;opacity:.95}}
@keyframes mgc-level-rise{0%{opacity:0;scale:.3}28%{opacity:1;scale:.9}100%{opacity:0;scale:1.65}}
@keyframes mgc-polarize{0%{scale:1}35%{scale:1.08}65%{scale:1.02}100%{scale:1}}
@keyframes mgc-lock-breathe{50%{filter:brightness(1.25)}}
@keyframes mgc-lock-tick{0%,100%{filter:brightness(1);scale:1}28%{filter:brightness(2.3);scale:.9}60%{filter:brightness(1.5);scale:.96}}
@keyframes mgc-shock-idle{50%{opacity:.25}}
@keyframes mgc-shock-tick{0%{opacity:.2}25%{opacity:1;filter:drop-shadow(0 0 12px var(--mgc-light))}100%{opacity:.6}}
@keyframes mgc-speed-flow{0%{translate:-8px 8px;opacity:0}30%{opacity:.8}100%{translate:10px -12px;opacity:0}}
@media(max-width:650px){.mgc-motif{width:17px;height:17px;transform:rotate(var(--a)) translateY(-66px) rotate(calc(-1*var(--a)))}.mgc-orbit{border-width:3px}}
@media(prefers-reduced-motion:reduce){.mgc-field *,.mgc-status *{animation:none!important}.mgc-particles{display:none}.mgc-field{opacity:.4}.mgc-status{opacity:.65}}
