.spossity-assistant{position:relative;display:flex;gap:4px;align-items:center;justify-content:flex-end;max-width:100%;color:var(--sp-color-violet)}
.spossity-assistant[hidden],.spossity-assistant [hidden]{display:none}
.spossity-assistant button{min-height:44px;min-width:44px;padding:6px 12px;border:1px solid #d6c4f6;border-radius:22px;color:inherit;background:rgba(255,255,255,.8);font:inherit;font-size:13px;font-weight:650;cursor:pointer}
.spossity-assistant button:first-child::before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor;margin-inline-end:7px;vertical-align:middle;opacity:.55}
.spossity-assistant[data-phase="listening"] button:first-child::before{opacity:1}
.spossity-assistant button:disabled{opacity:.65;cursor:default}
html[data-theme="dark"] .spossity-assistant{color:var(--sp-control-icon-dark)}
html[data-theme="dark"] .spossity-assistant button{background:var(--sp-theme-surface);border-color:var(--sp-theme-border)}
.spossity-voice-preferences{display:grid;gap:12px;margin-top:18px;padding-top:16px;border-top:1px solid var(--sp-theme-border);color:var(--sp-theme-text)}
.spossity-voice-preferences header>strong{font-size:10px;font-weight:700}
.spossity-voice-preferences header>p{margin:4px 0 0;font-size:9px;line-height:1.4;color:var(--sp-theme-text-muted)}
.spossity-voice-options{display:grid;gap:8px}
.spossity-voice-option{display:flex;align-items:center;gap:12px;padding:4px 8px;border:1px solid var(--sp-theme-border);border-radius:12px;background:var(--sp-theme-surface-soft);min-width:0}
.spossity-voice-option:has(input:checked){border-color:var(--sp-color-violet);background:var(--sp-theme-surface-accent)}
.spossity-voice-select{display:flex;align-items:center;gap:10px;min-height:44px;flex:1;min-width:0;cursor:pointer}
.spossity-voice-select strong{font-size:12px;font-weight:700;color:var(--sp-theme-text)}
.spossity-voice-select input{width:18px;height:18px;margin:0;flex:0 0 18px;accent-color:var(--sp-selection-light-fill)}
html body.is-logged-in [data-voice-preferences] .spossity-voice-preview{display:flex;align-items:center;justify-content:center;gap:4px;min-height:44px;padding:6px 8px;border:0;border-radius:8px;color:var(--sp-theme-accent);background:transparent;font:inherit;font-size:9px;font-weight:700;cursor:pointer;flex-shrink:0}
.spossity-voice-preferences .profile-setting-row{margin:0}
.spossity-voice-preferences .profile-location-switch{position:relative;flex-shrink:0}
.spossity-voice-preferences input:focus-visible+.profile-location-toggle{outline:2px solid var(--sp-color-violet);outline-offset:3px}
.spossity-voice-preferences footer{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
html body.is-logged-in [data-voice-preferences] .spossity-voice-save{min-height:44px;width:auto;padding:10px 16px;border:1px solid var(--sp-selection-light-border);border-radius:11px;color:var(--sp-selection-light-text);background:var(--sp-selection-light-fill);font:inherit;font-size:9px;font-weight:700;cursor:pointer}
html[data-theme="dark"] body.is-logged-in [data-voice-preferences] .spossity-voice-save{background:var(--sp-selection-dark-fill);color:var(--sp-selection-dark-text);border-color:var(--sp-selection-dark-border)}
.spossity-voice-preferences footer p{margin:0;font-size:9px;line-height:1.4}
.spossity-voice-preferences footer p:empty{display:none}
.spossity-voice-preferences button:disabled{opacity:.6;cursor:default}
.spossity-voice-consent{box-sizing:border-box;width:min(480px,calc(100% - 28px));max-height:85dvh;padding:24px;border:1px solid var(--sp-theme-border);border-radius:24px;background:var(--sp-theme-surface);color:var(--sp-theme-text);font:inherit;overflow:auto;box-shadow:0 16px 60px #06173540}
.spossity-voice-consent::backdrop{background:var(--sp-theme-overlay)}
.spossity-voice-consent h2{font-size:20px;margin:0 0 16px}
.spossity-voice-consent p{font-size:14px;line-height:1.55;margin:0 0 14px}
.spossity-voice-consent-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;margin-top:20px}
.spossity-voice-consent button{min-height:44px;padding:10px 16px;border:1px solid var(--sp-color-violet);border-radius:16px;color:inherit;background:transparent;font:inherit;cursor:pointer}
.spossity-voice-consent button[data-voice-consent-agree]{background:var(--sp-selection-light-fill);color:var(--sp-selection-light-text);border-color:var(--sp-selection-light-border)}
html[data-theme="dark"] .spossity-voice-consent{background:var(--sp-theme-surface);color:var(--sp-theme-text);border-color:var(--sp-theme-border)}

html body.is-logged-in [data-voice-preferences] .spossity-voice-consent-review{min-height:44px;padding:8px;border:0;background:transparent;color:var(--sp-theme-accent);font:inherit;font-size:9px;font-weight:700;text-decoration:underline;cursor:pointer}

html[data-theme="dark"] .spossity-voice-consent button[data-voice-consent-agree]{background:var(--sp-selection-dark-fill);color:var(--sp-selection-dark-text);border-color:var(--sp-selection-dark-border)}

.spossity-companion-name{display:inline}
[data-floating-voice-anchor]{position:fixed;z-index:90;inset-inline-end:max(18px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));width:92px;height:70px;pointer-events:none}
[data-floating-voice-anchor]:has(.spossity-assistant[hidden]){display:none}
[data-floating-voice-anchor] .spossity-assistant{width:92px;height:70px;justify-content:center;pointer-events:auto;touch-action:none;cursor:grab}
[data-floating-voice-anchor].is-dragging .spossity-assistant{cursor:grabbing}
[data-floating-voice-anchor].is-dragging .companion-portrait{filter:drop-shadow(0 8px 12px rgba(11,40,91,.32))}
html body.is-logged-in [data-floating-voice-anchor] .spossity-assistant button:first-child{display:grid;place-items:center;width:92px;height:70px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--sp-color-violet)}
[data-floating-voice-anchor] .spossity-assistant button:first-child::before,[data-floating-voice-anchor] .spossity-companion-name,[data-floating-voice-anchor] .spossity-assistant>p,[data-floating-voice-anchor] .spossity-assistant button[aria-label="Stop voice assistant"]{display:none!important}
[data-floating-voice-anchor] .companion-portrait{grid-area:1/1;width:88px;height:58px;filter:drop-shadow(0 4px 5px rgba(11,40,91,.24))}
[data-floating-voice-anchor] .spossity-assistant[data-phase="listening"] .companion-portrait{filter:drop-shadow(0 0 5px var(--sp-color-violet))}
html body.is-logged-in [data-floating-voice-anchor] .spossity-assistant button:first-child:focus{outline:none}
html body.is-logged-in [data-floating-voice-anchor] .spossity-assistant button:first-child:focus-visible{outline:2px solid var(--sp-color-violet);outline-offset:2px;border-radius:14px}
@media(max-width:1100px){[data-floating-voice-anchor]:not([data-placed]){inset-inline-end:max(12px,env(safe-area-inset-right));bottom:calc(86px + env(safe-area-inset-bottom))}}
/* On a phone or tablet the floating companion covered rows and buttons (Settings, Host Live, sheets). It steps aside
   while Profile/Settings, a studio, a call or text sheet, a form or any dialog is open, and comes back on the main pages. */
