/* AnyClaw-style web UI — light theme recreation of the Codex/OpenClaw chat interface */

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --blue-600: #2563eb;
  --emerald-50: #ecfdf5;
  --emerald-200: #a7f3d0;
  --emerald-700: #047857;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-900: #78350f;
  --white: #ffffff;
  --black: #000000;
  --sidebar-width: 300px;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--slate-950);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: relative;
  background: var(--slate-100);
  min-width: 0;
  overflow: hidden;
  display: flex;
}

.sidebar-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  user-select: none;
}

.sidebar input,
.sidebar textarea { user-select: text; }

.sidebar-search-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-inline: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color 0.15s;
}

.sidebar-search-bar:focus-within { border-color: var(--zinc-400); }

.sidebar-search-bar-icon {
  height: 0.875rem;
  width: 0.875rem;
  color: var(--zinc-400);
  flex-shrink: 0;
}

.sidebar-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  color: var(--slate-900);
}

.sidebar-search-input::placeholder { color: var(--zinc-400); }
.sidebar-search-input::-webkit-search-cancel-button { display: none; }

.sidebar-search-clear {
  border: none;
  background: none;
  color: var(--zinc-400);
  cursor: pointer;
  display: inline-flex;
  padding: 0.125rem;
  border-radius: 999px;
}

.sidebar-search-clear:hover { color: var(--zinc-600); }

.sidebar-search-clear-icon { height: 0.875rem; width: 0.875rem; }

.sidebar-thread-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.5rem;
  margin-top: 0.25rem;
}

.sidebar-thread-controls-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--zinc-500);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar-thread-controls-button:hover {
  border-color: var(--zinc-200);
  background: var(--zinc-50);
}

.sidebar-thread-controls-button[aria-pressed="true"] {
  border-color: var(--emerald-200);
  background: var(--emerald-50);
  color: var(--emerald-700);
}

.sidebar-thread-controls-icon { height: 1rem; width: 1rem; }

.sidebar-thread-controls-spacer { flex: 1; }

/* Thread tree */

.thread-tree {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.125rem;
}

.thread-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.625rem 0.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--zinc-500);
}

.thread-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0;
  margin-top: 0.125rem;
}

.thread-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--slate-900);
  cursor: pointer;
  position: relative;
}

.thread-row:hover,
.thread-row:focus-visible { background: var(--zinc-200); }

.thread-row[data-active="true"] { background: var(--zinc-200); }

.thread-left-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.thread-icon {
  width: 1rem;
  height: 1rem;
  color: var(--zinc-500);
  flex-shrink: 0;
}

.thread-status-indicator {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  height: 0.625rem;
  width: 0.625rem;
  border-radius: 999px;
}

.thread-status-indicator[data-state="unread"] {
  background: var(--blue-600);
  width: 0.375rem;
  height: 0.375rem;
  top: 0;
  right: 0;
}

.thread-status-indicator[data-state="working"] {
  background: var(--blue-600);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.thread-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.thread-title {
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-meta {
  font-size: 0.75rem;
  color: var(--zinc-500);
  display: flex;
  gap: 0.375rem;
}

.thread-actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.thread-row:hover .thread-actions,
.thread-row:focus-within .thread-actions,
.thread-row[data-pinned="true"] .thread-actions { opacity: 1; pointer-events: auto; }

.thread-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--zinc-500);
  cursor: pointer;
}

.thread-action:hover { background: var(--zinc-100); color: var(--zinc-700); }

.thread-action svg { width: 0.875rem; height: 0.875rem; }

.thread-action[data-active="true"] { color: var(--emerald-700); }

.thread-empty {
  padding: 1rem 0.625rem;
  font-size: 0.875rem;
  color: var(--zinc-500);
  text-align: center;
}

/* Sidebar bottom menu */

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  border-top: 1px solid var(--zinc-200);
  padding-top: 0.5rem;
}

.sidebar-menu-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  color: var(--slate-900);
  cursor: pointer;
}

.sidebar-menu-row:hover { background: var(--zinc-200); }

.sidebar-menu-row-left {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: var(--zinc-500);
  flex-shrink: 0;
}

.sidebar-menu-row-icon { width: 1rem; height: 1rem; }

.sidebar-menu-row-main { flex: 1; min-width: 0; }

/* Resize handle */

.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  z-index: 5;
}

.sidebar-resize-handle:hover { background: var(--slate-400); }

body.resizing { cursor: col-resize; user-select: none; }
body.resizing .sidebar-resize-handle { background: var(--slate-400); }

