.avatar-layout{display:grid;grid-template-columns:minmax(300px,1.15fr) minmax(320px,1fr);gap:1.25rem;align-items:start;max-width:1450px;margin:auto}
.avatar-stage,.avatar-conversation{min-width:0}
.avatar-picture{position:relative;background:#111827;border-radius:16px;overflow:hidden}
.avatar-picture video{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;max-height:65vh}
#avatar-video{position:absolute;inset:0;height:100%;opacity:0;pointer-events:none;transition:opacity .18s ease}
.avatar-picture.is-speaking #avatar-video{opacity:1}
.avatar-identity{position:absolute;top:1rem;left:1rem;right:1rem;display:flex;align-items:center;justify-content:space-between;gap:.5rem;pointer-events:none}
.avatar-name,.avatar-state{background:#182334dd;border:1px solid #ffffff30;border-radius:2rem;color:white;padding:.35rem .8rem}
.avatar-state{font-size:.8rem}.avatar-state:before{content:'';display:inline-block;width:.45rem;height:.45rem;border-radius:50%;background:#a8b3bf;margin-right:.4rem}
.avatar-stage[data-state="listening"] .avatar-state:before,.avatar-stage[data-state="hearing"] .avatar-state:before{background:#bde97b}
.avatar-stage[data-state="thinking"] .avatar-state:before,.avatar-stage[data-state="preparing"] .avatar-state:before,.avatar-stage[data-state="transcribing"] .avatar-state:before{background:#83bcff;animation:avatar-pulse 1.2s ease-in-out infinite}
.avatar-stage[data-state="speaking"] .avatar-state:before{background:#bde97b}
.avatar-listening{position:absolute;bottom:.8rem;left:15%;width:70%;height:4px;border-radius:2px;background:#15202c99;opacity:0}
.avatar-stage[data-state="listening"] .avatar-listening,.avatar-stage[data-state="hearing"] .avatar-listening{opacity:1}
.avatar-listening span{display:block;height:100%;background:#bde97b;transform-origin:left;transform:scaleX(0);transition:transform .07s}
.avatar-primary button:first-child{background:#bde97b;color:#162111;border-color:#bde97b;font-weight:600}
.avatar-primary #avatar-end{background:#263423;color:#e4f3d3;border-color:#56743c}
.avatar-options{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.6rem;border-top:1px solid var(--line);padding-top:.75rem}
.avatar-stage .avatar-options label.inline{margin:0}.avatar-options button{font-size:.85rem}
.avatar-privacy{font-size:.8rem;margin-bottom:0}
.avatar-conversation .mcp-heading{flex-wrap:wrap;gap:.5rem}.avatar-conversation .mcp-heading h2{margin:0}
@keyframes avatar-pulse{50%{opacity:.3}}
.avatar-stage label.inline{display:flex;gap:.6rem;align-items:center;margin-top:1rem}
.avatar-stage label.inline input{width:auto}
.avatar-conversation .message-stream{height:43vh;min-height:220px;overflow:auto;padding:.5rem 0}
.avatar-conversation .message{white-space:pre-wrap;overflow-wrap:anywhere}
.avatar-conversation .message small{display:block;opacity:.7;margin:.35rem 0}
.avatar-conversation textarea{width:100%;box-sizing:border-box;resize:vertical}
.avatar-composer-controls{display:flex;align-items:end;gap:.6rem;flex-wrap:wrap;margin-top:.6rem}
.avatar-composer-controls label{flex:1;min-width:130px;margin:0}
.avatar-composer-controls button{margin-bottom:0}
.avatar-execution{margin-top:1rem}.avatar-execution pre{max-height:200px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
#avatar-status,#avatar-input-status{min-height:1.5em;overflow-wrap:anywhere}
@media(max-width:850px){.avatar-layout{grid-template-columns:1fr}.avatar-picture video{max-height:48vh}.avatar-conversation .message-stream{height:28vh}.avatar-stage .actions{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){#avatar-video{transition:none}.avatar-state:before{animation:none!important}}
