/* XiaoBu Agent — state-driven CSS animations.
   Applied to the inline master.svg rendered by <XiaoBuSvgPaths/>.
   Selectors target the unique element ids from master.svg. */

.xiaobu-agent { overflow: visible !important; }
.xiaobu-agent[data-reduced-motion="1"],
.xiaobu-agent[data-reduced-motion="1"]::before,
.xiaobu-agent[data-reduced-motion="1"]::after,
.xiaobu-agent[data-reduced-motion="1"] *,
.xiaobu-agent[data-reduced-motion="1"] *::before,
.xiaobu-agent[data-reduced-motion="1"] *::after { animation: none !important; transition: none !important; }

/* Transform origins (centered) */
.xiaobu-agent #core-hot-white,
.xiaobu-agent #core-gold-inner-glow,
.xiaobu-agent #core-gold-outer-glow,
.xiaobu-agent #core-cyan-inner-ring,
.xiaobu-agent #core-mini-rim,
.xiaobu-agent #core-pulse-ring-01,
.xiaobu-agent #core-pulse-ring-02,
.xiaobu-agent #core-pulse-ring-03,
.xiaobu-agent #core-speaking-waveform-ring,
.xiaobu-agent #core-thinking-rotation-ring,
.xiaobu-agent #core-radial-rays-soft,
.xiaobu-agent #core-radial-rays-strong,
.xiaobu-agent #orbit-cyan-back-main,
.xiaobu-agent #orbit-cyan-back-thin,
.xiaobu-agent #orbit-cyan-mid-main,
.xiaobu-agent #orbit-cyan-front-main,
.xiaobu-agent #orbit-cyan-front-highlight,
.xiaobu-agent #orbit-gold-back-main,
.xiaobu-agent #orbit-gold-back-dim,
.xiaobu-agent #orbit-gold-mid-main,
.xiaobu-agent #orbit-gold-front-main,
.xiaobu-agent #orbit-gold-front-highlight,
.xiaobu-agent #orbit-white-back-thin,
.xiaobu-agent #orbit-white-mid-thin,
.xiaobu-agent #orbit-white-front-thin,
.xiaobu-agent #orbit-gold-right-visible-fix,
.xiaobu-agent #neural-radial-core-to-outer,
.xiaobu-agent #neural-core-web-dense,
.xiaobu-agent #state-thinking-neural-boost,
.xiaobu-agent #state-uploading-data-inflow,
.xiaobu-agent #state-analyzing-scan-ring {
  transform-origin: 627px 627px;
  transform-box: fill-box;
}

@keyframes xb-corePulse  { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.08);opacity:.92} }
@keyframes xb-coreBeat   { 0%{transform:scale(1)} 18%{transform:scale(1.20)} 36%{transform:scale(.96)} 54%{transform:scale(1.12)} 100%{transform:scale(1)} }
@keyframes xb-rotateCW   { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes xb-rotateCCW  { from{transform:rotate(0)} to{transform:rotate(-360deg)} }
@keyframes xb-dashFlow   { from{stroke-dashoffset:0} to{stroke-dashoffset:-240} }
@keyframes xb-dashInflow { from{stroke-dashoffset:240} to{stroke-dashoffset:0} }
@keyframes xb-flicker    { 0%{opacity:.9} 22%{opacity:.95} 23%{opacity:.25} 25%{opacity:.95} 60%{opacity:.6} 62%{opacity:.2} 64%{opacity:.85} 100%{opacity:.85} }
@keyframes xb-glow       { 0%,100%{opacity:.7} 50%{opacity:1} }
@keyframes xb-blink      { 0%,100%{opacity:.3} 50%{opacity:1} }
@keyframes xb-burst      { 0%{transform:scale(.4);opacity:0} 20%{opacity:.9} 100%{transform:scale(2);opacity:0} }
@keyframes xb-corePulseDramatic { 0%,100%{transform:scale(1);opacity:1} 46%{transform:scale(1.18);opacity:.98} 62%{transform:scale(.97);opacity:.86} }
@keyframes xb-coreBeatDramatic { 0%,100%{transform:scale(1)} 14%{transform:scale(1.34)} 30%{transform:scale(.9)} 48%{transform:scale(1.2)} 68%{transform:scale(.98)} }
@keyframes xb-dramaticHaloBreath { 0%,100%{opacity:.14;transform:scale(1.18) rotate(0deg)} 48%{opacity:.42;transform:scale(1.38) rotate(12deg)} }
@keyframes xb-dramaticHaloSpin { from{transform:scale(1.24) rotate(0deg)} to{transform:scale(1.24) rotate(360deg)} }
@keyframes xb-dramaticSpeakResonance { 0%,100%{transform:scale(1) translate3d(0,0,0)} 28%{transform:scale(1.018) translate3d(.6%, -.35%, 0)} 56%{transform:scale(.992) translate3d(-.45%, .25%, 0)} }
@keyframes xb-dramaticScanTilt { 0%,100%{transform:scale(1) rotate(0deg)} 50%{transform:scale(1.026) rotate(.8deg)} }
@keyframes xb-dramaticSuccessKick { 0%{transform:scale(.94);filter:saturate(1.2) brightness(1.04)} 34%{transform:scale(1.08);filter:saturate(1.45) brightness(1.16)} 100%{transform:scale(1);filter:saturate(1.15) brightness(1.06)} }
@keyframes xb-dramaticErrorGlitch { 0%,100%{transform:translate3d(0,0,0);filter:saturate(.86)} 18%{transform:translate3d(-1.2%, .4%, 0);filter:saturate(1.3) hue-rotate(-8deg)} 22%{transform:translate3d(1%, -.6%, 0);filter:saturate(.72) hue-rotate(10deg)} 46%{transform:translate3d(.4%,0,0)} }

/* Orbit containment contract */
.xiaobu-agent #orbit-back,
.xiaobu-agent #orbit-mid,
.xiaobu-agent #orbit-front {
  display: inline !important;
  overflow: visible !important;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 88%, rgba(0,0,0,.48) 91%, rgba(0,0,0,.1) 95%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0 88%, rgba(0,0,0,.48) 91%, rgba(0,0,0,.1) 95%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.xiaobu-agent #orbit-back path,
.xiaobu-agent #orbit-mid path,
.xiaobu-agent #orbit-front path {
  stroke-dasharray: none !important;
  stroke-dashoffset: 0 !important;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.xiaobu-agent #runtime-orbit-continuity,
.xiaobu-agent .xb-orbit-continuity {
  display: none !important;
  opacity: 0 !important;
}

.xiaobu-agent #orbit-cyan-back-main,
.xiaobu-agent #orbit-cyan-back-thin,
.xiaobu-agent #orbit-white-back-thin,
.xiaobu-agent #orbit-gold-back-main,
.xiaobu-agent #orbit-gold-back-dim,
.xiaobu-agent #orbit-cyan-front-main,
.xiaobu-agent #orbit-cyan-front-highlight,
.xiaobu-agent #orbit-white-front-thin,
.xiaobu-agent #orbit-gold-front-main,
.xiaobu-agent #orbit-gold-front-highlight,
.xiaobu-agent #orbit-gold-right-visible-fix,
.xiaobu-agent #orbit-trail-cyan,
.xiaobu-agent #orbit-trail-gold,
.xiaobu-agent #glass-back-refraction-arc-top,
.xiaobu-agent #glass-back-refraction-arc-right,
.xiaobu-agent #glass-back-refraction-arc-bottom,
.xiaobu-agent #glass-front-refraction-lines,
.xiaobu-agent #orbit-cyan-back-main-arc,
.xiaobu-agent #orbit-cyan-back-thin-arc,
.xiaobu-agent #orbit-white-back-thin-arc,
.xiaobu-agent #orbit-gold-back-main-arc,
.xiaobu-agent #orbit-gold-back-dim-arc,
.xiaobu-agent #orbit-white-mid-thin-arc,
.xiaobu-agent #orbit-cyan-front-main-arc,
.xiaobu-agent #orbit-cyan-front-highlight-arc,
.xiaobu-agent #orbit-white-front-thin-arc,
.xiaobu-agent #orbit-gold-front-main-arc,
.xiaobu-agent #orbit-gold-front-highlight-arc,
.xiaobu-agent #orbit-gold-right-fix-arc-1,
.xiaobu-agent #orbit-gold-right-fix-arc-2,
.xiaobu-agent #orbit-trail-cyan-path,
.xiaobu-agent #orbit-trail-gold-path,
.xiaobu-agent #gfr-1,
.xiaobu-agent #gfr-2,
.xiaobu-agent #gfr-3 {
  display: none !important;
  opacity: 0 !important;
  stroke-opacity: 0 !important;
}

