/**
 * 《误入？还是当群主？》· Reply UI · v3.3 wx-thread · 多私聊共壳
 * grp-* 前缀 · 即时通讯气泡风 · MUFY 三写
 * 禁止 @import · 禁止中文 CSS 变量名
 */

:root {
  --grp-font: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --grp-bg: #ededed;
  --grp-paper: #ffffff;
  --grp-ink: #1a1a1a;
  --grp-muted: #888888;
  --grp-line: #e0e0e0;
  --grp-green: #07c160;
  --grp-green-light: #95ec69;
  --grp-blue: #576b95;
  --grp-system: #b2b2b2;
  --grp-accent: #576b95;
  --grp-warn: #fa9d3b;
  --grp-danger: #fa5151;
  --grp-vibe: #9b59b6;
  --grp-favor: #07c160;
  --grp-radius: 14px;
  --grp-radius-sm: 8px;
  --grp-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --chat-phone: #1a1a1a;
  --chat-screen: #f5f0e8;
  --chat-bar: #f5d547;
  --chat-user: #5eb3ff;
  --chat-npc: #ffffff;
  --chat-narr-accent: #8b5cf6;
  --chat-narr-bg: #faf7f2;
  --chat-typing: #c87800;
  --chat-stroke: 2.5px;
  --chat-pad: 8px;
  --story-paper: #fdf8ee;
  --story-ink: #2a2826;
  --story-meta: #7a7468;
  --story-badge: #d4738f;
  --story-rate: #1a1a1a;
}

img[src="/chat-star.png"],
img[src*="chat-star.png"] {
  display: none !important;
}

.mufy_ai_message_bubble {
  color: var(--grp-ink) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  font-family: var(--grp-font) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.mufy_ai_message_bubble::before,
.mufy_ai_message_bubble::after {
  display: none !important;
}

.mufy_ai_message_bubble * {
  box-sizing: border-box;
}

redacted_thinking,
.mufy_ai_message_bubble redacted_thinking {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.thinking-body,
redacted_thinking .thinking-body,
.mufy_ai_message_bubble redacted_thinking .thinking-body {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

redacted_thinking:not(:has(.thinking-body)),
.mufy_ai_message_bubble redacted_thinking:not(:has(.thinking-body)) {
  display: none !important;
}

.mufy_ai_message_bubble details,
details {
  list-style: none !important;
}

.mufy_ai_message_bubble summary::-webkit-details-marker,
details > summary::-webkit-details-marker {
  display: none !important;
}

.grp-top,
div.grp-top,
.mufy_ai_message_bubble .grp-top {
  display: none !important;
}

/* ========== 手机群聊 chat（黑描边 · 黄顶栏 · MeiBi 风） ========== */
chat,
div.grp-chat,
.mufy_ai_message_bubble chat,
.mufy_ai_message_bubble div.grp-chat {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: var(--chat-screen) !important;
  border: 4px solid var(--chat-phone) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14) !important;
  overflow: hidden !important;
  font-family: var(--grp-font) !important;
}

chat::after,
div.grp-chat::after,
.mufy_ai_message_bubble chat::after,
.mufy_ai_message_bubble div.grp-chat::after {
  content: "" !important;
  display: block !important;
  width: 38% !important;
  height: 4px !important;
  margin: 10px auto 8px !important;
  background: var(--chat-phone) !important;
  border-radius: 999px !important;
  opacity: 0.45 !important;
}

chatbar,
privbar,
sphonebar,
div.grp-chatbar,
.mufy_ai_message_bubble chatbar,
.mufy_ai_message_bubble privbar,
.mufy_ai_message_bubble sphonebar,
.mufy_ai_message_bubble div.grp-chatbar {
  position: relative !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 46px !important;
  padding: 10px 14px 7px !important;
  background: var(--chat-bar) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  color: var(--chat-phone) !important;
  border-bottom: 2px solid var(--chat-phone) !important;
  letter-spacing: 0.02em !important;
}

.cb-left,
chatbar .cb-left,
privbar .cb-left,
sphonebar .cb-left,
.mufy_ai_message_bubble .cb-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  flex: 0 1 38% !important;
  min-width: 0 !important;
  z-index: 2 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.cb-time,
chatbar .cb-time,
privbar .cb-time,
sphonebar .cb-time,
.mufy_ai_message_bubble .cb-time {
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  flex-shrink: 0 !important;
}

.cb-date,
chatbar .cb-date,
privbar .cb-date,
sphonebar .cb-date,
.mufy_ai_message_bubble .cb-date {
  font-size: 11px !important;
  font-weight: 700 !important;
  opacity: 0.82 !important;
  letter-spacing: 0.03em !important;
  flex-shrink: 0 !important;
}

.cb-island,
chatbar .cb-island,
privbar .cb-island,
sphonebar .cb-island,
.mufy_ai_message_bubble .cb-island {
  position: absolute !important;
  top: 8px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: block !important;
  width: 102px !important;
  height: 28px !important;
  background: var(--chat-phone) !important;
  border: 2px solid var(--chat-phone) !important;
  border-radius: 999px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

.cb-right,
chatbar .cb-right,
privbar .cb-right,
sphonebar .cb-right,
.mufy_ai_message_bubble .cb-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  flex: 0 1 28% !important;
  min-width: 0 !important;
  z-index: 2 !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

.cb-sig,
.cb-wifi,
.cb-bat,
chatbar .cb-sig,
chatbar .cb-wifi,
chatbar .cb-bat,
privbar .cb-sig,
privbar .cb-wifi,
privbar .cb-bat,
sphonebar .cb-sig,
sphonebar .cb-wifi,
sphonebar .cb-bat,
.mufy_ai_message_bubble .cb-sig,
.mufy_ai_message_bubble .cb-wifi,
.mufy_ai_message_bubble .cb-bat {
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* 旧版 chatbar 字段兼容（逐步废弃） */
.cb-dot,
.cb-brand,
.cb-title,
.grp-chatbar__dot,
.grp-chatbar__brand,
.grp-chatbar__title,
.mufy_ai_message_bubble .cb-dot,
.mufy_ai_message_bubble .cb-brand,
.mufy_ai_message_bubble .cb-title {
  display: none !important;
}

.grp-chatbar__sig,
.grp-chatbar__bat,
.mufy_ai_message_bubble .grp-chatbar__sig,
.mufy_ai_message_bubble .grp-chatbar__bat {
  font-size: 11px !important;
  font-weight: 800 !important;
}

chathead,
div.grp-chathead,
.mufy_ai_message_bubble chathead,
.mufy_ai_message_bubble div.grp-chathead {
  display: block !important;
  padding: 10px 14px 11px !important;
  background: var(--grp-paper) !important;
  border-bottom: 2px solid var(--chat-phone) !important;
  text-align: center !important;
}

p.ch-title,
chathead p.ch-title,
chathead > p:first-child,
.mufy_ai_message_bubble p.ch-title,
.mufy_ai_message_bubble chathead > p:first-child {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--chat-phone) !important;
  letter-spacing: 0.02em !important;
}

p.ch-meta,
chathead p.ch-meta,
.mufy_ai_message_bubble p.ch-meta {
  margin: 6px 0 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--grp-muted) !important;
  line-height: 1.45 !important;
}

p.ch-online,
chathead p.ch-online,
.mufy_ai_message_bubble p.ch-online {
  margin: 4px 0 0 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--grp-muted) !important;
  line-height: 1.45 !important;
}

p.ch-online + p.ch-meta,
.mufy_ai_message_bubble p.ch-online + p.ch-meta {
  margin-top: 4px !important;
}

chatbody,
div.grp-chatbody,
.mufy_ai_message_bubble chatbody,
.mufy_ai_message_bubble div.grp-chatbody {
  display: flex !important;
  flex-direction: column !important;
  padding: 4px 0 8px !important;
  background: var(--chat-screen) !important;
}

time,
p.grp-time,
chatbody > time,
.mufy_ai_message_bubble time,
.mufy_ai_message_bubble p.grp-time,
.mufy_ai_message_bubble chatbody > time {
  display: none !important;
}

details.wechat > time,
.wx-body > time,
.mufy_ai_message_bubble details.wechat > time,
.mufy_ai_message_bubble .wx-body > time {
  display: block !important;
  margin: 12px 0 10px !important;
  padding: 0 12px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--grp-muted) !important;
  text-align: center !important;
  letter-spacing: 0.02em !important;
}

