/* ============================================================
   仿 QQ 手机端界面样式
   ============================================================ */
:root {
  --qq-blue: #12b7f5;
  --qq-blue-deep: #0a8fd4;
  --qq-green: #95ec69;
  --bg-list: #ededed;
  --bg-page: #f7f7f7;
  --text-main: #0c0c0c;
  --text-sub: #8a8a8a;
  --line: #e2e2e2;
  --danger: #ff3b30;
  --gold: #f7c56b;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #d5dde3;
  color: var(--text-main);
  font-size: 15px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- 手机外壳 ---------- */
.phone {
  position: relative;
  height: 100vh;
  height: 100dvh; /* iOS Safari：动态视口，自动排除浏览器工具栏，避免底部空白 */
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-list);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, .18);
}
/* 大屏（网页版）显示手机壳居中；小屏（手机浏览器）全宽自适应 */
@media (min-width: 560px) {
  body { padding: 0; }
  .phone { height: 100vh; height: 100dvh; max-width: 460px; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
}
@media (max-width: 559px) {
  .phone { max-width: 100%; box-shadow: none; }
}
.screen { position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-list); }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg-list); }
.view.hidden { display: none; }

/* ---------- 通用 ---------- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
  flex-shrink: 0;
  display: block;
}
.avatar.square { border-radius: 22%; }
.press { transition: transform .08s; cursor: pointer; }
.press:active { transform: scale(.96); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 顶部导航 ---------- */
.navbar {
  display: flex; align-items: center;
  /* iOS Safari 普通标签页 env(safe-area-inset-top)=0（兜底值不会生效），
     用 max() 保证至少 40px：状态栏/灵动岛永不遮挡 */
  padding-top: max(40px, env(safe-area-inset-top, 0px));
  height: calc(52px + max(40px, env(safe-area-inset-top, 0px)));
  padding-left: 12px; padding-right: 12px;
  background: linear-gradient(180deg, #1ab9f9, #0f9fe8);
  color: #fff; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  position: relative; z-index: 5;
}
.navbar .nb-avatar { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.55); margin-right: 10px; }
.navbar .nb-title { flex: 1; font-size: 17px; font-weight: 600; }
.navbar .nb-title small { display: block; font-size: 11px; font-weight: 400; opacity: .85; }
.navbar .nb-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-left: 6px; border-radius: 6px; }
.navbar .nb-btn:active { background: rgba(255,255,255,.18); }

/* ---------- 底部 Tab ---------- */
.tabbar {
  display: flex; height: 54px; background: #fafafa; border-top: 1px solid var(--line);
  flex-shrink: 0; position: relative; z-index: 5;
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #999; font-size: 11px; gap: 3px; cursor: pointer;
}
.tabbar .tab .t-ico { font-size: 21px; line-height: 1; }
.tabbar .tab.active { color: var(--qq-blue); }

