/* ============================================================
   Platypus AI – style.css
   Design system: warm brown/cream palette, Inter + Lora
   ============================================================ */

/* ── Custom properties ────────────────────────────────────── */
:root {
  /* Brown/cream palette */
  --brown-900: #1c1008;
  --brown-800: #2e1b0e;
  --brown-700: #4a2e18;
  --brown-600: #6b4226;
  --brown-500: #8c5c38;
  --brown-400: #b07848;
  --brown-300: #c99a6b;
  --brown-200: #dfc09a;
  --brown-100: #f0ddc4;
  --brown-50:  #f9f3eb;

  --cream-bg:     #faf6f0;
  --cream-card:   #f5ede0;
  --cream-border: #e8d9c4;

  /* Semantic tokens – light theme */
  --bg:            var(--cream-bg);
  --bg-sidebar:    #f0e8d8;
  --bg-card:       var(--cream-card);
  --bg-input:      #ffffff;
  --bg-hover:      rgba(139, 92, 56, 0.07);
  --bg-active:     rgba(139, 92, 56, 0.13);
  --bg-user-msg:   var(--brown-700);
  --bg-ai-msg:     #ffffff;

  --border:        var(--cream-border);
  --border-input:  #d4c0a6;

  --text-primary:  var(--brown-900);
  --text-secondary:#6b5540;
  --text-muted:    #9c7e66;
  --text-on-user:  #fff;
  --text-link:     var(--brown-600);

  --accent:        var(--brown-600);
  --accent-hover:  var(--brown-700);
  --accent-light:  var(--brown-100);

  --shadow-sm:     0 1px 3px rgba(44, 24, 10, 0.08);
  --shadow-md:     0 4px 16px rgba(44, 24, 10, 0.10);
  --shadow-lg:     0 12px 40px rgba(44, 24, 10, 0.14);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     22px;
  --radius-full:   9999px;

  --sidebar-w:     260px;
  --composer-max:  760px;

  --font-sans:     'Inter', system-ui, sans-serif;
  --font-serif:    'Lora', Georgia, serif;

  --transition:    150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme */
[data-theme="dark"] {
  --bg:            #1a1008;
  --bg-sidebar:    #130c04;
  --bg-card:       #221508;
  --bg-input:      #2a1c0c;
  --bg-hover:      rgba(192, 154, 107, 0.08);
  --bg-active:     rgba(192, 154, 107, 0.15);
  --bg-user-msg:   var(--brown-500);
  --bg-ai-msg:     #221508;

  --border:        #3a2510;
  --border-input:  #4a3020;

  --text-primary:  #f5e8d0;
  --text-secondary:#c9a87a;
  --text-muted:    #8a6844;
  --text-on-user:  #fff;
  --text-link:     var(--brown-300);

  --accent:        var(--brown-300);
  --accent-hover:  var(--brown-200);
  --accent-light:  rgba(192, 154, 107, 0.15);

  --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.45);
}

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

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  height: 100dvh;
  overflow: hidden;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

textarea {
  font-family: inherit;
  font-size: inherit;
  resize: none;
  border: none;
  background: none;
  color: inherit;
}

img { display: block; }

/* ── App shell ────────────────────────────────────────────── */
.app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  transition: transform var(--transition);
  z-index: 100;
}

.sidebar-top {
  padding: 16px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 1.5px solid var(--border);
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.btn-new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.87rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}

.btn-new-chat:hover { background: var(--accent-hover); }
.btn-new-chat:active { transform: scale(0.98); }

/* Chat history */
.sidebar-section {
  padding: 8px 12px;
}

.sidebar-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 4px 6px;
}

.chat-history {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 340px;
  overflow-y: auto;
}

.chat-history::-webkit-scrollbar { width: 3px; }
.chat-history::-webkit-scrollbar-track { background: transparent; }
.chat-history::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background var(--transition);
  position: relative;
  group: true;
}

.history-item:hover { background: var(--bg-hover); }
.history-item.active { background: var(--bg-active); }

.history-item-title {
  flex: 1;
  font-size: 0.83rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.history-item.active .history-item-title { color: var(--text-primary); font-weight: 500; }

.history-item-actions {
  display: none;
  gap: 2px;
  position: absolute;
  right: 6px;
}

.history-item:hover .history-item-actions { display: flex; }

.history-action-btn {
  padding: 3px;
  border-radius: 4px;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  line-height: 0;
}

.history-action-btn:hover { color: var(--text-primary); background: var(--bg-active); }

/* Sidebar spacer */
.sidebar-spacer { flex: 1; }

/* Model button */
.model-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}

.model-btn:hover { border-color: var(--brown-300); background: var(--bg-hover); }

.model-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}

.model-btn-name { flex: 1; text-align: left; }

.chevron {
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.model-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }

/* Sidebar bottom */
.sidebar-bottom {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-icon-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.sidebar-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--brown-400);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; gap: 1px; }
.user-name { font-size: 0.82rem; font-weight: 500; color: var(--text-primary); }
.user-sub  { font-size: 0.72rem; color: var(--text-muted); }

/* ── Main content ─────────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Mobile header */
.mobile-header {
  display: none;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  gap: 12px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.8px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
}

.mobile-brand img {
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
}

.mobile-new-chat {
  padding: 7px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: background var(--transition);
}

.mobile-new-chat:hover { background: var(--bg-hover); }

