:root {
  --canvas: #f4f1eb;
  --canvas-deep: #ebe6dc;
  --surface: #fffdf9;
  --surface-muted: #f8f5ef;
  --ink: #17221d;
  --ink-muted: #677069;
  --line: #dedbd2;
  --line-strong: #cbc7bd;
  --accent: #1c5b45;
  --accent-strong: #124735;
  --accent-soft: #e1eee7;
  --platinum: #8a8173;
  --danger: #a13d38;
  --danger-soft: #f8e8e5;
  --warning: #9a641c;
  --warning-soft: #f7edd9;
  --shadow-sm: 0 1px 2px rgb(23 34 29 / 6%), 0 8px 24px rgb(23 34 29 / 5%);
  --shadow-lg: 0 18px 60px rgb(23 34 29 / 13%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --topbar-height: 68px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--canvas);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgb(28 91 69 / 30%);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent-strong);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.offline-banner {
  position: fixed;
  z-index: 1100;
  top: 0;
  right: 0;
  left: 0;
  padding: 9px 16px;
  color: #fff;
  background: #6d4816;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 650;
  box-shadow: var(--shadow-sm);
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #296f56, #123f30);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 5px 16px rgb(18 71 53 / 18%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
}

.brand-mark-large {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-radius: 17px;
  font-size: 1.5rem;
}

.brand-word {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Auth and first-run setup */

.auth-view,
.loading-view {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-view {
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  gap: 28px;
  padding: 42px 24px 24px;
  background:
    radial-gradient(circle at 15% 12%, rgb(255 255 255 / 80%), transparent 30%),
    radial-gradient(circle at 88% 86%, rgb(193 207 197 / 42%), transparent 28%),
    var(--canvas);
}

.auth-brand,
.shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.shell-brand {
  text-decoration: none;
}

.auth-card {
  width: min(100%, 460px);
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid rgb(203 199 189 / 75%);
  border-radius: var(--radius-lg);
  background: rgb(255 253 249 / 94%);
  box-shadow: var(--shadow-lg);
}

.auth-intro {
  margin-bottom: 28px;
}

.auth-intro h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.auth-copy {
  margin: 14px 0 0;
  color: var(--ink-muted);
  line-height: 1.55;
}

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

.form-heading {
  margin-bottom: 8px;
}

.form-heading h2 {
  margin: 0 0 5px;
  font-size: 1.05rem;
}

.form-heading p,
.field-help {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-form label {
  margin-top: 8px;
  font-size: 0.84rem;
  font-weight: 680;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-form input:hover {
  border-color: #aaa59a;
}

.auth-form input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgb(28 91 69 / 12%);
}

.form-error {
  margin: 7px 0 0;
  padding: 10px 12px;
  border-radius: 9px;
  color: #7d2c28;
  background: var(--danger-soft);
  font-size: 0.86rem;
  line-height: 1.45;
}

.primary-button,
.new-thread-button,
.send-button {
  border: 0;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 720;
  transition: background 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.primary-button:hover,
.new-thread-button:hover,
.send-button:hover {
  background: var(--accent-strong);
}

.primary-button:active,
.new-thread-button:active,
.send-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.new-thread-button:disabled,
.send-button:disabled,
.cancel-button:disabled,
.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.primary-button {
  min-height: 48px;
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 11px;
}

.full-width {
  width: 100%;
}

.auth-footnote {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.78rem;
  text-align: center;
}

.loading-view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-muted);
  background: var(--canvas);
  font-size: 0.92rem;
}

/* Main application shell */

.app-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
}

.topbar {
  z-index: 30;
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 253 249 / 96%);
}

.topbar-leading,
.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
}

.topbar-leading {
  gap: 8px;
}

.topbar-actions {
  gap: 12px;
}

.provider-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-muted);
  background: var(--surface-muted);
  font-size: 0.76rem;
  font-weight: 680;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--platinum);
  box-shadow: 0 0 0 3px rgb(138 129 115 / 12%);
}

.provider-badge[data-tone="ready"] {
  color: #1c5b45;
  border-color: #c8ddd2;
  background: #edf6f1;
}

.provider-badge[data-tone="ready"] .status-dot {
  background: #2a8b68;
  box-shadow: 0 0 0 3px rgb(42 139 104 / 13%);
}

.provider-badge[data-tone="demo"] {
  color: #80551c;
  border-color: #ead6b3;
  background: var(--warning-soft);
}

.provider-badge[data-tone="demo"] .status-dot {
  background: #b67a26;
  box-shadow: 0 0 0 3px rgb(182 122 38 / 13%);
}

.provider-badge[data-tone="unavailable"] {
  color: #88332f;
  border-color: #e8c9c5;
  background: var(--danger-soft);
}