.xiaobu-agent #orbit-cyan-back-main-arc { stroke-opacity: .08 !important; }
.xiaobu-agent #orbit-cyan-back-thin-arc { stroke-opacity: .055 !important; }
.xiaobu-agent #orbit-white-back-thin-arc { stroke-opacity: .06 !important; }
.xiaobu-agent #orbit-gold-back-main-arc { stroke-opacity: .075 !important; }
.xiaobu-agent #orbit-gold-back-dim-arc { stroke-opacity: .05 !important; }

.xiaobu-agent #orbit-cyan-mid-main,
.xiaobu-agent #orbit-gold-mid-main {
  display: none !important;
  opacity: 0 !important;
}

.xiaobu-agent #orbit-cyan-mid-main-arc { stroke-opacity: 0 !important; }
.xiaobu-agent #orbit-white-mid-thin-arc { stroke-opacity: .10 !important; }
.xiaobu-agent #orbit-gold-mid-main-arc { stroke-opacity: 0 !important; }

.xiaobu-agent #orbit-cyan-front-main-arc { stroke-opacity: .03 !important; }
.xiaobu-agent #orbit-cyan-front-highlight-arc { stroke-opacity: .024 !important; }
.xiaobu-agent #orbit-white-front-thin-arc { stroke-opacity: .12 !important; }
.xiaobu-agent #orbit-gold-front-main-arc { stroke-opacity: .05 !important; }
.xiaobu-agent #orbit-gold-front-highlight-arc { stroke-opacity: .04 !important; }

.xiaobu-agent #orbit-gold-right-visible-fix path {
  stroke-dasharray: none !important;
  stroke-dashoffset: 0 !important;
}
.xiaobu-agent #orbit-gold-right-fix-arc-1 { stroke-opacity: .05 !important; }
.xiaobu-agent #orbit-gold-right-fix-arc-2 { stroke-opacity: .035 !important; }

.xiaobu-agent #orbit-trail-cyan,
.xiaobu-agent #orbit-trail-gold {
  opacity: 0 !important;
}
.xiaobu-agent #orbit-trail-cyan path,
.xiaobu-agent #orbit-trail-gold path {
  stroke-linecap: round;
  stroke-dasharray: 48 1160 !important;
  stroke-dashoffset: 0;
  animation: xb-dashFlow 9s linear infinite;
}
.xiaobu-agent[data-state="listening"] #orbit-trail-cyan,
.xiaobu-agent[data-state="thinking"] #orbit-trail-cyan,
.xiaobu-agent[data-state="uploading"] #orbit-trail-cyan,
.xiaobu-agent[data-state="analyzing"] #orbit-trail-cyan {
  opacity: .055 !important;
}
.xiaobu-agent[data-state="speaking"] #orbit-trail-gold,
.xiaobu-agent[data-state="success"] #orbit-trail-gold {
  opacity: .065 !important;
}
.xiaobu-agent[data-performance="medium"] #orbit-gold-right-visible-fix path {
  stroke-opacity: .035 !important;
}
.xiaobu-agent[data-performance="low"] #orbit-trail-cyan,
.xiaobu-agent[data-performance="low"] #orbit-trail-gold,
.xiaobu-agent[data-performance="low"] #orbit-gold-right-visible-fix,
.xiaobu-agent[data-performance="low"] #orbit-gold-right-visible-fix path {
  display: none !important;
}

/* IDLE */
.xiaobu-agent[data-state="idle"] #core-hot-white { animation: xb-corePulse 3.8s ease-in-out infinite; }
.xiaobu-agent[data-state="idle"] #core-gold-outer-glow { animation: xb-glow 4.4s ease-in-out infinite; }
.xiaobu-agent[data-state="idle"] #orbit-cyan-mid-main { animation: xb-rotateCW 56s linear infinite; }
.xiaobu-agent[data-state="idle"] #orbit-gold-front-main { animation: xb-rotateCCW 72s linear infinite; }

/* LISTENING */
.xiaobu-agent[data-state="listening"] #core-hot-white { animation: xb-corePulse 2.4s ease-in-out infinite; }
.xiaobu-agent[data-state="listening"] #core-cyan-inner-ring { animation: xb-rotateCW 14s linear infinite; }
.xiaobu-agent[data-state="listening"] #orbit-cyan-front-main { animation: xb-rotateCW 32s linear infinite; }
.xiaobu-agent[data-state="listening"] #neural-lines-mid-cyan path { stroke-dasharray: 4 14; animation: xb-dashInflow 3.2s linear infinite; }

/* THINKING */
.xiaobu-agent[data-state="thinking"] #core-hot-white { animation: xb-corePulse 2.6s ease-in-out infinite; }
.xiaobu-agent[data-state="thinking"] #core-thinking-rotation-ring { opacity:.95 !important; animation: xb-rotateCW 6s linear infinite; }
.xiaobu-agent[data-state="thinking"] #neural-lines-mid-cyan path,
.xiaobu-agent[data-state="thinking"] #neural-lines-mid-gold path,
.xiaobu-agent[data-state="thinking"] #neural-lines-front-cyan path,
.xiaobu-agent[data-state="thinking"] #neural-cross-links-01 path,
.xiaobu-agent[data-state="thinking"] #neural-cross-links-02 path {
  stroke-dasharray: 3 12;
  animation: xb-dashFlow 2.4s linear infinite;
}
.xiaobu-agent[data-state="thinking"] #node-cyan-large-set use { animation: xb-blink 1.6s ease-in-out infinite; }
.xiaobu-agent[data-state="thinking"] #orbit-cyan-mid-main { animation: xb-rotateCW 22s linear infinite; }
.xiaobu-agent[data-state="thinking"] #orbit-gold-mid-main { animation: xb-rotateCCW 28s linear infinite; }

/* SPEAKING */
.xiaobu-agent[data-state="speaking"] #core-hot-white { animation: xb-coreBeat 1s ease-out infinite; }
.xiaobu-agent[data-state="speaking"] #core-speaking-waveform-ring { opacity:1 !important; animation: xb-rotateCW 5s linear infinite; }
.xiaobu-agent[data-state="speaking"] #core-gold-outer-glow { animation: xb-glow 1s ease-in-out infinite; }
.xiaobu-agent[data-state="speaking"] #orbit-gold-front-main,
.xiaobu-agent[data-state="speaking"] #orbit-gold-front-highlight { animation: xb-rotateCW 18s linear infinite; }
.xiaobu-agent[data-state="speaking"] #orbit-gold-right-visible-fix path { animation: xb-glow 1.8s ease-in-out infinite; }
.xiaobu-agent[data-state="speaking"] #neural-short-flash-lines path { animation: xb-blink .6s ease-in-out infinite; }

