/* Persistent, card-attached courts. Integrity is driven by real Soul Wall data. */
.npc-court { position:absolute; left:50%; top:50%; width:calc(var(--npc-card-width,150px) + 24px); height:calc(var(--npc-card-height,220px) + 24px);
    transform:translate(-50%,-50%); pointer-events:none; z-index:2; }
.npc-court *,.npc-orbit-crest * { pointer-events:none; }
.npc-court .nm-art,.npw-scene .nm-art { position:absolute; display:block; inset:0; width:100%; height:100%; overflow:visible; }
.npc-court .nm-art circle,.npc-orbit-crest circle,.npw-scene .nm-art circle { fill:var(--nm-circle-fill,none);stroke:var(--nm-circle-stroke,#e8c88d);stroke-width:var(--nm-circle-width,1);filter:none;animation:none; }
.npc-court .nm-art .nm-scene,.npc-orbit-crest .nm-scene { animation:none; }
.npc-wall-layer { position:absolute; inset:0; opacity:calc(.06 + var(--npc-ratio,1)*.12); transition:opacity .4s; filter:none; }
.npc-integrity-trace { stroke-dasharray:calc(var(--npc-ratio,1)*100) 100; stroke-dashoffset:0; transition:stroke-dasharray .5s; }
.npc-court .nm-court-scars { opacity:0; transition:opacity .35s; }
.nekatay-court-card-fx[data-npc-wall="worn"] .nm-court-scars { opacity:.35; }
.nekatay-court-card-fx[data-npc-wall="critical"] .nm-court-scars { opacity:.8; }
.nekatay-court-card-fx[data-npc-wall="broken"] .nm-court-scars { opacity:1; }
.nekatay-court-card-fx[data-npc-wall="broken"] .npc-wall-layer { opacity:.08; }
.nekatay-court-card-fx[data-npc-wall="broken"] .npc-integrity-trace { opacity:0; }
.nekatay-court-card-fx[data-npc-wall="critical"] .npc-integrity-trace { animation:npcFailingTrace 2.7s ease-in-out infinite; }
.npc-warden { position:absolute; left:calc(50% + var(--npc-side)*43%); top:76%; width:17%; height:22%; transform:translate(-50%,-50%); opacity:.12; }
.npc-ground-seal { position:absolute; left:50%; top:89%; width:76%; height:48%; transform:translate(-50%,-50%) scaleY(.22); opacity:.08; }
.nekatay-court-card-fx.is-queen .npc-warden { opacity:.2; }
.nekatay-court-card-fx[data-tier="0"] .npc-warden { opacity:.05; }
.nekatay-court-card-fx[data-tier="0"] .npc-ground-seal { opacity:.04; }
.nekatay-court-card-fx[data-tier="0"] .npc-wall-layer :is(.nm-court-bone-lock,.nm-court-lace-knot,.nm-court-station-clasp):nth-of-type(even) { opacity:.35; }
.nekatay-court-card-fx .nekatay-orbit-souls > span > .npc-orbit-crest { position:absolute; inset:-15%; width:130%; height:130%; z-index:0; overflow:visible; opacity:.26; }
.nekatay-court-card-fx[data-npc-wall="broken"] .npc-orbit-crest { opacity:.12!important; }
.nekatay-court-card-fx.is-crowned .npc-orbit-crest { filter:none; }
.nekatay-court-card-fx:is([data-nekatay-theme="alap"],[data-nekatay-theme="sziromvihar"],[data-nekatay-theme="szellemvadaszok"]) .npc-orbit-crest { animation:npcBoneCrest 4s ease-in-out calc(var(--npc-soul-index)*-.3s) infinite alternate; }
.npc-court:is([data-skin="alap"],[data-skin="sziromvihar"],[data-skin="szellemvadaszok"]) .nm-court-bone-lock { animation:npcBoneGuard 4.5s ease-in-out calc(var(--nm-i)*-.5s) infinite alternate; }
.npc-court:is([data-skin="alap"],[data-skin="sziromvihar"],[data-skin="szellemvadaszok"]) .nm-court-ossuary-sigil { animation:npcChoirBreath 3.8s ease-in-out infinite alternate; }
.npc-court[data-skin="elegans"] .nm-court-lace-knot { animation:npcPearlBreath 3.6s ease-in-out calc(var(--nm-i)*-.35s) infinite alternate; }
.npc-court[data-skin="elegans"] .nm-court-rose-mount { animation:npcRoseSway 4.6s ease-in-out infinite alternate; }
.nekatay-court-card-fx[data-nekatay-theme="elegans"] .npc-orbit-crest { animation:npcSalonCrest 4.2s ease-in-out calc(var(--npc-soul-index)*-.3s) infinite alternate; }
.npc-court[data-skin="asztral"] .nm-court-hand { animation:npcClockTick 8s steps(12,end) infinite; }
.npc-court[data-skin="asztral"] .nm-gear { animation:npcGear 12s linear infinite; }
.nekatay-court-card-fx[data-nekatay-theme="asztral"] .nekatay-orbit-souls > span:nth-child(even) { animation-direction:reverse; }
.nekatay-court-card-fx[data-nekatay-theme="asztral"] .npc-orbit-crest { animation:npcStarCrest 7s linear infinite; }
.nekatay-court-card-fx[data-nekatay-theme="asztral"] .nekatay-orbit-souls > span:nth-child(even) .npc-orbit-crest { animation-direction:reverse; }
.nekatay-court-card-fx:is(.npc-reacting-regen,.npc-reacting-break) .npc-wall-layer { opacity:.12; }
.nekatay-court-card-fx.npc-reacting-absorb .nekatay-court-stream { animation-duration:1.7s; }
.nekatay-court-card-fx.npc-reacting-break .nekatay-court-streams { opacity:.1; }

/* Quiet idle court: leave the portrait and its UI readable at every tier.
   Parent opacity also limits bloom while a cast animates the inner stream. */
.nekatay-court-card-fx .nekatay-orbit-live .nekatay-court-streams { opacity:.28; }
.nekatay-court-card-fx .nekatay-orbit-live .nekatay-court-haze { opacity:.16; }
.nekatay-court-card-fx .nekatay-orbit-live .nekatay-court-stream { filter:none; stroke-width:1.35; }
.nekatay-court-card-fx .nekatay-orbit-live .nekatay-court-stream:nth-child(n+4) { display:none; }
.nekatay-court-card-fx .nekatay-orbit-souls > span { filter:drop-shadow(0 0 2px var(--nekatay-c1)); }
.nekatay-court-card-fx .nekatay-orbit-souls > span::before { inset:-12%; opacity:.22; background:none; box-shadow:none; border-width:1px; animation-name:npcQuietGlobe; }
.nekatay-court-card-fx .nekatay-orbit-souls > span > img { opacity:.78; filter:none; }
.nekatay-court-card-fx .nekatay-ghost-crown { width:112px; height:66px; filter:none; }
.nekatay-court-card-fx .nekatay-ghost-crown > svg { opacity:.24; }
.nekatay-court-card-fx .nekatay-ghost-crown__glow { display:none; }
.nekatay-court-card-fx .nekatay-ghost-crown__souls { opacity:.3; }
.nekatay-court-card-fx .nekatay-ghost-crown__souls img { filter:none; animation-name:npcQuietCrownSoul; }
.nekatay-court-card-fx .nekatay-ghost-crown__wisps { opacity:.2; }
.nekatay-court-card-fx .nekatay-ghost-crown__relic { width:48px; height:48px; filter:none; }
.nekatay-court-card-fx .nq-queen-aura { opacity:.16; filter:none; }
.nekatay-court-card-fx .npc-court .nm-art { filter:none; }

/* Local membrane reactions: no global arena flash, no new combat resolution. */
.npw-scene { position:fixed; inset:0; z-index:9490; overflow:hidden; pointer-events:none; isolation:isolate; }
.npw-scene * { box-sizing:border-box; pointer-events:none; }
.npw-stage,.npw-break-impact { position:absolute; transform:translate(-50%,-50%); }
.npw-stage { z-index:3; }
.npw-stage > :is(.npw-membrane,.npw-repair-frame,.npw-scars) { position:absolute; inset:0; }
.npw-scene .na-membrane-art { filter:drop-shadow(0 0 4px var(--nekatay-c1)); }
.npw-scene .na-membrane-pressure { animation:none; opacity:0; }
.npw-scene .na-membrane-art .nm-scene,.npw-scene .npc-frame-art .nm-scene { animation:none; }
.npw-scene .nk-recruited-soul > .npc-orbit-crest { inset:-35%; width:170%; height:170%; z-index:0; opacity:.8; }
.npw-scene[data-kind="regen"] .npw-membrane { opacity:0; transform-origin:50% 92%; animation:npwRepairEnvelope 2.25s ease-in-out both; }
.npw-repair-frame { animation:npwRepairFrame 2.25s ease-out both; }
.npw-repair-frame .npc-integrity-trace { animation:npwIntegrityStitch 1.3s ease-out .25s both; }
.npw-repair-frame .nm-court-scars { animation:npwHealScars 1.3s ease-out .25s both; }
.npw-repair-vessel { position:absolute; left:50%; top:71%; width:48%; height:59%; opacity:0; z-index:2; transform:translate(-50%,-50%); animation:npwRepairVessel 1.85s ease-in-out .08s both; }
.npw-repair-seal { position:absolute; left:50%; top:87%; width:100%; height:84%; opacity:0; transform:translate(-50%,-50%); animation:npwRepairSeal 1.9s ease-out .12s both; }
.npw-repair-seed { position:absolute; left:0; top:0; width:23px; height:28px; offset-anchor:center; offset-rotate:0deg; opacity:0; z-index:6;
    animation:npwRepairSeed 1s cubic-bezier(.2,.6,.35,1) var(--npw-seed-at) both; }
.npw-label { position:absolute; left:50%; top:96%; width:max-content; max-width:190%; transform:translateX(-50%); text-align:center; color:var(--nekatay-c4);
    font:700 clamp(9px,.9vw,12px)/1.3 Outfit,sans-serif; text-shadow:0 0 6px var(--nekatay-c1); opacity:0; z-index:10; animation:npwValue 1.45s ease-out .7s both; }
.npw-bar-repair .v3-hp-rune-shield-fill { animation:npwBarRepair 1.7s ease-out both; }
.npw-scene[data-kind="gain"] .npw-label { animation-delay:.5s; animation-duration:1.05s; }
.npw-scene[data-kind="gain"] .npw-repair-vessel { animation-duration:1.6s; }
.npw-scene[data-kind="gain"] .npw-repair-seal { animation-duration:1.55s; }
.npw-scene[data-kind="absorb"] .npw-membrane { animation:npwAbsorbMembrane .95s ease-out both; }
.npw-scene[data-kind="absorb"] .npw-membrane { filter:brightness(calc(1 + var(--npw-strength,.2)*.5)); }
.npw-scars { opacity:0; }
.npw-scars .nm-court-scars { opacity:1; }
.npw-scene[data-kind="absorb"] .npw-scars { animation:npwDamageScars .9s ease-out both; }
.npw-scene[data-kind="break"] .npw-membrane { animation:npwBreakMembrane .6s ease-in both; }
.npw-scene[data-kind="break"] .npw-scars { animation:npwBreakScars .7s ease-out both; }
.npw-fragment { position:absolute; left:50%; top:50%; width:32px; height:43px; opacity:0; z-index:5; animation:npwBoneFragment 1.5s ease-out calc(.18s + var(--npw-i)*.018s) both; }
.npw-break-courier { position:absolute; left:0; top:0; width:65px; height:82px; z-index:7; offset-anchor:center; offset-rotate:0deg; opacity:0; animation:npwBreakCourier .6s ease-in-out .25s both; }
.npw-break-impact { z-index:6; }
.npw-target-seal { position:absolute; inset:0; opacity:0; animation:npwTargetSeal .8s ease-out .85s both; }

/* Each material repairs, buckles and fragments in its own way. */
.npw-scene:is([data-nekatay-theme="alap"],[data-nekatay-theme="sziromvihar"],[data-nekatay-theme="szellemvadaszok"]) .npw-repair-frame .nm-court-bone-lock { animation:npwBoneMend .9s ease-out calc(.2s + var(--nm-i)*.065s) both; }
.npw-scene:is([data-nekatay-theme="alap"],[data-nekatay-theme="sziromvihar"],[data-nekatay-theme="szellemvadaszok"])[data-kind="absorb"] .npw-membrane { animation-name:npwBoneAbsorb; }
.npw-scene[data-nekatay-theme="elegans"] .npw-repair-frame .nm-court-lace-knot { stroke-dasharray:100;stroke-dashoffset:100; animation:npwLaceMend .8s ease-out calc(.2s + var(--nm-i)*.07s) both; }
.npw-scene[data-nekatay-theme="elegans"][data-kind="absorb"] .npw-membrane { animation-name:npwMirrorAbsorb; }
.npw-scene[data-nekatay-theme="elegans"] .npw-fragment { animation-name:npwMirrorFragment; }
.npw-scene[data-nekatay-theme="asztral"] .npw-repair-frame .nm-court-station-clasp { animation:npwLatchMend .9s ease-out calc(.2s + var(--nm-i)*.1s) both; }
.npw-scene[data-nekatay-theme="asztral"][data-kind="absorb"] .npw-membrane { animation-name:npwClockAbsorb; }
.npw-scene[data-nekatay-theme="asztral"] .npw-fragment { animation-name:npwClockFragment; }

@keyframes npcFailingTrace { 0%,100%{opacity:.25} 50%{opacity:.8} }
@keyframes npcQuietGlobe { from{opacity:.16;transform:scale(.92)} to{opacity:.3;transform:scale(1.04)} }
@keyframes npcQuietCrownSoul { 50%{opacity:.85;margin-top:-4px} }
@keyframes npcBoneCrest { from{transform:rotate(-14deg) scale(.93)} to{transform:rotate(14deg) scale(1.04)} }
@keyframes npcBoneGuard { from{transform:translateX(0)} to{transform:translateX(calc(var(--nm-side)*-3px))} }
@keyframes npcChoirBreath { from{opacity:.55;transform:scale(.96)} to{opacity:1;transform:scale(1.03)} }
@keyframes npcPearlBreath { from{opacity:.4} to{opacity:1} }
@keyframes npcRoseSway { from{transform:rotate(-5deg)} to{transform:rotate(5deg)} }
@keyframes npcSalonCrest { from{transform:rotate(-12deg) scale(.92)} to{transform:rotate(12deg) scale(1.03)} }
@keyframes npcClockTick { to{transform:rotate(360deg)} }
@keyframes npcGear { to{transform:rotate(360deg)} }
@keyframes npcStarCrest { to{transform:rotate(360deg)} }
@keyframes npwRepairEnvelope { 0%{opacity:0;transform:scale(.8,.05)} 45%{opacity:.8;transform:scale(1.025)} 70%{opacity:.5;transform:scale(1)} 100%{opacity:0;transform:scale(.98)} }
@keyframes npwRepairFrame { 0%{opacity:0} 30%,65%{opacity:.85} 100%{opacity:0} }
@keyframes npwIntegrityStitch { from{stroke-dasharray:calc(var(--npw-from)*100) 100} to{stroke-dasharray:calc(var(--npw-to)*100) 100} }
@keyframes npwHealScars { from{opacity:.8} to{opacity:0} }
@keyframes npwRepairVessel { from{opacity:0;transform:translate(-50%,-15%) scale(.3)} 35%{opacity:.75;transform:translate(-50%,-50%)} 70%{opacity:.6;transform:translate(-50%,-58%) scale(1.05)} to{opacity:0;transform:translate(-50%,-45%) scale(.4)} }
@keyframes npwRepairSeal { from{opacity:0;transform:translate(-50%,-50%) scale(.1,.03)} 40%{opacity:.65;transform:translate(-50%,-50%) scale(1,.25)} to{opacity:0;transform:translate(-50%,-50%) scale(.75,.2)} }
@keyframes npwRepairSeed { 0%{opacity:0;offset-distance:0%;transform:scale(.3)} 25%{opacity:1;transform:scale(1.05)} 100%{opacity:0;offset-distance:100%;transform:scale(.1)} }
@keyframes npwValue { from{opacity:0;translate:0 8px} 25%,65%{opacity:1;translate:0 0} to{opacity:0;translate:0 -12px} }
@keyframes npwBarRepair { 0%,100%{filter:brightness(1)} 40%{filter:brightness(1.8)} }
@keyframes npwAbsorbMembrane { 0%{opacity:0;transform:scale(1.03)} 20%{opacity:.95;transform:scale(.96)} 45%{opacity:.6;transform:scale(1.015)} 100%{opacity:0;transform:none} }
@keyframes npwDamageScars { 0%{opacity:0} 25%{opacity:.85} 100%{opacity:0} }
@keyframes npwBreakMembrane { 0%{opacity:.8;transform:scale(1)} 25%{opacity:1;transform:scale(.94)} 60%{opacity:.35;transform:scale(1.13)} 100%{opacity:0;transform:scale(1.2)} }
@keyframes npwBreakScars { 0%{opacity:0} 28%{opacity:1;transform:scale(.97)} 100%{opacity:0;transform:scale(1.12)} }
@keyframes npwBoneFragment { 0%{opacity:0;transform:translate(calc(-50% + var(--npw-x)*.45),calc(-50% + var(--npw-y)*.45)) scale(.3)} 15%{opacity:1} 100%{opacity:0;transform:translate(calc(-50% + var(--npw-x)),calc(-50% + var(--npw-y))) rotate(var(--npw-turn)) scale(.2)} }
@keyframes npwMirrorFragment { 0%{opacity:0;transform:translate(calc(-50% + var(--npw-x)*.4),calc(-50% + var(--npw-y)*.4)) rotate(-10deg)} 20%{opacity:1;scale:1.05} 100%{opacity:0;transform:translate(calc(-50% + var(--npw-x)*.7),calc(40px + var(--npw-y)*.55)) rotate(var(--npw-turn)) scale(.1)} }
@keyframes npwClockFragment { 0%{opacity:0;transform:translate(calc(-50% + var(--npw-x)*.4),calc(-50% + var(--npw-y)*.4)) rotate(0)} 18%,35%{opacity:.9;transform:translate(calc(-50% + var(--npw-x)*.7),calc(-50% + var(--npw-y)*.7)) rotate(60deg)} 100%{opacity:0;transform:translate(calc(-50% + var(--npw-x)),calc(-50% + var(--npw-y))) rotate(var(--npw-turn)) scale(.2)} }
@keyframes npwBreakCourier { 0%{opacity:0;offset-distance:0%;transform:scale(.2)} 20%{opacity:.9;transform:scale(1)} 100%{opacity:0;offset-distance:100%;transform:scale(.7)} }
@keyframes npwTargetSeal { from{opacity:0;transform:scale(.2) rotate(-20deg)} 30%{opacity:.8;transform:scale(1.05)} to{opacity:0;transform:scale(1.2) rotate(15deg)} }
@keyframes npwBoneMend { from{opacity:0;transform:translateY(25px) rotate(calc(var(--nm-side)*-20deg))} 70%{opacity:1;transform:translateY(-3px)} to{opacity:1;transform:none} }
@keyframes npwLaceMend { from{opacity:0} to{stroke-dashoffset:0;opacity:1} }
@keyframes npwLatchMend { from{opacity:0;transform:translateX(calc(var(--nm-side)*35px))} 75%{opacity:1;transform:translateX(calc(var(--nm-side)*-3px))} to{opacity:1;transform:none} }
@keyframes npwBoneAbsorb { 0%{opacity:0;transform:scale(1.04)} 20%{opacity:.95;transform:scale(.95,1.015)} 46%{opacity:.6;transform:scale(1.025,.985)} 100%{opacity:0;transform:none} }
@keyframes npwMirrorAbsorb { 0%{opacity:0;transform:rotate(-1deg) scale(1.015)} 20%{opacity:.9;transform:rotate(1deg) scale(.975)} 50%{opacity:.55;transform:rotate(-.5deg) scale(1.01)} 100%{opacity:0;transform:none} }
@keyframes npwClockAbsorb { 0%{opacity:0;transform:scale(1.03)} 20%,40%{opacity:.9;transform:scale(.975)} 60%{opacity:.55;transform:scale(1.015)} 100%{opacity:0;transform:none} }
body.v3-vfx-disabled :is(.npc-court,.npc-orbit-crest,.npw-scene) { display:none!important; }
@media(prefers-reduced-motion:reduce) { .npw-scene { display:none!important; } .npc-court *,.npc-orbit-crest { animation:none!important; transition:none!important; } }
