/* ═══════════════════════════════════════════════════════════════
   LocalMind — base.css
   Tokens, reset, layout, sidebar, chat surface, messages, composer
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-base: #0e0d0c;
  --bg-surface: #1a1817;
  --bg-input: #23201e;
  --bg-elevated: #201d1b;
  --border: #332d2a;
  --border-focus: #4a3f39;
  --text-main: #f2ebe6;
  --text-muted: #9c8d83;
  --text-faint: #6b5e55;
  --accent: #d97757;
  --accent-hover: #e88a6c;
  --accent-glow: rgba(217, 119, 87, 0.15);
  --danger: #ef4444;
  --success: #4ade80;
  --info: #7dd3fc;

  --font-ui: 'Inter', -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html, body {
  height: 100dvh;
  width: 100vw;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.4s ease;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 119, 87, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(180, 140, 100, 0.02) 0%, transparent 50%);
  z-index: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: url('../bg.png') center / cover no-repeat;
  opacity: 0.06; z-index: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  filter: saturate(0.85);
}

/* ── Coding mode (steel-blue) ── */
body.mode-coding {
  --bg-base: #0a0a0b;
  --bg-surface: #121316;
  --bg-input: #191a1e;
  --bg-elevated: #15171a;
  --border: #282a30;
  --border-focus: #3f424b;
  --text-main: #e2e8f0;
  --text-muted: #8a9bb0;
  --text-faint: #5c6b7d;
}
body.mode-coding::before {
  background: radial-gradient(circle at 50% 0%, rgba(66, 133, 244, 0.04) 0%, transparent 60%);
}
body.mode-coding::after { opacity: 0.13; }
body.mode-coding .welcome-title { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; }

.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100dvh; width: 100vw;
  max-width: 960px; margin: 0 auto;
}

/* ── Hamburger ── */
.hamburger {
  position: absolute;
  top: calc(16px + var(--safe-top)); left: 16px; z-index: 50;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px; height: 40px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.hamburger:hover { border-color: var(--border-focus); transform: translateY(-1px); }
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text-main); border-radius: 2px;
  transition: 0.25s var(--ease);
}
.hamburger:active span:nth-child(2) { transform: scaleX(0.7); }

/* ── Sidebar ── */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 60; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 284px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  z-index: 70;
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease);
  padding: calc(24px + var(--safe-top)) 14px calc(20px + var(--safe-bottom)) 14px;
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sidebar.active { transform: translateX(0); }

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 16px 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img {
  width: 26px; height: 26px; object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(217,119,87,0.3));
}
.sidebar-brand span { font-size: 14px; font-weight: 600; letter-spacing: 0.2px; }

.sidebar h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  font-weight: 600; color: var(--text-muted);
  margin: 10px 0 8px; padding-left: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar h3 .sidebar-count {
  font-size: 10px; padding: 1px 7px; border-radius: 99px;
  background: rgba(217,119,87,0.12); color: var(--accent);
}

.sidebar-option {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-main); font-family: var(--font-ui); font-size: 14px;
  cursor: pointer; transition: all 0.2s var(--ease);
  text-align: left; width: 100%;
}
.sidebar-option:hover { background: rgba(255,255,255,0.04); }
.sidebar-option.active {
  background: rgba(217, 119, 87, 0.08);
  border-color: rgba(217, 119, 87, 0.2);
}
.sidebar-option .icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.sidebar-option .desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.sidebar-divider { border: none; border-top: 1px solid var(--border); margin: 10px 4px; }

/* Workspace file list */
.sidebar-files { display: flex; flex-direction: column; gap: 2px; }
.sidebar-file {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 12px; color: var(--text-muted);
  font-family: var(--font-mono);
  transition: background 0.15s;
  border: none; background: none; text-align: left; width: 100%;
}
.sidebar-file:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.sidebar-file .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-file .fsize { font-size: 10px; color: var(--text-faint); flex-shrink: 0; }
.sidebar-empty { font-size: 11px; color: var(--text-faint); padding: 6px 10px; line-height: 1.5; }

