:root {
  --bg-page: #212121;
  --bg-sidebar: #171717;
  --surface-sidebar-soft: rgba(255, 255, 255, 0.05);
  --surface-sidebar-hover: #232323;
  --surface-sidebar-active: #2a2a2a;
  --surface-user: #303030;
  --surface-composer: #2f2f2f;
  --surface-composer-focus: #343434;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text-0: #ececec;
  --text-1: #b4b4b4;
  --text-2: #8f8f8f;
  --text-3: #6f6f6f;
  --ready: #10a37f;
  --warning: #e3b464;
  --danger: #f87171;
  --sidebar-width: 272px;
  --sidebar-mobile-width: min(86vw, 320px);
  --scrollbar-size: 6px;
  --scrollbar-thumb: rgba(255, 255, 255, 0.18);
  color-scheme: dark;
}

* { box-sizing: border-box; scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { min-height: 32px; border-radius: 999px; background: transparent; }

html, body { width: 100%; max-width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  min-width: 0;
  height: 100svh;
  background: var(--bg-page);
  color: var(--text-0);
  font-family: "SF Pro Text", "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, textarea, select { font: inherit; }
button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
button:disabled, textarea:disabled, select:disabled { cursor: not-allowed; opacity: .48; }

#app, .app-shell { width: 100%; max-width: 100vw; height: 100svh; min-height: 0; overflow: hidden; }
.app-layout { width: 100%; max-width: 100vw; height: 100svh; min-width: 0; min-height: 0; overflow: hidden; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 320px; }
.app-shell.is-sidebar-collapsed .app-layout { grid-template-columns: 84px minmax(0, 1fr) 320px; }
.sidebar-backdrop, .workflow-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.48); opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
.workflow-backdrop { z-index: 45; }
.app-shell.is-mobile-sidebar-open .sidebar-backdrop,
.app-shell.is-mobile-workflow-open .workflow-backdrop { opacity: 1; pointer-events: auto; }

.sidebar {
  min-width: 0; height: 100svh; min-height: 0; display: flex; flex-direction: column;
  padding: 8px; background: var(--bg-sidebar); border-right: 1px solid var(--line); overflow: hidden;
}
.sidebar-panel { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.sidebar-header { flex: 0 0 auto; display: grid; gap: 4px; }
.sidebar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-toolbar-actions { display: inline-flex; align-items: center; gap: 6px; }
.sidebar-toggle, .mobile-menu-button, .topbar-new-chat-button, .sidebar-primary-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; color: var(--text-1); transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.sidebar-toggle { width: 44px; height: 44px; border-radius: 14px; }
.mobile-menu-button { display: none; width: 40px; height: 40px; border-radius: 12px; }
.topbar-new-chat-button { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.04); }
.topbar-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-toggle:hover, .mobile-menu-button:hover, .topbar-new-chat-button:hover, .sidebar-primary-action:hover, .sidebar-toolbar .push-button:hover { background: var(--surface-sidebar-hover); color: var(--text-0); }
.sidebar-primary-action {
  width: 44px; height: 44px; padding: 0; border-radius: 14px; border-color: transparent;
  background: transparent; color: var(--text-0); font-size: .8rem; font-weight: 560;
}
.sidebar-panel-action { display: none; }
.sidebar-toolbar .push-button { width: 44px; height: 44px; border-radius: 14px; }
.push-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-content { min-height: 0; flex: 1; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; overflow: hidden; }
.sidebar-section { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.sidebar-section--work { overflow: hidden; }
.sidebar-section-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.sidebar-heading { margin: 0; padding: 8px 2px 4px; color: var(--text-2); font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.sidebar-heading--projects { display: flex; align-items: center; gap: 4px; text-align: left; }
.sidebar-heading--projects:hover, .sidebar-heading--projects:hover .projects-collapse-toggle { color: var(--text-0); }
.projects-collapse-toggle { color: var(--text-2); font-size: .82rem; line-height: 1; transition: color 120ms ease; }
.sidebar-tabs { min-width: 0; display: flex; align-items: flex-end; gap: 18px; padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.sidebar-tab {
  position: relative; min-width: 0; min-height: 28px; padding: 0 0 6px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  transition: color 120ms ease;
}
.sidebar-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 999px; background: transparent; }
.sidebar-tab:hover { color: var(--text-1); }
.sidebar-tab.is-active { color: var(--text-0); }
.sidebar-tab.is-active::after { background: var(--text-0); }
.sidebar-tab-panel { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.sidebar-list { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar-list--profiles { gap: 6px; overflow: hidden; transition: height 420ms cubic-bezier(.16, 1, .3, 1), opacity 300ms ease; will-change: height, opacity; }
.sidebar-list--profiles.is-collapsed { height: 0; opacity: 0; pointer-events: none; }
.sidebar-list--chats { flex: 1; gap: 1px; overflow-y: auto; padding-right: 4px; }
.sidebar-list--tasks { flex: 1; gap: 2px; overflow-y: auto; padding-right: 4px; }
.sidebar-item { position: relative; width: 100%; min-width: 0; padding: 9px 10px; border-radius: 12px; overflow: hidden; text-align: left; transition: background 120ms ease; }
.sidebar-item:hover { background: var(--surface-sidebar-hover); }
.sidebar-item.is-active { background: var(--surface-sidebar-active); }
.sidebar-item--profile { min-height: 54px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; }
.sidebar-avatar { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255,255,255,.08); color: var(--text-0); font-size: .74rem; font-weight: 750; letter-spacing: .04em; }
.sidebar-avatar--all { background: linear-gradient(135deg, #ef4444, #f97316 34%, #06b6d4 68%, #8b5cf6); font-size: .66rem; }
.sidebar-title-line { min-width: 0; display: flex; align-items: center; gap: 7px; }
.project-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 999px; background: var(--project-color, rgba(255,255,255,.18)); }
.project-dot.is-thinking {
  animation: project-dot-thinking 1.15s ease-in-out infinite;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--project-color, rgba(255,255,255,.35)) 48%, transparent);
}
@keyframes project-dot-thinking {
  0%, 100% { transform: scale(.86); opacity: .62; box-shadow: 0 0 0 0 color-mix(in srgb, var(--project-color, rgba(255,255,255,.35)) 45%, transparent); }
  50% { transform: scale(1.18); opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--project-color, rgba(255,255,255,.35)) 18%, transparent); }
}
.sidebar-item-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); font-size: .9rem; font-weight: 520; line-height: 1.35; }
.sidebar-item-meta { display: block; margin-top: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: .77rem; line-height: 1.35; }
.chat-item { position: relative; min-width: 0; border-radius: 8px; margin-bottom: 2px; }
.sidebar-item--chat { position: relative; min-height: 42px; padding: 2px 12px; border-radius: 8px; }
.unread-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 999px; background: #ef4444; box-shadow: 0 0 0 2px var(--bg-sidebar); pointer-events: none; }
.sidebar-tab .status-dot { display: none; }
.sidebar-counter { min-width: 0; height: auto; padding: 0; display: inline; border-radius: 0; background: transparent; color: var(--text-3); font-size: .68rem; font-weight: 650; }
.sidebar-counter.is-running { background: transparent; color: var(--ready); }
.sidebar-empty { padding: 8px 10px; }
.task-item { position: relative; min-width: 0; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.025); }
.task-item:hover, .task-item.is-active { background: var(--surface-sidebar-hover); }
.task-item.is-running, .task-item.is-stalled, .task-item.is-recovering, .task-item.is-retrying { background: rgba(16,163,127,.08); }
.task-item.is-waiting_children { background: rgba(227,180,100,.09); }
.task-item.is-error { background: rgba(248,113,113,.07); }
.task-item.is-cancelled { opacity: .72; }
.task-open { width: 100%; min-width: 0; padding: 7px 36px 7px 12px; display: grid; gap: 2px; text-align: left; }
.task-stop { position: absolute; right: 8px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #f0f0f0; color: #202020; font-size: 0; line-height: 1; }
.task-stop::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: currentColor; }
.task-stop:hover { background: #fff; color: #202020; }
.task-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-status { min-width: 0; color: var(--text-1); font-size: .66rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.task-time { flex: 0 0 auto; color: var(--text-3); font-size: .66rem; }
.task-title { min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; color: var(--text-0); font-size: .82rem; font-weight: 620; line-height: 1.32; }
.task-title-copy { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: .74rem; line-height: 1.34; }
.app-shell.is-sidebar-collapsed .sidebar-toolbar { justify-content: center; }
.app-shell.is-sidebar-collapsed .sidebar-toolbar-actions,
.app-shell.is-sidebar-collapsed .sidebar-primary-action,
.app-shell.is-sidebar-collapsed .sidebar-heading,
.app-shell.is-sidebar-collapsed .sidebar-section--work,
.app-shell.is-sidebar-collapsed .sidebar-copy { display: none; }
.app-shell.is-sidebar-collapsed .sidebar-item--profile { grid-template-columns: 1fr; justify-items: center; padding: 6px; }
.app-shell.is-sidebar-collapsed .sidebar-avatar { width: 40px; height: 40px; }
.status-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--warning); box-shadow: 0 0 0 3px rgba(227,180,100,.12); font-size: 0; }
.status-dot.is-online { background: var(--ready); box-shadow: 0 0 0 3px rgba(16,163,127,.13); }
.status-dot.is-error { background: var(--danger); box-shadow: 0 0 0 3px rgba(248,113,113,.13); }

