/* styles.css — 温柔治愈暖色 · 魅魔雅儿贝德情感聊伴原型 */
:root {
  /* 主色：酒红/玫瑰 + 琥珀点缀，奶油暖底（避免"紫渐变白"俗套） */
  --primary: #c23b57;
  --primary-hover: #a92f49;
  --amber: #d08a2f;
  --rose: #d58aa8;
  --mauve: #c9a2c7;

  --bg-1: #fdf2ec;
  --bg-2: #fbe9f2;
  --surface: #fffdfb;
  --surface-2: #fff6f1;
  --border: #f0dfda;
  --border-soft: #f6e8e3;
  --text: #3a2e33;
  --text-sub: #a98d96;
  --text-faint: #cdb3bc;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(160,90,60,.08);
  --shadow-md: 0 8px 24px rgba(190,95,120,.12);
  --shadow-lg: 0 16px 48px rgba(160,80,100,.16);

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 8% -8%, rgba(214,138,168,.22), transparent 60%),
    radial-gradient(1000px 700px at 110% 115%, rgba(217,154,140,.20), transparent 55%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  position: relative;
  overflow: hidden;
}

/* 装饰性机体外框（SVG 层，仅勾勒手机轮廓，不遮挡 UI） */
.dev-bezel {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  transition: opacity .4s ease;
}
body[data-phone="off"] .dev-bezel { opacity: 0; }
.dev-bezel::before {
  content: ""; position: absolute; inset: 14px; border-radius: 34px;
  border: 3px solid rgba(213,138,168,.5);
  box-shadow: 0 0 0 1px rgba(213,138,168,.22), var(--shadow-lg);
  pointer-events: none;
}
.dev-bezel::after {
  content: ""; position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 20px; border-radius: 10px;
  background: rgba(213,138,168,.3);
  pointer-events: none;
}

.stage {
  position: relative; z-index: 1;
  max-width: 1260px; margin: 0 auto;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: 22px 26px 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  gap: 16px;
}

/* ---------- 顶部 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-dot {
  width: 46px; height: 46px; border-radius: 15px;
  background: radial-gradient(circle at 30% 25%, #ef8aa4, var(--primary) 70%);
  box-shadow: var(--shadow-md);
  position: relative;
}
.brand-dot::after {
  content: ""; position: absolute; inset: 10px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.85);
  clip-path: polygon(50% 0, 100% 38%, 78% 100%, 22% 100%, 0 38%);
}
.brand-text h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.brand-text h1 em { font-style: normal; color: var(--primary); font-weight: 600; font-size: 14px; margin-left: 6px; }
.brand-text p { margin: 2px 0 0; font-size: 12px; color: var(--text-sub); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.frame-toggle {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 12px; color: var(--text-sub);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; user-select: none;
  transition: .25s;
}
.frame-toggle:hover { border-color: var(--rose); color: var(--primary); }
.frame-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.frame-toggle span { position: relative; padding-left: 22px; }
.frame-toggle span::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 34px; height: 18px; border-radius: 10px;
  background: var(--border); transition: .25s;
}
.frame-toggle span::after {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: .25s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.frame-toggle input:checked + span::before { background: var(--primary); }
.frame-toggle input:checked + span::after { left: 19px; }

/* ---------- 图标按钮 ---------- */
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-sub); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  transition: .2s; position: relative;
}
.icon-btn:hover { background: var(--surface); border-color: var(--border); color: var(--primary); box-shadow: var(--shadow-sm); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.has-dot::after { content: ""; position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2px var(--bg-1); }
.icon-btn[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; top: 110%; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; z-index: 30;
}
.ic { display: block; }

/* ---------- 三栏 ---------- */
.app {
  flex: 1; min-height: 0;
  position: relative;
  display: grid; grid-template-columns: 292px minmax(0, 1fr);
  gap: 14px;
}
.col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
}
.col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
}
.col-head h2 { margin: 0; font-size: 16px; font-weight: 700; }

