/* =====================================================
   chat_v9.css —— 微信式聊天 / 群聊 / 你画我猜双画板 专属样式（v9 · 2026-10-04）
   纯增量层，全部基于主题 CSS 变量，五套主题自动适配
   ===================================================== */

/* ---------- 会话列表（聊天首页） ---------- */
#page-chat { padding: 0 !important; overflow: hidden; }
.conv-wrap { height: 100%; display: flex; flex-direction: column; }
.conv-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 96px; overscroll-behavior: contain; }
.conv-header {
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3;
}
.conv-title { flex: 1; font-size: 20px; font-weight: 800; background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.conv-actions { display: flex; gap: 6px; }
.conv-ico {
  width: 38px; height: 38px; border-radius: 12px; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; border: 1px solid var(--line);
  transition: transform .16s cubic-bezier(.34,1.56,.64,1), background .2s;
}
.conv-ico:active { transform: scale(.86) rotate(90deg); background: var(--gradient); color: #fff; border-color: transparent; }

.conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; cursor: pointer; position: relative;
  background: var(--card); transition: background .18s;
  border-bottom: 1px solid var(--line);
}
.conv-item:active { background: var(--bg-soft); }
.conv-item.pinned { background: color-mix(in srgb, var(--bg-soft) 62%, var(--card)); }
.conv-avatar {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: var(--bg-soft); border: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
  box-shadow: var(--shadow); position: relative;
  display: flex; align-items: center; justify-content: center;
}
.conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-avatar .ph { font-size: 18px; font-weight: 800; color: var(--primary-deep); }
.conv-main { flex: 1; min-width: 0; }
.conv-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.conv-name .pin {
  font-size: 10px; color: var(--primary-deep); background: var(--bg-soft);
  border-radius: 6px; padding: 0 5px; line-height: 16px; font-weight: 700;
}
.conv-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.conv-time { font-size: 11px; color: var(--muted); }
.conv-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px;
  background: #ff4d6d; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}
.conv-empty { text-align: center; color: var(--muted); padding: 70px 30px; }
.conv-empty .ce { font-size: 54px; margin-bottom: 12px; }
.conv-empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ---------- 聊天详情（全屏覆盖） ---------- */
.chat-detail {
  position: fixed; inset: 0; z-index: 70; background: var(--bg);
  display: flex; flex-direction: column; animation: cdIn .24s ease;
}
@keyframes cdIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.chat-topbar {
  display: flex; align-items: center; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 8px 8px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4;
}
.cb-btn { min-width: 40px; min-height: 40px; background: none; font-size: 22px; color: var(--text);
  border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cb-btn:active { background: var(--bg-soft); }
.cb-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.cb-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--bg-soft); border: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
  display: flex; align-items: center; justify-content: center; }
