/* B207: shared desktop/mobile workbench. AXM tokens remain the visual master. */
body{--line:rgba(255,255,255,.14);--ok:#9DFFC4;--warning:#E0B040;--danger:#E5484D}
html body [hidden]{display:none!important}
button,select,a{ -webkit-tap-highlight-color:transparent}button{transition:background .15s,border-color .15s}button:hover{background:#ffffff06}button:focus-visible{outline-offset:2px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#sidebar{width:248px;padding:20px 14px 12px}.brand{margin:6px 10px 28px}.brand span{color:var(--accent)}.new-chat{padding:12px 14px;border-color:var(--line);background:#99ffff07}.search{font-size:12px}.list-heading{margin-top:12px}.list-date{font-size:10px;color:var(--muted);padding:14px 10px 6px}.chat-list-item{display:flex!important;align-items:center;gap:9px}.chat-list-item .chat-name{overflow:hidden;text-overflow:ellipsis}.chat-list-item .chat-dot{width:5px;height:5px;flex-shrink:0;border-radius:50%;background:var(--muted)}.chat-list-item.selected .chat-dot{background:var(--accent)}
.connection-card{display:flex;align-items:center;text-align:left;gap:10px;border:1px solid var(--line);margin:12px 0;padding:12px;font-size:11px}.connection-card>span:nth-child(2){flex:1}.connection-card strong,.connection-card small{display:block;font-weight:400}.connection-card small{font-size:10px;color:var(--muted);margin-top:3px}.connection-dot{display:inline-block;flex-shrink:0;width:6px;height:6px;border-radius:50%;background:var(--muted)}.connection-card.ready .connection-dot{background:var(--ok)}.connection-card.offline .connection-dot{background:var(--warning)}.account{padding:9px 6px 0}.account #account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
header{padding:16px 24px;min-height:78px;gap:12px}.heading small{margin-top:2px}.project-button{display:flex;align-items:center;gap:10px;border-color:var(--line);font-size:11px;max-width:300px;padding:9px 12px}.project-button #project-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-glyph{font-size:20px;color:var(--accent);line-height:1}.chevron{color:var(--muted)}.icon-button{padding:7px 9px;min-width:36px;min-height:36px;color:var(--muted);font-size:20px;line-height:1}.icon-button[aria-expanded=true]{color:var(--accent);background:#99ffff0b}
.chat-menu{position:relative;margin:0;font-size:14px;flex-shrink:0}.chat-menu>summary{list-style:none;padding:5px 10px;font-size:24px;color:var(--muted)}.chat-menu>summary::-webkit-details-marker{display:none}.chat-menu>div{position:absolute;right:0;top:100%;z-index:8;width:190px;padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--panel);box-shadow:0 12px 30px #0005}.chat-menu button{display:block;width:100%;text-align:left;font-size:12px}
.work-area{display:flex;flex:1;min-height:0;position:relative}.chat-column{display:flex;flex:1;min-width:0;flex-direction:column}.conversation{padding:30px max(24px,calc((100% - 820px)/2));overscroll-behavior:contain;scroll-behavior:auto}.compose-wrap{padding:10px max(24px,calc((100% - 860px)/2)) max(14px,env(safe-area-inset-bottom))}.welcome{margin:clamp(26px,8vh,100px) auto 30px;max-width:760px;background-repeat:repeat-x;background-position:0 100%;padding-bottom:28px}.welcome h1{font-size:clamp(28px,3vw,40px);margin:18px 0 14px}.welcome .welcome-description{max-width:570px;font-size:14px;line-height:1.8;color:var(--muted)}.suggestions{margin-top:28px;gap:10px}.suggestions button{padding:16px;display:flex;flex-direction:column;gap:13px;background:#2a2f3360;min-height:116px;border-radius:12px;font-size:12px}.suggestions .suggestion-icon{color:var(--accent);font:20px/1 Consolas,monospace}.suggestions small{color:var(--muted);font-size:10px}.welcome-tip{margin-top:20px;font-size:11px;color:var(--muted)}
.agent-toolbar{gap:12px;margin-bottom:9px}.mode-tabs{display:flex;gap:2px;border:1px solid var(--line);border-radius:9px;padding:3px;background:#202426}.mode-tabs button{padding:5px 15px;font-size:11px;min-height:30px;border-radius:6px}.mode-tabs button[aria-pressed=true]{background:#3a4548;color:var(--accent);border-color:#99ffff20}#mode-description{font-size:10px}.agent-toolbar #connect-agent{display:none!important}.agent-hint{margin:4px 3px 9px;font-size:10px}.compose-actions{min-height:38px}.compose-actions select{font-size:11px}.thinking{font-size:11px}.compose-actions select option{background:var(--panel)}#composer{background:#2A2F33;border-color:#53575A;box-shadow:0 6px 24px #00000012}#composer:focus-within{border-color:#99ffff80;box-shadow:0 0 0 2px #99ffff06}.send{border-radius:9px;width:36px;height:36px;font-size:22px}.send:hover{background:#baffff}.send:disabled{background:#53575A;color:var(--muted)}#stop{margin-left:auto;border-color:var(--line);font-size:11px;color:#F2F3F1;min-height:36px}textarea{min-height:70px;max-height:220px;font-size:14px}.compose-foot{font-size:10px;margin-top:7px;gap:10px}.compose-foot #compose-status{min-width:0}.compose-foot #token-count{white-space:nowrap}
.turn{margin-bottom:34px}.user-message{font-size:13px;background:#30363a;border-color:#ffffff0a;border-radius:14px 14px 4px 14px;max-width:88%;padding:13px 17px}.assistant{font-family:Arial,sans-serif;font-size:15px;line-height:1.85}.assistant h1,.assistant h2,.assistant h3{font-family:Machina,Arial,sans-serif}.assistant h2{font-size:22px}.assistant h3{font-size:17px}.assistant pre{font-size:12px;position:relative;padding-top:38px}.copy-code{position:absolute;right:8px;top:5px;color:var(--muted);font:10px Machina,Arial;background:#282d31}.answer-tools{display:flex;align-items:center;gap:8px;margin-top:12px}.answer-tools button{font-size:10px;color:var(--muted);padding:5px 8px}.turn-footer{margin-top:0}.turn-status{font-size:11px;display:flex;gap:8px;align-items:center;color:var(--muted);margin:10px 0}.turn-status.failed{color:#ffa9aa}.turn-status.completed{color:var(--ok)}.status-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}.turn-status.running .status-dot{color:var(--accent);animation:working 1.5s ease-in-out infinite}@keyframes working{50%{opacity:.35}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.agent-turn-label{display:flex;gap:8px;align-items:center;letter-spacing:.04em;margin:16px 0 10px}.action-history{border:1px solid var(--line);border-radius:10px;margin:10px 0;padding:0 12px}.action-history>summary{padding:12px 0;color:var(--muted);font-size:11px}.action-history .agent-action{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;padding:10px 0;margin:0}.action-history .action-location{display:none}.action-history .action-heading{font-size:11px}.action-history .agent-action details{margin-bottom:0}.agent-action[data-status=pending]{border-color:#99ffff66;background:#2b3538;padding:18px}.agent-action[data-status=claimed]{border-color:#99ffff40}.action-heading{align-items:center}.action-status{color:var(--muted);font-size:10px}.agent-action[data-status=pending] .action-status{color:var(--accent)}.agent-action[data-status=failed] .action-status{color:#ffa9aa}.action-reason{font-size:12px;color:var(--muted);margin:10px 0}.action-location{font-size:10px}.agent-action summary{font-size:11px}.agent-action pre{font-size:12px;line-height:1.65;background:#202426;padding:12px;border-radius:7px;border:1px solid var(--line);max-height:280px}.agent-action .diff-before{border-color:#e5484d44;background:#e5484d0b}.agent-action .diff-after{border-color:#9dffc444;background:#9dffc407}.approval-buttons button{font-size:11px;padding:10px 15px;min-height:40px}.approval-buttons .approve:hover{background:#baffff;color:#24272A}.action-history .approval-buttons{margin-top:10px}
.task-panel{width:290px;flex-shrink:0;border-left:1px solid var(--line);background:#202426;padding:18px;overflow:auto;display:block}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-heading h2{margin:0}.panel-heading .eyebrow{margin-top:0}.panel-heading>strong{font-size:12px;font-weight:500}.task-section{padding:18px 0;border-bottom:1px solid var(--line)}.task-section h3{font-size:10px;letter-spacing:.12em;color:var(--muted);font-weight:400;text-transform:uppercase;margin:0 0 12px}.task-section p{font-size:12px;margin:4px 0;overflow-wrap:anywhere}.task-section .muted{font-size:10px}.task-file{display:flex;gap:8px;font:11px/1.6 Consolas,monospace;margin:8px 0;overflow-wrap:anywhere}.task-file>span:first-child{color:var(--accent)}.task-link{display:block;width:100%;text-align:left;font-size:11px;border-color:var(--line);margin-top:10px}.task-empty{padding:18px 0;font-size:12px;color:var(--muted)}
dialog{width:min(500px,calc(100vw - 32px));max-height:85dvh;padding:26px;box-shadow:0 25px 90px #0006}dialog .panel-heading button{margin:0!important;display:inline-block!important}dialog .primary{display:flex!important}dialog input{width:100%;margin:12px 0;font-size:13px}dialog h2{font-size:24px}dialog p{font-size:12px}.project-dialog{max-width:560px;width:min(560px,calc(100vw - 28px))}#project-options{max-height:38dvh;overflow:auto}.project-option{display:flex;gap:12px;width:100%;text-align:left;border:1px solid var(--line);padding:13px;margin:8px 0;align-items:flex-start}.project-option.selected{border-color:#99ffff80;background:#99ffff06}.project-option>span:nth-child(2){flex:1;min-width:0}.project-option strong,.project-option small{display:block;overflow-wrap:anywhere}.project-option strong{font-size:12px;font-weight:400}.project-option small{color:var(--muted);font-size:10px;margin-top:3px}.project-option .project-presence{font-size:9px;white-space:nowrap;color:var(--ok)}.project-option:disabled{opacity:.6}.project-option:disabled .project-presence{color:var(--muted)}#project-help{line-height:1.7}#settings .device-setting{padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}#settings .device-setting button{margin-top:8px;font-size:11px;border-color:var(--line)}
.scrim{position:fixed;inset:0;z-index:4;border:0;border-radius:0;background:#0008}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#33383C;border:1px solid var(--line);padding:10px 18px;border-radius:9px;z-index:30;font-size:12px;box-shadow:0 8px 30px #0005;max-width:90vw}.jump-latest{position:fixed;bottom:260px;left:calc(50% + 110px);transform:translateX(-50%);background:#33383C;border-color:var(--line);font-size:11px;box-shadow:0 5px 20px #0004;z-index:3}
.context-label{font-size:11px;margin-left:7px;vertical-align:middle}*{scrollbar-width:thin;scrollbar-color:#53575A transparent}.conversation:focus-visible{outline:1px solid var(--accent);outline-offset:-2px}
@media(max-width:1200px){.task-panel{position:absolute;right:0;top:0;bottom:0;z-index:6;box-shadow:-20px 0 50px #0003}}
@media(max-width:760px){.context-label{display:none}}
@media(max-width:760px){#sidebar{width:min(320px,87vw);padding-top:max(16px,env(safe-area-inset-top))}header{gap:5px;padding:9px 10px;min-height:66px}.heading strong{font-size:12px}.heading small{font-size:9px;max-width:150px}.project-button{padding:6px 8px;max-width:118px;gap:5px;font-size:10px}.project-button .folder-glyph{font-size:18px}.project-button .chevron{display:none}.icon-button{font-size:18px;padding:6px;min-width:30px;min-height:36px}.chat-menu>summary{padding:4px 5px}.chat-menu>div{right:0}.conversation{padding:20px 16px}.welcome{margin-top:26px;padding-bottom:12px}.welcome h1{font-size:29px}.welcome .welcome-description{font-size:12px}.suggestions{gap:8px;margin-top:22px}.suggestions button{min-height:66px;display:grid;grid-template-columns:22px 1fr;align-items:center;gap:6px 12px;padding:12px 14px}.suggestions button small{grid-column:2}.suggestions .suggestion-icon{grid-row:1/3}.welcome-tip{font-size:10px}.compose-wrap{padding:6px 12px max(10px,env(safe-area-inset-bottom))}.mode-tabs button{padding:4px 15px;font-size:11px}.agent-toolbar{gap:8px;margin-bottom:7px}#mode-description{display:none}.agent-hint{font-size:9px;line-height:1.5;margin:2px 2px 7px}textarea{font-size:16px;min-height:62px;max-height:150px}.thinking{font-size:10px}.compose-actions select{font-size:10px;max-width:85px;min-width:0}.compose-foot{font-size:9px}.compose-foot #compose-status{max-width:72%}.user-message{max-width:94%;font-size:12px}.assistant{font-size:14px}.agent-action[data-status=pending]{padding:13px}.action-heading{flex-wrap:wrap}.approval-buttons{gap:7px}.approval-buttons button{flex:1;padding:10px 8px}.task-panel{width:min(340px,94vw)}.jump-latest{left:50%;bottom:240px}.toast{bottom:16px}dialog{padding:20px}.project-option{gap:8px}.project-option .project-presence{white-space:normal;max-width:60px}.login{padding:24px}.login h1{font-size:34px}}

/* E44: final workbench adapter; shared geometry, accessible targets, no logic changes. */
button,input,textarea,select{border-radius:8px}.connection-card,.suggestions button,.task-card,dialog{border-radius:14px}
.new-chat,.project-button,.icon-button,.chat-menu>summary,.mode-tabs button,.approval-buttons button{min-height:44px}.icon-button{min-width:44px}.chat-menu>summary{display:flex;align-items:center;justify-content:center}
.project-button,.new-chat{font-weight:500}.compose-actions .attach{min-width:48px;min-height:48px}.compose-actions .send{min-width:48px;min-height:48px}
@media(max-width:760px){.project-button{max-width:min(104px,28vw)}.icon-button{min-width:44px;min-height:44px}.chat-menu>summary{min-width:32px;min-height:44px}header{flex-wrap:wrap}.heading{min-width:70px}.mode-tabs button,.approval-buttons button,.new-chat{min-height:48px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* B208 measured context window; the loading sweep has no fake completion percentage. */
.compose-foot #token-count{white-space:normal}.context-meter{display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:100%;min-width:160px;color:var(--muted)}.context-meter-label{font-size:10px}.context-track{display:block;width:170px;max-width:100%;height:4px;overflow:hidden;background:#53575a;border-radius:4px}.context-fill{display:block;height:100%;background:var(--accent);border-radius:4px;transition:width .25s}.context-meter.warning .context-fill{background:#e0b040}.context-meter.danger .context-fill{background:#f97066}.context-phase{font-size:9px;color:var(--accent)}.context-meter.measuring .context-fill{animation:context-loading 1.5s ease-in-out infinite}@keyframes context-loading{from{transform:translateX(-110%)}to{transform:translateX(300%)}}@media(prefers-reduced-motion:reduce){.context-fill{transition:none}.context-meter.measuring .context-fill{animation:none}}@media(max-width:600px){.compose-foot{flex-wrap:wrap}.context-meter{margin-left:auto}.context-track{width:150px}}

/* H205: перетаскивание файлов и повтор запроса */
.compose-wrap.dragging{outline:2px dashed var(--accent,#99FFFF);outline-offset:4px;border-radius:14px}
.compose-wrap.dragging::after{content:"Отпустите файлы — прикреплю к сообщению";display:block;text-align:center;color:var(--accent,#99FFFF);font-size:13px;padding:6px 0 0}
.answer-tools .retry-turn{border-color:var(--accent,#99FFFF);color:var(--accent,#99FFFF)}
/* H205: значки — один набор SVG 20×20, линия 1.5, цвет наследуется; буквы-значки убраны. */
.ic{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;vertical-align:middle;pointer-events:none}
.new-chat .ic{width:15px;height:15px;margin-right:9px;vertical-align:-2px}.folder-glyph{display:inline-flex}.project-button .folder-glyph .ic{width:18px;height:18px}.chevron .ic{width:14px;height:14px}
.suggestions .suggestion-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}.suggestions .suggestion-icon .ic{width:22px;height:22px}.suggestions .suggestion-icon .axm-arrow{margin:0;width:14px;height:15px}
.attach .ic{width:22px;height:22px}#stop{display:inline-flex;align-items:center;gap:7px}#stop .ic{width:12px;height:12px}.file-chip button{display:inline-flex;align-items:center}.file-chip button .ic{width:11px;height:11px}
.jump-latest{display:inline-flex;align-items:center;gap:7px}.jump-latest[hidden]{display:none}.jump-latest .ic,#apk-link .ic{width:13px;height:13px}#apk-link .ic{margin-left:6px}.task-file .axm-arrow{margin:5px 0 0}
.chat-menu>summary .ic{width:22px;height:22px}.dialog-close,#rename-close{display:inline-flex;align-items:center;justify-content:center}.context-label{margin-left:7px}
/* H205: состояние поручения в списке диалогов — точка и слово справа */
.chat-text{min-width:0;flex:1;display:flex;flex-direction:column;text-align:left}.chat-name,.chat-snippet{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-snippet{font-size:10px;color:var(--muted);margin-top:1px}
.chat-state{flex:none;font-size:9px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.chat-list-item.state-running .chat-dot,.chat-list-item.state-approval .chat-dot,.chat-list-item.state-done .chat-dot,.chat-list-item.state-failed .chat-dot{width:7px;height:7px}
.chat-list-item.state-running .chat-dot{background:var(--accent);animation:working 1.5s ease-in-out infinite}.chat-list-item.state-running .chat-state{color:var(--accent)}
.chat-list-item.state-approval .chat-dot{background:#FFD479;animation:working 1.5s ease-in-out infinite}.chat-list-item.state-approval .chat-state{color:#FFD479}
.chat-list-item.state-done .chat-dot{background:var(--ok,#8DE3A8)}.chat-list-item.state-done .chat-state{color:var(--ok,#8DE3A8)}
.chat-list-item.state-failed .chat-dot{background:#ffa9aa}.chat-list-item.state-failed .chat-state{color:#ffa9aa}
.user-tools{display:flex;justify-content:flex-end;margin:-18px 0 12px}.user-tools .edit-turn{border-color:transparent;background:none;color:var(--muted);padding:6px;min-width:32px;min-height:32px;display:inline-flex;align-items:center;justify-content:center;opacity:.7}.user-tools .edit-turn:hover,.user-tools .edit-turn:focus-visible{opacity:1;color:var(--accent)}.user-tools .ic{width:15px;height:15px}
.notify-box{margin:14px 0}.notify-box button{margin-top:6px}
@media(max-width:760px){.user-tools .edit-turn{min-width:44px;min-height:44px}.user-tools{margin:-20px 0 4px}}
@media(prefers-reduced-motion:reduce){.chat-list-item .chat-dot{animation:none!important}}
/* H205: на телефоне общее правило aside{transform} (список диалогов) уводило «Обзор задачи» за экран */
@media(max-width:760px){.task-panel{transform:none!important;left:auto;width:min(340px,92vw)}}

/* E64 compact workbench: retain typography/brand and every action, reduce empty space. */
html body h1{font-size:clamp(20px,2vw,24px);line-height:1.3}
html body h2{font-size:20px;line-height:1.35}
html body header{min-height:64px;padding:8px 16px;gap:8px}
html body .brand{margin:4px 4px 16px}
html body .conversation{padding:16px max(16px,calc((100% - 900px)/2))}
html body .welcome{margin:16px 0}
html body :is(.welcome,.login form){padding:20px 24px}
html body .suggestions{margin-top:16px;gap:8px}
html body .suggestions button{min-height:56px;padding:10px 12px}
html body .turn{margin-bottom:20px}
html body .user-message{padding:10px 12px;margin-bottom:12px}
html body .assistant{line-height:1.6}
html body .turn-footer{margin-top:8px}
html body .compose-wrap{padding-top:8px}
html body textarea{min-height:48px}
html body .panel-heading{padding:12px;gap:8px}
html body .task-card{padding:12px;margin-bottom:8px}
html body .login{padding:16px}
html body .login label{margin:12px 0}
html body .primary{min-height:48px;padding:10px 12px;margin:12px 0}
@media(max-width:760px){
 html body .conversation{padding:12px}
 html body header{flex-wrap:wrap;min-height:64px}
 html body .suggestions{flex-wrap:wrap}
 html body .suggestions button{flex:1 1 140px}
 html body :is(button,.attach,summary){min-height:48px}
 html body :is(.icon-button,.attach){min-width:48px}
 html body .task-panel{width:min(380px,100vw)}
 html body .compose-wrap{padding-left:12px;padding-right:12px}
}

/* E64 task overview shares the compact row rhythm. */
html body .task-section{padding:12px 0}
html body .task-section h3{margin-bottom:8px;font-size:11px}
html body .task-empty{padding:12px 0}

/* H240: persistent mobile sections; compact settings grow with the user's font. */
.mobile-nav{display:none}
html body #settings h2{font-size:22px;margin:8px 0 12px}
html body #settings h3{font-size:16px;margin:16px 0 8px}
html body #settings p{font-size:14px;line-height:1.5}
html body #support-status{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:760px){
 html body .workspace{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
 html body .mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:25;min-height:64px;padding-bottom:env(safe-area-inset-bottom);background:#24272a;border-top:1px solid #ffffff24}
 html body .mobile-nav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:64px;padding:8px 4px;font-size:12px;background:transparent;border:0;color:#b1b3b2}
 html body .mobile-nav button[aria-current=page]{color:#99ffff}
 html body .mobile-nav .ic{width:20px;height:20px}
 html body .workspace[hidden] .mobile-nav{display:none}
 html body #sidebar{bottom:calc(64px + env(safe-area-inset-bottom))}
 html body .toast{bottom:calc(80px + env(safe-area-inset-bottom))}
}

/* H241 COMPACT-UI (E64), 16.11: последний слой. Текст 14 / вторичный ≥12 Neue Machina; цели касания 48 (touch) и 44 (мышь);
   статус не обрезается; шапка телефона в одну строку; подписи нижней навигации переносятся, а не наезжают. */
html body .assistant{font-family:Machina,Arial,sans-serif;font-size:14px;line-height:1.6}
html body .user-message{font-size:14px}
html body :is(.list-date,.connection-card small,.suggestions small,.welcome-tip,#mode-description,.agent-hint,.compose-foot,.thinking,.compose-actions select,.copy-code,.answer-tools button,.turn-status,.action-history>summary,.action-history .action-heading,.action-status,.action-location,.agent-action summary,.task-section .muted,.task-section h3,.task-file,.task-link,.project-option small,.project-option .project-presence,.context-meter-label,.context-phase,.chat-snippet,.chat-state,.heading small,.project-button,.context-label,.mode-tabs button,#stop,.approval-buttons button,.list-heading,.list-heading button,.connection-card,.file-chip,.eyebrow,#settings .device-setting button,.jump-latest,.agent-turn-label){font-size:12px}
html body :is(.chat-name,.connection-card strong,.project-option strong,.task-section p,#settings .device-setting,.search,.chat-menu button,dialog p,dialog input){font-size:14px}
html body :is(.brand span,.turn-footer){font-size:12px}
html body .copy-code{font-family:Machina,Arial,sans-serif}
html body .assistant pre{padding-top:52px}
html body .heading strong{font-size:20px;line-height:1.3}
html body .heading small{white-space:normal;overflow:visible;text-overflow:clip;max-width:none;line-height:1.35}
html body .welcome h1{font-size:22px;margin:8px 0}
html body .welcome .welcome-description{font-size:14px;line-height:1.5}
html body .suggestions button{min-height:56px;font-size:14px}
html body .login h1{font-size:22px;line-height:1.3;margin:12px 0 8px}
html body .login img{width:88px}
html body .login form>a.muted{display:inline-flex;align-items:center;min-height:44px}
html body #settings :is(a[href],#apk-link){display:flex;align-items:center;min-height:44px}
html body .files{flex-wrap:wrap}
html body .file-chip{max-width:100%;display:inline-flex;align-items:center;gap:4px;padding:0 0 0 10px;font-size:12px}
html body .file-chip button{flex:none;min-width:44px;min-height:44px;justify-content:center}
html body .send{flex:none;width:48px;height:48px;min-width:48px;display:inline-flex;align-items:center;justify-content:center;line-height:1}
html body .compose-actions{flex-wrap:wrap}
html body .compose-wrap{position:relative}
html body .jump-latest{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;max-width:calc(100% - 24px)}

/* Мышь и тачпад (Windows, веб на ПК): 44; высота растёт с текстом. */
html body :is(button,summary,select,.attach,.thinking,input:not([type=checkbox]):not([type=radio]):not([type=file])){min-height:44px}
html body :is(.chat-menu>summary,.user-tools .edit-turn,.dialog-close,#rename-close,.icon-button){min-width:44px}
html body .thinking{display:inline-flex;align-items:center;gap:8px;padding:0 4px;cursor:pointer}
html body .thinking input{width:18px;height:18px;margin:0}
html body .chat-list-item{min-height:44px}

/* Касание (Android, планшет, сенсорный ПК): 48 — включая ширину 768, где правило ≤760 не действовало. */
@media (pointer:coarse){
 html body :is(button,summary,select,.attach,.thinking,input:not([type=checkbox]):not([type=radio]):not([type=file]),.chat-list-item,#settings a[href],.login form>a.muted){min-height:48px}
 html body :is(.chat-menu>summary,.user-tools .edit-turn,.dialog-close,#rename-close,.icon-button,.file-chip button){min-width:48px}
 html body .file-chip button{min-height:48px}
}

/* Телефон: шапка в одну строку — меню, название и статус, проект значком, обзор, действия. */
@media(max-width:760px){
 html body header{flex-wrap:nowrap;gap:4px;padding:8px 8px 8px 4px}
 html body .heading{flex:1;min-width:0}
 html body .heading strong{font-size:16px}
 html body .heading small{font-size:12px;max-width:none}
 html body .project-button{max-width:none;padding:0;min-width:48px;justify-content:center}
 html body .project-button #project-caption{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 html body .project-button .chevron{display:none}
 html body .chat-menu>summary{min-width:48px;padding:0}
 html body .heading small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html body.model-offline .heading small{white-space:normal;overflow:visible}
 html body .mobile-nav button{padding:8px 2px}
 html body .mobile-nav button span{white-space:normal;text-align:center;line-height:1.2;max-width:100%}
 html body .compose-foot{flex-wrap:wrap}
 html body .compose-actions select{max-width:none}
 html body textarea{max-height:30dvh}
 html body .welcome h1{font-size:22px}
 html body .login h1{font-size:22px}
}
/* Цели с id-селекторами в прежних слоях: 44 мышью, 48 касанием и на телефоне (pointer:coarse эмулятор не всегда сообщает). */
html body #stop{min-height:44px}
html body :is(#settings-button,#close-sidebar){min-width:44px}
@media(max-width:760px){
 html body :is(#stop,.login form>a.muted,.chat-list-item){min-height:48px}
 html body #settings :is(a[href],#apk-link){min-height:48px}
 html body :is(#settings-button,#close-sidebar,.file-chip button){min-width:48px}
}
@media (pointer:coarse){
 html body #stop,html body #settings :is(a[href],#apk-link){min-height:48px}
 html body :is(#settings-button,#close-sidebar){min-width:48px}
}

/* Keep the message and primary controls in a single row. */
html body #composer{padding:4px}
html body .compose-actions{flex-wrap:nowrap;gap:4px;align-items:flex-end}
html body #prompt{flex:1;min-width:0;min-height:44px;padding:10px 6px;overflow-y:auto}
#prompt::placeholder{white-space:nowrap;text-overflow:ellipsis}
html body .compose-wrap{padding-top:4px}
html body .agent-toolbar{gap:4px;margin-bottom:4px}
html body .mode-tabs{padding:0;border:0}
html body .mode-tabs button{padding-inline:9px}
html body .compose-foot{margin:4px 0 0}
.compose-foot #compose-status:empty,.files:empty,.compose-wrap .error:empty{display:none}
.compose-foot:has(#compose-status:empty):has(#token-count[hidden]){display:none}
.compose-foot #token-count{margin-left:auto}
.compose-foot .context-meter{min-width:0;flex-direction:row;align-items:center;gap:6px}
.compose-foot .context-track{width:52px}
.web-sources a{overflow-wrap:anywhere}
.chat-context{position:fixed;z-index:30;min-width:170px;padding:4px;background:#24272a;border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 24px #0006}
.chat-context button{display:block;width:100%;text-align:left;font-size:14px}
#sidebar-resize{display:none}
@media(min-width:761px){
  #sidebar{width:var(--sidebar-width,246px);border-right:0}
  #sidebar-resize{display:block;flex:0 0 8px;cursor:col-resize;touch-action:none;border-left:1px solid var(--line)}
  #sidebar-resize:is(:hover,:focus-visible,.resizing){border-color:var(--accent);background:#99ffff16}
}
@media(max-width:760px),(pointer:coarse){
  html body #prompt{min-height:48px}
}

#settings{max-width:560px;width:min(560px,calc(100vw - 24px));padding:16px 20px}
.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
html body #settings .settings-heading h2{margin:0}
html body #settings :is(.settings-heading button,.settings-nav button,.setting-row input,.device-setting button){margin:0}
.settings-nav{display:flex;gap:4px;margin:8px 0}
.settings-nav button{flex:1;padding:0 6px;font-size:13px}
.settings-nav button[aria-pressed=true]{color:var(--accent);background:#3a4548}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;border-bottom:1px solid var(--line);font-size:14px}
.setting-row span:first-child{min-width:0;overflow-wrap:anywhere}
.setting-row .value{color:var(--muted);text-align:right}
.setting-row select{flex:0 1 52%;min-width:0;max-width:100%;border:1px solid var(--line);font-size:13px;background:#24272a}
.setting-row input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent)}
html body #settings .setting-note{margin:7px 0 10px;color:var(--muted);font-size:12px}
.settings-detail{margin:8px 0 0;border-top:1px solid var(--line)}
.settings-detail>summary{align-content:center;font-size:14px}
#settings .device-setting{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px}
#settings :is(#import-status,#logout-status,#support-status):empty{display:none}
html body .welcome{border:0;background:transparent;box-shadow:none;text-align:center}
@media(max-width:760px){
  #settings{padding:12px}
  .setting-row{gap:6px;padding:4px 0}
}

/* Long commands stay inspectable without pushing their approval controls off screen. */
.agent-action .command-summary {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-action pre { overflow-wrap: anywhere; }

@media (min-width: 761px) and (max-width: 960px) {
  html body header .project-button { max-width: 132px; }
  html body header .context-label { display: none; }
}
@media (max-width: 760px) {
  body:not(.sidebar-open) #sidebar { visibility: hidden; }
}
@media (max-width: 760px) and (max-height: 500px) {
  html body .mobile-nav button { min-height: 48px; flex-direction: row; }
  html body .mobile-nav { min-height: 48px; }
  html body .workspace { padding-bottom: calc(49px + env(safe-area-inset-bottom)); }
  html body #sidebar { bottom: calc(49px + env(safe-area-inset-bottom)); }
}

@media (min-width: 540px) and (max-width: 760px) and (max-height: 500px) {
  html body .compose-wrap:has(#files:empty) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    column-gap: 8px;
  }
  html body .compose-wrap .compose-foot, html body .compose-wrap > .error { grid-column: 1 / -1; }
}

/* Settings use the same graphite surface and compact rows as the other AXM sections. */
html body #settings {color-scheme:dark;color:var(--text,#f2f3f1);background:#24272a;overflow:auto;overscroll-behavior:contain}
html body #settings :is(h2,h3,p,summary,button,a,label,select){line-height:1.4;overflow-wrap:anywhere}
html body #settings .settings-heading{padding:0 0 .65rem}
html body #settings h2{font-size:1.55rem;outline:none}
html body #settings h3,html body #settings .settings-detail>summary{font-size:1.08rem;font-weight:500}
html body #settings .settings-detail{margin:0;border-top:1px solid var(--line)}
html body #settings .settings-detail>summary{padding:.75rem 0;min-height:48px;cursor:pointer}
html body #settings #settings-account-name{color:var(--muted);font-size:.92rem;font-weight:400;margin-inline-start:.4em}
html body #settings .setting-row{font-size:1rem;flex-wrap:wrap}
html body #settings .setting-row select{font-size:1rem;max-width:100%}
html body #settings .app-update,html body #settings .notify-box{border:0;border-top:1px solid var(--line);background:transparent;padding:.8rem 0;margin:0}
html body #settings .app-update h3,html body #settings .notify-box h3{margin:0 0 .35rem}
html body #settings .app-update p{margin:.4rem 0;color:var(--muted);font-size:1rem}
html body #settings .app-update .update-action{display:inline-flex!important;width:auto;min-height:48px;align-items:center;padding:0 .85rem;margin:.25rem 0 0;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--accent);text-decoration:none;font:inherit}
html body #settings .update-action[aria-disabled=true],html body #settings .update-action:disabled{opacity:.65}
html body #settings .settings-detail>a{color:var(--accent);text-decoration:none}
@media(max-width:760px){
  body.settings-page #workspace>:not(.mobile-nav){display:none!important}
  html body.settings-page #settings[open]{position:fixed;inset:0 0 calc(64px + env(safe-area-inset-bottom));z-index:20;max-width:none;width:100%;height:auto;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left))}
  body.settings-page #settings-close,body.settings-page #jump-latest{display:none!important}
}
@media(max-width:760px) and (max-height:500px){
  html body.settings-page #settings[open]{bottom:calc(49px + env(safe-area-inset-bottom))}
}
/* B261: model switcher lives next to the mode tabs; compact per COMPACT-UI. */
html body #model-select{max-width:200px;min-height:30px;padding:4px 8px;font-size:12px;border:1px solid var(--line);border-radius:9px;background:#202426;color:var(--muted)}
html body #model-select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
html body #model-select option,html body #model-select optgroup{background:#24272a;color:#f2f3f1}
@media(max-width:760px){html body #model-select{max-width:150px;font-size:11px;min-height:36px}}
