/* Бипыч: isolated styles; do not override the host application. */
.bipych{--bipych-size:96px;--bipych-hop:-7px;--bipych-think-speed:3.6s;--bipych-proud-speed:3.2s;--bipych-accent:#F483AD;--bipych-outline:#155766;display:inline-flex;position:relative;vertical-align:middle;flex-direction:column;align-items:center;width:var(--bipych-size);max-width:100%;isolation:isolate;line-height:1.3;font-family:inherit}
.bipych *{box-sizing:border-box}
.bipych-picture,.bipych-svg{display:block;width:100%;aspect-ratio:1;overflow:visible}
.bipych-svg [hidden]{display:none}
.bipych-actor,.bipych-hand,.bipych-foot,.bipych-net,.bipych-eyes,.bipych-satellite{transform-box:fill-box;transform-origin:center}
.bipych-actor{transform-origin:50% 100%}
.bipych-shadow{opacity:.12}
[data-skin=orbit] .bipych[data-color=black] .bipych-outline{stroke:#77909A;stroke-width:1}
.bipych-blush,.bipych-question,.bipych-zzz,.bipych-thought,.bipych-pride,.bipych-shy-hands,.bipych-confetti,.bipych-eyes-happy,.bipych-eyes-sleep,.bipych-net{display:none}
.bipych-hand-right{transform-box:view-box;transform-origin:116px 90px}
.bipych-net[data-equipped=true]{display:block}
.bipych[data-state=idle] .bipych-actor{animation:bipych-breathe 4s steps(3,end) infinite}
.bipych[data-state=idle] .bipych-eyes-normal{animation:bipych-blink 6s steps(1,end) infinite}
.bipych[data-state=happy] .bipych-eyes-normal,.bipych[data-state=celebrate] .bipych-eyes-normal,.bipych[data-state=proud] .bipych-eyes-normal,.bipych[data-state=sleep] .bipych-eyes-normal{display:none}
.bipych[data-state=happy] .bipych-eyes-happy,.bipych[data-state=celebrate] .bipych-eyes-happy,.bipych[data-state=proud] .bipych-eyes-happy,.bipych[data-state=sleep] .bipych-eyes-sleep{display:block}
.bipych[data-state=happy] .bipych-actor{animation:bipych-hop 1.4s steps(4,end) infinite}
.bipych[data-state=happy] .bipych-hand-right{transform:translateY(-8px) rotate(-18deg)}
.bipych[data-state=thinking] .bipych-actor{transform:translateY(-1px) rotate(-2deg);animation:bipych-think-body var(--bipych-think-speed) steps(5,end) infinite}
.bipych[data-state=thinking] .bipych-eyes-normal{transform:translate(-3px,-3px);animation:bipych-think-eyes var(--bipych-think-speed) steps(1,end) infinite}
.bipych[data-state=thinking] .bipych-hand-left{transform:translate(10px,-12px);animation:bipych-think-hand var(--bipych-think-speed) steps(4,end) infinite}
.bipych[data-state=thinking] .bipych-hand-right{transform:translate(2px,-3px)}
.bipych[data-state=thinking] .bipych-satellite{animation:bipych-pixel-think var(--bipych-think-speed) steps(4,end) infinite}
.bipych[data-state=thinking] .bipych-thought{display:block}
.bipych-thought-dot{animation:bipych-thought var(--bipych-think-speed) steps(3,end) infinite;transform-box:fill-box;transform-origin:center}
.bipych-thought-dot-1{animation-delay:-.4s}.bipych-thought-dot-2{animation-delay:-.8s}
.bipych[data-state=confused] .bipych-actor{transform:rotate(-7deg)}
.bipych[data-state=confused] .bipych-question{display:block;animation:bipych-question 2s steps(2,end) infinite}
.bipych[data-state=confused] .bipych-eyes-normal{transform:translateY(-3px)}
.bipych[data-state=proud] .bipych-actor{transform:translateY(-3px);animation:bipych-proud-body var(--bipych-proud-speed) steps(5,end) infinite}
.bipych[data-state=proud] .bipych-hand-left{transform:translate(-2px,-16px) rotate(8deg);animation:bipych-proud-hand var(--bipych-proud-speed) steps(5,end) infinite}
.bipych[data-state=proud] .bipych-hand-right{transform:translate(2px,-10px) rotate(-30deg)}
.bipych[data-state=proud] .bipych-pride{display:block}
.bipych-pride-star{animation:bipych-proud-glint var(--bipych-proud-speed) steps(2,end) infinite;transform-box:fill-box;transform-origin:center}
.bipych-pride-star-1{animation-delay:-.3s}
.bipych[data-state=proud] .bipych-satellite{animation:bipych-proud-pixel var(--bipych-proud-speed) steps(4,end) infinite}
.bipych[data-state=shy] .bipych-blush{display:block}
.bipych[data-state=shy]{--bipych-shy-speed:3.2s}
.bipych[data-state=shy] .bipych-eyes-normal{transform:translate(0,5px) scaleY(.85)}
.bipych[data-state=shy] .bipych-actor{transform:translateY(2px) rotate(2deg);animation:bipych-shy-sway var(--bipych-shy-speed) steps(4,end) infinite}
.bipych[data-state=shy] .bipych-hand-left,.bipych[data-state=shy] .bipych-hand-right{visibility:hidden}
.bipych[data-state=shy] .bipych-shy-hands{display:block}
.bipych-shy-hand-left,.bipych-shy-hand-right{transform-box:view-box;transform-origin:68px 88px}
.bipych-shy-hand-left{transform:translateX(3px);animation:bipych-shy-left var(--bipych-shy-speed,3.2s) steps(4,end) infinite}
.bipych-shy-hand-right{transform:translateX(-3px);animation:bipych-shy-right var(--bipych-shy-speed,3.2s) steps(4,end) infinite}
.bipych[data-state=shy] .bipych-net[data-equipped=true]{visibility:visible;transform:translate(6px,22px)}
.bipych[data-state=catching] .bipych-net{display:block}
.bipych[data-state=catching] .bipych-hand-right{animation:bipych-catch 1.7s steps(5,end) infinite}
.bipych[data-state=catching] .bipych-actor{transform:rotate(5deg)}
.bipych[data-state=catching] .bipych-eyes-normal{transform:translate(4px,-2px)}
.bipych[data-state=celebrate] .bipych-actor{animation:bipych-dance 1.3s steps(4,end) infinite}
.bipych[data-state=celebrate] .bipych-hand-left{transform:translateY(-18px) rotate(25deg)}
.bipych[data-state=celebrate] .bipych-hand-right{transform:translateY(-18px) rotate(-25deg)}
.bipych[data-state=celebrate] .bipych-confetti{display:block}
.bipych[data-net=true] .bipych-hand-right{transform:none}
.bipych-spark{animation:bipych-confetti 2s steps(5,end) infinite;transform-box:fill-box;transform-origin:center}
.bipych-spark-1,.bipych-spark-4{animation-delay:-.7s}
.bipych-spark-2,.bipych-spark-5{animation-delay:-1.3s}
.bipych[data-state=sleep] .bipych-actor{transform:translateY(4px) rotate(5deg);animation:bipych-sleep 5s steps(3,end) infinite}
.bipych[data-state=sleep] .bipych-zzz{display:block}
.bipych-sleep-z{transform-box:view-box;transform-origin:108px 42px;animation:bipych-sleep-z 3.6s steps(8,end) infinite}
.bipych-sleep-z-1{animation-delay:-1.2s;transform:translate(6px,-10px)}
.bipych-sleep-z-2{animation-delay:-2.4s;transform:translate(12px,-20px)}
.bipych-magic-star,.bipych-firefly,.bipych-orbit-mote,.bipych-stardust,.bipych-comet-tail,.bipych-ufo-beam,.bipych-eq{transform-box:fill-box;transform-origin:center}
.bipych-magic-star{animation:bipych-magic 2.8s steps(3,end) infinite}
.bipych-firefly{animation:bipych-firefly 3.6s steps(4,end) infinite}
.bipych-eq{transform-origin:center bottom;animation:bipych-equalizer 1.6s steps(3,end) infinite}
.bipych-eq-1{animation-delay:-.4s}.bipych-eq-2{animation-delay:-.8s}.bipych-eq-3{animation-delay:-1.2s}
.bipych-orbit-mote{animation:bipych-orbit 4s steps(1,end) infinite}
.bipych-stardust,.bipych-comet-tail{animation:bipych-stardust 2.4s steps(3,end) infinite}
.bipych-ufo-beam{opacity:.4;animation:bipych-scan 3s steps(3,end) infinite;transform-origin:center top}
.bipych[data-state=sleep] :is(.bipych-magic-star,.bipych-firefly,.bipych-orbit-mote,.bipych-stardust,.bipych-comet-tail,.bipych-ufo-beam,.bipych-eq){animation-play-state:paused}
.bipych[data-state=sleep] .bipych-satellite{opacity:.35;animation:none}
.bipych-satellite{animation:bipych-float 3s steps(4,end) infinite}
.bipych[data-age=senior]{--bipych-hop:-3px;--bipych-think-speed:4s;--bipych-proud-speed:4s}
.bipych[data-age=senior][data-state=shy]{--bipych-shy-speed:4s}
.bipych[data-age=senior] .bipych-actor{animation-duration:4s}
.bipych-charge{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;color:var(--ink,#1E2B40);font-size:11px;font-weight:700;line-height:1.3}
.bipych-charge-cells{display:grid;grid-template-columns:repeat(var(--bipych-goal,5),minmax(0,1fr));gap:2px;flex:1;max-width:96px}
.bipych-charge[hidden]{display:none}
.bipych-charge-cells i{height:6px;border:1px solid var(--bipych-outline);background:transparent}
.bipych-charge-cells i[data-filled=true]{background:var(--bipych-accent)}
.bipych[data-full=true] .bipych-charge-cells i{background:var(--bipych-accent);border-color:var(--bipych-outline)}
.bipych[data-compact=true] .bipych-charge{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.bipych-bubble{position:relative;align-self:center;width:max-content;max-width:min(240px,calc(100vw - 64px));margin:0 0 4px;padding:10px 12px;background:var(--sheet,#fff);border:2px solid var(--bipych-outline);border-radius:8px;color:var(--ink,#1E2B40);font-size:14px;line-height:1.45;overflow-wrap:anywhere;text-align:left}
.bipych-bubble[hidden]{display:none}
.bipych-bubble::after{content:"";position:absolute;bottom:-6px;left:calc(50% - 4px);width:8px;height:8px;background:var(--sheet,#fff);border-right:2px solid var(--bipych-outline);border-bottom:2px solid var(--bipych-outline);transform:rotate(45deg)}
@keyframes bipych-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes bipych-blink{0%,45%,49%,100%{transform:scaleY(1)}46%,48%{transform:scaleY(.15)}}
@keyframes bipych-hop{0%,65%,100%{transform:translateY(0)}30%{transform:translateY(var(--bipych-hop))}}
@keyframes bipych-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes bipych-pixel-think{0%,100%{transform:translate(0,0);opacity:1}50%{transform:translate(-4px,-4px);opacity:.6}}
@keyframes bipych-think-body{0%,100%{transform:translate(0,0) rotate(-2deg)}25%{transform:translate(-2px,-2px) rotate(-2deg)}55%{transform:translate(2px,-1px) rotate(2deg)}80%{transform:translate(0,0) rotate(0)}}
@keyframes bipych-think-eyes{0%,20%,100%{transform:translate(-3px,-3px)}35%,65%{transform:translate(3px,-4px)}80%,90%{transform:translate(0,0)}}
@keyframes bipych-think-hand{0%,100%{transform:translate(10px,-12px) rotate(-8deg)}25%,45%{transform:translate(12px,-16px) rotate(6deg)}65%,80%{transform:translate(8px,-10px) rotate(-4deg)}}
@keyframes bipych-thought{0%,10%{opacity:.15;transform:translateY(2px)}30%,65%{opacity:1;transform:translateY(0)}90%,100%{opacity:.15;transform:translateY(-2px)}}
@keyframes bipych-proud-body{0%,100%{transform:translateY(-2px)}20%,40%{transform:translateY(-6px)}55%{transform:translateY(-3px) rotate(-2deg)}70%{transform:translateY(-2px) rotate(2deg)}85%{transform:translateY(-3px)}}
@keyframes bipych-proud-hand{0%,100%{transform:translate(-2px,-6px) rotate(18deg)}20%,45%{transform:translate(-2px,-24px) rotate(8deg)}60%{transform:translate(-2px,-6px) rotate(18deg)}75%{transform:translate(-2px,-16px) rotate(8deg)}}
@keyframes bipych-proud-glint{0%,10%,65%,100%{opacity:0;transform:translateY(2px) scale(.5)}20%,45%{opacity:1;transform:translateY(-2px) scale(1)}}
@keyframes bipych-proud-pixel{0%,100%{transform:translateY(0)}20%,40%{transform:translateY(-8px)}65%{transform:translateY(-2px)}}
@keyframes bipych-shy-left{0%,100%{transform:translateX(0)}25%,40%{transform:translateX(4px)}50%{transform:translateX(1px)}60%,75%{transform:translateX(4px)}90%{transform:translateX(0)}}
@keyframes bipych-shy-right{0%,100%{transform:translateX(0)}25%,40%{transform:translateX(-4px)}50%{transform:translateX(-1px)}60%,75%{transform:translateX(-4px)}90%{transform:translateX(0)}}
@keyframes bipych-shy-sway{0%,100%{transform:translateY(2px) rotate(2deg)}35%{transform:translateY(3px) rotate(-1deg)}70%{transform:translateY(2px) rotate(1deg)}}
@keyframes bipych-question{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes bipych-catch{0%,100%{transform:translate(0,0)}45%{transform:translate(2px,-4px)}}
@keyframes bipych-dance{0%,100%{transform:translateY(0) rotate(-3deg)}25%{transform:translateY(var(--bipych-hop)) rotate(3deg)}60%{transform:translateY(0) rotate(3deg)}80%{transform:translateY(var(--bipych-hop)) rotate(-3deg)}}
@keyframes bipych-confetti{0%{transform:translateY(-3px);opacity:0}20%{opacity:1}85%{opacity:1}100%{transform:translateY(10px) rotate(90deg);opacity:0}}
@keyframes bipych-sleep{0%,100%{transform:translateY(4px) rotate(5deg)}50%{transform:translateY(2px) rotate(5deg)}}
@keyframes bipych-sleep-z{0%{transform:translate(0,2px) scale(.65);opacity:0}20%{opacity:.9}75%{opacity:.8}100%{transform:translate(18px,-30px) scale(1.1);opacity:0}}
@keyframes bipych-magic{0%,100%{opacity:1;transform:translateY(0)}50%{opacity:.45;transform:translateY(-3px)}}
@keyframes bipych-firefly{0%,100%{transform:translate(0,0);opacity:.6}35%{transform:translate(-4px,-4px);opacity:1}70%{transform:translate(2px,-2px);opacity:1}}
@keyframes bipych-equalizer{0%,100%{transform:scaleY(.4)}50%{transform:scaleY(1)}}
@keyframes bipych-orbit{0%,100%{transform:translate(0,0)}25%{transform:translate(20px,-12px)}50%{transform:translate(40px,12px)}75%{transform:translate(20px,32px)}}
@keyframes bipych-stardust{0%,100%{opacity:.45;transform:translate(0,0)}50%{opacity:1;transform:translate(-2px,-2px)}}
@keyframes bipych-scan{0%,100%{opacity:.2;transform:scaleY(.65)}50%{opacity:.6;transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){.bipych *,.bipych *::before,.bipych *::after{animation:none!important;transition:none!important}.bipych-confetti,.bipych-spark,.bipych-thought-dot,.bipych-pride-star{opacity:1}}

/* Бипыч говорит: рот виден только во время речи, кадры сменяются в такт */
.bipych-mouth{display:none}
.bipych[data-talking="true"] .bipych-mouth{display:inline}
.bipych[data-talking="true"] .bipych-mouth-open{animation:bipych-talk .24s steps(1) infinite}
@keyframes bipych-talk{0%{opacity:1}50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.bipych[data-talking="true"] .bipych-mouth-open{animation:none}}
/* Бипыч говорит: качается в такт, жесты рукой */
.bipych[data-talking="true"] .bipych-actor{animation:bipych-talk-bob .36s ease-in-out infinite}
.bipych[data-gesture="wave"] .bipych-hand-right{transform-box:view-box;transform-origin:112px 92px;animation:bipych-wave .45s ease-in-out infinite;visibility:visible}
.bipych[data-gesture="point"] .bipych-hand-left{transform-box:view-box;transform-origin:28px 92px;animation:bipych-point .9s ease-in-out infinite;visibility:visible}
.bipych[data-gesture="nod"] .bipych-actor{animation:bipych-nod .5s ease-in-out infinite}
@keyframes bipych-talk-bob{0%,100%{transform:translateY(0) rotate(0)}30%{transform:translateY(-3px) rotate(-1.5deg)}70%{transform:translateY(-1px) rotate(1.5deg)}}
@keyframes bipych-wave{0%,100%{transform:translateY(-10px) rotate(-40deg)}50%{transform:translateY(-12px) rotate(-5deg)}}
@keyframes bipych-point{0%,100%{transform:translate(-4px,-10px) rotate(30deg)}50%{transform:translate(-8px,-12px) rotate(40deg)}}
@keyframes bipych-nod{0%,100%{transform:translateY(0)}50%{transform:translateY(4px)}}
@media (prefers-reduced-motion:reduce){.bipych[data-talking="true"] .bipych-actor,.bipych[data-gesture] .bipych-hand-right,.bipych[data-gesture] .bipych-hand-left,.bipych[data-gesture] .bipych-actor{animation:none}}
