/* Boat-inspired workspace: ink, white space, hairlines and a quiet blue accent. */
body:not(.auth-page) { height: var(--workspace-height, 100dvh); min-height: 0; overflow: hidden; }
body:not(.auth-page) .app-shell { height: 100%; min-height: 0; display: flex; flex-direction: column; }
body:not(.auth-page) .topbar { position: relative; flex: 0 0 48px; height: 48px; margin: 0 28px; padding: 0 22px; border: 1px solid var(--line); border-top: 0; background: #fff; backdrop-filter: none; }
.brand-name { display: block; color: var(--text); font-size: 23px; font-weight: 750; letter-spacing: -.06em; text-decoration: none; }
.topbar-actions { gap: 14px; }
.topbar-nav { display: flex; align-items: center; gap: 28px; }
.topbar-nav a { position: relative; display: flex; align-items: center; min-height: 44px; color: var(--text); font-size: 13px; text-decoration: none; white-space: nowrap; }
.topbar-nav a[aria-current='page']::after { content: ''; position: absolute; left: 0; right: 0; bottom: 9px; height: 2px; background: var(--text); }
.top-new-agent { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 12px; border-color: var(--text) !important; font-size: 13px; }
.topbar .language-switch, .topbar .refresh-btn { border: 0; padding: 5px 8px; min-height: 34px; font-size: 12px; background: transparent; }
.topbar .refresh-text { display: none; }
.account-menu > summary { min-height: 34px; padding: 5px 8px; border: 0; border-radius: 0; background: #fff; }
.account-name-inline { font-size: 12px; font-weight: 500; }
body:not(.auth-page) main { display: flex; flex: 1; width: 100%; min-height: 0; padding: 0; margin: 0; }
.button, input, textarea { border-radius: 3px; }
.button { font-weight: 600; }
.button:hover:not(:disabled) { transform: none; }
.button.primary { background: var(--primary); border-color: var(--primary); box-shadow: none; }
.button.secondary { color: var(--text); border-color: var(--line2); background: #fff; }
.button.secondary:hover:not(:disabled) { color: var(--text); background: var(--primarySoft); border-color: var(--text); }
.button.ghost:hover:not(:disabled) { background: var(--soft); }
.button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid #8b9edb; outline-offset: 3px; }
.status-badge { border-radius: 3px; font-weight: 500; }
.status-badge.info, .status-badge.running { color: var(--ok); border-color: #bed9c8; background: var(--okSoft); }
.notice { color: var(--text); background: var(--primarySoft); border-color: var(--accent); }
.messenger { display: flex; flex: 1; min-width: 0; min-height: 0; flex-direction: column; margin: 0 28px 24px; }
.workspace-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: 28px; flex: 0 0 clamp(180px, 27.6dvh, 282px); min-height: 0; padding: 20px 22px 24px; }
.hero-copy { min-width: 0; }
.hero-copy h1 { margin: 0 0 12px; font-size: clamp(58px, 6.4vw, 100px); font-weight: 750; line-height: 1.02; letter-spacing: -.068em; white-space: nowrap; }
.hero-copy h2 { margin: 0 0 12px; font-size: clamp(25px, 3.65vw, 56px); line-height: 1.35; font-weight: 750; letter-spacing: -.025em; }
.hero-copy mark { padding: 1px 4px 3px; color: #fff; background: var(--text); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-copy > p { margin: 0; color: #555b64; font-size: clamp(15px, 1.8vw, 28px); line-height: 1.5; letter-spacing: -.02em; }
.hero-illustration { width: 100%; height: 100%; max-height: 244px; object-fit: contain; }
html[lang='en'] .hero-copy h2 { font-size: clamp(24px, 2.4vw, 37px); }
html[lang='en'] .hero-copy > p { font-size: clamp(14px, 1.45vw, 23px); }
.messenger-body { display: grid; grid-template-columns: clamp(240px, 21.1vw, 324px) minmax(0, 1fr); flex: 1; min-height: 0; border: 1px solid var(--line); }
.workspace-notice { flex: 0 0 auto; margin: 0 0 8px; border-radius: 0; padding: 7px 20px; font-size: 12px; max-height: 56px; overflow: auto; }
.agent-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: #fff; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px 14px; }
.sidebar-heading h2 { font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; flex: 0 0 auto; padding: 10px; border-radius: 3px; }
.sidebar-heading .icon-button { width: 32px; height: 32px; min-height: 32px; padding: 4px; border-color: var(--text); }
.agent-search { display: flex; align-items: center; gap: 8px; margin: 0 20px 18px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: #fff; }
.agent-search:focus-within { outline: 2px solid #8b9edb; outline-offset: 2px; }
.agent-search .icon { flex: 0 0 auto; width: 20px; height: 20px; }
.agent-search input { min-width: 0; min-height: 40px; padding: 8px 0; border: 0; background: transparent; font-size: 14px; }
.agent-search input:focus { outline: none; box-shadow: none; }
.agent-sidebar > .form-error, .agent-sidebar > .notice { margin: 0 20px 12px; font-size: 12px; }
.sidebar-list-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 0 16px; }
.agent-list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.agent-row { position: relative; display: flex; align-items: center; gap: 20px; padding: 18px 20px; min-height: 82px; border-radius: 0; }
.agent-row + .agent-row::after { content: ''; position: absolute; top: 0; left: 20px; right: 20px; border-top: 1px solid #f0f0f0; }
.agent-row:hover { background: var(--soft); }
.agent-row.selected { background: var(--primarySoft); }
.agent-row.selected::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--text); }
.agent-avatar, .agent-avatar[data-color] { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid var(--text); border-radius: 3px; color: var(--text); background: #fff; font-size: 17px; font-weight: 650; letter-spacing: -.035em; }
button.agent-avatar:hover { background: var(--primarySoft); }
.agent-row-link { display: block; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.agent-row-top { display: flex; align-items: center; gap: 8px; }
.agent-row-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 650; }
.agent-row-status { display: none; }
.agent-row-snippet { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.agent-row-snippet::before { content: ''; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--muted2); }
.agent-row[data-tone='ready'] .agent-row-snippet::before, .agent-row[data-tone='info'] .agent-row-snippet::before { background: var(--ok); }
.agent-row[data-tone='warning'] .agent-row-snippet::before { background: #e5a525; }
.agent-row[data-tone='danger'] .agent-row-snippet::before { background: var(--bad); }
.agent-row-alert { display: block; margin-top: 4px; color: var(--warn); font-size: 11px; }
.sidebar-empty, .search-empty { margin: 16px 12px; padding: 12px; color: var(--muted); font-size: 13px; }
.sidebar-cloud { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; min-height: 60px; padding: 14px 20px; color: var(--text); text-decoration: none; font-size: 13px; }
.sidebar-cloud .icon { width: 35px; height: 35px; flex: 0 0 auto; }
.sidebar-nav { display: none; }
.workspace-content { display: flex; position: relative; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.workspace-content > .view { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px clamp(16px, 3vw, 40px) 40px; }
.workspace-content > .view > .subnav { position: sticky; top: -24px; z-index: 5; background: #fff; padding: 16px 0; }
.workspace-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.workspace-heading h2 { font-size: 24px; }
.workspace-content .back-link { display: inline-flex; min-height: 44px; align-items: center; }
.chat-welcome { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; flex-direction: column; padding: 28px; text-align: center; }
.chat-welcome h2 { font-size: 28px; margin-bottom: 12px; }
.chat-welcome > p:not(.eyebrow) { max-width: 40ch; color: var(--muted); font-size: 14px; }
.welcome-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 24px; color: var(--text); background: var(--primarySoft); border: 1px solid var(--line); border-radius: 3px; }
.welcome-mark .icon { width: 28px; height: 28px; }
.conversation { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 38.3%); flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.conversation-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.conversation-header { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 87px; margin: 0 22px; padding: 14px 0; border-bottom: 1px solid var(--line); background: #fff; }
.conversation-back { display: none; }
.conversation-header > .agent-avatar { display: inline-flex; width: 32px; height: 32px; font-size: 12px; }
.conversation-identity { flex: 1; min-width: 0; }
.conversation-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.conversation-identity h2 { font-size: 22px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.035em; }
.conversation-title .status-badge { border: 0; background: transparent; padding: 0; min-height: 24px; font-size: 12px; }
.conversation-identity .detail-host { margin: 5px 0 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.conversation-actions .icon-button { border-color: transparent; background: transparent; }
.assist-jump { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 8px; font-size: 12px; border-color: transparent !important; }
.assist-jump .assist-badge { margin: 0; border-radius: 2px; background: var(--warnSoft); color: var(--warn); }
.conversation-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 20px 22px; scrollbar-gutter: stable; }
.conversation-scroll:focus-visible { outline: 2px solid #8b9edb; outline-offset: -2px; }
.conversation-intro { max-width: 400px; margin: 4vh auto 24px; text-align: center; }
.conversation-intro .intro-avatar { width: 54px; height: 54px; font-size: 20px; margin: 0 auto 16px; }
.conversation-intro h3 { font-size: 20px; margin-bottom: 8px; }
.conversation-intro p { color: var(--muted); font-size: 13px; }
.chat-list { display: flex; max-height: none; overflow: visible; flex-direction: column; gap: 16px; margin: 0 auto; padding: 0; list-style: none; max-width: 960px; border: 0; background: transparent; }
.chat-message { display: flex; align-items: flex-start; gap: 12px; border: 0; border-radius: 0; padding: 0; margin: 0; background: transparent; }
.chat-message + .chat-message { margin-top: 0; }
.chat-message[data-kind] { background: transparent; }
.chat-message[data-kind] .chat-text { font-weight: 400; }
.chat-message > .message-avatar { display: none; }
.message-content { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; width: 100%; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 3px 0 0; color: var(--muted); font-size: 10px; font-weight: 400; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.chat-kind { color: var(--text); font-size: 13px; font-weight: 500; }
.chat-message[data-kind] .chat-kind { color: var(--text); }
.chat-state { display: none; }
.message-bubble { min-width: 0; width: fit-content; max-width: 100%; border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; background: #fff; }
.chat-text { margin: 0; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message[data-kind='user'] .message-bubble { border-color: transparent; color: var(--text); background: #f1f1f1; }
.chat-message[data-kind='progress'] .message-bubble { background: var(--primarySoft); border-color: var(--accent); }
.chat-day { align-self: flex-start; margin-left: 70px; font-size: 10px; color: var(--muted); padding: 0; background: transparent; }
.preview-bubble { width: 100%; max-width: 410px; padding: 0; overflow: hidden; }
.preview-card { margin: 0; }
.preview-open { display: block; width: 100%; position: relative; padding: 0; border: 0; background: var(--soft); }
.preview-open img { width: 100%; height: auto; max-height: 280px; object-fit: contain; min-height: 60px; }
.preview-open:focus-visible { outline: 2px solid #8b9edb; outline-offset: -3px; }
.preview-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; color: var(--text); font-size: 12px; }
.preview-caption span:last-child { color: var(--muted); font-size: 10px; }
.preview-error { padding: 14px; color: var(--bad); font-size: 12px; }
.conversation-footer { flex: 0 0 auto; padding: 14px 22px max(12px, env(safe-area-inset-bottom)); background: #fff; }
.chat-composer { border: 1px solid var(--text); border-radius: 3px; padding: 0; background: #fff; }
.chat-composer:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.chat-composer textarea { display: block; width: 100%; min-height: 62px; max-height: 120px; padding: 14px 16px 6px; border: 0; border-radius: 3px; resize: none; box-shadow: none; font-size: 14px; line-height: 1.6; }
.chat-composer textarea:focus { box-shadow: none; outline: none; }
.chat-composer textarea::placeholder { color: var(--muted2); }
.chat-composer-toolbar { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 5px 12px 10px; }
.composer-tools { display: flex; align-items: center; gap: 6px; }
.composer-tool { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 7px; font-size: 13px; }
.composer-tool .icon { width: 22px; height: 22px; }
.composer-tool + .composer-tool { position: relative; }
.composer-tool + .composer-tool::before { content: ''; position: absolute; left: -3px; top: 12px; bottom: 12px; border-left: 1px solid var(--line); }
.chat-composer-toolbar .button.ghost { border-color: transparent; color: var(--text); background: transparent; }
.chat-composer-toolbar .button.ghost:hover { background: var(--soft); }
.composer-shortcut { margin: 7px 0 0; color: var(--muted2); font-size: 11px; }
.send-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 0 0 auto; min-height: 44px; border-radius: 2px; font-size: 14px; padding: 8px 16px; }
.send-arrow { font-size: 18px; line-height: 1; }
.composer-hint { font-size: 11px; color: var(--muted); margin: 6px 0 0; }
.composer-hint:not(.is-needed) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.conversation-footer .form-error { margin: 8px 0 0; padding: 8px 12px; }
.new-messages { position: absolute; bottom: 200px; left: 30%; transform: translateX(-50%); z-index: 2; box-shadow: var(--shadow); min-height: 44px; font-size: 12px; }
.new-messages.button:hover:not(:disabled) { transform: translateX(-50%); }
.activity-rail { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); padding: 14px 22px 22px; background: #fff; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.rail-heading h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.rail-preview-button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 0 4px 8px; border: 0; background: transparent !important; font-size: 12px; }
.rail-preview { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.rail-preview:empty { display: none; }
.rail-preview .preview-open img { min-height: 0; max-height: 250px; }
.rail-preview-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 245px; padding: 24px; border: 1px solid var(--line); border-radius: 3px; background: var(--soft); text-align: center; }
.rail-preview-empty > .icon { width: 38px; height: 38px; margin-bottom: 18px; }
.rail-preview-empty p { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.rail-preview-empty span { color: var(--muted); font-size: 12px; }
.browser-dock { border: 1px solid var(--line); border-radius: 3px; padding: 12px; margin-top: 12px; background: #fff; max-height: 320px; overflow: auto; }
.browser-dock-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.browser-dock-heading h3 { font-size: 14px; margin: 0; }
.browser-dock .button { min-height: 40px; padding: 8px 10px; font-size: 12px; }
.browser-dock .field > span { font-size: 11px; }
.browser-dock .browser-controls { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.browser-dock #browserResult { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 11px; }
.rail-assist { margin-top: 20px; }
.rail-assist .rail-heading h3 { font-size: 20px; }
.rail-assist .rail-heading .status-badge { font-size: 10px; min-height: 24px; padding: 2px 6px; }
.assist-list { list-style: none; padding: 0; margin: 0; }
.chat-assist-message { width: 100%; }
.chat-assist-message .assist-card { width: 100%; margin: 0; border-radius: 3px; padding: 16px; background: #fff; box-shadow: none; border-color: var(--line); }
.chat-assist-message .assist-card.pending { border-color: var(--line); }
.chat-assist-message .assist-image { max-height: 240px; object-fit: contain; width: 100%; margin: 0; }
.chat-assist-message .button { min-height: 44px; }
.chat-assist-message .assist-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-assist-message .assist-code-input { flex: 1 1 100%; min-width: 0; max-width: none; }
.chat-assist-message .assist-reply-error { margin: 10px 0 0; }
.chat-assist-message .assist-card-head { flex-wrap: wrap; gap: 6px; }
.chat-assist-message .assist-time { margin-left: auto; font-size: 10px; }
.chat-assist-message .assist-text { font-size: 13px; }
.rail-assist .chat-assist-message + .chat-assist-message { margin-top: 12px; }
.rail-assist .assist-image { max-height: 116px; }
.rail-assist .assist-card { padding: 12px; }
.assist-primary .button { width: 100%; }
.assist-alternatives { margin-top: 8px; }
.assist-alternatives > summary { display: flex; align-items: center; min-height: 36px; color: var(--muted); font-size: 12px; cursor: pointer; }
.assist-alternatives > summary::before { content: '+'; margin-right: 7px; }
.assist-alternatives[open] > summary::before { content: '−'; }
.rail-assist .assist-actions .button { flex: 1 1 auto; font-size: 12px; padding: 7px 10px; }
.rail-assist [data-assist-kind='qr'] [data-assist-action='scanned'] { order: -1; flex-basis: 100%; color: #fff; background: var(--text); border-color: var(--text); }
.chat-assist-notice { display: flex; align-items: center; gap: 12px; margin-left: 70px; border: 1px solid var(--line); border-radius: 3px; padding: 9px 12px; }
.chat-assist-notice > span { min-width: 0; flex: 1; font-size: 12px; color: var(--muted); }
.chat-assist-notice .button { flex: 0 0 auto; min-height: 32px; padding: 4px 8px; border: 0; font-size: 11px; }
.message-preferences { margin-top: 16px; padding: 0; border: 0; box-shadow: none; }
.message-preferences > h3 { display: none; }
.progress-toggle { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 44px; margin: 0; font-size: 12px; }
.progress-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--text); }
.message-preferences .section-help { margin: 0; font-size: 11px; }
.agent-info-dialog { position: fixed; inset: 0 0 0 auto; width: min(480px, 100vw); height: 100dvh; max-height: 100dvh; max-width: 100vw; margin: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 0; background: #fff; color: var(--text); box-shadow: var(--shadow); }
.agent-info-dialog[open] { display: flex; flex-direction: column; }
.agent-info-dialog::backdrop, .preview-dialog::backdrop { background: rgba(0,0,0,.25); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 17px; }
.drawer-body { flex: 1; min-height: 0; padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.profile-identity { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-identity .agent-avatar { width: 60px; height: 60px; font-size: 20px; }
.profile-identity h3 { font-size: 20px; margin: 0 0 8px; overflow-wrap: anywhere; }
.drawer-body .state-card { margin-bottom: 16px; padding: 16px; border-radius: 3px; background: #fff; }
.drawer-body .state-card-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.drawer-body .state-card-head h3 { margin: 0; font-size: 14px; }
.drawer-body .state-card-head .action-row { justify-content: flex-start; gap: 8px; }
.drawer-body .action-row.compact .button { min-height: 44px; }
.drawer-body .detail-row { grid-template-columns: 86px minmax(0, 1fr); font-size: 13px; }
.drawer-body .detail-row dd { white-space: pre-wrap; }
.drawer-body .section-help { font-size: 12px; margin-top: 12px; margin-bottom: 0; }
.drawer-body .progress-toggle { min-height: 44px; }
.message-history { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.message-history > summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.message-history .panel { background: var(--soft); padding: 14px; box-shadow: none; border-radius: 3px; }
.message-history .panel > h3 { display: none; }
.preview-dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 3px; padding: 0; box-shadow: var(--shadow); background: #fff; }
.preview-dialog[open] { display: flex; flex-direction: column; }
.preview-dialog .screenshot-view { margin: 0; min-height: 0; overflow: auto; border: 0; border-radius: 0; padding: 16px; background: var(--soft); }
.preview-dialog .screenshot-view img { max-height: none; border: 0; border-radius: 0; object-fit: contain; }
.toast-region { bottom: 24px; }
.auth-page .sso-login .button { box-shadow: none; }
.auth-page .auth-copy h1 { font-weight: 750; }
.auth-page .topbar-nav, .auth-page .top-new-agent { display: none; }
.confirm-dialog { border: 1px solid var(--line); border-radius: 3px; }
@media (max-width: 1200px) {
  .messenger-body { grid-template-columns: 248px minmax(0, 1fr); }
  .conversation { display: flex; flex-direction: column; }
  .conversation-main { flex: 1; }
  .activity-rail { display: none; }
  .conversation-header > .agent-avatar { display: inline-flex; }
  .new-messages { left: 50%; }
  .hero-copy h1 { font-size: clamp(48px, 6.4vw, 80px); }
  .hero-copy h2 { font-size: clamp(23px, 3vw, 36px); }
  .topbar-nav { gap: 16px; }
  .topbar-actions { gap: 8px; }
  .topbar .refresh-btn { display: none; }
  #mobileBrowserControls .browser-dock { margin: 0 0 12px; max-height: min(260px, 30dvh); }
}
@media (max-width: 900px) {
  .topbar-nav a { font-size: 12px; }
  .topbar-nav { gap: 12px; }
  .topbar .top-new-agent { display: none; }
  .topbar .account-name-inline { max-width: 6em; }
  .workspace-hero { grid-template-columns: 1.15fr 1fr; gap: 16px; padding-left: 16px; padding-right: 12px; }
  .hero-copy > p { font-size: 14px; }
  .messenger-body { grid-template-columns: 225px minmax(0, 1fr); }
  .agent-row { gap: 12px; padding: 14px 16px; }
  .sidebar-heading { padding: 14px 16px; }
  .sidebar-heading h2 { font-size: 19px; }
  .agent-search { margin-left: 16px; margin-right: 16px; }
  .conversation-title { gap: 10px; }
  .conversation-identity h2 { font-size: 18px; }
  .assist-jump > span:first-child { display: none; }
  .conversation-header { margin: 0 16px; }
  .conversation-footer { padding-left: 16px; padding-right: 16px; }
  .conversation-scroll { padding-left: 16px; padding-right: 16px; }
}
@media (max-height: 760px) and (min-width: 761px) {
  .workspace-hero { flex-basis: 165px; padding-top: 12px; padding-bottom: 16px; }
  .hero-copy h1 { font-size: 58px; margin-bottom: 6px; }
  .hero-copy h2, html[lang='en'] .hero-copy h2 { font-size: 26px; margin-bottom: 6px; }
  .hero-copy > p, html[lang='en'] .hero-copy > p { font-size: 16px; }
  .hero-illustration { max-height: 137px; }
}
@media (max-width: 760px) {
  body:not(.auth-page) .topbar { flex-basis: 56px; height: 56px; margin: 0; border-left: 0; border-right: 0; padding: 0 14px; }
  .topbar .brand-name { font-size: 22px; }
  .topbar-actions { gap: 2px; }
  .topbar-nav, .topbar .top-new-agent { display: none; }
  .topbar .language-switch { min-height: 44px; padding: 8px; }
  .account-menu > summary { min-height: 44px; padding: 6px; }
  .account-name-inline { max-width: 5em; font-size: 11px; }
  .messenger { margin: 0; }
  .workspace-hero { flex-basis: 165px; grid-template-columns: minmax(0, 1fr) 34%; gap: 8px; padding: 18px 16px; }
  .hero-copy h1 { font-size: clamp(31px, 7vw, 50px); margin-bottom: 10px; }
  .hero-copy h2, html[lang='en'] .hero-copy h2 { font-size: clamp(16px, 3.7vw, 24px); margin-bottom: 8px; }
  .hero-copy > p, html[lang='en'] .hero-copy > p { font-size: 11px; line-height: 1.6; }
  .hero-illustration { max-height: 110px; }
  .messenger.has-content .workspace-hero { display: none; }
  .messenger-body { display: flex; border: 0; }
  .agent-sidebar { width: 100%; border: 0; }
  .workspace-content { display: none; }
  .messenger.has-content .agent-sidebar { display: none; }
  .messenger.has-content .workspace-content { display: flex; width: 100%; }
  .sidebar-heading { padding-top: 16px; }
  .sidebar-heading .icon-button { width: 44px; height: 44px; min-height: 44px; padding: 10px; }
  .agent-row { gap: 16px; padding: 14px 20px; }
  .agent-row-name { font-size: 16px; }
  .agent-row-snippet { font-size: 13px; }
  .sidebar-cloud { border-top: 1px solid var(--line); min-height: 48px; padding: 8px 16px; }
  .sidebar-cloud .icon { width: 26px; height: 26px; }
  .sidebar-nav { display: flex; gap: 8px; padding: 6px 16px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .sidebar-nav a { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 13px; }
  .sidebar-nav a.active { color: var(--text); background: var(--primarySoft); }
  .workspace-content > .view { padding: 16px 12px 32px; }
  .workspace-content > .view > .subnav { top: -16px; }
  .workspace-notice { padding: 7px 12px; margin: 0; border-width: 0 0 1px; max-height: 54px; }
  .conversation-back { display: inline-flex; background: transparent !important; border-color: transparent !important; width: 44px; padding: 8px; }
  .conversation-header { gap: 8px; margin: 0; padding: 10px 12px 10px 4px; min-height: 74px; }
  .conversation-header > .agent-avatar { width: 36px; height: 36px; font-size: 14px; }
  .conversation-title { gap: 6px; }
  .conversation-identity h2 { font-size: 15px; }
  .conversation-title .status-badge { font-size: 10px; }
  .conversation-identity .detail-host { font-size: 11px; max-width: 34ch; }
  .conversation-actions { gap: 0; }
  .conversation-actions .icon-button { width: 36px; padding: 8px; }
  .assist-jump { padding: 6px; }
  .conversation-scroll { padding: 18px 12px; scrollbar-gutter: auto; }
  .message-content { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
  .chat-kind { font-size: 11px; }
  .chat-time { font-size: 9px; }
  .message-bubble { padding: 10px 12px; }
  .chat-day { margin-left: 48px; }
  .chat-text { font-size: 14px; }
  .conversation-footer { padding: 10px 12px max(8px, env(safe-area-inset-bottom)); }
  .chat-composer-toolbar { gap: 4px; padding: 4px 6px 6px; }
  .chat-composer textarea { padding: 12px 12px 4px; font-size: 16px; max-height: 96px; }
  .messenger input { font-size: 16px; }
  .composer-tool { padding: 8px 6px; gap: 5px; font-size: 12px; }
  .browser-tool-label { display: none; }
  .send-button { padding: 8px 12px; font-size: 13px; max-width: 118px; }
  .send-button .button-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .composer-shortcut { font-size: 10px; }
  .composer-hint { font-size: 10px; }
  .browser-dock { padding: 12px; }
  .browser-dock .browser-controls { grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
  .new-messages { bottom: 170px; }
  .drawer-body { padding: 20px 16px; }
  .drawer-header { padding: 12px 16px; }
  .drawer-body .detail-row { grid-template-columns: 1fr; gap: 4px; }
  .preview-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .toast-region { right: 12px; bottom: 190px; font-size: 12px; }
}
@media (max-width: 380px) {
  .conversation-header > .agent-avatar { display: none; }
  .conversation-title { flex-wrap: wrap; gap: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