/* 左栏 */
.conv-list { list-style: none; margin: 0; padding: 0 10px 12px; overflow-y: auto; flex: 1; }
.conv-search {
  margin: 8px 10px 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 12.5px; color: var(--text); outline: none; transition: .2s;
}
.conv-search:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(213,138,168,.12); }
.conv-search::placeholder { color: var(--text-faint); }
.conv {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px; border-radius: var(--r-md);
  cursor: pointer; transition: .18s; position: relative;
}
.conv:hover { background: var(--surface-2); }
.conv.active { background: linear-gradient(135deg, rgba(194,59,87,.10), rgba(217,138,47,.06)); }
.conv.active::before { content: ""; position: absolute; left: 0; top: 22%; height: 56%; width: 3px; border-radius: 3px; background: var(--primary); }
.ava {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: #fff; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3);
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.conv-main { min-width: 0; flex: 1; }
.conv-top, .conv-btm { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conv-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.conv .pin { color: var(--amber); display: inline-flex; }
.conv-time { font-size: 11px; color: var(--text-faint); flex: none; }
.conv-last { font-size: 12px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-status { font-size: 11px; color: var(--rose); flex: none; }
.badge {
  background: var(--primary); color: #fff; font-size: 10px;
  min-width: 17px; height: 17px; line-height: 17px; text-align: center;
  border-radius: 9px; padding: 0 5px; flex: none;
}

/* 中栏：聊天区 */
.col-chat { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--border-soft);
}
.chat-head-ava .ava { width: 42px; height: 42px; }
.chat-head-mid { flex: 1; min-width: 0; }
.chat-name { font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.chat-name .vip { color: var(--primary); display: inline-flex; }
.chat-online { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #c9b6be; }
.dot.on { background: #4cae82; box-shadow: 0 0 0 3px rgba(76,174,130,.15); }
.chat-head-acts { display: flex; gap: 4px; }
.more-wrap { position: relative; }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 176px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
  display: none;
}
.more-menu.open { display: block; }
.more-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border: 0; background: none; cursor: pointer;
  font-size: 13px; color: var(--text); border-radius: 8px; text-align: left;
  transition: background .15s, color .15s;
}
.more-menu button:hover { background: var(--surface-2); color: var(--primary); }
.more-menu button .ic { flex: none; }

.chat-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 20px 20px 8px;
  scroll-behavior: smooth;
}
.bubble.intros {
  background: rgba(213,138,168,.10);
  border: 1px dashed var(--rose);
  color: var(--text-sub); font-size: 12.5px; line-height: 1.7;
  margin: 0 auto 18px; padding: 10px 14px; border-radius: var(--r-md); max-width: 86%;
}

.msg { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-end; animation: rise .35s ease both; }
.msg.right { flex-direction: row-reverse; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-ava { flex: none; }
.msg-ava .ava { width: 34px; height: 34px; font-size: 13px; }
.msg-ava .ic { color: var(--rose); }
.msg-main { max-width: 76%; display: flex; flex-direction: column; }
.bubble a { color: var(--primary); text-decoration: underline; word-break: break-all; }
.retry-btn {
  margin-top: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--primary); font-size: 12.5px; cursor: pointer; transition: .2s;
}
.retry-btn:hover { border-color: var(--primary); background: var(--primary); color: #fff; }
.msg.right .msg-main { align-items: flex-end; }

.bubble {
  padding: 10px 14px; border-radius: var(--r-lg);
  font-size: 14px; line-height: 1.65;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}
.bubble.text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
  color: var(--text);
}
.msg.right .bubble.text {
  background: linear-gradient(135deg, var(--primary), #d24f6d);
  color: #fff; border: none;
  border-bottom-right-radius: 6px; border-bottom-left-radius: var(--r-lg);
}
.msg-time { font-size: 10.5px; color: var(--text-faint); margin-top: 5px; padding: 0 3px; display: flex; align-items: center; gap: 3px; }
.ticks { color: #d8c7cd; display: inline-flex; align-items: center; margin-right: 1px; }
.ticks.delivered { color: #9aa7b0; }
.ticks.read { color: #5aa9d6; }
.ticks .ic { width: 12px; height: 12px; }

/* 富文本气泡 */
.bubble.rich {
  background: var(--surface);
  border: 1px solid #f4d9dd;
  width: 100%;
}
.bubble.rich h4 { margin: 0 0 8px; font-size: 14px; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.bubble.rich > div { font-size: 13.5px; padding: 2px 0; }
.bubble.rich strong { color: var(--text); font-weight: 700; }
.bubble.rich ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-sub); }
.bubble.rich li { margin: 3px 0; }

/* 代码块（高亮预置配色） */
.bubble.code {
  background: #2b2328; padding: 0; overflow: hidden; width: 100%;
  border-radius: var(--r-md);
}
.code-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: rgba(255,255,255,.06);
}
.c-dot { width: 10px; height: 10px; border-radius: 50%; }
.c1 { background: #ff7b72; } .c2 { background: #ffdf5d; } .c3 { background: #6ee78a; }
.lang { margin-left: auto; font-size: 11px; color: #c9a2c7; font-family: var(--mono); }
.bubble.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.bubble.code code { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: #f6d9e3; }

/* 流式打字 */
.bubble.stream .caret { display: inline-block; width: 2px; height: 1em; background: var(--primary); vertical-align: -2px; margin-left: 1px; animation: blink .7s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 推理型模型：思考中占位 */
.think { font-size: 12.5px; color: var(--text-sub); font-style: italic; }
.typing.mini { display: inline-flex; gap: 4px; padding: 0 0 0 8px; vertical-align: middle; }
.typing.mini span { width: 5px; height: 5px; }

/* 打字/加载三点 */
.typing, .loading-line { display: flex; gap: 6px; padding: 12px 15px; align-items: center; }
.typing span, .loading-line span { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); animation: pulse 1.2s ease-in-out infinite; }
.typing span:nth-child(2), .loading-line span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3), .loading-line span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%,80%,100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.loading-line { justify-content: center; padding: 40px; }

/* 输入区 */
.chat-input { padding: 12px 16px 14px; border-top: 1px solid var(--border-soft); background: var(--surface); }
.input-rail {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 8px 10px;
  transition: border-color .2s, box-shadow .2s;
}
.input-rail:focus-within { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(213,138,168,.12); }
#inputBox {
  flex: 1; resize: none; border: none; background: transparent;
  font-family: inherit; font-size: 14px; line-height: 1.5; color: var(--text);
  max-height: 132px; outline: none; padding: 7px 2px;
}
#inputBox::placeholder { color: var(--text-faint); }
.send-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #dd4f6c); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: .25s; box-shadow: var(--shadow-sm); flex: none;
}
.send-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.send-btn:disabled { background: var(--border); color: #fff; cursor: not-allowed; transform: none; box-shadow: none; }

/* 右栏：话题面板（滑入抽屉，覆盖在聊天区右侧，不挤占布局） */
.col-right {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 268px; z-index: 45;
  box-shadow: -8px 0 30px rgba(160,80,100,.12);
  transform: translateX(calc(100% + 14px));
  opacity: 0; pointer-events: none;
  transition: transform .32s cubic-bezier(.4,0,.2,1), opacity .25s ease;
}
.col-right.open {
  transform: translateX(0); opacity: 1; pointer-events: auto;
}
.col-right.open .fold-btn { transform: rotate(180deg); }
.topic-body { padding: 0 16px 16px; overflow-y: auto; flex: 1; }
.topic-hint { font-size: 12px; color: var(--text-sub); margin: 0 2px 12px; line-height: 1.6; }
.topic-grid { display: flex; flex-direction: column; gap: 9px; }
.topic {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: var(--r-md); padding: 10px 12px; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--text);
  text-align: left; transition: .2s;
}
.topic .ic { color: var(--rose); flex: none; }
.topic:hover { border-color: var(--rose); background: #fff; transform: translateX(-2px); box-shadow: var(--shadow-sm); color: var(--primary); }
.topic:active { transform: translateX(-1px) scale(.99); }

/* 折叠按钮 */
.fold-btn {
  width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-sub); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: .3s;
}
.fold-btn:hover { color: var(--primary); border-color: var(--rose); }

/* 占位 toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 16px);
  background: var(--text); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-lg);
  opacity: 0; transition: .3s; z-index: 99; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 部署版新增：返回/新对话/删除/空态 ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-sub); text-decoration: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); transition: .3s; margin-right: 6px;
}
.back-link:hover { color: var(--primary); border-color: var(--rose); }
.back-link .ic { font-size: 13px; }

.new-conv-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  margin: 0 14px 12px; padding: 11px 0; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--mauve));
  border: none; border-radius: var(--r-md); cursor: pointer;
  box-shadow: var(--shadow-md); transition: .3s; font-family: var(--font);
}
.new-conv-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.new-conv-btn:active { transform: translateY(0); }
.new-conv-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.conv-item { position: relative; }
.conv-item .del {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%) scale(.9);
  width: 24px; height: 24px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--text-faint); font-size: 15px; line-height: 1;
  opacity: 0; transition: .25s;
}
.conv-item:hover .del { opacity: 1; }
.conv-item .del:hover { color: var(--primary); background: var(--surface-2); }

.empty-state {
  padding: 40px 20px; text-align: center; color: var(--text-faint);
  font-size: 13.5px; line-height: 1.8;
}
.empty-state .big { font-size: 34px; margin-bottom: 8px; }

/* ---------- 移动端会话抽屉：菜单按钮 / 关闭按钮 / 遮罩 ---------- */
.menu-btn {
  display: none;
  width: 38px; height: 38px; border-radius: 12px; border: none;
  background: transparent; color: var(--text-sub); cursor: pointer;
  align-items: center; justify-content: center; transition: .2s; flex: none;
}
.menu-btn:hover { background: var(--surface); color: var(--primary); }
.drawer-close {
  display: none; width: 32px; height: 32px; border-radius: 10px; border: none;
  background: transparent; color: var(--text-sub); font-size: 22px; line-height: 1;
  cursor: pointer; align-items: center; justify-content: center; transition: .2s;
}
.drawer-close:hover { color: var(--primary); background: var(--surface-2); }
.drawer-mask {
  position: absolute; inset: 0; z-index: 48;
  background: rgba(58,46,51,.40);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }

/* ---------- 滚动条（桌面细滑，贴合暖色主题） ---------- */
.conv-list::-webkit-scrollbar, .chat-body::-webkit-scrollbar, .topic-body::-webkit-scrollbar { width: 6px; }
.conv-list::-webkit-scrollbar-thumb, .chat-body::-webkit-scrollbar-thumb, .topic-body::-webkit-scrollbar-thumb {
  background: #e9d3da; border-radius: 3px;
}
.conv-list::-webkit-scrollbar-thumb:hover, .chat-body::-webkit-scrollbar-thumb:hover, .topic-body::-webkit-scrollbar-thumb:hover { background: var(--rose); }

/* ---------- 响应式：手机（≤720px） ---------- */
@media (max-width: 720px) {
  /* 装饰机身框在小屏关闭，避免遮挡与性能损耗 */
  .dev-bezel { opacity: 0 !important; }

  .stage { padding: 10px 10px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); gap: 10px; }

  /* 顶栏压缩 */
  .topbar { padding: 2px 2px; }
  .brand-dot { width: 38px; height: 38px; border-radius: 12px; }
  .brand-dot::after { inset: 8px 10px; }
  .brand-text h1 { font-size: 17px; }
  .brand-text p { display: none; }
  .frame-toggle { display: none; }
  .back-link { padding: 5px 10px; font-size: 12px; margin-right: 4px; }
  .menu-btn { display: inline-flex; }

  .app { grid-template-columns: 1fr; grid-template-rows: 1fr; }

  /* 会话列表：左侧滑出抽屉 */
  .col-left {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: min(86vw, 340px); z-index: 50;
    border-radius: 0 16px 16px 0;
    transform: translateX(-104%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    box-shadow: 8px 0 30px rgba(160,80,100,.22);
  }
  .col-left.open { transform: translateX(0); }
  .drawer-close { display: inline-flex; }
  .drawer-mask { display: block; }

  /* 话题面板：右侧抽屉适配窄屏 */
  .col-right { width: min(84vw, 300px); }

  /* 聊天区微调 */
  .chat-body { padding: 14px 12px 6px; }
  .chat-head { padding: 10px 12px; }
  .chat-head-ava .ava { width: 38px; height: 38px; }
  .msg { gap: 8px; margin-bottom: 14px; }
  .msg-ava .ava { width: 30px; height: 30px; }
  .msg-main { max-width: 84%; }
  .bubble { padding: 9px 12px; font-size: 14.5px; }
  .bubble.intros { max-width: 94%; }

  /* 输入区 */
  .chat-input { padding: 8px 8px 10px; }
  .input-rail { padding: 6px 8px; }
  #inputBox { font-size: 15px; padding: 6px 2px; }
  .send-btn { width: 36px; height: 36px; }
  .icon-btn.sm { width: 34px; height: 34px; }

  /* 话题以两列平铺，更方便点击 */
  .topic-body { padding: 0 12px 12px; }
  .topic-grid { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .topic { flex: 1 1 46%; min-width: 0; padding: 9px 10px; }
}

/* ---------- 响应式：超小屏（≤380px，极窄手机） ---------- */
@media (max-width: 380px) {
  #attachBtn, #micBtn { display: none; }
  .col-left { width: 92vw; }
  .msg-main { max-width: 90%; }
}