:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --sidebar: #f1f2f4;
  --surface: #ffffff;
  --surface-muted: #f0f1f3;
  --surface-hover: #e8e9ed;
  --text: #1b1b1d;
  --subtle: #777980;
  --muted: var(--subtle);
  --border: #e8e8eb;
  --accent: #2788e8;
  --accent-strong: #1675d1;
  --accent-contrast: #ffffff;
  --user-bubble: #eaf3ff;
  --danger: #b42335;
  --shadow: 0 14px 42px rgb(0 0 0 / 16%);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 9999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --app-height: 100dvh;
  --viewport-top: 0px;
  --app-safe-area-top: env(safe-area-inset-top, 0px);
  --app-safe-area-right: env(safe-area-inset-right, 0px);
  --app-safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --app-safe-area-left: env(safe-area-inset-left, 0px);
  --telegram-system-safe-area-top: 0px;
  --telegram-system-safe-area-right: 0px;
  --telegram-system-safe-area-bottom: 0px;
  --telegram-system-safe-area-left: 0px;
  --telegram-content-safe-area-top: 0px;
  --telegram-content-safe-area-right: 0px;
  --telegram-content-safe-area-bottom: 0px;
  --telegram-content-safe-area-left: 0px;
  --telegram-effective-safe-area-top: 0px;
  --telegram-effective-safe-area-right: 0px;
  --telegram-effective-safe-area-bottom: 0px;
  --telegram-effective-safe-area-left: 0px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html.telegram-mini-app {
  /* env()/Telegram system values describe the same device inset. Telegram's
     content inset starts after that device-safe region, so the two Telegram
     regions are consecutive and must be added. */
  --app-safe-area-top: calc(max(env(safe-area-inset-top, 0px), var(--telegram-system-safe-area-top, 0px), var(--tg-safe-area-inset-top, 0px)) + max(var(--telegram-content-safe-area-top, 0px), var(--tg-content-safe-area-inset-top, 0px)));
  --app-safe-area-right: calc(max(env(safe-area-inset-right, 0px), var(--telegram-system-safe-area-right, 0px), var(--tg-safe-area-inset-right, 0px)) + max(var(--telegram-content-safe-area-right, 0px), var(--tg-content-safe-area-inset-right, 0px)));
  --app-safe-area-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--telegram-system-safe-area-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) + max(var(--telegram-content-safe-area-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px)));
  --app-safe-area-left: calc(max(env(safe-area-inset-left, 0px), var(--telegram-system-safe-area-left, 0px), var(--tg-safe-area-inset-left, 0px)) + max(var(--telegram-content-safe-area-left, 0px), var(--tg-content-safe-area-inset-left, 0px)));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0d;
  --sidebar: #111113;
  --surface: #1c1c1f;
  --surface-muted: #222225;
  --surface-hover: #29292e;
  --text: #f4f4f6;
  --subtle: #a1a1a8;
  --muted: var(--subtle);
  --border: #2a2a2f;
  --accent: #4b9cff;
  --accent-strong: #72b1ff;
  --accent-contrast: #07111f;
  --user-bubble: #10194f;
  --danger: #f1a0a8;
  --shadow: 0 16px 40px rgb(0 0 0 / 28%);
}