.provider-badge[data-tone="unavailable"] .status-dot {
  background: var(--danger);
}

.user-label {
  max-width: 220px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiet-button,
.icon-button,
.cancel-button {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 650;
  transition: background 150ms ease, border-color 150ms ease;
}

.quiet-button:hover,
.icon-button:hover,
.cancel-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.icon-button {
  display: inline-grid;
  width: 42px;
  padding: 0;
  place-items: center;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.mobile-only {
  display: none;
}

.sidebar {
  z-index: 20;
  display: flex;
  min-height: 0;
  flex-direction: column;
  grid-column: 1;
  grid-row: 2;
  border-right: 1px solid var(--line);
  background: var(--surface-muted);
}

.sidebar-header {
  padding: 20px 16px 12px;
}

.sidebar-title {
  margin: 0 0 11px 4px;
  color: var(--ink-muted);
  font-size: 0.71rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.new-thread-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 11px;
  box-shadow: 0 5px 14px rgb(28 91 69 / 13%);
  font-size: 0.88rem;
}

.thread-nav {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 4px 10px 16px;
  scrollbar-color: var(--line-strong) transparent;
}

.thread-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thread-button {
  display: grid;
  width: 100%;
  min-height: 51px;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink-muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.thread-button:hover {
  color: var(--ink);
  background: #efebe4;
}

.thread-button[aria-current="page"] {
  color: var(--ink);
  border-color: #ddd7cc;
  background: var(--surface);
  box-shadow: 0 2px 9px rgb(23 34 29 / 5%);
}

.thread-glyph {
  position: relative;
  display: block;
  width: 14px;
  height: 12px;
  margin-left: 2px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  color: var(--platinum);
}

.thread-glyph::after {
  position: absolute;
  bottom: -3px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  background: inherit;
  content: "";
  transform: skewY(-35deg);
}

.thread-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.thread-copy strong,
.thread-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-copy strong {
  font-size: 0.85rem;
  font-weight: 650;
}

.thread-copy small {
  color: var(--ink-muted);
  font-size: 0.69rem;
}

.thread-running {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.35s ease-in-out infinite;
}

.thread-empty {
  margin: 28px 12px;
  color: var(--ink-muted);
  font-size: 0.82rem;
  text-align: center;
}

.sidebar-footer {
  padding: 13px 14px 15px;
  border-top: 1px solid var(--line);
}

.workspace-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
}

.workspace-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
  background: var(--surface);
}

.workspace-card > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.workspace-card strong,
.workspace-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-card strong {
  font-size: 0.81rem;
}

.workspace-card small {
  color: var(--ink-muted);
  font-size: 0.69rem;
}

.provider-note {
  margin: 7px 8px 0;
  color: var(--ink-muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.chat-main {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-column: 2;
  grid-row: 2;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(22px, 5vw, 64px) 15px;
  border-bottom: 1px solid rgb(222 219 210 / 65%);
}

.chat-header h1 {
  max-width: 700px;
  margin: 0;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.32rem, 2.6vw, 1.72rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-state {
  flex: 0 0 auto;
  color: var(--ink-muted);
  font-size: 0.74rem;
}

.chat-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px clamp(22px, 6vw, 76px) 36px;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) transparent;
}

.empty-chat {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  padding: 36px 16px 84px;
  text-align: center;
}

.empty-orbit {
  position: relative;
  display: grid;
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid #dcd8cf;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 40%, #efebe3 100%);
}

.empty-orbit::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transform: translate(38px, -19px);
}

.empty-chat h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.empty-chat > p:last-child {
  max-width: 430px;
  margin: 12px 0 0;
  color: var(--ink-muted);
  line-height: 1.55;
}

.message-list {
  display: grid;
  width: min(100%, 860px);
  gap: 26px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.message {
  display: grid;
  width: min(100%, 860px);
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  margin: 0 auto;
}

.message-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--accent);
  background: var(--surface-muted);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.message-body {
  min-width: 0;
}

.message-meta {
  display: flex;
  min-height: 23px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 0.7rem;
}

.message-meta strong {
  color: var(--ink);
  font-size: 0.79rem;
}

.message-content {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.66;
  white-space: pre-wrap;
}

.message-user {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.message-user .message-avatar {
  grid-column: 2;
  grid-row: 1;
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.message-user .message-body {
  max-width: min(100%, 680px);
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  padding: 12px 15px;
  border-radius: 15px 4px 15px 15px;
  background: var(--accent-soft);
}

.message-user .message-meta {
  justify-content: flex-end;
}

.message-system .message-avatar {
  color: var(--warning);
  background: var(--warning-soft);
}

.message-draft {
  margin-top: 26px;
}

.message-draft .message-avatar {
  animation: softGlow 1.8s ease-in-out infinite;
}

.message-draft .message-meta span {
  color: var(--accent);
  font-weight: 670;
}

.composer-zone {
  position: relative;
  z-index: 5;
  padding: 10px clamp(22px, 6vw, 76px) 17px;
  background: linear-gradient(to bottom, rgb(255 253 249 / 50%), var(--surface) 18%);
}

.run-status,
.composer-form,
.composer-help {
  width: min(100%, 860px);
  margin-right: auto;
  margin-left: auto;
}

.run-status {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  padding: 6px 8px 6px 12px;
  border: 1px solid #d4e3db;
  border-radius: 11px;
  color: var(--accent);
  background: #f0f7f3;
  font-size: 0.77rem;
  font-weight: 650;
}

.run-status > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-spinner {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid #b6d2c5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.cancel-button {
  min-height: 30px;
  padding: 4px 9px;
  border-color: #bed5ca;
  font-size: 0.72rem;
}

.composer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 9px 9px 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 7px 24px rgb(23 34 29 / 8%);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.composer-form:focus-within {
  border-color: #8eaa9c;
  box-shadow: 0 0 0 3px rgb(28 91 69 / 9%), 0 8px 26px rgb(23 34 29 / 8%);
}

.composer-form textarea {
  width: 100%;
  max-height: 160px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.94rem;
  line-height: 1.45;
  scrollbar-color: var(--line-strong) transparent;
}

.composer-form textarea::placeholder {
  color: #93998f;
}

.composer-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.send-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  font-size: 1.25rem;
  line-height: 1;
}

.composer-help {
  margin-top: 7px;
  margin-bottom: 0;
  color: #888e86;
  font-size: 0.67rem;
  text-align: center;
}

.sidebar-scrim {
  display: none;
}

.toast-region {
  position: fixed;
  z-index: 1200;
  right: 20px;
  bottom: 20px;
  width: min(calc(100% - 40px), 390px);
  pointer-events: none;
}

.toast {
  padding: 12px 15px;
  border: 1px solid #d2cec5;
  border-radius: 11px;
  color: var(--ink);
  background: rgb(255 253 249 / 98%);
  box-shadow: var(--shadow-lg);
  font-size: 0.84rem;
  line-height: 1.45;
  animation: toastIn 180ms ease-out;
}

.toast-error {
  border-color: #e3c2be;
  color: #762d29;
  background: #fff8f7;
}

.noscript-message {
  position: fixed;
  z-index: 2000;
  inset: 20px;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 30px;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.38;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes softGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(28 91 69 / 0%);
  }
  50% {
    box-shadow: 0 0 0 5px rgb(28 91 69 / 9%);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-only {
    display: inline-grid;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: min(86vw, 310px);
    transform: translateX(-103%);
    transition: transform 190ms ease-out;
    box-shadow: 16px 0 40px rgb(23 34 29 / 15%);
  }

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

  .sidebar-scrim {
    position: fixed;
    z-index: 40;
    inset: var(--topbar-height) 0 0;
    display: block;
    padding: 0;
    border: 0;
    background: rgb(23 34 29 / 36%);
    cursor: pointer;
  }

  .chat-main {
    grid-column: 1;
  }

  .chat-header {
    padding-right: 22px;
    padding-left: 22px;
  }

  .chat-scroll,
  .composer-zone {
    padding-right: 22px;
    padding-left: 22px;
  }

  .user-label {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --topbar-height: 62px;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar-leading,
  .topbar-actions {
    gap: 7px;
  }

  .topbar .brand-word {
    display: none;
  }

  .provider-badge {
    max-width: 128px;
  }

  .provider-badge > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quiet-button {
    padding: 7px 9px;
    font-size: 0.75rem;
  }

  .chat-header {
    padding: 16px 15px 12px;
  }

  .chat-header .eyebrow,
  .connection-state {
    display: none;
  }

  .chat-header h1 {
    font-size: 1.3rem;
  }

  .chat-scroll {
    padding: 20px 15px 28px;
  }

  .message-list {
    gap: 22px;
  }

  .message {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.84rem;
  }

  .message-user {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  .message-user .message-body {
    padding: 10px 12px;
  }

  .message-content {
    font-size: 0.92rem;
  }

  .composer-zone {
    padding: 8px 12px 10px;
  }

  .composer-form {
    padding-left: 13px;
    border-radius: 15px;
  }

  .composer-help {
    display: none;
  }

  .run-status {
    margin-bottom: 6px;
  }

  .auth-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: 24px 14px;
  }

  .auth-card {
    padding: 27px 22px;
    border-radius: 20px;
  }

  .auth-footnote {
    margin-top: 4px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
