.companion-grid{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);gap:24px}.companion-grid>*{min-width:0}.avatar{width:126px;height:130px;border-radius:45% 45% 38% 38%;margin:12px auto 24px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:linear-gradient(145deg,#ffbc78,#f46c20);box-shadow:0 16px 35px #f46c2030;color:#30202a;animation:bob 4s ease-in-out infinite}.avatar.orbit{background:linear-gradient(145deg,#d5bcff,#9566e8)}.avatar.sprout{background:linear-gradient(145deg,#b3edd0,#49b083)}.eyes{font-size:28px;letter-spacing:8px;padding-left:8px}.smile{font-size:40px;line-height:24px}.profile>h2,.profile>p{text-align:center}.messages{min-height:230px;max-height:500px;overflow:auto;margin-bottom:24px}.message{white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid #e7e1d9;border-radius:16px;padding:16px;margin:12px 0;line-height:1.65}.message.user{background:#fff2e7}.message b{display:block;color:#9b420f;font-size:12px;margin-bottom:8px}.inline a{display:inline-block;padding:10px 14px;text-decoration:none}#activity article{padding:14px 0;border-bottom:1px solid #e7e1d9;overflow-wrap:anywhere}#activity a{display:block}.companion-grid small{display:block}button:disabled{opacity:.55}textarea{width:100%}@keyframes bob{50%{transform:translateY(-6px)}}@media(max-width:760px){.companion-grid{grid-template-columns:1fr}.messages{max-height:380px}}@media(prefers-reduced-motion:reduce){.avatar{animation:none}}
.memory-templates{margin:20px 0;padding:16px;border:1px solid #e7e1d9;border-radius:14px;background:#fffaf5}.memory-template-preview{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;line-height:1.6;margin:12px 0;padding:12px;background:#fff;border-radius:8px}.memory-templates button{margin-bottom:10px;max-width:100%;white-space:normal}.memory-templates .note{margin:8px 0}

/* Character states follow real UI activity; animation uses no API calls. */
button.avatar{position:relative;padding:0;border:0;flex-shrink:0;cursor:pointer;isolation:isolate;overflow:visible;color:#30202a}
button.avatar:hover{filter:brightness(1.03)}
button.avatar:focus-visible{outline:3px solid #9b420f;outline-offset:7px}
.avatar-caption{min-height:24px;font-size:13px;margin-top:-12px;margin-bottom:18px}
.avatar .eyes{animation:companion-blink 6s infinite;transform-origin:center}
.avatar::after{content:'';position:absolute;right:-9px;top:65px;width:22px;height:45px;border-radius:18px;background:inherit;transform-origin:50% 85%;z-index:-1}
.avatar[data-motion="greeting"]{animation:companion-greeting 1.2s ease-in-out}
.avatar[data-motion="greeting"]::after{animation:companion-wave .35s ease-in-out 4}
.avatar[data-motion="playful"]{animation:companion-wiggle .7s ease-in-out}
.avatar[data-motion="thinking"]{animation:companion-think 2.5s ease-in-out infinite}
.avatar[data-motion="happy"]{animation:companion-happy .8s ease-in-out}
.avatar[data-motion="happy"] .smile{transform:scale(1.25)}
.thinking-dots{position:absolute;top:-24px;display:none;gap:5px;padding:8px 10px;border-radius:20px;background:#fff;box-shadow:0 3px 14px #30202a16}
.thinking-dots i{width:6px;height:6px;border-radius:50%;background:#9b420f;animation:companion-dot 1.2s infinite}
.thinking-dots i:nth-child(2){animation-delay:.15s}.thinking-dots i:nth-child(3){animation-delay:.3s}
.avatar[data-motion="thinking"] .thinking-dots{display:flex}
@keyframes companion-blink{0%,43%,47%,76%,80%,100%{transform:scaleY(1)}45%,78%{transform:scaleY(.08)}}
@keyframes companion-greeting{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-8px) rotate(-5deg)}65%{transform:translateY(-4px) rotate(5deg)}}
@keyframes companion-wave{0%,100%{transform:rotate(-35deg)}50%{transform:rotate(-90deg)}}
@keyframes companion-wiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-9deg)}50%{transform:rotate(9deg)}75%{transform:rotate(-5deg)}}
@keyframes companion-think{0%,100%{transform:rotate(-4deg) translateY(0)}50%{transform:rotate(4deg) translateY(-4px)}}
@keyframes companion-happy{0%,100%{transform:translateY(0) scale(1)}40%{transform:translateY(-12px) scale(1.04)}70%{transform:translateY(0) scale(.98)}}
@keyframes companion-dot{0%,80%,100%{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.avatar,.avatar::after,.avatar .eyes,.avatar .thinking-dots i{animation:none!important;transform:none!important}.avatar[data-motion="happy"] .smile{transform:none}}
/* Preserve the character shape against shared workspace button styles. */
body .profile button#avatar{width:126px;height:130px;padding:0;border:0;border-radius:45% 45% 38% 38%;background:linear-gradient(145deg,#ffbc78,#f46c20);color:#30202a;box-shadow:0 16px 35px #f46c2030;flex:none}
body .profile button#avatar.orbit{background:linear-gradient(145deg,#d5bcff,#9566e8)}
body .profile button#avatar.sprout{background:linear-gradient(145deg,#b3edd0,#49b083)}

.away-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.away-fields>*{min-width:0}.away-result-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.6}#away-jobs article{padding:16px 0;border-bottom:1px solid #e7e1d9}#away-jobs small{display:block;margin:6px 0}#away-sources a{display:block;overflow-wrap:anywhere}#away-confirm{max-width:650px;width:calc(100% - 32px);box-sizing:border-box}@media(max-width:600px){.away-fields{grid-template-columns:1fr}}

/* Keep the review scrollable within mobile browser chrome and open at its heading. */
body #away-confirm{max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);margin:auto;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere}
#away-confirm-title{margin-top:0;outline:none}
#away-quote-details>small{display:block;margin:6px 0;line-height:1.5}
#away-confirm .inline{display:flex;flex-wrap:wrap;gap:12px}
