/* A quiet transcript, with controls and secondary detail kept out of its reading column. */
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('/fonts/inter-4.1/InterVariable.woff2') format('woff2');
}
@font-face {
	font-family: Inter;
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url('/fonts/inter-4.1/InterVariable-Italic.woff2') format('woff2');
}
:root {
	color-scheme: dark;
	--bg: #101010;
	--sidebar: #171717;
	--surface: #292929;
	--raised: #303030;
	--line: #383838;
	--line-soft: #2a2a2a;
	--text: #ececec;
	--muted: #aaa;
	--faint: #909090;
	--accent: #dedede;
	--error: #f0a5a0;
	--warning: #d8b989;
	--font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--input-font-size: 14px;
	--mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
	--reading-width: 816px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px var(--font); }
body { overflow: hidden; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; border: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, textarea { color: var(--text); font-size: var(--input-font-size); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
::selection { background: #555; color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #454545 transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: var(--muted); border-radius: 50%; flex-shrink: 0; }
.status-dot.offline { background: transparent; border: 1px solid var(--faint); }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.icon-button:hover { color: var(--text); }
button:focus-visible, summary:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }
.icon-button:focus-visible { outline: 1px dotted var(--muted); outline-offset: 2px; }

/* Login is a form, not a landing page. */
.login-screen { height: 100dvh; overflow-y: auto; display: grid; place-items: center; padding: 36px 24px; }
.login-card { width: 352px; max-width: 100%; }
.login-brand { margin-bottom: 44px; font-size: 20px; font-weight: 600; }
.login-brand span { color: var(--muted); font-weight: 400; margin-left: 5px; }
.login-card h1 { font-size: 26px; font-weight: 550; letter-spacing: -.5px; margin: 0 0 12px; }
.login-description { color: var(--muted); line-height: 1.6; margin: 0 0 28px; }
#login-form > label, #code-field label { display: block; margin: 18px 0 8px; font-size: 13px; }
#login-form input:not([type=checkbox]) { width: 100%; height: 46px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0 12px; }
#login-form .remember { display: flex; gap: 9px; align-items: center; color: var(--muted); margin: 20px 0 24px; }
.remember input { accent-color: var(--accent); margin: 0; width: 16px; height: 16px; }
.primary { width: 100%; padding: 13px; border-radius: 8px; background: var(--text); color: var(--bg); font-weight: 600; }
.primary:hover { color: #000; }
.login-reset { display: block; margin: 12px auto 0; padding: 8px; background: transparent; color: var(--muted); font-size: 13px; }
.form-hint { color: var(--faint); font-size: 12px; line-height: 1.6; margin-top: 18px; }
.form-error { color: var(--error); font-size: 13px; line-height: 1.5; }
.form-error:empty { display: none; }

/* Session navigation. */
.app-shell { display: flex; height: 100dvh; }
.sidebar { width: 260px; background: var(--sidebar); display: flex; flex-direction: column; flex-shrink: 0; padding-top: env(safe-area-inset-top); }
.sidebar-brand { height: 68px; padding: 0 22px; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sidebar-brand strong { font-size: 20px; font-weight: 600; }
.sidebar-brand > span { color: var(--muted); }
.search-wrap { margin: 0 12px 26px; padding: 9px 10px; display: flex; align-items: center; gap: 9px; border-radius: 7px; color: var(--faint); }
.search-wrap:hover, .search-wrap:focus-within { color: var(--text); }
input[type=search]:focus::placeholder { color: var(--text); }
.search-wrap svg { width: 16px; height: 16px; }
.search-wrap input { background: transparent; border: 0; min-width: 0; width: 100%; outline: none; }
.session-list { overflow-y: auto; padding: 0 10px 20px; flex: 1; }
.project-group { margin-bottom: 24px; }
.project-heading { display: flex; align-items: center; gap: 8px; margin: 0 10px 7px; font-size: 13px; color: var(--muted); min-width: 0; }
.project-heading svg { width: 16px; height: 16px; }
.project-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-row { display: flex; align-items: center; width: 100%; text-align: left; gap: 10px; padding: 8px 12px 8px 34px; background: transparent; border-radius: 7px; color: var(--muted); margin-bottom: 2px; min-width: 0; }
.session-row:hover, .session-row.active { color: var(--text); }
.session-text { min-width: 0; flex: 1; }
.session-row strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 400; line-height: 20px; }
.sidebar-empty { color: var(--muted); padding: 10px 12px; line-height: 1.65; font-size: 13px; }
.sidebar-bottom { margin-top: auto; padding: 12px 12px max(12px, env(safe-area-inset-bottom)); }
.account-menu { position: relative; }
.account-menu summary { display: flex; align-items: center; gap: 12px; padding: 10px; list-style: none; border-radius: 7px; color: var(--muted); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover { color: var(--text); }
.account-menu strong { display: block; font-size: 13px; font-weight: 400; color: var(--text); }
.account-menu small { display: block; color: var(--faint); font-size: 11px; margin-top: 4px; }
.account-more { margin-left: auto; }
.account-actions { position: absolute; bottom: calc(100% + 8px); left: 0; width: 100%; padding: 6px; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #0004; z-index: 25; }
.account-actions button { width: 100%; text-align: left; padding: 11px 9px; font-size: 13px; background: transparent; color: var(--muted); border-radius: 5px; }
.account-actions button:hover { color: var(--text); }

.session-menu { position: fixed; z-index: 60; min-width: 180px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px #0005; }
.session-menu button { width: 100%; padding: 12px; background: transparent; color: var(--muted); text-align: left; border-radius: 6px; font-size: 13px; }
.session-menu button:hover:not(:disabled) { color: var(--text); }
.rename-dialog { width: min(380px, calc(100% - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--sidebar); color: var(--text); }
.rename-dialog::backdrop { background: #0008; }
.rename-dialog h2 { margin: 0 0 18px; font-size: 16px; font-weight: 500; }
.rename-dialog input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.rename-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.rename-actions button { padding: 11px 14px; background: var(--surface); border-radius: 8px; color: var(--muted); }
.rename-actions button:hover { color: var(--text); }
.rename-actions button[type=submit] { background: var(--text); color: var(--bg); }
.rename-actions button[type=submit]:hover { color: #000; }

/* Header and transcript share a restrained hierarchy. */
.main-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-header { min-height: calc(68px + env(safe-area-inset-top)); display: flex; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 28px 10px; gap: 16px; }
.session-heading { min-width: 0; flex: 1; }
.session-heading h1 { margin: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb { display: flex; gap: 8px; color: var(--faint); font-size: 12px; margin-top: 5px; min-width: 0; }
.breadcrumb > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#host-name:not(:empty)::before { content: '/'; margin-right: 8px; color: #666; }
.connection-banner, .retry-banner { padding: 10px 28px; font-size: 13px; border-bottom: 1px solid var(--line-soft); color: var(--warning); }
.retry-banner summary { line-height: 1.5; }
.retry-banner p { margin: 8px 0 0; color: var(--muted); max-height: 90px; overflow-y: auto; overflow-wrap: anywhere; line-height: 1.5; }
.workspace-body { display: flex; flex: 1; min-height: 0; position: relative; }
.conversation-panel { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.transcript-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; display: flex; flex-direction: column; }
.transcript { width: 100%; max-width: var(--reading-width); padding: 28px 36px 24px; margin: 0 auto; }
.transcript:empty { display: none; }
.empty-state { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 28px; text-align: center; }
.empty-state h2 { font-size: 24px; letter-spacing: -.4px; font-weight: 500; margin: 0 0 12px; }
.empty-state p { max-width: 390px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.message { margin: 0 0 30px; min-width: 0; }
.message.work-group { margin-bottom: 12px; }
.message.intermediate-text { margin-bottom: 8px; }
.message:last-child { margin-bottom: 0; }
.message.user { display: flex; flex-direction: column; align-items: flex-end; margin: 0 0 40px; }
.sent-files { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; max-width: 85%; padding-bottom: 4px; margin-bottom: 8px; }
.sent-file { flex: 0 0 100px; width: 100px; height: 100px; border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.sent-file img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sent-file small { color: var(--faint); padding: 0 10px; font-size: 11px; }
.sent-file span { color: var(--text); padding: 0 10px; font-size: 12px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.message.user .message-body:empty { display: none; }
.message-label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.message-label time { color: var(--faint); font-size: 11px; }
.message-body { line-height: 20px; font-size: 14px; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.message.user .message-body { max-width: 85%; padding: 11px 18px; border-radius: 24px; background: var(--surface); white-space: pre-wrap; }
.message-body p { margin: 0 0 16px; }
.message-body p:last-child { margin-bottom: 0; }
.message-body .markdown + .markdown { margin-top: 16px; }
.message-body h1, .message-body h2, .message-body h3, .message-body h4 { font-size: 16px; line-height: 1.5; margin: 24px 0 12px; font-weight: 600; }
.message-body h1 { font-size: 20px; }
.markdown > :first-child { margin-top: 0; }
.message-body ul, .message-body ol { padding-left: 23px; margin: 14px 0; }
.message-body li { padding-left: 3px; margin: 3px 0; }
.message-body blockquote { border-left: 2px solid #555; margin: 16px 0; padding-left: 16px; color: var(--muted); }
.message-body hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, pre { font-family: var(--mono); font-size: 12px; }
:not(pre) > code { background: var(--raised); color: #dedede; border-radius: 4px; padding: 2px 5px; }
pre { background: var(--sidebar); padding: 16px; border-radius: 8px; overflow: auto; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.message-body table { border-collapse: collapse; display: block; overflow-x: auto; margin: 16px 0; font-size: 13px; }
.message-body td, .message-body th { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.message-body img { display: block; max-width: 100%; max-height: 480px; border-radius: 8px; margin: 12px 0; object-fit: contain; }
.thinking-block, .tool-block { margin: 4px 0; min-width: 0; }
.thinking-block summary, .tool-block summary { min-height: 34px; padding: 5px 0; font-size: 13px; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 9px; }
.thinking-block summary::-webkit-details-marker, .tool-block summary::-webkit-details-marker { display: none; }
.thinking-block summary:hover, .tool-block summary:hover { color: var(--text); }
.thinking-block summary::before, .tool-block summary::before { content: ''; width: 5px; height: 5px; margin: 0 3px; border-right: 1px solid currentColor; border-top: 1px solid currentColor; transform: rotate(45deg); flex-shrink: 0; }
.thinking-block[open] > summary::before, .tool-block[open] > summary::before { transform: rotate(135deg); }
.thinking-content, .tool-content { margin: 5px 0 12px; padding: 4px 0; }
.thinking-content { font-size: 13px; color: var(--muted); }
.tool-name { font: 12px var(--mono); color: #c7c7c7; }
.tool-preview { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px var(--mono); color: var(--faint); flex: 1; }
.tool-status { font-size: 11px; margin-left: auto; white-space: nowrap; color: var(--faint); }
.tool-block summary:hover .tool-name, .tool-block summary:hover .tool-preview { color: var(--text); }
.tool-status.running { color: var(--text); }
.tool-status.error { color: var(--error); }
.tool-content pre { margin: 0 0 10px; font-size: 12px; max-height: 400px; }
.tool-caption { font-size: 12px; color: var(--faint); margin: 8px 0; }
.message-error { color: var(--error); margin-top: 12px; font-size: 13px; }
.message-actions { display: flex; margin: 8px 0 0 -8px; }
.copy-button { width: 32px; height: 32px; }
.copy-button svg { width: 16px; height: 16px; }
.streaming-mark { display: inline-block; width: 6px; height: 6px; margin-top: 12px; border-radius: 50%; background: var(--text); animation: pulse 1.2s ease-in-out infinite; }

/* A single-row capsule that grows only when the message needs more lines. */
.composer-area { position: relative; width: 100%; max-width: var(--reading-width); padding: 8px 36px max(12px, env(safe-area-inset-bottom)); margin: 0 auto; flex-shrink: 0; background: var(--bg); }
.composer-area::before { content: ''; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.jump-latest { position: absolute; top: -42px; left: 50%; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 50%; background: var(--surface); box-shadow: 0 2px 8px #0003; color: var(--text); }
.composer { display: flex; align-items: flex-end; gap: 6px; border: 0; border-radius: 27px; background: #232323; padding: 6px 7px; }
.attach-button { border-radius: 50%; }
.dragging-files .composer { background: #303030; }
.attachments { display: flex; align-items: flex-start; order: -2; flex: 0 0 100%; width: 100%; min-width: 0; gap: 10px; overflow-x: auto; padding: 0 2px 6px; }
.attachment { display: flex; align-items: center; gap: 12px; max-width: 240px; flex-shrink: 0; min-height: 64px; padding: 8px 6px 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: #292929; }
.attachment-label { min-width: 0; font-size: 13px; }
.attachment-label > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-label small { display: block; color: var(--faint); margin-top: 6px; font-size: 11px; }
.image-attachment { position: relative; width: min(112px, 16dvh); height: min(112px, 16dvh); min-height: 0; padding: 0; overflow: hidden; }
.image-attachment img { display: block; width: 100%; height: 100%; object-fit: cover; }
.remove-attachment { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; }
.remove-attachment:hover { color: var(--text); }
.image-attachment .remove-attachment { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; font-size: 18px; background: #171717e6; color: #fff; outline-offset: 1px; }
.composer textarea { display: block; flex: 1; min-width: 0; width: 0; background: transparent; border: 0; outline: none; resize: none; overflow-x: hidden; min-height: 36px; max-height: min(180px, 22dvh); line-height: 1.5; padding: 6px 0; }
.composer textarea::placeholder { white-space: nowrap; }
.composer.multiline { flex-wrap: wrap; padding: 12px 10px 7px; }
.composer.multiline textarea { order: -1; flex-basis: 100%; width: 100%; padding-left: 6px; padding-right: 6px; }
.composer.multiline .composer-toolbar { margin-left: auto; max-width: calc(100% - 48px); }
.composer-toolbar { display: flex; align-items: center; flex-shrink: 0; min-width: 0; max-width: min(55%, calc(100% - 152px)); gap: 8px; }
.model-picker { min-width: 0; max-width: 100%; }
.model-trigger { display: flex; align-items: center; gap: 5px; min-height: 36px; max-width: 100%; border-radius: 20px; background: transparent; padding: 6px 8px; font-size: 13px; }
.model-trigger:hover:not(:disabled), .model-trigger[aria-expanded=true] { color: #fff; }
.model-trigger:hover:not(:disabled) .model-effort, .model-trigger[aria-expanded=true] .model-effort { color: var(--text); }
.model-trigger svg { width: 14px; height: 14px; color: var(--muted); }
.model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.model-effort { color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.model-effort:empty { display: none; }
.model-popover { position: fixed; z-index: 30; display: flex; flex-direction: column; padding: 6px; border: 1px solid #3b3b3b; border-radius: 16px; background: var(--surface); box-shadow: 0 8px 32px #0005; overflow-y: auto; }
.picker-home { flex-shrink: 0; }
.picker-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 10px 12px; background: transparent; color: var(--muted); border-radius: 10px; text-align: left; font-size: 13px; }
.picker-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-row svg { width: 16px; height: 16px; color: var(--muted); }
.picker-effort { font-size: 13px; }
.picker-kind { flex: 1; min-width: 0; }
.picker-effort .picker-value { flex: 0 1 auto; color: var(--muted); }
.picker-row:hover:not(:disabled), .picker-choice:hover:not(:disabled), .picker-choice:focus-visible { color: var(--text); }
.picker-detail { display: flex; flex-direction: column; min-height: 0; }
.picker-navigation { display: flex; align-items: center; gap: 8px; padding: 2px 6px; flex-shrink: 0; }
.picker-title { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.picker-back svg { width: 18px; height: 18px; }
.model-search { flex: 1; min-width: 0; width: 0; margin: 0; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); outline: none; border-radius: 0; background: transparent; }
.model-search:focus { border-bottom-color: var(--muted); }
.picker-choices { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.picker-choices h3 { margin: 14px 12px 6px; font-size: 11px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.picker-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 42px; padding: 10px 12px; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; }
.picker-choice > :first-child { min-width: 0; overflow-wrap: anywhere; }
.picker-choice[aria-pressed=true] { color: #fff; font-weight: 500; }
.picker-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.send-controls { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.send-button { border-radius: 50%; background: var(--text); color: var(--bg); }
.send-button:hover:not(:disabled) { color: #000; }
.send-button:disabled { opacity: 1; background: #3d3d3d; color: #888; }
.stop-button { color: var(--bg); background: var(--text); border-radius: 50%; }
.stop-button:hover:not(:disabled) { color: #000; }
.stop-button path { fill: currentColor; stroke: none; }
.composer-footer { text-align: center; color: var(--faint); font-size: 11px; line-height: 1.5; min-height: 24px; padding: 8px 4px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.queue-indicator { font-size: 13px; color: var(--muted); padding: 0 4px 12px; }
.queue-indicator summary { padding: 4px 0; }
#queue-messages { max-height: 110px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
#queue-messages p { margin: 8px 0; }
.ui-requests { max-height: 32dvh; overflow-y: auto; margin-bottom: 12px; }
.ui-request { border: 1px solid #494949; background: var(--surface); border-radius: 12px; padding: 16px; margin-bottom: 8px; overflow-wrap: anywhere; }
.ui-request:last-child { margin-bottom: 0; }
.ui-request h2 { font-size: 14px; margin: 0 0 10px; font-weight: 500; white-space: pre-wrap; }
.ui-request p { color: var(--muted); font-size: 13px; white-space: pre-wrap; line-height: 1.5; }
.ui-request textarea { width: 100%; resize: vertical; min-height: 48px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: 10px; line-height: 1.5; }
.request-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.request-actions button { padding: 9px 13px; border-radius: 7px; background: #393939; color: var(--text); font-size: 13px; white-space: pre-wrap; max-width: 100%; overflow-wrap: anywhere; }
.request-actions button:hover { color: #fff; }
.request-actions button[type=submit]:hover { color: #000; }
.request-actions button[type=submit] { background: var(--text); color: var(--bg); }
.request-actions .request-cancel { background: transparent; color: var(--muted); }
.request-expiry { display: block; color: var(--muted); margin-top: 10px; font-size: 12px; }
.request-expiry:empty { display: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--raised); color: var(--text); border: 1px solid var(--line); padding: 13px 18px; font-size: 13px; border-radius: 10px; box-shadow: 0 8px 24px #0004; z-index: 100; max-width: calc(100% - 32px); }
.mobile-only { display: none; }
@keyframes pulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
@media (max-width: 1200px) {
	.sidebar { width: 236px; }
	.transcript { padding-left: 28px; padding-right: 28px; }
	.composer-area { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 900px) {
	.sidebar { width: 220px; }
	.composer-toolbar { gap: 4px; }
}
@media (max-width: 720px) {
	.mobile-only { display: grid; }
	.sidebar { position: fixed; width: min(300px, 85vw); top: 0; bottom: 0; left: 0; z-index: 40; transform: translateX(-100%); visibility: hidden; transition: transform .18s, visibility .18s; }
	.sidebar.open { transform: translateX(0); visibility: visible; }
	.sidebar-backdrop { position: fixed; inset: 0; background: #0008; z-index: 35; }
	.chat-header { min-height: calc(64px + env(safe-area-inset-top)); padding-left: 12px; padding-right: 12px; gap: 10px; }
	.session-heading h1 { font-size: 14px; }
	.breadcrumb { font-size: 11px; margin-top: 4px; }
	#host-name { display: none; }
	.transcript { padding: 24px 20px; }
	.message { margin-bottom: 26px; }
	.message.user { margin-bottom: 32px; }
	.message.user .message-body { max-width: 90%; padding: 10px 16px; }
	.sent-files { max-width: 90%; }
	.composer-area { padding: 8px 12px max(8px, env(safe-area-inset-bottom)); }
	.model-trigger { gap: 5px; padding-left: 8px; padding-right: 6px; }
	.model-trigger.has-effort .model-name { display: none; }
	.model-effort { color: var(--text); min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
	.send-controls { gap: 2px; }
	.composer-footer { font-size: 11px; }
	.empty-state h2 { font-size: 22px; }
	.empty-state p { font-size: 14px; }
	.tool-status { font-size: 11px; }
	.ui-request { padding: 14px; }
	.connection-banner, .retry-banner { padding: 10px 20px; font-size: 12px; }
}
@media (pointer: coarse) {
	.icon-button { width: 40px; height: 40px; }
	.model-trigger { min-height: 40px; }
	.session-row { min-height: 40px; }
	.image-attachment .remove-attachment { width: 36px; height: 36px; }
	.composer textarea { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
	.picker-row, .picker-back, .picker-choice { min-height: 44px; }
	.thinking-block summary, .tool-block summary { min-height: 42px; }
}
/* Keep the focus-zoom safeguard on touch WebKit, not every desktop or mobile browser. */
@supports (-webkit-touch-callout: none) {
	@media (pointer: coarse) {
		:root { --input-font-size: 16px; }
	}
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
