/* ==========================================================================
   MallardGPT — styles
   ========================================================================== */

:root {
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sb-w: 288px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f5f1;
  --sidebar: #f8f7f3;
  --card: #ffffff;
  --hover: rgba(24, 20, 8, .05);
  --active: rgba(24, 20, 8, .08);
  --text: #1a1b1d;
  --muted: #6a6d73;
  --border: #e8e6df;
  --border-strong: #d8d5ca;
  --accent: #f6b800;
  --accent-2: #ff8f1f;
  --accent-ink: #241a00;
  --accent-soft: #fff3c4;
  --user: #fff1bd;
  --user-text: #2a2100;
  --danger: #d33a2c;
  --shadow: 0 1px 2px rgba(24, 20, 8, .06), 0 10px 32px rgba(24, 20, 8, .07);
  --shadow-sm: 0 1px 2px rgba(24, 20, 8, .06);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1113;
  --bg-soft: #16191c;
  --sidebar: #121416;
  --card: #171a1e;
  --hover: rgba(255, 255, 255, .06);
  --active: rgba(255, 255, 255, .1);
  --text: #ececea;
  --muted: #8e939a;
  --border: #24292d;
  --border-strong: #333a41;
  --accent: #ffc928;
  --accent-2: #ff9a2e;
  --accent-ink: #231a00;
  --accent-soft: #2b2410;
  --user: #2b2511;
  --user-text: #fbefc6;
  --danger: #ff6b5e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 44px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.duck { width: 100%; height: 100%; display: block; }
.muted { color: var(--muted); }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ---------- Layout ---------- */
.app { display: flex; height: 100dvh; overflow: hidden; }

.sidebar {
  width: var(--sb-w);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  transition: margin-left .3s var(--ease), transform .3s var(--ease);
  z-index: 40;
}
.app.collapsed .sidebar { margin-left: calc(var(--sb-w) * -1); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--bg); }

.scrim { display: none; }

/* ---------- Sidebar ---------- */
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: -.02em; }
.brand b { color: var(--accent-2); font-weight: 750; }
.brand-duck { width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgba(255, 143, 31, .35)); }

.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center;
  border-radius: 10px; color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

.new-chat {
  margin: 8px 12px 6px; padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  border-radius: 12px; font-weight: 550; background: var(--card);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), border-color .15s, box-shadow .15s;
}
.new-chat:hover { border-color: var(--accent); transform: translateY(-1px); }
.new-chat .i { color: var(--accent-2); }
.new-chat kbd {
  margin-left: auto; font: 500 11px var(--font); color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
}

.search {
  margin: 6px 12px 4px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  height: 36px; border-radius: 10px; color: var(--muted); transition: background .15s;
}
.search:focus-within { background: var(--hover); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 14px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }

