/* ==========================================================================
   IVOIRE AI — interface de discussion (accueil du site)
   Thème ivoire clair : papier chaud, encre graphite, accent bronze.
   Accueil vide : logo, titre et saisie centrés ; puis fil + saisie en bas.
   ========================================================================== */

.chat-page {
  --c-bg: #f6f1e7;
  --c-side: #eee6d6;
  --c-card: #fffdf8;
  --c-ink: #1b1611;
  --c-ink-2: #4b4339;
  --c-muted: #8b8274;
  --c-line: #e1d7c4;
  --c-line-2: #d3c6ae;
  --c-accent: #a06a22;
  --c-accent-2: #c28b3c;
  --c-accent-soft: #f2e6cf;
  --c-user: #1f1a14;
  --c-hover: rgba(27, 22, 17, .055);
  --c-code: #f0e9dc;
  --chat-max: 780px;
  --side-w: 288px;
  --r: 14px;
}

html, body { height: 100%; }
/* `hidden` doit l'emporter sur les display: grid ci-dessous. */
.chat-page [hidden] { display: none !important; }
body.chat-page {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  background: var(--c-bg);
  color: var(--c-ink-2);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.chat-page a { color: inherit; text-decoration: none; }
.chat-page .ic { width: 18px; height: 18px; stroke-width: 1.9; flex: none; }
/* Place réservée avant l'arrivée de Lucide (chargé en asynchrone). */
.chat-page i.ic { display: inline-block; }
.chat-page ::selection { background: var(--c-accent-soft); color: var(--c-ink); }
.chat-page * { scrollbar-width: thin; scrollbar-color: var(--c-line-2) transparent; }

/* ---------- Barre latérale ---------- */
.side {
  width: var(--side-w);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--c-side);
  border-right: 1px solid var(--c-line);
  padding: max(18px, env(safe-area-inset-top)) 14px 14px max(14px, env(safe-area-inset-left));
  gap: 14px;
  z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 6px; }
.side-brand img { width: 38px; height: auto; }
.side-brand .name { font-weight: 800; letter-spacing: .16em; font-size: 15px; color: var(--c-ink); }
.side-brand .name b { color: var(--c-accent); font-weight: 800; }

.btn-new {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 14px;
  border: 0; border-radius: 999px;
  background: var(--c-ink); color: #fbf6ec;
  font: 700 15px var(--font-body); cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(27, 22, 17, .55);
  transition: transform .15s var(--ease), background .2s var(--ease);
}
.btn-new:hover { background: #2c251d; }
.btn-new:active { transform: scale(.98); }

.side-label { padding: 10px 10px 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 2px; }
.conv-list li { display: flex; align-items: center; min-width: 0; border-radius: 10px; transition: background .15s; }
.conv-list li:hover { background: var(--c-hover); }
.conv-list li.is-active { background: var(--c-card); box-shadow: 0 1px 0 var(--c-line), 0 0 0 1px var(--c-line); }
.conv-open {
  flex: 1; min-width: 0; text-align: left; padding: 10px 12px;
  background: none; border: 0; color: var(--c-ink-2); font: 500 14.5px/1.35 var(--font-body); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-list li.is-active .conv-open { color: var(--c-ink); font-weight: 600; }
.conv-del { opacity: 0; background: none; border: 0; padding: 8px; margin-right: 2px; color: var(--c-muted); cursor: pointer; border-radius: 8px; }
.conv-list li:hover .conv-del, .conv-del:focus-visible { opacity: 1; }
.conv-del:hover { color: #b4472f; background: rgba(180, 71, 47, .08); }
.conv-del .ic { width: 16px; height: 16px; }
.conv-empty { padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--c-muted); }
.conv-list li.conv-group { padding: 14px 12px 4px; font-size: 12px; font-weight: 700; color: var(--c-muted); border-radius: 0; }
.conv-list li.conv-group:first-child { padding-top: 2px; }
.conv-list li.conv-group:hover { background: none; }

.side-foot { border-top: 1px solid var(--c-line); padding: 12px 6px 2px; display: grid; gap: 2px; font-size: 14px; }
.side-foot a { display: flex; align-items: center; gap: 10px; color: var(--c-ink-2); padding: 8px 6px; border-radius: 8px; font-weight: 500; }
.side-foot a:hover { color: var(--c-ink); background: var(--c-hover); }
.side-foot .ic { width: 17px; height: 17px; color: var(--c-muted); }

/* ---------- Zone principale ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar {
  display: none; align-items: center; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: var(--c-bg); border-bottom: 1px solid var(--c-line);
}
.topbar .title { flex: 1; min-width: 0; color: var(--c-ink); font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.top-brand { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; letter-spacing: .16em; font-size: 14px; color: var(--c-ink); }
.top-brand img { width: 30px; height: auto; }
.top-brand b { color: var(--c-accent); }
body.is-empty .topbar .title, body:not(.is-empty) .top-brand { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  border: 0; border-radius: 12px; background: none; color: var(--c-ink); cursor: pointer;
}
.icon-btn:hover { background: var(--c-hover); }
.icon-btn .ic { width: 21px; height: 21px; }

.thread { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.thread-inner { max-width: var(--chat-max); margin: 0 auto; padding: 36px max(22px, env(safe-area-inset-right)) 28px max(22px, env(safe-area-inset-left)); display: grid; gap: 30px; }

/* ---------- Accueil vide : tout est centré ---------- */
body.is-empty .thread { flex: none; overflow: visible; margin-top: auto; }
body.is-empty .composer-wrap { position: static; margin-bottom: auto; background: none; padding-top: 26px; }
body.is-empty .fineprint { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); padding: 0 20px; }
.welcome { text-align: center; padding: 20px 22px 0; }
.welcome-logo { width: 84px; height: auto; margin: 0 auto 22px; display: block; animation: rise .5s var(--ease) both; }
.welcome h1 {
  margin: 0; font-family: var(--font-head); font-weight: 600; color: var(--c-ink);
  font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.02em; text-wrap: balance;
  animation: rise .5s .05s var(--ease) both;
}
.welcome h1 em { font-style: italic; font-weight: 500; color: var(--c-accent); }

.suggest { display: none; }
body.is-empty .suggest {
  max-width: var(--chat-max); margin: 18px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  animation: rise .5s .15s var(--ease) both;
}
.suggest button {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 17px;
  border: 1px solid var(--c-line-2); border-radius: 999px; background: var(--c-card);
  color: var(--c-ink); font: 600 14.5px var(--font-body); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease);
}
.suggest button .ic { width: 17px; height: 17px; color: var(--c-accent); }
.suggest button:hover { border-color: var(--c-accent-2); background: var(--c-accent-soft); }
.suggest button:active { transform: scale(.97); }