@media(max-width:1100px){
  body:is([data-app-view="me"],[data-app-view="event-studio"],[data-app-view="avatar"]) [data-floating-voice-anchor],
  body:has(dialog[open], .home-text-overlay:not([hidden]), .home-text-preview:not([hidden]), .host-event-preview:not([hidden]), .home-profile-popover:not([hidden]), .profile-settings-panel:not([hidden])) [data-floating-voice-anchor]{display:none}
}

@keyframes spossity-microphone-pulse{0%,100%{opacity:1}50%{opacity:.3}}

.spossity-voice-feedback{position:fixed;z-index:150;inset-inline-end:20px;bottom:max(20px,env(safe-area-inset-bottom));box-sizing:border-box;width:min(360px,calc(100% - 40px));display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--sp-rich-edge);border-radius:20px;color:var(--sp-theme-text);font:inherit;font-size:12px;line-height:1.45}
.spossity-voice-feedback[hidden]{display:none!important}
.spossity-voice-feedback>span{flex:1;min-width:0}
.spossity-voice-feedback>button{flex:0 0 44px;min-height:44px;padding:0;border:0;background:transparent;color:var(--sp-theme-text);font:inherit;font-size:22px;cursor:pointer}
@media(max-width:1100px){.spossity-voice-feedback{bottom:calc(150px + env(safe-area-inset-bottom))}}
html:root body.is-logged-in .spossity-voice-option:has(input:checked){border-color:var(--sp-color-violet)!important}