/* UPLOADING */
.xiaobu-agent[data-state="uploading"] #core-hot-white { animation: xb-corePulse 2.4s ease-in-out infinite; }
.xiaobu-agent[data-state="uploading"] #state-uploading-data-inflow { opacity:1 !important; animation: xb-rotateCW 12s linear infinite; }
.xiaobu-agent[data-state="uploading"] #neural-radial-core-to-outer path { stroke-dasharray:3 22; animation: xb-dashInflow 2s linear infinite; }

/* ANALYZING */
.xiaobu-agent[data-state="analyzing"] #core-hot-white { animation: xb-corePulse 1.6s ease-in-out infinite; }
.xiaobu-agent[data-state="analyzing"] #state-analyzing-scan-ring { opacity:1 !important; animation: xb-rotateCW 3s linear infinite; }
.xiaobu-agent[data-state="analyzing"] #neural-lines-mid-cyan path,
.xiaobu-agent[data-state="analyzing"] #neural-lines-mid-gold path,
.xiaobu-agent[data-state="analyzing"] #neural-core-web-dense path { stroke-dasharray:2 8; animation: xb-dashFlow 1.4s linear infinite; }
.xiaobu-agent[data-state="analyzing"] #node-gold-medium-set use { animation: xb-blink .8s ease-in-out infinite; }

/* SUCCESS */
.xiaobu-agent[data-state="success"] #core-hot-white { animation: xb-coreBeat .9s ease-out 1; }
.xiaobu-agent[data-state="success"] #core-spark-burst-gold { opacity:.85 !important; animation: xb-burst 1.2s ease-out 1; }
.xiaobu-agent[data-state="success"] #orbit-gold-front-main { animation: xb-rotateCW 14s linear infinite; }

/* CAUTION */
.xiaobu-agent[data-state="caution"] #core-hot-white { animation: xb-corePulse 4.2s ease-in-out infinite; }

/* ERROR */
.xiaobu-agent[data-state="error"] #core-hot-white { animation: xb-flicker 1.6s steps(8) infinite; }
.xiaobu-agent[data-state="error"] #neural-lines-front-cyan path { animation: xb-flicker 1.2s steps(6) infinite; }

/* SLEEP */
.xiaobu-agent[data-state="sleep"] #core-hot-white { animation: xb-corePulse 6s ease-in-out infinite; opacity:.7; }
.xiaobu-agent[data-state="sleep"] #core-gold-outer-glow { opacity:.3 !important; }
.xiaobu-agent[data-state="sleep"] #orbit-cyan-mid-main { animation: xb-rotateCW 180s linear infinite; }

.xiaobu-agent #state-error-dim-overlay rect,
.xiaobu-agent #state-sleep-core-lowlight rect,
.xiaobu-agent #polish-state-error-dim-flicker rect,
.xiaobu-agent #polish-state-sleep-lowlight rect {
  display: none !important;
}

.xiaobu-agent[data-state="error"] #state-error-dim-overlay circle,
.xiaobu-agent[data-state="sleep"] #state-sleep-core-lowlight circle,
.xiaobu-agent[data-state="error"] #polish-state-error-dim-flicker circle,
.xiaobu-agent[data-state="sleep"] #polish-state-sleep-lowlight circle {
  transform-origin: 627px 627px;
  transform-box: fill-box;
}

/* Dramatic intensity overrides: all additions remain animated and state-driven. */
.xiaobu-agent[data-intensity="dramatic"][data-state="listening"] #core-hot-white,
.xiaobu-agent[data-intensity="dramatic"][data-state="thinking"] #core-hot-white,
.xiaobu-agent[data-intensity="dramatic"][data-state="uploading"] #core-hot-white,
.xiaobu-agent[data-intensity="dramatic"][data-state="analyzing"] #core-hot-white {
  animation: xb-corePulseDramatic 1.55s ease-in-out infinite;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="speaking"] #core-hot-white {
  animation: xb-coreBeatDramatic .64s ease-out infinite;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="success"] #core-hot-white {
  animation: xb-coreBeatDramatic .78s ease-out 2;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="listening"] #orbit-cyan-front-main,
.xiaobu-agent[data-intensity="dramatic"][data-state="thinking"] #orbit-cyan-front-main,
.xiaobu-agent[data-intensity="dramatic"][data-state="analyzing"] #orbit-cyan-front-main {
  animation: xb-rotateCW 11s linear infinite;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="thinking"] #orbit-gold-mid-main,
.xiaobu-agent[data-intensity="dramatic"][data-state="analyzing"] #orbit-gold-mid-main {
  animation: xb-rotateCCW 12s linear infinite;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="speaking"] #orbit-gold-front-main,
.xiaobu-agent[data-intensity="dramatic"][data-state="speaking"] #orbit-gold-front-highlight,
.xiaobu-agent[data-intensity="dramatic"][data-state="success"] #orbit-gold-front-main,
.xiaobu-agent[data-intensity="dramatic"][data-state="success"] #orbit-gold-front-highlight {
  animation: xb-rotateCW 7s linear infinite;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="thinking"] .xiaobu-living-agent-svg,
.xiaobu-agent[data-intensity="dramatic"][data-state="analyzing"] .xiaobu-living-agent-svg {
  animation: xb-dramaticScanTilt 2.8s ease-in-out infinite;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="speaking"] .xiaobu-living-agent-svg {
  animation: xb-dramaticSpeakResonance .9s ease-in-out infinite;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="success"] .xiaobu-living-agent-svg {
  animation: xb-dramaticSuccessKick 1.2s ease-out 1;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="thinking"] #neural-lines-mid-cyan path,
.xiaobu-agent[data-intensity="dramatic"][data-state="thinking"] #neural-lines-mid-gold path,
.xiaobu-agent[data-intensity="dramatic"][data-state="analyzing"] #neural-lines-mid-cyan path,
.xiaobu-agent[data-intensity="dramatic"][data-state="analyzing"] #neural-lines-mid-gold path,
.xiaobu-agent[data-intensity="dramatic"][data-state="uploading"] #neural-radial-core-to-outer path {
  stroke-dasharray: 2 9;
  animation-duration: .75s;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="speaking"] #neural-short-flash-lines path {
  animation-duration: .38s;
}

.xiaobu-agent[data-intensity="dramatic"][data-state="success"] #core-spark-burst-gold {
  animation: xb-burst .95s ease-out 2;
}

.xiaobu-agent[data-intensity="extreme"][data-state="listening"] #core-hot-white,
.xiaobu-agent[data-intensity="extreme"][data-state="thinking"] #core-hot-white,
.xiaobu-agent[data-intensity="extreme"][data-state="uploading"] #core-hot-white,
.xiaobu-agent[data-intensity="extreme"][data-state="analyzing"] #core-hot-white {
  animation: xb-corePulseDramatic 1.08s ease-in-out infinite;
}

.xiaobu-agent[data-intensity="extreme"][data-state="speaking"] #core-hot-white {
  animation: xb-coreBeatDramatic .46s ease-out infinite;
}

.xiaobu-agent[data-intensity="extreme"][data-state="success"] #core-hot-white {
  animation: xb-coreBeatDramatic .58s ease-out 3;
}

.xiaobu-agent[data-intensity="extreme"][data-state="listening"] #orbit-cyan-front-main,
.xiaobu-agent[data-intensity="extreme"][data-state="thinking"] #orbit-cyan-front-main,
.xiaobu-agent[data-intensity="extreme"][data-state="analyzing"] #orbit-cyan-front-main {
  animation: xb-rotateCW 7s linear infinite;
}

.xiaobu-agent[data-intensity="extreme"][data-state="thinking"] #orbit-gold-mid-main,
.xiaobu-agent[data-intensity="extreme"][data-state="analyzing"] #orbit-gold-mid-main {
  animation: xb-rotateCCW 8s linear infinite;
}