/* ---------- Main ---------- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--white);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1rem;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--zinc-600);
  cursor: pointer;
}

.icon-btn:hover { background: var(--zinc-100); }
.icon { width: 1.25rem; height: 1.25rem; }

.topbar-new {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--slate-900);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.topbar-new:hover { background: var(--zinc-50); }
.topbar-new .icon { width: 1rem; height: 1rem; }

.topbar-title {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Content */

.content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.thread-view {
  flex: 1;
  min-height: 0;
  padding: 1.5rem 0;
}

/* Messages */

.messages { max-width: 45rem; margin-inline: auto; padding: 0 1.5rem; }

.message-row {
  display: flex;
  width: 100%;
  position: relative;
}

.message-row[data-role="user"] { justify-content: flex-end; }
.message-row[data-role="assistant"], .message-row[data-role="system"] { justify-content: flex-start; }

.message-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}

.message-stack[data-role="user"] { align-items: flex-end; }
.message-stack[data-role="assistant"], .message-stack[data-role="system"] { align-items: flex-start; }

.message-body {
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: 100%;
}

.message-body[data-role="user"] { align-self: flex-end; align-items: flex-end; margin-left: auto; }

.message-card {
  max-width: min(76ch, 100%);
  background: transparent;
  border: none;
  border-radius: 0;
}

.message-card[data-role="assistant"],
.message-card[data-role="system"] { width: 100%; }

.message-avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  color: var(--zinc-500);
  font-size: 0.75rem;
}

.message-avatar-icon {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  background: var(--zinc-900);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.message-avatar-icon svg { width: 0.75rem; height: 0.75rem; }

.message-text {
  font-size: 0.9375rem;
  line-height: 1.625;
  color: var(--slate-900);
  overflow-wrap: anywhere;
}

.message-text[data-role="user"] {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-2xl);
  padding: 0.75rem 1rem;
  max-width: 100%;
}

.message-text p { margin: 0 0 0.75rem; }
.message-text p:last-child { margin-bottom: 0; }
.message-text h1, .message-text h2, .message-text h3 { margin: 1rem 0 0.5rem; font-weight: 600; line-height: 1.3; }
.message-text h1 { font-size: 1.25rem; }
.message-text h2 { font-size: 1.125rem; }
.message-text h3 { font-size: 1rem; }
.message-text ul, .message-text ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.message-text li { margin: 0.25rem 0; }
.message-text strong { font-weight: 600; }
.message-text code { font-family: var(--font-mono); font-size: 0.85em; background: var(--slate-100); border: 1px solid var(--slate-200); border-radius: 0.25rem; padding: 0.1em 0.35em; }
.message-text pre { background: var(--slate-950); color: var(--slate-100); border-radius: var(--radius-lg); padding: 0.875rem 1rem; overflow-x: auto; margin: 0 0 0.75rem; }
.message-text pre code { background: transparent; border: none; padding: 0; font-size: 0.8125rem; line-height: 1.55; color: inherit; }
.message-text a { color: var(--blue-600); text-decoration: none; }
.message-text a:hover { text-decoration: underline; }
.message-text blockquote { border-left: 3px solid var(--slate-300); padding-left: 0.875rem; margin: 0 0 0.75rem; color: var(--slate-700); }

.typing-dots { display: inline-flex; gap: 0.25rem; align-items: center; padding: 0.375rem 0; }
.typing-dots span {
  width: 0.375rem; height: 0.375rem; border-radius: 999px;
  background: var(--zinc-400); animation: blink 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.cursor-blink::after { content: "▍"; animation: caret 1s steps(1) infinite; color: var(--slate-400); }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- New thread hero ---------- */

.new-thread-hero {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.hero-inner {
  max-width: 43.75rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.hero-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mark svg { width: 1.5rem; height: 1.5rem; }

.hero-title { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }

.hero-subtitle { font-size: 0.9375rem; color: var(--zinc-500); }

.hero-controls { margin-top: 0.5rem; }

.hero-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: none;
  background: transparent;
  color: var(--zinc-500);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-lg);
}

.hero-dropdown:hover { background: var(--zinc-100); color: var(--zinc-700); }

.hero-chevron { width: 1.25rem; height: 1.25rem; }

/* ---------- Composer ---------- */

.composer-wrap {
  flex-shrink: 0;
  padding: 0.75rem 1.5rem 1rem;
}

.composer {
  max-width: 43.75rem;
  margin-inline: auto;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-xl);
  background: var(--white);
  padding: 0.875rem 1rem 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.composer-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--slate-900);
  max-height: 12rem;
  overflow-y: auto;
}

.composer-input::placeholder { color: var(--zinc-400); }

.composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 100%;
  padding: 0.3125rem 0.625rem;
  border: 1px solid var(--zinc-200);
  border-radius: 999px;
  background: var(--zinc-50);
  color: var(--slate-900);
  font-size: 0.8125rem;
}

.attachment-chip-icon { width: 0.875rem; height: 0.875rem; color: var(--zinc-500); flex-shrink: 0; }
.attachment-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }
.attachment-chip-size { color: var(--zinc-400); font-size: 0.75rem; flex-shrink: 0; }

.attachment-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--zinc-400);
  cursor: pointer;
  flex-shrink: 0;
}

.attachment-chip-remove:hover { background: var(--zinc-200); color: var(--slate-900); }
.attachment-chip-remove svg { width: 0.75rem; height: 0.75rem; }

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  justify-content: flex-end;
}

.composer-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.composer-dropdown { position: relative; display: inline-flex; min-width: 0; }

.composer-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: none;
  background: transparent;
  color: var(--slate-900);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.375rem;
  border-radius: var(--radius-md);
}

.composer-dropdown-trigger:hover { background: var(--zinc-100); }
.composer-dropdown-trigger:disabled { cursor: not-allowed; color: var(--zinc-500); }

.composer-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

.composer-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--zinc-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--zinc-600);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.composer-tool:hover { background: var(--zinc-100); color: var(--slate-900); }
.composer-tool:disabled { cursor: not-allowed; color: var(--zinc-300); background: var(--white); }

.composer-tool-icon { width: 1.125rem; height: 1.125rem; }

.composer-dropdown-menu-right { left: auto; right: 0; }

.composer-dropdown-value { text-align: left; white-space: nowrap; }

.composer-dropdown-chevron {
  height: 0.875rem;
  width: 0.875rem;
  color: var(--zinc-500);
  flex-shrink: 0;
}

.composer-dropdown-menu[hidden] { display: none !important; }

.composer-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 14rem;
  padding: 0.25rem;
  background: var(--white);
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.composer-dropdown-option {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  color: var(--slate-900);
  cursor: pointer;
}

.composer-dropdown-option:hover,
.composer-dropdown-option.is-selected { background: var(--zinc-100); }

.composer-submit {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: var(--zinc-900);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.15s;
  flex-shrink: 0;
}

.composer-submit:hover { background: var(--black); }
.composer-submit:disabled {
  cursor: not-allowed;
  background: var(--zinc-200);
  color: var(--zinc-500);
}

.composer-submit-icon { width: 1.25rem; height: 1.25rem; }

.composer-hint {
  max-width: 43.75rem;
  margin: 0.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--zinc-400);
}

.composer-hint-text { text-align: center; flex: 1; }

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--zinc-200);
  background: var(--white);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--zinc-500);
  white-space: nowrap;
  flex-shrink: 0;
}

.mode-badge-dot { width: 0.4375rem; height: 0.4375rem; border-radius: 999px; background: var(--zinc-300); }

.mode-badge[data-state="live"] { color: var(--emerald-700); border-color: var(--emerald-200); background: var(--emerald-50); }
.mode-badge[data-state="live"] .mode-badge-dot { background: var(--emerald-700); }

.mode-badge[data-state="mock"] { color: var(--amber-900); border-color: var(--amber-300); background: var(--amber-300); }
.mode-badge[data-state="mock"] .mode-badge-dot { background: var(--amber-900); }

.mode-badge[data-state="checking"] .mode-badge-dot { animation: blink 1.2s infinite; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--slate-950);
  color: var(--white);
  font-size: 0.8125rem;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 60;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.toast.show { opacity: 1; }

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  #app { display: block; position: relative; }

  .sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(85vw, 320px);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  }

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

  .sidebar-resize-handle { display: none; }

  .scrim {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 40;
  }

  .topbar-menu-btn, .topbar-new { display: inline-flex !important; }

  .content-grid { gap: 0.5rem; }

  .thread-view { padding: 1rem 0; }
  .messages { padding-inline: 1rem; }

  .composer-wrap { padding: 0.5rem 0.75rem 0.875rem; }

  .composer-controls { flex-wrap: wrap; gap: 0.5rem; }
  .composer-attachments { flex-wrap: nowrap; overflow-x: auto; }
  .attachment-chip-name { max-width: 9rem; }
  .composer-hint { font-size: 0.6875rem; }

  .hero-title { font-size: 1.5rem; }
}

/* ---------- Collapsed sidebar (desktop) ---------- */

body.sidebar-collapsed #app { grid-template-columns: 0 minmax(0, 1fr); }
body.sidebar-collapsed .sidebar { display: none; }
