/* 阿里小可爱AI问答助手 — 暖白、留白与克制的品牌橙。
   首屏聚焦提问，对话页聚焦阅读；共享同一个输入框，避免状态丢失。 */

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

/* 作者样式 display:flex 会覆盖 UA 的 hidden 默认，必须显式压制 */
[hidden] { display: none !important; }

:root {
  --bg: #fcfbf9;
  --panel: #f4f3ef;
  --hover: #eae8e2;
  --line: #e8e6e0;
  --text: #252521;
  --text-2: #62615b;
  --muted: #75736c;
  --bubble: #f4f4f4;
  --accent: #ff6a00;
  --accent-ink: #ad4700;
  --accent-soft: #fff0e5;
  --content-width: 768px;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.layout { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
button, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 4px;
}
button:disabled { cursor: not-allowed; }
.icon-btn svg, .chip svg {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── 侧栏 ── */
.sidebar {
  width: 228px;
  flex-shrink: 0;
  padding: 26px 16px 20px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.brand-sub { padding: 0 8px 22px 27px; margin-top: -7px; font-size: 12px; color: var(--muted); }
.sidebar-collapsed .sidebar { display: none; }
.sidebar-note { margin-top: 24px; padding: 0 10px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.sidebar-note-title { color: var(--text-2); font-weight: 500; }
.sidebar-note p { margin-top: 8px; }

.btn {
  font-family: inherit;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s, color .12s, opacity .12s;
}
.btn.ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-weight: 500;
  text-align: left;
}
.btn.ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.btn.ghost:disabled, .topbar-new:disabled { opacity: .4; cursor: not-allowed; }
.btn .icon { width: 15px; height: 15px; flex-shrink: 0; }

/* 售前指南入口：指向 /guide（知识库里版本日期最新的那份 HTML） */
.guide-link {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); text-decoration: none;
}
.guide-link:hover { background: var(--hover); }
.guide-link .icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-2); }
.guide-link-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.guide-link-title { font-size: 13.5px; }
.guide-link-hint { font-size: 11px; color: var(--muted); }
.guide-link-arrow { width: 13px; height: 13px; flex-shrink: 0; margin-left: auto; color: var(--muted); }
.guide-link:hover .guide-link-arrow { color: var(--text-2); }

.tips { max-width: var(--content-width); margin: 26px auto 0; }
.tips-title { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.suggestion-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px) { .suggestion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: inherit;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 14px;
  padding: 15px 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip > span { min-width: 0; }
.chip strong { display: block; color: var(--text); font-size: 13px; font-weight: 500; }
.chip small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.chip .chip-arrow { margin-left: auto; color: var(--muted); font-size: 16px; }
.chip:hover { background: #fff; border-color: #cdc8be; }
.chip:hover svg, .chip:hover .chip-arrow { color: var(--accent-ink); }

.foot {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.foot-label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 12px; }

/* ── 主区 ── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  min-height: 68px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 28px;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* 窄屏侧栏整体隐藏，指南入口改由顶栏图标承接 */
.topbar-guide { display: none; }
.topbar-title { font-size: 14px; font-weight: 500; white-space: nowrap; }
.topbar-sub { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); font-size: 12px; font-weight: 400; color: var(--muted); }
.icon-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); }
.topbar-new { display: none; align-items: center; gap: 6px; padding: 8px 12px; min-height: 40px; background: transparent; color: var(--text-2); }
.topbar-new:hover:not(:disabled) { background: var(--hover); }
.sidebar-collapsed .topbar-new { display: inline-flex; }
.workspace { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.workspace.is-empty { overflow-y: auto; }
.workspace.is-empty .composer-wrap { margin-bottom: auto; padding-bottom: 36px; }

.chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 32px 24px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.chat.is-empty { flex: none; overflow: visible; margin-top: auto; padding: 36px 24px 28px; }

.chat::-webkit-scrollbar { width: 10px; }
.chat::-webkit-scrollbar-thumb {
  background: #e3e3e3;
  border-radius: 999px;
  border: 3px solid var(--bg);
}
.chat::-webkit-scrollbar-thumb:hover { background: #d0d0d0; }

.msg {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
}
.msg.user { justify-content: flex-end; }

/* 极简：不显示头像，靠对齐与底色区分角色 */
.avatar { display: none; }

.bubble-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
/* 助手正文撑满 768 内容列，与上方来源、下方反馈左右对齐 */
.msg.bot .bubble-wrap { width: 100%; }
.msg.user .bubble-wrap { align-items: flex-end; max-width: 82%; }

.bubble { font-size: 15px; line-height: 1.75; word-break: break-word; }
.msg.user .bubble {
  background: var(--bubble);
  border-radius: 20px;
  padding: 10px 16px;
  white-space: pre-wrap;
}
.msg.bot .bubble { padding: 0; }

/* 空态首屏：居中大标题 */
.msg.welcome .bubble-wrap { align-items: center; width: 100%; }
.msg.welcome .bubble { text-align: center; }
.welcome-mark {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin: 0 auto 20px;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 16px;
}
.welcome-mark svg { width: 28px; height: 28px; }
.msg.welcome h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -.8px;
  line-height: 1.35;
  margin: 0 0 12px;
}
.msg.welcome p {
  font-size: 15px;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
}

/* ── 思考过程（流式展开，正文开始后自动收起） ── */
.think { font-size: 13px; color: var(--muted); }
.think summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color .12s;
}
.think summary::-webkit-details-marker { display: none; }
.think summary:hover { color: var(--text-2); }
.think summary::before {
  content: "";
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s;
  flex-shrink: 0;
}
.think[open] summary::before { transform: rotate(45deg); }
.think-body {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 6px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--line);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Markdown 内容 ── */
.bubble p { margin: 0 0 12px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble strong { font-weight: 600; }
.bubble h1, .bubble h2, .bubble h3, .bubble h4 {
  font-weight: 600;
  line-height: 1.4;
  margin: 22px 0 8px;
}
.bubble h1 { font-size: 19px; }
.bubble h2 { font-size: 17px; }
.bubble h3 { font-size: 15.5px; }
.bubble h4 { font-size: 15px; }
.bubble > *:first-child { margin-top: 0; }
.bubble ul, .bubble ol { padding-left: 22px; margin: 8px 0 12px; }
.bubble li { margin: 3px 0; }
.bubble hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.bubble a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #c9c9c9;
  text-underline-offset: 2px;
}
.bubble a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.bubble blockquote {
  border-left: 2px solid #dcdcdc;
  padding-left: 14px;
  color: var(--text-2);
  margin: 10px 0;
}