details.wechat > time span,
.wx-body > time span,
.mufy_ai_message_bubble details.wechat > time span,
.mufy_ai_message_bubble .wx-body > time span {
  display: inline !important;
}

stamp,
.mufy_ai_message_bubble stamp {
  display: block !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--grp-muted) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-align: left !important;
  letter-spacing: 0.02em !important;
  align-self: center !important;
  justify-self: start !important;
  padding: 0 !important;
  margin: 0 !important;
}

msg,
msg-user,
msg-npc,
div.grp-msg,
.mufy_ai_message_bubble msg,
.mufy_ai_message_bubble msg-user,
.mufy_ai_message_bubble msg-npc,
.mufy_ai_message_bubble div.grp-msg {
  box-sizing: border-box !important;
  gap: 0 !important;
  margin: 5px 0 !important;
  padding: 0 var(--chat-pad) !important;
  width: 100% !important;
  max-width: 100% !important;
}

msg.user,
msg-user,
msg[class="user"],
div.grp-msg--user,
chat > msg.user,
chatbody > msg.user,
chatbody > msg-user,
.mufy_ai_message_bubble msg.user,
.mufy_ai_message_bubble msg-user,
.mufy_ai_message_bubble msg[class="user"],
.mufy_ai_message_bubble div.grp-msg--user {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  grid-template-rows: auto !important;
  column-gap: 10px !important;
  align-self: stretch !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

msg.user stamp,
msg-user stamp,
.mufy_ai_message_bubble msg-user stamp,
.mufy_ai_message_bubble msg.user stamp {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
}

msg.npc,
msg-npc,
msg[class="npc"],
div.grp-msg--npc,
chat > msg.npc,
chatbody > msg.npc,
chatbody > msg-npc,
.mufy_ai_message_bubble msg.npc,
.mufy_ai_message_bubble msg-npc,
.mufy_ai_message_bubble msg[class="npc"],
.mufy_ai_message_bubble div.grp-msg--npc {
  display: grid !important;
  grid-template-columns: minmax(0, max-content) minmax(44px, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 10px !important;
  row-gap: 4px !important;
  align-self: stretch !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

msg.npc sender,
msg-npc sender,
msg[class="npc"] sender,
.mufy_ai_message_bubble msg-npc sender,
.mufy_ai_message_bubble msg.npc sender {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

msg.npc stamp,
msg-npc stamp,
msg[class="npc"] stamp,
.mufy_ai_message_bubble msg-npc stamp,
.mufy_ai_message_bubble msg.npc stamp {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

msg.user sender,
msg-user sender,
msg.user p.grp-sender,
msg-user p.grp-sender,
.mufy_ai_message_bubble msg.user sender,
.mufy_ai_message_bubble msg-user sender {
  display: none !important;
}

sender,
p.grp-sender,
.mufy_ai_message_bubble sender,
.mufy_ai_message_bubble p.grp-sender {
  display: block !important;
  margin: 0 0 2px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: var(--grp-blue) !important;
  line-height: 1.3 !important;
}

msg.user bubble,
msg-user bubble,
msg[class="user"] bubble,
msg.user p,
msg-user p,
msg[class="user"] p,
div.grp-msg--user > bubble,
div.grp-msg--user > p,
.mufy_ai_message_bubble msg.user bubble,
.mufy_ai_message_bubble msg-user bubble,
.mufy_ai_message_bubble msg.user p,
.mufy_ai_message_bubble msg-user p,
.mufy_ai_message_bubble msg[class="user"] bubble,
.mufy_ai_message_bubble msg[class="user"] p,
.mufy_ai_message_bubble div.grp-msg--user > bubble,
.mufy_ai_message_bubble div.grp-msg--user > p,
div.markdown-body msg.user bubble,
div.markdown-body msg-user bubble,
div.markdown-body msg.user p,
div.markdown-body msg-user p,
div.markdown-body msg[class="user"] bubble,
div.markdown-body msg[class="user"] p,
bubble.ch-bubble-user,
.mufy_ai_message_bubble bubble.ch-bubble-user {
  display: block !important;
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--chat-phone) !important;
  background: var(--chat-user) !important;
  border: var(--chat-stroke) solid var(--chat-phone) !important;
  border-radius: 18px 18px 4px 18px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12) !important;
  word-break: break-word !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

bubble,
.mufy_ai_message_bubble bubble {
  display: block !important;
}

/* 兜底：省略 msg-npc；或 Markdown 吃掉 bubble 时 sender 后紧跟 p/bubble */
chatbody > sender + bubble,
chatbody > sender + p,
chatbody > p.grp-sender + bubble,
chatbody > p.grp-sender + p,
.mufy_ai_message_bubble chatbody > sender + bubble,
.mufy_ai_message_bubble chatbody > sender + p,
.mufy_ai_message_bubble chatbody > p.grp-sender + bubble,
.mufy_ai_message_bubble chatbody > p.grp-sender + p,
.mufy_ai_message_bubble div.markdown-body chatbody > sender + bubble,
.mufy_ai_message_bubble div.markdown-body chatbody > sender + p,
.mufy_ai_message_bubble div.markdown-body chatbody > p.grp-sender + bubble,
.mufy_ai_message_bubble div.markdown-body chatbody > p.grp-sender + p {
  align-self: flex-start !important;
  margin: 0 var(--chat-pad) 8px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--chat-phone) !important;
  background: var(--chat-npc) !important;
  border: var(--chat-stroke) solid var(--chat-phone) !important;
  border-radius: 18px 18px 18px 4px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1) !important;
  word-break: break-word !important;
  width: fit-content !important;
  max-width: min(88%, 520px) !important;
  box-sizing: border-box !important;
}

chatbody > sender,
chatbody > p.grp-sender,
.mufy_ai_message_bubble chatbody > sender,
.mufy_ai_message_bubble chatbody > p.grp-sender,
.mufy_ai_message_bubble div.markdown-body chatbody > sender,
.mufy_ai_message_bubble div.markdown-body chatbody > p.grp-sender {
  align-self: flex-start !important;
  margin: 6px var(--chat-pad) 2px !important;
}

msg.npc bubble,
msg-npc bubble,
msg[class="npc"] bubble,
msg.npc p,
msg-npc p,
msg[class="npc"] p,
div.grp-msg--npc > bubble,
div.grp-msg--npc > p,
.mufy_ai_message_bubble msg.npc bubble,
.mufy_ai_message_bubble msg-npc bubble,
.mufy_ai_message_bubble msg.npc p,
.mufy_ai_message_bubble msg-npc p,
.mufy_ai_message_bubble msg[class="npc"] bubble,
.mufy_ai_message_bubble msg[class="npc"] p,
.mufy_ai_message_bubble div.grp-msg--npc > bubble,
.mufy_ai_message_bubble div.grp-msg--npc > p,
div.markdown-body msg.npc bubble,
div.markdown-body msg-npc bubble,
div.markdown-body msg.npc p,
div.markdown-body msg-npc p,
div.markdown-body msg[class="npc"] bubble,
div.markdown-body msg[class="npc"] p,
bubble.ch-bubble-npc,
.mufy_ai_message_bubble bubble.ch-bubble-npc {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--chat-phone) !important;
  background: var(--chat-npc) !important;
  border: var(--chat-stroke) solid var(--chat-phone) !important;
  border-radius: 18px 18px 18px 4px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1) !important;
  word-break: break-word !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

sys,
p.grp-sys,
.mufy_ai_message_bubble sys,
.mufy_ai_message_bubble p.grp-sys {
  display: block !important;
  margin: 8px var(--chat-pad) 6px !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-style: italic !important;
  font-weight: 700 !important;
  color: var(--chat-typing) !important;
  text-align: center !important;
  letter-spacing: 0.04em !important;
}

chat p.narr,
p.ch-narr,
p.grp-narr,
chatbody p.ch-narr,
.mufy_ai_message_bubble chat p.narr,
.mufy_ai_message_bubble p.ch-narr,
.mufy_ai_message_bubble p.grp-narr {
  display: block !important;
  margin: 10px var(--chat-pad) !important;
  padding: 12px 14px 12px 12px !important;
  font-family: "Songti SC", "Noto Serif SC", SimSun, serif !important;
  font-size: 13px !important;
  font-style: italic !important;
  line-height: 1.8 !important;
  color: #3a3a3a !important;
  background: var(--chat-narr-bg) !important;
  border: 2px solid var(--chat-phone) !important;
  border-left: 5px solid var(--chat-narr-accent) !important;
  border-radius: 6px !important;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.06) !important;
  text-indent: 0 !important;
}