.xiaobu-agent[data-intensity="extreme"][data-state="speaking"] #orbit-gold-front-main,
.xiaobu-agent[data-intensity="extreme"][data-state="speaking"] #orbit-gold-front-highlight,
.xiaobu-agent[data-intensity="extreme"][data-state="success"] #orbit-gold-front-main,
.xiaobu-agent[data-intensity="extreme"][data-state="success"] #orbit-gold-front-highlight {
  animation: xb-rotateCW 4.8s linear infinite;
}

.xiaobu-agent[data-intensity="extreme"][data-state="thinking"] .xiaobu-living-agent-svg,
.xiaobu-agent[data-intensity="extreme"][data-state="analyzing"] .xiaobu-living-agent-svg {
  animation: xb-dramaticScanTilt 1.75s ease-in-out infinite;
}

.xiaobu-agent[data-intensity="extreme"][data-state="speaking"] .xiaobu-living-agent-svg {
  animation: xb-dramaticSpeakResonance .58s ease-in-out infinite;
}

.xiaobu-agent[data-intensity="extreme"][data-state="success"] .xiaobu-living-agent-svg {
  animation: xb-dramaticSuccessKick .9s ease-out 2;
}

.xiaobu-agent[data-intensity="extreme"][data-state="thinking"] #neural-lines-mid-cyan path,
.xiaobu-agent[data-intensity="extreme"][data-state="thinking"] #neural-lines-mid-gold path,
.xiaobu-agent[data-intensity="extreme"][data-state="analyzing"] #neural-lines-mid-cyan path,
.xiaobu-agent[data-intensity="extreme"][data-state="analyzing"] #neural-lines-mid-gold path,
.xiaobu-agent[data-intensity="extreme"][data-state="uploading"] #neural-radial-core-to-outer path {
  stroke-dasharray: 2 7;
  animation-duration: .46s;
}

.xiaobu-agent[data-intensity="extreme"][data-state="speaking"] #neural-short-flash-lines path {
  animation-duration: .26s;
}

.xiaobu-agent[data-intensity="extreme"][data-state="success"] #core-spark-burst-gold {
  animation: xb-burst .72s ease-out 3;
}

/* Performance / device hides */
.xiaobu-agent[data-performance="low"] #neural-back,
.xiaobu-agent[data-performance="low"] #neural-front,
.xiaobu-agent[data-performance="low"] #particles-back,
.xiaobu-agent[data-performance="low"] #particles-front,
.xiaobu-agent[data-performance="low"] #crystals,
.xiaobu-agent[data-performance="low"] #glass-front-glare-sweep-mask { display:none !important; }

/* Static client host integration */
.bio-core.is-living-agent {
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

.bio-core.is-living-agent > :not(.xiaobu-living-agent-host) {
  display: none !important;
}

.xiaobu-living-agent-host {
  position: absolute;
  inset: -7%;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.xiaobu-living-agent-runtime {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible !important;
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease;
  --xb-halo-scale: 1;
  --xb-core-pulse-multiplier: 1;
  --xb-orbit-speed-multiplier: 1;
  --xb-accent-alpha: 1;
}

.xiaobu-living-agent-runtime.is-loaded,
.xiaobu-living-agent-runtime.is-ready {
  opacity: 1 !important;
  visibility: visible !important;
}

.xiaobu-living-agent-runtime::before,
.xiaobu-living-agent-runtime::after {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transform-origin: 50% 50%;
}

.xiaobu-living-agent-runtime::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.34) 0 14%, rgba(127,233,224,.24) 32%, rgba(127,233,224,.08) 55%, transparent 74%),
    conic-gradient(from 0deg, transparent 0 10%, rgba(127,233,224,.24) 15%, transparent 24%, rgba(255,233,184,.22) 38%, transparent 52%, rgba(127,233,224,.18) 68%, transparent 82%);
  filter: blur(12px) saturate(1.24);
}

.xiaobu-living-agent-runtime::after {
  inset: -22%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 46%, rgba(255,233,184,.16) 57%, transparent 69%),
    conic-gradient(from 90deg, transparent 0 8%, rgba(255,233,184,.18) 12%, transparent 20%, rgba(127,233,224,.18) 33%, transparent 44%, rgba(255,255,255,.12) 57%, transparent 72%);
  filter: blur(18px);
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"] {
  filter: saturate(1.14) contrast(1.04);
}

.xiaobu-living-agent-runtime[data-intensity="extreme"] {
  filter: saturate(1.28) contrast(1.08) brightness(1.04);
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="listening"]::before,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="thinking"]::before,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="analyzing"]::before,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="speaking"]::before,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="success"]::before {
  animation: xb-dramaticHaloBreath 2.2s ease-in-out infinite;
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="speaking"]::after,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="success"]::after,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="analyzing"]::after {
  opacity: .23;
  animation: xb-dramaticHaloSpin 9s linear infinite;
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="listening"]::before {
  opacity: .26;
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="thinking"]::before,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="analyzing"]::before {
  opacity: .36;
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="speaking"]::before,
.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="success"]::before {
  opacity: .46;
}

.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="listening"]::before,
.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="thinking"]::before,
.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="analyzing"]::before,
.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="speaking"]::before,
.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="success"]::before {
  opacity: .58;
  animation: xb-dramaticHaloBreath 1.45s ease-in-out infinite;
}

.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="speaking"]::after,
.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="success"]::after,
.xiaobu-living-agent-runtime[data-intensity="extreme"][data-state="analyzing"]::after {
  opacity: .34;
  animation: xb-dramaticHaloSpin 5.8s linear infinite;
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="caution"]::before {
  opacity: .2;
  background:
    radial-gradient(circle at 50% 50%, rgba(232,162,59,.24) 0 30%, rgba(232,162,59,.12) 48%, transparent 72%),
    conic-gradient(from 0deg, transparent 0 20%, rgba(232,162,59,.22) 26%, transparent 32%, rgba(255,233,184,.14) 54%, transparent 68%);
  animation: xb-dramaticHaloBreath 3.4s ease-in-out infinite;
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="error"] {
  animation: xb-dramaticErrorGlitch 1.1s steps(5) infinite;
}

.xiaobu-living-agent-runtime[data-intensity="dramatic"][data-state="error"]::before {
  opacity: .12;
  background: radial-gradient(circle at 50% 50%, rgba(232,162,59,.22), rgba(127,233,224,.08) 48%, transparent 72%);
}

.xiaobu-living-agent-svg,
.xiaobu-living-agent-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.xiaobu-living-agent-svg,
.xiaobu-living-agent-particles {
  z-index: 1;
}

.xiaobu-polish-overlay-wrap {
  z-index: 3;
}

.xiaobu-living-agent-svg svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.xiaobu-living-agent-particles {
  mix-blend-mode: screen;
}

.xiaobu-polish-overlay-wrap,
.xiaobu-polish-overlay-wrap > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.xiaobu-polish-overlay-wrap {
  z-index: 3;
  mix-blend-mode: screen;
}

.xiaobu-polish-overlay-wrap > svg {
  display: block;
}

.xiaobu-polish-overlay-wrap [id^="polish-state-"] {
  opacity: 0;
}

.xiaobu-polish-overlay-wrap[data-reduced-motion="1"] *,
.xiaobu-polish-overlay-wrap[data-page-visible="0"] * {
  animation-play-state: paused !important;
}

