:root {
  --bg: #f7f7f8;
  --panel: #ffffff;
  --side: #efeff3;
  --text: #1b1b1f;
  --muted: #6b6b76;
  --line: #e2e2e8;
  --accent: #5b5bd6;
  --accent-text: #ffffff;
  --user: #5b5bd6;
  --user-text: #ffffff;
  --bot: #ffffff;
  --code: #f0f0f4;
  --danger: #d93d42;
  --ok: #2f9e5b;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .05);
  --radius: 16px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 15px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141417;
    --panel: #1c1c21;
    --side: #18181c;
    --text: #ececf1;
    --muted: #9a9aa6;
    --line: #2c2c34;
    --accent: #7c7cf0;
    --user: #4b4bc4;
    --bot: #202027;
    --code: #26262e;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); overflow: hidden; }
button, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

#app { display: flex; height: 100dvh; }

/* ---- sidebar ---- */
#sidebar {
  width: 280px; flex: none; background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.side-head { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; }
.logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.logo.big { width: 56px; height: 56px; border-radius: 16px; font-size: 28px; margin: 0 auto 12px; }
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px;
  border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text); cursor: pointer; font-weight: 550;
}
.btn-primary:hover { filter: brightness(1.08); }
#sessions { list-style: none; margin: 0; padding: 0 8px; overflow-y: auto; flex: 1; }
#sessions li {
  display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 10px; cursor: pointer; margin-bottom: 2px;
}
#sessions li:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
#sessions li.active { background: var(--panel); box-shadow: var(--shadow); }
#sessions .s-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sessions .s-time { font-size: 11px; color: var(--muted); flex: none; }
#sessions .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
#sessions .del {
  border: 0; background: none; color: var(--muted); padding: 2px; border-radius: 6px; cursor: pointer; display: none; font-size: 12px;
}
#sessions li:hover .del, #sessions .del.confirm { display: block; }
#sessions .del.confirm { color: var(--danger); font-weight: 600; }
#sessions .del svg { width: 16px; height: 16px; }
.side-foot { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; }
.conn::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.conn.on::before { background: var(--ok); }
.conn.off::before { background: var(--danger); }

/* ---- main ---- */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel);
}
#topbar h1 {
  font-size: 16px; margin: 0; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: text; outline: none; border-radius: 6px; padding: 2px 4px;
}
#topbar h1[contenteditable="true"] { background: var(--code); white-space: normal; }
#menu { display: none; }
.icon-btn {
  border: 0; background: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  cursor: pointer; color: var(--muted); flex: none; position: relative;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.call-start { color: var(--ok); }
.hangup { background: var(--danger); color: #fff; }
.hangup:hover { background: var(--danger); color: #fff; filter: brightness(1.1); }

/* ---- connect gate ---- */
#gate {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 22%, var(--bg)), var(--bg));
}
.gate-card { width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.big-brand { font-size: 24px; gap: 12px; }
.big-brand .logo { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.gate-orb { position: relative; width: 96px; height: 96px; margin-bottom: 8px; }
.gate-orb span {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0;
  animation: ripple 2.4s ease-out infinite;
}
.gate-orb span:nth-child(2) { animation-delay: .8s; } .gate-orb span:nth-child(3) { animation-delay: 1.6s; }
#gate.failed .gate-orb span { animation: none; opacity: .25; }
@keyframes ripple { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
#gate-form {
  width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow);
}
#gate-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
#gate-form input {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; outline: none; width: 100%;
}
#gate-form input:focus { border-color: var(--accent); }
#gate-form input[readonly] { color: var(--muted); }
.pw { position: relative; display: block; }
.pw input { padding-right: 64px !important; }
.link-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); cursor: pointer; font-weight: 600; font-size: 13px; }
.gate-error { color: var(--danger); font-size: 13px; margin: 0; }
.gate-hint { font-size: 12px; margin: 0; text-align: left; line-height: 1.45; }
.gate-hint code { font-size: 11px; }

