/* A soft, textured body with a separately animated face and activity props. */
.companion{display:flex;align-items:center;gap:20px;width:100%;--comp-dark:#23382e;--comp-paper:#fffdf3;--comp-metal:#bad2c3;--comp-accessory-ink:#345a4b;--comp-glass:#e6f1dc;--comp-line:#789687;--comp-accessory-mid:#95b19c}
.companion-stage{--comp-visual-height:210px;display:flex;flex-direction:column;align-items:center;gap:8px;position:relative;width:218px;height:auto;flex:none;padding:0;border:0;background:none;border-radius:20px;isolation:isolate;-webkit-tap-highlight-color:transparent;cursor:pointer}
.companion-stage::before{content:"";display:block;width:100%;height:var(--comp-visual-height);flex:none}
.comp-art{display:block;position:absolute;width:240px;height:210px;top:0;left:50%;transform:translateX(-50%) scale(.9);transform-origin:50% 0;pointer-events:none}
.comp-shadow{position:absolute;left:55px;top:188px;width:134px;height:12px;background:radial-gradient(ellipse,#56775c30,transparent 70%);border-radius:50%;animation:comp-shadow 5.6s ease-in-out infinite}
.comp-pose{position:absolute;inset:0;transform-origin:50% 87%;animation:comp-breathe 5.6s ease-in-out infinite}
.comp-shape{position:absolute;left:34px;top:20px;width:178px;height:180px;background:url('/clone-body-v14.png') center/100% 100% no-repeat;transform-origin:50% 85%;animation:comp-morph 8.5s ease-in-out infinite;z-index:1}
.comp-hand{position:absolute;top:128px;width:28px;height:23px;background:linear-gradient(140deg,#edf2dc55,#456d4445),url('/clone-body-v14.png') center/300% 300%;border-radius:48% 48% 46% 46%;box-shadow:inset 0 1px 3px #f6fbe67a,0 1px 2px #31594a29;z-index:4;transform:rotate(var(--hand-angle))}
.comp-hand-left{left:40px;--hand-angle:-25deg;transform-origin:90% 70%}
.comp-hand-right{left:178px;--hand-angle:24deg;transform-origin:10% 70%}
.comp-face{position:absolute;left:88px;top:94px;width:72px;height:41px;z-index:2;transform:rotate(-3deg)}
.comp-eyes{position:absolute;left:8px;top:0;width:56px;display:flex;justify-content:space-between;animation:comp-blink 6.8s linear infinite}
.comp-eyes i{position:relative;display:block;width:15px;height:21px;border-radius:50%;background:linear-gradient(135deg,#344438,#111f1a 65%,#304637);box-shadow:0 1px 2px #55705b47,inset -1px -1px 1px #08150f}
.comp-eyes i::before{content:"";position:absolute;left:3px;top:3px;width:5px;height:6px;border-radius:50%;background:#fffef2}
.comp-eyes i::after{content:"";position:absolute;right:3px;bottom:3px;width:2px;height:2px;border-radius:50%;background:#c6dccc80}
.comp-mouth{position:absolute;left:30px;top:23px;width:13px;height:5px;border-bottom:2px solid var(--comp-dark);border-radius:0 0 50% 50%}
.comp-cheek{position:absolute;top:20px;width:13px;height:7px;background:radial-gradient(ellipse,#dfb6a67a,transparent 72%)}
.comp-cheek-left{left:0}.comp-cheek-right{right:0}
.comp-prop{position:absolute;inset:0;width:240px;height:210px;overflow:visible;z-index:3;pointer-events:none}
.comp-object{display:block;position:absolute;background-image:url('/clone-props-v15.png');background-size:400% 300%;background-position:var(--prop-x) var(--prop-y);background-repeat:no-repeat;transform-origin:50% 100%;filter:drop-shadow(0 2px 1.5px #253e2f28)}
.comp-book{left:72px;top:111px;width:100px;height:100px}
.comp-cup{left:148px;top:120px;width:57px;height:57px}
.comp-phone{left:145px;top:105px;width:58px;height:58px}
.comp-controller{left:70px;top:106px;width:104px;height:104px}
.comp-bag{left:43px;top:112px;width:87px;height:87px}
.comp-map{left:67px;top:107px;width:105px;height:105px}
.comp-note{left:81px;top:119px;width:80px;height:80px}
.comp-bottle{left:145px;top:117px;width:75px;height:75px}
.comp-rest-prop{z-index:3}.comp-pillow{left:43px;top:126px;width:90px;height:90px}
.comp-apron{left:77px;top:122px;width:92px;height:73px;filter:drop-shadow(0 1px 1px #253e2f1c)}
.comp-badge{left:88px;top:116px;width:70px;height:70px}
.comp-photo{left:144px;top:129px;width:58px;height:58px;rotate:8deg}
.comp-chat{display:flex;align-items:center;justify-content:center;gap:4px;position:absolute;left:181px;top:78px;width:31px;height:24px;border-radius:9px;background:#fffdf3;box-shadow:0 2px 3px #253e2f1c;opacity:0;transform-origin:80% 50%}
.comp-chat::after{content:"";position:absolute;bottom:-4px;left:7px;border-top:5px solid #fffdf3;border-right:5px solid transparent}.comp-chat i{width:3px;height:3px;background:#799383;border-radius:50%}
.comp-steam{position:absolute;left:170px;top:112px;width:6px;height:12px;border-left:2px solid #fffdf3;border-radius:50%;opacity:.6}
/* Contact poses put a small part of each paw in front of the prop edge. */
:is([data-character-kind="study"],[data-character-kind="travel-plan"],[data-character-kind="game"]) .comp-hand-left{left:75px;top:152px;width:23px;height:19px;--hand-angle:-12deg}
:is([data-character-kind="study"],[data-character-kind="travel-plan"],[data-character-kind="game"],[data-character-kind="first-school"]) .comp-hand-right{left:150px;top:154px;width:23px;height:19px;--hand-angle:15deg}
:is([data-character-kind="prepare"],[data-character-kind="first-undecided"]) .comp-hand-left{left:84px;top:155px;width:21px;height:18px;--hand-angle:-15deg}
:is([data-character-kind="prepare"],[data-character-kind="first-undecided"]) .comp-hand-right{left:137px;top:157px;width:21px;height:18px;--hand-angle:18deg}
[data-character-kind="friends"] .comp-hand-right{left:177px;top:143px;width:22px;height:18px;--hand-angle:-18deg}
[data-character-kind="work"] .comp-hand-right{left:187px;top:144px;width:21px;height:18px;--hand-angle:10deg}
[data-character-kind="exercise"] .comp-hand-right{left:177px;top:154px;width:21px;height:18px;--hand-angle:-15deg}
:is([data-character-kind="travel-outing"],[data-character-kind="first-school"]) .comp-hand-left{left:57px;top:141px;width:23px;height:19px;--hand-angle:-20deg}
[data-character-kind="travel-outing"] .comp-hand-right{left:177px;top:158px;width:22px;height:18px;--hand-angle:-15deg}
[data-character-kind="rest"] .comp-hand-left{left:58px;top:163px;width:25px;height:20px;--hand-angle:-10deg}
[data-character-kind="rest"] .comp-hand-right{left:178px;top:147px;--hand-angle:15deg}
.comp-touch-hint{position:static;display:block;width:100%;min-height:24px;padding:0 4px 4px;text-align:center;font-size:14px;color:var(--green);font-weight:400;line-height:1.6}
.companion-copy{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:5px;font-size:14px;color:var(--muted)}
.companion-copy>strong{font-size:16px;color:var(--ink);font-weight:550}.comp-caption{line-height:1.8;word-break:keep-all}
.comp-motion-note{margin-top:7px;font-size:13px;line-height:1.8}.companion-large{flex-direction:column;align-items:flex-start;gap:0;margin:18px 0}.companion-large .companion-stage{--comp-visual-height:230px;width:248px;height:auto}.companion-large .comp-art{transform:translateX(-50%)}.companion-large .companion-copy{align-items:center;width:248px}.companion-large .companion-copy>strong,.companion-large .comp-caption{display:none}
.companion-stage:hover .comp-touch-hint{color:var(--green)}.companion-stage:focus-visible{outline:2px solid #7b9f86;outline-offset:1px}.companion-stage:active .comp-art{filter:brightness(1.015)}
/* Quiet poses after the short arrival/replay gesture. */
[data-character-kind="rest"] .comp-pose{transform:translateY(18px) scale(1.1,.81);transform-origin:50% 90%}
[data-character-kind="rest"] .comp-eyes i{height:5px;border-radius:0 0 50% 50%;background:none;border-bottom:2px solid var(--comp-dark);box-shadow:none}
[data-character-kind="rest"] .comp-eyes i::before,[data-character-kind="rest"] .comp-eyes i::after{display:none}
[data-character-kind="rest"] .comp-face{transform:rotate(8deg)}
[data-character-kind="study"] .comp-face,[data-character-kind="travel-plan"] .comp-face,[data-character-kind="prepare"] .comp-face{transform:translateY(4px) rotate(3deg)}
[data-character-kind="friends"] .comp-mouth{height:8px;width:15px;background:var(--comp-dark);border-radius:2px 2px 70% 70%;border:0}
/* The greeting is finite; only breathing and occasional blinking continue. */
.companion.is-greeting .comp-hand-left{animation:comp-hello 2.6s ease-in-out 1}
.companion.is-greeting .comp-face{animation:comp-look 2.6s ease-in-out 1}
/* A single quiet acknowledgment; individual properties preserve each pose. */
.companion.is-nodding .comp-face{animation:comp-nod .64s ease-in-out 1}
.companion.is-greeting .comp-cup{animation:comp-cup 2.4s ease-in-out 1}
.companion.is-greeting .comp-book{animation:comp-note 2.4s ease-in-out 1}
.companion.is-greeting .comp-phone,.companion.is-greeting .comp-bag,.companion.is-greeting .comp-bottle{animation:comp-prop-tilt 2.4s ease-in-out 1}
.companion.is-greeting .comp-map,.companion.is-greeting .comp-note,.companion.is-greeting .comp-photo{animation:comp-note 2.4s ease-in-out 1}
.companion.is-greeting .comp-controller{animation:comp-play .55s ease-in-out 4}
.companion.is-greeting .comp-chat{animation:comp-chat 2.4s ease-in-out 1}
.companion.is-greeting .comp-steam{animation:comp-steam 1.2s ease-out 2}
.companion[data-still-greeting="true"] .comp-hand-left{transform:translateY(-12px) rotate(calc(var(--hand-angle) + 60deg))}
.companion[data-motion="paused"] *{animation-play-state:paused!important}
@keyframes comp-morph{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.015,.985) rotate(1deg)}}
@keyframes comp-breathe{0%,100%{translate:0 0;scale:1 1}50%{translate:0 -2px;scale:1.015 .985}}
@keyframes comp-shadow{0%,100%{scale:1 1;opacity:1}50%{scale:.97 .94;opacity:.8}}
@keyframes comp-blink{0%,43%,46%,100%{scale:1 1}44.5%{scale:1 .12}}
@keyframes comp-hello{0%,100%{transform:rotate(var(--hand-angle))}20%{transform:translate(-2px,-15px) rotate(34deg)}35%,65%{transform:translate(-2px,-18px) rotate(58deg)}50%,80%{transform:translate(-2px,-17px) rotate(20deg)}}
@keyframes comp-nod{0%,100%{translate:0 0;scale:1 1}45%{translate:0 4px;scale:1 .94}}
@keyframes comp-look{0%,100%{translate:0 0}30%,75%{translate:-2px -3px}}
@keyframes comp-cup{0%,100%{transform:rotate(0)}35%,65%{transform:translateY(-7px) rotate(-7deg)}}
@keyframes comp-prop-tilt{0%,100%{transform:rotate(0)}30%,70%{transform:rotate(-8deg) translateY(-3px)}}
@keyframes comp-note{0%,100%{transform:rotate(0)}30%,70%{transform:rotate(4deg) translateY(-3px)}}
@keyframes comp-play{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg) translateY(-1px)}}
@keyframes comp-chat{0%,100%{opacity:0;transform:translateY(4px)}25%,80%{opacity:1;transform:translateY(0)}}
@keyframes comp-steam{0%,100%{opacity:.2;transform:translateY(0)}60%{opacity:.65;transform:translateY(-3px)}}
@media(max-width:760px){.companion{gap:8px}.companion-stage{--comp-visual-height:190px;width:180px;height:auto}.comp-art{transform:translateX(-50%) scale(.78)}.companion-copy{flex:1}.companion-copy>strong{font-size:15px}.comp-caption{font-size:14px}.comp-touch-hint{bottom:5px}.companion-large{align-items:center;margin:10px 0}.companion-large .companion-stage{--comp-visual-height:205px;height:auto;width:220px}.companion-large .comp-art{transform:translateX(-50%) scale(.85)}}
@media(max-width:380px){.companion{flex-direction:column;gap:4px}.companion-stage{--comp-visual-height:180px;height:auto}.companion-copy{align-items:center;text-align:center;gap:1px}}
@media(prefers-reduced-motion:reduce){.companion *{animation:none!important;transition:none!important}.comp-chat{opacity:0}.comp-hand-left{transform:rotate(var(--hand-angle))}}

@media(max-width:760px){.companion-large .companion-copy{width:220px}}
