/* KIVO Agent v1: pure CSS animations, no tracking, accessible controls */
#kivo-agent{--ka-bg:#102338;--ka-fg:#f1fbff;--ka-border:#60e8d6;--ka-alt:#bcfff1;--ka-shadow:rgba(0,0,0,.28);position:fixed;z-index:210;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:132px;max-width:calc(100vw - 20px);font:400 14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ka-fg);isolation:isolate}
#kivo-agent[data-world=junior]{--ka-bg:#ffffff;--ka-fg:#144a57;--ka-border:#219d91;--ka-alt:#146e75;--ka-shadow:rgba(29,105,103,.27)}
#kivo-agent[data-world=teen]{--ka-bg:#13132b;--ka-fg:#f5eaff;--ka-border:#6cfce3;--ka-alt:#8fffea;--ka-shadow:rgba(111,43,167,.4)}
#kivo-agent[data-world=adult]{--ka-bg:#221c1b;--ka-fg:#f8e8cd;--ka-border:#dfba7b;--ka-alt:#e7c395;--ka-shadow:rgba(0,0,0,.5)}
#kivo-agent *,#kivo-agent *:before,#kivo-agent *:after{box-sizing:border-box}#kivo-agent button,#kivo-agent a{font:inherit}#kivo-agent button{cursor:pointer}
#kivo-agent button:focus-visible,#kivo-agent a:focus-visible{outline:3px solid var(--ka-border);outline-offset:3px}
#kivo-agent .kivo-face-button{display:grid;place-items:center;margin-left:auto;background:transparent;border:0;padding:0;width:118px;height:130px;position:relative;filter:drop-shadow(0 8px 12px var(--ka-shadow));touch-action:manipulation}
#kivo-agent .kivo-face-button img{width:117px;height:123px;object-fit:contain;display:block;user-select:none;-webkit-user-drag:none}
#kivo-agent .kivo-face-button:before{content:"";position:absolute;inset:18px 12px 0;border-radius:50%;background:radial-gradient(ellipse,var(--ka-border),transparent 70%);opacity:.38;z-index:-1}
#kivo-agent .kivo-face-button .kivo-tag{position:absolute;left:9px;bottom:0;min-width:59px;min-height:25px;border-radius:99px;padding:3px 8px;background:var(--ka-bg);border:1px solid var(--ka-border);box-shadow:0 4px 14px var(--ka-shadow);font:900 11px system-ui,sans-serif;letter-spacing:.08em;text-align:center}
#kivo-agent .kivo-bubble{position:absolute;bottom:125px;right:5px;width:clamp(190px,32vw,255px);max-width:calc(100vw - 23px);padding:12px 14px;background:var(--ka-bg);color:var(--ka-fg);border:2px solid var(--ka-border);border-radius:17px;box-shadow:0 12px 40px var(--ka-shadow);font-size:13px;font-weight:750;line-height:1.42;pointer-events:none;animation:kivo-reveal .28s both}
#kivo-agent .kivo-bubble[hidden]{display:none}
#kivo-agent .kivo-menu{max-height:min(78svh,620px);overflow-y:auto;overscroll-behavior:contain;position:absolute;right:0;bottom:127px;width:min(315px,calc(100vw - 22px));padding:16px;background:var(--ka-bg);border:2px solid var(--ka-border);border-radius:17px;box-shadow:0 17px 45px var(--ka-shadow);color:var(--ka-fg);font:400 14px/1.55 system-ui,sans-serif;animation:kivo-reveal .2s both}
#kivo-agent .kivo-menu[hidden]{display:none}
#kivo-agent .kivo-top{display:flex;align-items:center;gap:11px;margin-bottom:6px}
#kivo-agent .kivo-title{font-size:1.04rem;font-weight:900;letter-spacing:-.02em}
#kivo-agent .kivo-subtitle{font-size:.74rem;opacity:.8}
#kivo-agent .kivo-close{margin-left:auto;border:1px solid var(--ka-border);border-radius:8px;color:var(--ka-fg);background:transparent;min-width:34px;min-height:34px;display:grid;place-items:center}
#kivo-agent .kivo-talk{margin:9px 0 14px;min-height:47px;font-size:.89rem;line-height:1.5}
#kivo-agent .kivo-links{display:grid;gap:8px}
#kivo-agent .kivo-link{display:flex;align-items:center;justify-content:space-between;gap:9px;text-decoration:none;border:1px solid var(--ka-border);border-radius:9px;color:var(--ka-fg);padding:9px 11px;min-height:44px;background:transparent;font-size:.83rem;font-weight:850}
#kivo-agent .kivo-link:hover{background:color-mix(in srgb,var(--ka-border) 16%,transparent)}
#kivo-agent .kivo-tools{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px}
#kivo-agent .kivo-tool{min-height:40px;border-radius:9px;border:1px solid var(--ka-border);background:transparent;color:var(--ka-alt);font-size:.76rem;font-weight:850;padding:7px}
#kivo-agent .kivo-tool:hover{background:color-mix(in srgb,var(--ka-border) 15%,transparent)}
#kivo-agent .kivo-micro{margin-top:10px;font-size:.66rem;opacity:.72}
#kivo-agent[data-motion=on] .kivo-face-button img{animation:kivo-bob 2.8s ease-in-out infinite}
#kivo-agent[data-motion=on].kivo-running .kivo-face-button img{animation:kivo-dash 5.4s ease-in-out 1}
#kivo-agent.kivo-talking .kivo-face-button img{animation:kivo-chirp .48s ease-in-out 2}
#kivo-agent[data-minimized=true]{width:57px}
#kivo-agent[data-minimized=true] .kivo-face-button{width:54px;height:54px;background:var(--ka-bg);border-radius:50%;border:2px solid var(--ka-border)}
#kivo-agent[data-minimized=true] .kivo-face-button img{width:49px;height:49px;animation:none}
#kivo-agent[data-minimized=true] .kivo-face-button .kivo-tag{display:none}
#kivo-agent[data-minimized=true] .kivo-menu,#kivo-agent[data-minimized=true] .kivo-bubble{display:none!important}
@keyframes kivo-bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-8px) rotate(3deg)}}
@keyframes kivo-dash{0%,100%{transform:translateX(0) rotate(0)}12%{transform:translateX(-8vw) translateY(-16px) rotate(-10deg)}33%{transform:translateX(-22vw) translateY(0) rotate(12deg)}58%{transform:translateX(-38vw) translateY(-25px) rotate(-12deg)}79%{transform:translateX(-17vw) translateY(-4px) rotate(7deg)}}
@keyframes kivo-chirp{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(10deg) scale(1.05)}}
@keyframes kivo-reveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:700px){#kivo-agent{width:86px;right:max(8px,env(safe-area-inset-right));bottom:max(9px,env(safe-area-inset-bottom))}#kivo-agent .kivo-face-button{width:83px;height:90px}#kivo-agent .kivo-face-button img{width:82px;height:86px}#kivo-agent .kivo-face-button .kivo-tag{left:0;bottom:-1px;font-size:9px;min-width:49px}#kivo-agent .kivo-menu{bottom:91px;padding:13px}#kivo-agent .kivo-bubble{bottom:92px;right:0;font-size:12px}#kivo-agent .kivo-links{gap:5px}#kivo-agent .kivo-link{font-size:.78rem}}
@media(prefers-reduced-motion:reduce){#kivo-agent *,#kivo-agent *:before,#kivo-agent *:after{animation:none!important;transition:none!important}}

/* Crop the authentic bird mascot from the upper portion of its official logo. */
#kivo-agent .kivo-face-button{overflow:hidden;border-radius:18px}
#kivo-agent .kivo-face-button #kivo-avatar{width:155%;height:155%;max-width:none;object-fit:cover;object-position:center top}
#kivo-agent[data-minimized=true] .kivo-face-button #kivo-avatar{width:145%;height:145%}

/* Guided sections are real in-page destinations, not simulated demos. */
.kivo-guided{outline:3px solid #51ead5!important;outline-offset:5px;scroll-margin-top:95px}
#kivo-agent #kivo-guide{border-color:var(--ka-border);font-weight:900}
@media(prefers-reduced-motion:reduce){.kivo-guided{transition:none!important}}

/* Lively lightweight bird pose while GLB is off, including mobile. */
#kivo-agent .kivo-face-button{overflow:visible!important;filter:drop-shadow(0 8px 12px var(--ka-shadow))}
#kivo-agent .kivo-face-button #kivo-avatar{object-fit:contain;object-position:center;width:100%;height:100%;max-width:100%;border-radius:15px}
#kivo-agent[data-motion=on]:not(.kivo-model-active) .kivo-face-button{animation:kivo-bob 2.8s ease-in-out infinite}
#kivo-agent[data-motion=on]:not(.kivo-model-active) #kivo-avatar{animation:kivo-chirp 8s ease-in-out infinite}
#kivo-agent.kivo-talking:not(.kivo-model-active) #kivo-avatar{animation:kivo-chirp .46s ease-in-out 3}
#kivo-agent.kivo-running:not(.kivo-model-active) .kivo-face-button{animation:kivo-dash 5.4s ease-in-out 1}
#kivo-agent[data-motion=off] .kivo-face-button,#kivo-agent[data-motion=off] #kivo-avatar{animation:none!important}
@media(max-width:700px){#kivo-agent:not([data-minimized=true]){width:110px}#kivo-agent:not([data-minimized=true]) .kivo-face-button{width:103px;height:113px}#kivo-agent .kivo-bubble{bottom:116px}#kivo-agent .kivo-menu{bottom:119px}}
@media(prefers-reduced-motion:reduce){#kivo-agent .kivo-face-button{animation:none!important}}