/* ---------- Messages ---------- */
.msg { display: grid; gap: 8px; animation: rise .32s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-user { justify-items: end; }
.msg-user .bubble {
  max-width: min(84%, 600px); padding: 13px 18px;
  background: var(--c-user); color: #fbf6ec;
  border-radius: 22px 22px 6px 22px;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; font-weight: 500;
  box-shadow: 0 8px 20px -14px rgba(27, 22, 17, .7);
}
.msg-user { gap: 2px; }
.user-actions { display: flex; gap: 2px; margin-bottom: -14px; opacity: 0; transition: opacity .15s var(--ease); }
.msg-user:hover .user-actions, .user-actions:focus-within { opacity: 1; }
@media (hover: none) { .user-actions { opacity: 1; } }
.user-actions button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px;
  background: none; border: 0; border-radius: 10px;
  color: var(--c-muted); font: 600 13px var(--font-body); cursor: pointer;
}
.user-actions button:hover { color: var(--c-ink); background: var(--c-hover); }
.user-actions .ic { width: 15px; height: 15px; }

.msg-ai { grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.msg-ai .avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-card); border: 1px solid var(--c-line-2);
  box-shadow: 0 4px 10px -6px rgba(27, 22, 17, .35);
}
.msg-ai .avatar img { width: 24px; height: auto; }
.msg-ai .who { font-size: 15px; font-weight: 800; color: var(--c-ink); margin: 8px 0 8px; }
.msg-ai .body { grid-column: 2; min-width: 0; }

