:root {
  color-scheme: dark;
  --bg: #090c12;
  --panel: rgba(19, 25, 38, 0.82);
  --panel-strong: rgba(27, 34, 50, 0.96);
  --line: rgba(157, 173, 204, 0.16);
  --line-strong: rgba(157, 173, 204, 0.3);
  --text: #eef3ff;
  --muted: #9aa6be;
  --accent: #ff9b54;
  --accent-deep: #ff7a1a;
  --accent-soft: rgba(255, 155, 84, 0.16);
  --user: #1f3556;
  --assistant: #131a28;
  --danger: #ff6b6b;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 26, 0.18), transparent 26%),
    radial-gradient(circle at 80% 20%, rgba(98, 84, 255, 0.14), transparent 24%),
    radial-gradient(circle at bottom right, rgba(36, 184, 163, 0.12), transparent 30%),
    linear-gradient(180deg, #06080d 0%, #0f1520 52%, #131926 100%);
}

button,
textarea,
input,
select {
  font: inherit;
}

a {
  color: #ffb37d;
}

.workspace-link {
  color: #ffd0a8;
  text-decoration-style: dotted;
}

.workspace-link:hover {
  color: #ffe3c9;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(10, 14, 22, 0.78);
  backdrop-filter: blur(18px);
}

.brand,
.chat-header,
.composer,
.chat-meta,
.chat-actions,
.sidebar-actions,
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
}

.brand,
.chat-header,
.modal-head {
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--muted);
}

.brand h1,
.chat-header h2,
.empty-card h3,
.auth-card h1,
.modal-head h3 {
  margin: 0;
  font-weight: 600;
}

.runner-badge,
.chat-meta span,
.subtle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.runner-badge,
.chat-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.mode-pill select {
  width: auto;
  min-width: 160px;
  padding: 6px 28px 6px 10px;
  border-radius: 999px;
  background: rgba(8, 12, 19, 0.82);
}

.sidebar-meta {
  margin: 18px 0 16px;
}

.sidebar-actions {
  justify-content: space-between;
  margin-top: 10px;
}

.chat-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-button,
.ghost-button,
.tiny-button,
.primary-button {
  border-radius: 16px;
  cursor: pointer;
}

.filter-button,
.ghost-button,
.tiny-button {
  color: var(--text);
  background: rgba(21, 28, 41, 0.86);
  border: 1px solid var(--line);
}

.filter-button {
  padding: 10px 14px;
}

.filter-button.active {
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.28) 0%, rgba(255, 183, 125, 0.16) 100%);
  border-color: rgba(255, 155, 84, 0.34);
}

.chat-list {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar-empty {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  background: rgba(15, 20, 30, 0.68);
}

.chat-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 14px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.chat-item:hover {
  transform: translateY(-1px);
  background: rgba(25, 33, 49, 0.92);
}

.chat-item.active {
  background: var(--panel-strong);
  border-color: rgba(255, 155, 84, 0.42);
  box-shadow: var(--shadow);
}

.chat-copy {
  min-width: 0;
}

.chat-item-title {
  margin: 0 0 6px;
  font-size: 17px;
}

.chat-item-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6f7b93;
  margin-top: 6px;
  flex: 0 0 auto;
}

.status-dot.running {
  background: var(--accent);
  box-shadow: 0 0 0 8px var(--accent-soft);
}

.main-pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 16vw);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100dvh;
  overflow: hidden;
  padding: 22px 24px 24px;
}

.main-pane.has-open-file {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 28vw);
}

.chat-topbar {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -22px -24px 0;
  padding: 22px 24px 0;
  background:
    linear-gradient(180deg, rgba(9, 12, 18, 0.96) 0%, rgba(9, 12, 18, 0.9) 72%, rgba(9, 12, 18, 0) 100%);
  backdrop-filter: blur(14px);
}

.main-body {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 16vw);
  gap: 18px;
  min-height: 0;
  overflow: hidden;
}

.main-body.has-open-file {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 28vw);
}

.chat-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-meta {
  gap: 10px;
  padding: 16px 0 18px;
  flex-wrap: wrap;
}

.activity-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 37, 0.86);
  color: var(--muted);
}

.activity-indicator.running {
  color: #ffd8b7;
  border-color: rgba(255, 155, 84, 0.36);
  background: rgba(64, 31, 12, 0.58);
}

.activity-indicator.error {
  color: #ffc1c1;
  border-color: rgba(255, 110, 110, 0.28);
  background: rgba(72, 19, 24, 0.6);
}