.history { flex: 1; overflow-y: auto; padding: 6px 8px 8px; }
.group-label { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.empty-history { padding: 28px 16px; text-align: center; font-size: 13.5px; color: var(--muted); }

.chat-item { position: relative; display: flex; align-items: center; border-radius: 10px; }
.chat-item:hover { background: var(--hover); }
.chat-item.active { background: var(--active); }
.chat-link {
  flex: 1; min-width: 0; text-align: left; padding: 8px 10px; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-del {
  width: 28px; height: 28px; margin-right: 4px; display: grid; place-items: center;
  border-radius: 8px; color: var(--muted); opacity: 0; transition: opacity .15s, background .15s, color .15s;
}
.chat-del .i { width: 15px; height: 15px; }
.chat-item:hover .chat-del, .chat-item:focus-within .chat-del { opacity: 1; }
.chat-del:hover { background: var(--active); color: var(--danger); }

.sb-foot { padding: 10px 12px 12px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.model-card { border: 1px solid var(--border); background: var(--card); border-radius: 14px; padding: 10px 12px; }
.mc-top { display: flex; align-items: center; gap: 10px; }
.mc-top .duck { width: 30px; height: 30px; flex: none; }
.mc-top strong { display: block; font-size: 13.5px; line-height: 1.2; }
.mc-top span:not(.status-pill) { font-size: 12px; color: var(--muted); }
.status-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 3px rgba(47, 191, 113, .18); }
.model-card dl { margin: 10px 0 0; display: grid; gap: 4px; font-size: 12px; }
.model-card dl div { display: flex; justify-content: space-between; }
.model-card dt { color: var(--muted); }
.model-card dd { margin: 0; font-weight: 550; }
.sb-btn { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.sb-btn:hover { background: var(--hover); color: var(--text); }

/* ---------- Top bar ---------- */
.topbar {
  height: 56px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  position: relative; z-index: 5;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.model-picker { position: relative; }
.model-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 7px 12px; border-radius: 10px;
  font-weight: 600; font-size: 16px; letter-spacing: -.01em; transition: background .15s;
}
.model-btn:hover, .model-btn[aria-expanded="true"] { background: var(--hover); }
.model-btn .i { width: 16px; height: 16px; color: var(--muted); transition: transform .2s var(--ease); }
.model-btn[aria-expanded="true"] .i { transform: rotate(180deg); }

.menu {
  position: absolute; top: calc(100% + 6px); left: 0; width: 300px; padding: 6px; z-index: 20;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow);
  animation: pop .16s var(--ease);
}
.menu-item {
  position: relative; display: block; width: 100%; text-align: left; padding: 10px 36px 10px 12px; border-radius: 11px;
}
.menu-item:hover { background: var(--hover); }
.menu-item.on { background: var(--accent-soft); }
.mi-main { display: flex; align-items: baseline; gap: 8px; }
.mi-main strong { font-size: 14.5px; }
.mi-main em { font-style: normal; font-size: 11.5px; color: var(--accent-2); font-weight: 600; }
.mi-desc { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.mi-check { position: absolute; right: 12px; top: 50%; margin-top: -9px; color: var(--accent-2); }

.btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.btn-ghost:hover { background: var(--hover); color: var(--text); }

/* ---------- Scroll area ---------- */
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: auto; }
.thread { max-width: 780px; margin: 0 auto; padding: 12px 20px 40px; display: flex; flex-direction: column; gap: 22px; }

.to-bottom {
  position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); z-index: 6;
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border-strong); box-shadow: var(--shadow); color: var(--muted);
  transition: color .15s, transform .15s var(--ease);
}
.to-bottom:hover { color: var(--text); transform: translateX(-50%) translateY(-2px); }