/* ---- devices ---- */
.foot-btn {
  display: flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); cursor: pointer;
  font: inherit; padding: 2px 6px; border-radius: 6px; max-width: 60%;
}
.foot-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.foot-btn svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.foot-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#devices-dlg {
  width: min(460px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); color: var(--text); padding: 18px; box-shadow: var(--shadow);
}
#devices-dlg::backdrop { background: rgb(0 0 0 / .45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; }
.dlg-head h2 { margin: 0; font-size: 18px; }
#devices-list { list-style: none; margin: 12px 0; padding: 0; max-height: 45vh; overflow-y: auto; }
#devices-list li { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); }
#devices-list li:first-child { border-top: 0; }
.dev-kind {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 11px; font-weight: 700;
}
.dev-main { flex: 1; min-width: 0; }
.dev-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-meta { font-size: 12px; color: var(--muted); }
.dev-you { font-size: 11px; color: var(--ok); font-weight: 600; margin-left: 6px; }
.btn-ghost {
  border: 1px solid var(--line); background: none; color: var(--text); border-radius: 10px; padding: 7px 10px;
  cursor: pointer; font: inherit; font-size: 13px;
}
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.danger-text { color: var(--danger); }
#pair-box { text-align: center; padding: 14px; border-radius: 12px; background: var(--code); margin-bottom: 12px; }
.pair-code { font: 700 30px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 3px; margin: 6px 0; user-select: all; }
.dlg-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.btn-primary.wide { width: 100%; padding: 12px; font-size: 15px; }
.btn-primary:disabled { opacity: .6; cursor: default; }

/* ---- banner / return-to-call bar ---- */
#banner { background: color-mix(in srgb, var(--danger) 12%, var(--panel)); color: var(--danger); text-align: center; font-size: 13px; padding: 6px; }
#return-call {
  display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; padding: 8px 12px;
  background: var(--ok); color: #fff; font-weight: 600; font-size: 13px;
}
#return-call .muted { color: rgb(255 255 255 / .8); font-weight: 400; }
#return-timer { font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }

/* ---- call screen ---- */
#main { position: relative; }
#callscreen {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; color: #fff;
  background: radial-gradient(900px 500px at 50% 0%, #34347a, #121226 70%);
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
}
.call-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icon-btn.light { color: rgb(255 255 255 / .85); }
.icon-btn.light:hover { background: rgb(255 255 255 / .1); color: #fff; }
.call-lang { display: flex; gap: 6px; min-width: 0; }
.call-lang select {
  max-width: 170px; padding: 6px 8px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .2);
  background: rgb(255 255 255 / .08); color: #fff; font-size: 13px;
}
.call-lang option { color: #000; }
.call-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 0; }
.call-name { font-size: 30px; font-weight: 650; letter-spacing: .3px; }
.call-status { font-size: 15px; color: rgb(255 255 255 / .75); font-variant-numeric: tabular-nums; min-height: 1.4em; }
.call-caption { max-width: 560px; min-height: 3em; font-size: 16px; line-height: 1.5; color: rgb(255 255 255 / .9); padding: 0 8px; }
.call-caption.filler { color: rgb(255 255 255 / .55); font-style: italic; }
.call-controls { display: flex; justify-content: center; align-items: flex-start; gap: 36px; }