.cb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cb-avatar .ph { font-size: 16px; font-weight: 800; color: var(--primary-deep); }
.cb-info { min-width: 0; }
.cb-name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-state { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.cb-state .dot { width: 6px; height: 6px; border-radius: 50%; background: #c4c4c4; }
.cb-state .dot.online { background: #35d07f; box-shadow: 0 0 0 3px rgba(53,208,127,.18); }

.chat-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 12px 14px; min-height: 0; overscroll-behavior: contain;
  background: color-mix(in srgb, var(--bg-soft) 40%, var(--bg));
  background-size: cover; background-position: center;
}
.chat-top-hint { text-align: center; font-size: 11.5px; color: var(--muted); padding: 4px 0 10px; }
.chat-top-hint.hidden { display: none; }

/* 群聊：气泡上方显示发送者昵称 */
.msg-row.group-me { flex-direction: row-reverse; }
.msg-sender { display: block; font-size: 11px; color: var(--primary-deep); font-weight: 700;
  margin: 0 2px 3px; }
.msg-row.partner .msg-sender { text-align: left; }
.msg-row.me .msg-sender { text-align: right; }
/* 群已读回执 */
.read-mark-group { display: block; font-size: 10.5px; color: rgba(0,0,0,.4); margin-top: 3px; text-align: right; }
.read-mark-group.ok { color: var(--primary-deep); }
.msg-row.partner .read-mark-group { display: none; }

/* ---- 微信式"两边分"布局 ----
   DOM 顺序：头像在前、气泡在后（见 chat.js appendMsg）。
   partner 用 row：头像在左、气泡贴右；me 用 row-reverse：头像在最右、气泡在左。
   不再用 order / margin:auto 把头像甩到对面（之前 order:1/2 导致对方头像跑到右侧，
   看起来像"我的头像"，这是 bug 的根因）。 */
.chat-body .msg-row {
  display: flex; align-items: flex-end; gap: 8px; margin-bottom: 14px; max-width: 100%;
}
.chat-body .msg-row.partner { flex-direction: row; }
.chat-body .msg-row.me { flex-direction: row-reverse; }
.chat-body .msg-row .msg {
  border-radius: 18px; padding: 9px 13px; max-width: 72%; position: relative;
  font-size: 15.5px; line-height: 1.5; word-break: break-word;
}
.chat-body .msg-row.partner .msg { background: var(--card); color: inherit; }
.chat-body .msg-row.me .msg { background: var(--gradient); color: #fff; }
.chat-body .msg-row.me .msg { border-bottom-right-radius: 5px; }
.chat-body .msg-row.partner .msg { border-bottom-left-radius: 5px; }
.chat-body .msg-row.me .msg.emoji-msg,
.chat-body .msg-row.partner .msg.emoji-msg { background: transparent; box-shadow: none; padding: 0 6px; }
/* 头像紧跟自己那侧，不被 order 甩走 */
.chat-body .msg-avatar { width: 38px; height: 38px; flex: 0 0 auto; order: 0 !important; }
.chat-body .msg-row .msg { order: 1; }
/* 气泡内时间/回复标签 */
.chat-body .msg-row .msg .time { display: block; font-size: 10px; opacity: .6; margin-top: 3px; text-align: right; }
.chat-body .msg-row.me .msg .time { color: rgba(255,255,255,.75); }
.chat-body .msg-row.partner .msg .time { color: var(--muted); }


/* 时间分隔线 */
.chat-dayline { text-align: center; margin: 8px 0 12px; }
.chat-dayline span { font-size: 11px; color: var(--muted); background: color-mix(in srgb, var(--card) 80%, transparent);
  border-radius: 10px; padding: 3px 10px; }

/* v18：通话结束系统提示（居中胶囊，带图标与淡入动画） */
.call-end-tip {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px auto !important;
  padding: 7px 14px !important;
  font-size: 12px !important;
  color: var(--muted) !important;
  background: color-mix(in srgb, var(--card) 82%, transparent) !important;
  border: 1px solid var(--line);
  border-radius: 999px !important;
  box-shadow: none !important;
  max-width: 90% !important;
  animation: callTipIn .35s cubic-bezier(.22,.61,.36,1);
}
.call-end-tip::before {
  content: "📞";
  font-size: 13px;
}
.call-end-tip.is-active {
  color: var(--accent) !important;
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
@keyframes callTipIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 输入区 */
.chat-inputbar-v9 {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
}
.emoji-bar-v9 { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 12px; font-size: 20px;
  background: var(--bg-soft); border-top: 1px solid var(--line); line-height: 1; }
.emoji-bar-v9 .emoji { cursor: pointer; padding: 3px 6px; border-radius: 8px; }
.emoji-bar-v9 .emoji:active { background: var(--card); }

/* ---------- 会话设置 / 群设置 面板 ---------- */
.setting-list { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.setting-row { display: flex; align-items: center; gap: 12px; min-height: 48px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting-row:last-child { border-bottom: none; }
.setting-row:active { background: var(--bg-soft); }
.setting-row .si { font-size: 19px; }
.setting-row .st { flex: 1; font-size: 15px; }
.setting-row .sv { color: var(--muted); font-size: 13px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setting-row .arrow { color: var(--muted); }
.setting-row .sw-toggle { flex: 0 0 auto; }

/* 开关 */
.switch { position: relative; width: 50px; height: 30px; border-radius: 16px; background: var(--line);
  transition: background .22s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .22s; }
.switch.on { background: var(--gradient); }
.switch.on::after { transform: translateX(20px); }

/* 备注输入卡 */
.remark-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }

/* 背景选择 */
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.bg-swatch { aspect-ratio: 16/10; border-radius: 12px; cursor: pointer; border: 2px solid transparent;
  transition: transform .16s, border-color .2s; position: relative; }
.bg-swatch.on { border-color: var(--primary); transform: scale(1.04); }
.bg-swatch::after { content: "✓"; position: absolute; right: 5px; bottom: 3px; color: #fff; font-size: 12px; font-weight: 800; opacity: 0; }
.bg-swatch.on::after { opacity: 1; }

/* ---------- 成员列表 ---------- */
.member-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.member-item:last-child { border-bottom: none; }
.member-item .mi-avatar { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  background: var(--bg-soft); display: flex; align-items: center; justify-content: center; }
.member-item .mi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-item .mi-name { flex: 1; font-size: 15px; font-weight: 600; }
.member-item .mi-tag { font-size: 11px; color: #fff; background: var(--gradient); border-radius: 8px; padding: 1px 7px; }
.member-item .mi-del { color: var(--danger); font-size: 13px; background: none; }

/* ---------- 你画我猜 · 双画板 ---------- */
/* ---------- 你画我猜 · 双画板 ---------- */
.draw-top { display: flex; align-items: center; gap: 4px; padding: 10px 8px 6px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.draw-top-title { font-size: 18px; font-weight: 800; }
.emoji-msg { font-size: 44px; line-height: 1.15; }
.draw-panel { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.draw-panel-title { font-size: 13px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.draw-panel-title .tag-mine { background: var(--gradient); color: #fff; border-radius: 8px; padding: 1px 8px; font-size: 11px; }
.draw-panel-title .tag-theirs { background: var(--bg-soft); color: var(--primary-deep); border-radius: 8px; padding: 1px 8px; font-size: 11px; }
.draw-panel-title .status-chip { margin-left: auto; font-size: 11px; color: var(--muted); }
.draw-panel-title .status-chip.live { color: var(--primary-deep); animation: dPulse 1.6s ease-in-out infinite; }
@keyframes dPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.draw-wordline { font-size: 14px; margin-bottom: 8px; }
.draw-wordline b { color: var(--primary-deep); letter-spacing: 2px; }
.draw-hintline { font-size: 12.5px; color: var(--primary-deep); margin: 8px 0; }
.draw-canvas-wrap { border-radius: 12px; overflow: hidden; border: 2px solid var(--line);
  box-shadow: var(--shadow); touch-action: none; background: #fff; }
.draw-canvas { display: block; width: 100%; cursor: crosshair; touch-action: none; }
.draw-canvas.ro { cursor: default; }
.draw-tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.draw-pal { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.draw-pal .sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0,0,0,.08);
  cursor: pointer; transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .16s;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.draw-pal .sw.on { transform: scale(1.18); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }
.draw-pal .sw.eraser { background: #fff; }
.draw-widths { display: flex; gap: 5px; }
.draw-widths .chip { min-height: 30px; padding: 4px 10px; }
.draw-actions { display: flex; gap: 8px; margin-top: 10px; }
.draw-actions .btn-primary, .draw-actions .btn-ghost { flex: 1; }
.draw-guess-row { display: flex; gap: 8px; margin-top: 10px; }
.draw-guess-row .input { margin: 0; flex: 1; }
.draw-guess-row .btn-primary { flex: 0 0 auto; width: auto; padding: 0 18px; margin: 0; }
.draw-guess-card { background: var(--bg-soft); border-radius: 14px; padding: 10px 12px; margin-top: 8px; font-size: 12.5px; }
.draw-guess-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.draw-guess-item:last-child { border-bottom: none; }
.draw-guess-item b { flex: 1; color: var(--text); }
.draw-guess-item.ok b { color: var(--primary-deep); }
.draw-banner { text-align: center; padding: 12px; border-radius: 14px; font-weight: 700; margin: 10px 0; }
.draw-banner.win { background: var(--gradient); color: #fff; }
.draw-banner.info { background: var(--bg-soft); color: var(--primary-deep); }
.draw-hist-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  .chat-detail, .switch::after, .conv-ico, .conv-item { transition-duration: .01ms !important; }
  .status-chip.live { animation: none; }
}

/* ================= v10 · AI宠物男友 ================= */
.pet-av { background: linear-gradient(135deg, #ffe3ec, #fff7e8) !important; overflow: hidden; }
.pet-svg { width: 78%; height: 78%; animation: petIdleBob 2.2s ease-in-out infinite; }
.pet-tongue { animation: petTongue 0.7s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes petIdleBob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-2.5px) } }
@keyframes petTongue { 0%,100% { transform: scaleY(1) } 50% { transform: scaleY(1.35) } }

.pet-overlay {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #ffeef4 0%, #fff7ef 55%, #ffe8f0 100%);
  animation: petIn .28s ease;
}
@keyframes petIn { from { transform: translateX(40px); opacity: .4 } to { transform: none; opacity: 1 } }
.pet-head {
  display: flex; align-items: center; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: rgba(255,255,255,.75); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,140,175,.25);
}
.pet-ico { min-width: 40px; min-height: 40px; font-size: 20px; color: #e26d92; background: none; }
.pet-title { flex: 1; font-weight: 800; color: #b8456b; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pet-title small { font-weight: 500; color: #d78ba3; font-size: 11px; margin-left: 4px; }
.pet-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff7fa7; }
/* 呼吸光圈改由 ui-pro.css 的伪元素环实现（只动 transform/opacity） */

.pet-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.pet-scene canvas { width: min(72vw, 340px); height: min(72vw, 340px); }
.pet-bubble {
  position: absolute; right: 10px; top: 12px; max-width: min(64%, 300px);
  background: #fff; border: 1.5px solid #ffd3e0; border-radius: 18px 18px 4px 18px;
  padding: 12px 14px; box-shadow: 0 8px 24px rgba(230,120,160,.18);
}
.pet-bubble-tail { position: absolute; left: 14px; bottom: -9px; border: 6px solid transparent; border-top-color: #fff; }
.pet-bubble-text { font-size: 15px; color: #7c4a5f; line-height: 1.5; word-break: break-word; }
.pet-bubble.pop { animation: bubblePop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes bubblePop { 0% { transform: scale(.85) translateY(8px); opacity: .3 } 100% { transform: none; opacity: 1 } }

.pet-chips { display: flex; gap: 8px; padding: 8px 14px 2px; flex-wrap: wrap; }
.pet-chips button { border-radius: 16px; padding: 7px 12px; font-size: 12.5px; background: rgba(255,255,255,.85); color: #c65a80; border: 1px solid #ffd3e0; }
.pet-history { max-height: 34%; overflow-y: auto; overscroll-behavior: contain; margin: 6px 14px; background: rgba(255,255,255,.7); border-radius: 14px; padding: 8px 10px; }
.pet-history.hidden { display: none; }
.ph-row { font-size: 12.5px; padding: 4px 0; color: #8a5b6d; }
.ph-row.me { color: #c65a80; }
.pet-inputbar { display: flex; gap: 10px; padding: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.8); backdrop-filter: blur(8px); }

/* =====================================================
   v11 · 聊天界面焕新：让气泡"活"起来
   ===================================================== */
/* 默认聊天背景：柔和渐变，比纯色更有呼吸感
   【本次修正】原来这里加了 !important，导致 applyBg() 写入的内联背景
   （预设 css / 自定义图片 url）全部失效；并且 .has-bg 用了
   background: none !important，会把 JS 设置的 background-image 一起清掉，
   自定义背景图根本显示不出来。
   现在：默认渐变写在 :not(.has-bg) 上且不带 !important ——
   内联样式优先级高于普通 CSS，用户预设与背景图即可正常生效；
   具体渐变色由 ui-pro.css 按主题提供（--chat-bg-a/b/c）。 */
.chat-body.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 消息入场：从下方轻轻滑入 + 淡入，不再"啪"地一下死板出现 */
.msg-row { animation: msgIn .28s cubic-bezier(.22,.9,.32,1.1); }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* 气泡小尾巴：更像微信 */
.chat-body .msg { position: relative; }
.chat-body .msg-row.partner .msg::before {
  content: ""; position: absolute; left: -6px; bottom: 10px;
  border: 6px solid transparent; border-right-color: var(--card);
}
.chat-body .msg-row.me .msg { background: var(--gradient); }
.chat-body .msg-row.me .msg::before {
  content: ""; position: absolute; right: -6px; bottom: 10px;
  border: 6px solid transparent; border-left-color: var(--primary);
}

/* 气泡内文字更舒服 */
.chat-body .msg-row .msg { font-size: 15.5px; line-height: 1.5; word-break: break-word; }
/* 气泡阴影同样去掉 !important：ui-pro.css 需要在 beige 等浅色主题下
   重新定义我方气泡（原渐变 + 白字对比度只有 1.8:1），带 !important 会挡住覆盖 */
.chat-body .msg-row.me .msg { box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.chat-body .msg-row.partner .msg { box-shadow: 0 2px 10px rgba(120,140,180,.10); }

/* 头像更精致（去掉 !important，圆角与描边交给 ui-pro.css 统一节奏） */
.chat-body .msg-avatar {
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(120,140,180,.18);
}

/* 表情条：一排大表情，像截图里那样 */
.emoji-bar-v9 {
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 2px;
  padding: 8px 10px; font-size: 26px;
  background: rgba(255,255,255,.9); border-top: 1px solid var(--line);
  scrollbar-width: none;
}
.emoji-bar-v9::-webkit-scrollbar { display: none; }
.emoji-bar-v9 .emoji { padding: 4px 8px; border-radius: 10px; transition: transform .15s; }
.emoji-bar-v9 .emoji:active { transform: scale(1.25); }

/* 输入条更圆润 */
.chat-inputbar-v9 { border-radius: 22px 22px 0 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px; }
.chat-inputbar-v9 .chat-input {
  background: #fff; border-radius: 20px; padding: 10px 16px;
  border: 1px solid var(--line); font-size: 15px; flex: 1;
  box-shadow: inset 0 1px 3px rgba(120,140,180,.08);
}
.chat-inputbar-v9 .chat-send {
  border-radius: 20px; padding: 0 22px; font-weight: 700;
  background: var(--gradient); color: #fff; border: none;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 40%, transparent);
}
.chat-inputbar-v9 .chat-plus {
  width: 40px; height: 40px; border-radius: 50%; font-size: 22px;
  background: #fff; border: 1.5px solid var(--line); color: var(--primary-deep);
}

/* =====================================================
   v11 · 3D 小狗舞台
   ===================================================== */
.pet-scene canvas {
  width: min(80vw, 400px); height: min(80vw, 400px);
  cursor: grab; touch-action: none;
  filter: drop-shadow(0 12px 20px rgba(255,150,180,.25));
}
.pet-scene canvas:active { cursor: grabbing; }
.pet-drag-hint {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: #d78ba3; background: rgba(255,255,255,.7);
  padding: 4px 12px; border-radius: 12px; white-space: nowrap;
  animation: hintFade 2.6s ease-in-out infinite;
}
@keyframes hintFade { 0%,100% { opacity: .55 } 50% { opacity: 1 } }

/* 快捷动作 chips 更可爱 */
.pet-chips button {
  border-radius: 20px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  background: #fff; color: #c65a80; border: 1.5px solid #ffd3e0;
  box-shadow: 0 3px 8px rgba(255,150,180,.15);
  transition: transform .15s cubic-bezier(.34,1.56,.64,1);
}
.pet-chips button:active { transform: scale(.9); background: #fff0f5; }

/* 历史记录聊天气泡化 */
.pet-history .ph-row {
  display: inline-block; max-width: 80%; padding: 7px 12px; border-radius: 14px;
  margin: 3px 0; line-height: 1.45;
}
.pet-history { display: flex; flex-direction: column; }
.ph-row.dog { background: #fff; color: #7c4a5f; border-bottom-left-radius: 4px; align-self: flex-start; }
.ph-row.me { background: var(--gradient); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }

/* ========== v14：你画我猜 · 橡皮擦 ========== */
.draw-tools-2 { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dw-eraser-btn { min-height: 30px; padding: 4px 12px; font-weight: 700; }
#dwErW .chip { border-style: dashed; }
.draw-pal.dim { opacity: .42; }
.dw-hide { display: none !important; }
.draw-canvas.erasing { cursor: cell; }
.dw-tool-tip { font-size: 11px; flex: 1; min-width: 60px; }