/* ── Welcome screen ───────────────────────────────────────── */
.welcome {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.welcome.hidden { display: none; }

.welcome-inner {
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.welcome-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.welcome-heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.welcome-sub {
  font-size: 0.93rem;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.7;
}

/* Suggestion cards */
.suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.suggestion-card:hover {
  border-color: var(--brown-300);
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.suggestion-card:active { transform: translateY(0); }

.suggestion-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }
.suggestion-text { flex: 1; }

/* ── Conversation area ────────────────────────────────────── */
.conversation {
  flex: 1;
  overflow-y: auto;
  display: none;
  padding: 24px 0 8px;
  scroll-behavior: smooth;
}

.conversation.visible { display: block; }

.conversation::-webkit-scrollbar { width: 4px; }
.conversation::-webkit-scrollbar-track { background: transparent; }
.conversation::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.message-group {
  max-width: var(--composer-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Messages */
.message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: msgIn 180ms ease-out both;
}

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

.message.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.msg-avatar.ai-avatar {
  background: var(--brown-100);
}

.msg-avatar.ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-avatar.user-avatar-icon {
  background: var(--brown-400);
  color: #fff;
  border-color: var(--brown-400);
}

.msg-body { max-width: calc(100% - 48px); display: flex; flex-direction: column; gap: 4px; }

.message.user .msg-body { align-items: flex-end; }

.msg-sender {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.msg-bubble {
  padding: 11px 15px;
  border-radius: var(--radius-lg);
  font-size: 0.91rem;
  line-height: 1.65;
  max-width: 100%;
  word-break: break-word;
}

.message.user .msg-bubble {
  background: var(--bg-user-msg);
  color: var(--text-on-user);
  border-bottom-right-radius: var(--radius-sm);
}

.message.ai .msg-bubble {
  background: var(--bg-ai-msg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* Prose inside AI messages */
.msg-bubble p { margin-bottom: 0.7em; }
.msg-bubble p:last-child { margin-bottom: 0; }

.msg-bubble pre {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.82rem;
  overflow-x: auto;
  margin: 8px 0;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
}

.msg-bubble code {
  background: var(--accent-light);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.84em;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
}

.msg-bubble pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.msg-bubble ul, .msg-bubble ol { padding-left: 20px; margin: 6px 0; }
.msg-bubble li { margin-bottom: 3px; }

.msg-bubble strong { font-weight: 600; }

/* Model badge on AI messages */
.msg-model-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}

.msg-model-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* Typing animation */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 13px 16px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--brown-300);
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.30s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── Composer ─────────────────────────────────────────────── */
.composer-wrapper {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: var(--composer-max);
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-xl);
  padding: 10px 10px 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.composer:focus-within {
  border-color: var(--brown-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 56, 0.12), var(--shadow-sm);
}

.composer-attach {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
  line-height: 0;
}

.composer-attach:hover { color: var(--text-primary); background: var(--bg-hover); }

.composer-input {
  flex: 1;
  outline: none;
  font-size: 0.92rem;
  line-height: 1.55;
  max-height: 180px;
  overflow-y: auto;
  color: var(--text-primary);
  min-height: 24px;
}

.composer-input::placeholder { color: var(--text-muted); }

.composer-input::-webkit-scrollbar { width: 3px; }
.composer-input::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.composer-send {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}

.composer-send:hover:not(:disabled) { background: var(--accent-hover); }
.composer-send:active:not(:disabled) { transform: scale(0.94); }
.composer-send:disabled { opacity: 0.35; cursor: not-allowed; }

.composer-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* Loading shimmer while generating */
.composer.generating .composer-input { opacity: 0.6; }

/* ── Model modal ──────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.model-modal, .settings-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(0.98);
  transition: transform var(--transition);
  overflow: hidden;
}

.modal-backdrop.open .model-modal,
.modal-backdrop.open .settings-modal {
  transform: translateY(0) scale(1);
}

.model-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.model-modal-header h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  line-height: 0;
}

.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.model-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 400px;
  overflow-y: auto;
}

.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  width: 100%;
  text-align: left;
}

.model-option:hover { background: var(--bg-hover); }

.model-option.selected {
  background: var(--accent-light);
  border-color: var(--brown-300);
}

.model-option-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.model-option-info { flex: 1; }
.model-option-name  { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.model-option-desc  { font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; }

.model-option-check {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}

.model-option.selected .model-option-check {
  background: var(--accent);
  border-color: var(--accent);
}

.model-option.selected .model-option-check::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

/* ── Settings modal ───────────────────────────────────────── */
.settings-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.setting-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.setting-desc { font-size: 0.80rem; color: var(--text-muted); margin-top: 2px; }

.api-key-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -10px;
}

.api-key-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.api-key-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.api-key-input-wrap {
  display: flex;
  gap: 6px;
  align-items: center;
}

.api-key-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: 'Fira Code', monospace;
  outline: none;
  transition: border-color var(--transition);
}

.api-key-input:focus { border-color: var(--brown-400); }

.btn-save-key {
  padding: 7px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.80rem;
  font-weight: 500;
  transition: background var(--transition);
  white-space: nowrap;
}

.btn-save-key:hover { background: var(--accent-hover); }

.btn-danger {
  padding: 7px 14px;
  border: 1px solid #c0392b;
  color: #c0392b;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-danger:hover { background: #c0392b; color: #fff; }

/* ── Sidebar overlay (mobile) ─────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay { display: block; }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }

  .mobile-header { display: flex; }

  .welcome { padding: 24px 16px; }
  .welcome-heading { font-size: 1.55rem; }

  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .message-group { padding: 0 12px; }
  .msg-bubble { font-size: 0.88rem; }

  .composer-wrapper { padding: 10px 12px 14px; }
  .composer { border-radius: var(--radius-lg); }
}

@media (max-width: 480px) {
  .welcome-heading { font-size: 1.35rem; }
  .welcome-logo { width: 52px; height: 52px; }
}

/* ── Focus styles (accessibility) ────────────────────────── */
:focus-visible {
  outline: 2px solid var(--brown-400);
  outline-offset: 2px;
}

/* ── Scrollbar global ─────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Utility ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
