.pet{position:relative;display:inline-block;flex:none;vertical-align:middle;aspect-ratio:1}.identity .pet{width:62px;height:62px}.rig,.part,.pet-image{position:absolute;inset:0;width:100%;height:100%;display:block}.ground{position:absolute;left:24%;right:24%;bottom:-3%;height:9%;border-radius:50%;background:radial-gradient(closest-side,rgba(17,18,20,.16),rgba(17,18,20,.05) 60%,transparent);pointer-events:none}.pet:not([data-skin=spark]) .ground{bottom:-6%}.rig{transform-origin:50% 78%}.part{background-image:url('spark-parts.webp');background-repeat:no-repeat;background-size:400% 100%;pointer-events:none;filter:brightness(0);opacity:.9}.outline{background-position:0 0}.left-eye{background-position:33.333333% 0;transform-origin:31.3% 37.8%}.right-eye{background-position:66.666667% 0;transform-origin:58.2% 37.8%}.star{background-position:100% 0;transform-origin:76.85% 73.1%}.pet-image{object-fit:contain}.pet[data-skin=custom] .pet-image{border-radius:18%}.pet-image[hidden],.pet:not([data-skin=spark]) .part{display:none}
.pet-stage{width:100%;display:grid;place-content:center;justify-items:center;gap:9px;min-height:116px;border-radius:18px;background:radial-gradient(ellipse at 50% 70%,#ffffff 0%,#f1f1f3 75%);border:1px solid var(--line)}.pet-large{width:62px;height:62px}.pet-caption,.pet-hint,.pet-choice small{color:var(--muted);font-size:12px;line-height:1.4}.pet-choices{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:7px;margin:10px 0}.pet-choice{min-height:88px;display:grid;justify-items:center;align-content:center;gap:2px;background:var(--raised);border:1px solid var(--line);border-radius:14px}.pet-choice img{height:34px;width:34px;object-fit:contain;margin-bottom:4px;border-radius:9px}.pet-choice b{font-size:14px;font-weight:600}.pet-choice[aria-pressed=true]{border-color:var(--accent)}.pet-choice[aria-pressed=true] small{color:var(--accent)}.pet-hint{margin:0 10px 8px}.pet-stage:active:not(:disabled){transform:none}
@keyframes pet-blink{0%,43%,47%,85%,89%,100%{transform:none}45%,87%{transform:scaleY(.1)}}
@keyframes pet-breathe{0%,100%{transform:none}50%{transform:translateY(-3%)}}
@keyframes chat-pet-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-11%) rotate(2deg)}}
@keyframes ground-float{0%,100%{transform:none;opacity:1}50%{transform:scaleX(.68);opacity:.45}}
@keyframes pet-think{0%,100%{transform:translateY(-6%) rotate(-5deg)}50%{transform:translateY(-12%) rotate(5deg)}}
@keyframes pet-nod{0%,100%{transform:none}30%{transform:translateY(5%) scale(1.05,.95)}62%{transform:translateY(-8%) rotate(-3deg)}}
@keyframes pet-hello{0%,100%{transform:none}25%{transform:translateY(-9%) rotate(-9deg)}55%{transform:rotate(6deg)}80%{transform:rotate(-2deg)}}
@keyframes pet-wink{0%,25%,72%,100%{transform:none}40%,56%{transform:scaleY(.12)}}
@keyframes pet-pop{0%,100%{transform:none}18%{transform:scale(1.09,.90)}45%{transform:translateY(-18%) rotate(-6deg) scale(.94,1.06)}74%{transform:scale(1.04,.97)}}
@keyframes pet-twinkle{0%,100%{transform:none}42%{transform:scale(1.35) rotate(90deg)}78%{transform:scale(.88) rotate(178deg)}}
@keyframes pet-tune{0%,100%{transform:none}24%{transform:rotate(-12deg)}60%{transform:rotate(9deg)}}
@keyframes pet-listen{0%,100%{transform:rotate(5deg)}50%{transform:translateY(-3%) scale(1.06) rotate(5deg)}}
@keyframes pet-pulse{0%,100%{transform:none;opacity:.65}50%{transform:scale(1.19);opacity:1}}
@media(prefers-reduced-motion:no-preference){
html[data-pet-motion=on] .pet[data-pose=idle] .rig{animation:pet-breathe 4s ease-in-out infinite}
html[data-pet-motion=on] .identity .pet[data-pose=idle] .rig{animation:chat-pet-float 3.6s ease-in-out infinite}
html[data-pet-motion=on] .identity .pet[data-pose=idle] .ground{animation:ground-float 3.6s ease-in-out infinite}
html[data-pet-motion=on] .pet[data-pose=think] .rig{animation:pet-think 1.2s ease-in-out infinite}
html[data-pet-motion=on] .pet[data-pose=think] .ground{transform:scaleX(.7);opacity:.5;transition:transform .3s var(--ease),opacity .3s}
html[data-pet-motion=on] .pet[data-pose=think] :is(.left-eye,.right-eye){transform:translate(3%,-7%);transition:transform .2s var(--ease)}
html[data-pet-motion=on] .pet[data-pose=think] .star{animation:pet-pulse 1.2s ease-in-out infinite}
html[data-pet-motion=on] .pet[data-pose=reply] .rig{animation:pet-nod .7s var(--ease)}
html[data-pet-motion=on] .pet[data-pose=reply] .star{animation:pet-twinkle .72s ease-in-out}
html[data-pet-motion=on] .pet[data-pose=idle] :is(.left-eye,.right-eye){animation:pet-blink 6.4s ease-in-out infinite}
html[data-pet-motion=on] .pet[data-pose=hello] .rig{animation:pet-hello .68s var(--ease)}
html[data-pet-motion=on] .pet[data-pose=hello] .right-eye{animation:pet-wink .74s ease-in-out}
html[data-pet-motion=on] .pet[data-pose=type] .rig{transform:rotate(4deg);transition:transform .18s var(--ease)}
html[data-pet-motion=on] .pet[data-pose=type] :is(.left-eye,.right-eye){transform:translate(2.7%,6%) scaleY(.83);transition:transform .15s var(--ease)}
html[data-pet-motion=on] .pet[data-pose=send] .rig{animation:pet-pop .6s var(--ease)}
html[data-pet-motion=on] .pet[data-pose=send] .star, html[data-pet-motion=on] .pet[data-pose=tune] .star{animation:pet-twinkle .72s ease-in-out}
html[data-pet-motion=on] .pet[data-pose=tune] .rig{animation:pet-tune .42s var(--ease)}
html[data-pet-motion=on] .pet[data-pose=listen] .rig{animation:pet-listen 1.45s ease-in-out infinite}
html[data-pet-motion=on] .pet[data-pose=listen] .star{animation:pet-pulse 1.45s ease-in-out infinite}
}
/* Move the artwork, not its click target or the Elio label. */
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  html[data-pet-motion=on] .identity .pet{transition:transform .25s var(--ease)}
  html[data-pet-motion=on] .identity:hover .pet{transform:translateY(-3px) scale(1.06)}
}
@media(max-height:560px){.identity .pet{width:40px;height:40px}}@media(max-height:370px){.pet-stage{min-height:84px}.pet-large{width:44px;height:44px}}

