.sophia-live .sophia-live-head-actions{display:flex;align-items:center;gap:8px}
.sophia-live .sophia-live-portrait img[data-voice-pose]{opacity:0;transition:opacity .42s ease,transform .6s ease;transform:translateY(5px) scale(.99)}
.sophia-live:not([data-pose]) [data-voice-pose=listen],
.sophia-live[data-pose=listen] [data-voice-pose=listen],
.sophia-live[data-pose=listen-alt] [data-voice-pose=listen-alt],
.sophia-live[data-pose=speak] [data-voice-pose=speak],
.sophia-live[data-pose=question] [data-voice-pose=question],
.sophia-live[data-pose=question-alt] [data-voice-pose=question-alt]{opacity:1!important;transform:translateY(0) scale(1)!important}
.sophia-live-wave{display:block;width:min(100%,340px);height:42px;margin:0 auto;color:#245fba}
.sophia-live-wave path{stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.sophia-live[data-phase=speaking] .sophia-live-wave{color:#683bb5}
.sophia-live.sophia-live-desktop{box-sizing:border-box;width:min(720px,calc(100vw - 32px));height:min(760px,calc(100dvh - 36px));margin:auto;border:1px solid #c5d9ef;border-radius:24px;padding:0;background:#edf5ff;color:#153754;box-shadow:0 20px 75px #09213c70}
.sophia-live-desktop[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto}
.sophia-live-desktop::backdrop{background:#0c223d88}
.sophia-live-desktop header{display:flex;align-items:center;justify-content:space-between;padding:10px 18px}
.sophia-live-desktop header h2{margin:0;font-size:1.3rem}
.sophia-live-desktop .sophia-live-portrait{position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 60%,#fff 0,#dcecff 66%,transparent 88%);}
.sophia-live-desktop .sophia-live-portrait img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center bottom;transform-origin:center bottom}
.sophia-live-desktop .sophia-live-content{max-height:35dvh;overflow:auto;padding:4px 20px 12px;text-align:center}
.sophia-live-desktop .sophia-live-state{font-weight:700;margin:4px 0}
.sophia-live-desktop .sophia-live-result{margin:6px auto;padding:9px 14px;width:min(100%,560px);background:white;border:1px solid #d3e4f5;border-radius:12px;overflow-wrap:anywhere}
.sophia-live-desktop footer{display:flex;justify-content:center;gap:8px;padding:2px 14px 14px}
.sophia-live-desktop button{min-height:44px;min-width:44px;border:1px solid #bdd2ea;border-radius:12px;background:white;color:#1a4775;padding:7px 12px;cursor:pointer}
.sophia-live [hidden]{display:none!important}
dialog.sophia-live.sophia-live-conversation{box-sizing:border-box;inset:0;width:clamp(360px,62vw,940px);height:clamp(420px,78dvh,900px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);min-width:min(360px,calc(100vw - 24px));min-height:min(340px,calc(100dvh - 24px));margin:auto;padding:0;border:1px solid #c5d9ef;border-radius:20px;overflow:hidden;resize:both;background:#f4f8fd;color:#153754;box-shadow:0 20px 75px #09213c70}
dialog.sophia-live.sophia-live-conversation[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.sophia-live.sophia-live-conversation{font-family:Inter,system-ui,sans-serif}
dialog.sophia-live.sophia-live-conversation.is-maximized{width:calc(100vw - 24px)!important;height:calc(100dvh - 24px)!important;resize:none}
.sophia-live-conversation::backdrop{background:#0c223d88}
.sophia-live-conversation>header{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:10px 14px;background:#e6f0fd;border-bottom:1px solid #d3e0ee}
.sophia-live-conversation h2{font-size:1.2rem;line-height:1.1;margin:0}
.sophia-live-conversation .sophia-live-state{font-size:.875rem;line-height:1.3;margin:.22rem 0;color:#214e7d}
.sophia-live-conversation .sophia-live-wave{width:min(100%,190px);height:18px;margin:0}
.sophia-live-conversation .sophia-live-portrait{position:relative;width:76px;height:76px;margin:0;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at center,#fff,#d3e5fb);border-radius:14px}
.sophia-live-conversation .sophia-live-portrait img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 18%;transform-origin:center bottom}
.sophia-live-conversation [data-live-portrait]{padding:0;border:0;background:transparent}
.sophia-live-conversation .sophia-live-portrait{display:block}
.sophia-live-conversation img[data-live-face]{opacity:0;transition:opacity 420ms ease}
.sophia-live-conversation img[data-live-face][data-visible=true]{opacity:1}
.sophia-live-conversation .sophia-live-body{position:relative;min-width:0;min-height:0}
.sophia-live-conversation .sophia-live-timeline{box-sizing:border-box;height:100%;display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0;padding:16px clamp(12px,3vw,30px);overflow:auto;overscroll-behavior:contain}
.sophia-live-conversation .sophia-live-stage{position:absolute;inset:0;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;overflow:hidden;background:radial-gradient(ellipse at center,#f7fbff,#c9def6);animation:sophia-stage-in 220ms ease-out}
.sophia-live-conversation .sophia-live-stage .sophia-live-portrait{width:min(100%,900px);height:100%;border-radius:0;background:none}
.sophia-live-conversation .sophia-live-stage img{object-fit:contain;object-position:center bottom}
dialog.sophia-live.sophia-live-conversation.is-portrait-view{width:100vw!important;height:100dvh!important;max-width:none;max-height:none;border:0;border-radius:0;resize:none}
.sophia-live-conversation.is-portrait-view>header{grid-template-columns:minmax(0,1fr) auto}
.sophia-live-conversation.is-portrait-view [data-live-portrait],.sophia-live-conversation.is-portrait-view [data-live-expand]{display:none}
.sophia-live-conversation.is-portrait-view .sophia-live-timeline{visibility:hidden}
@keyframes sophia-stage-in{from{opacity:0}to{opacity:1}}
.sophia-live-conversation .sophia-live-bubble{flex:none;align-self:flex-start;max-width:min(84%,66ch);padding:10px 14px;border-radius:15px 15px 15px 4px;background:#fff;border:1px solid #d2e0ee;white-space:pre-wrap;overflow-wrap:anywhere;font-size:1rem;line-height:1.5}
.sophia-live-conversation .sophia-live-bubble.user{align-self:flex-end;background:#dfebfb;border-color:#c3d7f1;border-radius:15px 15px 4px 15px}
.sophia-live-conversation .sophia-live-bubble.work{border-left:4px solid #3c739f}
.sophia-live-conversation .sophia-live-bubble strong{display:block;font-size:.76rem;margin-bottom:2px;color:#254c73}
.sophia-live-conversation>footer{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:8px 18px 12px;background:#e6f0fd;border-top:1px solid #d3e0ee}
.sophia-live-conversation button{min-width:44px;min-height:44px;padding:6px 10px;border:1px solid #b8cee6;border-radius:12px;color:#183e67;background:white;cursor:pointer}
.sophia-live-conversation button:focus-visible,.sophia-live-conversation a:focus-visible{outline:3px solid #2857ab;outline-offset:2px}
.sophia-live-conversation button[aria-pressed=true]{background:#cde3fb}
@media(max-width:760px){
 dialog.sophia-live.sophia-live-conversation{width:100vw!important;height:100dvh!important;max-width:none;max-height:none;margin:0;border:0;border-radius:0;resize:none}
 .sophia-live-conversation>header{grid-template-columns:auto minmax(0,1fr) auto;gap:9px;padding:calc(6px + env(safe-area-inset-top)) 10px 6px}
 .sophia-live-conversation [data-live-expand]{display:none}
 .sophia-live-conversation .sophia-live-portrait{width:54px;height:54px;border-radius:10px}
 .sophia-live-conversation .sophia-live-stage .sophia-live-portrait{width:min(126%,590px)}
 .sophia-live-conversation .sophia-live-stage img{object-position:center 60%}
 .sophia-live-conversation>footer{padding-bottom:calc(6px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){.sophia-live .sophia-live-portrait img[data-voice-pose],.sophia-live-conversation img[data-live-face]{transition:none;transform:none!important}.sophia-live-conversation .sophia-live-stage{animation:none}}