.xiaobu-polish-overlay-wrap[data-perf="medium"] #polish-outer-edge-mist,
.xiaobu-polish-overlay-wrap[data-perf="medium"] #polish-spark-gold,
.xiaobu-polish-overlay-wrap[data-perf="medium"] #polish-particle-orbit-dust,
.xiaobu-polish-overlay-wrap[data-perf="medium"] #polish-halo-cyan-edge-back-3,
.xiaobu-polish-overlay-wrap[data-perf="medium"] #polish-halo-gold-edge-back-2,
.xiaobu-polish-overlay-wrap[data-perf="medium"] #polish-halo-cyan-short-streak-03,
.xiaobu-polish-overlay-wrap[data-perf="medium"] #polish-halo-gold-short-streak-03 {
  display: none !important;
}

.xiaobu-polish-overlay-wrap[data-perf="low"] > svg > g:not(#polish-glass-strengthen):not(#polish-state-overlays):not(#polish-halo-front) {
  display: none !important;
}

@keyframes glow { 0%,100%{opacity:.72} 50%{opacity:1} }
@keyframes streak-flow { from{stroke-dashoffset:0} to{stroke-dashoffset:-180} }
@keyframes dash-inflow { from{stroke-dashoffset:220} to{stroke-dashoffset:0} }
@keyframes flow-to-core { 0%{transform:scale(1);opacity:.45} 50%{transform:scale(.985);opacity:1} 100%{transform:scale(.97);opacity:.45} }
@keyframes rotateCW { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes burst { 0%{transform:scale(.4);opacity:0} 20%{opacity:1} 100%{transform:scale(1.8);opacity:0} }
@keyframes flicker { 0%,100%{opacity:.85} 28%{opacity:.28} 32%{opacity:.8} 62%{opacity:.35} 68%{opacity:.75} }

.xiaobu-hifi-overlay-wrap,
.xiaobu-hifi-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.xiaobu-hifi-overlay-wrap {
  z-index: 3;
  mix-blend-mode: screen;
}

.xiaobu-hifi-overlay * {
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: 627px 627px;
}

.hifi-aura,
.hifi-glass,
.hifi-rim,
.hifi-rim-glow,
.hifi-inner,
.hifi-inner-fragment,
.hifi-gold-glint,
.hifi-white-glint,
.hifi-crystal,
.hifi-particles {
  transition: opacity .35s ease;
}

.hifi-aura {
  opacity: .1;
}

.hifi-depth {
  opacity: .025;
}

.hifi-edge-mist {
  opacity: .04;
}

.hifi-shell-back {
  opacity: .14;
}

.hifi-shell-front {
  opacity: .18;
}

.hifi-caustics {
  opacity: .075;
}

.hifi-refract,
.hifi-rim,
.hifi-rim-glow,
.hifi-orbital-halo,
.hifi-core-ring,
.hifi-edge-halo,
.hifi-inner,
.hifi-inner-fragment,
.hifi-gold-glint,
.hifi-white-glint {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hifi-refract {
  stroke: rgba(210, 255, 250, .62);
  stroke-width: 8;
  opacity: .1;
}

.hifi-rim-cyan,
.hifi-cyan-glow,
.hifi-cyan-refraction {
  stroke: url(#hifi-grad-cyan-stroke);
}

.hifi-rim-cyan {
  stroke-width: 4;
  opacity: .13;
  filter: blur(.6px);
}

.hifi-rim-white,
.hifi-edge-thickness,
.hifi-white-glint {
  stroke: rgba(238, 255, 252, .78);
}

.hifi-rim-white {
  stroke-width: 5;
  opacity: .13;
}

.hifi-edge-thickness {
  stroke-width: 4;
  opacity: .055;
  filter: blur(.8px);
}

.hifi-large-highlight {
  opacity: .18;
}

.hifi-cyan-glow {
  stroke-width: 3;
  opacity: .052;
  filter: blur(1px);
}

.hifi-cyan-refraction {
  stroke-width: 2;
  opacity: .048;
  filter: blur(.7px);
}

#hifi-inner-light-layer .hifi-inner,
#hifi-inner-light-layer .hifi-inner-fragments,
.xiaobu-agent #hifi-cyan-rim-glow-soft,
.xiaobu-agent #hifi-cyan-rim-glow-fragment-01,
.xiaobu-agent #hifi-cyan-rim-glow-fragment-02,
.xiaobu-agent #hifi-cyan-edge-refraction-01,
.xiaobu-agent #hifi-cyan-edge-refraction-02,
.xiaobu-agent #hifi-glass-rim-cyan,
.xiaobu-agent #hifi-glass-edge-thickness {
  display: none !important;
  opacity: 0 !important;
}

.hifi-orbital-halo,
.hifi-core-ring,
.hifi-edge-halo {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hifi-halo-cyan-main {
  stroke: rgba(122, 250, 240, .86);
  stroke-width: 2.4;
  opacity: .28;
  filter: drop-shadow(0 0 7px rgba(122, 250, 240, .52)) blur(.8px);
  stroke-dasharray: 900 110;
  animation: xb-hifiHaloDrift 18s linear infinite, xb-hifiCyanHaloPulse 5.4s ease-in-out infinite;
}

.hifi-halo-gold-main {
  stroke: rgba(255, 214, 132, .82);
  stroke-width: 1.8;
  opacity: .16;
  filter: drop-shadow(0 0 6px rgba(255, 214, 132, .46)) blur(.8px);
  animation: xb-hifiGoldHaloPulse 6s ease-in-out infinite;
}

.hifi-core-cyan-ring {
  stroke: rgba(139, 255, 247, .8);
  stroke-width: 2;
  opacity: .28;
  filter: drop-shadow(0 0 7px rgba(139, 255, 247, .54)) blur(.6px);
  stroke-dasharray: 42 12;
  animation: xb-hifiHaloDrift 10s linear infinite, xb-hifiCyanHaloPulse 4.6s ease-in-out infinite;
}

.hifi-core-gold-ring {
  stroke: rgba(255, 219, 142, .78);
  stroke-width: 1.6;
  opacity: .12;
  filter: drop-shadow(0 0 6px rgba(255, 219, 142, .42)) blur(.6px);
  animation: xb-hifiGoldHaloPulse 5.8s ease-in-out infinite;
}

.hifi-edge-cyan-halo-contour {
  stroke: rgba(139, 255, 247, .68);
  stroke-width: 1.8;
  opacity: .2;
  filter: drop-shadow(0 0 5px rgba(139, 255, 247, .32)) blur(1.4px);
  stroke-dasharray: 680 94 360 120;
  animation: xb-hifiHaloDrift 28s linear infinite;
}

.hifi-core-saturn-ring-system {
  opacity: .92;
  mix-blend-mode: screen;
}

.hifi-core-orbit-ring {
  transform-origin: 627px 627px;
  transform-box: view-box !important;
  animation: none;
}

.hifi-core-orbit-ring-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transform-origin: 627px 627px !important;
  transform-box: view-box !important;
}

.hifi-core-orbit-ring .hifi-ring-organism {
  transform-box: view-box !important;
}

.hifi-outer-surface-ring-system {
  opacity: .94;
  mix-blend-mode: screen;
}

.hifi-surface-orbit-ring {
  transform-origin: 627px 627px;
  transform-box: view-box !important;
}

.hifi-surface-orbit-ring-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transform-origin: 627px 627px !important;
  transform-box: view-box !important;
  animation: xb-hifiSurfaceTraceFlow 10s linear infinite;
}

.hifi-surface-ring-cyan {
  stroke: rgba(130, 255, 245, .74);
  stroke-width: 2.35;
  filter: drop-shadow(0 0 5px rgba(104, 255, 244, .48));
}

.hifi-surface-ring-white {
  stroke: rgba(247, 255, 252, .68);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 5px rgba(247, 255, 252, .42));
}

.hifi-surface-ring-gold {
  stroke: rgba(255, 222, 158, .7);
  stroke-width: 2.05;
  filter: drop-shadow(0 0 5px rgba(255, 214, 132, .44));
}

.hifi-surface-ring-broken {
  stroke-dasharray: 720 22 260 16;
}