/* Sidebar task list */
.sidebar-tasks { display: flex; flex-direction: column; gap: 3px; }
.sidebar-task {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  font-size: 12px; color: var(--text-muted);
}
.sidebar-task .tdot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-faint);
}
.sidebar-task.running .tdot { background: var(--accent); animation: taskPulse 1.4s ease-in-out infinite; }
.sidebar-task.done .tdot { background: var(--success); }
.sidebar-task.failed .tdot { background: var(--danger); }
.sidebar-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes taskPulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.4; transform: scale(0.75);} }

/* ── Chat area ── */
.chat-scroll-area {
  flex: 1; overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(40px + var(--safe-top)) 24px calc(180px + var(--safe-bottom)) 24px;
  display: flex; flex-direction: column; gap: 32px;
  scroll-behavior: smooth;
  position: relative; z-index: 2;
  -webkit-overflow-scrolling: touch;
}

.welcome-container {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.welcome-container.hidden {
  opacity: 0; pointer-events: none;
  transform: translateY(-20px); position: absolute;
}
.welcome-icon {
  width: 74px; height: 74px; margin-bottom: 22px;
  object-fit: contain; opacity: 0.9;
  filter: drop-shadow(0 8px 28px rgba(217,119,87,0.25));
  animation: welcomeFloat 5s ease-in-out infinite;
}
@keyframes welcomeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.welcome-title {
  font-family: var(--font-serif);
  font-size: 42px; font-weight: 400; letter-spacing: -0.5px;
  color: var(--text-main); text-align: center; margin-bottom: 16px;
}
.welcome-subtitle {
  font-size: 15px; color: var(--text-muted);
  text-align: center; max-width: 440px; line-height: 1.6;
}
.welcome-suggestions {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-top: 28px; max-width: 620px;
}
.suggestion-chip {
  padding: 9px 16px; border-radius: 99px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-family: var(--font-ui);
  cursor: pointer; transition: all 0.2s var(--ease);
}
.suggestion-chip:hover {
  color: var(--text-main); border-color: var(--border-focus);
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

/* ── Messages ── */
.message-row {
  display: flex; width: 100%; gap: 18px;
  animation: slideUp 0.4s var(--ease) forwards;
  opacity: 0;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.message-row.user { justify-content: flex-end; }

.msg-avatar {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  background: transparent; border: none;
  border-radius: 0; overflow: visible; position: relative;
}
.msg-avatar img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(217, 119, 87, 0.25));
  transition: filter 0.3s;
}
.msg-avatar > svg { width: 24px; height: 24px; color: var(--accent); }
.msg-avatar.thinking img {
  animation: avatarGlow 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(217, 119, 87, 0.7));
}
@keyframes avatarGlow { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
.message-row.user .msg-avatar { display: none; }

/* model name tag on assistant messages */
.msg-model-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 6px;
  font-family: var(--font-mono);
}
.msg-model-tag .tag-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.bubble {
  line-height: 1.7; font-size: 16px;
  white-space: pre-wrap; word-break: break-word;
  max-width: 85%; width: fit-content;
}
.message-row.user .bubble {
  background: var(--bg-surface);
  padding: 14px 20px;
  border-radius: 18px; border-bottom-right-radius: 4px;
  border: 1px solid var(--border);
  font-size: 15px;
  animation: userBubbleIn 0.3s var(--ease);
}
@keyframes userBubbleIn {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.message-row.assistant .bubble {
  background: transparent; padding: 4px 0;
  max-width: 100%; white-space: normal; width: 100%;
}

/* ── Markdown ── */
.content { word-break: break-word; }
.md-block { margin: 0; }
.md-text {
  white-space: normal; word-break: break-word;
  line-height: 1.7; font-size: 16px;
}
.md-text > *:first-child { margin-top: 0; }
.md-text > *:last-child { margin-bottom: 0; }
.md-text p { margin: 0 0 12px; }
.md-text ul, .md-text ol { margin: 4px 0 12px; padding-left: 22px; }
.md-text li { margin-bottom: 4px; }
.md-text h1, .md-text h2, .md-text h3, .md-text h4, .md-text h5, .md-text h6 {
  margin: 18px 0 8px; font-weight: 600; line-height: 1.3;
}
.md-text h1 { font-size: 22px; }
.md-text h2 { font-size: 19px; }
.md-text h3 { font-size: 17px; }
.md-text h4 { font-size: 16px; }
.md-text blockquote {
  margin: 8px 0; padding-left: 14px;
  border-left: 3px solid var(--border-focus);
  color: var(--text-muted);
}
.md-text hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.md-text code.inline-code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 13px;
}
.md-text a { color: var(--accent); text-decoration: none; }
.md-text a:hover { text-decoration: underline; }
.md-text img { max-width: 100%; border-radius: 12px; margin: 8px 0; }