.main-column { position: relative; width: 100%; max-width: 100%; min-width: 0; height: 100svh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.topbar, .workspace { width: 100%; max-width: 768px; min-width: 0; margin: 0 auto; }
.topbar { flex: 0 0 auto; padding: 16px 16px 10px; }
.topbar-content { width: 100%; min-width: 0; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow: visible; }
.topbar-react-root { display: contents; }
.topbar-title { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.topbar-actions { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }
.chat-menu-button, .push-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--text-1); font-size: 1.25rem; line-height: 1; }
.push-button { font-size: .98rem; }
.push-button.is-enabled { color: var(--text-1); }
.push-button.is-denied { color: var(--danger); }
.push-button:hover, .chat-menu-button:hover, .chat-menu-button[aria-expanded="true"] { background: rgba(255,255,255,.08); color: var(--text-0); }
.chat-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 150px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #262626; box-shadow: 0 12px 36px rgba(0,0,0,.34); }
.chat-menu-item { width: 100%; min-height: 34px; padding: 0 10px; border-radius: 9px; text-align: left; color: var(--text-1); font-size: .86rem; font-weight: 560; }
.chat-menu-item:hover { background: rgba(255,255,255,.07); color: var(--text-0); }
.chat-menu-item.is-danger { color: #fca5a5; }
.chat-menu-item.is-danger:hover { background: rgba(248,113,113,.13); color: #fecaca; }
h1 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); font-size: .95rem; font-weight: 620; letter-spacing: -.03em; line-height: 1.3; }
.topbar-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: .76rem; line-height: 1.25; }

