:root {
  --bg: #121212;
  --bg-2: #1a1a1a;
  --bg-3: #222222;
  --line: #343434;
  --ink: #e8e8e8;
  --muted: #8f8f8f;
  --accent: #d9783a;
  --accent-2: #7ea48a;
  --danger: #c45c4a;
  --warn: #d4a24c;
  --ok: #7ea48a;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scrollbar-color: var(--line) var(--bg); scrollbar-width: thin; }
* { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted); }
html, body { height: 100%; margin: 0; }
.enter-veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
html.is-entering .enter-veil {
  opacity: 1;
  pointer-events: auto;
}
html.is-revealing .enter-veil {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.8s ease;
}
@media (prefers-reduced-motion: reduce) {
  html.is-revealing .enter-veil { transition: none; }
  .chat-message.is-entering,
  .chat-message.status.is-working .message-content,
  .chat-activity-dots i,
  .entity-item.is-working,
  .entity-item.needs-approval {
    animation: none !important;
  }
}
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; padding-right: 1.5rem; }
select option { background: var(--bg-2); color: var(--ink); }
button { cursor: pointer; }
button.primary { background: var(--accent); border-color: transparent; color: #111111; font-weight: 600; }
button.danger { background: var(--danger); border-color: transparent; }
button.ghost { background: transparent; }
button.on { border-color: var(--accent); color: var(--accent); }
.error { color: var(--danger); }
.ide-body { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 0.7rem; height: 58px; padding: 0 1rem 0 8px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.brand { position: relative; display: flex; align-self: stretch; }
.brand-button { display: flex; align-items: center; padding: 0; border: 0; border-radius: 0; background: transparent; }
.brand-button:hover { background: var(--bg-3); }
.brand-mark { width: 58px; height: 58px; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
.brand-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; display: grid; min-width: 176px; padding: 0.25rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px #0008; }
.brand-menu[hidden] { display: none; }
.brand-menu button { border: 0; background: transparent; text-align: left; padding: 0.45rem 0.6rem; }
.brand-menu button:hover { background: var(--bg-3); }
#project-label { display: block; color: var(--ink); font-size: 0.84rem; text-transform: none; letter-spacing: 0; }
body.is-project-closed .workspace { opacity: 0.42; filter: grayscale(0.35); pointer-events: none; }
.project-pick-list, .project-manage-list { display: grid; gap: 0.45rem; padding: 1rem; max-height: 52vh; overflow: auto; }
.project-pick-list button, .project-manage-row { width: 100%; text-align: left; }
.project-manage-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.project-manage-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#modal-duplicate-files { width: min(720px, 94vw); max-height: 86vh; }
#modal-duplicate-files[open] { display: flex; flex-direction: column; }
#modal-duplicate-files .catalog-form { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; padding-bottom: 1rem; }
.duplicate-file-tree { flex: 1 1 auto; min-height: 12rem; max-height: 52vh; margin: 0.4rem 0 0.8rem; padding: 0.45rem 0.55rem; overflow: auto; border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); font-size: 0.78rem; }
.duplicate-file-tree .dup-row { display: flex; align-items: center; gap: 0.15rem; }
.duplicate-file-tree .dup-item { display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.18rem 0.15rem; min-width: 0; flex: 1; }
.catalog-form .duplicate-file-tree .dup-item { display: flex; margin-bottom: 0; }
.duplicate-file-tree .dup-item input { width: auto; flex: 0 0 auto; margin: 0; }
.duplicate-file-tree .dup-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duplicate-file-tree .dup-item.dir span { color: #a9d8ff; font-weight: 700; }
.dup-twist, .dup-twist-spacer { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; flex: 0 0 1.1rem; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.dup-twist:hover { color: var(--ink); }
.dup-twist-spacer { cursor: default; }
.dup-children { margin-left: 1.15rem; padding-left: 0.35rem; border-left: 1px solid var(--line); }
.topbar-divider { height: 28px; width: 1px; background: var(--line); }
.top-control { display: grid; gap: 0.15rem; min-width: 118px; color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; }
.top-control select { border: 0; background: transparent; padding: 0; font-size: 0.84rem; text-transform: none; letter-spacing: 0; }
.category-control { min-width: 150px; }
.topbar-spacer { flex: 1; }
.topbar-context { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.route-status { max-width: 240px; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.topbar-menu { display: flex; gap: 0.2rem; }
.icon-button { background: transparent; border-color: transparent; color: var(--muted); }
.icon-button:hover { color: var(--ink); background: var(--bg-3); }
.run-button { white-space: nowrap; }
.workspace { display: flex; min-height: 0; min-width: 0; }
.panel { background: var(--bg-2); overflow: hidden; min-width: 180px; }
.left { width: 250px; flex: 0 0 250px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.right { width: 390px; flex: 0 0 390px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.center { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.panel-head, .tabs, .infobar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.panel-head { justify-content: space-between; color: var(--muted); }
.row { display: flex; gap: 0.25rem; }
.tree { position: relative; flex: 1; overflow: auto; padding: 0.55rem; font-family: var(--mono); font-size: 0.78rem; user-select: none; }
.explorer-marquee { position: fixed; z-index: 15; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); pointer-events: none; }
.tree .item { padding: 0.3rem 0.4rem; border-radius: 5px; cursor: pointer; display: flex; justify-content: space-between; overflow-wrap: anywhere; }
.tree .item:hover, .tree .item.active { background: var(--bg-3); }
.tree .dir { color: var(--accent-2); }
#explorer-search { margin: 0.55rem; width: calc(100% - 1.1rem); }
.explorer-nav { display: flex; gap: 0.25rem; padding: 0.4rem 0.55rem 0; }
.explorer-nav button { flex: 1; padding: 0.25rem; font-size: 0.72rem; }
.explorer-path { padding: 0.35rem 0.6rem; color: var(--muted); font: 0.72rem var(--mono); overflow-wrap: anywhere; }
.tree .item { border: 0; width: 100%; background: transparent; text-align: left; }
.tree .item.dir { color: #a9d8ff; font-weight: 700; }
.tree .item:not(.dir):not(.hidden-entry) { color: #b4e8bd; }
.tree .item.hidden-entry { color: #f0aaaa; }
.tree .item.selected { outline: 1px solid var(--accent); background: var(--bg-3); }
#explorer-context-menu { position: fixed; }
.tabs { min-height: 38px; overflow-x: auto; }
.editor-hotbar { display: flex; align-items: center; gap: 0.35rem; min-width: 0; min-height: 34px; padding: 0.25rem 0.55rem; border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.editor-hotbar button { flex: 0 0 auto; padding: 0.2rem 0.45rem; font-size: 0.72rem; }
.editor-hotbar select { min-width: 0; flex: 1 1 auto; max-width: 100%; padding: 0.2rem 0.45rem; font-size: 0.72rem; }
.editor-hotbar label { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; min-width: 0; flex: 1 1 7rem; color: var(--muted); font-size: 0.72rem; }
#editor-helper-status { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--muted); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.editor-context-menu { position: fixed; z-index: 20; display: grid; min-width: 150px; padding: 0.25rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 24px #0008; }
.editor-context-menu[hidden] { display: none; }
.editor-context-menu button { border: 0; background: transparent; text-align: left; padding: 0.4rem 0.55rem; }
.editor-context-menu button:hover { background: var(--bg-3); }
.inline-ai-review { height: 100%; overflow: auto; padding: 0.55rem 0; background: #141414; color: var(--ink); font: 13px/1.5 var(--mono); white-space: pre-wrap; }
.inline-ai-code, .inline-ai-removed, .inline-ai-added { margin: 0; padding: 0 1rem; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-ai-removed { color: #ffd0c8; background: #45201e; }
.inline-ai-added { position: relative; color: #d7f5d0; background: #18351e; padding-bottom: 2.1rem; }
.inline-ai-actions { position: absolute; left: 0.55rem; bottom: 0.35rem; display: flex; gap: 0.25rem; }
.inline-ai-actions button { padding: 0.2rem 0.45rem; font-size: 0.7rem; }
.inline-ai-actions .primary { background: var(--ok); color: #10200f; }
.inline-ai-actions .ghost { background: var(--bg-3); }
.tab { cursor: grab; display: inline-flex; gap: 0.15rem; align-items: center; padding: 0.15rem 0.25rem 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; }
.tab.on { border-color: var(--accent); }
.tab-select, .tab-close { border: 0; background: transparent; padding: 0.15rem 0.2rem; }
.tab-select { color: var(--ink); }
.tab-close { color: var(--muted); font-size: 1rem; line-height: 1; }
.tab-close:hover { color: var(--ink); background: var(--bg-3); }
.tab.dirty .tab-select::after { content: " •"; color: var(--warn); }
#editor { flex: 1; min-height: 0; overflow: hidden; }
.inline-diff-view { height: 100%; overflow: auto; padding: 0.6rem 0; background: #141414; color: var(--ink); font: 13px/1.5 var(--mono); white-space: pre; }
.inline-diff-line { display: flex; min-height: 1.5em; padding: 0 1rem; }
.inline-diff-line .inline-diff-marker { width: 1.5rem; flex: 0 0 1.5rem; color: var(--muted); user-select: none; }
.inline-diff-line.added { color: #d7f5d0; background: #18351e; }
.inline-diff-line.added .inline-diff-marker { color: var(--ok); }
.inline-diff-line.removed { color: #ffd0c8; background: #45201e; }
.inline-diff-line.removed .inline-diff-marker { color: var(--danger); }
#asset-preview { flex: 1; min-height: 0; overflow: auto; padding: 0.8rem 1rem; }
#asset-preview[hidden] { display: none; }
.asset-stage { display: grid; gap: 0.8rem; height: 100%; }
.asset-stage img, .asset-stage video { max-width: 100%; max-height: 52vh; background: #0c0c0c; border: 1px solid var(--line); }
.asset-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.45rem; color: var(--muted); font-size: 0.8rem; }
.asset-meta b { display: block; color: var(--ink); font-weight: 500; }
.wave { width: 100%; height: 72px; background: #0c0c0c; border: 1px solid var(--line); }
#view-3d { width: 100%; height: 52vh; border: 1px solid var(--line); background: #0c0c0c; }
.asset-group { margin-bottom: 0.8rem; }
.asset-group h3 { margin: 0 0 0.35rem; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.asset-item { display: block; width: 100%; text-align: left; margin-bottom: 0.3rem; }
.diff-bar { display: flex; gap: 0.5rem; align-items: center; padding: 0.4rem 0.7rem; background: #2a2a2a; }
.conversation-tabs { display: flex; align-items: center; gap: 0.25rem; min-height: 39px; padding: 0.35rem 0.5rem 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
.conversation-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.1rem; max-width: 170px; padding: 0.15rem 0.2rem 0.15rem 0.55rem; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--bg-3); }
.conversation-tab.on { border-color: var(--accent); background: var(--bg-2); }
.conversation-select, .conversation-close { border: 0; background: transparent; padding: 0.25rem; }
.conversation-select { max-width: 130px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.conversation-tab.on .conversation-select { color: var(--ink); }
.conversation-close { color: var(--muted); font-size: 1rem; line-height: 1; }
.conversation-close:hover { color: var(--ink); background: var(--bg-3); }
.conversation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.7rem; border-bottom: 1px solid var(--line); }
.conversation-toolbar label { display: flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.72rem; }
.conversation-toolbar select { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.pane { flex: 1; min-height: 0; overflow: auto; padding: 0.75rem; font-size: 0.85rem; }
.chat-pane { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-workspace { display: flex; flex: 1; min-height: 0; min-width: 0; }
.chat-main { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; gap: 0.7rem; }
.entity-panel { display: flex; flex-direction: column; flex: 0 0 188px; width: 188px; min-width: 0; border-right: 1px solid var(--line); background: var(--bg-2); }
.entity-panel.is-collapsed { flex-basis: 28px; width: 28px; }
.entity-panel.is-collapsed .entity-list,
.entity-panel.is-collapsed #entity-clear { display: none; }
.entity-toolbar { display: flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.4rem 0.3rem; border-bottom: 1px solid var(--line); }
.entity-panel.is-collapsed .entity-toolbar { flex-direction: column; padding: 0.3rem 0.15rem; border-bottom: 0; }
#entity-toggle { flex: 1; min-width: 0; padding: 0.25rem 0.4rem; font-size: 0.72rem; }
.entity-panel.is-collapsed #entity-toggle { flex: 0 0 auto; writing-mode: vertical-rl; transform: rotate(180deg); padding: 0.55rem 0.15rem; letter-spacing: 0.08em; text-transform: uppercase; }
#entity-clear { padding: 0.25rem 0.45rem; font-size: 0.72rem; }
.entity-list { flex: 1; min-height: 0; overflow: auto; padding: 0.35rem; }
.entity-item { display: grid; gap: 0.12rem; width: 100%; margin-bottom: 0.35rem; padding: 0.45rem 0.5rem; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-3); text-align: left; }
.entity-item:hover { border-color: var(--muted); }
.entity-item.on { border-color: var(--accent); background: #2a2a2a; }
.entity-item.finished { opacity: 0.78; }
.entity-name { color: var(--ink); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-category { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-item.is-working {
  animation: entity-work 1.8s ease-in-out infinite;
}
.entity-item.needs-approval {
  border-color: var(--warn);
  animation: entity-glow 1.4s ease-in-out infinite;
}
@keyframes entity-work {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent); }
}
@keyframes entity-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--warn), 0 0 8px #d4a24c66; }
  50% { box-shadow: 0 0 0 1px #f0d48a, 0 0 16px #d4a24ccc; }
}
.entity-clear-banner { margin: 0.8rem 0 0.4rem; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-3); color: var(--muted); font-size: 0.78rem; }
.entity-clear-banner button { margin-left: 0.35rem; font-size: 0.72rem; }
#chat-log { flex: 1; overflow: auto; padding: 0.55rem 0.85rem 0; font-size: 0.82rem; }
.chat-requests { flex: 0 0 auto; max-height: 220px; overflow: auto; padding: 0 0.75rem; }
.chat-request-heading { margin-bottom: 0.45rem; color: var(--warn); font-size: 0.78rem; }
.chat-requests .req { margin-bottom: 0.45rem; }
.chat-diff-review { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0 0.75rem; padding: 0.55rem 0.65rem; border: 1px solid var(--warn); border-radius: 7px; background: #2a2a2a; font-size: 0.75rem; }
.chat-diff-review[hidden] { display: none; }
.chat-diff-review strong, .chat-diff-review span { display: block; }
.chat-diff-review span { margin-top: 0.2rem; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-counts { display: flex; gap: 0.45rem; font: 600 0.82rem var(--mono); white-space: nowrap; }
.chat-diff-review .diff-removed { color: #ff8f82; }
.chat-diff-review .diff-added { color: #9be391; }
.chat-message { margin: 0.7rem 0; max-width: 92%; }
.chat-message.is-entering {
  animation: chat-enter 0.45s ease-out;
}
.chat-message .message-role { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.chat-message .message-content { padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.user { margin-left: auto; }
.chat-message.user .message-content { background: var(--bg-3); }
.chat-message.status { max-width: 100%; }
.chat-message.status .message-content { background: var(--bg); border-style: dashed; color: var(--muted); font-size: 0.78rem; padding: 0.5rem 0.65rem; }
.chat-message.status .status-toggle { display: flex; align-items: center; gap: 0.4rem; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.chat-message.status .status-toggle::before { content: "▾"; flex: 0 0 auto; color: var(--muted); font-size: 0.7rem; }
.chat-message.status.is-collapsed .status-toggle::before { content: "▸"; }
.chat-message.status .status-heading { color: var(--ink); font-weight: 600; font-size: 0.82rem; }
.chat-message.status .status-body { margin-top: 0.35rem; }
.chat-message.status.is-collapsed .status-body { display: none; }
.chat-message.status .status-meta, .chat-message.status .status-detail { margin-top: 0.35rem; }
.chat-message.status .status-meta:first-child, .chat-message.status .status-detail:first-child { margin-top: 0; }
.chat-message.status .status-meta span, .chat-message.status .status-detail span { display: inline-block; min-width: 4.4rem; margin-right: 0.35rem; color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; }
.chat-message.status.is-working .message-content {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  animation: status-work 1.8s ease-in-out infinite;
}
.chat-activity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.85rem 0 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.chat-activity-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}
.chat-activity-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: chat-dot 1.1s ease-in-out infinite;
}
.chat-activity-dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-activity-dots i:nth-child(3) { animation-delay: 0.3s; }
.chat-activity.is-waiting .chat-activity-dots i { background: var(--warn); }
body.is-agent-running .chat-composer {
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 40%, transparent);
}
@keyframes chat-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes status-work {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent); }
}
@keyframes chat-dot {
  0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.message-actions { display: flex; justify-content: flex-end; gap: 0.1rem; margin-top: 0.2rem; }
.message-action { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.message-action:hover { color: var(--ink); background: var(--bg-3); }
.message-action svg { display: block; }
.message-edit { width: 100%; min-height: 4.5rem; resize: vertical; }
.message-edit-bar { display: flex; justify-content: flex-end; gap: 0.35rem; margin-top: 0.45rem; }
.chat-composer { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.65rem 0.75rem 0.75rem; border-top: 1px solid var(--line); background: var(--bg-2); }
.composer-controls, .composer-row { display: flex; align-items: center; gap: 0.45rem; }
.mode-button { border: 0; background: transparent; color: var(--muted); padding: 0.25rem 0; font-size: 0.75rem; }
.mode-button:hover { color: var(--ink); }
.composer-route { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 0.68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chat-input { flex: 1; min-width: 0; resize: none; }
.footer-model { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); white-space: nowrap; }
.footer-model select { max-width: 280px; border-color: transparent; background-color: transparent; color: var(--ink); padding-top: 0; padding-bottom: 0; }
.send-button { height: 38px; }
#term-out { white-space: pre-wrap; font-family: var(--mono); font-size: 0.75rem; }
#term-form { display: flex; gap: 0.4rem; padding-top: 0.5rem; }
#term-in { flex: 1; }
.event { margin-bottom: 0.45rem; color: var(--muted); }
.event b { color: var(--ink); font-weight: 500; }
.task { border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem; margin-bottom: 0.5rem; }
.task .bar { height: 6px; background: var(--bg-3); border-radius: 99px; overflow: hidden; margin: 0.35rem 0; }
.task .bar > i { display: block; height: 100%; background: var(--accent); }
.req { border: 1px solid var(--warn); padding: 0.5rem; border-radius: 8px; margin-bottom: 0.5rem; }
.req-agent { margin-bottom: 0.25rem; color: var(--muted); font-size: 0.72rem; }
.req-route { display: grid; gap: 0.25rem; margin: 0.5rem 0 0.15rem; color: var(--muted); font-size: 0.72rem; }
.req-route select { width: 100%; }
.req-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.req-actions button { font-size: 0.75rem; }
.infobar {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  font-size: 0.75rem;
  justify-content: space-between;
}
.v-gutter { flex: 0 0 6px; width: 6px; cursor: col-resize; background: transparent; touch-action: none; z-index: 2; }
.v-gutter:hover, .v-gutter:active { background: var(--accent); }
.modal { width: min(820px, 94vw); max-height: 86vh; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 0; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 0; font-size: 1rem; }
.s-pane, #perm-editor, #memory-editor { padding: 1rem; overflow: auto; max-height: 60vh; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem; margin-bottom: 0.6rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.modal::backdrop { background: #0009; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.catalog-toolbar h3, .catalog-toolbar p { margin: 0 0 0.5rem; }
.catalog-toolbar p, .catalog-card p, .catalog-hint { color: var(--muted); overflow-wrap: anywhere; }
.catalog-search, .catalog-form label { display: grid; gap: 0.4rem; margin-bottom: 0.9rem; }
.catalog-search input, .catalog-form input, .catalog-form textarea, .catalog-form select { width: 100%; min-width: 0; }
.catalog-form .duplicate-file-tree .dup-item { display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.18rem 0.15rem; }
.catalog-form .duplicate-file-tree .dup-item input { width: auto; flex: 0 0 auto; margin: 0; }
.catalog-form { padding: 1rem; }
.s-pane > .catalog-form { padding: 0.35rem 0 0; }
.catalog-form textarea { resize: vertical; }
.catalog-form .catalog-check { display: flex; align-items: center; }
.catalog-check input { width: auto; }
.catalog-form details { margin: 1rem 0; }
.catalog-form summary { cursor: pointer; margin-bottom: 0.8rem; }
.catalog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.confirm-modal { width: min(420px, 94vw); }
#explorer-delete-copy { margin: 0 0 0.8rem; }
#explorer-delete-list { margin: 0 0 1rem; padding-left: 1.2rem; max-height: 12rem; overflow: auto; }
#explorer-delete-list[hidden] { display: none; }
.catalog-card[hidden] { display: none; }
.model-list { margin: 0.8rem 0; max-height: 240px; overflow: auto; overflow-wrap: anywhere; }
.model-list summary { cursor: pointer; }
.model-list p { padding: 0.4rem 0; margin: 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.model-picker { margin: 0.4rem 0 0.9rem; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.model-picker .catalog-check { margin: 0; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); align-items: flex-start; }
.model-picker .catalog-check:last-child { border-bottom: 0; }
.model-picker .catalog-check[hidden] { display: none; }
.provider-model { margin: 0.4rem 0 0.8rem; }
.catalog-card .model-refresh-status.error { color: var(--danger); }
.catalog-card .row { flex-wrap: wrap; }
.catalog-form .grid > label { min-width: 0; }
.mode-options { display: grid; gap: 0.5rem; padding: 1rem; }
.mode-options button { display: grid; gap: 0.2rem; text-align: left; }
.mode-options span { color: var(--muted); font-size: 0.8rem; }
button:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) {
  .left, .right { width: 160px; min-width: 120px; }
  .grid { grid-template-columns: 1fr; }
}