/* ---------- 搜索栏 ---------- */
.searchbar { padding: 8px 12px; background: var(--bg-list); flex-shrink: 0; }
.searchbar .sb {
  background: #fff; border-radius: 8px; padding: 7px 12px; color: #b2b2b2; font-size: 14px;
  display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* ---------- 会话列表 ---------- */
.conv-list { flex: 1; overflow-y: auto; background: #fff; }
.conv-list::-webkit-scrollbar { width: 0; }
.conv-item {
  display: flex; align-items: center; padding: 12px 14px; cursor: pointer; position: relative;
  border-bottom: 1px solid #f2f2f2; background: #fff;
}
.conv-item:active { background: #f4f4f4; }
.conv-item .ci-avatar { width: 48px; height: 48px; margin-right: 12px; position: relative; }
.conv-item .ci-main { flex: 1; min-width: 0; }
.conv-item .ci-top { display: flex; justify-content: space-between; align-items: baseline; }
.conv-item .ci-name { font-size: 16px; font-weight: 500; }
.conv-item .ci-time { font-size: 12px; color: #b0b0b0; flex-shrink: 0; margin-left: 8px; }
.conv-item .ci-preview { font-size: 13px; color: #999; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.conv-item .ci-preview .dot { width: 6px; height: 6px; background: #ff3b30; border-radius: 50%; flex-shrink: 0; }
.empty-tip { text-align: center; color: #b5b5b5; padding: 80px 20px; font-size: 14px; line-height: 2; }
.empty-tip .big { font-size: 52px; margin-bottom: 12px; }

/* ---------- 聊天窗口 ---------- */
.chat-body {
  flex: 1; overflow-y: auto; padding: 14px 12px 8px;
  background: url(/assets/img/theme/chat_bg.webp) center/cover no-repeat fixed;
}
.chat-empty-state { text-align: center; padding-top: 56px; color: #777; font-size: 13px; text-shadow: 0 1px 2px rgba(255,255,255,.8); }
.chat-empty-state img { width: 170px; margin-bottom: 14px; border-radius: 18px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.chat-body::-webkit-scrollbar { width: 0; }
.msg-row { display: flex; margin-bottom: 16px; align-items: flex-start; }
.msg-row.me { flex-direction: row-reverse; }
.msg-row .m-avatar { width: 40px; height: 40px; flex-shrink: 0; }
.msg-row .m-body { max-width: 66%; margin: 0 10px; display: flex; flex-direction: column; }
.msg-row.me .m-body { align-items: flex-end; }
.msg-row .m-name { font-size: 11px; color: #9a9a9a; margin-bottom: 4px; }
.bubble {
  position: relative; padding: 10px 14px; font-size: 15px; line-height: 1.65;
  border-radius: 18px; word-break: break-word; white-space: pre-wrap; max-width: 100%;
}
/* QQ 风格气泡：白色/绿色圆角 + 靠近头像的尖角 + 轻阴影，内容自适应不变形 */
.bubble.bot {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  border-top-left-radius: 5px;
}
.bubble.bot::before {
  content: ''; position: absolute; top: 0; left: -5px; width: 12px; height: 12px;
  background: #fff; border-radius: 2px; transform: rotate(45deg);
}
.bubble.me {
  background: #95ec69;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border-top-right-radius: 5px;
}
.bubble.me::before {
  content: ''; position: absolute; top: 0; right: -5px; width: 12px; height: 12px;
  background: #95ec69; border-radius: 2px; transform: rotate(45deg);
}
/* 气泡内链接可点击 */
.bubble a { color: #1a73e8; text-decoration: underline; word-break: break-all; }
.bubble.me a { color: #0b5aa8; }

/* 签名动态卡片（聊天记录内，随消息上翻不固定） */
.sig-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 14px auto 8px; width: fit-content; max-width: 88%;
  padding: 8px 16px; background: linear-gradient(135deg, #e8f4ff, #ffffff);
  border: 1px solid #bfe3ff; border-radius: 16px; box-shadow: 0 2px 10px rgba(26,185,249,.08);
  text-align: center;
}
.sig-card .sc-ico { font-size: 18px; }
.sig-card .sc-body { min-width: 0; text-align: center; }
.sig-card .sc-title { font-size: 12px; font-weight: 600; color: #2a7bb0; }
.sig-card .sc-sig { font-size: 12px; color: #666; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-card .sc-time { font-size: 11px; color: #aaa; flex-shrink: 0; }
.sig-card .sc-like { font-size: 12px; color: #e91e63; flex-shrink: 0; cursor: pointer; padding: 2px 4px; }

/* 正在输入动效 */
.typing-dots { display: inline-flex; gap: 4px; padding: 3px 0; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: #bbb; animation: typing 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* 会员锁定开关：点击无效视觉 */
.dr-flex .switch.locked { opacity: .5; cursor: not-allowed; }

/* QQ 风格时间分隔 */
.msg-time { text-align: center; font-size: 11px; color: #aaa; margin: 10px 0 6px; }
.bubble .cursor { display: inline-block; width: 2px; height: 1em; background: #666; vertical-align: -2px; animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.bubble.err { background: #fff1f0; color: var(--danger); border: 1px solid #ffccc7; }
.time-divider { text-align: center; color: #555; font-size: 12px; margin: 6px 0 18px; text-shadow: 0 1px 2px rgba(255,255,255,.9); }
.chat-loading { text-align: center; color: #b5b5b5; font-size: 13px; padding: 20px 0; }
.bubble p { margin: 0 0 6px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble code { background: #f2f3f5; border-radius: 4px; padding: 1px 5px; font-size: 13px; font-family: Consolas, monospace; word-break: break-all; }
.bubble pre { background: #2b2b2b; color: #e6e6e6; border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 6px 0; font-size: 13px; }
.bubble pre code { background: none; color: inherit; padding: 0; }
.bubble a { color: #0a6cff; text-decoration: none; }

/* ---------- 输入栏 ---------- */
.input-bar {
  display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fafafa; border-top: 1px solid var(--line); flex-shrink: 0; position: relative; z-index: 5;
}
.input-bar .ib-btn { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; color: #555; flex-shrink: 0; background: #f0f0f0; }
.input-bar .ib-btn:active { background: #e2e2e2; }
.input-bar textarea {
  flex: 1; border: 0; background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 15px;
  font-family: inherit; resize: none; max-height: 110px; line-height: 1.4; outline: none; color: #222;
}
.input-bar .ib-send {
  height: 42px; width: 46px; border: 0; padding: 0; flex-shrink: 0; cursor: pointer; font-size: 0;
  background: url(/assets/img/theme/send_btn.png) center/contain no-repeat;
  transition: transform .08s;
}
.input-bar .ib-send:disabled { opacity: .55; }
.input-bar .ib-send:active { transform: scale(.92); }

/* ---------- 加号面板 ---------- */
.plus-panel { background: #fafafa; border-top: 1px solid var(--line); padding: 16px 20px 22px; flex-shrink: 0; }
.plus-panel .pp-grid { display: flex; gap: 28px; }
.plus-panel .pp-item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: #666; cursor: pointer; }
.plus-panel .pp-ico { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; }

/* ---------- 抽屉 ---------- */
.drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,.4); z-index: 40; opacity: 0; transition: opacity .2s; pointer-events: none; }
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: absolute; top: 0; bottom: 0; right: 0; width: 82%; max-width: 360px; background: #f7f7f7;
  z-index: 50; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column;
  box-shadow: -2px 0 16px rgba(0,0,0,.15);
}
.drawer.show { transform: translateX(0); }
.drawer .d-head { height: calc(52px + max(40px, env(safe-area-inset-top, 0px))); display: flex; align-items: center; padding: max(40px, env(safe-area-inset-top, 0px)) 16px 0; background: #fff; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 600; flex-shrink: 0; box-sizing: border-box; }
.drawer .d-head .d-close { margin-left: auto; color: #999; font-size: 20px; cursor: pointer; padding: 4px 8px; }
.drawer .d-body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer .d-body::-webkit-scrollbar { width: 0; }
.drawer .d-title { font-size: 12px; color: #999; margin: 18px 0 8px; }
.drawer .d-title:first-child { margin-top: 0; }
.drawer .d-row { display: flex; align-items: center; background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.drawer .d-row .dr-label { font-size: 14px; color: #666; width: 88px; flex-shrink: 0; }
.drawer .d-row input, .drawer .d-row select {
  flex: 1; border: 0; outline: none; font-size: 14px; background: transparent; color: #222; font-family: inherit;
}
.drawer .d-row input::placeholder { color: #c0c0c0; }
.drawer .d-btn { display: block; width: 100%; text-align: center; background: #fff; border-radius: 10px; padding: 12px; font-size: 14px; color: #333; cursor: pointer; margin-bottom: 8px; }
.drawer .d-btn.danger { color: var(--danger); }
.drawer .d-btn.primary { background: var(--qq-blue); color: #fff; }
.drawer .d-btn:active { background: #eee; }
.drawer .d-btn.primary:active { background: var(--qq-blue-deep); }

/* ---------- 头像选择 ---------- */
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.avatar-grid .ag-item { width: 100%; aspect-ratio: 1; border-radius: 50%; cursor: pointer; border: 3px solid transparent; }
.avatar-grid .ag-item.sel { border-color: var(--qq-blue); }
.avatar-grid .ag-upload { border: 2px dashed #c9c9c9; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999; font-size: 11px; background: #fff; }

/* ---------- 资料卡 ---------- */
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 60; display: flex; align-items: center; justify-content: center; }
.profile-card { width: 78%; max-width: 320px; background: #fff; border-radius: 16px; overflow: hidden; animation: pop .18s ease; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pc-top { height: 86px; background: linear-gradient(135deg, #1ab9f9, #7bd6ff); position: relative; }
.pc-avatar { position: absolute; left: 50%; transform: translateX(-50%); bottom: -34px; width: 76px; height: 76px; border-radius: 50%; border: 3px solid #fff; background: #fff; }
.pc-body { padding: 42px 20px 16px; text-align: center; }
.pc-name { font-size: 18px; font-weight: 600; }
.pc-sig { font-size: 13px; color: #888; margin-top: 6px; min-height: 18px; white-space: pre-wrap; word-break: break-word; }
.pc-meta { display: flex; justify-content: center; gap: 26px; margin-top: 12px; font-size: 12px; color: #999; }
.pc-actions { display: flex; border-top: 1px solid #f0f0f0; margin-top: 14px; }
.pc-actions .pca { flex: 1; padding: 13px 0; font-size: 14px; color: #333; text-align: center; cursor: pointer; }
.pc-actions .pca + .pca { border-left: 1px solid #f0f0f0; }
.pc-actions .pca:active { background: #f5f5f5; }
.pc-close { position: absolute; top: 10px; right: 12px; color: #fff; font-size: 20px; cursor: pointer; }

/* 情绪值条 */
.pc-emotions { margin-top: 12px; }
.pe-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pe-row .pe-label { width: 34px; font-size: 12px; color: #888; text-align: right; flex-shrink: 0; }
.pe-row .pe-bar { flex: 1; height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.pe-row .pe-bar i { display: block; height: 100%; border-radius: 4px; transition: width .3s; }
.pe-row .pe-val { width: 26px; font-size: 11px; color: #999; flex-shrink: 0; }

/* ---------- 记忆面板 ---------- */
.mem-item { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; position: relative; }
.mem-item .mi-cat { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 8px; margin-right: 8px; background: #eaf7ff; color: #0a8fd4; }
.mem-item .mi-val { font-size: 14px; margin-top: 6px; line-height: 1.5; }
.mem-item .mi-del { position: absolute; top: 10px; right: 12px; color: #ccc; cursor: pointer; font-size: 16px; }
.mem-item .mi-from { font-size: 11px; color: #aaa; margin-top: 4px; }

/* ---------- 登录页 ---------- */
.login-bg {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  /* 表单卡片贴底，完整露出背景图上半部分 */
  justify-content: flex-end; padding: 0 34px 7vh;
  background: url(/assets/img/theme/login_bg.webp) center/cover no-repeat;
  overflow-y: auto;
}
.login-card { width: 100%; background: #fff; border-radius: 16px; padding: 26px 22px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.login-tabs { display: flex; margin-bottom: 20px; background: #f2f3f5; border-radius: 10px; padding: 3px; }
.login-tabs .lt { flex: 1; text-align: center; padding: 8px 0; border-radius: 8px; font-size: 14px; color: #666; cursor: pointer; }
.login-tabs .lt.active { background: #fff; color: #222; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.lf-row { display: flex; align-items: center; border: 1px solid #e5e5e5; border-radius: 10px; margin-bottom: 14px; overflow: hidden; background: #fafafa; }
.lf-row:focus-within { border-color: var(--qq-blue); background: #fff; }
.lf-row .ico { width: 42px; text-align: center; font-size: 17px; color: #999; flex-shrink: 0; }
.lf-row input { flex: 1; border: 0; background: transparent; outline: none; padding: 12px 10px 12px 0; font-size: 15px; color: #222; font-family: inherit; }
.lf-captcha { display: flex; gap: 10px; }
.lf-captcha .lf-row { flex: 1; margin-bottom: 0; }
.lf-captcha img { width: 118px; height: 46px; border-radius: 10px; cursor: pointer; border: 1px solid #e5e5e5; flex-shrink: 0; background: #fafafa; }
.lf-btn { width: 100%; background: var(--qq-blue); color: #fff; border: 0; border-radius: 22px; padding: 13px 0; font-size: 16px; cursor: pointer; margin-top: 6px; }
.lf-btn:active { background: var(--qq-blue-deep); }
.lf-btn:disabled { background: #a8ddf7; }
.lf-err { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.login-foot {
  color: #fff; font-size: 12px; margin-top: 20px; margin-bottom: 24px; text-align: center;
  background: rgba(0,0,0,.42); padding: 7px 18px; border-radius: 16px;
  text-shadow: 0 1px 2px rgba(0,0,0,.4); line-height: 1.6;
}

/* ---------- 提示 ---------- */
.toast-wrap { position: absolute; top: 70px; left: 0; right: 0; display: flex; justify-content: center; z-index: 200; pointer-events: none; }
.toast {
  background: rgba(0,0,0,.75); color: #fff; font-size: 13px; padding: 9px 18px; border-radius: 20px;
  max-width: 80%; animation: pop .15s ease;
}
/* ---------- 启动页 ---------- */
.boot-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; gap: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.35);
  background: url(/assets/img/theme/splash.webp) center/cover no-repeat;
}
.boot-loading .spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 会员徽章 ---------- */
.vip-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 7px; border-radius: 8px; background: linear-gradient(135deg, #f7c56b, #e8a33d); color: #6b4a00; font-weight: 600; margin-left: 6px; vertical-align: 2px; }
.banned-badge { display: inline-flex; font-size: 11px; padding: 1px 7px; border-radius: 8px; background: #ffe1df; color: #d22; margin-left: 6px; }

/* ---------- 开关 ---------- */
.switch { position: relative; width: 46px; height: 26px; border-radius: 13px; background: #d9d9d9; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.switch.on { background: var(--qq-blue); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on::after { left: 22px; }
.d-row .dr-flex { flex: 1; display: flex; justify-content: flex-end; }

/* ---------- 文本域 ---------- */
.d-textarea {
  flex: 1; border: 0; outline: none; background: transparent; font-size: 14px; color: #222;
  font-family: inherit; resize: none; line-height: 1.6; width: 100%;
}
.d-textarea::placeholder { color: #c0c0c0; }

/* ---------- 未读红点 ---------- */
.unread-badge {
  flex-shrink: 0; min-width: 18px; height: 18px; border-radius: 9px; background: #ff3b30; color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.push-tag { display: inline-block; font-size: 10px; color: #0a8fd4; background: #eaf7ff; border-radius: 4px; padding: 0 5px; margin-right: 4px; vertical-align: 1px; }

/* ---------- 朗读按钮 / 录音状态 ---------- */
.bubble-speak { display: inline-block; font-size: 11px; color: #9aa0a6; cursor: pointer; margin-top: 3px; user-select: none; }
.bubble-speak:active { color: #555; }
.ib-btn.recording { background: #ff4d4f; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,77,79,.5); } 50% { box-shadow: 0 0 0 8px rgba(255,77,79,0); } }

/* ---------- 消息来源（联网搜索） ---------- */
.msg-sources { margin-top: 6px; font-size: 11px; color: #888; line-height: 1.9; }
.msg-sources a { color: #0a8fd4; text-decoration: none; margin-right: 8px; }
.msg-sources a:hover { text-decoration: underline; }

/* ---------- 表情包 ---------- */
.bubble-sticker { width: 110px; max-width: 60vw; display: block; margin-top: 6px; border-radius: 8px; }

/* ---------- 图片消息 ---------- */
.chat-image { max-width: 210px; max-height: 260px; border-radius: 10px; margin-top: 6px; display: block; }
.img-preview { padding: 8px 12px 0; }
.img-preview .ip-item { position: relative; display: inline-block; }
.img-preview .ip-item img { height: 72px; border-radius: 8px; display: block; }
.img-preview .ip-del {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ---------- 语音条 ---------- */
.voice-bar {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px;
  padding: 7px 14px; margin-top: 6px; min-width: 130px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.voice-bar .vb-btn { font-size: 14px; color: #0a8fd4; flex-shrink: 0; }
.voice-bar .vb-wave { display: flex; gap: 2px; align-items: center; height: 18px; flex: 1; }
.voice-bar .vb-wave i { width: 3px; background: #0a8fd4; border-radius: 2px; height: 6px; flex-shrink: 0; }
.voice-bar.playing .vb-wave i { animation: vwave 1s infinite ease-in-out; }
.voice-bar .vb-dur { font-size: 12px; color: #888; flex-shrink: 0; }

/* 语音转文字提示与文字气泡 */
.vb-tip { display: inline-block; margin-top: 6px; font-size: 11px; color: #1a73e8; background: #eef6ff; border-radius: 10px; padding: 3px 10px; cursor: pointer; align-self: flex-start; }
.voice-text { margin-top: 6px; font-size: 13px; color: #555; background: #f7f7f7; border-radius: 10px; padding: 8px 12px; max-width: 100%; white-space: pre-wrap; word-break: break-word; }
@keyframes vwave { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1.6); } }

/* ---------- 滑条 ---------- */
input[type=range] { flex: 1; accent-color: var(--qq-blue); }
.range-val { width: 40px; text-align: right; font-size: 13px; color: #666; flex-shrink: 0; }