.md { color: var(--c-ink); font-size: 16.5px; line-height: 1.75; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 14px; }
.md strong { color: var(--c-ink); font-weight: 700; }
.md a { color: var(--c-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 24px; }
.md li { margin: 6px 0; padding-left: 2px; }
.md li::marker { color: var(--c-accent); font-weight: 700; }
.md h3, .md h4 { margin: 22px 0 8px; font-family: var(--font-head); font-size: 21px; font-weight: 600; color: var(--c-ink); line-height: 1.3; }
.md h4 { font-size: 18px; }
.md code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .86em; padding: 2px 6px; border-radius: 6px; background: var(--c-code); border: 1px solid var(--c-line); }
/* Document mis en page : aperçu réduit à la largeur du fil */
.doc-card {
  margin: 4px 0 16px; border: 1px solid var(--c-line-2); border-radius: 16px; overflow: hidden;
  background: var(--c-card); box-shadow: 0 16px 36px -24px rgba(60, 42, 18, .55);
}
.doc-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--c-line); }
.doc-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: var(--c-ink); }
.doc-name .ic { color: var(--c-accent); }
.doc-pdf {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border: 0; border-radius: 999px; background: var(--c-ink); color: #fbf6ec;
  font: 700 14px var(--font-body); cursor: pointer; transition: background .2s var(--ease);
}
.doc-pdf:hover { background: var(--c-accent); }
.doc-pdf .ic { width: 17px; height: 17px; }
.doc-view { position: relative; overflow: hidden; background: #e9e3d6; }
.doc-view iframe { position: absolute; top: 0; left: 0; border: 0; background: #fff; transform-origin: 0 0; }
.doc-code {
  display: flex; align-items: center; gap: 7px; width: 100%; padding: 9px 16px;
  border: 0; border-top: 1px solid var(--c-line); background: none;
  color: var(--c-muted); font: 600 13px var(--font-body); cursor: pointer; text-align: left;
}
.doc-code:hover { color: var(--c-ink); background: var(--c-hover); }
.doc-code .ic { width: 15px; height: 15px; }
.doc-card .code { margin: 0; }
.doc-card .code pre { border-radius: 0; }
.doc-making { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 14px 16px; border: 1px dashed var(--c-line-2); border-radius: 14px; font-size: 15px; font-weight: 500; }

.md .code { position: relative; margin: 0 0 14px; }
.md .code pre { margin: 0; padding-top: 38px; }
.code-copy {
  position: absolute; top: 8px; right: 8px; padding: 4px 10px;
  border: 1px solid rgba(244, 236, 221, .18); border-radius: 8px; background: rgba(244, 236, 221, .08);
  color: #e9dfcc; font: 600 12px var(--font-body); cursor: pointer;
}
.code-copy:hover { background: rgba(244, 236, 221, .16); }
.md pre { margin: 0 0 14px; padding: 16px 18px; background: #1f1a14; color: #f4ecdd; border-radius: 12px; overflow-x: auto; }
.md pre code { padding: 0; border: 0; background: none; color: inherit; font-size: 13.5px; line-height: 1.6; }
.md blockquote { margin: 0 0 14px; padding: 4px 0 4px 16px; border-left: 3px solid var(--c-accent-2); color: var(--c-ink-2); }
.md hr { border: 0; border-top: 1px solid var(--c-line); margin: 20px 0; }

.caret { display: inline-block; width: 9px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--c-accent); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--c-muted); font-size: 15px; font-weight: 500; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent); opacity: .3; animation: pulse 1.2s infinite var(--ease); }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 40% { opacity: 1; transform: translateY(-2px); } }
.shimmer {
  background: linear-gradient(90deg, var(--c-muted) 0%, var(--c-muted) 40%, var(--c-ink) 50%, var(--c-muted) 60%, var(--c-muted) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 1.8s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* Revenir au dernier message */
.jump {
  position: absolute; left: 50%; top: -44px; z-index: 5;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--c-line-2); border-radius: 50%; background: var(--c-card); color: var(--c-ink); cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(60, 42, 18, .5);
  opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.jump.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.jump:hover { border-color: var(--c-accent-2); }
.jump .ic { width: 19px; height: 19px; }

.sources { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.sources .lab { width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.sources a {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 7px 13px; border: 1px solid var(--c-line-2); border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--c-ink-2); background: var(--c-card);
}
.sources a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.sources a:hover { border-color: var(--c-accent-2); color: var(--c-ink); }
.sources .ic { width: 14px; height: 14px; color: var(--c-accent); }

.actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; margin-left: -8px; }
.actions button {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px;
  background: none; border: 0; border-radius: 10px;
  color: var(--c-muted); font: 600 13.5px var(--font-body); cursor: pointer;
}
.actions button:hover { color: var(--c-ink); background: var(--c-hover); }
.actions button.is-done, .user-actions button.is-done { color: #2f7a4b; }
.actions .ic { width: 16px; height: 16px; }

.note-error {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 12px;
  background: #fbeee8; border: 1px solid #ecc9bc; color: #8c3a24; font-size: 15px; font-weight: 500;
}
.note-error button { background: var(--c-card); border: 1px solid #e0b3a3; color: #8c3a24; border-radius: 999px; padding: 6px 14px; font: 700 13.5px var(--font-body); cursor: pointer; }

/* ---------- Saisie ---------- */
.composer-wrap {
  position: relative;
  padding: 10px max(18px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: linear-gradient(to top, var(--c-bg) 72%, rgba(246, 241, 231, 0));
}
.composer {
  max-width: var(--chat-max); margin: 0 auto;
  display: flex; align-items: flex-end; gap: 10px;
  padding: 10px 10px 10px 22px;
  background: var(--c-card); border: 1px solid var(--c-line-2); border-radius: 28px;
  box-shadow: 0 18px 40px -22px rgba(60, 42, 18, .45), 0 2px 6px -3px rgba(60, 42, 18, .12);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
body.is-empty .composer { padding: 14px 12px 14px 26px; border-radius: 32px; }
.composer:focus-within { border-color: var(--c-accent-2); box-shadow: 0 0 0 4px var(--c-accent-soft), 0 18px 40px -22px rgba(60, 42, 18, .45); }
.composer { flex-wrap: wrap; }
.tray { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px; }
.tray-item { position: relative; display: inline-flex; }
.tray-item img { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; border: 1px solid var(--c-line-2); display: block; }
.tray-file, .file-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 220px; height: 58px; padding: 0 14px;
  border: 1px solid var(--c-line-2); border-radius: 12px; background: var(--c-bg);
  font-size: 13.5px; font-weight: 600; color: var(--c-ink);
}
.tray-file span, .file-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-file .ic, .file-chip .ic { color: var(--c-accent); }
.tray-x {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--c-ink); color: #fbf6ec; cursor: pointer;
}
.tray-x .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.attach {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; margin-left: -10px; align-self: flex-end;
  border: 0; border-radius: 50%; background: none; color: var(--c-ink-2); cursor: pointer;
}
.attach:hover { background: var(--c-hover); color: var(--c-ink); }
.attach .ic { width: 21px; height: 21px; }
body.is-empty .attach { margin-left: -14px; }
.msg-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: min(84%, 600px); }
.msg-files img { width: 120px; height: 120px; object-fit: cover; border-radius: 16px; border: 1px solid var(--c-line-2); }
.file-chip { height: 46px; background: var(--c-card); }
body.is-drop .composer { border-color: var(--c-accent); box-shadow: 0 0 0 6px var(--c-accent-soft); }
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent;
  color: var(--c-ink); font: 500 17px/1.5 var(--font-body);
  padding: 9px 0; max-height: 200px;
}
.composer textarea::placeholder { color: var(--c-muted); font-weight: 500; }
.send {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--c-ink); color: #fbf6ec;
  transition: background .2s var(--ease), opacity .2s var(--ease), transform .15s var(--ease);
}
.send:hover { background: var(--c-accent); }
.send:active { transform: scale(.94); }
.send:disabled { cursor: default; background: var(--c-line); color: var(--c-muted); }
.send .ic { width: 21px; height: 21px; stroke-width: 2.4; }
.send.is-stop { background: var(--c-accent); }
.send .i-stop { display: none; width: 15px; height: 15px; fill: currentColor; }
.send.is-stop .i-stop { display: block; }
.send.is-stop .i-send { display: none; }
.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; }
.fineprint { max-width: var(--chat-max); margin: 10px auto 0; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--c-muted); }
.fineprint a { color: var(--c-ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.toast {
  position: fixed; left: 50%; bottom: calc(118px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px);
  padding: 10px 18px; border-radius: 999px; background: var(--c-ink); color: #fbf6ec;
  font: 600 14px var(--font-body); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60;
  box-shadow: 0 10px 24px -12px rgba(27, 22, 17, .6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.chat-page :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
/* Le champ a déjà son anneau (.composer:focus-within). */
.chat-page .composer textarea:focus-visible { outline: none; }

/* ---------- Mobile ---------- */
.side-scrim { display: none; }
@media (max-width: 900px) {
  .side { position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--side-w)); transform: translateX(-102%); visibility: hidden; transition: transform .28s var(--ease), visibility 0s .28s; }
  body.side-open .side { transform: none; visibility: visible; transition: transform .28s var(--ease); box-shadow: 24px 0 48px -24px rgba(27, 22, 17, .45); }
  .side-scrim { display: block; position: fixed; inset: 0; background: rgba(27, 22, 17, .35); opacity: 0; pointer-events: none; transition: opacity .28s; z-index: 30; }
  body.side-open .side-scrim { opacity: 1; pointer-events: auto; }
  .topbar { display: flex; }
  body.is-empty .topbar { border-bottom-color: transparent; }
  .thread-inner { padding-top: 22px; gap: 26px; }
  .welcome-logo { width: 68px; margin-bottom: 18px; }
  .md { font-size: 16px; }
  .msg-ai { grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; }
  .msg-ai .avatar { width: 32px; height: 32px; }
  .msg-ai .avatar img { width: 20px; }
  .msg-ai .who { margin-top: 5px; }
  .suggest button { padding: 10px 14px; font-size: 14px; }
  .conv-del { opacity: 1; }
  body.is-empty .fineprint { position: static; margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-page *, .chat-page *::before, .chat-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