.round-btn {
  border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none;
  color: #fff; font-size: 12px;
}
.round-btn svg {
  width: 60px; height: 60px; padding: 18px; border-radius: 50%; background: rgb(255 255 255 / .14);
  stroke-width: 1.8; transition: background .15s, transform .1s;
}
.round-btn:hover svg { background: rgb(255 255 255 / .22); }
.round-btn:active svg { transform: scale(.94); }
.round-btn.red svg { background: #e5484d; } .round-btn.red:hover svg { background: #f2555a; }
.round-btn.green svg { background: #30a46c; } .round-btn.green:hover svg { background: #3cb179; }
.round-btn.big svg { width: 72px; height: 72px; padding: 22px; }
.round-btn:disabled { cursor: default; opacity: .55; }
.round-btn:disabled:hover svg { background: rgb(255 255 255 / .14); }
#mute-btn .i-lock { display: none; }
#mute-btn.locked .i-lock { display: block; } #mute-btn.locked .i-mic { display: none; }
#mute-btn.muted-on svg { background: #fff; color: #121226; }

.orb { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); display: grid; place-items: center; flex: none; }
.orb span { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); transition: transform .08s linear; }
.orb.big { width: 180px; height: 180px; margin: 18px 0; background: rgb(124 124 240 / .16); box-shadow: 0 0 0 18px rgb(124 124 240 / .06); }
.orb.big span { width: 84px; height: 84px; background: linear-gradient(135deg, #8b8bff, #5b5bd6); box-shadow: 0 0 40px rgb(124 124 240 / .6); }
.orb.listening span { background: linear-gradient(135deg, #4ade80, #22a35a); box-shadow: 0 0 40px rgb(74 222 128 / .5); }
.orb.thinking span { animation: pulse 1.1s ease-in-out infinite; }
.orb.speaking span { animation: pulse .6s ease-in-out infinite; }
.orb.ringing { animation: ring-glow 1.6s ease-in-out infinite; }
.orb.muted span { background: #6b6b76; box-shadow: none; }
@keyframes pulse { 50% { transform: scale(1.25); } }
@keyframes ring-glow { 50% { box-shadow: 0 0 0 34px rgb(124 124 240 / .1); } }

/* ---- incoming call ---- */
#incoming {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; color: #fff; padding: 16px;
  background: radial-gradient(900px 600px at 50% 0%, #34347a, #0e0e1f 75%);
}
.incoming-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: min(420px, 100%); }
.ring-avatar { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; animation: ring-glow 1.2s ease-in-out infinite; background: rgb(124 124 240 / .18); }
.logo.huge { width: 88px; height: 88px; border-radius: 26px; font-size: 42px; }
.incoming-title { font-size: 32px; font-weight: 650; }
.incoming-reason { color: rgb(255 255 255 / .85); margin: 12px 0 28px; line-height: 1.5; }
.incoming-actions { display: flex; gap: 72px; }
.incoming-actions .round-btn svg { width: 68px; height: 68px; padding: 20px; }
#accept-btn svg { animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }

/* ---- updates in the chat ---- */
.update-card {
  border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--panel); border-radius: 12px;
  padding: 10px 14px; box-shadow: var(--shadow); max-width: min(85%, 680px); align-self: flex-start;
}
.update-card .u-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.update-card .u-tag { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); border-radius: 6px; padding: 1px 7px; font-weight: 700; font-size: 11px; letter-spacing: .4px; }
.update-card .u-title { font-weight: 650; margin-bottom: 4px; }
.update-card.high { border-left-color: var(--danger); }
.update-card.high .u-tag { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.update-card .files { margin: 6px 0 0; }
.system-line.missed { color: var(--danger); }

/* ---- Zyreca's progress lines and job cards ---- */
.say-line { font-size: 13px; color: var(--muted); font-style: italic; display: flex; gap: 8px; align-items: baseline; padding-left: 4px; }
.say-who { font-style: normal; font-weight: 650; font-size: 11px; color: var(--accent); letter-spacing: .3px; }
.job-card {
  display: flex; align-items: center; gap: 12px; max-width: min(85%, 560px); align-self: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow);
}
.job-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.job-card.running .job-icon svg { animation: pulse 1.6s ease-in-out infinite; }
.job-body { flex: 1; min-width: 0; }
.job-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-status { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.job-stop {
  border: 1px solid var(--line); background: var(--bg); color: var(--danger); border-radius: 8px; padding: 5px 10px;
  cursor: pointer; font-size: 12px; font-weight: 600; flex: none;
}
.job-stop:hover { border-color: var(--danger); }
.job-stop:disabled { opacity: .6; cursor: default; }
.job-card.done .job-icon { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.job-card.done .job-status { color: var(--ok); }
.job-card.failed .job-icon, .job-card.interrupted .job-icon { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.job-card.failed .job-status { color: var(--danger); }
.job-card.cancelled { opacity: .75; }

/* ---- messages ---- */
#messages { flex: 1; overflow-y: auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 10px; }
#messages > * { width: 100%; max-width: 820px; margin-left: auto; margin-right: auto; }
.empty { margin: auto !important; text-align: center; color: var(--muted); }
.msg { display: flex; flex-direction: column; }
.msg.user { align-items: flex-end; }
.msg.assistant { align-items: flex-start; }
.bubble {
  max-width: min(85%, 680px); padding: 10px 14px; border-radius: var(--radius); line-height: 1.5;
  overflow-wrap: anywhere; box-shadow: var(--shadow);
}
.user .bubble { background: var(--user); color: var(--user-text); border-bottom-right-radius: 6px; }
.assistant .bubble { background: var(--bot); border-bottom-left-radius: 6px; }
.bubble:empty { display: none; }
.meta { font-size: 11px; color: var(--muted); margin: 3px 6px 0; display: flex; gap: 8px; align-items: center; }
.meta svg { width: 12px; height: 12px; }
.tag { background: var(--code); border-radius: 6px; padding: 0 6px; }
.transcript { font-size: 13px; color: var(--muted); font-style: italic; max-width: min(85%, 680px); margin: 4px 6px 0; text-align: right; }
.system-line { text-align: center; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.system-line::before, .system-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.error-line { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.status-line { font-size: 13px; color: var(--muted); margin: 4px 6px 0; }

.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin-bottom: 0; }
.bubble pre { background: var(--code); color: var(--text); padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-size: 13px; margin: 8px 0; }
.bubble code { font-family: "Cascadia Code", Consolas, monospace; font-size: .92em; }
.bubble :not(pre) > code { background: var(--code); color: var(--text); padding: 1px 5px; border-radius: 5px; }
.bubble ul, .bubble ol { margin: 4px 0 8px; padding-left: 22px; }
.bubble h1, .bubble h2, .bubble h3 { font-size: 1.05em; margin: 10px 0 6px; }
.bubble a { color: inherit; }
.bubble blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }

.files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; max-width: min(85%, 680px); }
.user .files { justify-content: flex-end; }
.files img, .files video { max-width: 260px; max-height: 220px; border-radius: 12px; display: block; background: var(--code); cursor: zoom-in; }
.files video { cursor: default; }
.files audio { width: 260px; max-width: 100%; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 13px; max-width: 260px;
}
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip svg { width: 16px; height: 16px; flex: none; }

.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---- composer ---- */
#composer { padding: 8px 16px 14px; background: var(--bg); }
#composer .row, .pending { max-width: 820px; margin: 0 auto; }
#composer .row {
  display: flex; align-items: flex-end; gap: 4px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 6px; box-shadow: var(--shadow);
}
#input {
  flex: 1; border: 0; outline: none; resize: none; background: none; padding: 9px 6px; max-height: 200px; line-height: 1.4;
}
.send { background: var(--accent); color: #fff; }
.send:hover { background: var(--accent); color: #fff; filter: brightness(1.1); }
#rec-btn.recording { background: var(--danger); color: #fff; width: auto; padding: 0 10px; gap: 6px; display: flex; }
#rec-time { font-size: 12px; font-variant-numeric: tabular-nums; }
.pending { display: flex; flex-wrap: wrap; gap: 6px; }
.pending:not(:empty) { margin-bottom: 8px; }
.pending .chip { position: relative; padding-right: 28px; }
.pending .chip.uploading { opacity: .6; }
.pending .chip.failed { border-color: var(--danger); color: var(--danger); }
.pending .chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.pending .x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px; }
.pending .x svg { width: 14px; height: 14px; }

#drop {
  position: fixed; inset: 0; background: color-mix(in srgb, var(--accent) 20%, transparent); display: grid; place-items: center;
  z-index: 50; pointer-events: none;
}
#drop div { background: var(--panel); padding: 20px 28px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); }
#lightbox { position: fixed; inset: 0; background: rgb(0 0 0 / .85); display: grid; place-items: center; z-index: 60; cursor: zoom-out; }
#lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 8px; }

/* ---- phone width ---- */
@media (max-width: 760px) {
  #sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; width: 84%; max-width: 320px; }
  #app.side-open #sidebar { transform: none; }
  #app.side-open #scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 30; }
  #menu { display: grid; }
  #model { display: none; }
  #messages { padding: 14px 12px 6px; }
  #composer { padding: 6px 10px 10px; }
  .bubble, .files, .transcript, .update-card { max-width: 92%; }
  #callscreen { position: fixed; z-index: 45; }
  .call-lang select { max-width: 120px; }
  .call-controls { gap: 24px; }
  .orb.big { width: 150px; height: 150px; }
}
