/* Approved global shell, layered over the existing workspace tokens and page tools. */
body #web-workspace.has-global-system-bar{--system-bar-height:44px;grid-template-rows:var(--system-bar-height) minmax(0,1fr)}
#web-workspace.has-global-system-bar[data-toolbar-style="wide"]{--system-bar-height:60px}
#web-workspace.has-global-system-bar>.side-rail{grid-row:1 / span 2}
#web-workspace.has-global-system-bar>:is(.assistant-main,.task-panel,.companion-surface,.applications-surface,.cloud-surface){grid-row:2}
.ws-system-bar{grid-column:2;grid-row:1;display:flex;align-items:center;min-width:0;height:var(--system-bar-height);padding:0 8px;border-bottom:1px solid var(--ws-line);background:var(--ws-surface);color:var(--ws-muted);z-index:25;gap:0}
.ws-system-apps{display:flex;align-items:center;justify-content:flex-end;flex:1;min-width:0;overflow:hidden}
#web-workspace .ws-system-button{position:relative;flex:0 0 44px;display:inline-flex;align-items:center;justify-content:center;gap:4px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:7px;background:transparent;color:inherit;cursor:pointer;font-size:12px;line-height:1.2}
.ws-system-button svg{width:18px;height:18px;flex:none}.ws-system-button[hidden]{display:none!important}
.ws-system-button:hover{background:var(--ws-hover)!important}.ws-system-button[aria-current="page"]{background:var(--ws-accent-soft)!important;color:var(--ws-accent)!important}
.ws-system-label{display:none}.ws-system-separator{width:1px;height:20px;background:var(--ws-line);margin:0 4px;flex:none}

