:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f1f5f9;
  --border: #d9e2ec;
  --border-strong: #c3d0dd;
  --text: #0b1829;
  --text-soft: #2f445f;
  --text-muted: #5c728d;
  --accent: #0f172a;
  --accent-soft: #ecf2f8;
  --accent-line: #9db4cc;
  --success: #0f766e;
  --warning: #b45309;
  --danger: #b91c1c;
  --shadow-sm: 0 3px 12px rgba(10, 28, 47, 0.06);
  --shadow-md: 0 8px 30px rgba(10, 28, 47, 0.08);
  --shadow-hover: 0 10px 22px rgba(10, 28, 47, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-sans: "IBM Plex Sans", "Source Han Sans SC", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: none;
  background: transparent;
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

textarea {
  resize: none;
  line-height: 1.6;
}

a {
  color: inherit;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.field > span {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.status-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.status-text[data-tone="success"] {
  color: var(--success);
}

.status-text[data-tone="warning"] {
  color: var(--warning);
}

.status-text[data-tone="danger"] {
  color: var(--danger);
}

.primary-button,
.chrome-button,
.mini-button,
.suggestion-chip,
.attachment-chip,
.task-chip {
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  padding: 14px 20px;
  cursor: pointer;
}

.primary-button:hover,
.chrome-button:hover,
.mini-button:hover,
.suggestion-chip:hover,
.attachment-chip:hover,
.task-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.chrome-button {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.mini-button {
  padding: 8px 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 420px);
  gap: 32px;
  align-items: stretch;
}

.auth-copy,
.auth-card,
.topbar,
.history-drawer,
.message,
.welcome-card,
.composer-shell {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.auth-copy,
.auth-card {
  border-radius: 22px;
  padding: 36px;
}

.auth-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 4.4rem);
  letter-spacing: -0.05em;
}

.auth-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.auth-points {
  margin: 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.8;
}

.auth-card {
  display: grid;
  gap: 24px;
  align-content: start;
}

.auth-card-head {
  display: grid;
  gap: 18px;
}

.auth-card-head h2 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.mode-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  width: fit-content;
}

.mode-switch__button {
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
}

.mode-switch__button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-submit {
  width: 100%;
  justify-content: center;
}

.workspace-page {
  padding: 18px;
}

.workspace-shell {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 10px;
  backdrop-filter: blur(16px);
}

.brand-lockup,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-fold-toggle {
  display: none;
}

.brand-lockup h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-lockup {
  min-width: 0;
  gap: 14px;
}

.title-block {
  min-width: 0;
}

.title-block .eyebrow {
  margin-bottom: 4px;
}

.title-block h1 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
  word-break: break-word;
}

.runtime-switcher,
.user-summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 14px;
}

