:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #0d1017;
  --panel2: #11151e;
  --line: #202633;
  --text: #eef2f8;
  --muted: #8992a3;
  --accent: #ff8b5c;
  --green: #55d89b;
  --explorer-width: 245px;
  --editor-width: 420px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); overflow: hidden; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 18px 0 8px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .16em; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 25%, #202234 0, transparent 37%), var(--bg); }
.login-card { width: min(440px, 100%); padding: 38px; border: 1px solid #292f3e; border-radius: 18px; background: #0f121bee; box-shadow: 0 30px 80px #0009; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg, #ff9c67, #da5e49); color: #1a0b08; font-weight: 800; }
.login-card h1 { margin: 0 0 10px; font-size: 30px; }
.login-card p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.login-card label { display: block; margin: 25px 0 8px; color: #aeb6c5; font-size: 12px; }
.login-card input { width: 100%; padding: 13px; border: 1px solid #30384a; border-radius: 8px; outline: none; background: var(--bg); color: #fff; }
.login-card input:focus, .composer textarea:focus { border-color: var(--accent); }
.login-card button, .composer button { margin-top: 12px; padding: 13px; border: 0; border-radius: 8px; background: var(--accent); color: #1e0c06; font-weight: 750; }
.login-card button { width: 100%; }
.error { min-height: 20px; margin-top: 12px; color: #ff7d7d; font-size: 13px; }

.workspace { height: 100vh; display: grid; grid-template-rows: 48px 1fr; }
.topbar { display: grid; grid-template-columns: 260px minmax(200px, 1fr) 260px; align-items: center; gap: 16px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #0c0f15; }
.wordmark, .status { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.brand-dot, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px #55d89b88; }
.brand-dot { background: var(--accent); }
.muted, .status { color: var(--muted); }
.status { justify-self: end; font-size: 12px; }
.usage-button { padding: 5px 8px; border: 1px solid #394357; border-radius: 6px; background: #171c27; color: #d8dfeb; font-size: 10px; }
.usage-button:hover { border-color: var(--accent); color: #fff; }
.mobile-usage { display: none; }
select { padding: 7px 10px; border: 1px solid #2a3140; border-radius: 6px; outline: none; background: #111620; color: #dbe2ed; }
.repo-picker { width: min(680px, 100%); display: flex; justify-self: center; gap: 7px; }
.repo-picker select { min-width: 0; flex: 1; }
.repo-picker button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #343c4d; border-radius: 6px; background: #171c27; color: #d8dfeb; font-size: 11px; }
.repo-picker button:hover { border-color: var(--accent); color: #fff; }

.panels { min-height: 0; display: grid; grid-template-columns: var(--explorer-width) 5px minmax(340px, 1fr) 5px var(--editor-width); grid-template-rows: minmax(0, 1fr); }
.panels > #explorer { grid-column: 1; grid-row: 1; }
.panels > #explorer-resizer { grid-column: 2; grid-row: 1; }
.panels > #agent { grid-column: 3; grid-row: 1; }
.panels > #agent-resizer { grid-column: 4; grid-row: 1; }
.panels > #editor { grid-column: 5; grid-row: 1; }
@media (min-width: 901px) {
  .panels:not(.editor-open) { grid-template-columns: var(--explorer-width) 5px minmax(340px, 1fr); }
  .panels:not(.editor-open) > #editor,
  .panels:not(.editor-open) > #agent-resizer { display: none; }
}
.panel { min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); }
.panel-resizer { position: relative; z-index: 3; cursor: col-resize; background: #11151d; touch-action: none; }
.panel-resizer::after { content: ""; position: absolute; inset: 0 1px; background: transparent; transition: background .15s; }
.panel-resizer:hover::after, .panel-resizer:active::after { background: var(--accent); }
.panel-title { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); color: #9ba5b5; font-size: 10px; letter-spacing: .12em; }
.studio-heading { padding: 14px 12px 6px; color: var(--muted); font-size: 10px; letter-spacing: .12em; display: flex; justify-content: space-between; align-items: center; }
.studio-heading button { border: 0; color: var(--accent); background: transparent; font-size: 18px; }
.studio-list { display: flex; flex-direction: column; gap: 3px; padding: 4px 8px; max-height: 160px; overflow: auto; }
.studio-list button { text-align: left; padding: 9px 10px; border: 1px solid transparent; border-radius: 7px; color: #b8c4d8; background: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-list button:hover, .studio-list button.selected { background: #1c2533; border-color: #34465f; color: #fff; }
.explorer { display: flex; flex-direction: column; }
.explorer .tree { flex: 1; min-height: 0; height: auto; }
.job-head button { color: var(--accent); background: #17202c; border: 1px solid #34465f; border-radius: 6px; padding: 5px 9px; }
.icon-button, .text-button { border: 0; background: transparent; color: #aab4c3; }
.icon-button { font-size: 18px; }
.text-button { padding: 5px; font-size: 10px; }
.text-button:hover { color: #fff; }
.text-button.danger:hover { color: #ff9393; }
.tree { height: calc(100% - 42px); overflow: auto; padding: 8px 6px; }
.tree.empty { padding: 20px; color: var(--muted); font-size: 13px; }
.file { width: 100%; display: flex; align-items: center; gap: 7px; overflow: hidden; padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; color: #c4ccda; text-align: left; white-space: nowrap; text-overflow: ellipsis; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.file:hover, .file.active { background: #1b2130; color: #fff; }
.file span:first-child { color: #77859a; }

.editor { display: grid; grid-template-rows: auto minmax(0, 1fr) 28px; background: #0b0e14; }
.editor-head { min-height: 64px; gap: 8px; flex-wrap: wrap; padding-top: 8px !important; padding-bottom: 8px !important; }
.editor-head, .editor-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); color: #adb6c5; font-size: 12px; }
.editor-head button { padding: 5px 9px; border: 1px solid #343c4d; border-radius: 6px; background: #171c27; color: #d8dfeb; }
.editor-head button:disabled { opacity: .35; cursor: default; }
.editor-head #self-update { border-color: #477d65; background: #173126; color: #8ce9b7; }
.editor-actions { display: flex; gap: 6px; }
.editor-actions #close-file { min-width: 28px; font-size: 16px; line-height: 1; }
.changes-count { margin-left: 7px; padding: 2px 5px; border-radius: 5px; background: #4a2d1d; color: #ffc28f; font-size: 9px; }
kbd { color: #737e90; font-size: 10px; }
.dirty { margin-left: 6px; color: var(--accent); }
.editor textarea { resize: none; padding: 18px; border: 0; outline: 0; background: #0b0e14; color: #d9e1ed; white-space: pre; tab-size: 2; cursor: text; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; }
.editor-foot { border-top: 1px solid var(--line); border-bottom: 0; color: #6f7888; font-size: 10px; }
.send-hint { display: block; margin-top: 3px; color: #687386; font-size: 9px; }

.agent-panel { position: relative; display: grid; grid-template-rows: minmax(68px, auto) minmax(0, 1fr) auto; border: 0; background: var(--panel2); }
.scroll-latest { position: absolute; z-index: 4; left: 50%; bottom: calc(var(--composer-height, 100px) + 12px); transform: translateX(-50%); width: 44px; height: 44px; border: 1px solid #555; border-radius: 50%; background: #303030; color: #fff; box-shadow: 0 3px 12px #0004; font-size: 24px; }
.scroll-latest:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.jobs { overflow-anchor: none; scrollbar-width: thin; scrollbar-color: #555 transparent; -webkit-overflow-scrolling: touch; }
.agent-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.agent-head .eyebrow { margin: 0 0 2px; font-size: 8px; }
.agent-head h2 { margin: 0; font-size: 19px; }
.agent-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.agent-actions #session-select { max-width: 145px; }
.agent-actions button:disabled { opacity: .35; cursor: default; }
.agent-head select { max-width: 220px; font-size: 11px; }
.jobs { overflow: auto; padding: 14px; }
.welcome { padding: 18vh 24px; color: var(--muted); text-align: center; }
.welcome span { color: var(--accent); font-size: 38px; }
.welcome h3 { margin: 12px 0 6px; color: #e8edf5; }
.welcome p { font-size: 13px; line-height: 1.5; }
.message { max-width: 94%; margin: 0 0 12px; overflow: hidden; border: 1px solid #232a38; border-radius: 10px; }
.message.user { margin-left: auto; border-color: #2b405f; background: #172030; }
.message.assistant { margin-right: auto; background: #0c1018; }
.message-head { padding: 7px 10px; border-bottom: 1px solid #273044; color: #94a2b6; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.message-content { padding: 11px; color: #d2dae6; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.55; }
.message-content { padding: 16px; font-size: 14px; line-height: 1.7; }
.message-content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #080d16; color: #c7dbf5; padding: 2px 5px; border-radius: 4px; }
.code-block { margin: 12px 0; border: 1px solid #30405a; border-radius: 9px; overflow: hidden; white-space: normal; }
.code-block-head { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; background: #192333; color: #a6b8d1; font: 12px ui-monospace, monospace; }
.code-block-head button { background: transparent; border: 1px solid #465770; border-radius: 5px; color: #dce7f5; padding: 4px 8px; }
.code-block pre { margin: 0; padding: 14px; background: #080d16; overflow-x: auto; white-space: pre; }
.code-block pre code { padding: 0; font-size: 12px; }
.task-title { margin: 0; padding: 10px 12px; font-size: 12px; font-weight: 500; color: #d0dcf0; overflow-wrap: anywhere; }
.editor-actions { flex-wrap: wrap; justify-content: flex-end; }
.citation-link { display: inline; padding: 0; border: 0; background: transparent; color: #8db9ff; text-decoration: underline; font: inherit; }
.citation-link:hover { color: #c5ddff; }
.job { max-width: 94%; margin-bottom: 12px; overflow: hidden; border: 1px solid #232a38; border-radius: 10px; background: #0c1018; }
.job-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border-bottom: 1px solid #202633; }
.badge { padding: 4px 6px; border-radius: 5px; background: #4a2d1d; color: #ffc28f; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.badge.failed, .badge.cancelled { background: #451f25; color: #ff9393; }
.job-output { max-height: 320px; overflow: auto; padding: 11px; background: #080b10; color: #b9c5d6; white-space: pre-wrap; word-break: break-word; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cancel { border: 0; background: transparent; color: #ff9d88; font-size: 11px; }
.composer { padding: 12px; border-top: 1px solid var(--line); background: #0e121a; }
.composer textarea { width: 100%; min-height: 62px; max-height: 40vh; resize: vertical; padding: 11px; border: 1px solid #2b3342; border-radius: 9px; outline: none; background: #090c12; color: #fff; line-height: 1.45; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-row > span { color: #737d8f; font-size: 10px; }
.composer button { width: auto; margin: 8px 0 0; padding: 8px 12px; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: #05070bcc; backdrop-filter: blur(5px); }
.dialog-card { width: min(620px, 100%); max-height: 90vh; overflow: auto; padding: 22px; border: 1px solid #30394a; border-radius: 14px; background: #111620; box-shadow: 0 24px 80px #000b; }
.dialog-card h2 { margin: 0 0 14px; }
.dialog-card .eyebrow { margin-top: 0; }
.dialog-card ol { padding-left: 22px; color: #c8d0dd; font-size: 13px; line-height: 1.55; }
.dialog-card li + li { margin-top: 8px; }
.dialog-card textarea { width: 100%; resize: vertical; padding: 11px; border: 1px solid #30394a; border-radius: 8px; background: #090c12; color: #fff; line-height: 1.45; }
.dialog-card label { display: block; margin: 13px 0 6px; color: #aeb6c5; font-size: 11px; }.manual-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }.manual-tools button, .manual-tools a { padding: 7px 10px; border: 0; border-radius: 6px; background: #242b38; color: #d8dfeb; text-decoration: none; font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.dialog-actions button { padding: 9px 12px; border: 0; border-radius: 7px; background: var(--accent); color: #1e0c06; font-weight: 700; }
.dialog-actions .secondary { background: #242b38; color: #d8dfeb; }
.privacy-note { padding: 12px; border: 1px solid #5a4227; border-radius: 8px; background: #2b2217; color: #e5c99e; font-size: 12px; line-height: 1.5; }
.usage-dialog-card { width: min(780px, 100%); }
.usage-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.usage-title-row h2 { margin-bottom: 3px; }
.usage-title-row > button { padding: 7px 10px; border: 0; border-radius: 6px; background: #242b38; color: #d8dfeb; }
.usage-updated { margin: 0; color: var(--muted); font-size: 11px; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.usage-card { min-width: 0; padding: 13px; border: 1px solid #2b3342; border-radius: 10px; background: #0b0f16; }
.usage-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.usage-card h3 { margin: 0; font-size: 14px; }
.usage-state { padding: 3px 6px; border-radius: 10px; background: #253329; color: #8ce9b7; font-size: 9px; text-transform: uppercase; }
.usage-state.manual, .usage-state.unavailable { background: #382d20; color: #efc58e; }
.usage-detail { min-height: 32px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.usage-window { margin-top: 11px; }
.usage-window-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: #b7c0ce; font-size: 10px; }
.usage-track { height: 6px; overflow: hidden; border-radius: 9px; background: #242b37; }
.usage-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #55d89b, #f0b45e); }
.usage-reset { margin-top: 4px; color: #707b8d; font-size: 9px; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 30; padding: 10px 14px; border: 1px solid #394357; border-radius: 8px; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .2s; background: #1d2431; color: #fff; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-tabs { display: none; }
.mobile-tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.message-actions { display: flex; gap: 4px; padding: 6px 10px; }
.message-actions button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #8992a3; }
.message-actions button:hover { background: #8881; }
.message-actions svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.message-content p { margin: 0 0 1.25em; }
.message-content p:last-child { margin-bottom: 0; }
.message-content hr { border: 0; border-top: 1px solid #8884; margin: 1.6em 0; }
.message-content h2, .message-content h3, .message-content h4 { font-size: 1.1em; line-height: 1.4; margin: 1.2em 0 .6em; }
.message-content ul, .message-content ol { padding-left: 1.5em; margin: .6em 0 1.2em; }
.message-content li + li { margin-top: .5em; }
.source-link { display: inline-block; max-width: 100%; padding: 2px 9px; border-radius: 18px; background: #8882; color: inherit; font-size: .8em; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.message-meta { padding: 6px 16px 10px; color: #8992a3; font-size: 11px; line-height: 1.5; }
.message.user .message-meta { text-align: right; }
.message-usage { margin: 0 16px 10px; color: #8992a3; font-size: 11px; line-height: 1.5; }
.message-usage summary { cursor: pointer; padding: 8px 0; }
.message-usage p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.context-info { color: var(--muted); font-size: 10px; }
.terminal-transcript { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.verification-summary { margin: 0; padding: 0 16px 14px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.job-logs { padding: 0 16px 14px; }
.job-logs summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; }
.job-logs pre, #operation-log { max-height: 55vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.repair-button { margin: 0 16px 16px; padding: 12px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); color: var(--text); }
.chat-usage { font-size: 13px; color: var(--muted); }
.chat-usage summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.chat-usage p { max-width: 360px; white-space: pre-wrap; line-height: 1.6; }
@media (max-width: 900px) {
  .verification-summary, .job-logs, .chat-usage { color: #555; }
  .repair-button { background: #eee; color: #222; }
  .chat-usage { flex-basis: 100%; padding: 0 10px; font-size: 14px; }
  .operation-card { background: #fff; color: #222; border-radius: 20px; }
  .operation-card .dialog-actions button { min-height: 48px; background: #111; color: #fff; }
}
.terminal-live { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; background: #111318; color: #e9edf3; color-scheme: dark; }
.terminal-live-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #30343d; }
.terminal-live button { min-height: 44px; padding: 8px 12px; border: 1px solid #39404b; border-radius: 10px; background: #202630; color: #e9edf3; font-size: 15px; }
.terminal-live button:disabled { opacity: .45; }
.terminal-live button:focus-visible { outline: 2px solid #99bfff; outline-offset: 2px; }
.terminal-live-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 8px 16px; color: #b4bdcb; font-size: 13px; }
#terminal-live-directory { overflow-wrap: anywhere; }
#terminal-screen { min-width: 0; min-height: 0; padding: 8px 12px; overflow: hidden; }
.terminal-keys { display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; border-top: 1px solid #30343d; }
.terminal-keys button { flex-shrink: 0; }
#terminal-ctrl[aria-pressed="true"] { background: #34557b; }
@media (max-width: 900px) {
  .terminal-live { inset: auto 0 auto; top: var(--mobile-top, 0px); height: var(--mobile-height, 100dvh); padding-top: env(safe-area-inset-top); }
  .terminal-live-head { gap: 6px; padding: 6px 8px; }
  .terminal-live-head strong { font-size: 18px; }
  .terminal-live-info { padding: 8px 12px; }
  #terminal-screen { padding: 6px 8px; }
  .terminal-keys { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) {
  .message-meta { padding: 4px 0 0; color: #777; font-size: 12px; }
  .message.user .message-meta { padding: 0 18px 10px; }
  .message-usage { margin: 0; color: #777; font-size: 12px; }
  .message-usage summary { min-height: 44px; display: flex; align-items: center; }
  .message-usage summary::after { content: "⌄"; margin-left: 6px; }
  #context-info { flex-basis: 100%; padding: 6px 10px; color: #777; font-size: 11px; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .workspace { height: 100dvh; grid-template-rows: 48px 43px 1fr; }
  .topbar { grid-template-columns: 1fr auto; padding: 0 10px; }
  .topbar .muted, .status { display: none; }
  .repo-picker { grid-column: 2; width: min(250px, 62vw); }
  .repo-picker button { padding: 7px; font-size: 0; }
  #new-project::after { content: "+"; font-size: 15px; }
  #publish-project::after { content: "GH"; font-size: 10px; }
  #github-update::after { content: "Check"; font-size: 10px; }
  .mobile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #0c0f15; }
  .mobile-tabs button { border: 0; background: transparent; color: var(--muted); font-size: 12px; }
  .mobile-tabs button.active { border-bottom: 2px solid var(--accent); color: #fff; }
  .panels { display: block; min-height: 0; }
  .panel-resizer { display: none; }
  .panel { display: none; height: calc(100dvh - 91px); border: 0; }
  .panel.mobile-active, .agent-panel.mobile-active { display: grid; }
  .explorer.mobile-active { display: flex; }
  .welcome { padding-top: 14vh; }
  .agent-head { min-height: 68px; padding: 7px 10px; }
  .agent-head .eyebrow, .agent-actions #help-open, .agent-actions #import-open { display: none; }
  .agent-head h2 { font-size: 17px; }
  .agent-actions .danger { display: none; }
  .agent-actions .text-button { display: inline-block; }
  .agent-actions .mobile-usage { display: inline-block; }
  .agent-head select { max-width: 210px; }
  .jobs { padding: 16px 12px; }
  .message, .job { max-width: 96%; }
  .composer { position: relative; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 0; background: #11151e; }
  .composer textarea { min-height: 50px; padding: 14px 52px 13px 16px; border-radius: 25px; resize: none; background: #202633; }
  .composer-row { position: absolute; right: 20px; bottom: calc(17px + env(safe-area-inset-bottom)); }
  .composer-row > span { display: none; }
  .composer button { width: 32px; height: 32px; margin: 0; padding: 0; border-radius: 50%; font-size: 0; }
  .composer button span { font-size: 18px; line-height: 1; }
  .dialog-card { padding: 17px; }
  .usage-grid { grid-template-columns: 1fr; }
}

.session-controls { padding: 0 10px 8px; }
.session-controls #session-select, .session-controls #new-session { display: none; }
#review-tools { padding: 12px; border-bottom: 1px solid var(--line); max-height: 220px; overflow: auto; }
#review-tools select { max-width: 100%; margin-top: 6px; }
#review-summary { white-space: pre-wrap; font-size: 12px; line-height: 1.5; }
.editor:has(#review-tools:not(.hidden)) { grid-template-rows: auto auto minmax(0, 1fr) 28px; }
.badge.rejected { color: #b5bbc5; }
#reject-change { padding: 7px 10px; border: 1px solid #71464b; border-radius: 6px; background: #291b20; color: #f0bbc1; cursor: pointer; }
#reject-change:disabled { opacity: .45; cursor: default; }

.mobile-only { display: none; }
#drawer-backdrop { position: fixed; inset: 0; z-index: 30; border: 0; background: #0009; }
@media (max-width: 900px) {
  body { overflow: hidden; }
  .workspace { height: var(--mobile-height, 100dvh); grid-template-rows: calc(48px + env(safe-area-inset-top)) minmax(0, 1fr); }
  .topbar { display: none; }
  .mobile-tabs { grid-template-columns: 1fr 1fr 1fr 44px; padding-top: env(safe-area-inset-top); }
  .mobile-tabs button { min-height: 44px; }
  .panel { height: 100%; }
  .explorer.mobile-active { position: fixed; inset: 0 auto 0 0; width: min(87vw, 360px); height: var(--mobile-height, 100dvh); z-index: 40; padding-top: env(safe-area-inset-top); box-shadow: 12px 0 30px #0008; overflow-y: auto; }
  .mobile-only { display: block; padding: 10px; }
  #mobile-menu-close { border: 0; background: transparent; color: var(--text); text-align: right; min-height: 44px; }
  #chat-search { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); background: #171c27; color: #fff; border-radius: 8px; font-size: 16px; }
  #mobile-project-tools .repo-picker { display: flex; flex-wrap: wrap; width: auto; padding: 10px; gap: 8px; }
  #mobile-project-tools select { width: 100%; flex-basis: 100%; }
  #mobile-project-tools button { font-size: 12px; min-height: 44px; }
  #mobile-project-tools button::after { content: none; }
  .agent-head { min-height: 50px; }
  .agent-head h2, .agent-head .eyebrow { display: none; }
  .agent-actions { width: 100%; justify-content: space-between; }
  #mode { max-width: calc(100vw - 100px); min-height: 44px; font-size: 16px; }
  .composer textarea { font-size: 16px; max-height: 25vh; }
  .composer button { width: 44px; height: 44px; }
  .composer-row { bottom: calc(12px + env(safe-area-inset-bottom)); right: 16px; }
  .jobs { overscroll-behavior: contain; }
  .message.assistant { max-width: 100%; }
  .editor-head button { min-height: 44px; }
  #review-tools { max-height: 28vh; }
}

@media (max-width: 900px) {
  .workspace { --accent: #f4f4f4; --text: #ececec; --muted: #a6a6a6; --line: #333; background: #212121; grid-template-rows: calc(56px + env(safe-area-inset-top)) minmax(0, 1fr); }
  .mobile-tabs { grid-template-columns: 48px minmax(0, 1fr) 44px 44px; align-items: center; gap: 2px; padding-left: 8px; padding-right: 8px; border: 0; background: #212121; }
  .mobile-tabs button { display: grid; place-items: center; min-height: 44px; border-radius: 12px; color: #ececec; }
  .mobile-tabs button.active { border: 0; background: #383838; }
  .mobile-tabs button:focus-visible, .composer button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  #mobile-model-picker { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-left: 6px; }
  .mobile-brand { font-size: 17px; font-weight: 650; line-height: 22px; }
  #mobile-model-picker #mode { max-width: 100%; width: auto; min-height: 24px; padding: 0 18px 0 0; border: 0; background: transparent; color: #b4b4b4; font-size: 12px; }
  .agent-panel { grid-template-rows: minmax(0, 1fr) auto; background: #212121; }
  .agent-head { display: none; }
  .jobs { padding: 24px 18px 12px; scroll-padding-bottom: 16px; }
  .jobs { scrollbar-width: none; touch-action: pan-y; }
  .message { margin-bottom: 26px; border: 0; overflow: visible; }
  .message.user { width: fit-content; max-width: 85%; border: 0; border-radius: 24px; background: #303030; }
  .message.user .message-head { display: none; }
  .message.user .message-content { padding: 12px 18px; }
  .message.assistant { width: 100%; max-width: 100%; border: 0; background: transparent; }
  .message.assistant .message-head { padding: 0 0 8px; border: 0; font-size: 10px; letter-spacing: 0; text-transform: none; color: #a6a6a6; }
  .message.assistant .message-content { padding: 0; }
  .message-content { color: #ececec; font-size: 16px; line-height: 1.65; }
  .message-content code { background: #303030; color: #ececec; }
  .code-block { max-width: 100%; border-color: #444; }
  .code-block-head { background: #303030; color: #ccc; }
  .code-block pre { background: #171717; }
  .job { max-width: 100%; border-color: #414141; background: #262626; }
  .job-head { flex-wrap: wrap; gap: 10px; border-color: #414141; }
  .job-head button { min-height: 44px; color: #ececec; background: #333; border-color: #555; }
  .welcome { display: flex; flex-direction: column; justify-content: center; min-height: 100%; padding: 24px 12px; }
  .welcome span { color: #ececec; }
  .welcome h3 { color: #ececec; font-size: 27px; font-weight: 600; }
  .welcome p { max-width: 270px; margin: 6px auto; color: #a6a6a6; font-size: 14px; }
  .composer { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); background: #212121; }
  .composer textarea { display: block; min-height: 58px; max-height: 25vh; padding: 17px 62px 17px 20px; border: 1px solid #444; border-radius: 29px; background: #303030; color: #ececec; line-height: 24px; overflow-y: auto; }
  .composer textarea::placeholder { color: #b4b4b4; }
  .composer textarea:focus { border-color: #737373; }
  .composer-row { right: 20px; bottom: calc(19px + env(safe-area-inset-bottom)); }
  .composer button { width: 44px; height: 44px; background: #f4f4f4; color: #171717; }
  .composer button span { font-size: 25px; }
  .composer button:disabled { opacity: .4; }
  .explorer.mobile-active { width: min(88vw, 360px); background: #171717; box-shadow: 12px 0 30px #0006; }
  #mobile-menu-close { font-size: 14px; }
  #chat-search { border: 0; border-radius: 22px; padding: 12px 16px; background: #262626; }
  .studio-list { max-height: none; flex-shrink: 0; }
  .studio-list button { min-height: 46px; color: #ececec; font-size: 14px; border-radius: 12px; }
  .studio-list button:hover, .studio-list button.selected { background: #303030; border-color: transparent; }
  .studio-heading { padding-top: 20px; font-size: 11px; letter-spacing: .04em; }
  #mobile-chat-tools .agent-actions { padding: 0 10px 8px; justify-content: flex-start; gap: 6px; }
  #mobile-chat-tools .agent-actions button { display: inline-block; min-height: 44px; padding: 8px 10px; border-radius: 10px; background: #262626; color: #ddd; font-size: 12px; }
  #mobile-project-tools .repo-picker button, #mobile-project-tools select { background: #262626; border-color: #414141; color: #ececec; border-radius: 10px; }
  .session-controls { padding-bottom: 0; }
  .session-controls button { min-height: 44px; font-size: 12px; }
  .mobile-tools { padding: 8px 0; }
  .mobile-tools summary { padding: 14px 12px; min-height: 44px; color: #ccc; font-size: 14px; cursor: pointer; }
}

/* Mobile conversation surface, based on the supplied light-mode reference. */
@media (max-width: 900px) {
  body { background: #fff; }
  .workspace { position: fixed; top: var(--mobile-top, 0px); left: 0; right: 0; --mobile-safe-bottom: env(safe-area-inset-bottom); color-scheme: light; --accent: #111; --text: #161616; --muted: #777; --line: #e9e9e9; background: #fff; grid-template-rows: minmax(0, 1fr); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
  .workspace.keyboard-open { --mobile-safe-bottom: 0px; }
  .mobile-tabs { position: absolute; z-index: 8; top: calc(12px + env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; height: 46px; padding: 0; background: transparent; pointer-events: none; }
  .mobile-tabs::before { content: ""; position: absolute; z-index: -1; left: -16px; right: -16px; top: calc(-12px - env(safe-area-inset-top)); height: calc(88px + env(safe-area-inset-top)); background: linear-gradient(#fff 5%, #fffffff0 35%, transparent); pointer-events: none; }
  .mobile-tabs > button, .mobile-top-actions, .mobile-toolbar-menu { pointer-events: auto; }
  .mobile-tabs > button, .mobile-top-actions { border: 1px solid #ffffffb3; border-radius: 26px; background: #ffffffdf; box-shadow: 0 5px 24px #0000000b; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .mobile-tabs button { min-width: 44px; color: #161616; border-radius: 24px; background: transparent; }
  .mobile-tabs > button { width: 46px; height: 46px; }
  .mobile-tabs button.active { background: #eee; }
  .mobile-top-actions { display: flex; align-items: center; padding: 0 5px; gap: 4px; height: 46px; }
  #mobile-more { font-size: 21px; letter-spacing: 2px; }
  .mobile-toolbar-menu { position: absolute; top: 58px; right: 0; width: min(300px, calc(100vw - 32px)); padding: 14px; border: 1px solid #e7e7e7; border-radius: 20px; background: #fffffff5; box-shadow: 0 10px 40px #0002; }
  #mobile-model-picker { padding: 0 0 10px; gap: 8px; }
  .mobile-brand { font-size: 12px; color: #777; font-weight: 500; }
  #mobile-model-picker #mode { min-height: 44px; width: 100%; padding: 8px 12px; border: 1px solid #e6e6e6; border-radius: 12px; background: #f6f6f6; color: #222; font-size: 16px; }
  .mobile-toolbar-menu button { display: block; width: 100%; padding: 12px; min-height: 44px; text-align: left; font-size: 14px; }
  .agent-panel { grid-template-rows: minmax(0, 1fr); background: #fff; }
  .editor { padding-top: calc(76px + env(safe-area-inset-top)); }
  .jobs { padding: calc(86px + env(safe-area-inset-top)) 16px calc(var(--composer-height, 100px) + 20px); scroll-padding-top: 80px; scroll-padding-bottom: 110px; }
  .message { margin-bottom: 32px; }
  .message.user { max-width: 88%; background: #f3f3f3; border-radius: 24px; }
  .message.user .message-content { padding: 12px 18px; }
  .message.assistant .message-head { display: none; }
  .message-content { color: #111; font-size: 22px; font-weight: 400; line-height: 1.6; letter-spacing: normal; }
  .message-content strong { font-weight: 600; }
  .message-content p { white-space: pre-wrap; margin-bottom: 1.4em; }
  .message-content code { background: #f3f3f3; color: #242424; }
  .message-actions { padding: 14px 0 0; gap: 2px; }
  .message-actions button { color: #676767; }
  .source-link { color: #666; background: #f5f5f5; font-size: 12px; padding: 3px 10px; }
  .code-block { border-color: #e5e5e5; }
  .code-block-head { background: #f6f6f6; color: #555; }
  .code-block-head button { border-color: #ddd; color: #333; }
  .code-block pre, .code-block pre code { background: #f9f9f9; color: #252525; }
  .composer { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 24px calc(18px + var(--mobile-safe-bottom)); background: linear-gradient(transparent, #fffffff5 25%, #fff); }
  .composer textarea { max-height: calc(var(--mobile-height, 100dvh) * .25); }
  .composer textarea { min-height: 60px; padding: 16px 58px 16px 48px; border: 1px solid #eee; border-radius: 30px; background: #fff; color: #222; box-shadow: 0 6px 32px #00000010; font-size: 19px; line-height: 28px; }
  .composer textarea::placeholder { color: #909090; }
  .composer textarea:focus { border-color: #ddd; }
  .composer-row { right: 31px; bottom: calc(25px + var(--mobile-safe-bottom)); }
  .composer button { width: 44px; height: 44px; background: #111; color: #fff; }
  .composer .composer-options { display: grid; place-items: center; position: absolute; left: 28px; bottom: calc(25px + var(--mobile-safe-bottom)); z-index: 2; width: 44px; height: 44px; margin: 0; padding: 0; background: transparent; color: #111; font-size: 29px; font-weight: 400; }
  .scroll-latest { background: #fff; border-color: #ddd; color: #222; box-shadow: 0 3px 14px #0001; }
  .welcome h3, .welcome span { color: #222; }
  .welcome p { color: #888; }
  .explorer.mobile-active { top: var(--mobile-top, 0px); bottom: auto; background: #f9f9f9; box-shadow: 12px 0 30px #0002; }
  #chat-search { background: #eee; color: #222; }
  .studio-list button { color: #333; }
  .studio-list button:hover, .studio-list button.selected { background: #eaeaea; }
  #mobile-chat-tools .agent-actions button, #mobile-project-tools .repo-picker button, #mobile-project-tools select { background: #eee; color: #333; border-color: #ddd; }
  .mobile-tools summary, .session-controls button, .file { color: #555; }
  .file:hover, .file.active { background: #eaeaea; color: #222; }
  .job { background: #fafafa; border-color: #e4e4e4; }
  .job-head { border-color: #e4e4e4; }
  .job-head button { background: #eee; color: #333; border-color: #ddd; }
  .job-output { background: #f7f7f7; color: #444; }
  .mobile-tabs button:focus-visible, .composer button:focus-visible, .scroll-latest:focus-visible { outline-color: #555; }
}

/* Keep mobile reading and controls at one consistent, accessible scale. */
@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .panels, .panel, .jobs, .message-content { min-width: 0; }
  .mobile-tabs, .mobile-top-actions { height: 56px; }
  .mobile-tabs > button { width: 56px; height: 56px; }
  .mobile-tabs button { min-width: 52px; min-height: 52px; }
  .mobile-tabs svg { width: 28px; height: 28px; }
  #mobile-more { font-size: 26px; }
  .mobile-toolbar-menu { top: 68px; }
  .mobile-toolbar-menu button, .mobile-tools summary { font-size: 17px; }
  .jobs { padding-top: calc(96px + env(safe-area-inset-top)); padding-left: 20px; padding-right: 20px; }
  .message { margin-bottom: 24px; }
  .message.user { border-radius: 26px; background: #f2f2f2; }
  .message.user .message-content { padding: 14px 18px 8px; }
  .message-content p { margin-bottom: 1.1em; }
  .message-content code { font-size: .9em; overflow-wrap: anywhere; }
  .message-actions { gap: 8px; padding-top: 10px; }
  .message-actions button { width: 48px; height: 48px; color: #555; }
  .message-actions svg { width: 27px; height: 27px; stroke-width: 1.7; }
  .message-meta, .message-usage { font-size: 14px; color: #686868; }
  .message.user .message-meta { padding: 0 18px 12px; }
  .source-link { font-size: 15px; padding: 5px 12px; }
  .code-block { border-radius: 14px; }
  .code-block-head { font-size: 14px; padding: 10px 14px; }
  .code-block-head button { min-height: 44px; font-size: 14px; }
  .code-block pre { padding: 16px; font-size: 16px; line-height: 1.6; }
  .code-block pre code { font-size: inherit; }
  .composer { padding: 16px 16px calc(16px + var(--mobile-safe-bottom)); }
  .composer textarea { min-height: 72px; padding: 20px 64px 20px 56px; border-radius: 36px; font-size: 20px; line-height: 30px; border-color: #e8e8e8; box-shadow: 0 4px 24px #0000000b; }
  .composer textarea::placeholder { color: #737373; }
  .composer-row { right: 26px; bottom: calc(26px + var(--mobile-safe-bottom)); }
  .composer button { width: 52px; height: 52px; }
  .composer button span { font-size: 30px; }
  .composer .composer-options { left: 20px; bottom: calc(26px + var(--mobile-safe-bottom)); width: 52px; height: 52px; font-size: 34px; }
  .job { border-radius: 18px; background: #fafafa; box-shadow: none; }
  .job-head { padding: 14px 16px; border-bottom: 0; gap: 12px; }
  .badge { padding: 5px 10px; border-radius: 8px; font-size: 14px; letter-spacing: 0; text-transform: none; background: #eee; color: #454545; }
  .badge.failed { background: #fff0ef; color: #a53128; }
  .badge.cancelled, .badge.rejected { background: #eee; color: #555; }
  .job-output { padding: 0 16px 16px; background: transparent; color: #555; font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
  .job-head button { font-size: 15px; border-radius: 10px; }
  .studio-list button, .file, .session-controls button { font-size: 16px; min-height: 48px; }
  .studio-heading, .panel-title, .mobile-brand, #context-info { font-size: 14px; }
  #mobile-chat-tools .agent-actions button, #mobile-project-tools .repo-picker button, #mobile-project-tools select { font-size: 16px; }
  .welcome p { font-size: 17px; line-height: 1.6; color: #666; }
  .explorer.mobile-active { width: min(88vw, 390px); color: #222; }
  .explorer > label { color: #555; font-size: 16px; }
  .studio-list button.selected, .studio-list button:hover { color: #222; border-color: #e3e3e3; }
  #mobile-menu-close { color: #444; font-size: 16px; padding: 12px 16px; }
  #mobile-project-tools .repo-picker { padding: 12px; gap: 10px; }
  #mobile-chat-tools .agent-actions { padding: 0 12px 12px; gap: 10px; justify-content: flex-start; }
  #mobile-chat-tools .agent-actions button { padding: 12px 14px; border-radius: 12px; min-height: 48px; }
  .mobile-tools { padding: 12px 0; }
  .mobile-tools > summary { padding: 8px 16px; color: #444; }
  #mobile-version { flex-basis: 100%; color: #555; font-size: 13px; padding: 8px 0; }
  .terminal-transcript { font-size: 16px; }
  #mobile-chat-tools button:disabled, #mobile-project-tools button:disabled { opacity: .45; cursor: default; }
  .terminal-card { background: #fff; color: #222; border-color: #ddd; border-radius: 22px; }
  .terminal-card p { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
  .terminal-card label { color: #555; font-size: 15px; }
  .terminal-card textarea, .terminal-card select { background: #f5f5f5; color: #222; border-color: #ddd; font-size: 16px; }
  .terminal-card .dialog-actions { flex-wrap: wrap; }
  .terminal-card .dialog-actions button { min-height: 48px; font-size: 16px; background: #111; color: #fff; }
}

/* Shared attachment controls keep the keyboard composer at its existing position. */
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-list:empty { display: none; }
.attachment-chip { display: inline-block; max-width: 100%; margin: 8px 6px 0 0; padding: 8px 12px; border: 1px solid #d9dde4; border-radius: 12px; background: #f3f5f8; color: #343b48; font-size: 14px; overflow-wrap: anywhere; }
.composer #attach-file { width: 44px; height: 44px; margin: 0 0 8px; background: transparent; color: inherit; border: 1px solid #d9dde4; font-size: 26px; border-radius: 12px; }
.composer .attachment-chip { width: auto; height: auto; font-size: 14px; border-radius: 12px; padding: 8px 12px; background: #f3f5f8; color: #343b48; }
.chat-search-label { display: block; padding: 12px; font-size: 12px; color: var(--muted); }
.chat-search-label input { width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); }
@media (max-width: 900px) {
  html, body { touch-action: manipulation; }
  .jobs { touch-action: pan-y pinch-zoom; }
  button, select, input, textarea, summary, a { touch-action: manipulation; }
  button { -webkit-user-select: none; user-select: none; }
  .desktop-only { display: none; }
  .composer #attach-file { position: absolute; left: 18px; bottom: calc(26px + var(--mobile-safe-bottom)); width: 48px; height: 48px; margin: 0; border: 0; color: #222; font-size: 30px; }
  .composer #attach-file { display: none; }
  .attachment-list { padding-bottom: 12px; }
}
@media (min-width: 901px) {
  .workspace { color-scheme: light; --bg: #f5f6f8; --panel: #f5f6f8; --panel2: #fff; --line: #e2e5eb; --text: #202631; --muted: #697383; --accent: #365ee8; --explorer-width: 264px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; grid-template-rows: 64px minmax(0, 1fr); background: #fff; }
  .topbar { grid-template-columns: 180px minmax(200px, 1fr) auto; background: #fff; padding: 0 24px; }
  .wordmark { font-size: 18px; letter-spacing: -.5px; }
  .brand-dot { box-shadow: none; width: 10px; height: 10px; }
  .repo-picker { max-width: 760px; }
  .repo-picker button, .usage-button, .workspace select, .editor-head button { background: #fff; border: 1px solid #d9dde5; color: #3f4959; border-radius: 9px; padding: 9px 12px; font-size: 12px; }
  .status { gap: 10px; }
  .studio-heading { padding: 20px 18px 8px; font-size: 11px; letter-spacing: .08em; }
  .studio-list { padding: 4px 12px; gap: 4px; max-height: 24vh; }
  .studio-list button { padding: 12px; color: #4a5565; font-size: 14px; border-radius: 10px; }
  .studio-list button:hover, .studio-list button.selected { background: #e7ebf6; color: #2448bf; border-color: transparent; }
  .file { color: #546171; padding: 8px 12px; font-size: 12px; }
  .file:hover, .file.active { background: #e7ebf6; color: #2448bf; }
  .text-button { color: #596576; font-size: 12px; padding: 8px; }
  .text-button:hover { color: #2448bf; }
  .panel-resizer { background: #f5f6f8; }
  .agent-head { position: relative; min-height: 78px; padding: 16px 28px; background: #fff; }
  .agent-head h2 { font-size: 22px; letter-spacing: -.6px; }
  .agent-head .eyebrow { font-size: 10px; color: #7b8595; margin-bottom: 5px; }
  #desktop-tools-toggle { background: #f5f6f8; border: 1px solid #e2e5eb; border-radius: 10px; padding: 10px 14px; color: #465164; }
  #desktop-tools { display: none; position: absolute; top: 68px; right: 24px; width: min(440px, calc(100% - 48px)); padding: 16px; z-index: 8; background: #fff; border: 1px solid #e2e5eb; border-radius: 16px; box-shadow: 0 12px 36px #16223818; }
  #desktop-tools.tools-open { display: flex; justify-content: flex-start; }
  .jobs { padding: 28px max(28px, calc((100% - 820px) / 2)); scrollbar-color: #c8cdd7 transparent; }
  .welcome { padding: 16vh 24px; }
  .welcome h3 { color: #202631; font-size: 32px; letter-spacing: -1px; }
  .welcome p { font-size: 16px; }
  .message { max-width: 100%; margin-bottom: 28px; border: 0; border-radius: 18px; }
  .message.assistant { background: #fff; }
  .message.user { max-width: 82%; background: #f1f3f7; border: 0; }
  .message-head { border: 0; color: #778293; padding: 12px 20px 0; font-size: 10px; }
  .message-content { color: #252d39; font-size: 17px; line-height: 1.8; padding: 14px 20px; }
  .message-content code { background: #f0f2f6; color: #36476a; }
  .message-actions button { color: #697383; }
  .composer { width: min(840px, calc(100% - 56px)); justify-self: center; margin: 0 0 24px; padding: 14px 18px; border: 1px solid #dfe3ea; border-radius: 22px; background: #fff; box-shadow: 0 6px 24px #1f30400b; }
  .composer textarea { min-height: 54px; max-height: 25vh; border: 0; padding: 8px 0; background: #fff; color: #252d39; resize: none; font-size: 17px; }
  .composer #run { margin: 0; padding: 10px 16px; background: #254fe2; color: #fff; border-radius: 12px; }
  .composer-row > span { font-size: 11px; color: #7b8595; }
  .scroll-latest { border-color: #dfe3ea; background: #fff; color: #465164; box-shadow: 0 3px 12px #0001; }
  .editor { background: #fff; }
  .editor textarea { background: #fbfcfe; color: #344158; font-size: 14px; line-height: 1.7; }
  .editor-head, .editor-foot { color: #697383; }
  .session-controls { padding: 4px 12px; }
  .job { background: #f7f9fc; border-color: #e1e6ee; color: #344158; }
  .job-head, .task-title, .job-output { color: #344158; }
}

@media (min-width: 901px) { .workspace { color: var(--text); } .composer #attach-file { color: #465164; } }

#attach-file svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* Desktop studio: a quiet navigation rail and a focused reading surface. */
@media (min-width: 901px) {
  .workspace { --bg: #f6f7f9; --panel: #f6f7f9; --panel2: #fff; --line: #e8ebef; --text: #202632; --muted: #78818f; --accent: #4463de; --explorer-width: 248px; grid-template-rows: 60px minmax(0, 1fr); }
  .topbar { grid-template-columns: 210px minmax(0, 1fr) auto; gap: 20px; padding: 0 22px; }
  .wordmark { gap: 9px; font-size: 17px; }
  .wordmark .muted { font-weight: 400; font-size: 13px; letter-spacing: 0; }
  .brand-dot { width: 22px; height: 22px; border-radius: 7px; background: #4463de; box-shadow: inset 0 0 0 6px #fff3; }
  .repo-picker { justify-self: start; width: min(690px, 100%); gap: 6px; }
  .repo-picker select { background: #f6f7f9; border-color: transparent; font-weight: 500; }
  .repo-picker button, .usage-button { border-color: transparent; background: transparent; color: #717b8b; padding: 8px 10px; white-space: nowrap; }
  .repo-picker button:hover, .usage-button:hover { border-color: #e1e6ef; background: #f6f7f9; color: #26344a; }
  .status { font-size: 11px; max-width: 230px; }
  #host-label { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .status-dot { width: 6px; height: 6px; box-shadow: none; }
  .explorer { padding-top: 10px; border-right: 1px solid var(--line); }
  .chat-search-label { padding: 10px 16px 4px; font-size: 11px; }
  .chat-search-label input { padding: 10px 12px; margin-top: 7px; border-color: #e1e5ec; background: #fff; border-radius: 8px; font-size: 12px; }
  .studio-heading { padding: 20px 20px 8px; font-size: 10px; font-weight: 600; letter-spacing: .1em; }
  .studio-list { padding: 2px 10px; gap: 3px; }
  .studio-list button { padding: 10px 12px; font-size: 13px; border-radius: 7px; color: #616b7a; }
  .studio-list button.selected { background: #e9edf8; color: #3552b8; font-weight: 600; box-shadow: inset 3px 0 #4463de; }
  .studio-list button:hover { background: #edf0f5; color: #354157; }
  .session-controls { display: flex; justify-content: flex-end; padding: 0 16px; }
  .session-controls #session-select, .session-controls #new-session { display: none; }
  .session-controls #delete-session { font-size: 10px; color: #8a92a0; }
  .panel-title { margin-top: 16px; padding: 0 20px; height: 38px; border-bottom: 0; color: #78818f; font-size: 10px; }
  .tree { padding: 4px 10px 16px; }
  .file { padding: 7px 10px; font-size: 11px; border-radius: 6px; }
  .panel-resizer { background: #fff; }
  .agent-head { min-height: 80px; padding: 18px 32px; border-bottom-color: #f0f2f5; }
  .agent-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.5px; }
  .agent-head .eyebrow { font-size: 9px; letter-spacing: .1em; margin-bottom: 6px; }
  .desktop-chat-controls { display: flex; gap: 10px; align-items: center; }
  #desktop-model-picker select { max-width: 200px; padding: 9px 12px; background: #f7f8fa; border-color: #e7eaf0; border-radius: 8px; font-size: 12px; }
  #desktop-tools-toggle { padding: 9px 12px; border-radius: 8px; background: #fff; font-size: 12px; }
  #desktop-tools { top: 70px; right: 28px; border-radius: 12px; box-shadow: 0 12px 36px #24344a14; }
  .jobs { padding: 28px max(32px, calc((100% - 760px) / 2)) 32px; }
  .message { margin-bottom: 26px; border-radius: 14px; }
  .message.user { max-width: 85%; background: #f3f4f7; }
  .message-head { padding: 13px 18px 0; color: #8a92a0; text-transform: none; letter-spacing: .02em; font-size: 11px; }
  .message-content { padding: 12px 18px; font-size: 15px; line-height: 1.8; color: #303846; }
  .message.assistant .message-content { padding-left: 4px; padding-right: 4px; }
  .message.assistant .message-head { padding-left: 4px; }
  .message.assistant .message-meta, .message.assistant .message-actions { padding-left: 4px; }
  .message-meta, .message-usage { font-size: 10px; color: #8a92a0; }
  .message-actions button { width: 32px; height: 32px; border-radius: 7px; }
  .message-actions svg { width: 17px; height: 17px; }
  .welcome { padding: clamp(52px, 12vh, 140px) 20px 50px; max-width: 640px; margin: 0 auto; }
  .welcome > span { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 26px; border: 1px solid #e4e8f1; border-radius: 15px; background: #f5f7fc; color: #4463de; font-size: 24px; font-weight: 600; }
  .welcome .welcome-label { font-size: 9px; font-weight: 600; letter-spacing: .18em; color: #8a92a0; margin-bottom: 14px; }
  .welcome h3 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 500; letter-spacing: -1px; line-height: 1.3; }
  .welcome p:not(.welcome-label) { max-width: 420px; margin: 14px auto; font-size: 14px; line-height: 1.8; }
  .composer { width: min(800px, calc(100% - 64px)); margin-bottom: 24px; padding: 14px 18px; border-radius: 16px; border-color: #dfe4ed; background: #fff; box-shadow: 0 3px 16px #26344a07; }
  .composer:focus-within { border-color: #a2b1e5; box-shadow: 0 0 0 3px #4463de08; }
  .composer textarea { min-height: 56px; font-size: 15px; line-height: 1.6; }
  .composer textarea::placeholder { color: #a0a7b3; }
  .composer #attach-file { width: 34px; height: 34px; border: 0; border-radius: 8px; color: #7d8796; bottom: 13px; }
  .composer #attach-file:hover { background: #f2f4f8; }
  .composer #run { min-height: 36px; padding: 8px 14px; border-radius: 9px; font-size: 12px; background: #4463de; }
  .composer-row > span { padding-left: 44px; font-size: 10px; line-height: 1.5; max-width: calc(100% - 90px); }
  #route-hint { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
  .send-hint { font-size: 9px; color: #a0a7b3; }
  .editor-head { min-height: 80px; padding-left: 18px; padding-right: 18px; background: #fafbfc; }
  .editor textarea { padding: 20px; font-size: 12px; line-height: 1.75; }
  .editor-foot { font-size: 9px; }
  .job-output { background: #f0f3f8; }
  .job { max-width: 100%; border-radius: 12px; }
  button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #4463de; outline-offset: 3px; }
}
@media (min-width: 901px) and (max-width: 1150px) {
  .topbar { grid-template-columns: 160px minmax(0, 1fr) auto; gap: 10px; padding: 0 16px; }
  .repo-picker button { padding: 8px 6px; font-size: 10px; }
  .status #host-label { display: none; }
  .agent-head { padding-left: 22px; padding-right: 22px; }
  .panels.editor-open { grid-template-columns: 200px 5px minmax(340px, 1fr) 5px minmax(260px, 30%); }
}

@media (min-width: 901px) { .composer { position: relative; } .composer #attach-file { position: absolute; bottom: 14px; left: 18px; margin: 0; } .composer-row > span { padding-left: 54px; } }

/* A quiet chat surface, with project operations kept in the tools menu. */
.active-project { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #505b6c; }
.sidebar-tool { margin: auto 12px 16px; padding: 12px; border: 1px solid #dde2e8; border-radius: 10px; background: transparent; color: #475467; text-align: left; display: flex; justify-content: space-between; font-size: 14px; }
.sidebar-tool:disabled { opacity: .45; cursor: default; }
.task-picker { display: flex; flex-direction: column; gap: 8px; padding: 10px; font-size: 13px; color: #556070; }
.task-picker select { width: 100%; min-height: 44px; font-size: 14px; }
.files-browser { flex: 0 0 auto; border-bottom: 1px solid #e1e5eb; }
.files-browser summary { padding: 12px 18px; font-size: 14px; cursor: pointer; color: #505b6c; }
.files-browser summary button { float: right; color: inherit; }
.files-browser .tree { height: min(32vh, 300px); }
.terminal-result { border: 1px solid #dce2e9 !important; border-radius: 12px; }
.terminal-result .message-head, .terminal-result .message-actions { display: none; }
.terminal-result summary { cursor: pointer; font-size: 14px; color: #505b6c; padding: 6px 0; }
.terminal-result .terminal-transcript { margin-top: 12px; font-size: 13px; }
@media (min-width: 901px) {
  .topbar { grid-template-columns: 220px minmax(0, 1fr) auto; }
  .workspace { --muted: #606b7b; }
  .status { font-size: 13px; max-width: none; }
  .status #host-label { max-width: none; display: inline; }
  .usage-button { font-size: 13px; }
  .agent-head { min-height: 64px; padding: 12px 28px; }
  .agent-head h2 { font-size: 19px; }
  .chat-search-label { font-size: 13px; }
  .chat-search-label input, .studio-list button { font-size: 14px; }
  .studio-heading { font-size: 11px; color: #657183; }
  #studio-sessions { max-height: none; flex: 1; min-height: 80px; }
  .session-controls #delete-session { font-size: 12px; color: #626d7c; }
  #desktop-model-picker select { font-size: 14px; max-width: 240px; min-height: 40px; }
  #desktop-tools-toggle { min-height: 40px; font-size: 14px; }
  #desktop-tools { top: 60px; width: 320px; max-height: calc(100vh - 150px); overflow: auto; padding: 12px; }
  #desktop-project-tools { width: 100%; border-top: 1px solid #e5e9ee; padding-top: 10px; }
  #desktop-project-tools .repo-picker { display: flex; flex-wrap: wrap; width: 100%; }
  #desktop-project-tools select { flex-basis: 100%; min-height: 40px; font-size: 14px; }
  #desktop-project-tools button, #desktop-tools > button { font-size: 13px; min-height: 40px; }
  .jobs { padding: 32px max(32px, calc((100% - 800px) / 2)) 24px; }
  .message { margin-bottom: 24px; }
  .message-content { font-size: 16px; line-height: 1.75; }
  .message.user { max-width: 82%; background: #f2f3f5; }
  .message.user .message-head { display: none; }
  .message.user .message-content { padding: 14px 18px; }
  .message-head { color: #606b7b; font-size: 12px; padding-top: 0; }
  .message-meta, .message-usage { font-size: 12px; color: #606b7b; }
  .message-actions { padding-top: 2px; }
  .message-actions button { width: 36px; height: 36px; }
  .composer { width: min(840px, calc(100% - 64px)); margin-bottom: 20px; border-radius: 20px; }
  .composer textarea { font-size: 16px; }
  .composer textarea::placeholder { color: #737e8c; }
  .composer-row > span { font-size: 12px; color: #606b7b; }
  .send-hint { display: none; }
  .composer #run { min-height: 40px; font-size: 14px; }
  .files-browser .file { font-size: 13px; }
  .editor-head { min-height: 64px; }
}
@media (max-width: 900px) {
  .active-project { display: none; }
  #mobile-model-picker .task-picker { width: 100%; padding: 8px 0 0; }
  #mobile-model-picker .task-picker select { background: #f6f6f6; color: #222; border: 1px solid #ddd; border-radius: 12px; font-size: 16px; }
  .files-browser .file { font-size: 16px; }
  .terminal-result .message-content { padding: 12px; }
}

.editor.mobile-active { display: flex; flex-direction: column; }
@media (min-width: 901px) { .editor { display: flex; flex-direction: column; } }
.editor #code { flex: 1; min-height: 0; }
.editor .editor-head, .editor .editor-foot { flex-shrink: 0; }

@media (min-width: 901px) {
  #desktop-tools { right: 16px; width: min(340px, calc(100% - 32px)); min-width: 0; }
  #desktop-tools.tools-open { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; overflow-x: hidden; }
  #desktop-tools > * { flex-shrink: 0; min-width: 0; max-width: 100%; }
  #desktop-tools > button { text-align: left; padding: 10px; }
  #desktop-tools .context-info, #desktop-tools .chat-usage { max-width: 100%; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
  #desktop-project-tools .repo-picker { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
  #desktop-project-tools .repo-picker select, #desktop-project-tools .repo-picker button { width: 100%; min-width: 0; white-space: normal; text-align: left; }
  #desktop-tools .task-picker { width: 100%; min-width: 0; }
  #desktop-tools .task-picker select { min-width: 0; max-width: 100%; }
  .status { min-width: 0; }
}

/* Shared surfaces prevent legacy dark dialogs appearing in the light theme. */
html { color-scheme: light; --surface: #fff; --surface-subtle: #f5f6f8; --surface-text: #202632; --surface-muted: #697383; --surface-line: #e2e5eb; }
.dialog-card, .login-card, .terminal-card, .usage-card { background: var(--surface); color: var(--surface-text); border-color: var(--surface-line); }
.dialog-card input, .dialog-card textarea, .dialog-card select, .login-card input { background: var(--surface-subtle); color: var(--surface-text); border-color: var(--surface-line); }
.dialog-card p, .dialog-card label, .login-card label, .login-card p:not(.eyebrow) { color: var(--surface-muted); }
.dialog-card pre, #operation-log { background: var(--surface-subtle); color: var(--surface-text); border-color: var(--surface-line); }
.chat-home { margin: 12px 8px 0; border: 0; flex-shrink: 0; }
html[data-theme="dark"] { color-scheme: dark; --surface: #1c1e24; --surface-subtle: #252830; --surface-text: #eceef3; --surface-muted: #a1a8b6; --surface-line: #353a45; }
html[data-theme="dark"] body, html[data-theme="dark"] .workspace { color-scheme: dark; background: var(--surface); color: var(--surface-text); --bg: #17191e; --panel: #17191e; --panel2: #1c1e24; --text: #eceef3; --muted: #a1a8b6; --line: #353a45; --accent: #8b9fff; }
html[data-theme="dark"] :is(.topbar,.agent-head,.agent-panel,.message.assistant,.composer,.composer textarea,.editor,.mobile-tabs,#desktop-tools,.mobile-toolbar-menu,.scroll-latest) { background: var(--surface); color: var(--surface-text); border-color: var(--surface-line); }
html[data-theme="dark"] :is(.explorer,.panel-resizer,.editor-head) { background: #17191e; color: var(--surface-text); border-color: var(--surface-line); }
html[data-theme="dark"] :is(select,input,.workspace select,.message.user,.job,.job-output,.attachment-chip,.editor textarea,.message-content code,#desktop-tools-toggle,.welcome > span) { background: var(--surface-subtle); color: var(--surface-text); border-color: var(--surface-line); }
html[data-theme="dark"] :is(.studio-list button,.sidebar-tool,.repo-picker button,.usage-button,.text-button,.mobile-tabs button,.message-content,.job-output,.job-head) { color: var(--surface-text); }
html[data-theme="dark"] .studio-list button.selected, html[data-theme="dark"] .studio-list button:hover { background: #303749; color: #bac7ff; }
html[data-theme="dark"] .composer #run { background: #647df0; color: #fff; }
html[data-theme="dark"] .muted, html[data-theme="dark"] .message-meta { color: var(--surface-muted); }

#account-dialog .dialog-card { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; }
#account-dialog label { display: block; margin: 16px 0 8px; }
#account-dialog input { width: 100%; padding: 12px; border: 1px solid var(--surface-line); border-radius: 10px; font-size: 16px; }
#account-dialog button { padding: 10px 14px; margin: 8px 8px 0 0; border: 1px solid var(--surface-line); border-radius: 10px; background: var(--surface-subtle); color: var(--surface-text); }
#account-users > div { padding: 12px 0; border-bottom: 1px solid var(--surface-line); }

@media (min-width: 901px) { #desktop-tools { max-height: min(360px, 45dvh); overflow-y: auto; overscroll-behavior: contain; } }

html[data-theme="dark"] .welcome h3 { color: var(--surface-text); }
.dialog-card ol, .usage-window-label { color: var(--surface-text); }
.manual-tools button, .manual-tools a, .dialog-actions .secondary, .usage-title-row > button { background: var(--surface-subtle); color: var(--surface-text); }

.github-project-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.github-project-row span { overflow-wrap: anywhere; }
#github-projects-dialog { max-width: min(640px, 94vw); }
#github-project-list { max-height: 45dvh; overflow: auto; }

/* Native dialog surface and account-scoped project actions. */
#github-projects-dialog { padding: 0; border: 0; border-radius: 20px; width: min(640px, calc(100vw - 32px)); max-width: none; background: var(--surface); color: var(--surface-text); box-shadow: 0 24px 80px #17213b26; }
#github-projects-dialog::backdrop { background: #18213b40; }
#github-projects-dialog .dialog-card { width: 100%; max-height: calc(100dvh - 48px); border: 0; box-shadow: none; border-radius: inherit; padding: 24px; }
#github-project-search { width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--surface-line); border-radius: 12px; outline-offset: 3px; }
#github-projects-dialog button { padding: 9px 14px; border: 1px solid var(--surface-line); border-radius: 10px; background: var(--surface-subtle); color: var(--surface-text); font-size: 14px; min-height: 40px; cursor: pointer; }
#github-projects-dialog button:disabled { opacity: .6; cursor: wait; }
#github-project-list { margin: 12px 0; scrollbar-width: thin; scrollbar-color: #a6aec0 transparent; }
.github-project-row { border-color: var(--surface-line); padding: 12px 0; }
.github-project-row button { flex-shrink: 0; }
@media (min-width: 901px) {
  #desktop-tools.tools-open { display: flex; flex-flow: column nowrap; overflow-x: hidden; overflow-y: auto; }
  #desktop-tools > * { flex: 0 0 auto; min-width: 0; max-width: 100%; }
}

#account-dialog .search-backup-choice { display: flex; align-items: center; gap: 10px; font-size: 14px; }
#account-dialog input[type="checkbox"] { width: 18px; height: 18px; padding: 0; flex-shrink: 0; accent-color: var(--accent, #4663ee); }

#development-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
#development-controls.hidden { display: none; }
#development-controls .task-picker { display: flex; align-items: center; gap: 8px; margin: 0; }
#development-controls select, #development-controls button { max-width: 100%; font-size: 14px; border: 1px solid var(--surface-line); border-radius: 10px; background: var(--surface-subtle); color: var(--surface-text); padding: 8px 10px; }
/* IDE and Jarvis controls share the Studio theme and remain usable on phones. */
.composer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.composer #composer-jarvis { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; margin: 0; padding: 8px 12px; border: 1px solid var(--surface-line); border-radius: 9px; background: var(--surface-subtle); color: var(--surface-text); font-size: 14px; }
.composer #composer-jarvis svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; }
.composer #composer-jarvis .composer-voice-label { font-size: 14px; line-height: 1.2; }
@media (max-width: 900px) {
  .composer textarea { padding-right: 124px; }
  .composer #composer-jarvis { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .composer #composer-jarvis .composer-voice-label { display: none; }
}
.jarvis-card { max-width: 850px; }
.jarvis-card label { font-size: 14px; line-height: 1.5; }
.jarvis-card select { max-width: 100%; font-size: 14px; padding: 8px; border: 1px solid var(--surface-line); border-radius: 8px; background: var(--surface-subtle); color: var(--surface-text); }
.jarvis-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.jarvis-card textarea, #providers-dialog textarea { width: 100%; box-sizing: border-box; }
#jarvis-dialog pre, #external-result { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; padding: 12px; }
#desktop-image { width: 100%; height: auto; border-radius: 8px; }
.code-search-match { display: block; width: 100%; text-align: left; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.editor-actions { flex-wrap: wrap; }
#code:not([readonly]) { outline: 2px solid #4386dd; outline-offset: -2px; }
#jarvis-dialog .dialog-card button, #providers-dialog .dialog-card button, #code-search-dialog .dialog-card button { padding: 10px 14px; border: 1px solid var(--surface-line); border-radius: 9px; background: var(--surface-subtle); color: var(--surface-text); font-weight: 600; }
#jarvis-dialog .dialog-card button:hover, #providers-dialog .dialog-card button:hover { border-color: var(--accent); }
#jarvis-dialog .dialog-card button:disabled { opacity: .45; cursor: default; }
#jarvis-dialog .dialog-card .danger { border-color: #dc5252; color: #dc5252; }
#jarvis-dialog label, #providers-dialog label { display: block; margin-top: 12px; }
#jarvis-dialog label:has(input[type="checkbox"]), #providers-dialog label:has(input[type="checkbox"]) { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
#jarvis-dialog input[type="checkbox"], #providers-dialog input[type="checkbox"] { width: auto; margin: 4px 0 0; flex: 0 0 auto; }
#jarvis-dialog textarea, #providers-dialog input:not([type="checkbox"]), #providers-dialog textarea { border: 1px solid var(--surface-line); border-radius: 8px; padding: 12px; background: var(--surface-subtle); color: var(--surface-text); }
@media (max-width: 600px) { .jarvis-row button { flex: 1 1 130px; } .editor-actions button { padding: 5px 8px; } }

/* Voice conversation keeps configuration in the Tools view. */
.voice-conversation { display: none; }
#jarvis-dialog.voice-compact .jarvis-card { width: min(440px, calc(100vw - 32px)); text-align: center; }
#jarvis-dialog.voice-compact .jarvis-card > * { display: none; }
#jarvis-dialog.voice-compact .jarvis-card > h2,
#jarvis-dialog.voice-compact .jarvis-card > #voice-conversation,
#jarvis-dialog.voice-compact .jarvis-card > #dialogue-status,
#jarvis-dialog.voice-compact .jarvis-card > #voice-status,
#jarvis-dialog.voice-compact .jarvis-card > #dialogue-error:not(.hidden),
#jarvis-dialog.voice-compact .jarvis-card > .dialog-actions { display: block; }
#jarvis-dialog.voice-compact .jarvis-card > #dialogue-controls { display: flex; justify-content: center; }
.voice-conversation pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 35vh; overflow: auto; text-align: left; }
.voice-orb { display: flex; align-items: center; justify-content: center; gap: 6px; width: 128px; height: 128px; margin: 20px auto; border-radius: 50%; background: radial-gradient(circle, #6366f144, #6366f10c); border: 1px solid #818cf855; }
.voice-orb span { width: 6px; height: 18px; border-radius: 4px; background: #a5b4fc; }
.voice-conversation[data-phase="listening"] .voice-orb span,
.voice-conversation[data-phase="speaking"] .voice-orb span { animation: voice-wave 1s ease-in-out infinite alternate; }
.voice-orb span:nth-child(2) { animation-delay: -.2s; }
.voice-orb span:nth-child(3) { animation-delay: -.4s; }
.voice-orb span:nth-child(4) { animation-delay: -.6s; }
.voice-orb span:nth-child(5) { animation-delay: -.8s; }
.voice-conversation[data-phase="thinking"] .voice-orb { animation: voice-glow 1.2s ease-in-out infinite alternate; }
@keyframes voice-wave { to { transform: scaleY(2.8); } }
@keyframes voice-glow { to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .voice-orb, .voice-orb span { animation: none !important; } }

.voice-conversation pre:empty { display: none; }
#voice-heard-preview { border-left: 3px solid var(--accent, #818cf8); padding-left: 10px; }

/* Keep the common coding action visible; installation tools are optional. */
#development-controls { align-items: center; gap: 8px; }
#development-advanced { flex-basis: 100%; font-size: 12px; }
#development-advanced > summary { cursor: pointer; color: var(--muted, #94a3b8); padding: 6px 0; }
.development-advanced-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0; }

.job-timing { color: var(--muted, #94a3b8); font-size: 11px; margin: 6px 0; }