/* ========== 手机私聊 priv（同壳 · 单聊导航头） ========== */
priv,
div.grp-priv,
.mufy_ai_message_bubble priv,
.mufy_ai_message_bubble div.grp-priv {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: var(--chat-screen) !important;
  border: 4px solid var(--chat-phone) !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14) !important;
  overflow: hidden !important;
  font-family: var(--grp-font) !important;
}

priv::after,
div.grp-priv::after,
.mufy_ai_message_bubble priv::after,
.mufy_ai_message_bubble div.grp-priv::after {
  content: "" !important;
  display: block !important;
  width: 38% !important;
  height: 4px !important;
  margin: 10px auto 8px !important;
  background: var(--chat-phone) !important;
  border-radius: 999px !important;
  opacity: 0.45 !important;
}

priv:has(.wx-toggle:not(:checked))::after,
priv:not(:has(.wx-toggle:checked))::after,
.mufy_ai_message_bubble priv:has(.wx-toggle:not(:checked))::after,
.mufy_ai_message_bubble priv:not(:has(.wx-toggle:checked))::after {
  display: block !important;
  margin: 6px auto 4px !important;
  opacity: 0.35 !important;
}

priv:has(.wx-toggle:not(:checked)),
.mufy_ai_message_bubble priv:has(.wx-toggle:not(:checked)) {
  padding: 0 0 8px !important;
}

