:root {
--sidebar: #f2f3f5;
--surface: #ffffff;
--surface-soft: #f7f7f8;
--border: #dedfe2;
--border-soft: #e9e9eb;
--text: #202124;
--muted: #6d7178;
--hint: #93979d;
--accent: #1267d6;
--accent-soft: #e3efff;
--danger: #c9342d;
--success: #25845b;
--file-preview-bg: #f7f7f8;
--file-preview-text: #202124;
--code-bg: #f6f8fa;
--code-text: #24292f;
--code-border: #d8dee4;
--command-prompt: #28704d;
--tool-error-text: #b4231c;
--diff-remove-bg: #ffebe9;
--diff-remove-text: #9c302b;
--diff-add-bg: #dafbe1;
--diff-add-text: #236b47;
}
@media (prefers-color-scheme: dark) {
:root {
--file-preview-bg: #202328;
--file-preview-text: #e1e4e8;
--code-bg: #202328;
--code-text: #e1e4e8;
--code-border: #363a40;
--command-prompt: #72b98f;
--tool-error-text: #f3aaa5;
--diff-remove-bg: #3d2022;
--diff-remove-text: #ffb4ae;
--diff-add-bg: #173528;
--diff-add-text: #8ed5ad;
}
}
.app-shell { display: grid; grid-template-columns: 292px minmax(0, 1fr); width: 100%; height: 100dvh; background: var(--surface); }
button { border: 0; background: none; cursor: pointer; }
.icon-button { display: inline-grid; width: 36px; height: 36px; place-items: center; padding: 0; border-radius: 6px; color: var(--muted); }
.icon-button:hover { background: #e7e8eb; color: var(--text); }
.sidebar { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--border); background: var(--sidebar); padding: max(14px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.brand-row { display: flex; height: 42px; align-items: center; gap: 10px; padding: 0 5px; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 7px; background: #202124; color: white; }
.brand-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 14px; font-weight: 650; }
.brand-copy span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.new-mobile { display: none; }
.new-chat { display: flex; width: 100%; height: 40px; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; border: 1px solid #cacdd1; border-radius: 6px; background: var(--surface); font-size: 13px; font-weight: 600; box-shadow: 0 1px 1px rgb(0 0 0 / 3%); }
.new-chat:hover { border-color: #aeb2b7; background: #fafafa; }
.search-box { display: flex; height: 38px; align-items: center; gap: 8px; margin-top: 12px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px; background: #e7e8eb; color: var(--muted); }
.search-box:focus-within { border-color: #a9c9f5; background: var(--surface); box-shadow: 0 0 0 2px rgb(18 103 214 / 10%); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box button { display: grid; padding: 2px; place-items: center; color: var(--muted); }
.session-scroll { min-height: 0; flex: 1; margin: 12px -4px 0; overflow-y: auto; padding: 0 4px; scrollbar-width: thin; }
.session-group { margin-bottom: 17px; }
.session-group h2 { margin: 0 8px 5px; color: var(--hint); font-size: 11px; font-weight: 650; text-transform: uppercase; }
.project-heading { display: flex; min-width: 0; height: 34px; align-items: center; justify-content: space-between; padding: 0 5px 0 8px; color: var(--muted); }
.project-heading > span { display: flex; min-width: 0; align-items: center; gap: 7px; overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.project-heading button { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 5px; color: var(--muted); }
.project-heading button:hover { background: #dfe1e4; color: var(--text); }
.project-empty { padding: 8px 10px 12px; color: var(--hint); font-size: 11px; }
.session-row { position: relative; display: flex; min-height: 54px; align-items: center; border-radius: 6px; }
.session-row:hover { background: #e6e7e9; }
.session-row.active { background: #dfe2e7; }
.session-main { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: flex-start; padding: 9px 34px 9px 10px; text-align: left; }
.session-title { width: 100%; overflow: hidden; font-size: 13px; font-weight: 540; text-overflow: ellipsis; white-space: nowrap; }
.session-time { margin-top: 3px; color: var(--hint); font-size: 11px; }
.row-menu-button { position: absolute; right: 5px; display: none; width: 30px; height: 30px; place-items: center; border-radius: 5px; color: var(--muted); }
.session-row:hover .row-menu-button, .row-menu-button:focus { display: grid; }
.row-menu-button:hover { background: #d4d6da; }
.row-menu { position: absolute; z-index: 5; top: 43px; right: 4px; width: 132px; padding: 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }
.row-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px; border-radius: 4px; font-size: 13px; text-align: left; }
.row-menu button:hover { background: var(--surface-soft); }
.row-menu .danger { color: var(--danger); }
.sidebar-settings { display: flex; width: 100%; height: 38px; flex: none; align-items: center; gap: 8px; margin-top: 5px; padding: 0 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; text-align: left; }
.sidebar-settings:hover { color: var(--text); }
.sidebar-settings.active { background: #dfe2e7; color: var(--text); }
.brain-status { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.brain-status.offline { color: var(--danger); }
.brain-status.offline .status-dot { background: var(--danger); box-shadow: 0 0 0 3px rgb(201 52 45 / 12%); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgb(37 132 91 / 12%); }
.empty-list { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 42px 12px; color: var(--hint); font-size: 12px; }
.session-skeleton { height: 46px; margin: 6px 4px; border-radius: 5px; background: linear-gradient(90deg, #e5e6e8, #ececee, #e5e6e8); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.conversation { position: relative; display: grid; min-width: 0; height: 100dvh; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); }
.conversation-header { display: flex; min-height: 64px; align-items: center; padding: max(8px, env(safe-area-inset-top)) 22px 8px; border-bottom: 1px solid var(--border-soft); background: rgb(255 255 255 / 92%); }
.conversation-title { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: flex-start; }
.conversation-title > button { display: flex; max-width: 100%; align-items: center; gap: 7px; padding: 1px 0; overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.conversation-title > button svg { flex: none; opacity: 0; color: var(--hint); }
.conversation-title > button:hover svg { opacity: 1; }
.conversation-title > span { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 11px; }
.conversation-title i { width: 6px; height: 6px; border-radius: 50%; background: #c88a23; }
.conversation-title i.online { background: var(--success); }
.header-menu { margin-left: auto; }
.conversation-header > .icon-button:not(.mobile-back) + .header-menu { margin-left: 2px; }
.mobile-back { display: none; flex: none; margin-right: 5px; }
.connection-banner { position: absolute; z-index: 4; top: 64px; right: 0; left: 0; padding: 7px 16px; background: #fff4dc; color: #875c14; font-size: 12px; text-align: center; }
.timeline { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.thread { width: min(100%, 1280px); min-height: 100%; margin: 0 auto; padding: 34px clamp(14px, 2.5vw, 34px) 54px; }
.message { display: flex; width: 100%; margin-bottom: 26px; }
.message.assistant { justify-content: flex-start; }
.message.user { justify-content: flex-end; }
.assistant-message-body { min-width: 0; max-width: 100%; }
.message-content { min-width: 0; max-width: 100%; font-size: 14px; line-height: 1.72; }
.message.user .message-content { max-width: min(78%, 620px); padding: 10px 13px; border-radius: 8px 8px 2px 8px; background: #edf0f3; }
.message-content > :first-child { margin-top: 0; }
.message-content > :last-child { margin-bottom: 0; }
.message-content p { margin: 0 0 12px; white-space: pre-wrap; }
.message-content ul, .message-content ol { padding-left: 22px; }
.message-content a { color: var(--accent); }
.message-content pre { max-width: 100%; overflow-x: auto; padding: 14px; border: 1px solid var(--code-border); border-radius: 6px; background: var(--code-bg); color: var(--code-text); font-size: 12px; line-height: 1.6; }
.markdown-code-block { max-width: 100%; margin: 12px 0; overflow: hidden; border: 1px solid var(--code-border); border-radius: 6px; background: var(--code-bg); }
.code-block-toolbar { display: flex; height: 34px; align-items: center; justify-content: space-between; padding: 0 7px 0 12px; border-bottom: 1px solid var(--code-border); color: var(--muted); font-size: 10px; }
.code-block-toolbar > span { overflow: hidden; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.code-block-toolbar button { display: inline-flex; height: 26px; flex: none; align-items: center; gap: 5px; padding: 0 6px; border-radius: 4px; color: var(--muted); font-size: 10px; }
.code-block-toolbar button:hover, .code-block-toolbar button:focus-visible { background: var(--surface); color: var(--text); }
.message-content .markdown-code-block pre { margin: 0; border: 0; border-radius: 0; }
.message-content code:not(pre code) { padding: 2px 5px; border-radius: 4px; background: #eceef0; color: #a42c24; font-size: .9em; }
.message-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.message-content th, .message-content td { padding: 7px 10px; border: 1px solid var(--border); }
.message-footer { display: flex; min-height: 24px; align-items: center; gap: 5px; margin-top: 5px; color: var(--hint); font-size: 10px; }
.message-copy { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 4px; color: var(--hint); }
.message-copy:hover, .message-copy:focus-visible { background: var(--surface-soft); color: var(--text); }
.reasoning, .tool-call { width: 100%; margin: -11px 0 24px; border: 1px solid var(--border-soft); border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.reasoning summary, .tool-call summary { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 5px 11px; cursor: pointer; list-style: none; }
.reasoning summary svg:last-child, .tool-call summary svg:last-child { margin-left: auto; transition: transform .15s; }
.reasoning[open] summary svg:last-child, .tool-call[open] summary svg:last-child { transform: rotate(180deg); }
.reasoning > div { padding: 0 12px 12px; white-space: pre-wrap; }
.tool-call.error { border-color: #e8b5b1; }
.tool-icon { display: grid; width: 25px; height: 25px; flex: none; place-items: center; border-radius: 5px; background: #e7eaee; color: #4d5662; }
.tool-read .tool-icon { background: #e4eef9; color: #346b9f; }
.tool-write .tool-icon { background: #e4f2ea; color: #28704d; }
.tool-edit .tool-icon { background: #f5ebd9; color: #8a6224; }
.tool-bash .tool-icon { background: #e9e7ef; color: #5c5277; }
.tool-summary-copy { display: flex; min-width: 0; flex: 1; align-items: baseline; gap: 9px; }
.tool-summary-copy strong { flex: none; color: var(--text); font-size: 12px; font-weight: 650; }
.tool-summary-copy > span { min-width: 0; overflow: hidden; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.tool-state { flex: none; color: var(--hint); font-size: 10px; }
.tool-call.error .tool-state { color: var(--danger); }
.tool-body { border-top: 1px solid var(--border-soft); background: var(--surface); }
.tool-body pre { max-height: 320px; margin: 0; overflow: auto; padding: 11px 12px; font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-meta { padding: 8px 12px; border-bottom: 1px solid var(--border-soft); color: var(--hint); }
.tool-code { color: var(--text); }
.tool-command, .tool-output { background: var(--code-bg); color: var(--code-text); }
.tool-command + .tool-output { border-top: 1px solid var(--code-border); }
.tool-command span { color: var(--command-prompt); user-select: none; }
.tool-result { max-height: 180px; overflow: auto; padding: 9px 12px; border-top: 1px solid var(--border-soft); color: var(--muted); line-height: 1.55; white-space: pre-wrap; }
.tool-diff + .tool-diff { border-top: 1px solid var(--border-soft); }
.tool-diff .diff-remove { background: var(--diff-remove-bg); color: var(--diff-remove-text); }
.tool-diff .diff-add { border-top: 1px solid var(--code-border); background: var(--diff-add-bg); color: var(--diff-add-text); }
.tool-call.error .tool-output, .tool-call.error .tool-result { color: var(--tool-error-text); }
.thinking-row { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.thinking-row > span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite ease-in-out; }
.thinking-row > span:nth-child(2) { animation-delay: .15s; }.thinking-row > span:nth-child(3) { animation-delay: .3s; }
.thinking-row em { margin-left: 6px; font-size: 12px; font-style: normal; }
@keyframes pulse { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }
.thread-empty { display: flex; min-height: 55vh; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.thread-empty .empty-icon { display: grid; width: 48px; height: 48px; margin-bottom: 15px; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); color: var(--text); }
.thread-empty strong { color: var(--text); font-size: 15px; }.thread-empty span { margin-top: 5px; font-size: 12px; }
.message-loading { display: flex; justify-content: center; gap: 6px; padding-top: 25vh; }.message-loading span { width: 6px; height: 6px; border-radius: 50%; background: var(--hint); animation: pulse 1.2s infinite; }
.jump-bottom { position: sticky; bottom: 14px; left: calc(50% - 18px); display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); box-shadow: 0 4px 12px rgb(0 0 0 / 10%); }
.empty-conversation { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--hint); gap: 7px; }.empty-conversation strong { margin-top: 8px; color: var(--text); }
.file-browser-backdrop { display: none; }
.file-browser { position: absolute; z-index: 10; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--surface); }
.file-browser-header { display: flex; min-height: 54px; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--border-soft); }
.file-browser-header > div { display: flex; align-items: center; gap: 9px; }
.file-browser-header strong { font-size: 14px; }
.file-browser-title { min-width: 0; flex: 1; }
.file-browser-title > svg, .file-browser-title > strong { flex: none; }
.file-browser-title code { min-width: 0; overflow-x: auto; padding: 4px 6px; color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; scrollbar-width: thin; white-space: nowrap; }
.file-browser-header > div:last-child { flex: none; }
.breadcrumbs { display: flex; min-height: 42px; align-items: center; gap: 2px; overflow-x: auto; padding: 0 14px; border-bottom: 1px solid var(--border-soft); color: var(--muted); scrollbar-width: none; }
.breadcrumbs span { display: flex; align-items: center; gap: 2px; }
.breadcrumbs button { max-width: 140px; padding: 5px 3px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs button:hover { color: var(--text); }
.file-list { min-height: 0; overflow-y: auto; padding: 6px 8px 14px; }
.file-row { display: grid; width: 100%; min-height: 42px; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 5px; text-align: left; }
.file-row:hover { background: var(--surface-soft); }
.file-row > svg:first-child { color: var(--muted); }
.file-row span { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.file-row small { color: var(--hint); font-size: 11px; }
.files-empty { padding: 54px 12px; color: var(--hint); font-size: 12px; text-align: center; }
.file-error { position: absolute; z-index: 2; top: 103px; right: 12px; left: 12px; padding: 9px 10px; border: 1px solid #e8b5b1; border-radius: 5px; background: #fff3f2; color: var(--danger); font-size: 12px; box-shadow: 0 4px 12px rgb(0 0 0 / 8%); }
.files-loading { position: absolute; inset: 97px 0 auto; display: flex; justify-content: center; gap: 5px; padding: 14px; background: rgb(255 255 255 / 86%); }
.files-loading span { width: 5px; height: 5px; border-radius: 50%; background: var(--hint); animation: pulse 1.2s infinite; }
.file-preview { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
.file-preview-heading { display: grid; min-height: 48px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 10px; border-bottom: 1px solid var(--border-soft); }
.file-preview-heading > span { overflow: hidden; font-size: 12px; font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.file-preview-heading small { margin-left: 7px; color: var(--hint); font-weight: 400; }
.back-to-files { display: flex; height: 34px; align-items: center; gap: 5px; padding: 0 7px; border-radius: 5px; color: var(--muted); font-size: 12px; }
.back-to-files:hover { background: var(--surface-soft); color: var(--text); }
.file-preview pre { min-width: 0; min-height: 0; margin: 0; overflow: auto; padding: 16px; background: var(--file-preview-bg); color: var(--file-preview-text); font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 4; white-space: pre; }
.composer-shell { position: relative; z-index: 2; padding: 8px max(24px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); background: linear-gradient(to bottom, rgb(255 255 255 / 0%), var(--surface) 12px); }
.composer, .attachments, .composer-note, .settings-popover { width: min(100%, 1180px); margin-right: auto; margin-left: auto; }
.composer { overflow: hidden; border: 1px solid #cfd1d5; border-radius: 8px; background: var(--surface); box-shadow: 0 4px 18px rgb(0 0 0 / 7%); }
.composer:focus-within { border-color: #91b8ec; box-shadow: 0 0 0 2px rgb(18 103 214 / 10%), 0 4px 18px rgb(0 0 0 / 6%); }
.composer textarea { display: block; width: 100%; min-height: 48px; max-height: 180px; resize: none; border: 0; outline: 0; padding: 14px 15px 6px; background: transparent; color: var(--text); font-size: 14px; line-height: 1.5; }
.composer textarea::placeholder { color: var(--hint); }
.composer-toolbar { display: flex; min-height: 43px; align-items: center; justify-content: space-between; padding: 4px 7px 7px; }
.toolbar-group { display: flex; min-width: 0; align-items: center; gap: 3px; }
.model-button { display: flex; min-width: 0; max-width: 240px; height: 34px; align-items: center; gap: 6px; padding: 0 8px; border-radius: 6px; color: var(--muted); font-size: 12px; }
.model-button:hover { background: var(--surface-soft); color: var(--text); }.model-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-button { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 6px; background: var(--text); color: white; }.send-button:disabled { cursor: default; opacity: .25; }
.stop-button { display: flex; height: 34px; align-items: center; gap: 7px; padding: 0 10px; border-radius: 6px; background: var(--text); color: white; font-size: 12px; }
.composer-note { padding-top: 5px; color: var(--hint); font-size: 10px; text-align: center; }
.attachments { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 7px; }
.attachment { display: flex; min-width: 0; max-width: 230px; flex: none; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-soft); font-size: 11px; }.attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.attachment button { display: grid; padding: 0; place-items: center; color: var(--muted); }
.settings-popover { position: absolute; right: 24px; bottom: calc(100% - 4px); left: 24px; max-width: 430px; padding: 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); box-shadow: 0 12px 35px rgb(0 0 0 / 14%); }
.popover-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; font-weight: 650; }.popover-heading button { display: grid; padding: 3px; place-items: center; color: var(--muted); }
.settings-popover label { display: grid; grid-template-columns: 90px 1fr; align-items: center; margin-top: 8px; color: var(--muted); font-size: 12px; }.settings-popover select { min-width: 0; height: 36px; border: 1px solid var(--border); border-radius: 5px; outline: 0; padding: 0 9px; background: var(--surface); color: var(--text); }
.dialog-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; padding: 20px; place-items: center; background: rgb(20 22 25 / 42%); }
.dialog { width: min(100%, 410px); padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 18px 50px rgb(0 0 0 / 22%); }.dialog h2 { margin: 0 0 15px; font-size: 16px; }.dialog p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }.dialog input { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 6px; outline: 0; padding: 0 10px; }.dialog input:focus { border-color: var(--accent); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }.dialog-actions button { min-width: 70px; height: 36px; border: 1px solid var(--border); border-radius: 6px; padding: 0 13px; }.dialog-actions .primary { border-color: var(--accent); background: var(--accent); color: white; }.dialog-actions .danger { border-color: var(--danger); background: var(--danger); color: white; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dialog-heading h2 { margin: 0; }
.directory-dialog { display: flex; width: min(100%, 620px); height: min(680px, calc(100dvh - 40px)); flex-direction: column; }
.directory-current { display: block; flex: none; overflow-x: auto; padding: 9px 10px; border: 1px solid var(--border-soft); border-radius: 5px; background: var(--surface-soft); color: var(--muted); font-size: 12px; white-space: nowrap; }
.directory-list { min-height: 0; flex: 1; overflow-y: auto; margin-top: 10px; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 5px 0; }
.directory-list > button { display: grid; width: 100%; min-height: 40px; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 5px; text-align: left; }
.directory-list > button:hover { background: var(--surface-soft); }
.directory-list > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-list > div { padding: 40px 8px; color: var(--hint); font-size: 12px; text-align: center; }
.directory-error { margin-top: 8px; color: var(--danger); font-size: 12px; }
.directory-dialog .dialog-actions { flex: none; }
.new-session-dialog { width: min(100%, 480px); }
.session-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.session-mode button { display: flex; height: 38px; align-items: center; justify-content: center; gap: 7px; border-radius: 5px; color: var(--muted); font-size: 13px; }
.session-mode button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); font-weight: 600; }
.session-mode button:disabled { cursor: default; opacity: .35; }
.worktree-name { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.worktree-name input { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 6px; outline: 0; padding: 0 10px; color: var(--text); }
.worktree-name input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(18 103 214 / 10%); }
.dialog-note { margin: 13px 0 0; color: var(--hint); font-size: 12px; }
.settings-page { display: grid; min-width: 0; height: 100dvh; grid-template-rows: 64px minmax(0, 1fr); background: var(--surface); }
.settings-header { display: flex; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--border-soft); }
.settings-header h1 { margin: 0; font-size: 16px; }
.settings-layout { display: grid; min-height: 0; grid-template-columns: 190px minmax(0, 1fr); }
.settings-nav { display: flex; flex-direction: column; gap: 3px; padding: 20px 12px; border-right: 1px solid var(--border-soft); background: var(--surface-soft); }
.settings-nav button { display: flex; height: 38px; align-items: center; gap: 9px; padding: 0 11px; border-radius: 6px; color: var(--muted); font-size: 13px; text-align: left; }
.settings-nav button:hover { background: #e9eaec; color: var(--text); }
.settings-nav button.active { background: #dfe5ed; color: var(--text); font-weight: 600; }
.settings-content { width: min(100%, 820px); overflow-y: auto; padding: 36px 42px 70px; }
.settings-content h2 { margin: 0 0 24px; font-size: 20px; }
.settings-rows { border-top: 1px solid var(--border); }
.settings-rows > div { display: grid; min-height: 54px; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 20px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.settings-rows span { color: var(--muted); }
.settings-rows code, .settings-rows strong { min-width: 0; overflow-x: auto; color: var(--text); font-size: 12px; font-weight: 500; text-align: right; white-space: nowrap; }
.account-status { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.account-status > .status-dot { width: 9px; height: 9px; flex: none; }
.account-status > div { display: flex; flex-direction: column; gap: 4px; }
.account-status strong { font-size: 14px; }.account-status span { color: var(--muted); font-size: 12px; }
.account-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.logout-button { display: flex; height: 38px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #e2b5b2; border-radius: 6px; color: var(--danger); font-size: 13px; font-weight: 600; }
.logout-button:hover { background: #fff3f2; }
.logout-button:disabled { cursor: default; opacity: .55; }
.settings-subnav { display: flex; gap: 2px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.settings-subnav button { min-width: 88px; height: 36px; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; }
.settings-subnav button.active { border-color: var(--text); color: var(--text); font-weight: 650; }
.pi-defaults { display: grid; gap: 16px; }
.pi-defaults > label { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
.pi-defaults select { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; background: var(--surface); color: var(--text); }
.pi-settings-actions { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.pi-settings-actions > span { min-width: 0; overflow: hidden; color: var(--hint); font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.primary-action { display: inline-flex; height: 34px; flex: none; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border-radius: 5px; background: var(--text); color: var(--surface); font-size: 12px; }
.primary-action:disabled { cursor: default; opacity: .45; }
.provider-manager { min-width: 0; }
.provider-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.provider-toolbar > span { color: var(--muted); font-size: 12px; }
.provider-toolbar > div { display: flex; gap: 8px; }
.provider-toolbar button, .models-heading button { display: inline-flex; height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; color: var(--text); font-size: 12px; }
.provider-toolbar button:hover, .models-heading button:hover { background: var(--surface-soft); }
.provider-toolbar .primary-action { border-color: var(--text); background: var(--text); color: var(--surface); }
.provider-list { display: grid; gap: 32px; }
.provider-section { border-top: 1px solid var(--border); }
.provider-section > header { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; }
.provider-section > header > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.provider-section header strong { font-size: 13px; }.provider-section header span, .provider-section header small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.danger-icon { color: var(--danger); }
.provider-fields, .model-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.provider-fields label, .model-fields label { display: grid; min-width: 0; gap: 6px; }
.provider-fields label > span, .model-fields label > span { color: var(--muted); font-size: 11px; }
.provider-fields input, .model-fields input:not([type="checkbox"]) { width: 100%; height: 36px; min-width: 0; border: 1px solid var(--border); border-radius: 5px; outline: 0; padding: 0 9px; background: var(--surface); color: var(--text); font-size: 12px; }
.provider-fields input:focus, .model-fields input:focus { border-color: #8cadcf; box-shadow: 0 0 0 2px rgb(18 103 214 / 7%); }
.wide-field { grid-column: 1 / -1; }
.secret-input { display: grid; grid-template-columns: minmax(0, 1fr) 36px; }
.secret-input input { border-radius: 5px 0 0 5px; }
.secret-input button { display: grid; place-items: center; border: 1px solid var(--border); border-left: 0; border-radius: 0 5px 5px 0; color: var(--muted); }
.models-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding: 14px 0 9px; border-top: 1px solid var(--border-soft); }
.models-heading > strong { font-size: 12px; }
.models-heading button { height: 30px; font-size: 11px; }
.model-editor-list { border-bottom: 1px solid var(--border); }
.model-editor { padding: 15px 0 18px; border-top: 1px solid var(--border-soft); }
.model-editor-heading { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.model-editor-heading strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.model-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.toggle-field { align-content: start; }
.toggle-field input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--text); }
.models-empty { padding: 25px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border); color: var(--hint); font-size: 11px; text-align: center; }
.source-toolbar { display: flex; min-width: 0; align-items: center; gap: 8px; margin-bottom: 8px; }
.source-toolbar > code { min-width: 0; flex: 1; overflow: hidden; color: var(--hint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.source-toolbar > button:not(.primary-action), .source-switch button { height: 30px; padding: 0 9px; border-radius: 4px; color: var(--muted); font-size: 11px; }
.source-toolbar > button:not(.primary-action):hover, .source-switch button:hover { background: var(--surface-soft); color: var(--text); }
.source-switch { display: flex; flex: none; padding: 2px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-soft); }.source-switch button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
.config-editor { display: block; width: 100%; height: min(58vh, 560px); resize: vertical; border: 1px solid var(--code-border); border-radius: 6px; outline: 0; padding: 14px; background: var(--code-bg); color: var(--code-text); font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.config-editor:focus { border-color: #9bbde9; box-shadow: 0 0 0 2px rgb(18 103 214 / 8%); }
.pi-settings-status { margin-top: 12px; color: var(--danger); font-size: 12px; }.pi-settings-status.success { color: var(--success); }
.pi-settings-loading { display: flex; justify-content: center; gap: 5px; padding: 80px 0; }.pi-settings-loading span { width: 5px; height: 5px; border-radius: 50%; background: var(--hint); animation: pulse 1.2s infinite; }
.settings-empty { padding: 54px 12px; color: var(--hint); font-size: 12px; text-align: center; }
.about-product { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.about-product > div:last-child { display: flex; flex-direction: column; gap: 3px; }
.about-product strong { font-size: 15px; }.about-product span { color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
.app-shell { display: block; }
.sidebar, .conversation, .settings-page { width: 100%; height: 100dvh; }
.conversation, .settings-page { display: none; }
.app-shell.show-conversation .sidebar { display: none; }
.app-shell.show-conversation .conversation, .app-shell.show-conversation .settings-page { display: grid; }
.sidebar { border-right: 0; padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
.brand-row { height: 48px; }.brand-copy strong { font-size: 14px; }.brand-copy span { max-width: 160px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.new-mobile { display: grid; }.new-chat { display: none; }
.search-box { margin-top: 10px; }
.session-scroll { margin-top: 15px; }
.session-row { min-height: 62px; border-bottom: 1px solid rgb(222 223 226 / 65%); border-radius: 0; }
.session-row.active { background: transparent; }
.session-main { padding: 10px 42px 10px 8px; }.session-title { font-size: 14px; }.session-time { font-size: 12px; }
.row-menu-button { display: grid; width: 38px; height: 38px; }
.sidebar-settings { padding-bottom: env(safe-area-inset-bottom); }
.conversation-header { min-height: 58px; padding-right: max(8px, env(safe-area-inset-right)); padding-left: max(8px, env(safe-area-inset-left)); }
.mobile-back { display: grid; }.conversation-title > button { font-size: 13px; }.conversation-title > button svg { display: none; }
.thread { padding: 22px max(10px, env(safe-area-inset-right)) 36px max(10px, env(safe-area-inset-left)); }
.message { margin-bottom: 22px; }.message-content { font-size: 14px; line-height: 1.65; }
.message.user .message-content { max-width: 86%; }
.tool-summary-copy { display: block; }
.tool-summary-copy > span { display: block; margin-top: 2px; }
.tool-state { display: none; }
.tool-body pre { max-height: 250px; }
.composer-shell { padding: 6px max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
.composer { border-radius: 7px; }.composer textarea { font-size: 16px; }
.composer-note { display: none; }.model-button { max-width: 175px; }
.settings-popover { right: max(10px, env(safe-area-inset-right)); bottom: calc(100% + 1px); left: max(10px, env(safe-area-inset-left)); max-width: none; }
.dialog-backdrop { align-items: end; padding: 0; }.dialog { width: 100%; padding: 20px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border-radius: 8px 8px 0 0; }
.directory-dialog { height: min(82dvh, 680px); }
.settings-page { grid-template-rows: 58px minmax(0, 1fr); }
.settings-header { padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(8px, env(safe-area-inset-left)); }
.settings-header .mobile-back { display: grid; margin-right: 5px; }
.settings-layout { display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
.settings-nav { flex-direction: row; padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.settings-nav button { min-width: 96px; flex: 1; justify-content: center; }
.settings-content { width: 100%; padding: 25px max(18px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
.settings-content h2 { margin-bottom: 18px; font-size: 18px; }
.settings-rows > div { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.pi-defaults > label { grid-template-columns: 1fr; gap: 7px; }
.pi-settings-actions { align-items: stretch; flex-direction: column; }.pi-settings-actions .primary-action { width: 100%; }
.provider-toolbar { align-items: stretch; flex-direction: column; }.provider-toolbar > div { display: grid; grid-template-columns: 1fr 1fr; }.provider-toolbar button { width: 100%; }
.provider-list { gap: 26px; }.provider-fields, .model-fields { grid-template-columns: 1fr; }.wide-field { grid-column: auto; }
.source-toolbar { flex-wrap: wrap; }.source-toolbar > code { width: 100%; flex-basis: 100%; order: 3; }.source-switch { flex: 1; }.source-switch button { flex: 1; }
.config-editor { height: 52vh; font-size: 11px; }
.file-browser-backdrop { position: fixed; inset: 0; }
.file-browser { position: fixed; top: 0; width: 100%; border-left: 0; padding-top: env(safe-area-inset-top); }
.file-browser-header { padding-right: max(8px, env(safe-area-inset-right)); padding-left: max(14px, env(safe-area-inset-left)); }
.file-list { padding-right: max(6px, env(safe-area-inset-right)); padding-bottom: max(14px, env(safe-area-inset-bottom)); padding-left: max(6px, env(safe-area-inset-left)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; } }