.chat-column {
  display: grid;
  grid-template-rows: minmax(132px, 20dvh) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.activity-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(16, 22, 34, 0.84);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.activity-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.activity-panel-head h3 {
  margin: 0;
  font-size: 15px;
}

.activity-log {
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.activity-entry {
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(11, 16, 25, 0.72);
}

.activity-entry + .activity-entry {
  margin-top: 10px;
}

.activity-entry.running {
  border-color: rgba(255, 155, 84, 0.22);
  background: rgba(40, 24, 13, 0.66);
}

.activity-entry.error {
  border-color: rgba(255, 110, 110, 0.22);
  background: rgba(63, 18, 22, 0.66);
}

.activity-entry-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.activity-badge,
.activity-time,
.activity-meta {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-badge {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(111, 123, 147, 0.18);
  color: #b9c1d4;
}

.activity-badge.running {
  background: rgba(255, 155, 84, 0.18);
  color: #ffd7bc;
}

.activity-badge.error {
  background: rgba(255, 110, 110, 0.18);
  color: #ffbaba;
}

.activity-badge.done {
  background: rgba(100, 208, 141, 0.16);
  color: #caf7d8;
}

.activity-title {
  color: var(--text);
  font-size: 13px;
}

.activity-time,
.activity-meta {
  color: var(--muted);
}

.activity-time {
  margin-left: auto;
}

.activity-detail {
  margin: 10px 0 0;
  color: #d7dbe6;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.activity-command,
.activity-output {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(7, 11, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #eef2f8;
  font: 12px/1.45 "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.activity-output {
  color: #ced6e5;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.workspace-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(16, 22, 34, 0.88);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.workspace-header,
.workspace-actions,
.file-tree-head,
.editor-head {
  display: flex;
  align-items: center;
}

.workspace-header {
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.workspace-header h3 {
  margin: 0;
}

.workspace-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0fr;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 180ms ease;
}

.workspace-split.has-file {
  grid-template-columns: 126px minmax(0, 1fr);
}

.file-tree-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border-right: 0 solid transparent;
  transition: border-right-width 180ms ease, border-right-color 180ms ease;
}

.workspace-split.has-file .file-tree-panel {
  border-right: 1px solid var(--line);
}

.file-tree-head,
.editor-head {
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 18, 28, 0.8);
}

.editor-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-tree {
  min-height: 0;
  overflow: auto;
  padding: 10px 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.empty-tree {
  display: grid;
  place-items: start;
}

.tree-group,
.tree-children {
  margin: 0;
  list-style: none;
}

.tree-group {
  padding: 0;
}

.tree-children {
  padding: 0 0 0 14px;
}

.tree-node {
  margin: 0;
  padding: 0;
}

.tree-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.tree-row:hover {
  background: rgba(26, 35, 53, 0.9);
}

.tree-row.active {
  background: rgba(255, 122, 26, 0.14);
  border-color: rgba(255, 155, 84, 0.24);
}

.tree-row.directory {
  color: #f4d0a5;
}

.tree-row.file {
  color: #d6def1;
}

.tree-caret {
  width: 14px;
  color: var(--muted);
  flex: 0 0 auto;
}

.tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  position: relative;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translateX(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.workspace-split.has-file .editor-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.editor-surface,
.markdown-preview,
.editor-empty {
  min-height: 0;
}

.editor-surface,
.markdown-preview {
  display: none;
}

.editor-panel.has-file .editor-surface,
.editor-panel.preview-mode .markdown-preview {
  display: block;
}

.editor-panel.preview-mode .editor-surface {
  display: none;
}

.editor-surface {
  height: 100%;
}

.editor-empty {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.editor-empty h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.editor-empty p {
  margin: 0;
}

.markdown-preview {
  height: 100%;
  overflow: auto;
  padding: 18px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.chat-list::-webkit-scrollbar,
.activity-log::-webkit-scrollbar,
.messages::-webkit-scrollbar,
.file-tree::-webkit-scrollbar,
.markdown-preview::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.chat-list::-webkit-scrollbar-track,
.activity-log::-webkit-scrollbar-track,
.messages::-webkit-scrollbar-track,
.file-tree::-webkit-scrollbar-track,
.markdown-preview::-webkit-scrollbar-track {
  background: transparent;
}

.chat-list::-webkit-scrollbar-thumb,
.activity-log::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb,
.file-tree::-webkit-scrollbar-thumb,
.markdown-preview::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.chat-list:hover,
.chat-list.is-scrolling,
.activity-log:hover,
.activity-log.is-scrolling,
.messages:hover,
.messages.is-scrolling,
.file-tree:hover,
.file-tree.is-scrolling,
.markdown-preview:hover,
.markdown-preview.is-scrolling {
  scrollbar-color: rgba(255, 155, 84, 0.5) transparent;
}

.chat-list:hover::-webkit-scrollbar-thumb,
.chat-list.is-scrolling::-webkit-scrollbar-thumb,
.activity-log:hover::-webkit-scrollbar-thumb,
.activity-log.is-scrolling::-webkit-scrollbar-thumb,
.messages:hover::-webkit-scrollbar-thumb,
.messages.is-scrolling::-webkit-scrollbar-thumb,
.file-tree:hover::-webkit-scrollbar-thumb,
.file-tree.is-scrolling::-webkit-scrollbar-thumb,
.markdown-preview:hover::-webkit-scrollbar-thumb,
.markdown-preview.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(255, 155, 84, 0.5);
}

.message {
  max-width: 940px;
  margin: 0 auto 16px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  line-height: 1.55;
}

.message.user {
  background: var(--user);
  color: #f9fafb;
  border-bottom-right-radius: 8px;
}

.message.user a {
  color: #ffd6ba;
}

.message.assistant {
  background: var(--assistant);
  border-bottom-left-radius: 8px;
}

.message-role {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.message-attachments {
  margin-bottom: 12px;
}

.message-attachment {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-attachment:hover {
  background: rgba(255, 255, 255, 0.06);
}

.message-body > *:first-child {
  margin-top: 0;
}

.message-body > *:last-child {
  margin-bottom: 0;
}

.message-body p,
.message-body ul,
.message-body blockquote,
.message-body pre,
.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4 {
  margin: 0 0 14px;
}

.message-body ul {
  padding-left: 22px;
}

.message-body blockquote {
  margin-left: 0;
  padding: 10px 14px;
  border-left: 3px solid rgba(255, 155, 84, 0.5);
  background: rgba(255, 155, 84, 0.08);
  border-radius: 12px;
}

.message-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.93em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 8px;
}

.code-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #0d111a;
}

.code-head {
  padding: 8px 12px;
  background: #151d2b;
  color: #bcc7df;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-block {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  color: #ecf2ff;
  background: #0d111a;
}

.code-block code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: block;
}

.tok-comment {
  color: #6f7d99;
}

.tok-string {
  color: #f6c17d;
}

.tok-number {
  color: #7ed9d1;
}

.tok-keyword {
  color: #ff9e7f;
  font-weight: 700;
}

.empty-state {
  display: grid;
  place-items: center;
}

.empty-card {
  width: min(520px, 100%);
  padding: 36px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(19, 25, 38, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.empty-card.compact {
  width: 100%;
  min-height: 100%;
  padding: 18px 20px;
  border-radius: 18px;
}

.empty-card p,
.auth-copy {
  margin: 10px 0 0;
  color: var(--muted);
}

.composer {
  grid-column: 1 / 2;
  width: 100%;
  justify-self: stretch;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 34, 0.88);
  backdrop-filter: blur(14px);
}

.composer-topline,
.composer-attachments,
.attachment-chip,
.attachment-chip-main,
.message-attachments {
  display: flex;
  align-items: center;
}

.composer-topline {
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.composer-attachments,
.message-attachments {
  gap: 8px;
  flex-wrap: wrap;
}

.composer-attachments {
  flex: 1 1 auto;
}

.attachment-chip {
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(13, 18, 28, 0.8);
}

.attachment-chip-main,
.message-attachment {
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.attachment-chip-main {
  cursor: default;
}

.attachment-chip-main span,
.message-attachment span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-chip-remove {
  min-width: 34px;
  padding: 8px 10px;
  border-radius: 999px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  background: rgba(8, 12, 19, 0.82);
  color: var(--text);
  min-height: 28px;
  border-radius: 14px;
  padding: 12px 14px;
}

textarea::placeholder,
input::placeholder {
  color: #7d8aa4;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(255, 155, 84, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 155, 84, 0.12);
}

textarea {
  resize: none;
  overflow-y: hidden;
  line-height: 1.55;
}

button {
  border: 0;
  padding: 12px 16px;
}

.primary-button,
#send-button {
  background: linear-gradient(135deg, #ff7a1a 0%, #ff9b54 100%);
  color: #120d08;
  min-width: 92px;
}

.wide-button {
  width: 100%;
}

.tiny-button {
  padding: 8px 12px;
  border-radius: 12px;
}

.danger-button {
  color: var(--danger);
}

button:disabled,
textarea:disabled,
input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-screen,
.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 6, 12, 0.62);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.auth-card,
.modal-card {
  width: min(92vw, 560px);
  padding: 28px;
  border-radius: 28px;
  background: rgba(17, 23, 35, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(92vw, 420px);
}

.modal-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

.cwd-picks {
  display: grid;
  gap: 10px;
}

.cwd-suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cwd-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(24, 31, 46, 0.95);
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px, 42dvh) minmax(0, 1fr);
    height: 100dvh;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-pane {
    grid-template-columns: 1fr;
    min-height: 0;
    height: auto;
  }

  .main-pane.has-open-file {
    grid-template-columns: 1fr;
  }

  .main-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(320px, 44dvh);
  }

  .main-body.has-open-file {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(320px, 44dvh);
  }

  .workspace-pane {
    min-height: 320px;
  }

  .chat-column {
    grid-template-rows: minmax(144px, 24dvh) minmax(0, 1fr);
  }

  .workspace-split {
    grid-template-columns: minmax(0, 1fr) 0fr;
  }

  .workspace-split.has-file {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .chat-header {
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
}