div.wx-thread,
.mufy_ai_message_bubble div.wx-thread {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  border-bottom: 1px solid var(--grp-line) !important;
}

div.wx-thread:last-child,
.mufy_ai_message_bubble div.wx-thread:last-child {
  border-bottom: none !important;
}

.wx-thread:has(.wx-toggle:not(:checked)) .wx-body,
.mufy_ai_message_bubble .wx-thread:has(.wx-toggle:not(:checked)) .wx-body {
  display: none !important;
}

.wx-thread:has(.wx-toggle:checked) label.wx-fold,
.mufy_ai_message_bubble .wx-thread:has(.wx-toggle:checked) label.wx-fold {
  display: none !important;
}

privbody:not(:has(.wx-thread)):has(.wx-toggle:not(:checked)) .wx-body,
.mufy_ai_message_bubble privbody:not(:has(.wx-thread)):has(.wx-toggle:not(:checked)) .wx-body {
  display: none !important;
}

privbody:not(:has(.wx-thread)):has(.wx-toggle:checked) label.wx-fold,
.mufy_ai_message_bubble privbody:not(:has(.wx-thread)):has(.wx-toggle:checked) label.wx-fold {
  display: none !important;
}

div.wx-body,
.mufy_ai_message_bubble div.wx-body {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

privhead,
.mufy_ai_message_bubble privhead {
  position: relative !important;
  display: block !important;
  padding: 8px 12px 10px !important;
  background: var(--grp-paper) !important;
  border-bottom: 2px solid var(--chat-phone) !important;
  text-align: center !important;
}

p.ph-line,
privhead p.ph-line,
.mufy_ai_message_bubble p.ph-line {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--chat-phone) !important;
  letter-spacing: 0.02em !important;
  line-height: 1.35 !important;
}

span.ph-back,
.mufy_ai_message_bubble span.ph-back {
  position: absolute !important;
  left: 14px !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  opacity: 0.75 !important;
}

span.ph-name,
.mufy_ai_message_bubble span.ph-name {
  font-size: 14px !important;
  font-weight: 800 !important;
}

span.ph-meta,
.mufy_ai_message_bubble span.ph-meta {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--grp-muted) !important;
}

span.ph-meta::before,
.mufy_ai_message_bubble span.ph-meta::before {
  content: "·" !important;
  margin-right: 8px !important;
  color: var(--grp-muted) !important;
}

p.ph-sub,
privhead p.ph-sub,
.mufy_ai_message_bubble p.ph-sub {
  margin: 6px 0 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--grp-blue) !important;
  letter-spacing: 0.02em !important;
}

privbody,
div.grp-privbody,
.mufy_ai_message_bubble privbody,
.mufy_ai_message_bubble div.grp-privbody {
  display: flex !important;
  flex-direction: column !important;
  padding: 4px 0 8px !important;
  background: var(--chat-screen) !important;
}

/* ========== 私聊折叠 wx-toggle（壳内折叠 · privhead 收回） ========== */
input.wx-toggle,
.mufy_ai_message_bubble input.wx-toggle {
  display: none !important;
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

label.wx-fold,
.mufy_ai_message_bubble label.wx-fold {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px 8px !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  min-height: 58px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  background: var(--chat-screen) !important;
  user-select: none !important;
}

span.wx-fold-face,
.mufy_ai_message_bubble span.wx-fold-face {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  flex: 1 1 auto !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--chat-phone) !important;
  line-height: 1.25 !important;
}

label.wx-fold::after,
.mufy_ai_message_bubble label.wx-fold::after {
  content: "›" !important;
  margin-left: auto !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--grp-muted) !important;
  align-self: center !important;
}

label.wx-collapse,
.mufy_ai_message_bubble label.wx-collapse {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  user-select: none !important;
}

label.wx-collapse privhead,
.mufy_ai_message_bubble label.wx-collapse privhead {
  display: block !important;
}

span.wx-dots,
.mufy_ai_message_bubble span.wx-dots {
  display: block !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2em !important;
  color: var(--grp-muted) !important;
  line-height: 1 !important;
}

privbody > privhead,
privbody > time,
privbody > div.l,
privbody > div.r,
privbody > sys,
privbody > msg-peer,
privbody > msg-user,
privbody > p.priv-narr,
.mufy_ai_message_bubble privbody > privhead,
.mufy_ai_message_bubble privbody > time,
.mufy_ai_message_bubble privbody > div.l,
.mufy_ai_message_bubble privbody > div.r,
.mufy_ai_message_bubble privbody > sys,
.mufy_ai_message_bubble privbody > msg-peer,
.mufy_ai_message_bubble privbody > msg-user,
.mufy_ai_message_bubble privbody > p.priv-narr {
  display: none !important;
}

