:root {
  color-scheme: dark;
  --bg: #212121;
  --sidebar: #171717;
  --surface: #2f2f2f;
  --surface-hover: #383838;
  --surface-soft: #262626;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ececec;
  --muted: #a4a4a4;
  --subtle: #777;
  --accent: #fff;
  --brand: #10a37f;
  --blue: #84a9ff;
  --danger: #ff8585;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .12em; }
.form-error { min-height: 20px; margin: 8px 0 0; color: var(--danger); font-size: 13px; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 10%, #303030 0, transparent 34%), #1b1b1b; }
.login-card { width: min(400px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 18px; background: #242424; box-shadow: 0 28px 90px rgba(0, 0, 0, .35); }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 13px; background: #f4f4f4; color: #171717; font-size: 21px; }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.login-card .eyebrow { margin-top: 20px; }
.login-card h1 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.03em; }
.login-card label { display: block; margin: 22px 0 7px; color: #cfcfcf; font-size: 13px; }
.login-card input { width: 100%; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; background: #181818; color: var(--text); }
.login-card input:focus { border-color: #777; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.login-card > button { width: 100%; margin-top: 16px; padding: 12px; border: 0; border-radius: 10px; background: #f4f4f4; color: #171717; font-weight: 700; cursor: pointer; }

.app-shell { height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); background: var(--bg); }
.app-shell.usage-open { grid-template-columns: 272px minmax(0, 1fr) 380px; }
.app-shell.account-open { grid-template-columns: 272px minmax(0, 1fr) minmax(360px, 420px); }
.sidebar { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--sidebar); }
.brand-row { min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.brand-row > div:nth-child(2) { min-width: 0; display: grid; gap: 1px; }
.brand-row strong { font-size: 14px; font-weight: 650; }
.brand-row small { color: var(--muted); font-size: 10px; }
.online-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #666; }
.online-dot.online { background: #55c990; box-shadow: 0 0 0 3px rgba(85, 201, 144, .12); }
.new-task { width: auto; display: flex; align-items: center; gap: 10px; margin: 5px 10px 7px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.new-task:hover { background: var(--surface-soft); }
.new-task span { color: var(--muted); font-size: 18px; line-height: 1; }
.side-section { min-height: 0; padding: 8px 10px; }
.threads-section { flex: 1; display: flex; flex-direction: column; }
.section-title { min-height: 29px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px; color: var(--subtle); font-size: 11px; font-weight: 600; }
.section-title button, .sidebar-footer button, .topbar button, .usage-panel button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.project-actions { display: inline-flex; gap: 1px; }
.project-actions button, .section-title > button { width: 26px; height: 26px; border-radius: 7px; }
.project-actions button:hover, .section-title > button:hover { background: var(--surface-soft); color: var(--text); }
.project-list, .thread-list, .github-task-list { min-height: 0; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.thread-list { flex: 1; }
.project-thread-group { margin: 8px 0 4px; }
.project-thread-group:first-child { margin-top: 0; }
.project-thread-title { display: block; padding: 5px 8px; color: var(--muted); font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row { display: flex; align-items: center; gap: 2px; }
.thread-row .thread-item { flex: 1; min-width: 0; }
.archive-thread { flex: 0 0 auto; padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.archive-thread:hover { background: var(--surface-hover); color: var(--text); }
.archived-tasks { margin-top: 10px; color: var(--muted); font-size: 12px; }
.archived-tasks summary { cursor: pointer; }
.archived-tasks .thread-list { max-height: 190px; margin-top: 6px; }
.project-item, .thread-item, .github-task { width: 100%; min-height: 35px; border: 0; border-radius: 8px; background: transparent; color: #c8c8c8; padding: 8px 9px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.project-item:hover, .thread-item:hover, .github-task:hover, .project-item.active, .thread-item.active { background: var(--surface-soft); color: #fff; }
.project-item::before { content: "◇"; margin-right: 8px; color: #7b7b7b; }
.project-item.git::before { content: "⌘"; color: #a8a8a8; }
.thread-item { font-size: 13px; }
.github-section { min-height: 0; max-height: 190px; flex: 0 1 auto; overflow: hidden; }
.github-section[open] { display: flex; flex-basis: 190px; flex-direction: column; }
.github-section summary { flex: 0 0 auto; list-style: none; cursor: pointer; }
.github-section summary::-webkit-details-marker { display: none; }
.github-summary-meta { min-width: 0; display: flex; align-items: center; gap: 7px; }
#githubRepo { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.github-chevron { transition: transform .18s ease; }
.github-section[open] .github-chevron { transform: rotate(180deg); }
.github-task-list { flex: 1 1 auto; padding-top: 2px; }
.github-task { font-size: 12px; }
.sidebar-footer { display: flex; flex-direction: column; gap: 1px; padding: 9px; border-top: 1px solid var(--line); }
.sidebar-footer button { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; text-align: left; }
.sidebar-footer button:hover { background: var(--surface-soft); color: #fff; }
.footer-icon { width: 18px; color: #8c8c8c; text-align: center; }

.workspace { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; display: flex; align-items: center; gap: 13px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(33, 33, 33, .92); backdrop-filter: blur(12px); }
.task-heading { min-width: 0; }
.topbar h2 { margin: 0; overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.topbar p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agent-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.agent-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #6e6e6e; }
.agent-status.working::before { background: #f2c94c; box-shadow: 0 0 0 3px rgba(242, 201, 76, .1); animation: pulse 1.3s infinite; }
.agent-status.error { color: var(--danger); }
.agent-status.error::before { background: var(--danger); }
@keyframes pulse { 50% { opacity: .45; } }
.topbar select { padding: 7px 28px 7px 9px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--surface-soft); color: #d8d8d8; font-size: 12px; }
.topbar #modelSelect { margin-left: auto; }
.theme-toggle { min-width: 108px; margin-left: auto; padding: 7px 9px; border: 1px solid var(--line) !important; border-radius: 8px; background: var(--surface-soft) !important; font-size: 12px; }
.theme-toggle:hover { border-color: var(--line-strong) !important; color: var(--text) !important; }
.topbar .theme-toggle + #modelSelect { margin-left: 0; }
.mobile-menu { display: none; font-size: 18px; }

.conversation { flex: 1; overflow: auto; padding: 34px max(24px, calc((100% - 760px) / 2)) 160px; scroll-behavior: smooth; }
.project-notice { max-width: 760px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 auto 24px; padding: 14px 15px; border: 1px solid rgba(132, 169, 255, .28); border-radius: 12px; background: rgba(84, 112, 174, .09); }
.project-notice strong { display: block; margin-bottom: 3px; font-size: 13px; }
.project-notice p { margin: 0; color: #b8c2d9; font-size: 12px; line-height: 1.45; }
.project-notice button { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #f0f0f0; color: #1a1a1a; font-size: 12px; font-weight: 650; cursor: pointer; }
.empty-state { max-width: 660px; margin: 10vh auto 0; text-align: center; }
.orb { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 21px; border: 1px solid var(--line-strong); border-radius: 14px; background: #f1f1f1; color: #181818; font-size: 18px; box-shadow: 0 16px 35px rgba(0, 0, 0, .22); }
.empty-state h2 { margin: 0 0 9px; font-size: 27px; font-weight: 600; letter-spacing: -.035em; }
.empty-state p { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.6; }
.quick-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.quick-actions button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: #cdcdcd; font-size: 12px; cursor: pointer; }
.quick-actions button:hover { border-color: var(--line-strong); background: var(--surface-hover); color: #fff; }
.messages { max-width: 760px; display: flex; flex-direction: column; gap: 24px; margin: 0 auto; }
.message { max-width: 92%; white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.message.user { align-self: flex-end; padding: 11px 15px; border-radius: 18px 18px 5px 18px; background: var(--surface); }
.message.agent { align-self: flex-start; width: 100%; white-space: normal; overflow-wrap: anywhere; }
.message.agent > :first-child { margin-top: 0; }
.message.agent > :last-child { margin-bottom: 0; }
.message.agent p { margin: 0 0 12px; }
.message.agent ul, .message.agent ol { margin: 8px 0 14px; padding-left: 24px; }
.message.agent li { margin: 4px 0; padding-left: 2px; }
.message.agent h1, .message.agent h2, .message.agent h3, .message.agent h4, .message.agent h5, .message.agent h6 { margin: 20px 0 9px; line-height: 1.3; }
.message.agent h1 { font-size: 20px; }
.message.agent h2 { font-size: 18px; }
.message.agent h3 { font-size: 16px; }
.message.agent code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: #292929; font: .9em/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.message.agent pre { max-width: 100%; margin: 10px 0 14px; padding: 12px 14px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #181818; white-space: pre; }
.message.agent pre code { padding: 0; border: 0; background: transparent; }
.message.agent a { color: #9dbbff; text-decoration: underline; text-underline-offset: 3px; }
.message.agent blockquote { margin: 10px 0 14px; padding-left: 13px; border-left: 3px solid var(--line-strong); color: #bcbcbc; }
.thinking-indicator { align-self: flex-start; display: flex; align-items: center; gap: 10px; min-height: 42px; color: #bcbcbc; font-size: 13px; }
.thinking-mark { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #282828; color: #ddd; }
.thinking-copy { display: inline-flex; align-items: baseline; gap: 7px; }
.thinking-dots { display: inline-flex; gap: 3px; }
.thinking-dots i { width: 4px; height: 4px; border-radius: 50%; background: #aaa; animation: thinking-dot 1.15s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: .16s; }
.thinking-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes thinking-dot { 0%, 65%, 100% { opacity: .3; transform: translateY(0); } 32% { opacity: 1; transform: translateY(-3px); } }
.event-card { max-width: 760px; margin: 0 auto; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(23, 23, 23, .5); color: #a9a9a9; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.output-file-list { display: grid; gap: 8px; margin-top: 12px; }
.output-file-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .04); color: inherit; text-decoration: none; }
.output-file-card:hover { border-color: var(--accent); background: rgba(255, 255, 255, .07); }
.output-file-card > span:last-child { display: grid; flex: 1; min-width: 0; }
.output-file-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.output-file-card small { color: var(--muted); }
.output-file-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-hover); color: var(--text); font-size: 18px; font-weight: 700; }
.approval-stack { max-width: 760px; display: flex; flex-direction: column; gap: 10px; margin: 18px auto 0; }
.approval-card { padding: 14px; border: 1px solid rgba(242, 201, 76, .26); border-radius: 12px; background: #2b281e; }
.approval-card strong { display: block; margin-bottom: 6px; }
.approval-card pre { white-space: pre-wrap; color: #c9c1a9; font-size: 12px; }
.approval-actions { display: flex; gap: 8px; margin-top: 12px; }
.approval-actions button { padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.approval-actions button.accept { background: #f1f1f1; color: #171717; }

.composer { position: absolute; right: max(24px, calc((100% - 780px) / 2)); bottom: 22px; left: max(24px, calc((100% - 780px) / 2)); padding: 12px 12px 9px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: 0 18px 60px rgba(0, 0, 0, .3); }
.composer:focus-within { border-color: rgba(255, 255, 255, .23); }
.composer textarea { width: 100%; max-height: 180px; display: block; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); line-height: 1.55; }
.composer textarea::placeholder { color: #8e8e8e; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; }
.attachment-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; }
.attachment-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.composer-footer { min-height: 32px; display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.attach-button { width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; background: #272727; color: #bdbdbd; cursor: pointer; }
.attach-button:hover { background: #3a3a3a; color: #fff; }
.project-badge { max-width: 45%; padding: 5px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #272727; color: #bdbdbd; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.project-badge:hover { background: #3a3a3a; color: #fff; }
.permission-mode { max-width: 185px; padding: 5px 25px 5px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; outline: none; background: #272727; color: #bdbdbd; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.composer-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-footer #sendButton { width: 32px; height: 32px; flex: 0 0 auto; margin-left: auto; border: 0; border-radius: 50%; background: #f2f2f2; color: #171717; font-size: 17px; font-weight: 800; cursor: pointer; }
.composer-footer #sendButton:disabled { opacity: .4; }

.usage-panel, .account-panel { min-width: 0; overflow: auto; padding: 20px; border-left: 1px solid var(--line); background: #191919; }
.usage-panel header, .account-panel > header, .user-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.usage-panel h2, .account-panel h2 { margin: 0 0 18px; font-size: 20px; }
.usage-panel header button, .account-panel header button { border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.usage-card, .chart-card, .limit-note, .settings-card, .user-card { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #242424; }
.usage-card span, .usage-card small { display: block; color: var(--muted); font-size: 11px; }
.usage-card strong { display: block; margin: 7px 0; font-size: 22px; }
.usage-card.primary strong { font-size: 31px; }
.usage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 9px 0; }
.usage-limit-list { display: grid; gap: 9px; margin-top: 9px; }
.usage-limit-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: #242424; }
.usage-limit-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.usage-limit-card header strong { font-size: 13px; }
.usage-limit-card header small, .usage-limit-row span { color: var(--muted); font-size: 11px; }
.usage-limit-progress { height: 7px; margin: 11px 0; overflow: hidden; border-radius: 999px; background: var(--surface-hover); }
.usage-limit-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4d6fb7, #9fbcff); }
.usage-limit-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.usage-limit-row { min-width: 0; }
.usage-limit-row span, .usage-limit-row strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.usage-limit-row strong { margin-top: 3px; font-size: 12px; white-space: nowrap; }
.chart-card, .limit-note { margin-top: 9px; }
.chart-header { display: flex; justify-content: space-between; font-size: 12px; }
.chart-header span, .limit-note p { color: var(--muted); }
.usage-chart { height: 140px; display: flex; align-items: flex-end; gap: 5px; padding-top: 20px; }
.bar { min-width: 5px; flex: 1; position: relative; border-radius: 4px 4px 1px 1px; background: linear-gradient(#9fbcff, #4d6fb7); }
.bar:hover::after { content: attr(data-value); position: absolute; bottom: 100%; left: 50%; padding: 4px; border-radius: 4px; background: #000; font-size: 10px; transform: translateX(-50%); }
.limit-note p { font-size: 12px; line-height: 1.5; }
.limit-note a { color: var(--blue); font-size: 12px; text-decoration: none; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fa;
  --sidebar: #f0f2f5;
  --surface: #ffffff;
  --surface-hover: #e3e7ec;
  --surface-soft: #e9edf2;
  --line: rgba(20, 27, 38, .12);
  --line-strong: rgba(20, 27, 38, .22);
  --text: #20242a;
  --muted: #626b77;
  --subtle: #697381;
  --accent: #15191e;
  --blue: #315fc2;
  --danger: #b42318;
}
:root[data-theme="light"] .login-screen { background: radial-gradient(circle at 50% 10%, #e1e7ef 0, transparent 36%), #f4f6f8; }
:root[data-theme="light"] .login-card,
:root[data-theme="light"] .usage-card,
:root[data-theme="light"] .usage-limit-card,
:root[data-theme="light"] .chart-card,
:root[data-theme="light"] .limit-note,
:root[data-theme="light"] .settings-card,
:root[data-theme="light"] .user-card { background: #fff; box-shadow: 0 12px 36px rgba(25, 35, 50, .06); }
:root[data-theme="light"] .login-card label,
:root[data-theme="light"] .project-item,
:root[data-theme="light"] .thread-item,
:root[data-theme="light"] .github-task,
:root[data-theme="light"] .quick-actions button,
:root[data-theme="light"] .topbar select { color: #3d4652; }
:root[data-theme="light"] .login-card input,
:root[data-theme="light"] .message.agent pre { background: #f8fafc; }
:root[data-theme="light"] .login-card input:focus { border-color: #8b96a5; box-shadow: 0 0 0 3px rgba(49, 95, 194, .1); }
:root[data-theme="light"] .topbar { background: rgba(247, 248, 250, .92); }
:root[data-theme="light"] .project-item:hover,
:root[data-theme="light"] .thread-item:hover,
:root[data-theme="light"] .github-task:hover,
:root[data-theme="light"] .project-item.active,
:root[data-theme="light"] .thread-item.active,
:root[data-theme="light"] .sidebar-footer button:hover,
:root[data-theme="light"] .quick-actions button:hover,
:root[data-theme="light"] .project-badge:hover { color: #15191e; }
:root[data-theme="light"] .project-notice p { color: #52617a; }
:root[data-theme="light"] .message.agent code { background: #eef1f5; }
:root[data-theme="light"] .message.agent a { color: #315fc2; }
:root[data-theme="light"] .message.agent blockquote,
:root[data-theme="light"] .thinking-indicator { color: #596371; }
:root[data-theme="light"] .thinking-mark { background: #f4f6f8; color: #313842; }
:root[data-theme="light"] .thinking-dots i { background: #697381; }
:root[data-theme="light"] .event-card { background: rgba(235, 239, 244, .7); color: #596371; }
:root[data-theme="light"] .approval-card { background: #fff8df; }
:root[data-theme="light"] .approval-card pre { color: #665b3d; }
:root[data-theme="light"] .project-badge,
:root[data-theme="light"] .permission-mode { background: #eef1f5; color: #4c5663; }
:root[data-theme="light"] .project-form,
:root[data-theme="light"] .device-code { background: #eef1f5; }
:root[data-theme="light"] .project-form input,
:root[data-theme="light"] .settings-card input,
:root[data-theme="light"] .settings-card select,
:root[data-theme="light"] .user-heading select { background: #fff; color: var(--text); }
:root[data-theme="light"] .usage-panel,
:root[data-theme="light"] .account-panel { background: #f4f6f8; }

@media (max-width: 1100px) {
  .app-shell.usage-open, .app-shell.account-open { grid-template-columns: 240px minmax(0, 1fr); }
  .usage-panel, .account-panel { position: absolute; z-index: 12; top: 0; right: 0; bottom: 0; width: min(440px, 100%); box-shadow: -20px 0 50px rgba(0, 0, 0, .45); }
}
@media (max-width: 720px) {
  .app-shell, .app-shell.usage-open, .app-shell.account-open { grid-template-columns: 1fr; }
  .sidebar { position: absolute; z-index: 15; top: 0; bottom: 0; left: 0; width: min(300px, 88vw); box-shadow: 20px 0 50px rgba(0, 0, 0, .55); transform: translateX(-100%); transition: transform .2s ease; }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .mobile-menu { display: block; }
  .topbar { padding: 0 12px; }
  .agent-status { display: none; }
  .topbar select { max-width: 128px; }
  .theme-toggle { min-width: 38px; width: 38px; overflow: hidden; padding: 7px; white-space: nowrap; }
  .conversation { padding: 23px 14px 145px; }
  .project-notice { align-items: flex-start; flex-direction: column; gap: 10px; }
  .empty-state { margin-top: 7vh; }
  .empty-state h2 { font-size: 24px; }
  .quick-actions { display: grid; }
  .composer { right: 10px; bottom: 10px; left: 10px; }
  .composer-hint { display: none; }
  .project-badge { max-width: calc(100% - 44px); }
  .permission-mode { max-width: 150px; }
  .usage-panel, .account-panel { width: 100%; }
}