.stream-cursor {
  display: inline-block; color: var(--accent); font-size: 14px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom; margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.message-row .bubble { transform-origin: top left; }
.message-row.user .bubble { transform-origin: top right; }
.message-row.assistant .content-arriving { animation: contentArrive 0.24s ease-out both; }
@keyframes contentArrive { from { opacity: .72; } to { opacity: 1; } }

/* ── Thinking panel ── */
.thinking-panel {
  margin: 2px 0 14px 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: thinkIn 0.5s var(--ease);
  width: 100%; max-width: 100%;
  backdrop-filter: blur(2px);
}
@keyframes thinkIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.thinking-header {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px 14px; background: none; border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  color: var(--text-muted); text-align: left;
  transition: background 0.2s; white-space: normal;
}
.thinking-header:hover { background: rgba(255, 255, 255, 0.03); }
.thinking-label { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.thinking-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  animation: thinkingPulse 1.4s ease-in-out infinite;
}
@keyframes thinkingPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(217, 119, 87, 0.45); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(217, 119, 87, 0); }
}
.thinking-time {
  font-size: 11px; color: var(--text-muted);
  font-variant-numeric: tabular-nums; opacity: 0.75; margin-left: 2px;
  font-family: var(--font-mono); flex-shrink: 0;
}
.thinking-chevron {
  width: 14px; height: 14px; flex-shrink: 0; opacity: 0.7;
  transition: transform 0.35s var(--ease);
}
.thinking-panel.expanded .thinking-chevron { transform: rotate(180deg); }
.thought-check { color: var(--accent); flex-shrink: 0; }
.thinking-body-wrapper {
  max-height: 0; overflow: hidden;
  transition: max-height 0.42s var(--ease);
}
.thinking-panel.expanded .thinking-body-wrapper {
  max-height: min(400px, 50vh); overflow-y: auto;
}
.thinking-body-wrapper::-webkit-scrollbar { width: 6px; }
.thinking-body-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.thinking-body {
  padding: 0 14px 13px 14px; font-size: 13px; line-height: 1.65;
  color: #a0aab8; white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-mono);
}
.thinking-panel.done .thinking-dot { display: none; }