privbody:has(> privbar) .wx-body > privbar,
.mufy_ai_message_bubble privbody:has(> privbar) .wx-body > privbar {
  display: none !important;
}

details.wechat > summary,
.mufy_ai_message_bubble details.wechat > summary {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  min-height: 58px !important;
  cursor: pointer !important;
  background: var(--chat-screen) !important;
  list-style: none !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--chat-phone) !important;
}

details.wechat > summary::after,
.mufy_ai_message_bubble details.wechat > summary::after {
  content: "›" !important;
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 18px !important;
  color: var(--grp-muted) !important;
}

details.wechat > summary,
.mufy_ai_message_bubble details.wechat > summary {
  position: relative !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

/* 旧 details 兼容：展开后隐藏 summary */
details.wechat[open] > summary,
.mufy_ai_message_bubble details.wechat[open] > summary {
  display: none !important;
}

details.wechat:not([open]) > *:not(summary),
.mufy_ai_message_bubble details.wechat:not([open]) > *:not(summary) {
  display: none !important;
}

.wx-body div.l,
details.wechat div.l,
.mufy_ai_message_bubble .wx-body div.l,
.mufy_ai_message_bubble details.wechat div.l {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  align-self: flex-start !important;
  margin: 5px var(--chat-pad) !important;
  padding: 0 !important;
  max-width: min(88%, 520px) !important;
}

.wx-body div.l > span,
details.wechat div.l > span,
.mufy_ai_message_bubble .wx-body div.l > span,
.mufy_ai_message_bubble details.wechat div.l > span {
  margin: 0 0 2px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: var(--grp-blue) !important;
  line-height: 1.3 !important;
}

.wx-body div.l > p,
details.wechat div.l > p,
.mufy_ai_message_bubble .wx-body div.l > p,
.mufy_ai_message_bubble details.wechat div.l > p {
  display: block !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--chat-phone) !important;
  background: var(--chat-npc) !important;
  border: var(--chat-stroke) solid var(--chat-phone) !important;
  border-radius: 18px 18px 18px 4px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1) !important;
  word-break: break-word !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.wx-body div.r,
.wx-body div.r.own,
details.wechat div.r,
details.wechat div.r.own,
.mufy_ai_message_bubble .wx-body div.r,
.mufy_ai_message_bubble details.wechat div.r {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  align-self: flex-end !important;
  margin: 5px var(--chat-pad) !important;
  padding: 0 !important;
  max-width: min(88%, 520px) !important;
}

.wx-body div.r > p,
.wx-body div.r.own > p,
details.wechat div.r > p,
details.wechat div.r.own > p,
.mufy_ai_message_bubble .wx-body div.r > p,
.mufy_ai_message_bubble details.wechat div.r > p {
  display: block !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--chat-phone) !important;
  background: var(--chat-user) !important;
  border: var(--chat-stroke) solid var(--chat-phone) !important;
  border-radius: 18px 18px 4px 18px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12) !important;
  word-break: break-word !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.wx-body sys,
details.wechat sys,
privbody .wx-body sys,
.mufy_ai_message_bubble .wx-body sys,
.mufy_ai_message_bubble details.wechat sys {
  display: block !important;
  margin: 6px auto !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--chat-typing) !important;
  text-align: center !important;
}

p.priv-narr,
privbody .wx-body p.priv-narr,
.mufy_ai_message_bubble p.priv-narr {
  display: block !important;
  margin: 10px var(--chat-pad) !important;
  padding: 12px 14px 12px 12px !important;
  font-family: "Songti SC", "Noto Serif SC", SimSun, serif !important;
  font-size: 13px !important;
  font-style: italic !important;
  line-height: 1.8 !important;
  color: #3a3a3a !important;
  background: var(--chat-narr-bg) !important;
  border: 2px solid var(--chat-phone) !important;
  border-left: 5px solid var(--chat-narr-accent) !important;
  border-radius: 6px !important;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.06) !important;
  text-indent: 0 !important;
}

msg-peer,
.mufy_ai_message_bubble msg-peer {
  display: grid !important;
  grid-template-columns: minmax(0, max-content) minmax(44px, 1fr) !important;
  grid-template-rows: auto !important;
  column-gap: 10px !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  margin: 5px 0 !important;
  padding: 0 var(--chat-pad) !important;
  width: 100% !important;
  max-width: 100% !important;
}

msg-peer bubble,
msg-peer p,
.mufy_ai_message_bubble msg-peer bubble,
.mufy_ai_message_bubble msg-peer p {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: block !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: var(--chat-phone) !important;
  background: var(--chat-npc) !important;
  border: var(--chat-stroke) solid var(--chat-phone) !important;
  border-radius: 18px 18px 18px 4px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1) !important;
  word-break: break-word !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

msg-peer stamp,
.mufy_ai_message_bubble msg-peer stamp {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

privbody msg-user,
privbody > msg-user,
.mufy_ai_message_bubble privbody msg-user {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  grid-template-rows: auto !important;
  column-gap: 10px !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 5px 0 !important;
  padding: 0 var(--chat-pad) !important;
  box-sizing: border-box !important;
}

privbody sys,
.mufy_ai_message_bubble privbody sys {
  display: block !important;
  margin: 6px auto !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--chat-typing) !important;
  text-align: center !important;
}

/* 旧版 dm 虚线框（已废弃，见 WB-07 priv） */
dm,
div.grp-dm,
.mufy_ai_message_bubble dm,
.mufy_ai_message_bubble div.grp-dm {
  display: none !important;
}

