/* AI Spark, matching the console, with a visible pause control. */
.assistant-core{width:100%;max-width:138px;gap:4px}
.assistant-avatar-button{display:block;width:96px;height:96px;max-width:100%;padding:0;border:0;border-radius:14px;background:transparent;color:var(--accent);cursor:pointer;touch-action:manipulation;transition:background-color .15s ease-out}
.assistant-avatar-button:hover{background:var(--accent-soft)}
.assistant-avatar-button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.assistant-avatar-button:active{background:var(--warm)}
.assistant-avatar-art{position:relative;display:block;width:100%;height:100%;overflow:visible}
.assistant-name{font-weight:600;color:var(--ink)}
.assistant-state{display:block;min-height:2.5em;font-size:11px;line-height:1.25;text-align:center;color:var(--accent);text-wrap:balance}
.assistant-hint{display:block;max-width:100%;font-size:10px;line-height:1.4;text-align:center;color:var(--muted);text-wrap:balance}
.assistant-face [data-face]{display:none}
.assistant-core[data-state="idle"] [data-face="idle"],.assistant-core[data-state="listening"] [data-face="listening"],.assistant-core[data-state="thinking"] [data-face="thinking"],.assistant-core[data-state="done"] [data-face="done"],.assistant-core[data-state="handover"] [data-face="handover"]{display:block}

/* The console's Spark (imc-console-web SparkBot.tsx): a rendered head with SVG face and antenna
   light over it. Continuous breathing and heartbeat run only under .is-alive, which the script
   sets while the character is on screen, the tab is visible and motion is allowed. */
.assistant-core{--sb-bulb:#7fbf86;--sb-ease:cubic-bezier(.23,1,.32,1)}
.assistant-core[data-state="thinking"]{--sb-bulb:#8fd6ff}
.assistant-core[data-state="done"]{--sb-bulb:#7fe08c}
.assistant-core[data-state="handover"]{--sb-bulb:#f0b429}
.sb-body{position:absolute;inset:0;transform-origin:50% 90%}
.sb-head,.sb-layer{position:absolute;inset:0;width:100%;height:100%;overflow:visible;transform-origin:50% 90%}
.sb-head{object-fit:contain;user-select:none;pointer-events:none}
.sb-layer{pointer-events:none}
.sb-halo{fill:var(--sb-bulb);opacity:.22;filter:blur(18px);transform-origin:522px 139px}
.sb-bulb{transform-origin:522px 139px}
.sb-bulb-stop{stop-color:var(--sb-bulb)}
.sb-eye{fill:#fff1d6;transform-box:fill-box;transform-origin:center;transition:transform 90ms ease-out}
.sb.sb-blinking .sb-eye{transform:scaleY(.08)}
.sb-face{transform:translate(calc(var(--sb-gx,0)*14px),calc(var(--sb-gy,0)*10px));transition:transform .24s var(--sb-ease)}
.sb-look{transform:translate(calc(var(--sb-gx,0)*34px),calc(var(--sb-gy,0)*24px));transition:transform .24s var(--sb-ease)}
.assistant-core[data-state="listening"] .sb-look{transform:translate(calc(var(--sb-gx,0)*20px),0)}
.sb-line{fill:none;stroke:#fff1d6;stroke-width:26;stroke-linecap:round}
.sb-thin{stroke-width:20}
.sb-fill,.sb-dots circle{fill:#fff1d6}
.sb-dots circle:nth-child(2){animation-delay:.16s}.sb-dots circle:nth-child(3){animation-delay:.32s}
.assistant-core[data-state="handover"] .sb-halo{opacity:.35}
.assistant-core.is-alive .sb-halo{animation:sb-heart 2.6s ease-in-out infinite}
.assistant-core.is-alive .sb-head,.assistant-core.is-alive .sb-layer{animation:sb-breathe 4.2s ease-in-out infinite}
.assistant-core.is-alive[data-state="thinking"] .sb-halo,.assistant-core.is-alive[data-state="listening"] .sb-halo{animation-duration:.9s;opacity:.4}
.assistant-core.is-alive[data-state="handover"] .sb-halo{animation:none}
.assistant-core.is-alive .sb-dots circle{animation:sb-dot 1.1s ease-in-out infinite}
.assistant-core.is-animated[data-state="done"] .sb-head,.assistant-core.is-animated[data-state="done"] .sb-layer{animation:sb-hop .56s cubic-bezier(.2,.8,.2,1) both}
.sb-body.sb-in-a{animation:sb-in-a .24s var(--sb-ease)}
.sb-body.sb-in-b{animation:sb-in-b .24s var(--sb-ease)}
.sb[data-beat="look-l"] .sb-look{animation:sb-look-l 1s var(--sb-ease)}
.sb[data-beat="look-r"] .sb-look{animation:sb-look-r 1s var(--sb-ease)}
.sb[data-beat="tilt"] .sb-body{animation:sb-tilt 1.1s var(--sb-ease)}
.sb[data-beat="flicker"] .sb-bulb{animation:sb-flicker .6s linear}
@keyframes sb-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2.5%) scale(1.025)}}
@keyframes sb-heart{0%,100%{opacity:.15;transform:scale(.9)}45%{opacity:.5;transform:scale(1.1)}}
@keyframes sb-hop{0%{transform:scale(.92) rotate(-5deg)}45%{transform:translateY(-5%) scale(1.05) rotate(3deg)}100%{transform:none}}
@keyframes sb-dot{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-14px)}}
@keyframes sb-look-l{25%,70%{transform:translate(-58px,6px)}}
@keyframes sb-look-r{25%,70%{transform:translate(58px,6px)}}
@keyframes sb-tilt{30%,65%{transform:rotate(-7deg)}}
@keyframes sb-flicker{0%,100%{opacity:1}15%{opacity:.25}30%{opacity:1}50%{opacity:.45}65%{opacity:1}}
@keyframes sb-in-a{from{transform:scale(.86)}}
@keyframes sb-in-b{from{transform:scale(.86)}}
@media(max-width:1100px) and (min-width:761px){.assistant-avatar-button{width:84px;height:84px}}
@media(max-width:760px){.assistant-avatar-button{width:72px;height:72px}.assistant-core{max-width:180px;gap:3px}.assistant-state{min-height:1.25em}.assistant-hint{font-size:10px}.assistant-name{font-size:11px}}
@media(prefers-reduced-motion:reduce){.assistant-core .sb-halo,.assistant-core .sb-head,.assistant-core .sb-layer,.assistant-core .sb-body,.assistant-core .sb-look,.assistant-core .sb-bulb,.assistant-core .sb-dots circle{animation:none!important}.assistant-core .sb-eye,.assistant-core .sb-face,.assistant-core .sb-look{transition:none;transform:none!important}.assistant-avatar-button{transition:none}}

.assistant-controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 5px;max-width:100%}
.assistant-autoplay{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:44px;min-width:44px;padding:4px;border:0;border-radius:7px;background:transparent;color:var(--ink);font:inherit;font-size:11px;cursor:pointer;touch-action:manipulation}
.assistant-autoplay:hover{background:var(--accent-soft)}
.assistant-autoplay:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.assistant-autoplay:disabled{color:var(--muted);cursor:default}