* { box-sizing: border-box; }
/* Component display declarations must never reveal elements hidden by application state. */
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; min-height: 0; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; }
#app { position: fixed; inset-inline: 0; top: var(--viewport-top); width: 100%; height: var(--app-height); min-height: 0; margin: 0; overflow: hidden; }
body { overflow: hidden; color: var(--text); background: var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .52; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.boot { height: var(--app-height); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--subtle); background: var(--bg); font-size: 14px; }
.brand-mark { width: 38px; height: 38px; display: block; object-fit: cover; border: 1px solid var(--border); border-radius: 50%; }
.boot-mark { width: 68px; height: 68px; border-radius: 50%; box-shadow: 0 8px 24px rgb(16 33 69 / 16%); }
.shell { position: relative; width: 100%; height: var(--app-height); min-height: 0; display: grid; grid-template-columns: minmax(248px, 296px) minmax(0, 1fr); overflow: hidden; background: var(--bg); }
.sidebar { height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: max(16px, var(--app-safe-area-top)) 12px max(12px, var(--app-safe-area-bottom)); background: var(--sidebar); border-right: 1px solid var(--border); }
.side-head, .chat-top, .composer-actions, .section-head { display: flex; align-items: center; }
.side-head { flex: 0 0 auto; justify-content: space-between; padding: 4px 4px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; }
.icon-button, .quiet-button { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--subtle); }
.attach-button:hover, .attach-button:active { background: transparent; color: var(--text); }
.new-chat { flex: 0 0 auto; width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); text-align: left; font-weight: 570; }
.new-chat svg { width: 18px; height: 18px; color: var(--accent); }
.search-wrap { position: relative; flex: 0 0 auto; margin: 13px 0 8px; }
.search-wrap input { width: 100%; height: 42px; padding: 0 12px 0 39px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); }
.search-wrap input::placeholder, .composer textarea::placeholder { color: var(--subtle); opacity: .88; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 10px; color: var(--subtle); }
.search-icon svg { width: 18px; height: 18px; }
.chat-list { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; gap: 0; padding: 2px 1px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }
.chat-item { flex: 0 0 auto; width: 100%; min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; text-align: left; overflow: hidden; }
.chat-item, .chat-item * { -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none !important; }
.chat-item:hover, .chat-item.active { background: transparent; }
.chat-item.active .chat-title { color: var(--text); font-weight: 650; }
.chat-title { display: block; min-width: 0; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 480; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.chat-unread-dot { width: 8px; height: 8px; display: block; align-self: center; border-radius: 50%; background: #348de0; box-shadow: 0 0 0 2px var(--sidebar); }
.chat-date { display: none; }
.sidebar-footer { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 5px 2px; border-top: 0; }
.tools-entry, .profile-entry { width: 42px; height: 42px; flex: 0 0 42px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface-muted); color: var(--subtle); }
.tools-entry:hover, .profile-entry:hover { background: var(--surface-hover); color: var(--text); }
.tools-entry svg, .profile-entry svg { width: 19px; height: 19px; }
.tools-entry-icon, .profile-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--accent); font-size: 17px; font-weight: 650; }
.tools-entry-copy, .profile-copy, .tools-entry-arrow, .profile-more { display: none; }
.tools-entry-copy strong, .profile-copy strong { overflow: hidden; font-size: 12px; font-weight: 610; text-overflow: ellipsis; white-space: nowrap; }
.tools-entry-copy small, .profile-copy small { overflow: hidden; color: var(--subtle); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.profile-avatar { border-radius: 50%; background: var(--accent); color: var(--accent-contrast); }
.sidebar-footer { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 9px 2px max(2px, var(--app-safe-area-bottom)); border-top: 1px solid var(--border); }
.sidebar-destination { min-height: 44px; display: flex; align-items: center; gap: 13px; padding: 0 13px; border: 0; border-radius: 12px; background: transparent; color: var(--subtle); text-align: left; font-size: 13px; font-weight: 520; }
.sidebar-destination:hover, .sidebar-destination:focus-visible { background: var(--surface-hover); color: var(--text); }
.sidebar-destination svg { width: 18px; height: 18px; flex: 0 0 18px; }
.chat-pin { width: 20px; height: 20px; display: block; flex: 0 0 20px; background: currentColor; color: var(--subtle); -webkit-mask: url("./pin-frame.svg") center / contain no-repeat; mask: url("./pin-frame.svg") center / contain no-repeat; mask-mode: alpha; }
.chat-item.pinned { grid-template-columns: minmax(0, 1fr) 20px; }
.chat-item.pinned:has(.chat-unread-dot) { grid-template-columns: minmax(0, 1fr) 8px 20px; }
#chat-context-root { position: fixed; z-index: 30; inset: 0; pointer-events: none; }
#rename-root { position: fixed; z-index: 35; inset: 0; height: var(--app-height, 100dvh); pointer-events: none; }
.rename-backdrop { position: absolute; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: max(16px, var(--app-safe-area-top)) 16px max(16px, var(--app-safe-area-bottom)); background: rgb(0 0 0 / 42%); pointer-events: auto; animation: ui-fade-in .14s ease-out; }
.rename-dialog { width: min(360px, 100%); padding: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); animation: dialog-in .16s ease-out; }
.rename-heading { margin: 0 0 6px; font-size: 17px; font-weight: 630; letter-spacing: -.025em; }
.rename-help { margin: 0 0 16px; color: var(--subtle); font-size: 12px; line-height: 1.45; }
.rename-input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--border); border-radius: 12px; outline: none; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.rename-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.rename-input[aria-invalid="true"] { border-color: var(--danger, #d34b4b); }
.rename-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.rename-cancel, .rename-save { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-muted); color: var(--text); font: inherit; font-size: 12px; font-weight: 570; }
.rename-save { background: var(--accent); color: var(--accent-contrast); }
.rename-cancel:focus-visible, .rename-save:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-actions-dialog { width: min(380px, 100%); padding: 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); animation: dialog-in .16s ease-out; }
.chat-actions-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 12px; }
.chat-actions-head .rename-heading { margin: 0; }
.chat-actions-close { min-height: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--surface-muted); color: var(--subtle); font: inherit; font-size: 11px; }
.chat-actions-list { display: grid; gap: 3px; }
.chat-action-row { min-height: 43px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: 13px; }
.chat-action-row:hover, .chat-action-row:focus-visible { outline: none; background: var(--surface-muted); }
.chat-action-row.destructive { color: var(--danger, #d34b4b); }
.chat-context-menu { position: absolute; width: 216px; padding: 7px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 12px 34px rgb(0 0 0 / 18%); pointer-events: auto; animation: context-appear .12s ease-out; }
.chat-context-action { width: 100%; min-height: 43px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; font-size: 13px; }
.chat-context-action:hover, .chat-context-action:focus-visible { background: var(--surface-hover); }
.chat-context-action[data-operation="delete"] { color: var(--danger, #d34b4b); }
@keyframes context-appear { from { opacity: 0; transform: translateY(3px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.main { position: relative; height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.chat-top { z-index: 1; flex: 0 0 auto; min-height: calc(64px + var(--app-safe-area-top)); padding: var(--app-safe-area-top) max(clamp(16px, 2.5vw, 30px), var(--app-safe-area-right)) 0 max(clamp(16px, 2.5vw, 30px), var(--app-safe-area-left)); gap: 12px; border-bottom: 0; background: var(--bg); }
.mobile-menu { display: none; }
.current-title { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.top-spacer { flex: 1; }
.top-hint { color: var(--subtle); font-size: 11px; white-space: nowrap; }
.toolbar { display: flex; align-items: center; gap: 5px; }
.chat-top .toolbar { gap: 3px; margin-left: auto; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-muted); }
.toolbar button { min-width: 40px; min-height: 40px; padding: 6px 9px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--subtle); font-size: 12px; }
.toolbar .header-new-chat { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; color: var(--text); font-weight: 570; }
.header-new-chat svg { width: 19px; height: 19px; }
@keyframes ui-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.messages { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 26px max(20px, calc((100% - 800px) / 2)) 20px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; scroll-behavior: auto; }
.empty-state { width: min(680px, 100%); margin: clamp(42px, 12vh, 132px) auto 30px; text-align: center; }
.empty-state h1 { margin: 0 0 10px; font-size: clamp(24px, 4vw, 34px); font-weight: 610; letter-spacing: -.04em; }
.empty-state p { margin: 0 0 26px; color: var(--subtle); font-size: 14px; line-height: 1.55; }
.suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; text-align: left; }
.suggestion { min-width: 0; min-height: 68px; padding: 12px 18px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); text-align: left; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.suggestion:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--surface-hover); }
.suggestion strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; }
.suggestion small { display: block; margin-top: 4px; color: var(--subtle); font-size: 11px; line-height: 1.4; }

.message { display: flex; align-items: flex-start; gap: 10px; max-width: 800px; margin: 0 auto 24px; }
.message.user { justify-content: flex-end; }
.message-main { display: flex; flex: 0 1 auto; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(92%, 700px); }
.message.user .message-main { align-items: flex-end; max-width: min(86%, 680px); }
.message-content { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 15px; line-height: 1.58; }
.message.user .message-content { width: fit-content; max-width: 100%; padding: 10px 16px; border: 0; border-radius: 24px; background: var(--user-bubble); }
.message.assistant .message-content { padding: 3px 0; }
.message-avatar { width: 28px; height: 28px; flex: 0 0 28px; object-fit: cover; border: 1px solid var(--border); border-radius: 50%; }
.message.user .message-avatar { display: none; }
.message > .message-avatar { display: none; }
.pending-stream-text { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.pending-reply .progress-label { color: var(--subtle); }
.message p { margin: 0 0 .7em; }
.message p:last-child { margin-bottom: 0; }
.message pre { max-width: 100%; overflow: auto; padding: 16px 18px; border: 0; border-radius: var(--radius-lg); background: var(--surface-muted); font-size: 12px; }
.message code { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.message pre code { padding: 0; background: transparent; }
.message a { color: var(--accent-strong); text-underline-offset: 2px; }
.message ul, .message ol { padding-left: 23px; }
.message li { padding-left: 2px; margin: 3px 0; }
.message h1, .message h2, .message h3 { margin: 1em 0 .45em; font-size: 1.1em; line-height: 1.35; }
.markdown-table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.markdown-table th, .markdown-table td { padding: 7px 9px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.markdown-table th { background: var(--surface-muted); font-weight: 610; }
.message-artifact { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 10px; }
.message-artifact small { color: var(--subtle); font-size: 11px; }
.telegram-original-status { max-width: min(100%, 340px); padding: 2px 0; font-size: 12px; text-align: left; }
.message-artifact-grid { width: fit-content; max-width: 100%; display: grid; grid-template-columns: repeat(auto-fill, 82px); gap: 8px; }
.message-artifact-thumb { position: relative; display: block; width: 82px; height: 82px; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: var(--surface-muted); color: var(--text); }
.message-artifact-thumb .artifact-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.message-artifact-image-wrap .image-load-state { display: none !important; }
.message-artifact-image-wrap { width: 100%; height: 100%; }
.message-artifact-image-wrap[data-preview-state="loading"]::after { content: ""; position: absolute; inset: 0; display: grid; place-items: center; background: rgb(15 17 22 / 22%); pointer-events: none; }
.message-artifact-image-wrap[data-preview-state="loading"]::before { content: ""; position: absolute; z-index: 1; top: calc(50% - 10px); left: calc(50% - 10px); width: 20px; height: 20px; border: 2px solid rgb(255 255 255 / 42%); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; pointer-events: none; }
.message-artifact-image-wrap.failed .message-artifact-retry { position: absolute; z-index: 2; right: 5px; bottom: 5px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); }
.message-artifact-image-wrap.failed .message-artifact-retry svg { width: 15px; height: 15px; }
.message-file-chip { max-width: min(100%, 280px); padding: 6px 10px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--subtle); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.artifact-image-button { max-width: min(100%, 480px); padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-md); background: var(--surface-muted); }
.artifact-image { display: block; width: auto; max-width: 100%; max-height: 440px; object-fit: contain; }
.image-load-wrap { position: relative; display: block; min-width: 0; }
.image-load-state { display: block; padding: 10px 12px; color: var(--subtle); font-size: 12px; }
.image-load-wrap.failed .image-load-state { color: var(--danger, #b42318); }
.image-load-wrap img { background: var(--surface-muted); }
.image-load-wrap .preview-image { min-height: 96px; }
.preview-retry, .image-load-wrap [data-action="retry-image"] { margin: 6px 0; }
.message-actions { display: flex; align-items: center; gap: 0; width: fit-content; margin-top: 2px; opacity: .82; }
.message:hover .message-actions, .message-actions:focus-within { opacity: 1; }
.message-action { width: 34px; height: 42px; min-width: 34px; min-height: 42px; border-radius: var(--radius-pill); transition: background .14s ease, color .14s ease, transform .14s ease; }
.message-action { color: var(--subtle); }
.message-action:hover, .message-action:focus-visible { background: var(--surface-hover); color: var(--text); }
.message-action:active { transform: scale(.94); }
.message-action svg { width: 18px; height: 18px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.job-notice { max-width: 800px; margin: 10px auto; padding: 11px 17px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--subtle); font-size: 12px; line-height: 1.5; }
.pending-reply { align-items: center; min-height: 40px; color: var(--subtle); }
.pending-reply .message-content.pending-content { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 3px 0; font-size: 13px; }
.pending-reply .progress-row { width: auto; max-width: 100%; min-height: 24px; display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; font-size: 12px; }
.pending-reply .progress-label { flex: 0 1 auto; }
.delivery-state { display: block; margin-top: 4px; color: var(--subtle); font-size: 11px; line-height: 1.4; }
.delivery-error { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--danger); }
.delivery-error button { color: var(--text); }

.message-reply-quote, .reply-preview-quote { min-width: 0; display: grid; gap: 2px; padding: 8px 13px; border: 0; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 9%, var(--surface-muted)); color: var(--subtle); text-align: left; }
.message-reply-quote { max-width: min(100%, 520px); margin: 0 0 8px; }
.reply-thumbnail { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.message-reply-author, .reply-preview-author { overflow: hidden; color: var(--accent-strong); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.message-reply-text, .reply-preview-text { display: -webkit-box; overflow: hidden; color: var(--subtle); font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.message-highlight { border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); transition: background-color .25s ease; }
.reply-preview { min-width: 0; display: flex; align-items: center; gap: 4px; margin: 0 3px 7px; padding: 2px 0 2px 7px; border-left: 2px solid var(--accent); }
.reply-preview[hidden] { display: none; }
.reply-preview-quote { flex: 1 1 auto; min-height: 38px; padding-inline: 13px; border-radius: var(--radius-pill); cursor: pointer; }
.reply-preview-cancel { flex: 0 0 34px; width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
.reply-preview-cancel svg { width: 15px; height: 15px; }

.composer-wrap { z-index: 2; flex: 0 0 auto; padding: 8px 16px max(12px, var(--app-safe-area-bottom)); background: var(--bg); }
.keyboard-open .composer-wrap { padding-bottom: 8px; }
.composer { width: min(850px, 100%); margin: 0 auto; padding: 6px 7px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); box-shadow: none; transition: border-radius .16s ease; }
.composer { position: relative; }
.composer:has(textarea:not(:placeholder-shown)) { border-radius: var(--radius-lg); }
.composer textarea { display: block; flex: 1 1 auto; min-width: 0; width: 100%; min-height: 40px; max-height: min(150px, 28vh); padding: 9px 3px; resize: none; border: 0; outline: 0; background: transparent; font-size: 16px; line-height: 1.42; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 6px; }
.composer textarea:focus { outline: 0; }
.composer-actions { min-width: 0; gap: 8px; padding: 0 1px; }
.attach-button { flex: 0 0 42px; width: 42px; height: 42px; -webkit-appearance: none; appearance: none; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--text); }
.composer-note { flex: 1; min-width: 0; margin-left: 7px; overflow: hidden; color: var(--subtle); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.send-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-contrast); font-weight: 610; transition: background .15s ease, transform .15s ease; }
.send-button:hover:not(:disabled) { background: var(--accent-strong); transform: translateY(-1px); }
.send-button svg { width: 18px; height: 18px; }
#send.send-button { width: 42px; height: 42px; min-width: 42px; min-height: 42px; display: inline-grid; flex: 0 0 42px; place-items: center; gap: 0; padding: 0; border-radius: 50%; }
#send.send-button svg { width: 19px; height: 19px; }
.composer-expand { position: absolute; z-index: 2; top: 8px; right: 9px; width: 38px; height: 38px; min-width: 38px; min-height: 38px; border-radius: 50%; background: var(--surface-hover); color: var(--text); }
.composer-expand[hidden] { display: none; }
.composer-expand svg { width: 17px; height: 17px; }
.progress-row { width: min(850px, 100%); min-height: 36px; display: flex; align-items: center; gap: 9px; margin: 0 auto 7px; color: var(--subtle); font-size: 12px; }
.progress-label { flex: 1; }
.progress-spinner { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.attachment-list { max-width: 100%; display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 2px 7px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: none; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
.attachment-list::-webkit-scrollbar { display: none; }
.attachment-card { position: relative; width: 64px; height: 64px; min-width: 64px; min-height: 64px; max-width: 64px; flex: 0 0 64px; padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: var(--surface-muted); }
.attachment-visual { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: inherit; background: var(--surface-muted); }
.attachment-preview { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: var(--surface); }
.attachment-file-mark { color: var(--subtle); }
.attachment-file-mark svg { width: 26px; height: 26px; }
.attachment-state { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; border-radius: inherit; background: rgb(12 14 19 / 28%); color: white; pointer-events: none; }
.attachment-state-spinner { width: 19px; height: 19px; border: 2px solid rgb(255 255 255 / 44%); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.attachment-state-success { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); font-size: 15px; font-weight: 700; }
.status-failed .attachment-state, .status-cancelled .attachment-state { background: rgb(167 45 45 / 36%); }
.status-failed .attachment-state-success, .status-cancelled .attachment-state-success { background: var(--danger); }
.attachment-remove { position: absolute; z-index: 2; top: 3px; right: 3px; width: 20px; height: 20px; min-width: 20px; min-height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgb(20 22 27 / 72%); color: #fff; font-size: 15px; line-height: 1; }
.attachment-retry { position: absolute; z-index: 2; bottom: 3px; left: 3px; width: 22px; height: 22px; min-width: 22px; min-height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface); color: var(--danger); }
.attachment-retry svg { width: 14px; height: 14px; }
.attachment-chip { max-width: min(100%, 280px); display: flex; align-items: center; gap: 7px; padding: 7px 12px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--subtle); font-size: 11px; }
.attachment-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip button { min-width: 26px; min-height: 26px; border: 0; border-radius: var(--radius-pill); background: transparent; color: inherit; }

.panel-scrim { display: none; touch-action: pan-y; }
#drawer-root { position: absolute; z-index: 20; inset: 0; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgb(8 12 10 / 28%); pointer-events: auto; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(470px, 94vw); min-width: 0; display: flex; flex-direction: column; padding: max(18px, var(--app-safe-area-top)) 18px max(16px, var(--app-safe-area-bottom)); border-left: 0; border-radius: var(--radius-lg) 0 0 var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); pointer-events: auto; }
.drawer-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { min-width: 0; margin: 0; overflow: hidden; font-size: 17px; font-weight: 620; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 14px 2px 6px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.drawer-row, .preset-row, .admin-row { width: 100%; min-width: 0; display: block; margin: 0 0 7px; padding: 13px 17px; border: 0; border-radius: var(--radius-md); background: var(--surface-muted); text-align: left; line-height: 1.4; overflow-wrap: anywhere; }
.drawer-row:hover, .preset-row:hover, .admin-row:hover { background: var(--surface-hover); }
.drawer-row small, .preset-row small { display: block; margin-top: 4px; color: var(--subtle); font-size: 11px; line-height: 1.45; }
.drawer-body > h3 { margin: 20px 2px 9px; color: var(--subtle); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tool-card { min-width: 0; min-height: 76px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); text-align: left; }
.tool-card:hover { background: var(--surface-hover); }
.tool-card-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-muted); color: var(--accent); }
.tool-card-icon svg { width: 17px; height: 17px; }
.tool-card-copy { min-width: 0; display: grid; gap: 4px; }
.tool-card-copy strong { font-size: 12px; font-weight: 610; line-height: 1.35; }
.tool-card-copy small { color: var(--subtle); font-size: 10px; line-height: 1.4; }
.form-field { display: grid; gap: 6px; margin: 0 0 14px; color: var(--subtle); font-size: 12px; }
.form-field input, .form-field textarea, .form-field select { width: 100%; min-height: 44px; padding: 11px 16px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text); }
.form-field input, .form-field textarea, .form-field select { font-size: 16px; }
.form-field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.automation-form { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.automation-field { width: 100%; min-width: 0; }
.automation-field > input, .automation-field > select, .automation-field > textarea { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
.automation-field > select, .automation-field > input { min-height: 48px; }
.automation-field.instruction-field > textarea { min-height: 118px; padding: 14px 16px; border-radius: 20px; }
.settings-note { color: var(--subtle); font-size: 11px; line-height: 1.5; }
.speed-results { display: grid; gap: 10px; }
.speed-result-card { min-width: 0; padding: 14px 18px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); }
.speed-result-card h3 { margin: 0 0 8px; font-size: 14px; }
.speed-result-card .settings-note { overflow-wrap: anywhere; }
.speed-image-slot { display: grid; min-height: 72px; place-items: center; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-hover); }
.speed-sample-image { display: block; width: 100%; max-height: 190px; object-fit: contain; }
.speed-sample-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
.speed-sample-list p { margin: 5px 0 0; font-size: 11px; }
.speed-summary { padding: 12px 17px; border-radius: var(--radius-pill); background: var(--surface-hover); font-size: 12px; line-height: 1.45; }
.speed-report-text { width: 100%; min-height: 220px; margin: 0 0 12px; padding: 18px 20px; border: 0; border-radius: var(--radius-lg); background: var(--surface-muted); color: var(--text); font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.telegram-layout-report { max-height: 60vh; margin: 0; padding: 12px; overflow: auto; border-radius: var(--radius-md); background: var(--surface-muted); color: var(--text); font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.error-note { padding: 10px; color: var(--danger, #bd2635); font-size: 13px; }
.file-row { margin: 0 0 11px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.file-row .drawer-row { margin: 0 0 6px; }
.file-row .toolbar { justify-content: flex-end; flex-wrap: wrap; }
.preview-image { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: var(--radius-md); background: var(--surface-muted); }
.drawer.image-viewer { top: max(8px, var(--app-safe-area-top)); right: max(8px, var(--app-safe-area-right)); bottom: max(8px, var(--app-safe-area-bottom)); left: max(8px, var(--app-safe-area-left)); width: auto; max-height: none; padding: 14px; border: 0; border-radius: var(--radius-lg); background: var(--bg); }
.image-viewer .drawer-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.image-viewer-media { width: 100%; height: min(72vh, 720px); display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-muted); }
.image-viewer-media .preview-image { width: 100%; height: 100%; max-height: 100%; object-fit: contain; transition: transform .18s ease; touch-action: none; user-select: none; -webkit-user-drag: none; cursor: zoom-in; }
.image-viewer-media .preview-image[data-zoomed="true"] { object-fit: contain; transform: scale(1.8); cursor: zoom-out; }
.image-viewer .settings-note { text-align: center; }
.image-viewer [data-action="download-file"] { width: min(440px, 100%); min-height: 46px; text-align: center; background: var(--accent); color: var(--accent-contrast); }
.auth-gate { width: min(440px, calc(100vw - 34px)); margin: max(8vh, 30px) auto 0; padding: 28px 22px; border: 0; border-radius: var(--radius-lg); background: var(--surface-muted); box-shadow: none; text-align: center; }
.auth-icon { width: 68px; height: 68px; display: block; margin: 0 auto 16px; object-fit: cover; border-radius: 50%; }
.auth-gate h1 { margin: 0 0 10px; font-size: 22px; letter-spacing: -.03em; }
.auth-gate p { color: var(--subtle); font-size: 13px; line-height: 1.55; }
.auth-login { width: 100%; min-height: 46px; margin: 12px 0; }
.auth-telegram-link { display: inline-block; margin: 8px 0; color: var(--accent-strong); font-weight: 650; }
.auth-wait { display: block; margin-top: 8px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(82px, calc(var(--app-safe-area-bottom) + 72px)); max-width: calc(100vw - 32px); padding: 11px 18px; transform: translateX(-50%); border-radius: var(--radius-pill); background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: 12px; line-height: 1.45; }
#release-notice-root { position: fixed; z-index: 6; top: calc(var(--app-safe-area-top) + 62px); right: max(12px, var(--app-safe-area-right)); width: min(300px, calc(100vw - 24px)); pointer-events: none; }
.release-update-notice { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 7px 9px 7px 17px; border: 0; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text); box-shadow: var(--shadow); pointer-events: auto; }
.release-update-copy { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.release-update-copy strong { display: block; overflow: hidden; font-size: 12px; font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.release-update-copy span, .release-update-copy small { display: none; }
.release-update-actions { display: flex; align-items: center; gap: 4px; }
.release-update-primary, .release-update-later { min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); font: inherit; font-size: 12px; font-weight: 620; white-space: nowrap; }
.release-update-primary { background: var(--accent); color: var(--accent-contrast); }
.release-update-later { background: transparent; color: var(--subtle); }
.loading-dot { color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .shell { display: block; }
  .main { width: 100%; height: 100%; }
  .sidebar { position: absolute; z-index: 8; inset: 0 auto 0 0; width: min(330px, 88vw); height: 100%; padding-right: 14px; border: 0; border-radius: 0 24px 24px 0; transform: translateX(-100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow); touch-action: pan-y; }
  .shell.sidebar-open .sidebar { transform: translateX(0); }
  .shell.sidebar-open .panel-scrim { position: absolute; z-index: 7; inset: 0; display: block; border: 0; background: rgb(0 0 0 / 30%); transition: opacity .24s ease; }
  .shell.sidebar-dragging .sidebar, .shell.sidebar-dragging .panel-scrim { transition: none !important; }
  .shell.sidebar-dragging .sidebar { will-change: transform; }
  .shell.sidebar-dragging .main { touch-action: pan-y; }
  .chat-top { min-height: calc(54px + var(--app-safe-area-top)); padding: var(--app-safe-area-top) max(11px, var(--app-safe-area-right)) 0 max(11px, var(--app-safe-area-left)); gap: 9px; }
.mobile-menu { display: inline-grid; width: 48px; height: 48px; flex: 0 0 48px; background: var(--surface-muted); color: var(--text); touch-action: pan-y; }
.current-title { display: none; flex: 1 1 auto; }
  .top-spacer { display: none; }
  .chat-top .toolbar { gap: 2px; padding: 3px; }
.toolbar .header-new-chat { min-width: 44px; width: 44px; min-height: 44px; padding: 0; }
  .header-new-chat span { display: none; }
.toolbar button[data-action="chat-actions"] { min-width: 44px; min-height: 44px; padding: 0; }
  .top-hint { display: none; }
  .messages { padding: 18px 14px 14px; }
  .empty-state { margin: clamp(30px, 10vh, 88px) auto 24px; }
  .empty-state p { margin-bottom: 19px; }
  .suggestions { gap: 7px; }
  .suggestion { min-height: 64px; padding: 10px 11px; }
  .message { gap: 8px; margin-bottom: 21px; }
  .message-content { font-size: 14px; }
  .message-action { width: 36px; height: 44px; min-width: 36px; min-height: 44px; }
  .composer-wrap { padding: 6px 12px max(8px, var(--app-safe-area-bottom)); }
  .composer { padding: 6px 7px; }
  .composer textarea { min-height: 40px; max-height: min(132px, 24dvh); }
  .composer-note { display: none; }
  .drawer { top: auto; bottom: 0; width: 100%; max-height: min(86%, calc(var(--app-height) - var(--app-safe-area-top) - 14px)); border: 0; border-bottom: 0; border-radius: 28px 28px 0 0; padding: 18px 18px max(14px, var(--app-safe-area-bottom)); background: var(--surface); }
  .drawer-head { padding-bottom: 10px; }
  .drawer-body { padding-top: 11px; }
  .tools-grid { gap: 7px; }
  .tool-card { min-height: 70px; padding: 10px; gap: 8px; }
  .tool-card-copy small { font-size: 9px; }
}

@media (max-width: 760px) and (pointer: coarse) {
  .main::before { content: ""; position: absolute; z-index: 6; top: calc(64px + var(--app-safe-area-top)); bottom: 72px; left: 0; width: 24px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
  .sidebar::after { content: ""; position: absolute; z-index: 9; top: calc(64px + var(--app-safe-area-top)); right: 0; bottom: 72px; width: 24px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
}

@media (max-width: 380px) {
  .suggestions { grid-template-columns: 1fr; }
  .suggestion { min-height: 56px; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 58px; }
  .chat-top { gap: 6px; padding-inline: 8px; }
}

@media (max-width: 760px) {
  .composer:has(.composer-expand:not([hidden])) textarea { padding-right: 48px; }
  .shell.composer-expanded .composer-wrap {
    position: absolute;
    z-index: 5;
    top: var(--composer-expanded-top, calc(54px + var(--app-safe-area-top)));
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    padding: 8px 12px max(8px, var(--app-safe-area-bottom));
  }
  .shell.composer-expanded .composer {
    width: min(850px, 100%);
    height: 100%;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    border-radius: var(--radius-lg);
  }
  .shell.composer-expanded .composer-actions {
    min-height: 0;
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
  }
  .shell.composer-expanded .composer textarea {
    grid-row: 1;
    grid-column: 1 / -1;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 48px 10px 10px;
    overflow-y: auto;
  }
  .shell.composer-expanded .attach-button { grid-row: 2; grid-column: 1; align-self: center; }
  .shell.composer-expanded #send { grid-row: 2; grid-column: 3; align-self: center; }
}

@media (min-width: 761px) and (max-height: 560px) {
  .sidebar { padding-top: 8px; padding-bottom: 7px; }
  .side-head { padding-bottom: 8px; }
  .search-wrap { margin: 8px 0 5px; }
  .chat-item { min-height: 50px; padding: 7px 10px; }
  .sidebar-footer { padding-top: 5px; }
}

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

.guest-notice { flex: 0 0 auto; padding: 10px 18px; margin: 4px 14px; color: var(--muted); background: var(--surface-muted); border: 0; border-radius: var(--radius-pill); font-size: 12px; text-align: center; }
.guest-notice[hidden] { display: none; }
.guest-mode .composer { opacity: .65; }

/* Shared soft surfaces for tool, admin, settings, and invitation views. */
.drawer-row, .preset-row, .admin-row, .tool-card, .speed-result-card,
.speed-summary, .attachment-card, .auth-gate {
  border-color: transparent;
  border-radius: var(--radius-md);
}
.attachment-chip { border-radius: var(--radius-pill); }
.drawer-row, .preset-row, .admin-row { background: var(--surface-muted); }
.tool-card-icon { border-radius: 50%; }
.attachment-remove, .attachment-chip button { border-radius: var(--radius-pill); }
.message-highlight { border-radius: var(--radius-md); }
.toolbar button:hover, .toolbar button:focus-visible { background: var(--surface-hover); color: var(--text); }
.form-field input, .form-field textarea, .form-field select, .search-wrap input, .speed-report-text {
  border-radius: var(--radius-pill);
}
.automation-field.instruction-field > textarea { border-radius: 20px; }
.send-button:active, .new-chat:active, .icon-button:active, .quiet-button:active { transform: scale(.97); }

/* iOS Safari/WebView can keep :hover latched after a tap. Only paint hover
   surfaces on devices that actually have a precise hover pointer. */
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover, .quiet-button:not(.attach-button):hover { background: var(--surface-hover); color: var(--text); }
}

@media (max-width: 430px) {
  .message-main { max-width: min(94%, 700px); }
  .message.user .message-main { max-width: min(88%, 680px); }
  .message.user .message-content { padding: 9px 15px; border-radius: 23px; }
  .message-actions { opacity: 1; }
  .message-action { width: 36px; min-width: 36px; }
  .sidebar { width: min(360px, 88vw); padding-inline: 14px; background: var(--bg); border-right-color: transparent; }
  .brand { font-size: 18px; }
  .brand-logo { width: 32px; height: 32px; border-radius: 50%; }
  .chat-item { min-height: 51px; padding-inline: 12px; }
  .chat-title { font-size: 15px; }
}
