:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --text: #17302d;
  --muted: #617571;
  --line: #d5e1de;
  --accent: #147d75;
  --accent-strong: #0d625c;
  --accent-soft: #d9f1ed;
  --danger: #a63838;
  --shadow: 0 18px 50px rgb(30 67 62 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1716;
  --surface: #182321;
  --surface-soft: #202e2b;
  --text: #ecf5f2;
  --muted: #9fb3ae;
  --line: #314440;
  --accent: #62c8bc;
  --accent-strong: #8bd9d0;
  --accent-soft: #193d39;
  --danger: #ff9a9a;
  --shadow: 0 18px 50px rgb(0 0 0 / 32%);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #0f1716; --surface: #182321; --surface-soft: #202e2b; --text: #ecf5f2;
    --muted: #9fb3ae; --line: #314440; --accent: #62c8bc; --accent-strong: #8bd9d0;
    --accent-soft: #193d39; --danger: #ff9a9a; --shadow: 0 18px 50px rgb(0 0 0 / 32%);
  }
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
button, input, textarea, select { color: inherit; font: inherit; }
button, select, input, textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
button { cursor: pointer; padding: .62rem .9rem; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }
.primary { border-color: var(--accent); background: var(--accent); color: white; font-weight: 650; }
.primary:hover { background: var(--accent-strong); }
.login-view { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(2rem, 6vw, 7rem); padding: clamp(2rem, 6vw, 6rem) max(2rem, calc((100vw - 1180px) / 2)); overflow: hidden; color: #f6f8ff; background: #10182c; }
.login-atmosphere { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: radial-gradient(ellipse at 5% 0%, #284445 0%, transparent 55%), radial-gradient(ellipse at 88% 100%, #342b57 0%, transparent 60%); }
.login-atmosphere span { position: absolute; width: 38rem; height: 38rem; border: 1px solid rgb(165 223 204 / 11%); border-radius: 50%; top: 10%; left: -15rem; transform: rotate(-20deg) scaleX(1.5); }
.login-atmosphere span:nth-child(2) { width: 48rem; height: 48rem; top: 0; left: -20rem; }
.login-atmosphere span:nth-child(3) { width: 58rem; height: 58rem; top: -10%; left: -25rem; }
.login-story { min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 4rem; padding-block: .5rem; }
.login-brand { display: flex; align-items: center; gap: .9rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -.025em; }
.login-brand img { border-radius: 16px; box-shadow: 0 8px 30px rgb(0 0 0 / 18%); }
.login-brand-caption { display: block; margin-top: .3rem; font-size: .58rem; font-weight: 500; letter-spacing: .19em; color: #b1c7c7; }
.login-kicker { color: #9ee2cd; font-size: .81rem; letter-spacing: .02em; }
.login-story h2 { font-weight: 500; font-size: clamp(3rem, 5.7vw, 5.2rem); line-height: 1.06; letter-spacing: -.065em; margin: 1.2rem 0 1.5rem; }
.login-story h2 em { font-style: normal; color: #b8eed9; background: linear-gradient(100deg, #a9f4d2, #e4e2ff 90%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-story-copy > p:last-child { font-size: 1.05rem; line-height: 1.8; color: #b6c5d2; }
.login-story-footer { display: flex; align-items: center; gap: .65rem; color: #b6c5d2; font-size: .76rem; }
.login-spark-dot { width: 7px; height: 7px; border-radius: 50%; background: #a5eccb; box-shadow: 0 0 15px #a5eccb; animation: login-glow 5s ease-in-out 2; }
@keyframes login-glow { 50% { opacity: .55; box-shadow: 0 0 24px #a5eccb; } }
.login-card { --surface: #fcfdfb; --line: #dce5df; --muted: #60706b; --accent: #147d75; --accent-strong: #0d625c; --danger: #a63838; color-scheme: light; color: #1b302b; width: 100%; max-width: 440px; justify-self: end; display: grid; gap: 1.15rem; padding: clamp(1.7rem, 3.2vw, 2.8rem); background: var(--surface); border: 1px solid rgb(255 255 255 / 65%); border-radius: 28px; box-shadow: 0 32px 100px rgb(0 0 0 / 22%), inset 0 1px 0 #fff; }
.login-emblem { border-radius: 19px; box-shadow: 0 8px 22px rgb(28 46 51 / 15%); }
.login-heading { margin: .35rem 0 .25rem; }
.login-heading .eyebrow { color: #437c68; font-size: .66rem; letter-spacing: .12em; margin-bottom: .7rem; }
.login-heading h1 { font-size: clamp(1.8rem, 3vw, 2.2rem); font-weight: 600; line-height: 1.18; }
.login-heading .muted { margin: .7rem 0 0; font-size: .87rem; line-height: 1.6; }
.login-card h1, .welcome h1 { margin: 0; letter-spacing: -.035em; }
.login-card label:not(.remember) { display: grid; gap: .5rem; font-size: .8rem; font-weight: 600; }
.login-card input:not([type="checkbox"]) { width: 100%; min-width: 0; min-height: 50px; padding: .8rem .95rem; border-radius: 12px; background: #f4f7f3; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.login-card input::placeholder { color: #7b8c85; }
.login-card input:focus-visible { border-color: #348e78; outline: 2px solid rgb(52 142 120 / 22%); outline-offset: 2px; }
.login-card .remember { min-height: 28px; font-size: .78rem; color: #455d52; }
.login-card .remember input { accent-color: #147d75; flex-shrink: 0; }
.login-session-note { color: #60706b; font-size: .71rem; line-height: 1.5; margin: -.9rem 0 0 1.65rem; }
.login-card .primary { min-height: 52px; border: 0; border-radius: 12px; background: linear-gradient(115deg, #147d75, #216744); color: #fff; box-shadow: 0 5px 16px rgb(20 125 117 / 16%); transition: box-shadow .2s, transform .2s; }
.login-card .primary:hover:not(:disabled) { box-shadow: 0 7px 22px rgb(20 125 117 / 25%); transform: translateY(-1px); }
.login-card .privacy-note { margin: 0; text-align: center; font-size: .68rem; line-height: 1.6; color: #697a72; }
@media (max-width: 760px) {
  .login-view { grid-template-columns: minmax(0, 1fr); gap: 1.65rem; align-content: center; padding: max(1.65rem, env(safe-area-inset-top)) 1.1rem max(1.65rem, env(safe-area-inset-bottom)); }
  .login-story { align-self: auto; padding: 0; gap: 0; }
  .login-brand { justify-content: center; font-size: 1.15rem; }
  .login-brand img { width: 44px; height: 44px; border-radius: 14px; }
  .login-story-copy, .login-story-footer { display: none; }
  .login-card { justify-self: center; padding: 1.8rem; gap: 1rem; border-radius: 24px; }
  .login-emblem { width: 52px; height: 52px; border-radius: 16px; }
  .login-heading .eyebrow { font-size: .61rem; }
}
@media (max-width: 360px) { .login-card { padding: 1.3rem; } }
.remember { display: flex; align-items: center; gap: .55rem; color: var(--muted); }
.remember input { width: 1.05rem; height: 1.05rem; }
.muted, .privacy-note, .capability-note { color: var(--muted); }
.privacy-note, .capability-note { font-size: .82rem; }
.form-error { margin: 0; color: var(--danger); }
.eyebrow { margin: 0; color: var(--accent); font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.app-view { height: 100vh; height: 100dvh; min-height: 0; display: grid; overflow: hidden; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; min-height: 0; display: flex; overflow: hidden; flex-direction: column; gap: 1rem; padding: 1rem; background: var(--surface); border-right: 1px solid var(--line); z-index: 4; }
.brand { display: flex; gap: .7rem; align-items: center; min-height: 44px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-size: .78rem; font-weight: 800; }
.thread-list { min-height: 0; flex: 1 1 0; display: grid; align-content: start; gap: .35rem; overflow-y: auto; overscroll-behavior: contain; }
.thread-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(4.5rem, max-content); gap: .3rem; align-items: stretch; }
.thread-list button { min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.thread-open { width: 100%; min-height: 44px; }
.thread-delete { width: 100%; min-width: 4.5rem; min-height: 44px; padding-inline: .65rem; color: var(--danger); text-align: center !important; }
.thread-delete:hover:not(:disabled) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.sidebar footer { flex: 0 0 auto; display: grid; gap: .5rem; }
.workspace { min-width: 0; min-height: 0; height: 100%; grid-column: 2; display: grid; overflow: hidden; grid-template-areas: "topbar" "offline" "context" "chat" "activity" "composer"; grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); }
.topbar { grid-area: topbar; min-width: 0; min-height: 56px; display: flex; flex-wrap: nowrap; align-items: center; gap: .65rem; padding: max(.3rem, env(safe-area-inset-top)) .75rem .3rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); white-space: nowrap; }
.conversation-meta { min-width: 0; flex: 1 1 auto; display: flex; align-items: baseline; gap: .5rem; overflow: hidden; }
#conversation-title { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-state { min-width: 0; max-width: min(12rem, 28vw); flex: 0 1 auto; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.mode-switch { display: flex; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.mode-switch button { min-height: 44px; border: 0; padding: .45rem .75rem; background: transparent; }
.mode-switch button[aria-pressed="true"] { background: var(--surface); color: var(--accent-strong); box-shadow: 0 1px 5px rgb(0 0 0 / 8%); }
.theme-label { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; }
.theme-label select { padding: .42rem; }
.topbar-info { position: relative; flex: 0 0 auto; }
.topbar-info > summary { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--accent-strong); cursor: pointer; font-size: .82rem; font-weight: 700; list-style: none; user-select: none; }
.topbar-info > summary::-webkit-details-marker { display: none; }
.topbar-info > summary::marker { content: ""; }
.topbar-info > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.capability-note { position: absolute; z-index: 6; top: calc(100% + .4rem); right: 0; width: min(22rem, calc(100vw - 1rem)); margin: 0; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); line-height: 1.4; text-align: left; white-space: normal; }
.notice, .context-indicator { margin: .65rem 1rem 0; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--muted); }
#offline-banner { grid-area: offline; }
.context-indicator { grid-area: context; }
.update-notice { position: fixed; z-index: 10; top: max(.4rem, env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 1rem), 620px); margin: 0; transform: translateX(-50%); box-shadow: var(--shadow); }
.chat-scroll { grid-area: chat; min-height: 0; overflow-x: hidden; overflow-y: auto; scroll-padding-block-end: 4rem; padding: clamp(1rem, 4vw, 3rem) max(1rem, calc((100% - 850px) / 2)); }
.chat-bottom { width: 100%; height: 3.75rem; }
.go-to-bottom { grid-area: chat; z-index: 3; align-self: end; justify-self: end; width: 46px; min-width: 46px; height: 46px; min-height: 46px; margin: .75rem max(1rem, env(safe-area-inset-right)); padding: 0; border-radius: 999px; background: var(--surface); color: var(--accent-strong); box-shadow: var(--shadow); touch-action: manipulation; }
.welcome { margin: 11vh auto 2rem; max-width: 680px; text-align: center; }
.welcome p:last-child { color: var(--muted); }
.messages { display: grid; gap: 1.2rem; }
.message { min-width: 0; max-width: min(86%, 760px); padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.message[data-role="user"] { justify-self: end; background: var(--accent-soft); }
.message[data-role="assistant"] { width: min(100%, 760px); max-width: min(100%, 760px); justify-self: start; }
.message-content { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.inline-image-omitted { color: var(--muted); font-size: .88rem; }
.agent-run-failure { margin: 0; color: var(--danger); overflow-wrap: anywhere; }
.message pre { overflow-x: auto; padding: .8rem; border-radius: 10px; background: var(--surface-soft); }
.message-artifacts { min-width: 0; display: grid; gap: .75rem; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.message-artifacts[hidden] { display: none; }
.artifact, .artifact > div { width: 100%; min-width: 0; max-width: 100%; }
.message table, .artifact-table { width: 100%; border-collapse: collapse; }
.message th, .message td, .artifact-table th, .artifact-table td { padding: .55rem; border: 1px solid var(--line); text-align: left; }
.table-scroll, .artifact-table-scroll { overflow-x: auto; }
.math-display { overflow-x: auto; padding: .5rem 0; }
.activity-panel { grid-area: activity; min-height: 0; overflow: hidden; border-top: 1px solid var(--line); background: var(--surface-soft); }
.activity-disclosure > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem max(1rem, calc((100% - 850px) / 2)); cursor: pointer; user-select: none; }
.activity-disclosure > summary::-webkit-details-marker { display: none; }
.activity-disclosure > summary::marker { content: ""; }
.activity-disclosure > summary strong { margin-right: auto; }
.activity-disclosure > summary::after { content: "Show details ⌄"; min-width: max-content; color: var(--accent-strong); font-size: .82rem; font-weight: 700; }
.activity-disclosure[open] > summary::after { content: "Hide details ⌃"; }
.activity-disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.activity-details { max-height: min(30dvh, 20rem); overflow-y: auto; overscroll-behavior: contain; padding: 0 max(1rem, calc((100% - 850px) / 2)) .75rem; }
.agent-plan, .agent-timeline { display: grid; gap: .35rem; padding-left: 1.4rem; }
.agent-artifacts { display: grid; gap: .75rem; }
.artifact-plot { display: block; width: 100%; height: auto; max-width: 100%; max-height: 420px; aspect-ratio: 720 / 390; }
.plot-grid { stroke: var(--line); }
.plot-axis { stroke: var(--muted); }
.plot-grid, .plot-axis, .plot-series path { vector-effect: non-scaling-stroke; }
.plot-tick { fill: var(--muted); font-size: 13px; }
.plot-axis-label { font-size: 14px; font-weight: 650; }
.plot-axis-offset { font-size: 11px; font-variant-numeric: tabular-nums; }
.plot-label-compact { display: none; }
.artifact-legend { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; gap: .55rem .85rem; margin: .65rem 0 0; padding: 0; line-height: 1.35; list-style: none; }
.artifact-legend li { min-width: 0; max-width: 100%; display: inline-flex; align-items: center; overflow-wrap: anywhere; }
.artifact-swatch { display: inline-block; width: .7rem; height: .7rem; flex: 0 0 auto; margin-right: .35rem; border-radius: 50%; }
.artifact-swatch-0 { background: #147d75; }
.artifact-swatch-1 { background: #4472ca; }
.artifact-swatch-2 { background: #c55c37; }
.artifact-swatch-3 { background: #8c5bbd; }
.artifact-swatch-4 { background: #73802d; }
.artifact-swatch-5 { background: #bb4f7b; }
.artifact-swatch-6 { background: #427f9e; }
.artifact-swatch-7 { background: #9b6b2f; }
.artifact-rejected { color: var(--danger); }
.composer { grid-area: composer; display: flex; gap: .75rem; align-items: end; padding: .8rem max(1rem, calc((100% - 850px) / 2)) max(.8rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { min-height: 48px; max-height: 180px; flex: 1; resize: vertical; padding: .75rem; }
.composer-tools { display: flex; min-width: 0; align-items: end; gap: .45rem; }
.search-controls { display: flex; align-items: end; gap: .45rem; }
.search-controls > button { min-height: 48px; }
.search-controls > button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.search-options { display: flex; gap: .4rem; }
.search-options label { display: grid; gap: .2rem; color: var(--muted); font-size: .72rem; }
.search-options select, .search-options input { min-height: 32px; padding: .35rem; }
.search-options input { width: 4.5rem; }
.search-options-close { align-self: end; min-height: 36px; padding: .4rem .55rem; }
.artifact-sources { display: grid; gap: .65rem; padding: 0; list-style: none; }
.artifact-source-card { padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.artifact-source-title { margin: 0; font-size: 1rem; }
.artifact-source-snippet { margin: .45rem 0; }
.artifact-source-metadata { margin: .35rem 0 0; color: var(--muted); font-size: .78rem; }
.artifact-file-metadata { margin: 0 0 .6rem; overflow-wrap: anywhere; font-weight: 650; }
.artifact-file-controls { display: flex; min-width: 0; flex-wrap: wrap; gap: .55rem; }
.artifact-export-controls { margin-top: .65rem; }
.artifact-file-action { min-width: min(100%, 7.5rem); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--accent-strong); font-weight: 700; text-decoration: none; touch-action: manipulation; }
.artifact-file-action:hover { border-color: var(--accent); background: var(--accent-soft); }
.artifact-file-download { background: var(--accent); color: white; }
.artifact-file-privacy { margin: .55rem 0 0; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.composer-icon-button { position: relative; display: inline-grid; width: 48px; min-width: 48px; min-height: 48px; flex: 0 0 48px; place-items: center; padding: .65rem; }
.composer-icon-button svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.composer-icon-busy { display: none; width: 1.25rem; height: 1.25rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: voice-spin .8s linear infinite; }
.image-button[data-image-state="preparing"] .image-icon { display: none; }
.image-button[data-image-state="preparing"] .composer-icon-busy { display: block; }
.stop-button { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.composer-actions:has(#stop-run:not([hidden])) #send-message { display: none; }
.image-preview { min-width: 0; display: flex; max-width: 190px; align-items: center; gap: .45rem; padding: .35rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.image-preview img { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; }
.image-preview span { min-width: 0; flex: 1 1 auto; overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.image-preview button { min-height: 44px; flex: 0 0 auto; padding: .35rem .5rem; }
.message-attachments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: min(100%, 620px); gap: .5rem; margin-bottom: .65rem; }
.message-attachment-retained { min-width: 0; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.message-attachment-item { min-width: 0; }
.message-attachment { display: block; width: 100%; max-height: 520px; border-radius: 12px; object-fit: contain; }
.message > .message-attachment { max-width: min(100%, 620px); margin-bottom: .65rem; }
.message-attachment-status { padding: .35rem .5rem; border-color: transparent; background: transparent; text-align: left; }
.message-listen { min-height: 40px; margin-top: .6rem; padding: .4rem .7rem; color: var(--accent-strong); }
.message-listen[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.composer-actions { display: flex; min-width: 0; gap: .4rem; }
.voice-button { position: relative; display: inline-grid; width: 48px; min-width: 48px; min-height: 48px; place-items: center; padding: .65rem; }
.voice-icon-mic { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.voice-icon-stop, .voice-icon-busy { display: none; }
.voice-icon-stop { width: .9rem; height: .9rem; border-radius: .18rem; background: currentColor; }
.voice-icon-busy { width: 1.25rem; height: 1.25rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: voice-spin .8s linear infinite; }
.voice-button[data-voice-state="recording"] .voice-icon-mic, .voice-button[data-voice-state="starting"] .voice-icon-mic, .voice-button[data-voice-state="transcribing"] .voice-icon-mic { display: none; }
.voice-button[data-voice-state="recording"] .voice-icon-stop, .voice-button[data-voice-state="starting"] .voice-icon-busy, .voice-button[data-voice-state="transcribing"] .voice-icon-busy { display: block; }
.voice-button[aria-pressed="true"] { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
@keyframes voice-spin { to { transform: rotate(360deg); } }
.icon-button { display: none; }
.sidebar-scrim { display: none; }
.install-app { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 1rem; z-index: 8; width: max-content; max-width: min(calc(100% - 2rem), 36rem); transform: translateX(-50%); padding: .7rem 1rem; border-radius: 12px; background: var(--text); color: var(--surface); line-height: 1.4; overflow-wrap: anywhere; pointer-events: none; text-align: center; white-space: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .app-view { grid-template-columns: 1fr; }
  .workspace { grid-column: 1; }
  .sidebar { position: fixed; left: 0; width: min(84vw, 310px); transform: translateX(-102%); transition: transform .18s ease; box-shadow: var(--shadow); }
  .sidebar[data-open="true"] { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 3; display: block; border: 0; border-radius: 0; background: rgb(0 0 0 / 30%); }
  .icon-button { display: inline-grid; }
  #open-sidebar, #send-message { min-width: 48px; min-height: 48px; }
  #voice-input { min-width: 48px; min-height: 48px; }
  .theme-label { display: none; }
  .topbar { gap: .35rem; padding: max(.2rem, env(safe-area-inset-top)) .5rem .2rem; }
  .connection-state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .mode-switch button { padding-inline: .55rem; }
  .composer { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .5rem; padding: .6rem .75rem max(.6rem, env(safe-area-inset-bottom)); }
  .composer textarea { grid-column: 1 / -1; grid-row: 1; width: 100%; }
  .composer-tools { position: static; grid-column: 1; grid-row: 2; align-self: end; justify-self: start; }
  .composer-actions { grid-column: 2; grid-row: 2; }
  .composer > .image-preview { grid-column: 1 / -1; grid-row: 3; }
  .search-controls { position: static; align-items: stretch; }
  .search-options { position: absolute; left: .75rem; bottom: calc(100% + .5rem); z-index: 2; width: min(19rem, calc(100vw - 1.5rem)); padding: .55rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
  .search-options label { flex: 1; }
  .search-options select, .search-options input { width: 100%; }
  .image-preview { max-width: 100%; }
  .message-attachments { grid-template-columns: minmax(0, 1fr); }
  .composer-actions { justify-content: flex-end; }
  .message { max-width: 94%; }
  .message[data-role="assistant"] { width: 94%; max-width: 94%; }
  .toast { top: calc(max(56px, env(safe-area-inset-top) + 48px) + .5rem); bottom: auto; max-width: calc(100% - 1rem); }
  .plot-tick { font-size: 24px; }
  .plot-y-tick { font-size: 22px; }
  .plot-axis-label { font-size: 24px; }
  .plot-axis-offset { font-size: 24px; }
  .plot-label-wide { display: none; }
  .plot-label-compact { display: inline; }
  .artifact-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .4rem .7rem; font-size: .92rem; }
  .activity-details { max-height: min(24dvh, 14rem); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } .voice-icon-busy, .composer-icon-busy, .login-spark-dot { animation: none; } }
