:root {
  color-scheme: dark;
  --bg: #080c17;
  --panel: #111827;
  --panel-2: #182235;
  --line: #28354c;
  --text: #eef3fb;
  --muted: #91a0b8;
  --accent: #63e6be;
  --danger: #ff7b87;
  --warning: #ffd166;
  --composer-height: 190px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% -10%, #172c42 0, var(--bg) 36%); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button, select, input, textarea { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); }
button { padding: 0 16px; color: #06110f; background: var(--accent); font-weight: 700; cursor: pointer; }
button.secondary { color: var(--text); background: var(--panel-2); }
button.danger { color: white; background: #7f2735; border-color: #a43a4a; }
button:disabled { opacity: .45; cursor: not-allowed; }
input, textarea, select { width: 100%; padding: 11px 13px; color: var(--text); background: #0b1220; }
textarea { min-height: 118px; resize: vertical; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.topbar { position: sticky; top: 0; z-index: 5; height: 64px; display: flex; align-items: center; gap: 12px; padding: env(safe-area-inset-top) 18px 0; background: rgba(8,12,23,.88); border-bottom: 1px solid rgba(40,53,76,.7); backdrop-filter: blur(18px); }
.topbar strong { display: block; font-size: 16px; }
.topbar #subtitle { display: block; color: var(--muted); font-size: 11px; }
.connection { color: var(--accent); font-size: 11px; }
.connection.offline { color: var(--danger); }
.icon-button { width: 44px; min-height: 44px; padding: 0; color: var(--text); background: transparent; }
.topbar-new-task { width: 44px; min-height: 44px; margin-left: auto; padding: 0; border-radius: 50%; font-size: 20px; }
.topbar-new-task.hidden + .connection { margin-left: auto; }
.topbar-tool { min-height: 38px; margin-left: auto; padding: 0 10px; color: var(--text); background: rgba(17,24,39,.72); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; box-shadow: 0 0 0 1px rgba(99,230,190,.04); }
.topbar-tool:hover, .topbar-tool:focus-visible { color: var(--accent); border-color: rgba(99,230,190,.72); background: var(--panel-2); }
.topbar-tool + .topbar-new-task { margin-left: 0; }
.topbar-tool.active { color: var(--accent); background: var(--panel-2); border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,230,190,.12); }
.topbar-tool.hidden ~ .topbar-new-task { margin-left: auto; }
main { width: min(780px, 100%); margin: 0 auto; padding: 22px 16px calc(32px + env(safe-area-inset-bottom)); }
body.session-open main { padding-bottom: calc(var(--composer-height) + 28px + env(safe-area-inset-bottom)); }
h1 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.02em; }
h2 { margin: 26px 0 10px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
p { color: var(--muted); }
.card { padding: 16px; background: linear-gradient(145deg, rgba(24,34,53,.92), rgba(15,23,38,.94)); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.stack { display: grid; gap: 12px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.section-head h2 { flex: 1; margin: 0; }
.activity-count { color: var(--accent); font-size: 12px; }
.task-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.active-tasks { margin-bottom: 10px; }
.active-task { display: block; width: 100%; padding: 13px 14px; text-align: left; color: var(--text); background: var(--panel); }
.active-task .row { margin-bottom: 4px; }
.active-task small { color: var(--muted); font-weight: 400; }
.completed-sessions { display: grid; gap: 2px; }
.completed-session-row { min-width: 0; min-height: 52px; padding: 7px 9px; overflow: hidden; color: var(--text); background: transparent; border: 0; text-align: left; }
.completed-session-row:hover, .completed-session-row:focus-visible { background: var(--panel); }
.completed-session-name { display: flex; align-items: center; min-width: 0; gap: 7px; }
.completed-session-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.completed-session-row small { display: block; overflow: hidden; margin: 2px 0 0 14px; color: var(--muted); font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.completion-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 3px rgba(255,77,94,.13); }
.mark-seen { color: var(--muted); background: transparent; border-color: transparent; font-size: 11px; }
.compact-empty { padding: 16px; }
.home-usage-button { white-space: nowrap; }
.usage-page-head { margin-bottom: 10px; }
.usage-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-bottom: 12px; }
.usage-controls select, .usage-controls button { min-height: 42px; }
.usage-content { display: grid; gap: 10px; }
.compact-usage-loading { padding: 14px; }
.usage-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.usage-stat { min-width: 0; padding: 10px; background: var(--panel); border-radius: 12px; }
.usage-stat small, .usage-stat strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-stat small { color: var(--muted); font-size: 10px; }
.usage-stat strong { margin-top: 3px; font-size: 14px; }
.usage-note { margin: 0; font-size: 10px; }
.usage-model-list { display: grid; gap: 8px; }
.usage-model-card { padding: 12px; background: rgba(17,24,39,.72); border: 1px solid var(--line); border-radius: 14px; }
.usage-model-head { display: flex; align-items: center; gap: 8px; }
.usage-model-head strong { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-provider { display: block; margin: 2px 0 9px; color: var(--muted); }
.usage-model-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.usage-model-metrics span { min-width: 0; padding: 6px 7px; background: #0b1220; border-radius: 8px; }
.usage-model-metrics small, .usage-model-metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-model-metrics small { color: var(--muted); font-size: 9px; }
.usage-model-metrics strong { margin-top: 2px; font-size: 11px; }
.page-head, .session-heading { display: flex; align-items: center; gap: 10px; }
.page-head h1, .session-heading h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head button, .session-heading button, button.compact { flex: 0 0 auto; min-height: 44px; padding: 0 11px; }
.project-page-head { margin-bottom: 16px; }
.session-heading.editing { align-items: start; }
.more-button { width: 44px; padding: 0; font-size: 22px; line-height: 1; }
.session-menu { position: fixed; z-index: 20; display: grid; gap: 2px; padding: 6px; color: var(--text); background: #171f2d; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px #000a; }
.session-menu-item { display: grid; width: 100%; min-height: 44px; padding: 7px 12px; color: var(--text); background: transparent; border-color: transparent; text-align: left; font-weight: 600; }
.session-menu-reason { color: var(--muted); font-size: 10px; font-weight: 400; }
.session-menu-item:hover, .session-menu-item:focus-visible { background: var(--panel-2); }
.session-relations { display: flex; flex-wrap: wrap; gap: 7px; margin: -6px 0 12px; }
.session-rename-form { display: grid; flex: 1; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.rename-actions { display: grid; grid-template-columns: auto auto; gap: 7px; }
.rename-actions button { min-height: 44px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.project { display: flex; align-items: center; gap: 13px; text-align: left; color: var(--text); background: var(--panel); }
.project-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; color: #06110f; background: var(--accent); }
.project-meta { min-width: 0; flex: 1; }
.project-meta strong, .project-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-meta small, .muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.row > * { flex: 1; }
.session-item { display: block; width: 100%; padding: 14px; text-align: left; color: var(--text); background: var(--panel); }
.session-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.session-delete { min-width: 58px; padding: 0 10px; }
.session-search { margin-bottom: 12px; }
.session-browser { display: grid; gap: 10px; }
.compact-section-head { margin-top: 8px; }
.project-active-list { max-height: 40vh; overflow-y: auto; }
.session-history-panel { max-height: 58vh; overflow-y: auto; padding-right: 3px; overscroll-behavior: contain; }
.load-more { width: 100%; margin-top: 2px; }
.session-item .row { margin-bottom: 5px; }
.session-item small { color: var(--muted); font-weight: 400; }
.new-task-composer { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.new-task-input { min-height: 66px; max-height: 200px; padding: 11px 13px; resize: none; overflow-y: auto; background: rgba(17,24,39,.72); border: 0; border-radius: 15px; outline: 0; }
.new-task-tools { display: flex; align-items: center; gap: 5px; padding: 6px 0 0; }
.task-config-summary { display: none; min-width: 0; min-height: 42px; flex: 1; align-items: flex-start; justify-content: center; flex-direction: column; padding: 5px 11px; overflow: hidden; color: var(--text); background: rgba(17,24,39,.75); border: 0; border-radius: 14px; text-align: left; }
.task-config-summary span, .task-config-summary small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-config-summary span { font-size: 11px; }
.task-config-summary small { color: var(--muted); font-size: 10px; }
.new-task-choices { display: flex; flex: 1; min-width: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.new-task-choices::-webkit-scrollbar { display: none; }
.config-chip-target { display: flex; min-height: 44px; flex: 0 0 auto; align-items: center; padding: 4px 0; }
.parallel-worktree-toggle { display: flex; min-height: 44px; flex: 0 0 auto; grid-template-columns: auto auto; align-items: center; gap: 5px; padding: 4px 7px; color: var(--muted); font-size: 11px; }
.parallel-worktree-toggle input { width: 16px; min-height: 16px; }
.parallel-task-list { display: grid; gap: 7px; }
.parallel-task-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 44px; gap: 7px; }
.parallel-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 10px; padding: 8px 10px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.parallel-summary small { color: var(--muted); }
.config-chip { width: auto; max-width: 150px; min-height: 36px; flex: 0 0 auto; padding: 3px 25px 3px 9px; overflow: hidden; color: var(--muted); background: rgba(17,24,39,.75); border: 0; border-radius: 999px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.new-task-send { position: relative; width: 38px; min-height: 38px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%; font-size: 19px; }
.new-task-send::before { position: absolute; inset: -3px; content: ""; }
.task-diagnostics { margin: 5px 9px 2px; color: var(--muted); font-size: 11px; }
.task-diagnostics { color: var(--warning); }
.task-diagnostics summary { width: fit-content; cursor: pointer; }
.task-diagnostics small { display: block; margin-top: 4px; }
.task-config-dialog { width: min(500px, calc(100% - 24px)); max-height: min(86vh, 720px); padding: 16px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.task-config-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.task-config-field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.task-config-field select { color: var(--text); }
.task-config-worktree { display: flex; min-height: 48px; align-items: center; gap: 10px; color: var(--text); }
.task-config-worktree input { width: 22px; min-height: 22px; }
.task-config-hint { line-height: 1.45; }
.recent-sessions { margin-top: 12px; }
.recent-sessions-head { margin-top: 0; padding: 0 3px; }
.recent-sessions-head h2 { font-size: 12px; }
.recent-sessions-head button { min-height: 36px; font-size: 11px; }
.recent-session-list { display: grid; gap: 2px; }
.recent-session-row { min-width: 0; min-height: 52px; padding: 7px 9px; overflow: hidden; color: var(--text); background: transparent; border: 0; border-radius: 10px; text-align: left; }
.recent-session-row:hover, .recent-session-row:focus-visible { background: var(--panel); }
.recent-session-name { display: flex; align-items: center; min-width: 0; gap: 7px; }
.recent-session-name strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.recent-session-row small { display: block; overflow: hidden; margin: 2px 0 0 14px; color: var(--muted); font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.route-loading { display: grid; gap: 12px; padding: 24px 4px; color: var(--muted); }
.route-loading strong { color: var(--muted); font-size: 13px; font-weight: 500; }
.loading-spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: loading-spin .75s linear infinite; }
.loading-skeleton { height: 74px; overflow: hidden; background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%); background-size: 220% 100%; border-radius: 14px; animation: loading-shimmer 1.2s ease-in-out infinite; }
.loading-skeleton.short { width: 68%; height: 48px; }
.route-error { display: grid; gap: 10px; padding: 18px; color: var(--text); background: var(--panel); border-radius: 14px; }
.route-error p { margin: 0; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@keyframes loading-shimmer { to { background-position-x: -220%; } }
.git-page-head { margin-bottom: 12px; }
.git-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.git-stat { min-width: 0; padding: 9px 10px; background: var(--panel); border-radius: 11px; }
.git-stat small, .git-stat strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-stat small { color: var(--muted); font-size: 10px; }
.git-stat strong { margin-top: 2px; font-size: 12px; }
.git-empty, .git-section, .git-controls, .git-compare { margin-top: 12px; padding: 12px; background: rgba(17,24,39,.72); border-radius: 14px; }
.git-empty p { margin-top: 0; }
.git-controls { display: grid; gap: 8px; }
.git-inline-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 7px; }
.git-controls .git-inline-form { grid-template-columns: minmax(0, 1fr) auto; }
.git-inline-form input, .git-inline-form button { min-height: 40px; }
.git-section h2, .git-compare h2 { margin-top: 0; }
.git-selection-actions { display: flex; gap: 5px; }
.git-file-list { display: grid; gap: 2px; max-height: 42vh; overflow-y: auto; }
.git-file-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 40px; padding: 4px 6px; border-radius: 8px; }
.git-file-row:hover { background: var(--panel-2); }
.git-file-row input { width: 20px; min-height: 20px; }
.git-file-row code { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.git-file-row small { color: var(--muted); font-size: 10px; }
.git-remote-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.git-remote-tools select { min-width: 180px; flex: 1; }
.git-history-list { display: grid; gap: 2px; }
.git-commit-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 3px 8px; min-height: 48px; padding: 6px 8px; overflow: hidden; color: var(--text); background: transparent; border-color: transparent; text-align: left; }
.git-commit-row:hover, .git-commit-row:focus-visible { background: var(--panel-2); }
.git-commit-row code { color: var(--accent); font-size: 11px; }
.git-commit-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-commit-row small { grid-column: 2; color: var(--muted); font-size: 10px; font-weight: 400; }
.git-compare .diff { max-height: 55vh; margin-top: 10px; padding: 10px; background: #090d16; border-radius: 10px; }
.session-drawer { position: fixed; z-index: 4; top: 64px; bottom: 0; left: 0; width: min(88vw, 330px); display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 10px; background: rgba(11,17,29,.98); border-right: 1px solid var(--line); box-shadow: 18px 0 50px rgba(0,0,0,.35); transform: translateX(-105%); transition: transform .18s ease; }
.session-drawer.open { transform: translateX(0); }
.session-drawer-scrim { position: fixed; z-index: 3; inset: 64px 0 0; background: rgba(0,0,0,.58); backdrop-filter: blur(2px); }
.session-drawer-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 8px; }
.session-drawer-title { min-width: 0; flex: 1; }
.session-drawer-title strong, .session-drawer-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-drawer-title small { color: var(--muted); font-size: 11px; }
.drawer-close { flex: 0 0 auto; font-size: 20px; }
.drawer-search { min-height: 44px; padding: 8px 11px; border-radius: 11px; font-size: 13px; }
.session-drawer-scroll { min-height: 0; margin-top: 8px; overflow-y: auto; overscroll-behavior: contain; }
.session-drawer-groups { display: grid; gap: 5px; }
.session-nav-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.session-nav-heading small { font-size: 10px; font-weight: 400; }
.session-nav-list { display: grid; gap: 2px; }
.session-nav-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; border-radius: 11px; }
.session-nav-row:hover, .session-nav-row:focus-within { background: var(--panel); }
.session-nav-row.selected { background: rgba(100,223,196,.12); box-shadow: inset 3px 0 0 var(--accent); }
.session-nav-row.selected .session-nav-open { color: var(--text); }
.current-session-label { flex: 0 0 auto; padding: 2px 6px; color: #06110f; background: var(--accent); border-radius: 999px; font-size: 9px; font-weight: 700; }
.session-nav-open { min-width: 0; min-height: 54px; padding: 7px 4px 7px 9px; overflow: hidden; color: var(--text); background: transparent; border-color: transparent; text-align: left; }
.session-nav-name { display: flex; align-items: center; min-width: 0; gap: 7px; }
.session-nav-name strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.session-nav-open small { display: block; overflow: hidden; margin: 2px 0 0 14px; color: var(--muted); font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.session-status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); }
.session-status-dot.running { background: var(--accent); } .session-status-dot.waiting_approval { background: var(--warning); } .session-status-dot.failed, .session-status-dot.stopped { background: var(--danger); }
.session-nav-more { width: 44px; min-height: 44px; font-size: 18px; }
.session-nav-empty { padding: 11px 9px; color: var(--muted); font-size: 12px; }
.drawer-load-more { width: calc(100% - 8px); min-height: 44px; margin: 7px 4px; font-size: 12px; }
.compact-dialog { width: min(420px, calc(100% - 24px)); padding: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.compact-dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }
.badge { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; color: var(--muted); background: #0b1220; font-size: 11px; }
.badge.running { color: var(--accent); }
.badge.failed, .badge.stopped { color: var(--danger); }
.timeline { display: grid; gap: 10px; }
.event { padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.event.user { border-color: #416b69; background: #102523; }
.event.agent { border-color: #334a71; background: #111d31; }
.event.tool { background: #151a26; }
.event-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.event-meta { display: flex; align-items: center; gap: 2px; }
.message-more { width: 44px; min-height: 44px; margin: -14px -11px -14px 0; padding: 0; color: var(--muted); background: transparent; border: 0; font-size: 18px; line-height: 1; }
.message-more:hover, .message-more:focus-visible { color: var(--text); background: rgba(255,255,255,.06); }
.event pre, .diff { margin: 0; overflow: auto; color: #dce7f7; white-space: pre-wrap; word-break: break-word; font: 12px/1.55 ui-monospace, Consolas, monospace; }
.markdown { color: #dce7f7; overflow-wrap: anywhere; }
.markdown-fallback { white-space: pre-wrap; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 { margin: 1em 0 .45em; color: var(--text); text-transform: none; letter-spacing: normal; }
.markdown h1 { font-size: 20px; } .markdown h2 { font-size: 18px; } .markdown h3 { font-size: 16px; }
.markdown p { margin: .6em 0; color: #dce7f7; }
.markdown a { color: #83c9ff; }
.markdown blockquote { margin: .8em 0; padding: 2px 12px; color: var(--muted); border-left: 3px solid #526887; }
.markdown code { padding: 2px 5px; color: #ffe9cf; background: #0b0d15; border-radius: 5px; font: 12px/1.5 ui-monospace, Consolas, monospace; }
.code-block { position: relative; margin: .8em 0; }
.code-block pre { padding: 14px; white-space: pre; border: 1px solid var(--line); border-radius: 10px; background: #090d16; }
.code-block pre code { padding: 0; background: transparent; }
.copy-code { position: absolute; top: 7px; right: 7px; min-height: 32px; padding: 0 9px; color: var(--text); background: #243149; font-size: 11px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.markdown table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.markdown th, .markdown td { padding: 7px 9px; border: 1px solid var(--line); text-align: left; }
.markdown th { background: #1b2940; }
.markdown .align-center { text-align: center; }
.markdown .align-right { text-align: right; }
.composer { position: fixed; z-index: 6; left: 50%; bottom: 0; width: min(780px, 100%); overflow-y: auto; transform: translateX(-50%); padding: 7px 14px calc(7px + env(safe-area-inset-bottom)); background: rgba(8,12,23,.96); border-top: 1px solid rgba(40,53,76,.75); box-shadow: 0 -12px 28px rgba(0,0,0,.24); backdrop-filter: blur(18px); }
.composer-meta { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 5px; }
.provider-chip { width: auto; max-width: 46%; min-height: 30px; padding: 3px 26px 3px 9px; overflow: hidden; border-radius: 999px; color: var(--muted); background: #111827; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status-strip { display: flex; align-items: center; min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status-strip::before { width: 7px; height: 7px; flex: 0 0 auto; margin-right: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-strip.running { color: var(--accent); } .status-strip.waiting_approval { color: var(--warning); } .status-strip.failed { color: var(--danger); }
.composer-input-shell { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; padding: 5px 6px 5px 11px; background: #111827; border: 1px solid var(--line); border-radius: 20px; }
.composer.keyboard-open { overscroll-behavior: contain; }
.composer.keyboard-open .composer-meta { display: none; }
.composer.keyboard-open .composer-input-shell { position: sticky; z-index: 2; bottom: 0; box-shadow: 0 -7px 18px rgba(0,0,0,.3); }
.composer-input-shell textarea { min-height: 44px; max-height: 160px; padding: 10px 2px 7px; resize: none; overflow-y: auto; background: transparent; border: 0; border-radius: 0; outline: 0; }
.composer-actions { display: flex; gap: 6px; padding-bottom: 1px; }
.composer-actions button { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; font-size: 19px; }
.composer-actions .send-button { white-space: nowrap; }
.composer-actions .send-button.retry { width: auto; padding: 0 12px; border-radius: 999px; font-size: 13px; }
.send-button { font-size: 22px !important; }
.stop-button { font-size: 13px !important; }
.details-dialog { width: min(720px, calc(100% - 24px)); max-height: min(78vh, 760px); padding: 16px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.details-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.handoff-dialog { width: min(560px, calc(100% - 24px)); max-height: min(86vh, 760px); padding: 16px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.handoff-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head button { flex: 0 0 auto; }
.detail-list { display: grid; gap: 8px; max-height: 55vh; overflow: auto; }
.detail-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.detail-filters input { flex: 1 0 100%; }
.detail-filters button { min-height: 34px; padding: 0 10px; font-size: 12px; }
.detail-item { padding: 10px 12px; background: #0b1220; border: 1px solid var(--line); border-radius: 10px; }
.detail-item summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.detail-item pre { overflow: auto; white-space: pre-wrap; word-break: break-word; font: 11px/1.5 ui-monospace, Consolas, monospace; }
.detail-limit, .change-warning { color: var(--warning); font-size: 12px; }
.approval-panel { display: grid; gap: 9px; max-height: 40vh; margin-bottom: 10px; overflow: auto; }
.approval-card { padding: 13px; background: #211923; border: 1px solid #74404c; border-radius: 14px; box-shadow: 0 10px 30px #0008; }
.approval-card.submitting { opacity: .7; }
.approval-card p { margin: 7px 0; color: #e4ccd0; }
.approval-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--warning); }
.approval-kind { margin: 0; color: var(--warning); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.approval-preview { max-height: 24vh; overflow: auto; margin: 8px 0 0; padding: 10px; white-space: pre-wrap; word-break: break-word; color: #ffe9cf; background: #0b0d15; border: 1px solid #59404a; border-radius: 10px; font: 12px/1.5 ui-monospace, Consolas, monospace; }
.approval-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.login { max-width: 420px; margin: 12vh auto 0; }
.workspace-form { margin-top: 14px; }
.path-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.current-path { min-width: 0; overflow: hidden; padding: 10px; color: var(--accent); background: #0b1220; border-radius: 9px; text-overflow: ellipsis; white-space: nowrap; }
.folder-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; max-height: 190px; overflow: auto; padding: 7px; background: #0b1220; border: 1px solid var(--line); border-radius: 10px; }
.folder-button { min-width: 0; overflow: hidden; padding: 0 10px; text-align: left; color: var(--text); background: var(--panel-2); text-overflow: ellipsis; white-space: nowrap; }
.check-label { display: flex; align-items: center; grid-template-columns: none; }
.check-label input { width: 22px; min-height: 22px; }
.change-section { margin-top: 12px; }
.change-section h2 { margin-top: 0; }
.change-section h3 { margin: 18px 0 8px; color: var(--muted); font-size: 13px; }
.file-summary { display: grid; gap: 5px; max-height: 40vh; overflow: auto; }
.file-summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 7px 9px; background: #0b1220; border-radius: 8px; }
.file-summary-row code { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.file-summary-row span { color: var(--muted); font-size: 11px; }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; width: min(90%, 420px); transform: translateX(-50%); padding: 12px 15px; border-radius: 12px; color: white; background: #8b2f3f; box-shadow: 0 12px 30px #0008; }
.hidden { display: none !important; }
@media (min-width: 1000px) {
  .session-drawer { transform: translateX(0); box-shadow: none; }
  .session-drawer-scrim { display: none !important; }
  body.has-session-nav main { width: min(780px, calc(100% - 312px)); margin-right: auto; margin-left: calc(280px + max(16px, (100vw - 1060px) / 2)); }
  body.has-session-nav.session-nav-collapsed .session-drawer { transform: translateX(-105%); }
  body.has-session-nav.session-nav-collapsed main { width: min(780px, 100%); margin-right: auto; margin-left: auto; }
  .drawer-close { font-size: 24px; }
}
@media (max-width: 999px) {
  body.session-drawer-open { overflow: hidden; }
}
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } main { padding-top: 17px; } .topbar { gap: 5px; padding-right: 9px; padding-left: 8px; } .topbar > div { min-width: 0; } .topbar strong, .topbar #subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .topbar-tool { padding: 0 7px; } .approval-actions { grid-template-columns: 1fr; } .folder-list { grid-template-columns: 1fr; } .session-heading h1 { font-size: 20px; } .session-rename-form { grid-template-columns: 1fr; } .rename-actions { grid-template-columns: 1fr 1fr; } .provider-chip { max-width: 48%; } .new-task-choices { display: none; } .task-config-summary { display: flex; } .task-config-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: min(88dvh, 720px); margin: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 22px 22px 0 0; } .git-overview { grid-template-columns: 1fr 1fr; } .git-inline-form { grid-template-columns: 1fr; } .git-remote-tools select { flex-basis: 100%; } }
@media (max-width: 520px) { .usage-overview { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .session-drawer { transition: none; } .loading-spinner, .loading-skeleton { animation: none; } }