p.dm-head,
p.grp-dm-head,
.mufy_ai_message_bubble p.dm-head,
.mufy_ai_message_bubble p.grp-dm-head {
  display: none !important;
}

/* legacy dm styles removed */

/* ========== 叙事模式 story（卷宗 · 角标 · 单行 meta） ========== */
story,
.mufy_ai_message_bubble story {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 10px 0 16px !important;
  padding: 0 0 2px !important;
  background: var(--story-paper) !important;
  border: 3px solid var(--story-ink) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07) !important;
  overflow: visible !important;
  font-family: var(--grp-font) !important;
}

storyhead,
.mufy_ai_message_bubble storyhead {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: visible !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

span.story-badge,
.mufy_ai_message_bubble span.story-badge {
  position: absolute !important;
  top: 0 !important;
  left: 18px !important;
  transform: translateY(-50%) !important;
  display: inline-block !important;
  padding: 5px 14px !important;
  font-family: var(--grp-font) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  color: #fff !important;
  background: var(--story-badge) !important;
  border: 2px solid var(--story-ink) !important;
  border-radius: 3px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08) !important;
}

span.story-rate,
.mufy_ai_message_bubble span.story-rate {
  position: absolute !important;
  top: 0 !important;
  right: 18px !important;
  transform: translateY(-50%) !important;
  display: inline-block !important;
  padding: 5px 10px !important;
  font-family: var(--grp-font) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  color: #fff !important;
  background: var(--story-rate) !important;
  border: 2px solid var(--story-ink) !important;
  border-radius: 3px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08) !important;
}

storymeta,
.mufy_ai_message_bubble storymeta {
  display: block !important;
  margin: 0 !important;
  padding: 18px 22px 12px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(26, 26, 26, 0.14) !important;
}

p.story-meta-line,
.mufy_ai_message_bubble p.story-meta-line {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--grp-font) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  color: var(--story-meta) !important;
  letter-spacing: 0.02em !important;
  word-break: break-word !important;
}

storymeta item,
.mufy_ai_message_bubble storymeta item {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

storymeta item:not(:last-child)::after,
.mufy_ai_message_bubble storymeta item:not(:last-child)::after {
  content: " · " !important;
  color: rgba(122, 116, 104, 0.55) !important;
}

storymeta item label,
.mufy_ai_message_bubble storymeta item label {
  display: inline !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--story-meta) !important;
}

storymeta item value,
.mufy_ai_message_bubble storymeta item value {
  display: inline !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--story-meta) !important;
  line-height: 1.5 !important;
}

storymeta:has(p.story-meta-line) item,
.mufy_ai_message_bubble storymeta:has(p.story-meta-line) item {
  display: none !important;
}

storybody,
.mufy_ai_message_bubble storybody {
  display: block !important;
  padding: 18px 22px 24px !important;
}

storybody p,
.mufy_ai_message_bubble storybody p {
  margin: 0 0 1.05em !important;
  padding: 0 !important;
  font-family: "Songti SC", "Noto Serif SC", SimSun, serif !important;
  font-size: 15px !important;
  line-height: 1.92 !important;
  color: var(--story-ink) !important;
  text-align: left !important;
  text-indent: 0 !important;
  word-break: break-word !important;
}

storybody p:last-child,
.mufy_ai_message_bubble storybody p:last-child {
  margin-bottom: 0 !important;
}

chat + story,
story + chat,
chat + chat,
story + story,
.mufy_ai_message_bubble chat + story,
.mufy_ai_message_bubble story + chat {
  margin-top: 14px !important;
}

status-bottom,
.mufy_ai_message_bubble status-bottom {
  display: block !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
}

/* ========== 状态手机 sphone ========== */
sphone,
.sphone,
.grp-sphone,
.mufy_ai_message_bubble sphone,
.mufy_ai_message_bubble .grp-sphone {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 0 10px !important;
  background: var(--chat-screen) !important;
  border: 3px solid var(--chat-phone) !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden !important;
  font-family: var(--grp-font) !important;
}

sphone::after,
.grp-sphone::after,
.mufy_ai_message_bubble sphone::after {
  content: "" !important;
  display: block !important;
  width: 36% !important;
  height: 4px !important;
  margin: 8px auto 4px !important;
  background: var(--chat-phone) !important;
  border-radius: 999px !important;
  opacity: 0.35 !important;
}

sphonehead,
.mufy_ai_message_bubble sphonehead {
  padding: 10px 14px 11px !important;
  background: var(--grp-paper) !important;
  border-bottom: 2px solid var(--chat-phone) !important;
  text-align: center !important;
}

/* 旧版 sphonebar 字段兼容（逐步废弃） */
.sphonebar__dot,
.sphonebar__net,
.sphonebar__title,
.sphonebar__bat,
.mufy_ai_message_bubble .sphonebar__dot,
.mufy_ai_message_bubble .sphonebar__net,
.mufy_ai_message_bubble .sphonebar__title,
.mufy_ai_message_bubble .sphonebar__bat {
  display: none !important;
}

sphonehead p,
.mufy_ai_message_bubble sphonehead p {
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--chat-phone) !important;
  letter-spacing: 0.02em !important;
}

details.grp-spanel,
.mufy_ai_message_bubble details.grp-spanel {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--grp-line) !important;
  background: var(--grp-paper) !important;
}

details.grp-spanel:last-of-type,
.mufy_ai_message_bubble details.grp-spanel:last-of-type {
  border-bottom: none !important;
}

summary.grp-stab,
.mufy_ai_message_bubble summary.grp-stab {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 11px 14px 11px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--grp-ink) !important;
  background: var(--grp-paper) !important;
  border-left: 4px solid var(--grp-accent) !important;
  cursor: pointer !important;
  list-style: none !important;
}