/* ---------- Home ---------- */
.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 20px 60px; animation: rise .6s var(--ease) both; }
.hero-duck {
  position: relative; width: 104px; height: 104px; margin-bottom: 18px; border-radius: 50%;
  animation: float 4.5s ease-in-out infinite;
}
.hero-duck::before {
  content: ""; position: absolute; inset: -26px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 32%, transparent), transparent);
}
.hero-duck .duck { filter: drop-shadow(0 10px 18px rgba(255, 143, 31, .3)); transition: transform .25s var(--ease); }
.hero-duck:hover .duck { transform: scale(1.06) rotate(-4deg); }
.hero-duck.wiggle .duck { animation: wiggle .5s ease; }
.home h1 { margin: 0; font-size: clamp(28px, 4.6vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.lede { margin: 8px 0 28px; font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); }
.suggestions { width: 100%; max-width: 680px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sugg {
  text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.sugg:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.sugg strong { display: block; font-size: 14.5px; font-weight: 600; }
.sugg span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* ---------- Messages ---------- */
.msg.enter { animation: rise .35s var(--ease) both; }

.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble {
  max-width: min(82%, 600px); padding: 10px 16px; border-radius: 20px 20px 6px 20px;
  background: var(--user); color: var(--user-text); white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: var(--shadow-sm);
}

.msg.assistant { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; padding: 4px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
}
.msg.assistant .body { min-width: 0; }
.msg.assistant .bubble {
  display: inline-block; max-width: 100%; padding: 12px 18px; border-radius: 6px 20px 20px 20px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow-wrap: anywhere;
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 12px; }
.prose h3 { margin: 16px 0 8px; font-size: 17px; letter-spacing: -.01em; }
.prose h4 { margin: 14px 0 6px; font-size: 15px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 4px 0; padding-left: 2px; }
.prose li::marker { color: var(--accent-2); }
.prose strong { font-weight: 650; }
.prose code { font-family: var(--mono); font-size: .9em; padding: 1px 6px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--border); }
.prose blockquote { margin: 0 0 12px; padding: 4px 0 4px 14px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

.actions { display: flex; align-items: center; gap: 2px; margin: 6px 0 0 -6px; opacity: 0; transition: opacity .2s; }
.msg.assistant:hover .actions, .msg.assistant:focus-within .actions, .msg.assistant:last-child .actions { opacity: 1; }
.msg.streaming .actions { display: none; }
.thread .msg.assistant:not(:last-child) .act-regen { display: none; }
.act { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); transition: background .15s, color .15s; }
.act .i { width: 16px; height: 16px; }
.act:hover { background: var(--hover); color: var(--text); }
.act.on { color: var(--accent-2); }
.act-down .i { transform: rotate(180deg); }
.meta { margin-left: 8px; font-size: 12px; color: var(--muted); }

/* Thinking */
.thinking .bubble { display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px; }
.thinking .avatar .duck { animation: bob .9s ease-in-out infinite; }
.status { font-size: 14px; font-weight: 500; }
.status:empty { display: none; }
.shimmer {
  background: linear-gradient(90deg, var(--muted) 0%, var(--text) 50%, var(--muted) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 1.8s linear infinite;
}
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1.1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }

/* ---------- Composer ---------- */
.composer-wrap { flex: none; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.composer {
  max-width: 780px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 18px;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 26px; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent;
  padding: 8px 0; max-height: 200px; line-height: 1.5; font-size: 15.5px;
}
.composer textarea::placeholder { color: var(--muted); }
.send {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  transition: transform .15s var(--ease), opacity .2s, filter .2s;
}
.send:hover:not(:disabled) { transform: scale(1.06); filter: brightness(1.05); }
.send:active:not(:disabled) { transform: scale(.95); }
.send:disabled { opacity: .3; cursor: default; background: var(--active); color: var(--muted); }
.send.stop { background: var(--text); color: var(--bg); }
.fineprint { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 6px 0 0; font-size: 12px; }
.footer-links a { color: var(--muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
.footer-links a:hover { color: var(--text); text-decoration-color: var(--accent-2); }

/* ---------- Modals ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 9, 10, .5); backdrop-filter: blur(4px); animation: fade .2s ease;
}
.modal-card {
  width: min(560px, 100%); max-height: min(86dvh, 720px); display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow);
  animation: pop .22s var(--ease);
}
.modal-card.small { width: min(400px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 22px; }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.modal-body { overflow-y: auto; padding: 0 22px 8px; }
.modal-body.pad { padding: 22px; }
.modal-body.pad h2 { margin: 0 0 6px; font-size: 18px; }
.modal-body.pad p { margin: 0 0 20px; }
.modal-foot { padding: 14px 22px 18px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row strong { font-size: 14.5px; font-weight: 600; }
.row p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

.seg { display: inline-flex; flex: none; padding: 3px; gap: 2px; border-radius: 11px; background: var(--bg-soft); border: 1px solid var(--border); }
.seg button { padding: 5px 11px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--muted); transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }

.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong); transition: background .2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .22s var(--ease);
}
.switch input:checked + span { background: var(--accent-2); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-row { display: flex; justify-content: flex-end; gap: 10px; }
.btn-secondary, .btn-danger { padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: background .15s, filter .15s; }
.btn-secondary { background: var(--bg-soft); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--hover); }
.btn-danger { color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-danger.solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn-danger.solid:hover { filter: brightness(1.08); background: var(--danger); }

.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 200; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 9px 16px; border-radius: 99px; font-size: 13.5px; font-weight: 550;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow); transition: opacity .2s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-6deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg) scale(1.08); } 45% { transform: rotate(10deg) scale(1.08); } 70% { transform: rotate(-5deg); } }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); transform: translateX(-100%);
    margin-left: 0 !important; box-shadow: var(--shadow);
  }
  .app.sb-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .app.sb-open .scrim { opacity: 1; pointer-events: auto; }
  #sbClose { display: inline-grid; }
}
@media (min-width: 861px) { #sbClose { display: none; } }

@media (max-width: 600px) {
  .thread { padding: 8px 14px 32px; gap: 18px; }
  .btn-ghost span { display: none; }
  .btn-ghost { width: 36px; padding: 0; justify-content: center; }
  .suggestions { grid-template-columns: 1fr; gap: 10px; }
  .msg.assistant { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .avatar { width: 30px; height: 30px; }
  .msg.user .bubble { max-width: 88%; }
  .new-chat kbd { display: none; }
  .row { flex-wrap: wrap; }
  .composer-wrap { padding-left: 10px; padding-right: 10px; }
  .menu { width: min(300px, calc(100vw - 24px)); }
  .actions { opacity: 1; }
  .chat-del { opacity: 1; }
  .to-bottom { bottom: 120px; }
}

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