.topbar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topbar-shortcuts {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.runtime-switcher {
  display: grid;
  gap: 4px;
  align-items: stretch;
  min-width: 340px;
  padding: 10px 14px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.runtime-switcher:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.runtime-switcher__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.runtime-switcher__label {
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.runtime-switcher__select {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.runtime-switcher__select:focus {
  box-shadow: none;
}

.runtime-switcher__meta {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-drawer {
  position: fixed;
  top: 18px;
  left: 18px;
  bottom: 18px;
  width: min(360px, calc(100vw - 36px));
  z-index: 30;
  padding: 18px;
  border-radius: 16px;
  transform: translateX(calc(-100% - 24px));
  transition: transform 220ms ease;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.history-drawer.is-open {
  transform: translateX(0);
}

.history-drawer__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.history-drawer__head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.08);
  transition: opacity 220ms ease;
}

.drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.session-list {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.session-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.session-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.session-item.is-active {
  border-color: var(--accent-line);
  background: var(--surface-soft);
}

.session-item__open {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 2px 4px;
  text-align: left;
  cursor: pointer;
}

.session-item__delete {
  align-self: start;
  justify-self: end;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.session-item__delete:hover,
.session-item__delete:focus-visible {
  border-color: rgba(185, 28, 28, 0.28);
  background: #fff5f5;
  color: var(--danger);
}

.session-item__title {
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.session-item__meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.session-item__meta,
.session-item__preview,
.drawer-empty {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.session-item__preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.5em * 2);
}

.session-item__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.chat-stage {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 0 0;
}

.chat-thread {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 4px 0 32px;
}

.chat-thread.is-busy {
  opacity: 0.86;
}

.welcome-card {
  border-radius: 16px;
  padding: 30px;
}

.welcome-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  letter-spacing: -0.02em;
}

.welcome-card p {
  margin: 0;
  max-width: 48rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.suggestion-chip {
  padding: 12px 16px;
  background: var(--surface);
  cursor: pointer;
  color: var(--text-soft);
}

.suggestion-chip:hover {
  border-color: var(--accent-line);
  background: var(--surface-soft);
}

.message {
  width: 100%;
  border-radius: 14px;
  padding: 18px 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.message--user {
  width: min(80%, 720px);
  margin-left: auto;
  background: #f4f7fb;
}

.message--assistant,
.message--system {
  width: 100%;
}

.message--system {
  background: #f9fbfd;
  border-style: dashed;
}

.message--assistant:hover,
.message--system:hover {
  box-shadow: var(--shadow-hover);
}

.message.is-streaming {
  border-color: var(--accent-line);
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.message-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.message-action {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.message-action:hover,
.message-action:focus-visible {
  border-color: var(--accent-line);
  background: var(--surface-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.message-copy {
  color: var(--text);
}

.message-copy--plain {
  white-space: pre-wrap;
  line-height: 1.78;
}

.message-copy--markdown {
  line-height: 1.8;
}

.message-copy--markdown.is-secondary {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

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

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

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.1em 0 0.55em;
  letter-spacing: -0.02em;
}

.markdown-body h1 {
  font-size: 1.6rem;
}

.markdown-body h2 {
  font-size: 1.2rem;
}

.markdown-body h3 {
  font-size: 1rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
 .markdown-body pre,
 .markdown-body hr {
  margin: 0 0 14px;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 20px;
}

.markdown-body li + li {
  margin-top: 6px;
}

.markdown-body blockquote {
  padding-left: 14px;
  border-left: 3px solid var(--accent-line);
  color: var(--text-soft);
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
}

.markdown-body code {
  padding: 2px 6px;
  border-radius: 8px;
  background: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.code-block {
  margin: 14px 0;
  padding: 14px 16px;
  overflow: auto;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.code-block code {
  padding: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.7;
}

.stream-caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 4px;
  transform: translateY(2px);
  border-radius: 999px;
  background: var(--text-muted);
  animation: blink-caret 1s steps(1) infinite;
}

@keyframes blink-caret {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.message-attachments,
.pill-row,
.inline-actions,
.task-list-inline,
.export-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.message-attachments {
  margin-top: 14px;
}

.message-section + .message-section {
  margin-top: 20px;
}

.message-section h4,
.activity-card h5 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-soft);
}

.warning-list,
.evidence-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.7;
}

.evidence-item {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.analysis-table-wrap {
  overflow-x: auto;
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.analysis-table th,
.analysis-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  line-height: 1.55;
}

.analysis-table th {
  color: var(--text-soft);
  font-weight: 600;
  background: rgba(148, 163, 184, 0.06);
}

.analysis-table tbody tr:last-child td {
  border-bottom: none;
}

.activity-list,
.digest-grid {
  display: grid;
  gap: 12px;
}

.export-inline-group {
  display: grid;
  gap: 8px;
}

.export-inline-label {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.activity-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.activity-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.activity-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.activity-lines {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.activity-lines span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.payload-block {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.mini-button--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.pill,
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-soft);
}

.pill {
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.attachment-chip {
  cursor: pointer;
}

.attachment-chip--read-only {
  cursor: default;
}

.task-chip {
  padding: 10px 14px;
  background: var(--surface-soft);
  cursor: pointer;
}

.task-chip.is-done {
  color: var(--text-muted);
  text-decoration: line-through;
}

.empty-inline {
  color: var(--text-muted);
  font-size: 14px;
}

.composer-shell {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 28px;
  margin-bottom: 6px;
  box-shadow: var(--shadow-md);
}

.composer-fold-bar {
  display: none;
}

.composer-panel {
  display: grid;
  gap: 14px;
}

.composer-shell.is-dragging {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 4px;
}

.composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 1.4rem;
  cursor: pointer;
}

.send-button {
  min-width: 92px;
  min-height: 48px;
}

.composer textarea {
  min-height: 56px;
  max-height: 240px;
  border-radius: 22px;
  padding-top: 16px;
  padding-bottom: 16px;
  line-height: 1.7;
}

.task-mark {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 12px;
}

.task-mark.is-done {
  background: #ecfdf3;
  color: var(--success);
}

.composer-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.composer-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
}

@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
  }

  .topbar-actions,
  .brand-lockup {
    width: 100%;
  }

  .brand-lockup {
    justify-content: space-between;
    align-items: flex-start;
  }

  .topbar-actions {
    justify-content: stretch;
    gap: 12px;
  }

  .topbar-shortcuts {
    width: 100%;
    justify-content: space-between;
  }

  .composer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .composer-note {
    text-align: left;
  }

}

@media (max-width: 720px) {
  .login-page,
  .workspace-page {
    padding: 10px;
  }

  .auth-copy,
  .auth-card,
  .topbar,
  .welcome-card,
  .message,
  .composer-shell,
  .history-drawer {
    border-radius: 22px;
  }

  .auth-copy,
  .auth-card {
    padding: 24px;
  }

  .message--user {
    width: 100%;
  }

  .chat-stage {
    width: 100%;
    gap: 12px;
    padding-top: 8px;
  }

  .welcome-card {
    padding: 24px 20px;
  }

  .welcome-card h2 {
    font-size: 1.8rem;
  }

  .composer-shell {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    margin-bottom: 0;
    position: sticky;
    bottom: 6px;
    border-radius: 24px;
  }

  .composer-fold-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2px;
  }

  .composer-shell.is-collapsed {
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px;
  }

  .composer-shell.is-collapsed .composer-panel {
    display: none;
  }

  .history-drawer {
    top: 12px;
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .message {
    padding: 16px;
    border-radius: 20px;
  }

  .topbar {
    padding: 12px;
    border-radius: 22px;
    margin-bottom: 6px;
  }

  .brand-lockup {
    gap: 10px;
    align-items: center;
  }

  .mobile-fold-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    margin-left: auto;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .mobile-fold-toggle:hover,
  .mobile-fold-toggle:focus-visible {
    border-color: var(--accent-line);
    background: #eef4fa;
    color: var(--text);
    transform: translateY(-1px);
  }

  .mobile-fold-toggle--composer {
    margin-left: 0;
  }

  .title-block .eyebrow {
    margin-bottom: 2px;
  }

  .title-block h1 {
    -webkit-line-clamp: 1;
    font-size: 1rem;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar.is-collapsed {
    gap: 8px;
    padding-bottom: 10px;
  }

  .topbar.is-collapsed .topbar-actions {
    display: none;
  }

  .topbar.is-collapsed .title-block .eyebrow {
    display: none;
  }

  .runtime-switcher {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .runtime-switcher__row {
    gap: 8px;
  }

  .runtime-switcher__select {
    font-size: 14px;
  }

  .runtime-switcher__meta {
    white-space: normal;
    line-height: 1.4;
  }

  .topbar-shortcuts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
  }

  .chrome-button,
  .user-summary {
    min-height: 42px;
    justify-content: center;
  }

  .user-summary {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    font-size: 13px;
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .chat-thread {
    gap: 10px;
    padding-bottom: 18px;
  }

  .message-meta {
    gap: 8px;
    margin-bottom: 12px;
  }

  .message-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .message-copy--markdown,
  .message-copy--plain {
    font-size: 15px;
    line-height: 1.72;
  }

  .markdown-body h1 {
    font-size: 1.35rem;
  }

  .markdown-body h2 {
    font-size: 1.08rem;
  }

  .suggestion-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-top: 18px;
  }

  .suggestion-chip {
    flex: 0 0 auto;
  }

  .session-item {
    padding: 11px;
    border-radius: 18px;
  }

  .session-item__delete {
    min-height: 30px;
    padding: 0 10px;
  }

  .session-item__preview {
    -webkit-line-clamp: 1;
    min-height: 1.5em;
  }

  .attachment-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .composer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
  }

  .icon-button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex: 0 0 auto;
  }

  .send-button {
    min-width: 72px;
    min-height: 44px;
    padding: 12px 16px;
  }

  .composer textarea {
    min-height: 50px;
    padding: 14px 16px;
    border-radius: 18px;
  }

  .composer-meta {
    gap: 8px;
  }

  .composer-note,
  .status-text {
    font-size: 13px;
  }
}
