/* The app shell: the wordmark, the Language menu, the front-end and backend status, the sidebar (Chat, Workspace,
   Settings, Help), the voice dock with the crystal orb, and the pages built on them. Loaded after app.css and
   wave.css, whose tokens it uses. */

@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Google Sans Medium'), local('GoogleSans-Medium'), url(fonts/google-sans-500.woff2) format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Barlow Light'), local('Barlow-Light'), url(fonts/barlow-300.woff2) format('woff2');
}

:root {
  --sidebar-w: 184px;
  --header-h: 64px;
  --ink: #1F252D;
  --ink-soft: #2C3440;
  --shadow-card: 0 1px 2px rgb(31 37 45 / 4%), 0 6px 24px rgb(31 37 45 / 4%);
  --orb-cool: #6E9CF2;
  --orb-warm-color: #8B7CF6;
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- shell */

.app { max-width: none; height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
/* Stacking: the orb (30) and the front-end pill (29) float over the page; the header and the sidebar (35) stay above
   them, so the orb slides under the bar when the page scrolls; toasts (45) and sheets (50) go over everything. */
.app-header { position: relative; z-index: 35; height: var(--header-h); padding: 0 20px 0 24px; gap: 16px; background: var(--surface); }
.sidebar { position: relative; z-index: 35; }
.toast { z-index: 45; }
.sheet-backdrop { z-index: 50; }
.app-header::after { content: none; }
.app-body { flex: 1 1 0; min-height: 0; display: flex; }
.app-main { flex: 1 1 0; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; position: relative; }
.app[data-view="talking"] .app-main { overflow: hidden; }
.app-main > .view { min-height: 100%; }

.wordmark { display: inline-flex; align-items: baseline; gap: 0; padding: 4px 6px; margin-left: -6px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font-size: 23px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
button.wordmark:hover { background: var(--raised); }
.wordmark-amphion { font-family: 'Google Sans', 'Product Sans', var(--sans); font-weight: 500; }
.wordmark-live { font-family: 'Barlow', var(--sans); font-weight: 300; letter-spacing: .01em; }
.wordmark-hero { margin: 0; padding: 0; font-size: clamp(40px, 6vw, 60px); }

.app-header-end { gap: 10px; min-width: 0; }
.app-account { display: flex; align-items: center; border: 1px solid transparent; border-radius: 999px; background: none; color: inherit; }
.app-account:hover { background: var(--raised); }
.app[data-view="login"] :is(.app-account, .status-chips) { display: none; }
.voiceprint-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 18px; background: var(--surface); color: var(--text-2); font-size: 13px; }

.language-menu { position: relative; }
.language-button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text-2); font-size: 14px; }
.language-button:hover, .language-button[aria-expanded="true"] { border-color: var(--line-strong); color: var(--text); }
.language-button svg { width: 16px; height: 16px; }
.language-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 160px; padding: 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgb(31 37 45 / 14%); }
.language-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 40px;
  padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 14px; text-align: left; }
.language-list button:hover, .language-list button:focus-visible { background: var(--raised); color: var(--text); outline: none; }
.language-list button[aria-checked="true"] { color: var(--accent-text); font-weight: 600; }
.language-list button[aria-checked="true"]::after { content: '✓'; }

.sidebar { width: var(--sidebar-w); flex: none; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px;
  border-right: 1px solid var(--line); background: var(--surface); }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 0;
  border-radius: 10px; background: none; color: var(--text-2); font-size: 15px; text-align: left; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: var(--raised); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-call { margin-left: auto; padding: 1px 8px; border-radius: 10px; background: var(--wave-online); color: var(--online);
  font: 12px var(--mono); }
.nav-call::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%;
  background: var(--online); vertical-align: 1px; animation: nav-live 1.6s ease-in-out infinite; }
@keyframes nav-live { 50% { opacity: .3; } }

/* ---------------------------------------------------------------- header status */

/* The audio front end and the agent backend, each a chip that opens its part of Settings. A part that is missing or not
   working shows a cross where the dot would be: red when it should be there and is not, grey when none is set up. */