.hifi-surface-ring-faint {
  opacity: .72;
}

.hifi-surface-orbit-ring-01 { opacity: .88; }
.hifi-surface-orbit-ring-02 { opacity: .78; }
.hifi-surface-orbit-ring-03 { opacity: .82; }
.hifi-surface-orbit-ring-04 { opacity: .66; }
.hifi-surface-orbit-ring-05 { opacity: .62; }

.hifi-surface-organism {
  fill: rgba(255, 255, 252, .88);
  transform-box: view-box !important;
  filter: drop-shadow(0 0 5px rgba(255, 255, 252, .72));
  animation: xb-hifiOrganismPulse 2.8s ease-in-out infinite;
}

.hifi-surface-organism-bright {
  fill: rgba(255, 255, 255, .98);
}

.hifi-surface-organism-warm {
  fill: rgba(255, 238, 192, .92);
  filter: drop-shadow(0 0 5px rgba(255, 232, 182, .72));
}

.hifi-surface-organism-crystal {
  fill: rgba(234, 255, 252, .7);
  stroke: rgba(255, 255, 255, .45);
  stroke-width: .8;
}

.hifi-ring-cyan {
  stroke: rgba(130, 255, 245, .78);
  stroke-width: 2.6;
  filter: drop-shadow(0 0 10px rgba(104, 255, 244, .78));
}

.hifi-ring-white {
  stroke: rgba(246, 255, 252, .74);
  stroke-width: 2.05;
  filter: drop-shadow(0 0 9px rgba(246, 255, 252, .68));
}

.hifi-ring-gold {
  stroke: rgba(255, 220, 150, .78);
  stroke-width: 2.15;
  filter: drop-shadow(0 0 10px rgba(255, 214, 132, .66));
}

.hifi-ring-faint {
  opacity: .7;
}

.hifi-ring-broken {
  stroke-dasharray: 520 20 220 14;
}

.hifi-core-orbit-ring-line {
  animation: xb-hifiRingTraceFlow 8s linear infinite;
}

.hifi-core-orbit-ring-01 {
  opacity: .9;
}

.hifi-core-orbit-ring-02 {
  opacity: .82;
}

.hifi-core-orbit-ring-03 {
  opacity: .78;
}

.hifi-core-orbit-ring-04 {
  opacity: .68;
}

.hifi-core-orbit-ring-05 {
  opacity: .58;
}

.hifi-ring-organism {
  fill: rgba(255, 255, 252, .86);
  filter: drop-shadow(0 0 7px rgba(255, 255, 252, .82)) drop-shadow(0 0 12px rgba(125, 255, 245, .45));
  transform-origin: center;
  animation: xb-hifiOrganismPulse 2.8s ease-in-out infinite;
}

.hifi-ring-organism-lg,
.hifi-ring-organism-bright {
  fill: rgba(255, 255, 255, .95);
}

.hifi-ring-organism-warm {
  fill: rgba(255, 238, 190, .9);
  filter: drop-shadow(0 0 7px rgba(255, 230, 174, .84)) drop-shadow(0 0 12px rgba(255, 210, 120, .42));
}

.hifi-inner {
  stroke-width: 7;
  stroke-dasharray: 70 28;
  opacity: .14;
}

.hifi-inner.hifi-thin {
  stroke-width: 5;
  stroke-dasharray: 92 38;
  opacity: .1;
}

.hifi-inner-fragment {
  stroke-width: 5;
  opacity: .12;
}

.hifi-cyan-boost {
  stroke: rgba(132, 255, 245, .76);
}

.hifi-gold-boost {
  stroke: rgba(255, 215, 138, .68);
}

.hifi-core-warmth {
  opacity: .045;
}

.hifi-gold-glint {
  stroke: url(#hifi-grad-gold-stroke);
  stroke-width: 5;
  opacity: .045;
}

.hifi-rim-spark {
  stroke-width: 4;
}

.hifi-edge-gold-glints .hifi-gold-edge-fragment {
  stroke-width: 3;
  opacity: .065;
  filter: drop-shadow(0 0 5px rgba(255, 214, 132, .36)) blur(.6px);
}

.hifi-white-glint {
  stroke-width: 5;
  opacity: .12;
}

.hifi-bottom {
  opacity: .08;
}

.hifi-crystal {
  fill: url(#hifi-grad-crystal);
  stroke: rgba(224, 255, 250, .22);
  stroke-width: 1.4;
  opacity: .16;
}

.hifi-crystal-back {
  opacity: .09;
}

.hifi-crystal-small {
  opacity: .12;
}

.hifi-particles circle {
  fill: currentColor;
}

.hifi-particles {
  opacity: .2;
  animation: xb-hifiParticleDrift 8s ease-in-out infinite alternate;
}

.hifi-dust {
  color: rgba(226, 255, 250, .55);
  opacity: .13;
}

.hifi-white-sparks {
  color: rgba(248, 255, 252, .85);
  opacity: .18;
  animation-duration: 7s;
}

.hifi-cyan-sparks {
  color: rgba(126, 245, 237, .78);
  opacity: .18;
  animation-duration: 6.4s;
}

.hifi-gold-sparks {
  color: rgba(255, 215, 138, .72);
  opacity: .055;
  animation-duration: 6.8s;
}

.hifi-rim-glow,
.hifi-white-glint,
.hifi-gold-glint {
  animation: xb-hifiGlintBreath 4.8s ease-in-out infinite;
}

.hifi-cyan-boost,
.hifi-gold-boost {
  animation: xb-hifiInnerPulse 5.6s ease-in-out infinite;
}

.hifi-shell-front,
.hifi-shell-back {
  animation: xb-hifiShellBreath 7s ease-in-out infinite;
}

@keyframes xb-hifiShellBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.006); }
}

@keyframes xb-hifiGlintBreath {
  0%, 100% { stroke-opacity: .68; }
  50% { stroke-opacity: 1; }
}

@keyframes xb-hifiInnerPulse {
  0%, 100% { stroke-opacity: .75; }
  50% { stroke-opacity: 1; }
}

@keyframes xb-hifiParticleDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(7px, -8px, 0); }
}

@keyframes xb-hifiHaloDrift {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -260; }
}

@keyframes xb-hifiRingTraceFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -220; }
}

@keyframes xb-hifiSurfaceTraceFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -360; }
}

@keyframes xb-hifiCyanHaloPulse {
  0%, 100% { stroke-opacity: .7; }
  50% { stroke-opacity: 1; }
}

@keyframes xb-hifiGoldHaloPulse {
  0%, 100% { stroke-opacity: .56; }
  50% { stroke-opacity: .95; }
}

@keyframes xb-hifiRingOrbit01 {
  0% { transform: rotate(0deg) scaleX(1) scaleY(1); }
  28% { transform: rotate(103deg) scaleX(1.02) scaleY(.985); }
  61% { transform: rotate(219deg) scaleX(.992) scaleY(1.018); }
  100% { transform: rotate(360deg) scaleX(1) scaleY(1); }
}

@keyframes xb-hifiRingOrbit02 {
  0% { transform: rotate(0deg) scaleX(1) scaleY(1); }
  35% { transform: rotate(-118deg) scaleX(.985) scaleY(1.02); }
  72% { transform: rotate(-267deg) scaleX(1.018) scaleY(.99); }
  100% { transform: rotate(-360deg) scaleX(1) scaleY(1); }
}

@keyframes xb-hifiRingOrbit03 {
  0% { transform: rotate(0deg) scaleX(1) scaleY(1); }
  24% { transform: rotate(89deg) scaleX(1.012) scaleY(.99); }
  58% { transform: rotate(214deg) scaleX(.985) scaleY(1.015); }
  100% { transform: rotate(360deg) scaleX(1) scaleY(1); }
}