summary.grp-stab::after,
.mufy_ai_message_bubble summary.grp-stab::after {
  content: "›" !important;
  margin-left: auto !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  color: var(--grp-muted) !important;
  transition: transform 0.15s ease !important;
}

details.grp-spanel[open] > summary.grp-stab::after,
.mufy_ai_message_bubble details.grp-spanel[open] > summary.grp-stab::after {
  transform: rotate(90deg) !important;
}

summary.grp-stab--user,
.mufy_ai_message_bubble summary.grp-stab--user {
  border-left-color: #4a90e2 !important;
}

summary.grp-stab--rules,
.mufy_ai_message_bubble summary.grp-stab--rules {
  border-left-color: #d4920a !important;
}

summary.grp-stab--members,
.mufy_ai_message_bubble summary.grp-stab--members {
  border-left-color: #e892a4 !important;
}

summary.grp-stab--intel,
.mufy_ai_message_bubble summary.grp-stab--intel {
  border-left-color: #7e68cf !important;
}

summary.grp-stab--memory,
.mufy_ai_message_bubble summary.grp-stab--memory {
  border-left-color: #9b59b6 !important;
}

summary.grp-stab--next,
.mufy_ai_message_bubble summary.grp-stab--next {
  border-left-color: var(--chat-bar) !important;
}

.grp-spanel__body,
.mufy_ai_message_bubble .grp-spanel__body {
  padding: 8px 12px 12px !important;
  background: #fafafa !important;
  border-top: 1px dashed var(--grp-line) !important;
}

details.grp-mem,
.mufy_ai_message_bubble details.grp-mem {
  margin: 0 0 8px !important;
  border: 1px solid var(--grp-line) !important;
  border-radius: var(--grp-radius-sm) !important;
  overflow: hidden !important;
  background: var(--grp-paper) !important;
}

details.grp-mem:last-child,
.mufy_ai_message_bubble details.grp-mem:last-child {
  margin-bottom: 0 !important;
}

summary.grp-mem__tab,
.mufy_ai_message_bubble summary.grp-mem__tab {
  display: flex !important;
  align-items: center !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--grp-blue) !important;
  background: rgba(87, 107, 149, 0.06) !important;
  cursor: pointer !important;
  list-style: none !important;
}

summary.grp-mem__tab::after,
.mufy_ai_message_bubble summary.grp-mem__tab::after {
  content: "›" !important;
  margin-left: auto !important;
  color: var(--grp-muted) !important;
}

details.grp-mem[open] > summary.grp-mem__tab::after,
.mufy_ai_message_bubble details.grp-mem[open] > summary.grp-mem__tab::after {
  transform: rotate(90deg) !important;
}

.grp-mem__body,
.mufy_ai_message_bubble .grp-mem__body {
  padding: 8px 10px 10px !important;
}

.grp-reliquary,
.mufy_ai_message_bubble .grp-reliquary {
  display: block !important;
}

details.grp-rel-sub,
.mufy_ai_message_bubble details.grp-rel-sub {
  margin: 0 0 8px !important;
  border: 1px solid var(--grp-line) !important;
  border-radius: var(--grp-radius-sm) !important;
  overflow: hidden !important;
  background: var(--grp-paper) !important;
}

details.grp-rel-sub:last-child,
.mufy_ai_message_bubble details.grp-rel-sub:last-child {
  margin-bottom: 0 !important;
}

summary.grp-rel-subtab,
.mufy_ai_message_bubble summary.grp-rel-subtab {
  display: block !important;
  padding: 8px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-align: center !important;
  letter-spacing: 0.06em !important;
  color: var(--grp-blue) !important;
  background: rgba(155, 89, 182, 0.08) !important;
  border-bottom: 1px solid var(--grp-line) !important;
  cursor: pointer !important;
  list-style: none !important;
}

.grp-rel-body,
.mufy_ai_message_bubble .grp-rel-body {
  padding: 8px 10px !important;
}

.grp-mem-h,
.mufy_ai_message_bubble .grp-mem-h {
  margin: 0 0 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  color: #6b6588 !important;
  text-align: center !important;
}

.grp-mem-sep,
.mufy_ai_message_bubble .grp-mem-sep {
  margin: 10px 0 !important;
  text-align: center !important;
  font-size: 11px !important;
  color: var(--grp-muted) !important;
}