.status-chips { display: flex; align-items: center; gap: 6px; min-width: 0; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; min-width: 0; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text-2); font-size: 13px; }
.status-chip:hover { border-color: var(--line-strong); color: var(--text); }
.status-k { color: var(--faint); }
.status-v { max-width: 18ch; overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.status-mark { display: grid; place-items: center; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status-mark svg { display: none; }
.status-mark[data-state="ok"] { background: var(--online); }
.status-mark[data-state="busy"] { background: #D97706; }
.status-mark[data-state="idle"] { background: var(--line-strong); }
.status-mark:is([data-state="down"], [data-state="none"]) { width: 13px; height: 13px; border-radius: 0; background: none; color: var(--danger); }
.status-mark[data-state="none"] { color: var(--faint); }
.status-mark:is([data-state="down"], [data-state="none"]) svg { display: block; width: 13px; height: 13px; stroke-width: 3; }
.dot[data-state="busy"] { background: #D97706; }
.dot[data-state="idle"] { background: var(--line-strong); }
.app-account { padding: 2px; }

/* ---------------------------------------------------------------- the orb */

/* One fixed element over the page (app.js placeOrb): in the chat page's slot, big before a call and smaller in it, or
   in a corner: the preview's in preview mode, the window's on every other page. It glides between places. orb.js draws
   one of four looks (bars, disc, sky, dusk) and its state: full colour on the start screen and in a call, grey while
   no call is on (in the window's corner, or anywhere when the audio front end is down), grey with a red mark when
   muted. In a corner a ring says the rest: it spins while connecting, breathes blue while listening, turns green
   while it hears you and violet while the assistant speaks. */
.orb { position: fixed; z-index: 30; left: var(--orb-x, 50%); top: var(--orb-y, 50%); width: var(--orb-size, 240px);
  height: var(--orb-size, 240px); pointer-events: none; --orb-level: 0; --orb-warm: 0; }
.orb.orb-moving { transition: left .5s cubic-bezier(.4, 0, .2, 1), top .5s cubic-bezier(.4, 0, .2, 1),
  width .5s cubic-bezier(.4, 0, .2, 1), height .5s cubic-bezier(.4, 0, .2, 1), opacity .3s; }
.orb[data-place="hidden"] { opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.orb-canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border-radius: 50%;
  transform: scale(calc(1 + var(--orb-level) * .05)); transition: transform .12s ease-out, filter .3s; }
.orb-glow { position: absolute; inset: -9%; z-index: 0; border-radius: 50%; filter: blur(18px);
  background: radial-gradient(circle, var(--orb-cool) 0 40%, transparent 70%);
  opacity: calc(.22 + var(--orb-level) * .5); transform: scale(calc(.9 + var(--orb-level) * .25));
  transition: transform .15s ease-out, opacity .3s; }
.orb-glow::after { content: ''; position: absolute; inset: 0; border-radius: 50%; opacity: var(--orb-warm);
  background: radial-gradient(circle, var(--orb-warm-color) 0 40%, transparent 70%); }
.orb:is([data-mode="idle"], [data-mode="muted"]) .orb-glow { opacity: .06; }
.orb[data-place="dock"] .orb-canvas { box-shadow: 0 10px 30px rgb(30 41 59 / 28%), 0 0 0 3px rgb(255 255 255 / 85%); }
.orb[data-place="dock"] .orb-glow { inset: -8%; filter: blur(12px); }
.orb::before { content: ''; position: absolute; inset: -7px; z-index: 2; border: 2px solid transparent; border-radius: 50%;
  pointer-events: none; transition: border-color .3s; }
.orb[data-place="dock"][data-state="listening"]::before { border-color: rgb(37 99 235 / 45%); animation: orb-breathe 2.4s ease-in-out infinite; }
.orb[data-place="dock"][data-state="hearing"]::before { border-color: var(--online); }
.orb[data-place="dock"][data-state="speaking"]::before { border-color: rgb(139 124 246 / 75%); }
.orb[data-place="dock"][data-state="connecting"]::before { border-color: rgb(37 99 235 / 15%); border-top-color: var(--accent);
  animation: spin .9s linear infinite; }
.orb[data-state="muted"]::after { content: ''; position: absolute; right: 5%; bottom: 5%; z-index: 3; width: max(12px, 13%);
  height: max(12px, 13%); border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
/* The flat looks (bars, disc): one element over the canvas, sized and coloured each frame by orb.js. */
.orb-face { position: absolute; inset: 0; z-index: 1; display: none; align-items: center; justify-content: center; gap: 7%;
  border-radius: 50%; box-shadow: var(--orb-face-glow, 0 0 0 transparent); transition: background-color .3s; will-change: transform; }
.orb-face > span { display: none; width: 9%; height: 10%; border-radius: 999px; background: #fff; }
.orb:is([data-look="bars"], [data-look="disc"]) .orb-face { display: flex; }
.orb[data-look="bars"] .orb-face > span,
.orb[data-look="disc"]:is([data-mode="ready"], [data-mode="idle"]) .orb-face > span { display: block; }
.orb:is([data-look="bars"], [data-look="disc"]) :is(.orb-canvas, .orb-glow) { visibility: hidden; }
.orb:is([data-look="bars"], [data-look="disc"]) .orb-glyph { display: none; }
.orb[data-place="dock"] .orb-face { box-shadow: var(--orb-face-glow, 0 0 0 transparent), 0 8px 22px rgb(30 41 59 / 24%),
  0 0 0 3px rgb(255 255 255 / 85%); }
.orb:is([data-look="bars"], [data-look="disc"])::before { inset: 1%; }
.orb:is([data-look="sky"], [data-look="dusk"]) .orb-canvas { transform: scale(calc(.9 + var(--orb-level) * .1)); }
/* Settings › Audio front end › Orb: the four looks, each with a small swatch of itself. */
.look-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.look-choices button { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); color: var(--text); font-size: 14px; text-align: left; }
.look-choices button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.look-swatch { display: flex; align-items: center; justify-content: center; gap: 2px; flex: none; width: 32px; height: 32px; border-radius: 50%; }
[data-look="bars"] > .look-swatch { background: #161A21; }
[data-look="bars"] > .look-swatch > span { width: 3px; border-radius: 2px; background: #fff; }
[data-look="bars"] > .look-swatch > span:nth-child(odd) { height: 8px; }
[data-look="bars"] > .look-swatch > span:nth-child(even) { height: 13px; }
[data-look="disc"] > .look-swatch { background: #2F6BEA; box-shadow: 0 0 10px rgb(47 107 234 / 40%); }
[data-look="sky"] > .look-swatch { background: radial-gradient(circle at 40% 35%, #fff 0 14%, transparent 30%),
  radial-gradient(circle at 50% 18%, #BFE0FF 0, #6FA8F5 45%, #2F6BEA 80%); }
[data-look="dusk"] > .look-swatch { background: radial-gradient(circle at 60% 45%, rgb(220 228 255 / 85%) 0 12%, transparent 28%),
  radial-gradient(circle at 50% 18%, #3B4F8F 0, #1A2A66 50%, #0B1440 100%); }
.orb-glyph { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: var(--ink); opacity: 0;
  transition: opacity .2s; pointer-events: none; }
.orb-glyph svg { width: 36%; height: 36%; stroke-width: 2; }
.orb[data-place="dock"][data-state="idle"] .orb-glyph { opacity: .7; }
.orb-button { position: absolute; inset: 0; z-index: 4; border: 0; border-radius: 50%; background: transparent;
  pointer-events: auto; cursor: pointer; }
.orb-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.orb-face, .orb-canvas { transition: background-color .3s, filter .3s, scale .2s ease-out; }
@media (hover: hover) {
  .orb:has(.orb-button:not(:disabled, [hidden]):hover) :is(.orb-face, .orb-canvas) { scale: 1.06; }
}
.orb-button:disabled { cursor: default; }
@media (hover: hover) {
  .orb:has(.orb-button:not(:disabled):hover) .orb-glow { opacity: .55; }
  .orb[data-place="dock"]:has(.orb-button:not(:disabled):hover) .orb-glyph { opacity: .95; }
}
@keyframes orb-breathe { 50% { transform: scale(1.1); opacity: .35; } }
/* Clouds without WebGL: a sky gradient on the canvas element, swelling with the same level; grey when it would be. */
.orb-fallback .orb-canvas { background: radial-gradient(circle at 50% 18%, #BFE0FF 0, #6FA8F5 45%, #2F6BEA 80%, #2152C8 100%); }
.orb-fallback[data-look="dusk"] .orb-canvas { background: radial-gradient(circle at 50% 18%, #3B4F8F 0, #1A2A66 50%, #0B1440 100%); }
.orb-fallback:not([data-place="dock"]) .orb-canvas { box-shadow: inset 0 0 0 2px rgb(255 255 255 / 55%), inset -12px -18px 40px rgb(20 30 60 / 25%); }
.orb-fallback:is([data-mode="idle"], [data-mode="muted"]) .orb-canvas { filter: grayscale(.8) brightness(1.08); }
@media (prefers-reduced-motion: reduce) {
  .orb.orb-moving { transition-duration: .01s; }
  .orb::before { animation: none !important; }
}

/* Suggested action while the audio front end cannot be reached: a pill in the bottom-right corner, above the orb
   when the orb is there. */
.suggestions { position: fixed; z-index: 29; right: 24px; bottom: 24px; display: flex; flex-wrap: wrap-reverse; justify-content: flex-end;
  gap: 8px; max-width: min(560px, calc(100vw - 48px)); animation: suggest-in .25s ease-out; }
.suggestions.above-orb { bottom: 140px; }
.suggestion { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 18px; background: rgb(255 255 255 / 94%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--text); font-size: 13.5px; box-shadow: 0 6px 18px rgb(30 41 59 / 12%); }
.suggestion svg { width: 15px; height: 15px; }
.suggestion-status { border-color: #E3B6B2; background: #FFF5F5; color: var(--danger); font-weight: 600; }
button.suggestion-status:hover { border-color: var(--danger); background: #FDECEC; }
@keyframes suggest-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------------------------------------------------------------- pages */

.view-page { max-width: 1080px; margin: 0 auto; padding: 32px 40px 120px; gap: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.page-lead { margin: 6px 0 0; max-width: 62ch; color: var(--muted); font-size: 15px; line-height: 1.6; }
.page-cta { flex: none; padding: 0 18px; }
.page-cta svg { width: 18px; height: 18px; }
.empty-state { padding: 32px; border: 1px dashed var(--line-strong); border-radius: 14px; text-align: center; }

/* Chat, before a call */
.view-ready { max-width: 880px; margin: 0 auto; padding: 28px 32px 120px; gap: 28px; align-items: stretch; }
.chat-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.chat-hero .ready-eyebrow { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.chat-hero h1 { margin: 0; font-size: clamp(26px, 3.2vw, 34px); font-weight: 650; letter-spacing: -.015em; text-wrap: balance; }
.chat-hero { padding-top: 2vh; }
.orb-slot { flex: none; }
.orb-slot-hero { width: min(280px, 64vw); aspect-ratio: 1; margin: 18px 0 14px; }
.start-button { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px 0 20px; border: 0;
  border-radius: 24px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 600;
  box-shadow: 0 6px 18px rgb(31 37 45 / 18%); }
.start-button svg { width: 20px; height: 20px; }
@media (hover: hover) { .start-button:not(:disabled):hover { background: var(--ink-soft); } }
.start-button:not(:disabled):active { transform: scale(.98); }
.chat-hero .hint { justify-content: center; margin: 4px 0 0; color: var(--faint); font-size: 13px; }
.chat-hero .notice { max-width: 560px; text-align: start; }

.chat-setup { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 640px; margin: 0 auto; }
.summary-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.summary-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 14px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--muted); font-size: 13px; }
.summary-chip strong { color: var(--text); font-weight: 600; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-chip svg { width: 14px; height: 14px; color: var(--faint); }
.summary-chip:hover { border-color: var(--line-strong); }

.delegation-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); }
.delegation-card[data-on="true"] { border-color: #A9C4F5; background: linear-gradient(180deg, #F4F8FF, var(--surface) 60%); }
.delegation-head { display: flex; align-items: center; gap: 14px; }
.delegation-head h2 { margin: 0; font-size: 16px; font-weight: 650; white-space: normal; }
.delegation-head .item-icon { color: var(--accent); }
.delegation-head .item-sub { white-space: normal; }
.delegation-head .text-action { flex: none; min-height: 32px; padding: 0 4px; font-weight: 600; white-space: nowrap; }
.delegation-more > summary { width: fit-content; color: var(--muted); font-size: 13px; cursor: pointer; }
.delegation-more > summary:hover { color: var(--text); }
.delegation-more[open] > summary { margin-bottom: 6px; }
.delegation-more > .note { margin: 0 0 6px; }
.delegation-card .agent-card { width: 100%; }
.switch { flex: none; display: inline-flex; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 28px; margin: 0; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--raised); cursor: pointer; transition: background-color .15s; }
.switch input::before { content: ''; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); transition: transform .15s; }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::before { transform: translateX(18px); }
.switch input:disabled { opacity: .45; cursor: not-allowed; }

/* Chat, in a call */
.view-talking { max-width: none; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; gap: 0; display: flex; flex-direction: column; }
.talk-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; height: 52px;
  padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.talk-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.talk-heading .timer { font-size: 13px; color: var(--faint); }
.talk-actions { display: flex; align-items: center; gap: 8px; }
.preview-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; font-size: 13px; }
.preview-toggle svg { width: 16px; height: 16px; }
.preview-toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

.conversation-layout { position: relative; flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.conversation-pane { grid-area: 1 / 1; width: 100%; max-width: 780px; min-width: 0; min-height: 0; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px; padding: 8px 24px 0; }
.composer-row { flex: none; display: flex; align-items: flex-end; justify-content: flex-end; gap: 14px; }
.composer-row > .composer { flex: 1 1 auto; min-width: 0; }
.orb-slot-call { flex: none; width: 64px; height: 64px; margin-bottom: 4px; }
.controls { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 0 16px; border: 0; }
.round-56 { width: 52px; height: 52px; display: grid; place-items: center; }
.round-56 svg { width: 22px; height: 22px; }
#mute .ico-muted { display: none; }
#mute[aria-pressed="true"] .ico-mic { display: none; }
#mute[aria-pressed="true"] .ico-muted { display: inline-flex; }
#mute[aria-pressed="true"] { border-color: #E3B6B2; background: #FDECEC; color: var(--danger); }
.end-button { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 22px 0 18px; border: 0; border-radius: 26px;
  background: var(--danger); color: #fff; font-size: 15px; font-weight: 600; }
.end-button svg { width: 20px; height: 20px; }
.resume-button { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 22px 0 18px; border: 0; border-radius: 26px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; }
.resume-button svg { width: 20px; height: 20px; }
.pill[data-state="paused"] { background: #FFF5E1; color: #8F5A00; }
.pill[data-state="paused"] .dot { background: #D97706; }
.call-target { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.stream-wrap { position: relative; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.captions { flex: 1 1 0; min-height: 0; overflow-y: auto; gap: 18px; padding: 8px 4px 16px 0; scrollbar-gutter: stable;
  mask-image: linear-gradient(transparent, #000 14px); }
.latest-caption { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); box-shadow: var(--shadow-card); }
.cap:is(.bot, .user) { display: flex; flex-direction: column; gap: 4px; }
.cap .cap-head { padding: 0; font-size: 12px; }
.cap.bot .cap-text { color: var(--text); }
.cap.user { align-items: flex-end; padding: 0; border: 0; }
.cap.user .cap-head { justify-content: flex-end; }
.cap.user .cap-text, .cap.user:not(.unrecognized) .cap-text { max-width: 85%; padding: 8px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--raised); color: var(--text); }
.cap.user.attached .cap-text { white-space: pre-wrap; font: 13px/1.6 var(--mono); max-height: 12em; overflow: auto; }
.cap.system { align-items: center; }
.cap.system .cap-text { color: var(--faint); font-size: 13px; text-align: center; }
.cap.system.divider .cap-text { padding: 6px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.cap.tool { align-self: flex-start; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); font-size: 12.5px; color: var(--muted); }
.cap.tool > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cap.tool > summary::-webkit-details-marker { display: none; }
.cap.tool code { color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.cap.tool .tool-state { color: var(--faint); }
.cap.tool.tool-done .tool-state { color: var(--online); }
.cap.tool.tool-failed .tool-state, .cap.tool.tool-refused .tool-state { color: var(--danger); }
.cap.tool .tool-detail { margin: 8px 0 2px; max-height: 14em; overflow: auto; font: 11.5px/1.55 var(--mono); white-space: pre-wrap;
  overflow-wrap: anywhere; color: var(--text-2); }
/* The backend's work, in the same stream: a card that grows with its steps, files and output. */
.cap-task.task { flex: none; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.cap-task.task[data-status="done"] { border-left-color: var(--online); }
.cap-task.task[data-status="failed"], .cap-task.task[data-status="stopped"] { border-left-color: var(--danger); }
.task-who { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--accent-text); font-weight: 600; }
.task-who svg { width: 14px; height: 14px; }
.cap-task.task[open] > summary { margin-bottom: 8px; }

.prompt-details { flex: none; }
.composer { flex: none; display: flex; flex-direction: column; gap: 6px; }
.composer-label { color: var(--faint); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; }
.composer-box { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-strong);
  border-radius: 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer-input { flex: 1; min-width: 0; min-height: 44px; max-height: 128px; padding: 10px 0; border: 0; resize: none;
  background: transparent; color: var(--text); font: 14px/1.55 var(--sans); }
.composer-input:focus-visible { outline: none; }
.composer-input::placeholder { color: var(--faint); }
.composer-input:disabled::placeholder { color: var(--line-strong); }
.composer-send { flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; }
.composer-send:disabled { background: var(--raised); color: var(--faint); opacity: 1; }
.composer:has(.composer-input:disabled) .composer-box { background: var(--bg); border-style: dashed; }

/* Tabs over a workspace's page: Preview, Configuration (and Store), Source. */
.pane-tabs { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 4px; }
.pane-tabs [role="tab"] { height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  color: var(--muted); font-size: 13px; }
.pane-tabs [role="tab"]:hover { color: var(--text); }
.pane-tabs [role="tab"][aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.pane-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.pane-tools .icon-btn { width: 32px; height: 32px; display: grid; place-items: center; }
:is(.call-preview, .ws-detail) > :is(.pane-preview, .pane-config, .pane-store, .pane-source) { flex: 1 1 0; min-height: 0; }
:is(.call-preview, .ws-detail) > :is(.pane-config, .pane-store) { overflow: auto; }
:is(.call-preview, .ws-detail):not([data-tab="preview"]) > :is(.pane-preview, .pane-empty),
:is(.call-preview, .ws-detail):not([data-tab="config"]) > .pane-config,
:is(.call-preview, .ws-detail):not([data-tab="store"]) > .pane-store,
:is(.call-preview, .ws-detail):not([data-tab="source"]) > .pane-source { display: none !important; }

/* Preview mode: the page fills the call area edge to edge, the conversation is a narrow column on the right (the text box
   and the orb at its foot), and the page's tabs sit in the top bar. */
.call-preview { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0; }
.call-preview .preview-frame { border: 0; border-radius: 0; box-shadow: none; }
.conversation-layout[data-preview="on"] { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
.conversation-layout[data-preview="on"] > .conversation-pane { grid-area: 1 / 2; max-width: none; margin: 0; padding: 8px 16px 0;
  border-left: 1px solid var(--line); }
.call-preview .preview-caption { right: 12px; }
.talk-tabs { margin: 0 auto; padding: 0; border: 0; }
.talk-tabs [role="tab"] { height: 32px; }

/* ---------------------------------------------------------------- workspace */

.view-workspace { max-width: 1320px; }
.workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 28px; }
.workspace-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.ws-section { display: flex; flex-direction: column; gap: 12px; }
.ws-section-title { margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.view-workspace .scene-grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px;
  overflow: visible; margin: 0; padding: 0; }
.scene-art:has(.scene-icon)::before { content: none; }
.scene-icon { display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent);
  background: linear-gradient(135deg, #EEF4FF, #F7F9FC); }
.scene-icon svg { width: 38px; height: 38px; stroke-width: 1.4; }
.scene-icon-service { color: #7C5CFA; background: linear-gradient(135deg, #F1EDFF, #F8F7FF); }
.scene-add { border-style: dashed; background: transparent; box-shadow: none; }
.scene-add .scene-art { border-bottom-style: dashed; background: transparent; }
.scene-add .scene-icon { background: transparent; color: var(--muted); }
.scene-add:hover { border-color: var(--accent); }
.scene-add:hover .scene-icon { color: var(--accent); }
.ws-detail { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  height: calc(100dvh - var(--header-h) - 124px); min-height: 480px; padding: 18px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-card); }
.ws-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ws-detail-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.ws-detail-name h2 { margin: 0; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.ws-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ws-detail-actions .pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; font-size: 13px; }
.ws-detail-actions .pill-btn svg { width: 14px; height: 14px; }
.ws-detail-meta { margin: -4px 0 0; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.ws-about { padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.ws-about-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; }
.ws-about p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.ws-detail .ready-preview { height: auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.ws-detail .service-details { padding-right: 4px; }
/* The whole panel scrolls: the store and the configuration take the room they need under the description and tabs. */
.ws-detail { overflow-y: auto; }
.ws-detail > :is(.pane-config, .pane-store) { flex: none; min-height: auto; overflow: visible; }
.pane-empty { margin: 0; padding: 28px 20px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; }

/* Configuration: where the prompt came from, the session, the verbatim prompt, the tools. */
.config-view { display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.config-source { font-size: 13px; }
.config-tools { display: flex; flex-direction: column; gap: 10px; }
.config-tools h3, .config-howto h3 { margin: 0; font-size: 14px; font-weight: 650; }
.config-howto .prompt-code { white-space: pre; overflow: auto; }
/* Each tool pretty-printed as the system prompt gives it: long descriptions wrap, the nesting keeps its indent. */
.tool-def { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.tool-def-head { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tool-def-name { color: var(--text); font: 600 13px var(--mono); }
.tool-def-origin { margin-left: auto; padding: 2px 8px; border-radius: 10px; background: var(--raised); color: var(--muted); font-size: 11px; }
.tool-def-json { max-height: 380px; overflow: auto; border-radius: 0; font-size: 12px; line-height: 1.55; white-space: pre-wrap;
  overflow-wrap: anywhere; }

/* Adding a folder: a dialog with the folder, its texts and its tools, each tool and parameter as fields. */
.ws-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgb(15 23 42 / 25%); }
.ws-dialog::backdrop { background: rgb(15 23 42 / 40%); }
.ws-form { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.ws-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line); }
.ws-form-head h2 { margin: 0; font-size: 18px; }
.ws-form-body { display: flex; flex-direction: column; gap: 14px; overflow: auto; padding: 16px 20px; }
.ws-form-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ws-form .input { height: 44px; border-radius: 10px; font-size: 15px; }
.ws-form .input.mono { font-size: 14px; letter-spacing: 0; }
.ws-form .textarea { height: auto; min-height: 64px; padding: 10px 12px; font: 14px/1.55 var(--sans); }
.btn-44 { height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.btn-40 { height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-40 svg { width: 16px; height: 16px; }
.tool-editor { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 12px; }
.tool-editor legend { padding: 0 6px; font-weight: 650; }
.tool-editor > .btn { align-self: flex-start; }
.tool-list { display: flex; flex-direction: column; gap: 10px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.tool-card-head { display: flex; align-items: flex-end; gap: 8px; }
.tool-card-head .field { flex: 1; }
.param-list { display: flex; flex-direction: column; gap: 8px; }
.param-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: end; gap: 8px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.param-row .input { height: 40px; }
.param-row :is(.param-choices, .param-about) { grid-column: 1 / -1; }
.param-required { min-height: 40px; white-space: nowrap; }
.tool-card .text-action { align-self: flex-start; min-height: 32px; padding: 0; }
.tool-json summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.tool-json pre { max-height: 200px; margin: 6px 0 0; overflow: auto; white-space: pre; }

/* ---------------------------------------------------------------- settings */

.settings-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.settings-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font-size: 15px; }
.settings-tabs button svg { width: 18px; height: 18px; }
.settings-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.settings-panel { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.set-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--wave-shadow); }
.set-card-head { display: flex; flex-direction: column; gap: 2px; }
.set-card-head.row-10 { flex-direction: row; }
.set-title { margin: 0; font-size: 16px; font-weight: 650; }
.set-card .agent-switch { padding: 4px 0; border-radius: 0; }
.set-card * + .agent-switch { padding-top: 12px; border-top: 1px solid var(--line); }
.set-card .text-action { align-self: flex-start; padding-inline: 0; }
.set-card .agent-switch .item-text { gap: 2px; }
.set-card .agent-switch .item-title { white-space: normal; }
.set-card .agent-switch .item-sub { white-space: normal; }
.set-card .agent-switch input { flex: 0 0 46px; width: 46px; height: 28px; border-color: var(--line-strong); background: var(--raised); }
.set-card .agent-switch input::before { width: 20px; height: 20px; margin: 3px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); }
.set-card .agent-switch input:checked { background: var(--accent); border-color: var(--accent); }
.set-card .agent-switch input:checked::before { transform: translateX(18px); }
.set-card select.input { height: 44px; border-radius: 10px; appearance: auto; -webkit-appearance: auto; }
.set-card.advanced { padding: 4px 20px; }
.set-card.advanced[open] { padding-bottom: 20px; }
.set-card .voice-chips { justify-content: flex-start; }
.voice-picker { align-items: stretch; }
.model-options { display: flex; flex-direction: column; gap: 8px; }
.model-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.model-option[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.model-option[aria-disabled="true"] .item-title { color: var(--muted); }
.model-option .item-sub { white-space: normal; }
.model-option::before { content: ''; flex: none; width: 18px; height: 18px; border: 2px solid var(--line-strong); border-radius: 50%; }
.model-option[aria-checked="true"]::before { border: 5px solid var(--accent); }
.settings-links { box-shadow: none; }
.settings-links > :is(.memory-entry, .admin-entry) { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.settings-links > :last-child { border-bottom: 0; }
.set-card:has(.settings-links) { padding: 0; overflow: hidden; }
.set-card .list { box-shadow: none; }
#setBackend .agent-item[aria-checked="true"] { background: var(--accent-soft); }
.install-guides { display: flex; flex-direction: column; gap: 8px; }
.install-guide, .install-connect { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.install-guide > summary, .install-connect > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; cursor: pointer; list-style: none; }
.install-guide > summary::-webkit-details-marker, .install-connect > summary::-webkit-details-marker { display: none; }
.install-guide > summary::after, .install-connect > summary::after { content: '+'; color: var(--faint); font-size: 18px; }
.install-guide[open] > summary::after, .install-connect[open] > summary::after { content: '−'; }
.install-guide .badge { margin-left: auto; }
.install-guide[open], .install-connect[open] { padding-bottom: 14px; }
.install-guide > :not(summary), .install-connect > :not(summary) { margin-top: 8px; }
.install-guide .codebox code, .install-connect .codebox code { flex: 1; min-width: 0; font-size: 13px; }
#controlBackend .control-section, #controlFrontend .control-section { padding: 0; border: 0; box-shadow: none; background: none; }
.host-list details.host { display: block; }
.host-list details.host > * + * { margin-top: 12px; }
.host-list details.host > summary { list-style: none; cursor: pointer; }
.host-list details.host > summary::-webkit-details-marker { display: none; }
.host-list details.host > summary::after { content: ''; flex: none; width: 7px; height: 7px; margin: 0 4px 0 6px;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(-45deg); transition: transform .15s; }
.host-list details.host[open] > summary::after { transform: rotate(45deg); }
.ws-path-row { display: flex; align-items: center; gap: 8px; }
.ws-path-row > .input { flex: 1 1 auto; min-width: 0; }
/* One agent backend at a time: the radio picks it among the hosts set up here. Set up shows how to install from source. */
.host-pick { flex: none; width: 18px; height: 18px; margin: 0 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.host-setup { flex: none; height: 30px; padding: 0 12px; font-size: 13px; }
.host-setup[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.host-guide { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.install-tabs { display: flex; flex-direction: column; gap: 10px; }
.install-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.install-panel > .codebox { align-self: stretch; }
.install-prompt { align-self: stretch; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.6; }
.host-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; padding: 10px 12px;
  border-radius: 10px; background: var(--bg); font-size: 13px; }
.host-details > div { display: contents; }
.host-details dt { color: var(--muted); }
.host-details dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.host-details dd.mono { font-size: 12px; }
.host-launch { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid #A9C4F5; border-radius: 10px; background: #F4F8FF; }
.host-launch .input { height: 44px; border-radius: 10px; font-size: 14px; letter-spacing: 0; }
#controlBackend .control-section h2, #controlFrontend .control-section h2 { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- help */

.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.help-index { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.help-index a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; text-decoration: none; }
.help-index a:hover { background: var(--raised); color: var(--text); }
.help-topics { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.help-topic { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-margin-top: 16px; }
.help-topic h2 { margin: 0 0 6px; font-size: 17px; font-weight: 650; }
.help-topic p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.help-topic[data-active] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.help-topic:focus-visible { outline: none; }

/* ---------------------------------------------------------------- narrower screens */

@media (max-width: 1023px) and (min-width: 760px) {
  :root { --sidebar-w: 84px; }
  .sidebar { padding: 12px 8px; align-items: stretch; }
  .nav-item { flex-direction: column; justify-content: center; gap: 4px; height: 64px; padding: 0; font-size: 12px; text-align: center; }
  .nav-call { position: absolute; top: 4px; right: 4px; margin: 0; padding: 0 5px; font-size: 10px; }
  .nav-call::before { display: none; }
  .workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .ws-detail { position: static; height: auto; min-height: 0; }
  .ws-detail > :is(.pane-preview, .pane-source) { height: 62vh; flex: none; }
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-index { position: static; flex-direction: row; flex-wrap: wrap; }
  .conversation-layout[data-preview="on"] { grid-template-columns: minmax(0, 1fr) 300px; }
  .status-k { display: none; }
}
@media (max-width: 759px) {
  :root { --header-h: 56px; }
  .app-header { padding: 0 12px 0 16px; }
  .wordmark { font-size: 20px; }
  .language-button { padding: 0 10px; }
  .language-button > span:nth-child(2) { display: none; }
  .status-chip { gap: 5px; padding: 0 9px; }
  .status-k { display: none; }
  .status-v { max-width: 9ch; }
  .suggestions { right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }
  .suggestions.above-orb { bottom: calc(168px + env(safe-area-inset-bottom)); }
  .app-body { flex-direction: column-reverse; }
  .sidebar { width: auto; flex-direction: row; gap: 0; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); border-right: 0;
    border-top: 1px solid var(--line); }
  .nav-item { flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 52px; padding: 0; font-size: 11px; }
  .nav-item[aria-current="page"] { background: none; }
  .nav-item[aria-current="page"] svg { color: var(--accent); }
  .nav-call { position: absolute; top: 2px; right: 18%; margin: 0; padding: 0 5px; font-size: 10px; }
  .nav-call::before { display: none; }
  .view-page { padding: 20px 16px 40px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-title { font-size: 24px; }
  .view-ready { padding: 16px 16px 120px; gap: 20px; }
  .chat-hero { padding-top: 0; }
  .orb-slot-hero { width: min(220px, 60vw); margin: 10px 0; }
  .talk-top { padding: 0 12px; }
  .conversation-pane { padding: 4px 12px 0; }
  .orb-slot-call { width: 52px; height: 52px; }
  .controls { padding: 8px 0 10px; }
  .settings-tabs { overflow-x: auto; }
  .settings-tabs button { flex: none; font-size: 14px; padding: 0 10px; }
  .set-card { padding: 16px; }
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .help-index { position: static; flex-direction: row; flex-wrap: wrap; }
  .view-page { padding-bottom: 140px; }
  .view-workspace .scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ws-detail { position: static; height: auto; min-height: 0; padding: 14px; }
  .ws-detail > :is(.pane-preview, .pane-source) { height: 62vh; flex: none; }
  .ws-detail > :is(.pane-config, .pane-store) { flex: none; }
  .param-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* Preview mode on a phone: the page on top, the conversation below, the orb in the page's corner. */
  .conversation-layout[data-preview="on"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 55fr) minmax(0, 45fr); }
  .conversation-layout[data-preview="on"] > .call-preview { grid-area: 1 / 1; }
  .conversation-layout[data-preview="on"] > .conversation-pane { grid-area: 2 / 1; padding: 4px 12px 0; border-left: 0;
    border-top: 1px solid var(--line); }
  .talk-tabs [role="tab"] { height: 28px; padding: 0 8px; font-size: 12px; }
  .talk-heading .timer, #callTarget { display: none; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .app[data-view="login"] .toast { bottom: max(24px, env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .status-v { display: none; }
}
.login-intro .brand::after { content: none; }
/* In a call the prompt shares the column with the conversation instead of pushing it away. */
.conversation-pane .prompt-details[open] { flex: 0 1 auto; min-height: 0; max-height: 45%; }
#agentSteps.install-connect { padding: 0 14px; border-top: 1px solid var(--line); }
#agentSteps.install-connect[open] { padding-bottom: 14px; }
#agentSteps.install-connect > :not(summary) { margin-top: 8px; }