@keyframes xb-hifiRingOrbit04 {
  0% { transform: rotate(0deg) scaleX(1) scaleY(1); }
  42% { transform: rotate(-154deg) scaleX(1.018) scaleY(.986); }
  79% { transform: rotate(-291deg) scaleX(.992) scaleY(1.014); }
  100% { transform: rotate(-360deg) scaleX(1) scaleY(1); }
}

@keyframes xb-hifiRingOrbit05 {
  0% { transform: rotate(0deg) scaleX(1) scaleY(1); }
  31% { transform: rotate(112deg) scaleX(.988) scaleY(1.016); }
  69% { transform: rotate(252deg) scaleX(1.014) scaleY(.988); }
  100% { transform: rotate(360deg) scaleX(1) scaleY(1); }
}

@keyframes xb-hifiOrganismPulse {
  0%, 100% { opacity: .62; transform: scale(.88); }
  50% { opacity: 1; transform: scale(1.18); }
}

.xiaobu-agent[data-state="listening"] .hifi-aura,
.xiaobu-agent[data-state="thinking"] .hifi-aura,
.xiaobu-agent[data-state="analyzing"] .hifi-aura {
  opacity: .16;
}

.xiaobu-agent[data-state="listening"] .hifi-cyan-glow,
.xiaobu-agent[data-state="listening"] .hifi-cyan-refraction {
  opacity: .095;
}

.xiaobu-agent[data-state="listening"] #hifi-inner-cyan-orbital-halo-main,
.xiaobu-agent[data-state="thinking"] #hifi-inner-cyan-orbital-halo-main {
  opacity: .42;
  stroke-width: 2.2;
}

.xiaobu-agent[data-state="listening"] .hifi-core-saturn-ring-system,
.xiaobu-agent[data-state="thinking"] .hifi-core-saturn-ring-system,
.xiaobu-agent[data-state="analyzing"] .hifi-core-saturn-ring-system {
  opacity: 1;
}

.xiaobu-agent[data-state="listening"] .hifi-ring-cyan,
.xiaobu-agent[data-state="thinking"] .hifi-ring-cyan,
.xiaobu-agent[data-state="analyzing"] .hifi-ring-cyan {
  stroke-width: 2.2;
}

.xiaobu-agent[data-state="listening"] #hifi-edge-cyan-halo-contour {
  opacity: .21;
  stroke-width: 2;
}

.xiaobu-agent[data-state="thinking"] #hifi-core-cyan-ring-boost {
  opacity: .34;
  stroke-width: 2;
}

.xiaobu-agent[data-state="listening"] .hifi-cyan-sparks {
  opacity: .28;
}

.xiaobu-agent[data-state="thinking"] .hifi-cyan-boost,
.xiaobu-agent[data-state="analyzing"] .hifi-cyan-boost {
  opacity: .24;
  stroke-opacity: .92;
}

.xiaobu-agent[data-state="thinking"] .hifi-cyan-glow,
.xiaobu-agent[data-state="analyzing"] .hifi-cyan-glow {
  opacity: .085;
}

.xiaobu-agent[data-state="analyzing"] #hifi-inner-cyan-orbital-halo-main,
.xiaobu-agent[data-state="analyzing"] #hifi-core-cyan-ring-boost,
.xiaobu-agent[data-state="analyzing"] #hifi-edge-cyan-halo-contour {
  opacity: .28;
}

.xiaobu-agent[data-state="speaking"] .hifi-gold-boost,
.xiaobu-agent[data-state="success"] .hifi-gold-boost {
  opacity: .26;
  stroke-opacity: .95;
}

.xiaobu-agent[data-state="speaking"] .hifi-gold-glint,
.xiaobu-agent[data-state="success"] .hifi-gold-glint {
  opacity: .22;
}

.xiaobu-agent[data-state="speaking"] #hifi-inner-gold-orbital-halo-main,
.xiaobu-agent[data-state="success"] #hifi-inner-gold-orbital-halo-main {
  opacity: .36;
  stroke-width: 2;
}

.xiaobu-agent[data-state="speaking"] #hifi-core-gold-ring-boost,
.xiaobu-agent[data-state="success"] #hifi-core-gold-ring-boost {
  opacity: .34;
  stroke-width: 1.8;
}

.xiaobu-agent[data-state="speaking"] .hifi-edge-gold-glints .hifi-gold-edge-fragment,
.xiaobu-agent[data-state="success"] .hifi-edge-gold-glints .hifi-gold-edge-fragment {
  opacity: .28;
}

.xiaobu-agent[data-state="speaking"] .hifi-ring-gold,
.xiaobu-agent[data-state="success"] .hifi-ring-gold {
  stroke-width: 2.1;
  opacity: .84;
}

.xiaobu-agent[data-state="speaking"] .hifi-ring-organism-warm,
.xiaobu-agent[data-state="success"] .hifi-ring-organism-warm {
  opacity: 1;
}

.xiaobu-agent[data-state="speaking"] .hifi-core-warmth,
.xiaobu-agent[data-state="success"] .hifi-core-warmth {
  opacity: .13;
}

.xiaobu-agent[data-state="speaking"] .hifi-gold-sparks,
.xiaobu-agent[data-state="success"] .hifi-gold-sparks {
  opacity: .18;
}

.xiaobu-agent[data-state="uploading"] .hifi-cyan-sparks {
  opacity: .26;
  animation-duration: 4.8s;
}

.xiaobu-agent[data-state="uploading"] .hifi-inner {
  opacity: .18;
}

.xiaobu-agent[data-state="caution"] .hifi-gold-glint,
.xiaobu-agent[data-state="caution"] .hifi-core-warmth {
  opacity: .1;
}

.xiaobu-agent[data-state="error"] .hifi-aura,
.xiaobu-agent[data-state="error"] .hifi-particles,
.xiaobu-agent[data-state="error"] .hifi-crystal {
  opacity: .055;
}

.xiaobu-agent[data-state="error"] .hifi-glass {
  opacity: .1;
}

.xiaobu-agent[data-state="sleep"] .hifi-aura,
.xiaobu-agent[data-state="sleep"] .hifi-particles,
.xiaobu-agent[data-state="sleep"] .hifi-crystal,
.xiaobu-agent[data-state="sleep"] .hifi-gold-glint,
.xiaobu-agent[data-state="sleep"] .hifi-cyan-glow,
.xiaobu-agent[data-state="sleep"] .hifi-orbital-halo,
.xiaobu-agent[data-state="sleep"] .hifi-core-ring,
.xiaobu-agent[data-state="sleep"] .hifi-edge-halo,
.xiaobu-agent[data-state="sleep"] .hifi-core-saturn-ring-system,
.xiaobu-agent[data-state="sleep"] .hifi-inner {
  opacity: .06;
}

.xiaobu-agent[data-state="sleep"] .hifi-shell-front,
.xiaobu-agent[data-state="sleep"] .hifi-shell-back,
.xiaobu-agent[data-state="sleep"] .hifi-rim-cyan,
.xiaobu-agent[data-state="sleep"] .hifi-rim-white {
  opacity: .08;
}

.xiaobu-agent[data-performance="medium"] .hifi-gold-sparks,
.xiaobu-agent[data-performance="medium"] .hifi-cyan-sparks circle:nth-child(n+4),
.xiaobu-agent[data-performance="medium"] .hifi-white-sparks circle:nth-child(n+4) {
  opacity: 0;
}

.xiaobu-agent[data-performance="medium"] .hifi-aura,
.xiaobu-agent[data-performance="medium"] .hifi-caustics,
.xiaobu-agent[data-performance="medium"] .hifi-large-highlight {
  opacity: .75;
}

