/* The companion remains one complete illustration in every outfit. */
#profile-view.has-companion .profile-hero{height:auto;min-height:0;padding-top:var(--document-head-y,13px);padding-bottom:12px}
#profile-view.has-companion .profile-wallet{align-self:center;width:264px;max-width:100%;margin:9px 0 0}
#profile-view.has-companion .profile-wallet-value{font-size:29px;line-height:32px}
#profile-view.has-companion .profile-wallet-label{font-size:10px;line-height:14px}
#profile-view.has-companion .profile-goal{margin-top:8px}
#profile-view .profile-companion{display:flex;flex:none;flex-direction:column;align-items:center;align-self:center;position:relative;width:230px;max-width:100%;padding:0 0 4px;margin:0;border:0;background:none;color:#39353b;box-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#profile-view .profile-companion-stage{--companion-limit:140px;position:relative;display:block;width:min(var(--companion-limit),calc(var(--miniapp-width,100vw) * .36),calc(var(--miniapp-height,100svh) * .18));height:auto;aspect-ratio:1;margin:0 auto}
#profile-view .profile-companion-stage>.profile-chrome-heart{z-index:1;pointer-events:none}
#profile-view .profile-companion-stage:before{content:none;display:none}
#profile-view .profile-companion-image{position:relative;display:block;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .18s ease;transform-origin:50% 91%;animation:companion-breathe 5s ease-in-out infinite}
#profile-view .profile-companion.is-ready .profile-companion-image{opacity:1}
#profile-view .profile-companion-level{display:flex;align-items:center;gap:8px;font-size:11px;line-height:22px;font-weight:600;color:#785d53;background:none;border:0;border-radius:0;padding:0;box-shadow:none}
#profile-view .profile-companion-level:after{content:"›";font-size:15px;line-height:15px;font-weight:400;color:#a88c81}
#profile-view .profile-companion-caption{display:grid;align-items:center;justify-items:center;width:100%;height:24px;margin-top:4px}
#profile-view .profile-companion-note{grid-area:1/1;font-size:10px;line-height:15px;color:#857c7c;font-weight:400}
#profile-view .profile-companion.is-speaking .profile-companion-note{visibility:hidden}
#profile-view .profile-companion-income{position:absolute;top:45%;right:-43px;max-width:90px;border:1px solid #fff9;background:#fcfaf6eb;color:#7e6358;border-radius:6px;padding:5px 7px;font-size:10px;line-height:14px;white-space:nowrap;box-shadow:0 3px 9px #4e352408}
#profile-view .profile-companion-income[hidden]{display:none}
#profile-view .profile-companion:active .profile-companion-stage{transform:scale(.97)}
#profile-view.profile-motion-paused .profile-companion-image,.app.paused #profile-view .profile-companion-image{animation-play-state:paused}
@keyframes companion-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.008)}}
@media(max-height:720px){#profile-view .profile-companion-stage{--companion-limit:112px}#profile-view .profile-companion-stage:before{left:23px}#profile-view.has-companion .profile-wallet{margin-top:7px}}
@media(prefers-reduced-motion:reduce){#profile-view .profile-companion-image{animation:none;transition:none}#profile-view .profile-companion:active .profile-companion-stage{transform:none}}

#profile-view .profile-companion-stage.has-mascot-motion .profile-companion-image{animation:none}
#profile-view .profile-companion-income{z-index:2}
#profile-view .profile-companion-speech{grid-area:1/1;display:block;max-width:100%;color:#785d53;font-size:11px;line-height:13px;text-align:center;text-wrap:balance;font-weight:400;pointer-events:none;animation:companion-hello .24s ease-out}
#profile-view .profile-companion-speech[hidden]{display:none}
@keyframes companion-hello{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#profile-view .profile-companion-speech{animation:none}}

/* Keep the reserved art slot visible while its first image is still in flight. */
#profile-view .profile-companion:not(.is-ready) .profile-companion-stage:before{content:"";display:block;position:absolute;inset:12% 9% 4%;border-radius:44% 44% 28% 28%;background:#a5adb926;animation:profile-art-pending 1.4s ease-in-out infinite}
#profile-view .profile-hero-art:not(.is-loaded):after{content:"";position:absolute;inset:10% 8% 3%;border-radius:44% 44% 28% 28%;background:#a5adb926;animation:profile-art-pending 1.4s ease-in-out infinite}
#profile-view.profile-motion-paused .profile-companion-stage:before,#profile-view.profile-motion-paused .profile-hero-art:after{animation-play-state:paused}
@keyframes profile-art-pending{0%,100%{opacity:.55}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){#profile-view .profile-companion-stage:before,#profile-view .profile-hero-art:after{animation:none!important}}

.profile-companion-portrait { position:absolute;inset:0;pointer-events:none; }
.profile-companion-portrait :is(.look,.sprite,.metal) { position:absolute;inset:0;width:100%;height:100%; }
.profile-companion-portrait .look { isolation:isolate; }
.profile-companion-portrait :is(.body-cut,.wear-layer) { position:absolute;inset:0;pointer-events:none; }
.profile-companion-portrait :is(.sprite,.metal) { object-fit:contain; }
.profile-companion-portrait .metal { mix-blend-mode:multiply;opacity:.82; }
