/* Every selector is scoped to the shared panel. Decoration never animates QR content. */
.ai-expert-panel.ai-fx-target,
.ai-expert-panel .ai-fx-target{position:relative;--ai-fx-gradient:linear-gradient(var(--ai-fx-direction),var(--ai-fx-c1),var(--ai-fx-c2),var(--ai-fx-c3));animation-duration:var(--ai-fx-speed);animation-timing-function:linear;animation-iteration-count:infinite}
.ai-expert-panel .ai-fx-target::before,
.ai-expert-panel .ai-fx-target::after,
.ai-expert-panel.ai-fx-background::before,
.ai-expert-panel.ai-fx-background::after{pointer-events:none;animation-duration:var(--ai-fx-speed);animation-timing-function:linear;animation-iteration-count:infinite}
.ai-expert-panel :is(.ai-fx-title,.ai-fx-text).ai-fx-glow,
.ai-expert-panel :is(.ai-fx-title,.ai-fx-text)[data-ai-fx-mode="glow"]{text-shadow:0 0 var(--ai-fx-glow) var(--ai-fx-c1)}
/* Explicit color takeover keeps font-size, line-height and rich paragraph layout intact. */
.ai-expert-panel :is(.ai-fx-title,.ai-fx-text):not(.ai-intro)[data-ai-fx-mode="gradient"],
.ai-expert-panel :is(.ai-fx-title,.ai-fx-text):not(.ai-intro)[data-ai-fx-mode="flow"],
.ai-expert-panel :is(.ai-fx-title,.ai-fx-text):not(.ai-intro)[data-ai-fx-mode="shine"],
.ai-expert-panel .ai-intro.ai-fx-rich-override:is([data-ai-fx-mode="gradient"],[data-ai-fx-mode="shine"]) :is(.expert-line,.expert-line *){background-image:var(--ai-fx-gradient);background-size:200% 100%;background-clip:text;-webkit-background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent}
.ai-expert-panel .ai-fx-title[data-ai-fx-mode="flow"]{background-size:300% 100%;animation-name:ai-fx-flow}
.ai-expert-panel :is(.ai-fx-title,.ai-fx-text):not(.ai-intro)[data-ai-fx-mode="shine"],
.ai-expert-panel .ai-intro.ai-fx-rich-override[data-ai-fx-mode="shine"] :is(.expert-line,.expert-line *){background-image:linear-gradient(var(--ai-fx-direction),var(--ai-fx-c1) 0%,var(--ai-fx-c1) 35%,var(--ai-fx-c2) 48%,var(--ai-fx-c3) 52%,var(--ai-fx-c1) 65%,var(--ai-fx-c1) 100%);background-size:300% 100%;animation:ai-fx-shine var(--ai-fx-speed) linear infinite}
.ai-expert-panel .ai-fx-title[data-ai-fx-mode="neon"]{color:var(--ai-fx-c1)!important;text-shadow:0 0 3px var(--ai-fx-c2),0 0 var(--ai-fx-glow) var(--ai-fx-c1);animation-name:ai-fx-neon}
.ai-expert-panel :is(.ai-fx-title,.ai-fx-text)[data-ai-fx-mode="breathe"]{animation-name:ai-fx-text-breathe}
.ai-expert-panel .ai-fx-title[data-ai-fx-mode="outline"]{-webkit-text-stroke:var(--ai-fx-width) var(--ai-fx-c1);text-shadow:0 0 calc(var(--ai-fx-glow) * .3) var(--ai-fx-c2)}
.ai-expert-panel .ai-fx-text[data-ai-fx-mode="underline"]{text-decoration-line:underline;text-decoration-color:var(--ai-fx-c1);text-decoration-thickness:var(--ai-fx-width);text-underline-offset:.3em}
/* Border masks make both decorative layers transparent inside; no child/content transform. */
.ai-expert-panel :is(.ai-fx-card,.ai-fx-button),
.ai-expert-panel.ai-fx-background{border-radius:var(--ai-fx-radius)}
.ai-expert-panel :is(.ai-fx-card,.ai-fx-button).ai-fx-glow{box-shadow:0 0 var(--ai-fx-glow) color-mix(in srgb,var(--ai-fx-c1) calc(var(--ai-fx-intensity) * 60%),transparent)}
.ai-expert-panel :is(.ai-fx-card,.ai-fx-button):is([data-ai-fx-mode="gradient"],[data-ai-fx-mode="orbit"],[data-ai-fx-mode="chase"],[data-ai-fx-mode="static"],[data-ai-fx-mode="breathe"],[data-ai-fx-mode="glow"])::before,
.ai-expert-panel .ai-fx-title[data-ai-fx-mode="orbit"]::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:var(--ai-fx-width);background:var(--ai-fx-gradient);opacity:var(--ai-fx-opacity);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude}
.ai-expert-panel .ai-fx-title[data-ai-fx-mode="orbit"]::before{inset:-3px;border-radius:var(--ai-fx-radius)}
.ai-expert-panel :is(.ai-fx-card,.ai-fx-button)[data-ai-fx-mode="static"]::before{background:var(--ai-fx-c1)}
.ai-expert-panel :is(.ai-fx-card,.ai-fx-button,.ai-fx-title)[data-ai-fx-mode="orbit"]::before{background:conic-gradient(from 0deg,transparent 0% 65%,var(--ai-fx-c1) 78%,var(--ai-fx-c2) 90%,transparent 100%);background-size:200% 200%;animation-name:ai-fx-orbit}
.ai-expert-panel .ai-fx-card[data-ai-fx-mode="chase"]::before,
.ai-expert-panel .ai-fx-card[data-ai-fx-mode="chase"]::after{content:"";position:absolute;inset:0;border-radius:inherit;padding:var(--ai-fx-width);opacity:var(--ai-fx-opacity);background:radial-gradient(circle at 0% 0%,var(--ai-fx-c1),transparent 25%);background-size:180% 180%;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;animation-name:ai-fx-orbit}
.ai-expert-panel .ai-fx-card[data-ai-fx-mode="chase"]::after{background-image:radial-gradient(circle at 0% 0%,var(--ai-fx-c3),transparent 25%);animation-delay:calc(var(--ai-fx-speed) * -.5)}
.ai-expert-panel .ai-fx-card[data-ai-fx-mode="breathe"]::before{background:var(--ai-fx-c1);animation-name:ai-fx-border-breathe}
.ai-expert-panel .ai-fx-card[data-ai-fx-mode="glow"]::before{background:var(--ai-fx-c1)}
.ai-expert-panel .ai-fx-card[data-ai-fx-mode="glow"]::after{content:"";position:absolute;inset:0;border:var(--ai-fx-width) solid var(--ai-fx-c1);border-radius:inherit;box-shadow:0 0 var(--ai-fx-glow) var(--ai-fx-c1);opacity:calc(var(--ai-fx-opacity) * var(--ai-fx-intensity))}
/* Exactly one page background, behind all panel content. */
.ai-expert-panel.ai-fx-background{isolation:isolate}
.ai-expert-panel.ai-fx-background::before,
.ai-expert-panel.ai-fx-background::after{content:"";position:absolute;inset:0;border-radius:inherit;z-index:-1;opacity:calc(var(--ai-fx-opacity) * var(--ai-fx-intensity));overflow:hidden}
.ai-expert-panel.ai-fx-background::after{content:none}
.ai-expert-panel.ai-fx-background[data-ai-fx-mode="solid"]::before{background:var(--ai-fx-c1)}
.ai-expert-panel.ai-fx-background[data-ai-fx-mode="dual"]::before{background:linear-gradient(var(--ai-fx-direction),var(--ai-fx-c1),var(--ai-fx-c2))}
.ai-expert-panel.ai-fx-background[data-ai-fx-mode="multi"]::before{background:var(--ai-fx-gradient)}
.ai-expert-panel.ai-fx-background[data-ai-fx-mode="flow"]::before{background:var(--ai-fx-gradient);background-size:300% 300%;animation-name:ai-fx-flow}
.ai-expert-panel.ai-fx-background[data-ai-fx-mode="radial"]::before{background:radial-gradient(ellipse at 15% 10%,var(--ai-fx-c2),transparent 60%),radial-gradient(ellipse at 85% 90%,var(--ai-fx-c3),transparent 65%),var(--ai-fx-c1)}
.ai-expert-panel.ai-fx-background[data-ai-fx-mode="grid"]::before{background:linear-gradient(var(--ai-fx-c2) var(--ai-fx-width),transparent var(--ai-fx-width)),linear-gradient(90deg,var(--ai-fx-c2) var(--ai-fx-width),transparent var(--ai-fx-width)),var(--ai-fx-c1);background-size:32px 32px}
.ai-expert-panel.ai-fx-background[data-ai-fx-mode="particles"]::before{background:radial-gradient(circle at 8% 16%,var(--ai-fx-c2) 1px,transparent 2px),radial-gradient(circle at 32% 64%,var(--ai-fx-c3) 1.5px,transparent 2.5px),radial-gradient(circle at 72% 24%,var(--ai-fx-c2) 1px,transparent 2px),radial-gradient(circle at 91% 82%,var(--ai-fx-c3) 1px,transparent 2px),radial-gradient(circle at 48% 42%,var(--ai-fx-c2) 1px,transparent 2px),var(--ai-fx-c1);background-size:180px 200px;animation-name:ai-fx-particles}
.ai-expert-panel.ai-fx-background.ai-fx-glow::after{content:"";box-shadow:inset 0 0 var(--ai-fx-glow) var(--ai-fx-c2)}
/* Button feedback is restricted to buttons; QR buttons have no effect targets. */
.ai-expert-panel .ai-fx-button{isolation:isolate;overflow:hidden}
.ai-expert-panel .ai-fx-button[data-ai-fx-mode="gradient"]{background:var(--ai-fx-gradient)!important;color:#fff}
.ai-expert-panel .ai-fx-button[data-ai-fx-mode="shine"]::before{content:"";position:absolute;inset:0;background:linear-gradient(var(--ai-fx-direction),transparent 35%,var(--ai-fx-c2) 50%,transparent 65%);background-size:300% 100%;opacity:calc(var(--ai-fx-opacity) * var(--ai-fx-intensity));animation-name:ai-fx-shine}
.ai-expert-panel .ai-fx-button[data-ai-fx-mode="breathe"]::before{animation-name:ai-fx-border-breathe}
.ai-expert-panel .ai-fx-button[data-ai-fx-mode="lift"]{transition:transform .2s,box-shadow .2s}
.ai-expert-panel .ai-fx-button[data-ai-fx-mode="lift"]:is(:hover,:focus-visible){transform:translateY(-2px);box-shadow:0 4px var(--ai-fx-glow) var(--ai-fx-c1)}
.ai-expert-panel .ai-fx-button.ai-fx-rippling::after{content:"";position:absolute;left:var(--ai-fx-x,50%);top:var(--ai-fx-y,50%);width:200%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,transparent 30%,var(--ai-fx-c1) 32%,var(--ai-fx-c2) 36%,transparent 40%);animation:ai-fx-ripple var(--ai-fx-speed) ease-out 1;opacity:var(--ai-fx-opacity);transform:translate(-50%,-50%) scale(0)}
.ai-expert-panel .ai-qr-image,
.ai-expert-panel .ai-qr-image img{animation:none!important;transition:none!important;transform:none!important;opacity:1!important;filter:none!important}
/* Manual preview pause is independent of automatic visibility / intersection pause. */
.ai-expert-panel:is(.ai-fx-paused,.ai-fx-auto-paused,.ai-fx-reduced),
.ai-expert-panel:is(.ai-fx-paused,.ai-fx-auto-paused,.ai-fx-reduced) *,
.ai-expert-panel:is(.ai-fx-paused,.ai-fx-auto-paused,.ai-fx-reduced)::before,
.ai-expert-panel:is(.ai-fx-paused,.ai-fx-auto-paused,.ai-fx-reduced)::after,
.ai-expert-panel:is(.ai-fx-paused,.ai-fx-auto-paused,.ai-fx-reduced) *::before,
.ai-expert-panel:is(.ai-fx-paused,.ai-fx-auto-paused,.ai-fx-reduced) *::after{animation-play-state:paused!important;transition:none!important}
.ai-expert-panel:is(.ai-fx-paused,.ai-fx-auto-paused,.ai-fx-reduced) .ai-fx-button[data-ai-fx-mode="lift"]{transform:none!important}
@media(max-width:600px){
  .ai-expert-panel.ai-fx-background[data-ai-fx-mode="particles"]::before{background-image:radial-gradient(circle at 18% 20%,var(--ai-fx-c2) 1px,transparent 2px),radial-gradient(circle at 76% 72%,var(--ai-fx-c3) 1px,transparent 2px);background-color:var(--ai-fx-c1);background-size:240px 280px}
}
@media(prefers-reduced-motion:reduce){
  .ai-expert-panel,.ai-expert-panel *,.ai-expert-panel::before,.ai-expert-panel::after,.ai-expert-panel *::before,.ai-expert-panel *::after{animation:none!important;transition:none!important}
  .ai-expert-panel .ai-fx-button[data-ai-fx-mode="lift"]{transform:none!important}
  .ai-expert-panel .ai-fx-rippling::after{content:none}
}
@keyframes ai-fx-flow{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
@keyframes ai-fx-shine{from{background-position:150% 50%}to{background-position:-150% 50%}}
@keyframes ai-fx-neon{0%,100%{text-shadow:0 0 3px var(--ai-fx-c2),0 0 var(--ai-fx-glow) var(--ai-fx-c1)}50%{text-shadow:0 0 6px var(--ai-fx-c3),0 0 calc(var(--ai-fx-glow) * 1.5) var(--ai-fx-c2)}}
@keyframes ai-fx-text-breathe{0%,100%{text-shadow:0 0 2px var(--ai-fx-c1)}50%{text-shadow:0 0 var(--ai-fx-glow) var(--ai-fx-c1)}}
@keyframes ai-fx-border-breathe{0%,100%{opacity:calc(var(--ai-fx-opacity) * .25)}50%{opacity:var(--ai-fx-opacity)}}
@keyframes ai-fx-orbit{0%,100%{background-position:0% 0%}25%{background-position:100% 0%}50%{background-position:100% 100%}75%{background-position:0% 100%}}
@keyframes ai-fx-particles{from{background-position:0 0}to{background-position:0 -200px}}
@keyframes ai-fx-ripple{from{transform:translate(-50%,-50%) scale(0);opacity:var(--ai-fx-opacity)}to{transform:translate(-50%,-50%) scale(1);opacity:0}}

/* Only the avatar frame pseudo-elements animate; business shape is inherited. */
.ai-expert-panel .ai-fx-avatar::before,.ai-expert-panel .ai-fx-avatar::after{position:absolute;inset:0;border-radius:inherit;pointer-events:none}
.ai-expert-panel .ai-fx-avatar:is([data-ai-fx-mode=glow],[data-ai-fx-mode=breathe],.ai-fx-glow)::after{content:"";border:var(--ai-fx-width) solid var(--ai-fx-c1);box-shadow:0 0 var(--ai-fx-glow) var(--ai-fx-c1);opacity:calc(var(--ai-fx-opacity) * var(--ai-fx-intensity))}
.ai-expert-panel .ai-fx-avatar[data-ai-fx-mode=breathe]::after{animation-name:ai-fx-border-breathe}
.ai-expert-panel .ai-fx-avatar[data-ai-fx-mode=orbit]::before{content:"";padding:var(--ai-fx-width);background:conic-gradient(transparent 0% 65%,var(--ai-fx-c1) 78%,var(--ai-fx-c2) 90%,transparent);background-size:200% 200%;opacity:calc(var(--ai-fx-opacity) * var(--ai-fx-intensity));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;animation-name:ai-fx-orbit}