.xiaobu-agent[data-performance="low"] .hifi-particles,
.xiaobu-agent[data-performance="low"] .hifi-gold-glint,
.xiaobu-agent[data-performance="low"] .hifi-cyan-glow,
.xiaobu-agent[data-performance="low"] .hifi-caustics,
.xiaobu-agent[data-performance="low"] .hifi-crystal,
.xiaobu-agent[data-performance="low"] .hifi-halo-gold-main,
.xiaobu-agent[data-performance="low"] .hifi-core-gold-ring,
.xiaobu-agent[data-performance="low"] .hifi-core-orbit-ring-04,
.xiaobu-agent[data-performance="low"] .hifi-core-orbit-ring-05 {
  display: none !important;
}

.xiaobu-agent[data-performance="low"] .hifi-aura {
  opacity: .035 !important;
}

.xiaobu-agent[data-performance="low"] .hifi-shell-front,
.xiaobu-agent[data-performance="low"] .hifi-shell-back,
.xiaobu-agent[data-performance="low"] .hifi-rim-cyan,
.xiaobu-agent[data-performance="low"] .hifi-rim-white {
  opacity: .09 !important;
}

.xiaobu-agent[data-reduced-motion="1"] .xiaobu-hifi-overlay *,
.xiaobu-agent[data-page-visible="0"] .xiaobu-hifi-overlay * {
  animation-play-state: paused !important;
}

.xiaobu-living-agent-svg,
.xiaobu-polish-overlay-wrap {
  background: transparent !important;
  box-shadow: none !important;
}

.xiaobu-agent #bg-base-mint,
.xiaobu-agent #bg-radial-aura-main,
.xiaobu-agent #bg-radial-aura-cyan,
.xiaobu-agent #bg-radial-aura-gold,
.xiaobu-agent #bg-soft-fog-left,
.xiaobu-agent #bg-soft-fog-right,
.xiaobu-agent #bg-soft-fog-bottom,
.xiaobu-agent #bg-glow-falloff,
.xiaobu-agent #bg-pwa-soft-backlight,
.xiaobu-agent #polish-outer-aura-cyan-soft,
.xiaobu-agent #polish-outer-aura-cyan-wide,
.xiaobu-agent #polish-outer-aura-gold-warm,
.xiaobu-agent #polish-outer-depth-fog,
.xiaobu-agent #polish-outer-soft-bloom,
.xiaobu-agent #polish-outer-edge-mist,
.xiaobu-agent #polish-halo-orbit-depth-shadow {
  display: none !important;
  opacity: 0 !important;
}

.orb-wrap,
.orb-column {
  overflow: visible !important;
}

.xiaobu-visual-control {
  --xb-control-accent: #36bdb4;
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 10020;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.xiaobu-visual-control[data-effective="normal"] {
  --xb-control-accent: #5f9ea0;
}

.xiaobu-visual-control[data-effective="extreme"] {
  --xb-control-accent: #c8963e;
}

.xiaobu-visual-trigger {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  padding: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .78), rgba(255, 255, 255, .12) 31%, transparent 52%),
    conic-gradient(from 160deg, var(--xb-control-accent), #e7f8f4, #c8963e, var(--xb-control-accent));
  box-shadow:
    0 16px 36px rgba(31, 62, 66, .22),
    0 0 0 7px rgba(54, 189, 180, .08),
    inset 0 1px 0 rgba(255, 255, 255, .5);
  cursor: grab;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.xiaobu-visual-trigger::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 45%, rgba(6, 33, 48, .42), rgba(6, 33, 48, .76));
  z-index: 0;
}

.xiaobu-visual-trigger svg {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(127, 233, 224, .7));
}

.xiaobu-visual-trigger:hover,
.xiaobu-visual-trigger:focus-visible,
.xiaobu-visual-control[data-expanded="true"] .xiaobu-visual-trigger {
  outline: none;
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    0 18px 42px rgba(31, 62, 66, .26),
    0 0 0 9px rgba(54, 189, 180, .12),
    0 0 28px color-mix(in srgb, var(--xb-control-accent) 45%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .55);
}

.xiaobu-visual-control.is-dragging .xiaobu-visual-trigger {
  cursor: grabbing;
  transform: scale(1.06);
  filter: saturate(1.12);
}

.xiaobu-visual-menu {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 184px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(248, 253, 251, .9);
  box-shadow: 0 18px 48px rgba(16, 24, 39, .16), inset 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(18px) saturate(1.15);
  transform: translateY(10px) scale(.94);
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.xiaobu-visual-control[data-expanded="true"] .xiaobu-visual-menu,
.xiaobu-visual-control:focus-within .xiaobu-visual-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.xiaobu-visual-menu button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(54, 189, 180, .12);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .66);
  color: rgba(32, 45, 58, .74);
  font: 700 12px/1 "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.xiaobu-visual-menu button:hover,
.xiaobu-visual-menu button:focus-visible {
  color: #12252c;
  border-color: rgba(54, 189, 180, .32);
  background: rgba(255, 255, 255, .92);
  outline: none;
}

.xiaobu-visual-menu button.is-active {
  color: #ffffff;
  border-color: transparent;
  background:
    radial-gradient(circle at 25% 12%, rgba(255, 255, 255, .34), transparent 34%),
    linear-gradient(135deg, var(--xb-control-accent), #1e7f79);
  box-shadow: 0 10px 20px rgba(30, 127, 121, .18), inset 0 1px 0 rgba(255, 255, 255, .34);
}

.xiaobu-visual-control[data-effective="normal"] .xiaobu-visual-menu button.is-active {
  background:
    radial-gradient(circle at 25% 12%, rgba(255, 255, 255, .34), transparent 34%),
    linear-gradient(135deg, #5fb4b0, #5f8490);
}

.xiaobu-visual-control[data-effective="extreme"] .xiaobu-visual-menu button.is-active {
  background:
    radial-gradient(circle at 25% 12%, rgba(255, 255, 255, .38), transparent 34%),
    linear-gradient(135deg, #c8963e, #289e98);
}

.xiaobu-agent-debug-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  width: min(280px, calc(100vw - 32px));
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(34, 43, 53, .8);
  border-radius: 10px;
  background: rgba(13, 16, 20, .92);
  color: #dde7ea;
  font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  backdrop-filter: blur(8px);
}

.xiaobu-agent-debug-panel strong {
  flex: 0 0 100%;
  color: #7FE9E0;
}

.xiaobu-debug-intensity {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 2px;
}

.xiaobu-agent-debug-panel button {
  border: 1px solid #2c3742;
  border-radius: 999px;
  padding: 4px 7px;
  background: #1a2128;
  color: #dde7ea;
  font: inherit;
}

.xiaobu-agent-debug-panel button.is-active {
  border-color: #7FE9E0;
  background: rgba(127, 233, 224, .18);
  color: #ffffff;
}

.xiaobu-debug-intensity [data-xiaobu-debug-intensity="extreme"].is-active {
  border-color: #FFE9B8;
  background: rgba(255, 233, 184, .2);
}

body.motion-reduced .xiaobu-agent *,
body.motion-reduced .xiaobu-agent *::before,
body.motion-reduced .xiaobu-agent *::after {
  animation: none !important;
  transition: none !important;
}

@media (max-width: 640px) {
  .xiaobu-living-agent-host {
    inset: -4%;
  }

  .xiaobu-visual-control {
    right: 14px;
    bottom: 84px;
    width: 50px;
    height: 50px;
  }

  .xiaobu-visual-trigger {
    width: 50px;
    height: 50px;
  }

  .xiaobu-visual-menu {
    right: 0;
    bottom: 60px;
    width: min(176px, calc(100vw - 28px));
  }

  .xiaobu-visual-menu button {
    min-height: 32px;
    padding: 0 7px;
    font-size: 11px;
  }
}