table.grp-mem-t,
.grp-mem-t,
.mufy_ai_message_bubble table.grp-mem-t {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  font-size: 10px !important;
  line-height: 1.45 !important;
  color: var(--grp-ink) !important;
  background: var(--grp-paper) !important;
  border: 1px solid var(--grp-line) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

table.grp-mem-t th,
.grp-mem-t th,
.mufy_ai_message_bubble table.grp-mem-t th {
  padding: 5px 3px !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  color: #6b6588 !important;
  background: rgba(107, 101, 136, 0.08) !important;
  border-bottom: 1px solid var(--grp-line) !important;
  text-align: left !important;
}

table.grp-mem-t td,
.grp-mem-t td,
.mufy_ai_message_bubble table.grp-mem-t td {
  padding: 5px 3px !important;
  vertical-align: top !important;
  word-break: break-word !important;
  border-bottom: 1px solid rgba(224, 224, 224, 0.6) !important;
}

table.grp-mem-t tr:last-child td,
.mufy_ai_message_bubble table.grp-mem-t tr:last-child td {
  border-bottom: none !important;
}

table.grp-mem-t th:nth-child(1),
table.grp-mem-t td:nth-child(1),
.mufy_ai_message_bubble table.grp-mem-t th:nth-child(1),
.mufy_ai_message_bubble table.grp-mem-t td:nth-child(1) {
  width: 10% !important;
}

table.grp-mem-t th:nth-child(2),
table.grp-mem-t td:nth-child(2),
.mufy_ai_message_bubble table.grp-mem-t th:nth-child(2),
.mufy_ai_message_bubble table.grp-mem-t td:nth-child(2) {
  width: 22% !important;
}

table.grp-mem-t th:nth-child(3),
table.grp-mem-t td:nth-child(3),
.mufy_ai_message_bubble table.grp-mem-t th:nth-child(3),
.mufy_ai_message_bubble table.grp-mem-t td:nth-child(3) {
  width: 18% !important;
}

.grp-spanel--next suggested_questions,
.mufy_ai_message_bubble .grp-spanel--next suggested_questions {
  display: block !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
  white-space: pre-wrap !important;
  color: var(--grp-ink) !important;
  background: rgba(245, 213, 71, 0.18) !important;
  border-radius: var(--grp-radius-sm) !important;
  border-left: 3px solid var(--chat-bar) !important;
}

item,
.mufy_ai_message_bubble item {
  display: grid !important;
  grid-template-columns: 72px 1fr !important;
  gap: 4px 10px !important;
  align-items: center !important;
  margin: 0 0 8px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px dashed var(--grp-line) !important;
}

item:last-child,
.mufy_ai_message_bubble item:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

item label,
.mufy_ai_message_bubble item label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--grp-blue) !important;
  line-height: 1.4 !important;
}

item value,
.mufy_ai_message_bubble item value {
  display: block !important;
  font-size: 12px !important;
  color: var(--grp-ink) !important;
  line-height: 1.45 !important;
  word-break: break-word !important;
}

bar-container,
.mufy_ai_message_bubble bar-container {
  display: block !important;
  grid-column: 1 / -1 !important;
  height: 6px !important;
  margin: 2px 0 0 !important;
  background: var(--grp-bg) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
}

bar-fill,
.mufy_ai_message_bubble bar-fill {
  display: block !important;
  height: 100% !important;
  min-width: 0 !important;
  border-radius: 999px !important;
}

bar-fill.favor,
.mufy_ai_message_bubble bar-fill.favor {
  background: linear-gradient(90deg, var(--grp-green), var(--grp-green-light)) !important;
}

bar-fill.vibe,
.mufy_ai_message_bubble bar-fill.vibe {
  background: linear-gradient(90deg, #8e44ad, var(--grp-vibe)) !important;
}

.grp-roster item,
.mufy_ai_message_bubble .grp-roster item {
  grid-template-columns: 64px 1fr !important;
}

#ai-chat-input,
#mufy_chat_input_box {
  border-radius: 10px !important;
  border-color: var(--grp-line) !important;
}

#ai-send-button {
  background: var(--grp-green) !important;
  border-color: var(--grp-green) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

/* ========== MUFY 外壳穿透 · 避免白底盖住 chat/story ========== */
div[class*="overflow-y-auto"]:has(div.markdown-body),
div[class*="flex-1"]:has(div.markdown-body),
main:has(div.markdown-body),
div[class*="flex-col"]:has(div.markdown-body):has(#ai-chat-input),
div[class*="flex-col"]:has(div.markdown-body):has(#mufy_chat_input_box) {
  background: transparent !important;
}

#customized-answer-content,
#customized-question-content,
div[class*="relative"][class*="group"]:has(div.markdown-body),
div[class*="relative"][class*="group"]:has(.mufy_ai_message_bubble),
.mufy_user_message_bubble,
div[class*="group"]:has(.mufy_ai_message_bubble) {
  background-color: rgba(245, 245, 245, 0.55) !important;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, transparent 58%) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(10px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.06) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06) !important;
  padding: 10px 12px !important;
  margin: 8px 0 !important;
}

div[class*="relative"][class*="group"]:has(div.markdown-body)::before,
div[class*="relative"][class*="group"]:has(div.markdown-body)::after,
div[class*="relative"][class*="group"]:has(.mufy_ai_message_bubble)::before,
div[class*="relative"][class*="group"]:has(.mufy_ai_message_bubble)::after {
  display: none !important;
  content: none !important;
}

div[class*="bg-white"]:has(div.markdown-body),
div[class*="relative"][class*="group"]:has(div.markdown-body) > div[class*="bg-white"],
div[class*="relative"][class*="group"]:has(div.markdown-body) > div[class*="rounded"],
div[class*="relative"][class*="group"]:has(.mufy_ai_message_bubble) > div[class*="bg-white"],
#customized-answer-content > div[class*="bg-white"],
#customized-question-content > div[class*="bg-white"] {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.mufy_ai_message_bubble div.markdown-body,
.mufy_ai_message_bubble .markdown-body {
  background: transparent !important;
  padding: 0 !important;
}

.mufy_ai_message_bubble div.markdown-body > chat,
.mufy_ai_message_bubble div.markdown-body > story,
.mufy_ai_message_bubble div.markdown-body > status-bottom,
.mufy_ai_message_bubble .markdown-body > chat,
.mufy_ai_message_bubble .markdown-body > story,
.mufy_ai_message_bubble .markdown-body > status-bottom {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
}

.mufy_ai_message_bubble div.markdown-body chat,
.mufy_ai_message_bubble div.markdown-body chatbody,
.mufy_ai_message_bubble .markdown-body chat,
.mufy_ai_message_bubble .markdown-body chatbody {
  max-width: 100% !important;
}

.mufy_ai_message_bubble div.markdown-body chatbody > p:not(.ch-narr):not(.grp-narr),
.mufy_ai_message_bubble .markdown-body chatbody > p:not(.ch-narr):not(.grp-narr) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