.workspace { flex: 1; width: 100%; max-width: 768px; min-width: 0; min-height: 0; overflow: hidden; margin: 0 auto; padding: 0 16px 20px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; }
.workflow-panel { min-width: 0; height: 100svh; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 20px; border-left: 1px solid var(--line); overflow: hidden; color: var(--text-1); background: var(--bg-page); }
.workflow-panel--empty { visibility: hidden; pointer-events: none; }
.workflow-panel-head, .workflow-detail-head, .workflow-steps-head, .workflow-actions, .workflow-checks { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.workflow-panel-head { min-height: 34px; color: var(--text-2); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.workflow-panel-back { display: none; }
.workflow-panel-head button:not(.workflow-panel-back), .workflow-detail-head button, .workflow-steps-head button, .workflow-actions button, .workflow-approval button { min-height: 28px; padding: 0 9px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-1); font-size: .74rem; font-weight: 650; }
.workflow-panel button:hover { background: rgba(255,255,255,.1); color: var(--text-0); }
.workflow-panel .workflow-panel-back { background: transparent; color: var(--text-1); }
.workflow-panel .workflow-panel-back:hover { background: transparent; color: var(--text-0); }
.workflow-panel-tabs { display: flex; align-items: center; gap: 14px; padding: 0 0 7px; border-bottom: 1px solid var(--line); }
.workflow-panel-tabs button { position: relative; min-height: 24px; color: var(--text-3); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.workflow-panel-tabs button.is-active { color: var(--text-0); }
.workflow-panel-tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; border-radius: 999px; background: var(--text-0); }
.workflow-list { flex: 0 0 auto; max-height: 30%; overflow: auto; display: grid; gap: 3px; }
.workflow-item { width: 100%; min-width: 0; padding: 8px 9px; border-radius: 10px; background: rgba(255,255,255,.025); text-align: left; }
.workflow-item:hover, .workflow-item.is-active { background: var(--surface-sidebar-hover); }
.workflow-item-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.workflow-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); font-size: .84rem; font-weight: 620; }
.workflow-state { flex: 0 0 auto; color: var(--text-3); font-size: .66rem; font-weight: 760; text-transform: uppercase; }
.workflow-state.is-enabled { color: var(--ready); }
.workflow-meta, .workflow-detail-meta, .workflow-run-meta, .workflow-empty { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: .72rem; line-height: 1.3; }
.workflow-detail { min-height: 0; flex: 1; overflow: auto; display: grid; align-content: start; gap: 8px; padding-top: 4px; }
.workflow-detail-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); font-size: .9rem; }
.workflow-steps, .workflow-steps-edit { display: grid; gap: 4px; }
.workflow-step { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 7px; padding: 7px 8px; border-radius: 10px; background: rgba(255,255,255,.035); }
.workflow-step.is-running { background: rgba(16,163,127,.08); }
.workflow-step span, .workflow-step-edit span { color: var(--text-3); font-size: .72rem; font-weight: 760; }
.workflow-step p { margin: 0; min-width: 0; color: var(--text-1); font-size: .78rem; line-height: 1.35; }
.workflow-approval { display: grid; gap: 7px; padding: 8px; border-radius: 10px; background: rgba(227,180,100,.09); color: var(--text-1); font-size: .78rem; }
.workflow-paused-note { padding: 7px 8px; border-radius: 10px; background: rgba(255,255,255,.035); color: var(--text-2); font-size: .74rem; line-height: 1.35; }
.workflow-approval div { display: flex; gap: 6px; }
.workflow-form { display: grid; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.035); }
.workflow-label { display: grid; gap: 4px; color: var(--text-2); font-size: .7rem; font-weight: 650; }
.workflow-label input, .workflow-step-edit textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.045); color: var(--text-0); }
.workflow-label input { height: 32px; padding: 0 9px; }
.workflow-label--short { max-width: 150px; }
.workflow-checks { justify-content: flex-start; flex-wrap: wrap; color: var(--text-2); font-size: .72rem; }
.workflow-checks label { display: inline-flex; align-items: center; gap: 5px; }
.workflow-steps-head { color: var(--text-2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.workflow-step-edit { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 7px; }
.workflow-step-edit textarea { min-height: 72px; padding: 8px; resize: vertical; font-size: .78rem; line-height: 1.35; }
.message-list { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 22px 0 6px; display: flex; flex-direction: column; gap: 2px; scroll-behavior: smooth; }
.origin-panel { display: contents; }
.origin-separator { margin: 18px 0 20px; display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.origin-separator-line { min-width: 18px; height: 1px; flex: 1 1 auto; background: var(--line-strong); }
.origin-separator-chip { max-width: min(82%, 560px); min-height: 24px; padding: 0 4px 0 7px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035); }
.origin-type-icon { width: 13px; height: 13px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.origin-type-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.origin-title { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: .7rem; font-weight: 620; }
.origin-jump, .origin-more { flex: 0 0 auto; min-height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-1); font-size: .69rem; font-weight: 620; }
.origin-jump:hover, .origin-more:hover { background: rgba(255,255,255,.1); color: var(--text-0); }
.message.origin-source { opacity: .9; }
.message.origin-source.is-source { opacity: 1; }
.message.origin-source + .message.origin-source { margin-top: -2px; }
.origin-more { width: fit-content; margin: 0 auto 6px; }
.empty-state { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-bottom: 12vh; color: var(--text-1); }
.empty-state h2 { margin: 0; color: var(--text-0); font-size: clamp(1.7rem, 4.5vw, 2.45rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 650; }
.empty-state p { max-width: 560px; margin: 0; color: var(--text-2); font-size: .98rem; line-height: 1.48; }
.token-panel { width: min(100%, 520px); max-width: 100%; min-width: 0; display: grid; gap: 12px; }
.token-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.token-input {
  min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px;
  outline: none; background: var(--surface-composer); color: var(--text-0); font-size: .95rem;
}
.token-input:focus { border-color: var(--line-strong); background: var(--surface-composer-focus); }
.token-submit {
  min-height: 46px; padding: 0 16px; border-radius: 14px; background: #f0f0f0; color: #202020;
  font-size: .9rem; font-weight: 720;
}
.token-submit:hover { background: #fff; }
.token-hint { color: var(--text-3); font-size: .82rem; line-height: 1.4; }
.quick-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.quick-card { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.045); color: var(--text-1); text-align: center; font-size: .84rem; line-height: 1.25; }
.quick-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,.07); color: var(--text-0); }
.quick-panel { width: min(100%, 520px); display: grid; gap: 8px; margin-top: 2px; }
.branch-switcher button { min-height: 34px; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,.07); color: var(--text-1); font-size: .78rem; font-weight: 680; }
.branch-switcher button:hover { background: rgba(255,255,255,.11); color: var(--text-0); }
.quick-grid--actions { max-width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-card--action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.quick-card--action strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); font-size: .82rem; font-weight: 720; }
.branch-switcher { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.branch-switcher label { min-width: 0; display: grid; gap: 4px; color: var(--text-2); font-size: .7rem; font-weight: 680; }
.branch-switcher select { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.045); color: var(--text-0); outline: none; }
.branch-list { max-height: 188px; overflow: auto; display: grid; gap: 3px; }
.branch-row { min-width: 0; display: grid; grid-template-columns: minmax(120px, .8fr) minmax(120px, .85fr) minmax(0, 1.3fr); gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.026); align-items: center; }
.branch-row.is-current { background: rgba(16,163,127,.09); }
.branch-name, .branch-meta, .branch-subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.branch-name { color: var(--text-0); font-size: .78rem; font-weight: 680; }
.branch-meta, .branch-subject { color: var(--text-2); font-size: .7rem; }
.quick-frequency { display: grid; gap: 5px; color: var(--text-2); font-size: .7rem; }
.quick-frequency > span { font-weight: 720; text-transform: uppercase; letter-spacing: .05em; }
.quick-frequency div { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-frequency em { max-width: 180px; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.045); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.quick-output { max-height: 220px; margin: 0; padding: 9px 10px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); color: var(--text-1); font-size: .72rem; line-height: 1.36; white-space: pre-wrap; }
.quick-output.is-error { border-color: rgba(248,113,113,.28); color: #fecaca; }
.message { display: flex; width: 100%; min-width: 0; }
.message.is-highlighted .message-body, .message.is-highlighted .child-run-panel { border-radius: 18px; animation: message-highlight 1800ms ease; }
@keyframes message-highlight {
  0%, 70% { background: rgba(16,163,127,.16); box-shadow: 0 0 0 1px rgba(16,163,127,.35); }
  100% { background: transparent; box-shadow: 0 0 0 1px transparent; }
}
.message.user.is-highlighted .message-body { animation-name: user-message-highlight; }
@keyframes user-message-highlight {
  0%, 70% { box-shadow: 0 0 0 2px rgba(16,163,127,.55); }
  100% { box-shadow: 0 0 0 2px transparent; }
}
.message.assistant, .message.system, .message.reasoning { justify-content: flex-start; }
.message.user { justify-content: flex-end; padding-left: clamp(0px, 16vw, 180px); }
.message-stack { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.message.user .message-stack { width: auto; max-width: min(100%, 640px); align-items: flex-end; }
.message-body { width: 100%; min-width: 0; }
.message.assistant .message-body, .message.system .message-body, .message.reasoning .message-body { padding: 15px 0; }
.message.user .message-body { width: auto; max-width: 100%; padding: 13px 17px; border-radius: 24px; background: var(--surface-user); }
.message.system .message-body { color: var(--warning); }
.message.reasoning .message-body { padding-top: 6px; padding-bottom: 6px; }
.message.reasoning .message-content { max-width: 72ch; color: var(--text-2); font-size: .86rem; line-height: 1.45; font-style: italic; }
.reasoning-disclosure { max-width: 72ch; color: var(--text-2); }
.reasoning-disclosure summary { width: fit-content; display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); cursor: pointer; list-style: none; font-size: .68rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; user-select: none; }
.reasoning-disclosure summary::-webkit-details-marker { display: none; }
.reasoning-disclosure-chevron { color: var(--text-3); font-size: .9rem; line-height: 1; transform: rotate(0deg); transition: transform 120ms ease; }
.reasoning-disclosure[open] .reasoning-disclosure-chevron { transform: rotate(90deg); }
.reasoning-disclosure-content { margin-top: 7px; }
.message-content { max-width: 100%; color: var(--text-0); font-size: 1rem; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.message-content strong { color: var(--text-0); font-weight: 720; }
.message-content em { color: var(--text-0); font-style: italic; }
.message-content a { color: #8ecbff; text-decoration: none; border-bottom: 1px solid rgba(142,203,255,.38); }
.message-content a:hover { border-bottom-color: currentColor; }
.message-content code {
  padding: .12em .35em; border: 1px solid var(--line); border-radius: 7px;
  background: rgba(255,255,255,.06); color: var(--text-0);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em;
}
.message-content pre {
  max-width: 100%; margin: .65em 0; padding: 12px 14px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.22);
  white-space: pre;
}
.message-content pre code { padding: 0; border: 0; border-radius: 0; background: transparent; }
.message-content .markdown-table-wrap { max-width: 100%; margin: .7em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.16); }
.message-content .markdown-table { width: max-content; min-width: 100%; border-collapse: collapse; white-space: normal; font-size: .86rem; line-height: 1.35; }
.message-content .markdown-table th,
.message-content .markdown-table td { max-width: 34ch; padding: 7px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; word-break: normal; }
.message-content .markdown-table th:last-child,
.message-content .markdown-table td:last-child { border-right: 0; }
.message-content .markdown-table tr:last-child td { border-bottom: 0; }
.message-content .markdown-table th { background: rgba(255,255,255,.06); color: var(--text-0); font-weight: 720; }
.message-content .markdown-table td { color: var(--text-1); }
.message-content .md-heading { display: inline-block; margin-top: .3em; color: var(--text-0); font-weight: 760; }
.message-media-ref { display: block; max-width: min(100%, 520px); margin: .55em 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.045); color: var(--text-1); text-align: left; text-decoration: none; }
.message-media-ref:hover { border-color: var(--line-strong); color: var(--text-0); }
.message-media-ref--image img { display: block; width: 100%; max-height: min(56svh, 520px); object-fit: contain; background: rgba(0,0,0,.2); }
.message-media-ref--file { width: fit-content; max-width: 100%; padding: 8px 10px; font-size: .84rem; line-height: 1.25; }
.message-media-ref--audio { width: min(100%, 520px); padding: 9px 10px; }
.media-audio-player { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.media-audio-play { min-width: 72px; height: 34px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-0); font-size: .86rem; font-weight: 720; }
.media-audio-play:hover { background: rgba(255,255,255,.14); }
.media-audio-info { min-width: 0; display: grid; gap: 2px; }
.media-audio-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; line-height: 1.25; color: var(--text-1); }
.media-audio-time { font-size: .76rem; line-height: 1.2; color: var(--text-3); }
.media-audio-player audio { display: none; }
.message.assistant .message-content, .message.system .message-content { max-width: 72ch; }
.message.user .message-content { line-height: 1.55; }
.message-meta { margin-bottom: 5px; color: var(--text-3); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.tts-button { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--text-2); font-size: 0; line-height: 0; letter-spacing: 0; }
.tts-button:hover { background: rgba(255,255,255,.08); color: #fff; }
.tts-button-icon { width: 0; height: 0; margin-left: 2px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.tts-button.is-speaking .tts-button-icon { width: 8px; height: 8px; margin-left: 0; border: 0; background: currentColor; border-radius: 1px; }
.message-actions { margin-top: 6px; display: flex; align-items: center; gap: 2px; opacity: .28; transition: opacity 120ms ease; }
.message:hover .message-actions, .message:focus-within .message-actions { opacity: 1; }
.message-action-button { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: transparent; color: var(--text-3); transition: color 120ms ease, opacity 120ms ease; }
.message-action-button:hover, .message-action-button:focus-visible { background: transparent; color: var(--text-0); }
.message-action-button.is-copied { background: transparent; color: var(--ready); }
.message-action-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.message-attachments { max-width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.message.user .message-attachments { justify-content: flex-end; }
.message-attachment { max-width: min(100%, 260px); min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.045); color: var(--text-1); text-decoration: none; }
.message-attachment:hover { border-color: var(--line-strong); color: var(--text-0); }
.message-attachment--image { display: grid; gap: 0; text-align: inherit; }
.message.user .message-attachment--image { max-width: min(100%, 640px); }
.message-attachment--image img { display: block; width: 100%; max-height: 220px; object-fit: cover; background: rgba(0,0,0,.18); }
.message-attachment--image span { display: none; }
.message-attachment--file { min-height: 52px; padding: 9px 10px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; }
.message-attachment--audio { width: min(100%, 360px); padding: 9px 10px; display: grid; gap: 6px; }
.message-attachment--audio small { color: var(--text-3); font-size: .72rem; line-height: 1.1; }
.attachment-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: rgba(255,255,255,.08); color: var(--text-0); font-size: .9rem; }
.attachment-copy { min-width: 0; display: grid; gap: 2px; }
.attachment-copy span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.attachment-copy small { color: var(--text-3); font-size: .72rem; }
.image-preview-backdrop { position: fixed; inset: 0; z-index: 80; padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: center; background: rgba(12,12,12,.88); backdrop-filter: blur(10px); overflow: hidden; touch-action: none; }
.image-preview-full { max-width: 100%; max-height: 100%; border-radius: 16px; object-fit: contain; box-shadow: 0 18px 60px rgba(0,0,0,.45); cursor: zoom-in; user-select: none; touch-action: none; will-change: transform; }
.image-preview-full.is-zoomed { cursor: grab; }
.image-preview-full.is-zoomed:active { cursor: grabbing; }
.image-preview-close { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 81; width: 38px; height: 38px; color: var(--text-0); font-size: 0; line-height: 0; opacity: .82; }
.image-preview-close::before,
.image-preview-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; border-radius: 999px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.image-preview-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.image-preview-close:hover { opacity: 1; }
.message-body.is-pending .message-content::after { display: none; }
.pending-status-row { min-height: 24px; display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: .84rem; }
.pending-reasoning-wrap { width: min(100%, 72ch); margin-top: 8px; padding-left: 10px; border-left: 2px solid rgba(167,139,250,.55); color: var(--text-2); }
.pending-mini-label { margin-bottom: 3px; color: var(--text-3); font-size: .65rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.pending-reasoning { color: var(--text-2); font-size: .84rem; line-height: 1.45; font-style: italic; }
.pending-stream { margin-top: 8px; max-width: 72ch; color: var(--text-0); }
.pending-stop { margin-left: 4px; width: 22px; height: 22px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #f0f0f0; color: #202020; font-size: 0; }
.pending-stop::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: currentColor; }
.pending-stop:hover { background: #fff; color: #202020; }
.message.child-run-anchor { justify-content: flex-start; padding: 0 0 2px 0; }
.child-runs { margin-top: 3px; display: grid; gap: 1px; color: var(--text-2); font-size: .74rem; line-height: 1.25; }
.child-run { width: 100%; min-width: 0; padding: 4px 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 7px; align-items: start; text-align: left; color: inherit; border-radius: 8px; }
.child-run::after { grid-column: 3; grid-row: 1 / span 2; align-self: center; content: "›"; color: var(--text-3); font-size: .95rem; }
.child-run:hover .child-run-title { text-decoration: underline; }
.child-run-status { grid-column: 1; grid-row: 1 / span 2; padding-top: 1px; color: var(--warning); font-weight: 760; text-transform: lowercase; letter-spacing: 0; }
.child-run--done .child-run-status { color: var(--ready); }
.child-run--error .child-run-status { color: var(--danger); }
.child-run-title, .child-run-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.child-run-title { grid-column: 2; grid-row: 1; color: var(--text-1); }
.child-run-summary { grid-column: 2; grid-row: 2; display: block; color: var(--text-2); font-size: .72rem; }
.child-run-panel { margin: 8px 0 8px 6px; padding: 6px 0 6px 10px; border-left: 2px solid rgba(255,255,255,.14); color: var(--text-2); }
.child-run-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: .7rem; font-weight: 650; letter-spacing: .01em; }
.child-run-panel-title span:first-child { color: var(--text-1); }
.child-run-panel--task-running .child-run-panel-title span:first-child,
.child-run-panel--task-waiting_children .child-run-panel-title span:first-child,
.child-run-panel--task-retrying .child-run-panel-title span:first-child { color: var(--warning); }
.child-run-panel--task-done .child-run-panel-title span:first-child { color: var(--ready); }
.child-run-panel--task-error .child-run-panel-title span:first-child { color: var(--danger); }
.child-run-backdrop { position: fixed; inset: 0; z-index: 90; padding: max(14px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: center; background: rgba(12,12,12,.78); backdrop-filter: blur(10px); }
.child-run-modal { width: min(760px, 100%); max-height: 90svh; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-main); box-shadow: 0 18px 70px rgba(0,0,0,.45); }
.child-run-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.child-run-modal-kicker { color: var(--text-3); font-size: .72rem; }
.child-run-modal h2 { margin: 0; color: var(--text-0); font-size: 1rem; line-height: 1.25; word-break: break-word; }
.child-run-close { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 999px; color: var(--text-1); font-size: 1.3rem; }
.child-run-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.child-run-meta-grid div { min-width: 0; padding: 7px 8px; border-radius: 10px; background: rgba(255,255,255,.045); }
.child-run-meta-grid span { display: block; color: var(--text-3); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
.child-run-meta-grid strong, .child-run-meta-grid button { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); font-size: .76rem; text-align: left; }
.child-run-actions { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.child-run-actions button { min-height: 30px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text-1); font-size: .76rem; font-weight: 650; }
.child-run-actions button:hover { background: rgba(255,255,255,.12); color: var(--text-0); }
.child-run-result { margin-top: 10px; }
.child-run-result h3 { margin: 0 0 5px; color: var(--text-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.child-run-result pre { margin: 0; max-height: 42svh; overflow: auto; white-space: pre-wrap; word-break: break-word; color: var(--text-1); font-size: .78rem; line-height: 1.42; }
.child-run-result--assistant .message-content { max-width: none; max-height: 42svh; overflow: auto; color: var(--text-1); font-size: .86rem; line-height: 1.5; }
.child-run-result--assistant .message-content pre { max-height: none; }
.child-run-empty { padding: 10px; color: var(--text-2); font-size: .82rem; }
@media (max-width: 560px) { .child-run-meta-grid { grid-template-columns: 1fr; } }
@keyframes blink { 50% { opacity: 0; } }

.composer { position: sticky; bottom: 0; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; padding-top: 8px; background: linear-gradient(180deg, rgba(33,33,33,0) 0%, rgba(33,33,33,.9) 28%, rgba(33,33,33,1) 100%); }
.context-anchor { max-width: 100%; margin: 0 0 8px 2px; padding: 6px 8px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.045); color: var(--text-2); font-size: .76rem; line-height: 1.3; }
.context-anchor span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-anchor button { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 999px; color: var(--text-2); font-size: 1rem; line-height: 1; }
.context-anchor button:hover { background: rgba(255,255,255,.09); color: var(--text-0); }
.composer-routing-controls { margin: 0 0 7px 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.runner-toggle, .claudex-model-toggle { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.045); }
.runner-toggle-button, .claudex-model-button { min-height: 24px; padding: 0 10px; border-radius: 999px; color: var(--text-2); font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.runner-toggle-button:hover, .claudex-model-button:hover { color: var(--text-0); background: rgba(255,255,255,.07); }
.runner-toggle-button.is-active, .claudex-model-button.is-active { background: rgba(255,255,255,.16); color: var(--text-0); }
.composer-frame { position: relative; width: 100%; min-width: 0; border-radius: 28px; background: var(--surface-composer); transition: background 140ms ease; }
.composer-frame:focus-within, .composer.is-busy .composer-frame { background: var(--surface-composer-focus); }
.parent-select { position: absolute; left: 12px; bottom: 12px; z-index: 2; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06) linear-gradient(var(--text-0), var(--text-0)) center / 12px 1.5px no-repeat; color: transparent; appearance: none; }
.parent-select:hover { background: rgba(255,255,255,.12); }
.attach-button { position: absolute; left: 12px; bottom: 12px; z-index: 3; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-1); font-size: 0; line-height: 0; }
.attach-button::before,
.attach-button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.8px; border-radius: 999px; background: currentColor; transform: translate(-50%, -50%); }
.attach-button::after { transform: translate(-50%, -50%) rotate(90deg); }
.attach-button:hover { background: rgba(255,255,255,.12); color: var(--text-0); }
.file-input { display: none; }
.parent-select:not(.is-hidden) ~ .attach-button { left: 50px; }
.parent-select:not(.is-hidden) ~ textarea { padding-left: 94px; }
textarea { display: block; width: 100%; min-height: 58px; max-height: 220px; resize: none; padding: 16px 92px 16px 56px; border: 0; outline: none; background: transparent; color: var(--text-0); font-size: 1rem; line-height: 1.5; }
textarea::placeholder { color: var(--text-2); }
#sendBtn,
.mic-button { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #f0f0f0; color: #202020; touch-action: none; }
#sendBtn:hover:not(:disabled),
.mic-button:hover:not(:disabled) { background: #fff; }
.composer.is-empty #sendBtn { display: none; }
.composer:not(.is-empty) .mic-button { display: none; }
.send-icon, .mic-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.35; stroke-linecap: round; stroke-linejoin: round; }
.mic-icon { width: 20px; height: 20px; stroke-width: 2.1; }
.attachment-preview { margin: 0 0 8px; display: flex; gap: 7px; overflow-x: auto; padding-bottom: 1px; }
.pending-attachment { flex: 0 0 auto; max-width: 220px; height: 42px; padding: 5px 6px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 24px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.045); }
.pending-attachment img, .pending-file-icon { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; background: rgba(255,255,255,.08); }
.pending-file-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--text-1); font-size: .82rem; }
.pending-attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); font-size: .78rem; }
.pending-attachment-size { color: var(--text-3); font-size: .7rem; white-space: nowrap; }
.pending-attachment button { width: 24px; height: 24px; border-radius: 999px; color: var(--text-2); font-size: 1rem; line-height: 1; }
.pending-attachment button:hover { background: rgba(255,255,255,.08); color: var(--danger); }
.voice-panel {
  position: absolute; right: 56px; bottom: 13px; z-index: 4; min-height: 34px; max-width: calc(100% - 116px);
  margin: 0; padding: 0 9px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.065); color: var(--text-1);
  overflow: hidden; pointer-events: auto;
}
.composer.is-recording .composer-frame { background: var(--surface-composer-focus); }
.composer.is-recording textarea { visibility: hidden; pointer-events: none; }
.composer.is-recording .attach-button,
.composer.is-recording #sendBtn,
.composer.is-recording .parent-select { visibility: hidden; opacity: 0; pointer-events: none; }
.composer.is-recording .mic-button { opacity: 1; background: #ef4444; color: #fff; box-shadow: 0 0 0 5px rgba(239,68,68,.16); }
.composer.is-recording .mic-button:hover:not(:disabled) { background: #dc2626; }
.voice-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 999px; background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.13); animation: voice-pulse 1s ease-in-out infinite; }
.voice-timer { flex: 0 0 auto; min-width: 58px; color: var(--text-0); font-size: .88rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.voice-hint { display: none; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: .82rem; }
.voice-action { display: none; min-height: 30px; padding: 0 10px; border-radius: 999px; color: var(--text-1); font-size: .8rem; font-weight: 650; }
.voice-action:hover { background: rgba(255,255,255,.08); color: var(--text-0); }
.voice-send { background: #f0f0f0; color: #202020; }
.voice-send:hover { background: #fff; color: #202020; }
.composer.is-voice-locked .composer-frame { background: transparent; }
.composer.is-voice-locked .mic-button { display: none; }
.composer.is-voice-locked .voice-panel { left: 50%; right: auto; bottom: 8px; max-width: calc(100% - 24px); transform: translateX(-50%); }
.composer.is-voice-locked .voice-action { display: inline-flex; align-items: center; justify-content: center; }
.composer.is-voice-locked .voice-hint { display: none; }
.voice-status { min-height: 28px; margin: 0 0 6px; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.045); color: var(--text-2); font-size: .78rem; line-height: 1.25; }
.voice-status.is-error { color: #fecaca; background: rgba(239,68,68,.14); }
@keyframes voice-pulse { 50% { opacity: .45; } }

.is-hidden { display: none !important; }

@media (max-width: 820px) {
  .app-layout, .app-shell.is-sidebar-collapsed .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-mobile-width); transform: translateX(-102%); transition: transform 180ms ease; box-shadow: 16px 0 48px rgba(0,0,0,.38); }
  .app-shell.is-mobile-sidebar-open .sidebar { transform: translateX(0); }
  .mobile-menu-button, .sidebar-panel-action { display: inline-flex; }
  .topbar, .workspace { max-width: none; }
  .workflow-panel { position: fixed; inset: 0 0 0 auto; z-index: 50; width: 100vw; display: flex; transform: translateX(102%); transition: transform 180ms ease; box-shadow: -16px 0 48px rgba(0,0,0,.38); }
  .app-shell.is-mobile-workflow-open .workflow-panel { transform: translateX(0); }
  .workflow-panel--empty { display: none; }
  .workflow-panel-back { width: 32px; min-width: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .workflow-panel-head { grid-template-columns: auto 1fr auto; }
}

@media (max-width: 520px) {
  .topbar { padding: 10px 10px 6px; }
  .workspace { padding: 0 10px 12px; gap: 10px; }
  .message-list { padding-top: 10px; }
  .quick-grid { grid-template-columns: 1fr; }
  .token-form { grid-template-columns: 1fr; }
  .token-submit { width: 100%; }
  .message.user { padding-left: 42px; }
  .message-content { font-size: .96rem; line-height: 1.62; }
  textarea { min-height: 54px; padding-top: 15px; padding-bottom: 15px; }
}

@media (max-width: 360px) {
  .topbar-content { gap: 6px; }
  .topbar-new-chat-button,
  .mobile-menu-button { width: 36px; height: 36px; }
  textarea { padding-left: 50px; padding-right: 64px; }
  #sendBtn,
  .mic-button { right: 10px; width: 34px; height: 34px; }
  .voice-panel { right: 50px; gap: 7px; padding: 0 8px; max-width: calc(100% - 104px); }
  .voice-action { padding: 0 8px; }
}

.knowledge-panel { min-height: 0; flex: 1; display: grid; grid-template-rows: auto minmax(86px, 24%) minmax(0, 1fr); gap: 7px; overflow: hidden; }
.knowledge-search-row { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 6px; }
.knowledge-search-row input { width: 100%; min-width: 0; height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: rgba(255,255,255,.045); color: var(--text-0); font-size: .78rem; }
.knowledge-search-row button { min-height: 30px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--text-1); font-size: .8rem; }
.knowledge-page-list { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 3px; padding-right: 1px; }
.knowledge-page-item { width: 100%; min-width: 0; padding: 7px 8px; display: grid; gap: 2px; border-radius: 9px; background: rgba(255,255,255,.025); text-align: left; }
.knowledge-page-item:hover, .knowledge-page-item.is-active { background: var(--surface-sidebar-hover); }
.knowledge-page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); font-size: .8rem; font-weight: 650; }
.knowledge-page-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: .68rem; }
.knowledge-reader { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 8px; padding-top: 2px; }
.knowledge-reader-head { min-width: 0; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.035); }
.knowledge-reader-head strong, .knowledge-reader-head span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-reader-head strong { color: var(--text-0); font-size: .88rem; line-height: 1.25; }
.knowledge-reader-head span { margin-top: 2px; color: var(--text-3); font-size: .68rem; }
.knowledge-reader-body { min-width: 0; white-space: pre-wrap; word-break: break-word; color: var(--text-1); font-size: .79rem; line-height: 1.48; }
.knowledge-reader-body .md-heading { display: block; margin: 10px 0 2px; color: var(--text-0); font-weight: 720; }
.knowledge-reader-body pre { max-width: 100%; overflow: auto; padding: 8px; border-radius: 10px; background: rgba(0,0,0,.22); color: var(--text-1); font-size: .74rem; line-height: 1.4; white-space: pre; }
.knowledge-inline-link { display: inline; padding: 0 3px; border-radius: 5px; background: rgba(16,163,127,.12); color: #8be3ca; font: inherit; line-height: inherit; vertical-align: baseline; }
.knowledge-inline-link:hover { background: rgba(16,163,127,.2); color: #c8fff1; }
.knowledge-related { display: grid; gap: 7px; padding-bottom: 4px; }
.knowledge-related section { display: grid; gap: 4px; }
.knowledge-related h3 { margin: 0; color: var(--text-3); font-size: .66rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.knowledge-related button { width: 100%; min-width: 0; padding: 6px 8px; border-radius: 9px; background: rgba(255,255,255,.035); color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: .74rem; }
.knowledge-related button:hover { background: rgba(255,255,255,.08); color: var(--text-0); }
.knowledge-empty, .knowledge-error { padding: 8px; border-radius: 10px; color: var(--text-2); background: rgba(255,255,255,.035); font-size: .76rem; line-height: 1.35; }
.knowledge-error { color: #fecaca; background: rgba(239,68,68,.12); }

.knowledge-panel--nav { grid-template-rows: auto auto minmax(0, 1fr); }
.knowledge-main-view { min-width: 0; min-height: 0; overflow: auto; padding: 14px 0 6px; display: flex; flex-direction: column; gap: 12px; }
.knowledge-main-head { flex: 0 0 auto; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.knowledge-main-head button { min-height: 30px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-1); font-size: .78rem; font-weight: 650; }
.knowledge-main-head button:hover { background: rgba(255,255,255,.1); color: var(--text-0); }
.knowledge-main-head div { min-width: 0; }
.knowledge-main-head strong, .knowledge-main-head span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-main-head strong { color: var(--text-0); font-size: .95rem; line-height: 1.25; }
.knowledge-main-head span { margin-top: 2px; color: var(--text-3); font-size: .72rem; }
.knowledge-reader-body--main { flex: 1 1 auto; max-width: 100%; padding: 0 2px 20px; color: var(--text-0); font-size: .95rem; line-height: 1.62; }
.knowledge-reader-body--main .md-heading { margin: 16px 0 4px; font-size: 1.02rem; }
.knowledge-reader-body--main pre { font-size: .82rem; }
.knowledge-related--main { flex: 0 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 18px; }
@media (max-width: 560px) { .knowledge-related--main { grid-template-columns: 1fr; } }

.knowledge-tree { gap: 1px; font-size: .8rem; }
.knowledge-tree-row { --tree-level: 0; width: 100%; min-width: 0; height: 28px; padding: 0 7px 0 calc(6px + (var(--tree-level) * 14px)); display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 2px; border-radius: 7px; color: var(--text-1); text-align: left; }
.knowledge-tree-row:hover, .knowledge-tree-row.is-active { background: var(--surface-sidebar-hover); color: var(--text-0); }
.knowledge-tree-row.is-active { background: var(--surface-sidebar-active); }
.knowledge-tree-chevron { width: 20px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 1.28rem; line-height: 1; transform: rotate(0deg); transition: transform 100ms ease, color 100ms ease; }
.knowledge-tree-row:hover .knowledge-tree-chevron { color: var(--text-0); }
.knowledge-tree-dir.is-expanded .knowledge-tree-chevron { transform: rotate(90deg); }
.knowledge-tree-spacer { width: 20px; height: 1px; }
.knowledge-tree-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* xterm.js */
/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}

.xterm .xterm-accessibility-tree {
  font-family: monospace;
  user-select: text;
  white-space: pre;
}

.xterm .xterm-accessibility-tree > div {
  transform-origin: left;
  width: fit-content;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
	z-index: 6;
	position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
	z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}



/* Derived from vs/base/browser/ui/scrollbar/media/scrollbar.css */

/* xterm.js customization: Override xterm's cursor style */
.xterm .xterm-scrollable-element > .scrollbar {
    cursor: default;
}

/* Arrows */
.xterm .xterm-scrollable-element > .scrollbar > .scra {
	cursor: pointer;
	font-size: 11px !important;
}

.xterm .xterm-scrollable-element > .visible {
	opacity: 1;

	/* Background rule added for IE9 - to allow clicks on dom node */
	background:rgba(0,0,0,0);

	transition: opacity 100ms linear;
	/* In front of peek view */
	z-index: 11;
}
.xterm .xterm-scrollable-element > .invisible {
	opacity: 0;
	pointer-events: none;
}
.xterm .xterm-scrollable-element > .invisible.fade {
	transition: opacity 800ms linear;
}

/* Scrollable Content Inset Shadow */
.xterm .xterm-scrollable-element > .shadow {
	position: absolute;
	display: none;
}
.xterm .xterm-scrollable-element > .shadow.top {
	display: block;
	top: 0;
	left: 3px;
	height: 3px;
	width: 100%;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.left {
	display: block;
	top: 3px;
	left: 0;
	height: 100%;
	width: 3px;
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.top-left-corner {
	display: block;
	top: 0;
	left: 0;
	height: 3px;
	width: 3px;
}
.xterm .xterm-scrollable-element > .shadow.top.left {
	box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}


.terminal-open-button {
  width: 40px; height: 40px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--text-1); transition: background 120ms ease, color 120ms ease;
}
.terminal-open-button:hover { background: rgba(255,255,255,.08); color: var(--text-0); }
.terminal-overlay {
  position: fixed; inset: 0; z-index: 80; width: 100vw; height: 100svh; min-width: 0; min-height: 0;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 7px;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: #050505; color: #e8e8e8;
}
.terminal-overlay.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.terminal-header { min-width: 0; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.terminal-title { min-width: 0; display: grid; gap: 1px; }
.terminal-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-weight: 720; }
.terminal-status { width: fit-content; color: var(--text-3); font-size: .65rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.terminal-status.is-connected { color: var(--ready); }
.terminal-status.is-error, .terminal-status.is-closed { color: var(--warning); }
.terminal-actions { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; overflow-x: auto; }
.terminal-actions button, .terminal-keybar button, .terminal-ssh-row button {
  min-height: 32px; padding: 0 9px; border-radius: 9px; background: rgba(255,255,255,.08); color: var(--text-1); font-size: .74rem; font-weight: 680; white-space: nowrap;
}
.terminal-actions button:hover, .terminal-keybar button:hover, .terminal-ssh-row button:hover { background: rgba(255,255,255,.13); color: var(--text-0); }
.terminal-actions button:disabled, .terminal-ssh-row button:disabled { opacity: .45; }
.terminal-actions button.is-danger { color: #fecaca; background: rgba(248,113,113,.11); }
.terminal-ssh-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.terminal-ssh-row input {
  min-width: 0; height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; outline: none;
  background: #151515; color: var(--text-0); font: .8rem ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.terminal-ssh-row input:focus { border-color: rgba(255,255,255,.24); background: #1b1b1b; }
.terminal-xterm { min-width: 0; min-height: 0; padding: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: #050505; touch-action: none; overscroll-behavior: contain; }
.terminal-xterm .xterm { width: 100%; height: 100%; touch-action: none; }
.terminal-xterm .xterm-viewport { overflow-y: auto !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: none; }
.terminal-keybar { min-width: 0; display: flex; align-items: center; gap: 5px; overflow-x: auto; padding-bottom: 1px; }
.terminal-keybar button { flex: 0 0 auto; min-width: 46px; }

@media (max-width: 520px) {
  .terminal-overlay { gap: 6px; padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
  .terminal-header { align-items: start; }
  .terminal-title strong { max-width: 34vw; }
  .terminal-actions { gap: 4px; max-width: 64vw; }
  .terminal-actions button { min-height: 30px; padding: 0 7px; font-size: .69rem; }
  .terminal-xterm { padding: 5px; border-radius: 11px; }
  .terminal-keybar button { min-height: 34px; padding: 0 10px; }
}
.pending-claudex-actions { margin-top: 9px; width: min(100%, 72ch); }
.pending-claudex-toggle { height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text-2); font-size: .76rem; font-weight: 700; }
.pending-claudex-toggle:hover { background: rgba(255,255,255,.11); color: var(--text-0); }
.pending-claudex-input { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.pending-claudex-input input { min-width: 0; height: 32px; padding: 0 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(0,0,0,.24); color: var(--text-0); font: inherit; font-size: .84rem; outline: none; }
.pending-claudex-input input:focus { border-color: rgba(125,211,252,.55); box-shadow: 0 0 0 2px rgba(125,211,252,.10); }
.pending-claudex-input button { height: 32px; padding: 0 10px; border-radius: 10px; background: rgba(125,211,252,.18); color: var(--text-0); font-size: .78rem; font-weight: 720; }
.pending-claudex-input button:disabled { opacity: .45; }

@media (max-width: 640px) {
  .quick-grid--actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .branch-switcher { grid-template-columns: 1fr; align-items: stretch; }
  .branch-switcher button { width: 100%; }
  .branch-row { grid-template-columns: 1fr; gap: 2px; }
  .quick-output { max-height: 180px; }
}