/* Home: the companion in its card at the top (restored 2026-11-21). Elsewhere it floats (above). */
[data-home-voice-anchor]{position:relative;z-index:1}
[data-home-voice-anchor]:has(.spossity-assistant[hidden]){display:none}
[data-home-voice-anchor] .spossity-assistant button{border:0;border-radius:0;background:transparent;box-shadow:none;padding:8px;min-height:44px;min-width:44px}
html body.is-logged-in [data-home-voice-anchor] .spossity-assistant button:first-child{position:relative;font-size:16px;font-weight:800;color:var(--sp-selection-light-fill);text-shadow:none!important;filter:none}
html body.is-logged-in [data-home-voice-anchor] .spossity-assistant button:first-child[data-voice-state="name"]::after{content:attr(data-voice-name);position:absolute;inset:0;display:grid;place-items:center;transform:translate(-1px,-2px);pointer-events:none;color:var(--sp-color-violet);background-image:linear-gradient(165deg,var(--sp-text-on-brand) 3%,var(--sp-color-violet) 19%,var(--sp-selection-light-fill) 43%,var(--sp-control-icon-dark) 48%,var(--sp-color-violet) 58%,var(--sp-selection-light-fill) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;-webkit-text-stroke:.35px var(--sp-selection-light-fill);text-shadow:none!important}
html[data-theme="dark"] body.is-logged-in [data-home-voice-anchor] .spossity-assistant button:first-child{color:var(--sp-selection-dark-fill)}
html[data-theme="dark"] body.is-logged-in [data-home-voice-anchor] .spossity-assistant button:first-child[data-voice-state="name"]::after{background-image:linear-gradient(165deg,var(--sp-text-on-brand) 3%,var(--sp-control-icon-dark) 19%,var(--sp-color-violet) 43%,var(--sp-text-on-brand) 48%,var(--sp-control-icon-dark) 58%,var(--sp-selection-dark-fill) 100%);-webkit-text-stroke:.35px var(--sp-control-icon-dark)}
[data-home-voice-anchor] .spossity-assistant button:first-child::before{display:none}
html body.is-logged-in [data-home-voice-anchor] .spossity-assistant button{background:transparent!important;background-image:none!important;box-shadow:none!important}
[data-home-voice-anchor] .spossity-assistant button[data-voice-state="microphone"]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--sp-color-violet)}
html body.is-logged-in [data-home-voice-anchor] .spossity-assistant button:first-child:focus{outline:none}
html body.is-logged-in [data-home-voice-anchor] .spossity-assistant button:first-child:focus-visible{outline:2px solid var(--sp-color-violet);outline-offset:2px;border-radius:8px}
.home-assistant-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:174px;padding:14px 17px;border:1px solid rgba(255,255,255,.75);border-radius:24px;background:rgba(255,255,255,.67);backdrop-filter:blur(16px);color:var(--sp-theme-text,#0b285b)}
.home-assistant-card[hidden]{display:none}.home-assistant-card>small{font-size:13px;text-align:center}.home-assistant-card .spossity-assistant{justify-content:center}.home-assistant-card button:first-child{display:flex!important;flex-direction:row!important;align-items:center;gap:10px}.home-assistant-card button:first-child::after{display:none!important}.home-assistant-card button:first-child>span{font-size:22px;font-weight:800;color:var(--sp-color-violet)}
html[data-theme="dark"] .home-assistant-card{background:var(--sp-theme-surface);border-color:var(--sp-theme-border)}
/* Match the approved native companion name; do not inherit Home supporting-copy navy. */
html:root body.is-logged-in .home-view .home-assistant-card .spossity-assistant button .spossity-companion-name{color:#9b6cff!important;-webkit-text-fill-color:#9b6cff}
/* Voice-state feedback must never reflow Home or its family card. */
.home-assistant-card [data-home-voice-anchor]{width:100%;height:44px}
.home-assistant-card .spossity-assistant{height:44px;position:relative;gap:0;justify-content:center}
.home-assistant-card .spossity-assistant button:first-child{height:44px;box-sizing:border-box;padding:0 4px;gap:6px}
.home-assistant-card .spossity-assistant button[aria-label="Stop voice assistant"]{width:44px;height:44px;flex:0 0 44px;padding:0}
.home-assistant-card .spossity-assistant button[aria-label="Stop voice assistant"][hidden]{display:block;visibility:hidden;pointer-events:none}

.home-assistant-card .spossity-assistant>p{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