.bubble code {
  background: #f2f2f2;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bubble pre {
  background: #0d0d0d;
  color: #ececec;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.6;
}
.bubble pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* 价格表窄屏横向滚动，避免 6 列被压缩成逐字折行（Reg ion / $1.8 37） */
.bubble table {
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13.5px;
  display: block;
  width: fit-content;
  overflow-x: auto;
  max-width: 100%;
}
.bubble th, .bubble td {
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  white-space: nowrap; /* 数据单元格单行，避免逐字折行 */
}
.bubble th {
  background: #fafafa;
  font-weight: 600;
  text-align: left;
  white-space: normal;
  /* 不继承 .bubble 的 break-word：否则窄屏列宽被压到 60px 时表头逐字折行（Inpu/t）*/
  word-break: normal;
  overflow-wrap: normal;
  /* 给列宽设下限，窄屏改为表格内部横滑而不是无限压缩 */
  min-width: 76px;
}

.cursor {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── 来源引用 ── */
.sources { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; }
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f4f4f4;
  color: var(--text-2);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .12s;
}
.source-chip:hover { background: #e9e9e9; }
.source-chip.official { background: #f1f7f3; color: #3f6b52; }
.source-chip.official:hover { background: #e7f1eb; }
.source-chip.web { background: #f2f5f9; color: #45566c; }
.source-chip.web:hover { background: #e8edf4; }

.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f7f3;
  color: #3f6b52;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 500;
}

.price-badge-warn {
  background: #fdf3e7;
  color: #9a5b12;
}

/* ── 反馈区 ── */
.feedback {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.fb-note { margin-right: 6px; }
.fb-btn {
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: .5;
  transition: opacity .12s, background .12s;
}
.fb-btn:hover { background: var(--hover); opacity: 1; }
.fb-btn.active-up, .fb-btn.active-down { background: var(--hover); opacity: 1; }

.fb-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border-radius: 12px;
  padding: 12px 14px;
}
.fb-panel .fb-title { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.fb-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-reason {
  font-family: inherit;
  border: 1px solid #e2e2e2;
  background: #fff;
  color: var(--text-2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.fb-reason:hover { border-color: #c9c9c9; }
.fb-reason.selected { background: var(--text); border-color: var(--text); color: #fff; }
.fb-panel textarea {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 56px;
  outline: none;
  transition: border-color .12s;
}
.fb-panel textarea:focus { border-color: #c9c9c9; }
.fb-submit {
  align-self: flex-start;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12.5px;
  cursor: pointer;
  transition: opacity .12s;
}
.fb-submit:hover { opacity: .85; }

/* ── 输入区 ── */
.composer-wrap { flex-shrink: 0; position: relative; padding: 14px 24px max(14px, env(safe-area-inset-bottom)); background: var(--bg); }

/* 上翻阅读时的回到底部入口（流式输出不再强拽滚动条） */
.jump-latest {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  border: 1px solid #e2dccd;
  background: #fff;
  color: #6b5a3e;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(60, 50, 30, 0.12);
}
.jump-latest:hover { background: #faf6ee; }

.status-bar {
  display: flex;
  align-items: center;
  max-width: var(--content-width);
  margin: 0 auto 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.status-bar .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  flex-shrink: 0;
  animation: pulse 1.1s infinite;
}
@keyframes pulse { 50% { opacity: .3; } }

.composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 14px 10px;
  background: #fff;
  border: 1px solid #dcd8ce;
  border-radius: 22px;
  box-shadow: 0 4px 20px rgba(45, 38, 20, .04);
  transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within {
  border-color: #cf8c59;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, .06), 0 4px 20px rgba(45, 38, 20, .04);
}
.composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-btns { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.input-hint { padding-left: 6px; font-size: 11.5px; color: var(--muted); }
.composer textarea {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: none;
  outline: none;
  background: transparent;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  resize: none;
  max-height: min(176px, 28dvh);
  overflow-y: auto;
}
.composer textarea::placeholder { color: var(--muted); }

.send-btn {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 13px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  transition: opacity .12s, background .12s;
}
.send-btn svg { width: 19px; height: 19px; }
.send-btn:hover:not(:disabled) { background: var(--accent-ink); }
.send-btn:disabled { background: #eeece6; color: #929087; cursor: not-allowed; opacity: 1; }

/* 停止生成：仅流式期间出现，暖红区分于发送 */
.stop-btn { background: #c0392b; }
.stop-btn:hover:not(:disabled) { background: #a12f24; }

.queue-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: var(--content-width);
  margin: 0 auto 8px;
  padding: 6px 12px;
  border: 1px dashed #dfd7c6;
  border-radius: 12px;
  background: #fbf8f2;
  font-size: 12.5px;
  color: var(--text-2);
}
.queue-bar .queue-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-clear {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 2px 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-ink);
  cursor: pointer;
}
.queue-clear:hover { text-decoration: underline; }

.stop-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.disclaimer {
  max-width: var(--content-width);
  margin: 12px auto 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}

.error-text { color: #c0392b; font-size: 13.5px; }

/* ── 移动端 ── */
@media (max-width: 820px) {
  .sidebar, #sidebarToggle { display: none; }
  .topbar { min-height: 60px; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar-new { display: inline-flex; min-height: 44px; }
  .topbar-guide { display: flex; width: 44px; height: 44px; }
  .topbar-title { font-size: 15px; }
  .topbar-sub { display: none; }
  .chat { padding: 20px 16px 8px; gap: 22px; }
  .chat.is-empty { padding: 28px 20px 24px; }
  .composer-wrap { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
  .workspace.is-empty .composer-wrap { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .composer { padding: 12px 12px 10px; border-radius: 20px; }
  .input-hint { font-size: 11px; }
  .input-hint span { display: none; }
  .send-btn { width: 44px; height: 44px; }
  .msg.user .bubble-wrap { max-width: 88%; }
  .msg.welcome h1 { font-size: 28px; letter-spacing: -.4px; }
  .msg.welcome p { font-size: 14px; }
  .welcome-mark { width: 44px; height: 44px; margin-bottom: 16px; }
  .tips { margin-top: 22px; }
  .chip { gap: 9px; padding: 13px 12px; }
  .chip small { font-size: 11px; }
  .chip .chip-arrow { display: none; }
  .source-chip { max-width: 100%; }
  .price-badge { white-space: normal; }
  /* 窄屏不做 min-width 下限，靠 nowrap + 横滑保证表头不被压碎 */
  .bubble th { min-width: 0; white-space: nowrap; }
}

@media (max-width: 380px) {
  .chip svg { display: none; }
  .chip { padding: 12px 10px; }
  .disclaimer { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── 截图上传（qwen3.8-max 视觉输入）── */
.attach-btn {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dcd8ce;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.attach-btn svg { width: 18px; height: 18px; }
.attach-btn:hover { color: var(--accent-ink); border-color: #cf8c59; background: rgba(255, 106, 0, .05); }

/* ── 语音输入（qwen-audio-3.1-asr-flash）── */
.mic-btn {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dcd8ce;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.mic-btn svg { width: 18px; height: 18px; }
.mic-btn:hover { color: var(--accent-ink); border-color: #cf8c59; background: rgba(255, 106, 0, .05); }
.mic-btn.recording {
  color: #fff;
  background: #f07a24;
  border-color: #f07a24;
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 122, 36, .45); }
  50% { box-shadow: 0 0 0 7px rgba(240, 122, 36, 0); }
}
.mic-btn.busy { color: var(--muted); cursor: wait; }
.mic-note {
  font-size: 12px;
  color: var(--muted);
  align-self: center;
  margin-right: 8px;
}
.mic-note.rec { color: #cf6a1e; }

.attach-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: var(--content-width);
  margin: 0 auto 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px dashed #dcd8ce;
  border-radius: 16px;
}
.attach-item { position: relative; width: 64px; height: 64px; }
.attach-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #dcd8ce;
}
.attach-remove {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.attach-remove:hover { background: rgba(0, 0, 0, .8); }

.msg-images {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.msg-images img {
  max-width: 180px;
  max-height: 140px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .08);
  cursor: zoom-in;
}