/* ── Code blocks ── */
.code-block-wrapper {
  margin: 12px 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: #0d0c0b;
}
.code-block-header {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 12px 8px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted);
  font-family: var(--font-mono); flex-wrap: wrap;
}
.code-lang { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.code-block-wrapper.streaming .code-lang::after {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: thinkingPulse 1.2s ease-in-out infinite; flex-shrink: 0;
}
.code-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.code-action-btn {
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer; font-size: 11px;
  padding: 3px 8px; border-radius: 6px;
  font-family: var(--font-ui);
  transition: all 0.15s; white-space: nowrap;
}
.code-action-btn:hover {
  background: rgba(255,255,255,0.06); color: var(--text-main);
  border-color: var(--border);
}
.code-action-btn.copied { color: var(--success); }
.code-block-wrapper pre {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.5;
}
.code-block-wrapper code { font-family: var(--font-mono); }

/* ── Message actions ── */
.message-actions {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.msg-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-muted); padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-family: var(--font-ui);
  cursor: pointer; transition: all 0.2s;
}
.msg-action-btn:hover {
  background: rgba(255,255,255,0.06); color: var(--text-main);
  border-color: var(--border-focus);
}
.msg-action-btn.copied { color: var(--success); border-color: rgba(74, 222, 128, 0.35); }
.msg-action-btn svg { width: 14px; height: 14px; }

/* ── Composer ── */
.bottom-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 24px calc(24px + var(--safe-bottom)) 24px;
  background: linear-gradient(to top, var(--bg-base) 60%, transparent);
  display: flex; justify-content: center; z-index: 3;
  pointer-events: none;
}
.bottom-bar > * { pointer-events: auto; }

.input-wrapper {
  position: relative; width: 100%; max-width: 800px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px; padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex; flex-direction: column;
}
.input-wrapper.disabled { opacity: 0.6; cursor: not-allowed; }
.input-wrapper:focus-within:not(.disabled) {
  border-color: var(--border-focus);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 0 3px var(--accent-glow);
}
.input-wrapper.generating {
  border-color: rgba(217, 119, 87, 0.35);
  animation: inputGlow 2.4s ease-in-out infinite;
}
@keyframes inputGlow {
  0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 0 2px rgba(217,119,87,0.07); }
  50% { box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 0 3px rgba(217,119,87,0.16); }
}
.input-wrapper.generating::before {
  content: '';
  position: absolute; left: 12%; right: 12%; top: -1px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  animation: scanLine 1.8s linear infinite;
  opacity: 0.9; pointer-events: none;
}
@keyframes scanLine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* attachments */
.attachments-container {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px;
}
.attachments-container:empty { display: none; }
.attachment-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; font-size: 11px; color: var(--text-main);
  max-width: 200px;
  animation: chipIn 0.25s var(--ease);
}
@keyframes chipIn { from { opacity: 0; transform: scale(0.9);} to { opacity: 1; transform: scale(1);} }
.attachment-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-chip .remove-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  transition: background 0.2s;
}
.attachment-chip .remove-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }

.chat-input {
  width: 100%; background: transparent; border: none;
  color: var(--text-main); font-family: inherit; font-size: 16px;
  line-height: 1.5; resize: none;
  min-height: 44px; max-height: 200px; outline: none;
  padding: 10px 16px;
}
.chat-input::placeholder { color: var(--text-faint); }

.input-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 4px 10px; gap: 8px; flex-wrap: wrap;
}
.left-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s var(--ease);
}
.icon-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.05); border-color: var(--border); }
.icon-btn svg { width: 17px; height: 17px; }

.send-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}
.send-btn:hover:not(:disabled) { background: var(--accent-hover); transform: scale(1.05); }
.send-btn:active { transform: scale(0.95); }
.send-btn:disabled { opacity: 0.35; cursor: default; }
.send-btn.stop-mode { background: var(--bg-surface); border: 1px solid var(--border-focus); }

/* ── Scroll to bottom ── */
.scroll-bottom-btn {
  position: fixed; right: 24px;
  bottom: calc(130px + var(--safe-bottom));
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-surface); color: var(--text-main);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: all 0.25s var(--ease);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.scroll-bottom-btn.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-bottom-btn:hover { border-color: var(--border-focus); }
.scroll-bottom-btn svg { width: 16px; height: 16px; }

/* Hidden attribute must always win (send/stop icon swap) */
[hidden] { display: none !important; }

/* Reasoning container */
#reasoningContainer:empty { display: none; }
#reasoningContainer[hidden] { display: none !important; }