/* Elio cutout: fixed frontal artwork; no sideways gaze or whole-image rocking. */
.elio-holder {display:none;position:absolute;inset:0;}
.pet[data-skin=elio] .elio-holder {display:block;}
.pet[data-skin=elio] .pet-image {visibility:visible;object-fit:cover;object-position:50% 0;}
.elio-art {width:100%;height:100%;overflow:hidden;stroke:none;fill:#101213;}
.elio-art image {pointer-events:none;}
.elio-eyes {transform-origin:73px 110px;}
.elio-arm-l {transform-origin:29px 137px;}
.elio-arm-r {transform-origin:112px 137px;}
.elio-antenna {transform-origin:70px 73px;}
.identity:has(.pet[data-skin=elio]) .halo {width:112px;height:142px;background:none;box-shadow:none;overflow:visible;}
.identity .pet[data-skin=elio] {width:112px;height:142px;align-self:end; margin-bottom:0;}
.identity:has(.pet[data-skin=elio]) {padding-top:26px;}
.identity:has(.pet[data-skin=elio]) .name-pill {margin-top:4px;}
:root:has(.identity .pet[data-skin=elio]) {--head:210px;}
html[data-pet-motion=on] .identity .pet[data-skin=elio] .rig {animation:none;transform:none;}
html[data-pet-motion=on] .identity .pet[data-skin=elio] .ground {animation:none;opacity:.3;}
#app[data-call] .identity:has(.pet[data-skin=elio]) .halo {transform:translateY(12px) scale(1.22);transform-origin:50% 50%;}
#app[data-call] .identity:has(.pet[data-skin=elio]) .name-pill {transform:translateY(26px);}
#app[data-call]:has(.pet[data-skin=elio]) #messages {padding-top:calc(var(--head) + 45px);}
#app[data-call]:has(.pet[data-skin=elio]) .top::before {bottom:-70px;}
.identity:has(.pet[data-skin=elio]) .halo::before,.identity:has(.pet[data-skin=elio]) .halo::after {display:none;}
@media(prefers-reduced-motion:no-preference) {
 html[data-pet-motion=on] .pet[data-skin=elio] .elio-eyes {animation:elio-blink 5.7s linear infinite;}
 html[data-pet-motion=on] .pet[data-skin=elio][data-pose=idle] .elio-antenna {animation:elio-aerial 6s ease-in-out infinite;}
 html[data-pet-motion=on] .pet[data-skin=elio][data-pose=hello] .elio-arm-r {animation:elio-wave .85s var(--ease);}
 html[data-pet-motion=on] .pet[data-skin=elio][data-pose=reply] .elio-arm-r {animation:elio-wave .85s var(--ease);}
 html[data-pet-motion=on] .pet[data-skin=elio][data-pose=think] .elio-antenna {animation:elio-aerial 1.8s ease-in-out infinite;}
 html[data-pet-motion=on] .pet[data-skin=elio][data-pose=listen] .elio-arm-r {transform:rotate(-20deg);transition:transform .25s var(--ease);}
}
@keyframes elio-blink {0%,36%,39%,74%,77%,100%{transform:scaleY(1)} 37.5%,75.5%{transform:scaleY(.08)}}
@keyframes elio-aerial {0%,80%,100%{transform:rotate(0)} 86%{transform:rotate(-7deg)} 92%{transform:rotate(4deg)} 96%{transform:rotate(-2deg)}}
@keyframes elio-wave {0%,100%{transform:rotate(0)} 18%{transform:rotate(8deg)} 42%{transform:rotate(-58deg)} 58%{transform:rotate(-40deg)} 74%{transform:rotate(-60deg)}}
@media(max-height:600px){.identity:has(.pet[data-skin=elio]){padding-top:15px}.identity:has(.pet[data-skin=elio]) .halo{height:112px}.identity .pet[data-skin=elio]{width:96px;height:112px}:root:has(.identity .pet[data-skin=elio]){--head:175px}}
@media(prefers-reduced-motion:reduce){.elio-art *{animation:none!important;transition:none!important;transform:none!important}}
html[data-pet-motion=off] .elio-art * {animation:none!important;transition:none!important;transform:none!important;}

/* Reference-led composition pass: conversation first, quieter empty state. */
:root:has(.identity .pet[data-skin=elio]) { --head:150px; }
.identity:has(.pet[data-skin=elio]) { padding-top:14px; }
.identity:has(.pet[data-skin=elio]) .halo,
.identity .pet[data-skin=elio] { width:72px; height:92px; }
.identity:has(.pet[data-skin=elio]) .name-pill { margin-top:3px; }
#messages:has(.empty) { gap:24px; }
.empty { margin:auto 0 0; max-width:310px; }
.empty b { font-size:24px; font-weight:600; line-height:1.2; }
.empty span { font-size:14px; line-height:1.5; }
.starters { max-width:540px; margin:0 auto auto; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.starters button { grid-template-columns:28px minmax(0,1fr); align-items:center; align-content:center; gap:10px; min-height:72px; padding:12px; border-radius:16px; box-shadow:none; border-color:var(--line); }
.starters .tile { width:28px; height:28px; margin:0; border-radius:9px; }
.starters .tile svg { width:16px; height:16px; }
.starters b { font-size:13px; font-weight:500; line-height:1.4; }
.starters small { display:none; }
@media(max-width:359px) {
 .starters button { grid-template-columns:minmax(0,1fr); gap:8px; min-height:92px; }
}
@media(max-height:600px) {
 :root:has(.identity .pet[data-skin=elio]) { --head:112px; }
 .identity:has(.pet[data-skin=elio]) { padding-top:4px; }
 .identity:has(.pet[data-skin=elio]) .halo,
 .identity .pet[data-skin=elio] { width:50px; height:64px; }
 #messages:has(.empty) { gap:16px; }
 .empty { margin:0; }
 .starters { margin:0 auto; }
}

/* Elio peeks over the name badge. Hands stay anchored to its top edge. */
.elio-hands { display:none; }
.identity:has(.pet[data-skin=elio]) { position:relative; }
.identity:has(.pet[data-skin=elio]) .halo,
.identity .pet[data-skin=elio] { width:72px; height:78px; }
.identity:has(.pet[data-skin=elio]) .name-pill { margin-top:-5px; min-width:64px; }
.identity .pet[data-skin=elio] .ground { display:none; }
.identity .pet[data-skin=elio] .elio-hands { display:block; position:absolute; width:72px; height:18px; left:0; bottom:-7px; z-index:3; overflow:visible; pointer-events:none; }
.identity:has(.pet[data-skin=elio]) .halo { z-index:2; pointer-events:none; }
.identity .pet[data-skin=elio] .elio-art { clip-path:inset(0 0 5px); }
html[data-pet-motion=on] .identity:hover .pet[data-skin=elio] { transform:none; }
#app[data-call] .identity:has(.pet[data-skin=elio]) .halo,
#app[data-call] .identity:has(.pet[data-skin=elio]) .name-pill { transform:none; }
@media(max-height:600px) {
 .identity:has(.pet[data-skin=elio]) .halo,
 .identity .pet[data-skin=elio] { width:60px; height:64px; }
 .identity .pet[data-skin=elio] .elio-hands { width:60px; height:15px; bottom:-7px; }
}

/* Keep Elio square to the viewer in every pose, including picker and typing. */
html[data-pet-motion=on] .pet[data-skin=elio] .rig { animation:none; transform:none; }