/* One Web window heading. Native keeps its independently owned global bar. */
.ws-application-header{display:flex;flex:1 1 280px;min-width:190px;max-width:520px;height:100%;align-items:center}
.ws-application-header[hidden]{display:none!important}
.ws-application-header>.ax-header{display:flex;align-items:center;flex:1;min-width:0;min-height:44px;height:100%;padding:0 4px;gap:8px;border:0;flex-wrap:nowrap}
.ws-application-header .ax-header h1{flex:1;min-width:0;font-size:14px;line-height:1.4;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ws-ink)}
.ws-application-header .ax-header-actions{margin-left:auto;display:flex;flex:none;align-items:center;gap:2px}
.ws-system-bar[data-header=true]>.ws-system-apps{flex:0 1 auto;margin-left:auto}
.ws-system-bar[data-header=true] .ax-brand{display:none!important}
@media(max-width:759px){.ws-system-bar[data-header=true]>.ws-system-apps,.ws-system-bar[data-header=true]>.ws-system-button:first-child{display:none!important}.ws-application-header{flex:1 1 auto;min-width:0;max-width:none}.ws-application-header>.ax-header{padding:0;gap:5px}.ws-application-header .ax-window-icon{display:none}.ws-application-header .ax-header h1{font-size:14px}.ws-application-header .ax-header-actions{gap:0}.ws-application-header .ax-header-actions>.ax-icon-button,.ws-application-header .ax-window-more>summary{width:44px;min-width:44px;height:44px;padding:8px}.ws-application-header .ax-header-actions svg{width:19px;height:19px}.ws-system-bar[data-header=true]>.ws-system-separator{margin-inline:2px}}
.ax-extension-retained{height:100%;min-height:0;overflow:auto}.ax-extension-retained[hidden]{display:none!important}.ax-extension-retained>.ax-extension-frame{min-height:0}
#host-manager .ws-settings-call{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;width:auto;min-width:44px;min-height:44px;padding:0 10px;color:var(--ws-accent);background:var(--ws-accent-soft);border:0;border-radius:7px}.ws-settings-call[hidden]{display:none!important}.ws-settings-call .ws-system-label{display:inline}.ws-settings-call svg{width:18px;height:18px}
[data-toolbar-style="wide"] .ws-system-bar .ws-system-button{flex-direction:column;height:56px}[data-toolbar-style="wide"] .ws-system-bar .ws-system-label{display:block;max-width:44px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}
[data-toolbar-style="wide"] .ws-system-bar>[data-state]{width:76px;flex-basis:76px}
.ws-call-face{display:grid;place-items:center;overflow:hidden;width:27px;height:27px;border-radius:50%;color:var(--ws-accent);background:var(--ws-accent-soft);font-weight:600}.ws-call-face img{width:100%;height:100%;object-fit:cover}
.ws-call-symbol{position:absolute;right:1px;bottom:4px;display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:var(--ws-surface);color:var(--ws-positive)}.ws-call-symbol svg{width:11px;height:11px}[data-state="muted"] .ws-call-symbol{color:var(--ws-danger)}
.ws-window-manager,.ws-global-call{width:min(520px,calc(100vw - 28px));max-height:calc(var(--app-height) - 40px);overflow:auto;padding:20px;border:1px solid var(--ws-line);border-radius:14px;color:var(--ws-ink);background:var(--ws-surface);box-shadow:var(--ws-shadow)}
.ws-window-manager::backdrop,.ws-global-call::backdrop{background:var(--ws-scrim)}
.ws-global-call{position:fixed;inset:auto 18px 18px auto;margin:0;width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 72px);padding:16px;z-index:110;overscroll-behavior:contain}
.ws-global-call[data-size="large"]{width:min(700px,calc(100vw - 36px))}
.ws-global-call .ws-dialog-heading h2{flex:1}.ws-global-call .ws-dialog-heading{gap:4px}
.ws-call-resize::before{content:none}
.ws-call-avatar-stage{display:grid;place-items:center;margin:12px 0;border-radius:12px;background:var(--ws-hover);overflow:hidden}
.ws-call-avatar-stage[hidden],.ws-call-avatar-caption[hidden]{display:none!important}
.ws-call-avatar-stage .companion-portrait{position:relative;width:min(100%,220px);height:230px;margin:0;overflow:hidden}
.ws-call-avatar-stage .companion-portrait img,.ws-call-avatar-stage .companion-portrait video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.ws-call-avatar-caption{font-size:12px;color:var(--ws-muted);margin:8px 0;line-height:1.5}
#web-workspace .ws-global-call .voice-io-grid,#web-workspace .ws-global-call #voice-boundary,#web-workspace .ws-global-call #voice-guard-status{display:none}
.ws-global-call :is(#voice-push,#voice-toggle,.composer-hint,#chat-channel-prompt){display:none!important}
.ws-global-call .voice-live-text{margin:8px 0;font-size:13px;max-height:90px;overflow:auto}
@media(max-width:759px){.ws-global-call{inset:auto 10px calc(74px + env(safe-area-inset-bottom)) 10px;width:auto!important;max-height:calc(100dvh - 136px);padding:14px}.ws-global-call .ws-call-avatar-stage .companion-portrait{height:180px}}
.ws-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.ws-dialog-heading h2{font-size:18px;margin:0}.ws-window-list{display:grid;gap:0}.ws-window-row{display:flex;gap:8px;align-items:center;border-top:1px solid var(--ws-line);padding:8px 0}.ws-window-row>.ws-system-button:first-child{flex:1!important;width:auto!important;justify-content:flex-start!important;gap:10px!important;text-align:left}.ws-window-row .ws-system-label,.ws-dialog-actions .ws-system-label{display:block}.ws-window-row>.ws-system-button:last-child{width:76px!important;flex-basis:76px!important;color:var(--ws-muted)}.ws-window-row small{color:var(--ws-muted);font-size:11px;margin-left:auto}.ws-window-limit{display:flex;align-items:center;gap:12px;margin:16px 0}.ws-window-limit select{min-height:44px}.ws-manager-notice,.ws-call-source{color:var(--ws-muted);font-size:12px;line-height:1.7}.ws-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.ws-dialog-actions>.ws-system-button{width:auto!important;flex-basis:auto!important;padding:0 12px!important}.ws-call-end{min-height:44px;border-radius:7px;padding:8px 15px;border:0;background:var(--ws-danger-soft);color:var(--ws-danger)}
#web-workspace .ws-global-call .voice-dock{display:block!important;width:auto;max-width:none;max-height:none;margin:12px 0;padding:0;border:0;background:transparent}.ws-global-call .voice-dock-heading{display:none}.ws-call-status{color:var(--ws-ink);font-size:14px}
#web-workspace.has-global-system-bar .application-call-entry,#web-workspace.has-global-system-bar .ax-brand{display:none!important}
.ws-close-page{display:inline-flex;align-items:center;gap:4px;min-height:44px;border:0;padding:6px 10px;border-radius:7px;background:transparent;color:var(--ws-muted);font-size:12px;white-space:nowrap}.ws-close-page svg{width:16px;height:16px}.ws-close-page:hover{background:var(--ws-hover)}
@media (max-width:759px), (max-height:540px) and (pointer:coarse) {
  body #web-workspace.has-global-system-bar { grid-template-rows:var(--system-bar-height) minmax(0,1fr) var(--workspace-bottom); }
  #web-workspace.has-global-system-bar>.ws-system-bar { grid-column:1; }
  #web-workspace.has-global-system-bar>.mobile-nav { grid-row:3; }
  #web-workspace.has-global-system-bar>:is(.assistant-main,.task-panel,.companion-surface,.applications-surface,.cloud-surface) { grid-column:1; grid-row:2; }
  .ws-system-bar { padding:0 8px; }
  .ws-window-manager,.ws-global-call { padding:14px; }
}
html.native-global-shell #web-workspace.has-global-system-bar{grid-template-rows:minmax(0,1fr)}html.native-global-shell .ws-system-bar{display:none}html.native-global-shell #web-workspace.has-global-system-bar>:is(.assistant-main,.task-panel,.companion-surface,.applications-surface,.cloud-surface){grid-row:1}

html:not(.native-global-shell) body:has(#web-workspace.has-global-system-bar) #cloud-manager[open]{top:calc(var(--global-system-bar-height,44px) + env(safe-area-inset-top));height:calc(var(--app-height) - var(--global-system-bar-height,44px));max-height:calc(var(--app-height) - var(--global-system-bar-height,44px))}
#web-workspace.has-global-system-bar .assistant-header .assistant-avatar{display:none}
html.native-global-shell body #cloud-manager[open]{inset:0;height:100%;max-height:100%}
@media(max-width:759px){html:not(.native-global-shell) body:has(#web-workspace.has-global-system-bar) #cloud-manager[open]{height:calc(var(--app-height) - var(--global-system-bar-height,44px) - var(--workspace-bottom));max-height:calc(var(--app-height) - var(--global-system-bar-height,44px) - var(--workspace-bottom))}html.native-global-shell body #cloud-manager[open]{height:var(--app-height);max-height:var(--app-height)}}

/* Continuous calls: a quiet companion card, collapsible into the global bar. */
.ws-call-cluster{display:flex;align-items:center;flex:none;gap:0;max-width:100%;border-radius:24px;color:var(--ws-ink)}
.ws-call-cluster[data-state=active]{background:var(--ws-accent-soft)}
.ws-call-cluster[data-state=muted]{background:var(--ws-hover)}
#web-workspace .ws-call-entry{width:142px;flex:0 0 142px;justify-content:flex-start;padding:0 10px;gap:9px;border-radius:24px}
#web-workspace .ws-call-entry[data-state=idle]{width:112px;flex-basis:112px}
.ws-call-entry-copy{display:flex;flex-direction:column;align-items:flex-start;gap:2px;overflow:hidden}
.ws-call-entry-label{font-size:12px;font-weight:600;white-space:nowrap;max-width:92px;overflow:hidden;text-overflow:ellipsis}
.ws-call-entry-time{font-size:10px;font-variant-numeric:tabular-nums;color:var(--ws-muted)}
.ws-call-entry[data-state=idle] .ws-call-entry-time{display:none}
#web-workspace .ws-call-quick{width:44px;flex:0 0 44px;border-radius:50%;background:transparent}
#web-workspace .ws-call-quick-end{color:var(--ws-danger)}
.ws-call-quick .ws-system-label{display:none!important}
#web-workspace .ws-call-entry .ws-call-face{width:28px;height:28px;flex:none;background:var(--ws-surface)}
#web-workspace .ws-global-call{width:324px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 88px);inset:auto 24px 24px auto;margin:0;padding:14px 16px 16px;border-radius:22px;border:1px solid var(--ws-line);box-shadow:0 16px 60px #0f172a24,0 2px 8px #0f172a0a;overflow:auto;scrollbar-width:thin;box-sizing:border-box}
#web-workspace .ws-global-call[data-size=large]{width:448px}
#web-workspace .ws-global-call[data-placement=bottom-left]{inset:auto auto 24px calc(var(--workspace-nav,224px) + 24px)}
#web-workspace .ws-global-call[data-placement=top-right]{inset:calc(var(--global-system-bar-height,44px) + 20px) 24px auto auto}
#web-workspace .ws-global-call[data-placement=top-left]{inset:calc(var(--global-system-bar-height,44px) + 20px) auto auto calc(var(--workspace-nav,224px) + 24px)}
#web-workspace .ws-global-call[data-dragging=true]{inset:var(--call-y) auto auto var(--call-x);transition:none;user-select:none}
.ws-call-heading{gap:4px;min-height:44px}
.ws-call-handle{display:flex;align-items:center;gap:10px;flex:1;min-width:0;cursor:grab;touch-action:none;border-radius:10px}
.ws-call-handle:active{cursor:grabbing}.ws-call-handle:focus-visible{outline:2px solid var(--ws-accent);outline-offset:3px}
.ws-call-identity{width:36px;height:36px;display:grid;place-items:center;background:var(--ws-accent-soft);border:1px solid var(--ws-line);border-radius:50%;flex:none;overflow:hidden;font-size:16px;color:var(--ws-accent)}
.ws-call-identity img{width:100%;height:100%;object-fit:cover}
.ws-call-identity-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.ws-global-call .ws-call-heading h2{font-size:15px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.ws-call-time{font-size:11px;line-height:1.3;color:var(--ws-muted);font-variant-numeric:tabular-nums}
#web-workspace .ws-global-call :is(.ws-call-minimize,.ws-call-resize){width:36px;flex:0 0 36px;height:44px;color:var(--ws-muted)}
.ws-global-call :is(.ws-call-minimize,.ws-call-resize) .ws-system-label{display:none}
.ws-call-resize::before{content:none}.ws-call-resize>svg{display:block}
.ws-call-activity{display:flex;align-items:center;gap:12px;margin:18px 0 8px;min-height:46px}
.ws-call-activity-signal{display:flex;align-items:center;justify-content:center;gap:3px;width:38px;height:38px;flex:none;background:var(--ws-accent-soft);border-radius:13px;color:var(--ws-accent)}
.ws-call-activity-signal i{display:block;width:3px;height:9px;border-radius:3px;background:currentColor}
.ws-call-activity-signal i:nth-child(2),.ws-call-activity-signal i:nth-child(4){height:16px}.ws-call-activity-signal i:nth-child(3){height:23px}
.ws-global-call[data-phase=speaking] .ws-call-activity-signal i{animation:call-speaking .8s ease-in-out infinite alternate;transform-origin:center}
.ws-global-call[data-phase=speaking] .ws-call-activity-signal i:nth-child(even){animation-delay:-.35s}
.ws-global-call:is([data-phase=thinking],[data-phase=working],[data-phase=connecting],[data-phase=reconnecting]) .ws-call-activity-signal i{height:5px;animation:call-waiting 1.4s ease-in-out infinite}
.ws-global-call:is([data-phase=thinking],[data-phase=working],[data-phase=connecting],[data-phase=reconnecting]) .ws-call-activity-signal i:nth-child(even){animation-delay:.2s}
.ws-global-call:is([data-phase=muted],[data-phase=ended],[data-phase=occupied]) .ws-call-activity-signal{background:var(--ws-hover);color:var(--ws-muted)}
.ws-call-status-copy{min-width:0}.ws-global-call .ws-call-status{font-size:17px;font-weight:600;line-height:1.4;margin:0;color:var(--ws-ink)}
.ws-call-hint{font-size:12px;line-height:1.5;color:var(--ws-muted);margin:3px 0 0}
.ws-global-call .ws-call-source{font-size:11px;line-height:1.5;margin:8px 0 0;padding:6px 9px;border-radius:8px;background:var(--ws-hover);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ws-call-source[data-state=failed]{color:var(--ws-danger)}
.ws-call-caption{font-size:13px;line-height:1.65;margin:10px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--ws-ink)}
.ws-call-caption[hidden]{display:none!important}
.ws-global-call[data-size=large] .ws-call-caption{-webkit-line-clamp:6}
#web-workspace .ws-global-call .ws-call-actions{display:flex;flex-wrap:nowrap;justify-content:space-around;align-items:flex-start;gap:8px;margin:16px 0 0;padding:0}
#web-workspace .ws-global-call .ws-call-actions>.ws-system-button,#web-workspace .ws-global-call .ws-call-end{display:flex;align-items:center;justify-content:flex-start;flex-direction:column;flex:0 0 56px;width:56px;height:66px;min-height:66px;padding:0!important;gap:6px;border:0;background:transparent;color:var(--ws-ink);border-radius:12px;cursor:pointer}
#web-workspace .ws-call-actions>.ws-system-button>svg,.ws-call-end-icon{display:grid;place-items:center;width:44px;height:44px;padding:12px;border-radius:50%;box-sizing:border-box;background:var(--ws-hover);color:var(--ws-ink)}
.ws-call-end-icon svg{width:20px;height:20px}
#web-workspace .ws-call-actions>.ws-system-button[aria-pressed=true]>svg{background:var(--ws-accent-soft);color:var(--ws-accent)}
#web-workspace .ws-call-actions>.ws-system-button[aria-label="打开麦克风"]>svg{color:var(--ws-danger);background:var(--ws-danger-soft)}
#web-workspace .ws-global-call .ws-call-end-icon{background:#dc3d50;color:#fff}
#web-workspace .ws-global-call .ws-call-end[data-action=start] .ws-call-end-icon{background:var(--ws-accent);transform:rotate(135deg)}
.ws-call-actions .ws-system-label{display:block;font-size:11px;line-height:1.3;white-space:nowrap}
#web-workspace .ws-global-call .ws-call-actions>button:hover{background:var(--ws-hover)!important}
#web-workspace .ws-global-call button:disabled{opacity:.45;cursor:default}
.ws-call-communication[hidden]{display:none!important}.ws-call-communication{margin-top:12px;padding-top:12px;border-top:1px solid var(--ws-line)}
.ws-call-communication .communication-embedded{margin:0;padding:0;border:0}.ws-call-communication .communication-feedback:empty{display:none}
.ws-call-communication .communication-feedback{font-size:13px;max-height:100px;margin:0 0 10px}
#web-workspace .ws-global-call .ws-call-legacy-status{display:none!important}
.ws-global-call .ws-call-avatar-stage{margin:12px 0 0;border-radius:16px;background:var(--ws-hover)}
.ws-call-avatar-stage .companion-portrait{height:200px}.ws-global-call[data-size=large] .ws-call-avatar-stage .companion-portrait{height:290px;width:290px}
.ws-call-handoff{width:100%;min-height:44px;padding:9px;margin-top:12px;border:0;border-radius:10px;color:var(--ws-accent);background:var(--ws-accent-soft);font:inherit;cursor:pointer}
.ws-call-handoff-note{font-size:11px;line-height:1.6;color:var(--ws-muted);margin:6px 0}
.ws-global-call [hidden]{display:none!important}
@keyframes call-speaking{from{transform:scaleY(.5)}to{transform:scaleY(1)}}
@keyframes call-waiting{0%,100%{opacity:.3}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.ws-global-call,.ws-global-call *{animation:none!important;transition:none!important}}
@media(max-width:759px){
 #web-workspace .ws-global-call,#web-workspace .ws-global-call[data-placement]{width:calc(100vw - 24px)!important;max-width:380px;inset:auto 12px calc(74px + env(safe-area-inset-bottom)) auto;max-height:calc(100dvh - 142px);padding:12px 16px 14px}
 #web-workspace .ws-global-call[data-size=large]{max-width:none;max-height:calc(100dvh - 132px)}
 .ws-call-handle{cursor:default;touch-action:auto}.ws-call-activity{margin-top:14px}
 #web-workspace .ws-call-entry{width:124px;flex-basis:124px;gap:6px;padding:0 8px}
 #web-workspace .ws-call-entry[data-state=idle]{width:108px;flex-basis:108px}
 .ws-call-entry-label{max-width:78px;font-size:11px}
 .ws-call-avatar-stage .companion-portrait{height:180px}
}
[data-toolbar-style=wide] .ws-call-cluster .ws-system-button{flex-direction:row;height:44px}
[data-toolbar-style=wide] .ws-call-cluster .ws-system-label{display:none}

/* Three explicit forms. Assistant is transparent; stage is an immersive call. */
#web-workspace .ws-global-call[data-mode=assistant]{width:264px;height:274px;max-width:calc(100vw - 24px);padding:0;border:0;background:transparent;box-shadow:none;overflow:visible;pointer-events:none}
#web-workspace .ws-global-call[data-mode=assistant] :is(.ws-call-heading,.ws-call-avatar-stage,.ws-call-hint,.ws-call-source,.ws-call-caption,.ws-call-avatar-caption){display:none!important}
.ws-call-pet{display:flex;align-items:center;justify-content:center;width:164px;height:208px;margin:0 auto;padding:0;border:0;background:transparent!important;cursor:grab;touch-action:none;pointer-events:auto;position:relative;filter:drop-shadow(0 9px 8px #11182724)}
.ws-call-pet>img{width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none}
.ws-call-pet>.ws-pet-motion-layer{position:absolute;inset:0;opacity:0;transition:opacity .14s linear;transform-origin:50% 85%}
.ws-call-pet>.ws-pet-motion-layer[data-visible=true]{opacity:1}
.ws-call-pet[data-motion-ready=true]>img:not(.ws-pet-motion-layer){visibility:hidden}
.ws-call-pet[data-motion-effect=nod]>.ws-pet-motion-layer[data-visible=true]{animation:ws-pet-native-nod .72s ease-in-out}
.ws-call-pet[data-motion-effect=bounce]>.ws-pet-motion-layer[data-visible=true]{animation:ws-pet-native-bounce .72s ease-in-out}
.ws-call-pet[data-motion-effect=shake]>.ws-pet-motion-layer[data-visible=true]{animation:ws-pet-native-shake .72s ease-in-out}
.ws-call-pet[data-motion-effect=sparkle]>.ws-pet-motion-layer[data-visible=true]{animation:ws-pet-native-sparkle .72s ease-in-out}
@keyframes ws-pet-native-nod{0%,100%{transform:rotate(0)}35%{transform:rotate(1.43deg)}68%{transform:rotate(-1.03deg)}}
@keyframes ws-pet-native-bounce{0%,52%,100%{transform:translateY(0)}24%{transform:translateY(-12px)}72%{transform:translateY(-5px)}}
@keyframes ws-pet-native-shake{0%,100%{transform:translateX(0)}18%{transform:translateX(-6px)}36%{transform:translateX(6px)}56%{transform:translateX(-4px)}76%{transform:translateX(4px)}}
@keyframes ws-pet-native-sparkle{0%,100%{transform:scale(1)}22%{transform:scale(1.035)}48%{transform:scale(.99)}72%{transform:scale(1.02)}}
@media(prefers-reduced-motion:reduce){.ws-call-pet>.ws-pet-motion-layer{animation:none!important;transition:none}}
.ws-call-pet-fallback{display:grid;place-items:center;width:96px;height:96px;border-radius:50%;background:var(--ws-accent-soft);color:var(--ws-accent);font-size:38px}
#web-workspace .ws-call-pet:focus-visible{outline:2px solid var(--ws-accent);outline-offset:4px;border-radius:16px}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-activity{display:flex;justify-content:center;margin:0;min-height:24px;pointer-events:none}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-status{width:fit-content;padding:4px 10px;border-radius:18px;font-size:11px;font-weight:500;line-height:1.3;background:var(--ws-surface);color:var(--ws-ink);box-shadow:0 2px 12px #0f172a12}
.ws-call-mode-nav{display:flex;align-items:center;justify-content:center;gap:4px;pointer-events:auto}
#web-workspace .ws-call-mode-nav .ws-system-button{width:44px;flex:0 0 44px}.ws-call-mode-nav .ws-system-label{display:none!important}.ws-call-mode-nav [aria-current=true]{color:var(--ws-accent);background:var(--ws-accent-soft)}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-mode-nav{position:absolute;left:50%;bottom:66px;transform:translateX(-50%);padding:3px;background:var(--ws-surface);border:1px solid var(--ws-line);border-radius:28px;box-shadow:var(--ws-shadow);opacity:0;pointer-events:none}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-actions{position:absolute;bottom:0;left:0;right:0;margin:0;padding:6px!important;gap:0;border:1px solid var(--ws-line);border-radius:22px;background:var(--ws-surface);box-shadow:var(--ws-shadow);opacity:0;pointer-events:none}
#web-workspace .ws-global-call[data-mode=assistant]:is(:hover,:focus-within,[data-revealed=true]) :is(.ws-call-actions,.ws-call-mode-nav){opacity:1;pointer-events:auto}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-actions>.ws-system-button,#web-workspace .ws-global-call[data-mode=assistant] .ws-call-end{width:40px;height:44px;min-height:44px;flex:0 0 40px;border-radius:50%;justify-content:center;gap:0}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-actions>button>.ws-system-label{display:none!important}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-actions>button>svg,#web-workspace .ws-global-call[data-mode=assistant] .ws-call-end-icon{width:36px;height:36px;padding:9px}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-actions>.ws-call-minimize{display:flex}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-handoff{position:absolute;bottom:0;pointer-events:auto}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-handoff-note{display:none}
#web-workspace .ws-global-call[data-mode=stage]{position:fixed;inset:0;margin:0;width:100vw!important;max-width:none;height:var(--app-height,100dvh);max-height:none;padding:24px 32px;background:radial-gradient(ellipse at 50% 42%,#333c58 0%,#161d2d 55%,#0c111c 100%);color:#fff;border:0;border-radius:0;overflow:auto;display:flex;flex-direction:column;align-items:center;pointer-events:auto;--ws-ink:#f4f6fb;--ws-muted:#c5cbd8;--ws-hover:#ffffff17;--ws-accent-soft:#ffffff21;--ws-line:#ffffff26;--ws-surface:#182131;--ws-accent:#b7cbff}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-heading{align-self:stretch;width:100%;height:52px;flex:none;position:relative}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-handle{cursor:default}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-heading .ws-call-resize{margin-left:auto}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-pet{display:none}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-avatar-stage{display:flex;flex:1;min-height:160px;width:100%;background:transparent;margin:0;overflow:hidden;box-shadow:none}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-avatar-stage .companion-portrait{width:min(70vw,580px)!important;height:min(65dvh,620px)!important;max-height:100%;margin:0;flex:none;background:transparent}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-activity{margin:4px 0 6px;min-height:30px}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-status{font-size:16px;font-weight:500}
#web-workspace .ws-global-call[data-mode=stage] :is(.ws-call-hint,.ws-call-source){display:none}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-mode-nav{position:absolute;top:26px;left:50%;transform:translateX(-50%);background:#ffffff0c;border:1px solid var(--ws-line);border-radius:26px;padding:2px}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions{flex:none;justify-content:center;gap:14px;width:auto;max-width:100%;margin:8px 0 12px;padding:0}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-system-button,#web-workspace .ws-global-call[data-mode=stage] .ws-call-end{flex:0 0 58px;width:58px;height:68px;padding:0!important;color:#fff}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-call-minimize{display:none}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-avatar-caption{margin:0;font-size:12px}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-heading .ws-system-label{display:none}
.ws-call-appearance-picker{position:absolute;bottom:calc(100% + 8px);right:0;width:300px;max-width:calc(100vw - 24px);padding:12px;background:var(--ws-surface);color:var(--ws-ink);border:1px solid var(--ws-line);border-radius:18px;box-shadow:var(--ws-shadow);pointer-events:auto;box-sizing:border-box}
.ws-call-appearance-picker>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.ws-call-appearance-picker h3{font-size:14px;margin:0}.ws-call-appearance-picker>header .ws-system-label{display:none}
.ws-call-character-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.ws-call-character{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:98px;padding:5px;border:1px solid transparent;border-radius:12px;background:var(--ws-hover);color:inherit;font:inherit;font-size:12px;cursor:pointer}
.ws-call-character>img{height:66px;width:62px;object-fit:contain}.ws-call-character[aria-pressed=true]{border-color:var(--ws-accent);background:var(--ws-accent-soft)}.ws-call-character:disabled{cursor:wait;opacity:.5}.ws-call-choice-status{font-size:12px;margin:6px 0 0;min-height:0}.ws-call-choice-status:empty{display:none}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-appearance-picker{position:absolute;right:32px;bottom:112px}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-communication{position:absolute;bottom:calc(100% + 8px);right:0;width:320px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 300px);overflow:auto;margin:0;padding:12px;background:var(--ws-surface);color:var(--ws-ink);border:1px solid var(--ws-line);border-radius:16px;box-shadow:var(--ws-shadow);pointer-events:auto;box-sizing:border-box}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-communication{position:absolute;right:32px;bottom:112px;width:340px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 210px);overflow:auto;margin:0;padding:12px;background:var(--ws-surface);border:1px solid var(--ws-line);border-radius:16px;box-shadow:var(--ws-shadow)}
@media(max-width:759px){
 #web-workspace .ws-global-call[data-mode=assistant],#web-workspace .ws-global-call[data-mode=assistant][data-placement]{width:264px!important;max-width:calc(100vw - 24px);height:262px;max-height:none;inset:auto 12px calc(74px + env(safe-area-inset-bottom)) auto;padding:0}
 #web-workspace .ws-global-call[data-mode=assistant][data-placement$=left]{left:12px;right:auto}
 #web-workspace .ws-global-call[data-mode=assistant][data-placement^=top]{top:68px;bottom:auto}
 #web-workspace .ws-global-call[data-mode=stage],#web-workspace .ws-global-call[data-mode=stage][data-placement]{inset:0;padding:12px 16px calc(14px + env(safe-area-inset-bottom));max-height:none;width:100vw!important;height:var(--app-height,100dvh)}
 #web-workspace .ws-global-call[data-mode=stage] .ws-call-mode-nav{position:static;transform:none;order:1;margin:6px auto 0}
 #web-workspace .ws-global-call[data-mode=stage] .ws-call-heading{height:44px}
 #web-workspace .ws-global-call[data-mode=stage] .ws-call-actions{gap:3px}
 #web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-system-button,#web-workspace .ws-global-call[data-mode=stage] .ws-call-end{width:50px;flex-basis:50px}
 #web-workspace .ws-global-call[data-mode=stage] :is(.ws-call-appearance-picker,.ws-call-communication){right:12px;bottom:150px;max-height:calc(100dvh - 210px);overflow:auto}
 #web-workspace .ws-call-entry{width:100px;flex-basis:100px}
 .ws-call-entry-label{max-width:52px}
}
@media(max-width:359px){#web-workspace .ws-call-entry:not([data-state=idle]){width:64px;flex-basis:64px;padding:0 4px;gap:4px}#web-workspace .ws-call-entry .ws-call-face{width:24px;height:24px}.ws-call-entry:not([data-state=idle]) .ws-call-entry-label{display:none}.ws-call-entry:not([data-state=idle]) .ws-call-entry-time{font-size:9px}}

/* 0.9 UI: connection is a transport fact; everyday call states use an accessible icon. */
.ws-call-entry:is([data-state=active],[data-state=muted]) .ws-call-entry-label{display:none}
#web-workspace .ws-call-entry:is([data-state=active],[data-state=muted]){width:91px;flex-basis:91px}
.ws-call-entry:is([data-state=active],[data-state=muted]) .ws-call-entry-time{font-size:12px;color:var(--ws-accent)}
.ws-call-activity-icon{display:inline-flex;align-items:center;justify-content:center;gap:3px;width:38px;height:38px;flex:none;color:var(--ws-accent);background:var(--ws-accent-soft);border-radius:50%}
.ws-call-activity-icon svg{width:21px;height:21px}.ws-call-activity-icon i{width:3px;height:8px;border-radius:3px;background:currentColor}
.ws-call-activity-icon i:nth-child(even){height:17px}.ws-call-activity-icon i:nth-child(3){height:24px}
.ws-call-activity-icon[data-signal=wave] i{animation:call-speaking .8s ease-in-out infinite alternate}
.ws-call-activity-icon[data-signal=wave] i:nth-child(even){animation-delay:-.35s}
.ws-call-activity-icon:is([data-signal=thinking],[data-signal=connecting]) i{height:5px;animation:call-waiting 1.4s ease-in-out infinite}
.ws-call-activity-icon:is([data-signal=thinking],[data-signal=connecting]) i:nth-child(even){animation-delay:.2s}
.ws-call-activity-icon[data-signal=muted]{color:var(--ws-danger);background:var(--ws-danger-soft)}
.ws-call-activity-icon[data-signal=failed]{color:var(--ws-danger)}
.ws-call-connecting{text-align:center;pointer-events:auto;padding:36px 16px 48px}
.ws-call-calling-face{position:relative;display:grid;place-items:center;width:100px;height:100px;margin:0 auto 22px;background:var(--ws-accent-soft);border:1px solid var(--ws-line);border-radius:30px;font-size:40px;color:var(--ws-accent)}
.ws-call-calling-face>img{width:94%;height:94%;object-fit:contain;border-radius:28px}
[data-call-screen=calling] .ws-call-calling-face::after{content:'';position:absolute;inset:-10px;border:1px solid var(--ws-accent);border-radius:38px;animation:call-waiting 1.6s ease-in-out infinite}
.ws-call-calling-name{font-size:24px;line-height:1.35;margin:0 0 12px;font-weight:600}.ws-call-calling-label{font-size:16px;line-height:1.5;margin:0;color:var(--ws-muted)}
#web-workspace .ws-global-call:not([open]){display:none!important}
#web-workspace .ws-global-call[data-mode=assistant][data-placement]:not([data-call-screen=connected]){height:auto;min-height:330px}
#web-workspace .ws-global-call:not([data-call-screen=connected]){pointer-events:auto;background:var(--ws-surface);border:1px solid var(--ws-line);border-radius:28px;box-shadow:var(--ws-shadow);height:auto;overflow:auto}
#web-workspace .ws-global-call:not([data-call-screen=connected]) .ws-call-actions{position:static;opacity:1;pointer-events:auto;box-shadow:none;border:0;background:transparent;margin:0 auto;padding:0 12px 14px!important;justify-content:center}
#web-workspace .ws-global-call:not([data-call-screen=connected]) .ws-call-actions>.ws-system-button{display:none}
#web-workspace .ws-global-call:not([data-call-screen=connected]) .ws-call-actions>.ws-call-minimize{display:flex}
#web-workspace .ws-global-call:not([data-call-screen=connected]) .ws-call-activity{display:none}
#web-workspace .ws-global-call:not([data-call-screen=connected]) .ws-call-hint:not(:empty){display:block!important;padding:0 22px;text-align:center;margin:-26px 0 28px}
#web-workspace .ws-global-call[data-mode=stage]{--ws-ink:#172b4d;--ws-muted:#526580;--ws-hover:#385d9020;--ws-accent-soft:#2563eb16;--ws-line:#93a9c52e;--ws-surface:#f5f8fe;--ws-accent:#2759bc;background:radial-gradient(ellipse at 50% 39%,#fff 0%,#eef4ff 48%,#dce7f8 100%);color:var(--ws-ink);padding-bottom:max(22px,env(safe-area-inset-bottom))}
html[data-theme=dark] #web-workspace .ws-global-call[data-mode=stage]{--ws-ink:#f4f7ff;--ws-muted:#bbc9df;--ws-hover:#ffffff17;--ws-accent-soft:#a2c0ff21;--ws-line:#cbdcff26;--ws-surface:#17243a;--ws-accent:#b5ceff;background:radial-gradient(ellipse at 50% 39%,#344969 0%,#15253e 51%,#0b1424 100%)}
#web-workspace .ws-global-call[data-mode=stage]:not([data-call-screen=connected]){border:0;border-radius:0}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-connecting{flex:1;width:100%;padding:10dvh 0 5dvh}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-activity{justify-content:center;gap:8px;flex-wrap:wrap}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions{gap:18px;padding:12px 0 0!important;margin:0}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-system-button,#web-workspace .ws-global-call[data-mode=stage] .ws-call-end{width:58px;height:64px;min-height:64px;flex-basis:58px;color:var(--ws-ink);justify-content:center}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-system-button>svg,#web-workspace .ws-global-call[data-mode=stage] .ws-call-end-icon{width:54px;height:54px;padding:16px}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions .ws-system-label{display:none}
#web-workspace .ws-global-call .ws-call-end-icon{background:#dc3d50;color:#fff;box-shadow:0 5px 18px #dc3d502b}
#web-workspace .ws-global-call .ws-call-end:focus-visible{outline:2px solid var(--ws-accent);outline-offset:4px}
@media(max-width:759px){
 #web-workspace .ws-global-call[data-mode=stage] .ws-call-actions{gap:8px}
 #web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-system-button,#web-workspace .ws-global-call[data-mode=stage] .ws-call-end{width:52px;flex-basis:52px}
}
@media(prefers-reduced-motion:reduce){.ws-call-calling-face::after{animation:none!important}}

/* Keep closed stage dialogs closed, and anchor optional panels inside the viewport. */
#web-workspace .ws-global-call:not([open]){display:none!important}
#web-workspace .ws-global-call[data-mode=assistant] :is(.ws-call-appearance-picker,.ws-call-communication){max-height:max(100px,calc(100dvh - 390px));overflow:auto}
#web-workspace .ws-global-call[data-mode=assistant][data-placement$=left] :is(.ws-call-appearance-picker,.ws-call-communication){left:0;right:auto}
#web-workspace .ws-global-call[data-mode=assistant][data-placement^=top] :is(.ws-call-appearance-picker,.ws-call-communication){top:calc(100% + 8px);bottom:auto}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-call-minimize{display:flex}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-resize{display:none}
@media(max-width:759px){#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-system-button,#web-workspace .ws-global-call[data-mode=stage] .ws-call-end{width:44px;flex-basis:44px}}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-avatar-stage{align-items:center;justify-content:center}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-minimize .ws-system-label{display:block}
#web-workspace .ws-global-call[data-phase=failed] .ws-call-activity{display:block;max-width:300px;padding:12px;border:1px solid var(--ws-line);border-radius:12px;background:var(--ws-subtle);pointer-events:auto}
#web-workspace .ws-global-call[data-phase=failed] .ws-call-hint{display:block!important;white-space:normal;line-height:1.65}

/* Stage controls stay in their familiar positions; compact assistant retains its own collapse. */
#web-workspace .ws-global-call[data-mode=stage] .ws-call-actions>.ws-call-minimize{display:none}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-heading :is(.ws-call-minimize,.ws-call-resize){display:flex;width:44px;flex-basis:44px}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-minimize .ws-system-label{display:none}
@media(max-height:480px){#web-workspace .ws-global-call[data-mode=assistant][data-placement]:not([data-call-screen=connected]){min-height:0;max-height:calc(100dvh - 100px);overflow:auto}.ws-call-connecting{padding-block:16px}.ws-call-calling-face{width:64px;height:64px;margin-bottom:10px}}

/* Approved 0.9 dock: new app icons grow left; one shared control set and a fixed call slot. */
body #web-workspace.has-global-system-bar,#web-workspace.has-global-system-bar[data-toolbar-style="wide"]{--system-bar-height:44px;--ws-call-dock-width:104px;--ws-call-side:40px}
.ws-system-bar{flex-wrap:nowrap;gap:0}
.ws-system-bar .ws-application-header,.ws-system-bar .ws-application-header>.ax-header{display:contents}
#web-workspace .ws-system-bar>.ws-system-button:first-child{order:0;display:inline-flex!important;flex-direction:row;width:36px;flex:0 0 36px;height:44px;min-height:44px}
.ws-system-bar>.ws-system-button .ws-system-label{display:none!important}
.ws-system-bar .ax-window-icon{display:none}
.ws-system-bar .ax-header h1{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.ws-system-bar>.ws-system-apps,.ws-system-bar[data-header=true]>.ws-system-apps{order:2;display:flex!important;flex:1 1 auto;justify-content:flex-end;align-items:center;gap:2px;min-width:0;margin:0 4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.ws-system-bar>.ws-system-apps[hidden]{display:none!important}
#web-workspace .ws-system-bar .ax-header-actions{order:3;display:flex;flex:none;margin-left:auto;gap:0;height:44px;flex-wrap:nowrap}
#web-workspace .ws-system-bar .ax-header-actions[hidden]{display:none!important}
#web-workspace .ws-system-bar .ax-header-actions>.ax-icon-button{width:28px;min-width:28px;height:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center}
#web-workspace .ws-system-bar .ax-header-actions>.ax-icon-button svg{width:15px;height:15px}
#web-workspace .ws-system-bar .ax-header-actions>.ax-icon-button:disabled{opacity:.28;cursor:default}
.ws-system-bar>.ws-system-separator{order:4;flex:none;margin-inline:4px}
#web-workspace .ws-system-apps>.ws-system-tab{display:inline-flex;flex:0 0 32px;min-width:32px;max-width:32px;width:32px;height:44px;margin:0;padding:0;gap:0;flex-direction:row;justify-content:center;border-radius:7px}
#web-workspace .ws-system-apps>.ws-system-tab svg{width:17px;height:17px;flex:none}
#web-workspace .ws-system-apps>.ws-system-tab .ws-system-label{display:none!important}
#web-workspace .ws-system-apps>.ws-system-tab[aria-current=page]{background:var(--ws-accent-soft);box-shadow:inset 0 -2px var(--ws-accent);color:var(--ws-accent)}
#web-workspace .ws-system-apps>.ws-system-tab[data-minimized=true]{box-shadow:inset 0 -2px var(--ws-muted)}
.ws-system-apps::-webkit-scrollbar{display:none}
.ws-system-apps>.ws-system-tab:focus-visible{outline:2px solid var(--ws-accent);outline-offset:-3px}
#web-workspace .ws-system-bar>.ws-call-cluster{order:5;position:relative;display:grid;grid-template-columns:var(--ws-call-side) 24px var(--ws-call-side);width:var(--ws-call-dock-width);min-width:var(--ws-call-dock-width);max-width:var(--ws-call-dock-width);flex:0 0 var(--ws-call-dock-width);height:40px;gap:0;border-radius:22px;overflow:visible;background:var(--ws-hover)}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-system-button{position:relative;display:inline-flex;align-items:center;justify-content:center;height:40px;min-height:40px;min-width:0;padding:0!important;gap:0;border:0;border-radius:20px;flex:none;flex-direction:row}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-call-entry{grid-column:2;grid-row:1;width:24px;min-width:24px;max-width:24px;margin:0;justify-content:center}
#web-workspace .ws-system-bar>.ws-call-cluster[data-state=idle]>.ws-call-entry{position:absolute;grid-column:1 / -1;inset:0;width:100%!important;min-width:100%;max-width:none;justify-content:center}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-call-quick-mute{grid-column:1;grid-row:1;width:var(--ws-call-side);color:var(--ws-muted)}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-call-quick-end{grid-column:3;grid-row:1;width:var(--ws-call-side);color:var(--ws-danger)}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-system-button[hidden],#web-workspace .ws-system-bar>.ws-call-cluster>.ws-call-quick-stage{display:none!important}
#web-workspace .ws-system-bar>.ws-call-cluster .ws-call-entry-copy,#web-workspace .ws-system-bar>.ws-call-cluster .ws-system-label{display:none!important}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-system-button>svg{width:17px;height:17px}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-system-button:disabled{opacity:.3;cursor:default}
#web-workspace .ws-system-bar>.ws-call-cluster>.ws-system-button[aria-pressed=true]{color:var(--ws-danger)}
.ws-call-entry-signal{display:flex;align-items:center;justify-content:center;gap:2px;width:24px;height:26px;color:var(--ws-accent)}
.ws-call-entry-signal>i{width:2px;height:5px;background:currentColor;border-radius:2px;transform-origin:center}
.ws-call-entry-signal>i:nth-child(2),.ws-call-entry-signal>i:nth-child(4){height:10px}.ws-call-entry-signal>i:nth-child(3){height:16px}
.ws-call-entry-signal[data-signal=listening]>i{animation:dock-listening 1.3s ease-in-out infinite alternate}
.ws-call-entry-signal:is([data-signal=thinking],[data-signal=connecting])>i{height:3px;animation:dock-thinking 1.3s ease-in-out infinite}
.ws-call-entry-signal[data-signal=wave]{color:var(--ws-positive)}.ws-call-entry-signal[data-signal=wave]>i{animation:dock-speaking .45s ease-in-out infinite alternate}
.ws-call-entry-signal>i:nth-child(2){animation-delay:-.3s}.ws-call-entry-signal>i:nth-child(3){animation-delay:-.5s}.ws-call-entry-signal>i:nth-child(4){animation-delay:-.1s}.ws-call-entry-signal>i:nth-child(5){animation-delay:-.4s}
.ws-call-entry-signal:is([data-signal=muted],[data-signal=failed]){color:var(--ws-danger)}.ws-call-entry-signal[data-signal=muted]>i{height:2px}
@keyframes dock-listening{from{transform:scaleY(.5);opacity:.5}to{transform:scaleY(1);opacity:.9}}
@keyframes dock-thinking{0%,100%{opacity:.25;transform:translateY(0)}50%{opacity:.9;transform:translateY(-2px)}}
@keyframes dock-speaking{from{transform:scaleY(.3)}to{transform:scaleY(1.15)}}
html:not(.native-global-shell)[data-application-expanded=true] body[data-access=app][data-surface=apps] #web-workspace.has-global-system-bar{grid-template-rows:var(--system-bar-height) minmax(0,1fr)}
html:not(.native-global-shell)[data-application-expanded=true] body[data-access=app][data-surface=apps] #web-workspace>.ws-system-bar{display:flex!important;grid-column:1;grid-row:1}
html:not(.native-global-shell)[data-application-expanded=true] body[data-access=app][data-surface=apps] #web-workspace #applications-surface{grid-row:2;height:auto;max-height:none;min-height:0}
@media(max-width:759px){
 body #web-workspace.has-global-system-bar,body #web-workspace.has-global-system-bar[data-toolbar-style="wide"]{--ws-call-dock-width:88px;--ws-call-side:32px}
 .ws-system-bar{padding-inline:6px}
 #web-workspace .ws-system-bar>.ws-system-button:first-child{width:28px;flex-basis:28px}
 #web-workspace .ws-system-apps>.ws-system-tab{width:28px;min-width:28px;max-width:28px;flex-basis:28px}
 #web-workspace .ws-system-bar .ax-header-actions>.ax-icon-button{width:24px;min-width:24px}
 .ws-system-bar>.ws-system-apps,.ws-system-bar[data-header=true]>.ws-system-apps{margin:0 2px;gap:0}
 .ws-system-bar>.ws-system-separator{display:block;margin-inline:2px}
}
@media(max-width:359px){
 body #web-workspace.has-global-system-bar,body #web-workspace.has-global-system-bar[data-toolbar-style="wide"]{--ws-call-dock-width:80px;--ws-call-side:28px}
 #web-workspace .ws-system-bar>.ws-system-button:first-child{width:24px;flex-basis:24px}
 #web-workspace .ws-system-apps>.ws-system-tab{width:24px;min-width:24px;max-width:24px;flex-basis:24px}
 #web-workspace .ws-system-apps>.ws-system-tab svg{width:16px;height:16px}
}
@media(prefers-reduced-motion:reduce){.ws-call-entry-signal>i{animation:none!important}}

/* Keep the call group at the right edge before any application header exists. */
.ws-system-bar>.ws-system-separator{margin-inline-start:auto}

/* The same portrait layers can carry silent alpha video or legacy animated images. */
.ws-call-pet>.ws-pet-motion-layer{width:100%;height:100%;object-fit:contain;pointer-events:none}
.ws-pet-motion-prompt{position:absolute;z-index:4;inset:auto 12px 12px;display:block;min-height:44px;padding:10px 12px;border:1px solid var(--ws-line);border-radius:12px;background:var(--ws-surface);color:var(--ws-ink);font:inherit;font-size:14px;text-align:center;cursor:pointer;pointer-events:auto}

/* Android native portal rules live in the existing same-origin stylesheet (CSP self). */

    html.native-android-presentation{height:100%}
    html.native-applications.native-android-presentation #web-workspace{display:flex!important;flex-direction:column;height:100%;min-height:0}
    html.native-android-presentation #web-workspace>.applications-surface{flex:1;min-height:0;height:auto;max-height:100%}
    html.native-applications.native-android-presentation #web-workspace>.ws-system-bar{display:flex!important;flex-shrink:0;width:100%}
    html.native-android-presentation .ws-system-bar>.ws-call-cluster:not(.android-native-call-cluster){display:none!important}
    html.native-android-presentation .android-native-call-cluster [data-voice-control="end"]{color:var(--danger,#b13d39)}
    html.native-android-presentation .android-native-call-cluster [data-voice-control="mute"][aria-pressed="true"]{color:var(--accent,#285bc3);background:var(--selected-bg,#edf3ff)}
    html.native-android-presentation .android-native-call-cluster [hidden]{display:none!important}
  

/* Call layout: one window-control group, one mute button, one aligned input dock. */
#web-workspace .ws-global-call { --call-dock-width:320px; box-sizing:border-box; }
#web-workspace .ws-global-call .ws-call-window-controls { display:flex; flex:none; align-items:center; gap:2px; }
#web-workspace .ws-global-call .ws-call-heading .ws-call-window-controls>.ws-system-button {
  display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; min-height:40px; flex:0 0 40px;
  padding:0; border:0; border-radius:12px; color:var(--ws-muted); background:transparent; cursor:pointer;
}
#web-workspace .ws-global-call .ws-call-window-controls>.ws-system-button:hover { background:var(--ws-hover); color:var(--ws-ink); }
#web-workspace .ws-global-call .ws-call-window-controls>.ws-system-button>svg { display:block; width:18px; height:18px; }
#web-workspace .ws-global-call .ws-call-window-controls .ws-system-label { display:none!important; }
#web-workspace .ws-global-call .ws-call-resize::before { content:none; }
#web-workspace .ws-global-call .ws-call-dock {
  position:relative; flex:none; display:flex; flex-direction:column; align-items:stretch; gap:10px;
  width:var(--call-dock-width); max-width:100%; margin:0 auto; pointer-events:auto; box-sizing:border-box;
}
#web-workspace .ws-global-call .ws-call-dock>.ws-call-activity {
  display:flex; align-items:center; justify-content:center; gap:8px; min-height:20px; margin:0;
  padding:0; border:0; background:none; pointer-events:none;
}
#web-workspace .ws-global-call .ws-call-activity-icon {
  width:32px; height:20px; gap:3px; padding:0; border:0; border-radius:0; background:none; box-shadow:none;
}
#web-workspace .ws-global-call .ws-call-activity-icon i { width:2px; height:5px; }
#web-workspace .ws-global-call .ws-call-activity-icon i:nth-child(even) { height:10px; }
#web-workspace .ws-global-call .ws-call-activity-icon i:nth-child(3) { height:15px; }
#web-workspace .ws-global-call .ws-call-activity-icon[data-signal=listening] i { animation:call-waiting 1.4s ease-in-out infinite; }
#web-workspace .ws-global-call .ws-call-activity-icon[data-signal=muted] i { height:2px; animation:none; }
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions {
  position:static; inset:auto; display:flex; flex-wrap:nowrap; align-items:center; justify-content:space-between;
  width:100%; max-width:none; gap:12px; margin:0; padding:8px 18px!important; box-sizing:border-box;
  border:1px solid var(--ws-line); border-radius:28px; background:var(--ws-surface); box-shadow:0 5px 22px #13243b0a;
  opacity:1; pointer-events:auto;
}
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions>.ws-system-button,
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions>.ws-call-end {
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 48px!important; width:48px!important; height:48px;
  min-height:48px; padding:0!important; border:0; border-radius:50%; background:var(--ws-hover); color:var(--ws-ink);
}
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions>.ws-system-button>svg,
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions .ws-call-end-icon {
  width:22px; height:22px; padding:0; margin:0; border-radius:0; box-shadow:none; background:none;
}
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions>.ws-call-end { background:#dc3d50; color:#fff; }
#web-workspace .ws-global-call .ws-call-actions .ws-call-end-icon>svg { width:100%; height:100%; }
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions .ws-system-label { display:none!important; }
#web-workspace .ws-global-call .ws-call-actions>[aria-pressed=true] { color:var(--ws-danger); background:var(--ws-danger-soft); }
#web-workspace .ws-global-call .ws-call-actions>[aria-expanded=true] { color:var(--ws-accent); background:var(--ws-accent-soft); }

/* The existing composer is moved here; its draft/send/upload implementation stays intact. */
#web-workspace .ws-global-call .ws-call-dock>.ws-call-communication {
  position:static; inset:auto; transform:none; width:100%; max-width:100%; max-height:min(240px,34dvh);
  margin:0; padding:0; border:0; border-radius:18px; overflow:auto; background:var(--ws-surface); color:var(--ws-ink);
  box-shadow:0 5px 22px #13243b0a; box-sizing:border-box; pointer-events:auto;
}
#web-workspace .ws-global-call .workspace-communication.communication-embedded {
  width:100%; max-width:100%; margin:0; padding:0; border:0; background:none;
}
#web-workspace .ws-global-call #composer {
  display:block; width:100%; min-width:0; max-width:100%; margin:0; padding:0; border:0; border-radius:18px;
  box-shadow:none; background:transparent; outline:0; box-sizing:border-box;
}
#web-workspace .ws-global-call #composer .composer-box {
  display:flex; flex-direction:column; gap:4px; width:100%; min-width:0; padding:10px; margin:0; box-sizing:border-box;
  border:1px solid var(--ws-line); border-radius:18px; background:var(--ws-surface); box-shadow:none;
}
#web-workspace .ws-global-call #composer .composer-box:focus-within { border-color:var(--ws-accent); box-shadow:0 0 0 2px var(--ws-accent-soft); }
#web-workspace .ws-global-call #composer #message {
  display:block; width:100%; min-width:0; min-height:32px; max-height:88px; margin:0; padding:4px 6px;
  border:0; border-radius:0; outline:none; box-shadow:none; background:transparent; color:var(--ws-ink);
  font:inherit; font-size:14px; line-height:1.5; resize:none; box-sizing:border-box;
}
#web-workspace .ws-global-call #composer .composer-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0; min-height:32px; }
#web-workspace .ws-global-call #composer .voice-entry-actions { display:flex; align-items:center; gap:0; margin:0; }
#web-workspace .ws-global-call #composer .composer-attachment-button { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; min-height:32px; padding:0; border:0; border-radius:9px; color:var(--ws-muted); background:transparent; }
#web-workspace .ws-global-call #composer .composer-attachment-button>span { display:none; }
#web-workspace .ws-global-call #composer .composer-attachment-button>svg { width:19px; height:19px; }
#web-workspace .ws-global-call #composer button[type=submit] { position:static; display:inline-flex; align-items:center; justify-content:center; width:32px; min-width:32px; height:32px; min-height:32px; flex:0 0 32px; margin:0; padding:0; font-size:0; border:0; border-radius:10px; background:var(--ws-accent); color:var(--ws-surface); }
#web-workspace .ws-global-call #composer button[type=submit]>svg { width:18px; height:18px; margin:0; }
#web-workspace .ws-global-call #composer button[type=submit]>span { display:none; }
#web-workspace .ws-global-call #composer .composer-hint { display:none; }
#web-workspace .ws-global-call .communication-feedback:empty { display:none; }
#web-workspace .ws-global-call .communication-feedback { margin:0; padding:10px 12px; max-height:100px; overflow:auto; font-size:12px; }

#web-workspace .ws-global-call[data-mode=stage] .ws-call-dock { margin:10px auto 0; }
#web-workspace .ws-global-call[data-mode=stage] .ws-call-heading { height:44px; }
#web-workspace .ws-global-call[data-mode=assistant][data-placement][data-call-screen=connected] {
  display:flex; flex-direction:column; width:var(--call-dock-width)!important; height:auto; max-height:calc(100dvh - 148px);
  padding:0; overflow:visible; pointer-events:none;
}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-heading {
  display:flex!important; align-items:center; width:100%; min-height:40px; height:40px; margin:0; pointer-events:auto;
}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-identity { width:28px; height:28px; }
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-heading h2 { font-size:13px; }
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-time { font-size:10px; }
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-pet { flex:none; width:144px; height:176px; margin:4px auto; }
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-dock { max-width:100%; margin:0; }
#web-workspace .ws-global-call .ws-call-appearance-picker { width:var(--call-dock-width); max-width:100%; }
#web-workspace .ws-global-call[data-mode=stage] .ws-call-appearance-picker { right:50%; transform:translateX(50%); bottom:100px; }
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-appearance-picker { inset:auto 0 0; transform:none; }
#web-workspace .ws-global-call:not([data-call-screen=connected]) .ws-call-dock>.ws-call-actions { justify-content:center; background:none; border:0; box-shadow:none; }
#web-workspace .ws-global-call:not([data-call-screen=connected]) .ws-call-dock>.ws-call-actions>.ws-system-button { display:none; }

@media(max-width:375px) { #web-workspace .ws-global-call { --call-dock-width:calc(100vw - 32px); } }
@media(max-height:540px) {
  #web-workspace .ws-global-call[data-mode=stage] { padding:10px 16px; }
  #web-workspace .ws-global-call[data-mode=stage] .ws-call-avatar-stage { min-height:60px; }
  #web-workspace .ws-global-call[data-mode=stage] .ws-call-dock { gap:6px; margin-top:4px; }
  #web-workspace .ws-global-call[data-mode=stage] .ws-call-dock>.ws-call-activity { display:none; }
  #web-workspace .ws-global-call .ws-call-dock>.ws-call-actions { padding-block:5px!important; }
  #web-workspace .ws-global-call .ws-call-dock>.ws-call-actions>.ws-system-button,
  #web-workspace .ws-global-call .ws-call-dock>.ws-call-actions>.ws-call-end { height:44px; min-height:44px; width:44px!important; flex:0 0 44px!important; }
}
@media(prefers-reduced-motion:reduce) { #web-workspace .ws-global-call .ws-call-activity-icon i { animation:none!important; } }

/* Fullscreen shares the native character frames with the floating call view. */
#web-workspace .ws-global-call .ws-call-avatar-stage { position:relative; isolation:isolate; }
#web-workspace .ws-global-call .ws-call-avatar-stage>.ws-pet-motion-layer {
  position:absolute; left:50%; top:50%; width:min(70vw,580px); height:min(65dvh,620px);
  max-width:100%; max-height:100%; margin:0; object-fit:contain; transform:translate(-50%,-50%);
  opacity:0; pointer-events:none; transition:opacity .14s linear;
}
#web-workspace .ws-global-call .ws-call-avatar-stage>.ws-pet-motion-layer[hidden] { display:none!important; }
#web-workspace .ws-global-call .ws-call-avatar-stage>.ws-pet-motion-layer[data-visible=true] { opacity:1; }
#web-workspace .ws-global-call .ws-call-avatar-stage[data-motion-ready=true]>.companion-portrait { visibility:hidden; }
/* Alpha video hands off on its first presented frame. Crossfading two partially
   transparent silhouettes changes their opacity and produces a visible flash. */
#web-workspace .ws-global-call :is(.ws-call-pet,.ws-call-avatar-stage)[data-motion-format=video]>.ws-pet-motion-layer { transition:none; }
#web-workspace .ws-global-call .ws-pet-motion-layer[data-motion-plane=front] { z-index:2; }
#web-workspace .ws-global-call .ws-pet-motion-layer[data-motion-plane=back] { z-index:1; }
@media(prefers-reduced-motion:reduce) {
  #web-workspace .ws-global-call .ws-call-avatar-stage>.ws-pet-motion-layer { transition:none; }
}

/* The HD full-body canvas already contains its own head/foot safety margins. */
#web-workspace .ws-global-call[data-mode=stage] .ws-call-avatar-stage:has(>.ws-pet-motion-layer[src*="/coappx-nuankou/"])>.ws-pet-motion-layer {
  width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;
}
#web-workspace .ws-global-call[data-mode=stage] .ws-call-avatar-stage:has(img[src*="/coappx-nuankou/"])>.companion-portrait {
  width:100%!important;height:100%!important;max-width:100%;max-height:100%;
}
#web-workspace .ws-global-call[data-mode=assistant] .ws-call-pet:has(>.ws-pet-motion-layer[src*="/coappx-nuankou/"]) {
  width:190px;height:min(280px,44dvh);
}

/* The call moves the real composer into its dialog. Keep one input row on iPhone. */
@media(max-width:759px){
  html #web-workspace #ws-global-call #composer .composer-box{
    display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px;grid-auto-rows:auto;
    align-items:center!important;gap:5px;padding:5px;border-radius:18px;max-width:none;
  }
  html #web-workspace #ws-global-call #composer .composer-box>:is(.composer-capture-session,.composer-quote,.cu-composer-skill,.composer-attachments,.composer-attachment-notice){grid-column:1/-1;order:-1!important}
  html #web-workspace #ws-global-call #composer :is(.composer-toolbar,.voice-entry-actions){display:contents}
  html #web-workspace #ws-global-call #composer :is(.composer-input-mode,.composer-voice-call,.execution-options,.cu-composer-menu){display:none!important}
  html #web-workspace #ws-global-call #composer .composer-add-menu{grid-column:1;order:0!important}
  html #web-workspace #ws-global-call #composer .composer-attachment-button{width:44px;height:44px;min-height:44px}
  html #web-workspace #ws-global-call #composer #message{grid-column:2;order:1!important;width:100%!important;min-width:0;min-height:44px;max-height:88px;padding:10px 3px;font-size:16px;line-height:1.5}
  html #web-workspace #ws-global-call #composer #send-button{grid-column:3;order:2!important;width:44px!important;height:44px!important;min-height:44px!important;min-width:44px!important}
}

html:not(.native-global-shell)[data-application-immersive=true] body[data-access=app][data-surface=apps] #web-workspace.has-global-system-bar{grid-template-rows:minmax(0,1fr);padding:0}
html:not(.native-global-shell)[data-application-immersive=true] body[data-access=app][data-surface=apps] #web-workspace>.ws-system-bar{display:none!important}
html:not(.native-global-shell)[data-application-immersive=true] body[data-access=app][data-surface=apps] #web-workspace>#applications-surface{grid-row:1}

/* Workbench can still explicitly open text communication, separately from call controls. */
#web-workspace .ws-global-call[data-text-only=true] > :not(.ws-call-heading,.ws-call-dock),
#web-workspace .ws-global-call[data-text-only=true] .ws-call-dock > :not(.ws-call-communication),
#web-workspace .ws-global-call[data-text-only=true] :is(.ws-call-resize,.composer-input-mode,#voice-push) {
  display:none!important;
}
#web-workspace .ws-global-call .ws-call-dock>.ws-call-actions>.ws-call-speaker[aria-pressed=true] {
  color:var(--ws-danger);background:var(--ws-danger-soft);
}
