/**
 * 《哈？分手？…》· Reply UI · v1.0 渋谷恋文
 * 雨夜东京 · 玫瑰香槟 · 对齐开局 UI v2.0
 * MUFY「CSS 美化」栏整份粘贴 · 禁止 @import · 变量仅 ASCII
 */

:root {
  --mz-font: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mz-serif: "Songti SC", "Noto Serif SC", SimSun, serif;
  --mz-ink: #08060a;
  --mz-sheet: #16121c;
  --mz-panel: #1a1522;
  --mz-panel-soft: #221c2c;
  --mz-glass: rgba(255, 252, 254, 0.04);
  --mz-line: rgba(255, 255, 255, 0.1);
  --mz-line-rose: rgba(212, 114, 132, 0.42);
  --mz-pearl: #f5f2f8;
  --mz-pearl-soft: #e8e2f0;
  --mz-text: #e4dff0;
  --mz-muted: #c4bdd4;
  --mz-dim: #9a92a8;
  --mz-rose: #d47284;
  --mz-rose-light: #efb0bc;
  --mz-rose-deep: #9e4a5a;
  --mz-champagne: #c9a876;
  --mz-champagne-bright: #e8c898;
  --mz-neon-pink: #ff8fab;
  --mz-neon-cyan: #6ec4e8;
  --mz-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
  --mz-radius: 8px;
  --mz-radius-sm: 6px;
}

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

/* ========== MUFY 气泡：透明壳 ========== */
.mufy_ai_message_bubble {
  color: #e4dff0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  font-family: var(--mz-font) !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
}

.mufy_ai_message_bubble::before,
.mufy_ai_message_bubble::after {
  display: none !important;
  content: 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;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

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

redacted_thinking:not(:has(.thinking-body)),
.mufy_ai_message_bubble redacted_thinking:not(:has(.thinking-body)) {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

think,
.thinking,
reasoning,
[thinking] {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ========== details 重置 ========== */
.mufy_ai_message_bubble details,
details,
.mufy_ai_message_bubble status-top details,
.mufy_ai_message_bubble status-mid details,
.mufy_ai_message_bubble status-bottom details {
  list-style: none !important;
}

.mufy_ai_message_bubble summary,
.mufy_ai_message_bubble details > summary,
details > summary,
.mufy_ai_message_bubble status-bottom details > summary {
  list-style: none !important;
}

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

/* ========== 面板通用 · 恋文装饰框 ========== */
details.gal-think,
.mufy_ai_message_bubble details.gal-think,
details.gal-fold,
.mufy_ai_message_bubble details.gal-fold,
status-bottom > details,
.mufy_ai_message_bubble status-bottom > details {
  position: relative !important;
  display: block !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  background-color: #1a1522 !important;
  background-image: linear-gradient(180deg, rgba(212, 114, 132, 0.06) 0%, transparent 28%) !important;
  border: 1px solid rgba(212, 114, 132, 0.35) !important;
  border-top: 2px solid #d47284 !important;
  border-radius: var(--mz-radius) !important;
  box-shadow: var(--mz-shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  overflow: hidden !important;
}

details.gal-think > summary,
details.gal-fold > summary,
status-bottom > details > summary,
.mufy_ai_message_bubble details.gal-think > summary,
.mufy_ai_message_bubble details.gal-fold > summary,
.mufy_ai_message_bubble status-bottom > details > summary {
  position: relative !important;
  display: block !important;
  list-style: none !important;
  padding: 13px 36px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-align: center !important;
  color: #f5f2f8 !important;
  text-shadow: 0 0 20px rgba(212, 114, 132, 0.35) !important;
  background: linear-gradient(90deg, rgba(158, 74, 90, 0.55) 0%, rgba(212, 114, 132, 0.35) 50%, rgba(201, 168, 118, 0.25) 100%) !important;
  background-color: #241c28 !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
}

details.gal-think[open] > summary,
details.gal-fold[open] > summary,
status-bottom > details[open] > summary,
.mufy_ai_message_bubble details.gal-think[open] > summary,
.mufy_ai_message_bubble details.gal-fold[open] > summary,
.mufy_ai_message_bubble status-bottom > details[open] > summary {
  border-bottom: 1px solid rgba(212, 114, 132, 0.28) !important;
}

details.gal-think > summary::after,
details.gal-fold > summary::after,
status-bottom > details > summary::after,
.mufy_ai_message_bubble details.gal-think > summary::after,
.mufy_ai_message_bubble details.gal-fold > summary::after,
.mufy_ai_message_bubble status-bottom > details > summary::after {
  content: "" !important;
  position: absolute !important;
  right: 14px !important;
  top: 50% !important;
  width: 6px !important;
  height: 6px !important;
  margin-top: -4px !important;
  border-right: 2px solid #efb0bc !important;
  border-bottom: 2px solid #efb0bc !important;
  transform: rotate(45deg) !important;
  transition: transform 0.2s ease !important;
}

details.gal-think[open] > summary::after,
details.gal-fold[open] > summary::after,
status-bottom > details[open] > summary::after,
.mufy_ai_message_bubble details.gal-think[open] > summary::after,
.mufy_ai_message_bubble details.gal-fold[open] > summary::after,
.mufy_ai_message_bubble status-bottom > details[open] > summary::after {
  transform: rotate(-135deg) !important;
  margin-top: -2px !important;
}

/* ========== 演算检查 ========== */
.gal-think__body,
.mufy_ai_message_bubble .gal-think__body {
  padding: 10px 12px 14px !important;
  background-color: #14101c !important;
}

details.gal-think details,
.mufy_ai_message_bubble details.gal-think details {
  margin: 0 0 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 1px solid rgba(212, 114, 132, 0.2) !important;
  border-radius: 4px !important;
  background-color: #1a1522 !important;
  box-shadow: none !important;
}

details.gal-think details > summary,
.mufy_ai_message_bubble details.gal-think details > summary {
  padding: 9px 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-align: left !important;
  color: #c4bdd4 !important;
  background-color: #221c2c !important;
}

.gal-think__line,
.mufy_ai_message_bubble .gal-think__line {
  margin: 0 !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  line-height: 1.7 !important;
  color: #e8e2f0 !important;
  font-family: Consolas, "Microsoft YaHei Mono", monospace !important;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.08) !important;
  background-color: #16121c !important;
}

.gal-think__line:last-child,
.mufy_ai_message_bubble .gal-think__line:last-child {
  border-bottom: none !important;
}

/* ========== 顶栏 / 中段 ========== */
status-top,
.mufy_ai_message_bubble status-top,
status-mid,
.mufy_ai_message_bubble status-mid,
status-bottom,
.mufy_ai_message_bubble status-bottom {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

status-top,
.mufy_ai_message_bubble status-top {
  margin-bottom: 12px !important;
}

status-mid,
.mufy_ai_message_bubble status-mid {
  margin: 12px 0 !important;
}

/* ========== 场景板 ========== */
details.gal-fold .gal-board__body,
.mufy_ai_message_bubble details.gal-fold .gal-board__body,
.gal-board__body,
.mufy_ai_message_bubble .gal-board__body {
  padding: 12px 14px 14px !important;
  background-color: #14101c !important;
}

.gal-board__line,
p.gal-board__line,
.mufy_ai_message_bubble .gal-board__line {
  margin: 0 0 8px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: #e4dff0 !important;
  background-color: rgba(22, 18, 28, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 2px solid rgba(110, 196, 232, 0.45) !important;
  border-radius: 4px !important;
}

.gal-board__line:last-child,
.mufy_ai_message_bubble .gal-board__line:last-child {
  margin-bottom: 0 !important;
}

.gal-board__line--gap,
.mufy_ai_message_bubble .gal-board__line--gap {
  margin-top: 4px !important;
  border-left-color: rgba(212, 114, 132, 0.45) !important;
}

.gal-board__body location,
.mufy_ai_message_bubble .gal-board__body location {
  color: #6ec4e8 !important;
  font-weight: 600 !important;
  text-shadow: 0 0 12px rgba(110, 196, 232, 0.25) !important;
}

.gal-board__body time,
.mufy_ai_message_bubble .gal-board__body time {
  color: #e8c898 !important;
  font-weight: 600 !important;
}

.gal-board__body weather,
.mufy_ai_message_bubble .gal-board__body weather {
  color: #efb0bc !important;
}

.gal-board__body scene,
.mufy_ai_message_bubble .gal-board__body scene {
  color: #e4dff0 !important;
}

/* ========== 正文 · gal-text ========== */
.gal-text,
div.gal-text,
.mufy_ai_message_bubble .gal-text,
.mufy_ai_message_bubble div.gal-text {
  display: block !important;
  position: relative !important;
  margin: 0 0 14px !important;
  padding: 22px 24px 26px !important;
  background-color: #16121c !important;
  background-image:
    linear-gradient(180deg, rgba(212, 114, 132, 0.08) 0%, transparent 35%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0%, transparent 40%) !important;
  border: 1px solid rgba(212, 114, 132, 0.35) !important;
  border-left: 3px solid #d47284 !important;
  border-radius: var(--mz-radius) !important;
  box-shadow: var(--mz-shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  text-align: left !important;
  color: #e4dff0 !important;
  line-height: 1.85 !important;
  overflow: hidden !important;
}

.gal-text__head,
.mufy_ai_message_bubble .gal-text__head {
  display: block !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
}

.story-tag,
span.story-tag,
.mufy_ai_message_bubble .story-tag {
  display: inline-block !important;
  padding: 3px 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  color: #e8c898 !important;
  background-color: rgba(201, 168, 118, 0.12) !important;
  border: 1px solid rgba(201, 168, 118, 0.35) !important;
  border-radius: 2px !important;
  box-shadow: 0 0 16px rgba(201, 168, 118, 0.12) !important;
}

.gal-text p,
div.gal-text p,
.mufy_ai_message_bubble .gal-text p {
  display: block !important;
  margin: 0 0 1.15em !important;
  padding: 0 !important;
  text-indent: 2em !important;
  text-align: left !important;
  font-family: var(--mz-serif) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.95 !important;
  color: #f5f2f8 !important;
  background: transparent !important;
}

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

/* ========== 档案块 / item ========== */
status-bottom details details,
.mufy_ai_message_bubble status-bottom details details,
.profile-block,
div.profile-block,
.mufy_ai_message_bubble .profile-block {
  margin: 8px 10px 12px !important;
  padding: 0 !important;
  background-color: #16121c !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

status-bottom details details > summary,
.profile-block__title,
p.profile-block__title,
.mufy_ai_message_bubble status-bottom details details > summary,
.mufy_ai_message_bubble .profile-block__title {
  margin: 0 !important;
  padding: 9px 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  text-align: left !important;
  color: #e8c898 !important;
  background-color: #221c2c !important;
  border-bottom: 1px solid rgba(212, 114, 132, 0.22) !important;
  cursor: pointer !important;
}

.profile-basic,
div.profile-basic,
.mufy_ai_message_bubble .profile-basic {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
}

.profile-basic__info,
.mufy_ai_message_bubble .profile-basic__info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.profile-portrait,
div.profile-portrait,
.mufy_ai_message_bubble .profile-portrait {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 168px !important;
  max-width: 36vw !important;
  aspect-ratio: 9 / 12 !important;
  margin: 10px 12px 10px 4px !important;
  background-color: #0c0a10 !important;
  border: 1px solid rgba(212, 114, 132, 0.35) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  box-shadow: 0 0 24px rgba(212, 114, 132, 0.15) !important;
}

.profile-portrait__ph,
.mufy_ai_message_bubble .profile-portrait__ph {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2em !important;
  color: rgba(212, 114, 132, 0.35) !important;
  pointer-events: none !important;
}

.profile-portrait__img,
img.profile-portrait__img,
.mufy_ai_message_bubble .profile-portrait__img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important;
}

.profile-portrait__img[src=""],
.profile-portrait__img:not([src]),
.mufy_ai_message_bubble .profile-portrait__img[src=""] {
  display: none !important;
}

item,
.mufy_ai_message_bubble item {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 8px 12px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

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

item label,
.mufy_ai_message_bubble item label {
  flex-shrink: 0 !important;
  display: inline-block !important;
  padding: 2px 8px 3px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  color: #efb0bc !important;
  background-color: rgba(212, 114, 132, 0.12) !important;
  border: 1px solid rgba(212, 114, 132, 0.3) !important;
  border-radius: 2px !important;
}

item value,
.mufy_ai_message_bubble item value {
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  color: #f5f2f8 !important;
  text-align: left !important;
}

item:has(bar-container),
item:has(.bar-container),
.mufy_ai_message_bubble item:has(bar-container),
.mufy_ai_message_bubble item:has(.bar-container) {
  display: block !important;
}

item:has(bar-container) label,
item:has(.bar-container) label,
.mufy_ai_message_bubble item:has(bar-container) label {
  display: inline-block !important;
  margin-bottom: 8px !important;
}

item bar-container,
item .bar-container,
.mufy_ai_message_bubble item bar-container,
.mufy_ai_message_bubble item .bar-container {
  display: block !important;
  width: 100% !important;
}

item.inner,
.mufy_ai_message_bubble item.inner {
  background-color: rgba(212, 114, 132, 0.08) !important;
  border-left: 2px solid #d47284 !important;
  font-style: italic !important;
}

item.inner value,
.mufy_ai_message_bubble item.inner value {
  color: #efb0bc !important;
}

tip,
.mufy_ai_message_bubble tip {
  display: block !important;
  margin-top: 5px !important;
  font-size: 12px !important;
  color: #c4bdd4 !important;
}

/* ========== 进度条 ========== */
bar-container,
.bar-container,
.mufy_ai_message_bubble bar-container,
.mufy_ai_message_bubble .bar-container {
  display: block !important;
  width: 100% !important;
  height: 6px !important;
  margin: 2px 0 4px !important;
  padding: 0 !important;
  background-color: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 3px !important;
  overflow: hidden !important;
}

bar-fill,
.bar-fill,
.mufy_ai_message_bubble bar-fill,
.mufy_ai_message_bubble .bar-fill {
  display: block !important;
  height: 100% !important;
  min-width: 2% !important;
  max-width: 100% !important;
  font-size: 0 !important;
  line-height: 0 !important;
  border-radius: 2px !important;
}

bar-fill.favor--pos,
.bar-fill.favor--pos,
bar-fill.favor,
.bar-fill.favor,
.mufy_ai_message_bubble bar-fill.favor--pos,
.mufy_ai_message_bubble .bar-fill.favor--pos,
.mufy_ai_message_bubble bar-fill.favor,
.mufy_ai_message_bubble .bar-fill.favor {
  background-color: #d47284 !important;
  background-image: linear-gradient(90deg, #9e4a5a, #d47284, #efb0bc) !important;
  box-shadow: 0 0 12px rgba(212, 114, 132, 0.45) !important;
}

bar-fill.favor--neg,
.bar-fill.favor--neg,
.mufy_ai_message_bubble bar-fill.favor--neg,
.mufy_ai_message_bubble .bar-fill.favor--neg {
  background-color: #3a3040 !important;
  background-image: linear-gradient(90deg, #2a2030, #4a4050) !important;
}

bar-fill.jealous,
.bar-fill.jealous,
.mufy_ai_message_bubble bar-fill.jealous,
.mufy_ai_message_bubble .bar-fill.jealous {
  background-color: #6ec4e8 !important;
  background-image: linear-gradient(90deg, #4a88a8, #6ec4e8, #9ed8f0) !important;
  box-shadow: 0 0 10px rgba(110, 196, 232, 0.35) !important;
}

bar-fill[style*="width:0"],
.bar-fill[style*="width:0"],
.mufy_ai_message_bubble bar-fill[style*="width:0"] {
  min-width: 0 !important;
}

/* ========== 记忆回廊 ========== */
.mem-zone,
div.mem-zone,
.mufy_ai_message_bubble .mem-zone {
  padding: 4px 0 8px !important;
}

.mem-zone > details,
.mufy_ai_message_bubble .mem-zone > details {
  margin: 0 10px 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  background-color: #16121c !important;
  box-shadow: none !important;
}

.mem-zone > details > summary,
.mufy_ai_message_bubble .mem-zone > details > summary {
  padding: 9px 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  color: #e8c898 !important;
  background-color: #221c2c !important;
  cursor: pointer !important;
}

.mem-zone > details[open] > summary,
.mufy_ai_message_bubble .mem-zone > details[open] > summary {
  border-bottom: 1px solid rgba(212, 114, 132, 0.22) !important;
}

.mem-list,
.mufy_ai_message_bubble .mem-list {
  padding: 8px 10px 10px !important;
}

item.mem-item,
.mufy_ai_message_bubble item.mem-item {
  background-color: rgba(22, 18, 28, 0.92) !important;
  border-left: 2px solid #d47284 !important;
  margin-bottom: 8px !important;
}

item.mem-item--long,
.mufy_ai_message_bubble item.mem-item--long {
  background-color: rgba(201, 168, 118, 0.08) !important;
  border-left-color: #c9a876 !important;
}

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

/* ========== 建议 · 恋文卡片 ========== */
.sticky-row,
div.sticky-row,
.mufy_ai_message_bubble .sticky-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 14px 12px 16px !important;
  background-color: #14101c !important;
}

suggest.sticky-note,
.sticky-note,
.mufy_ai_message_bubble suggest.sticky-note {
  position: relative !important;
  flex: 1 1 calc(33.333% - 8px) !important;
  min-width: 96px !important;
  max-width: 34% !important;
  margin: 0 !important;
  padding: 14px 12px 12px !important;
  background-color: #1a1522 !important;
  border: 1px solid rgba(212, 114, 132, 0.28) !important;
  border-top: 2px solid #d47284 !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  transform: none !important;
}

suggest.sticky-note--b,
.sticky-note--b,
.mufy_ai_message_bubble .sticky-note--b {
  border-top-color: #c9a876 !important;
}

suggest.sticky-note--c,
.sticky-note--c,
.mufy_ai_message_bubble .sticky-note--c {
  border-top-color: #6ec4e8 !important;
}

suggest.sticky-note option,
.sticky-note option,
.mufy_ai_message_bubble suggest.sticky-note option {
  display: block !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: #f5f2f8 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

suggest.sticky-note desc,
.sticky-note desc,
.mufy_ai_message_bubble suggest.sticky-note desc {
  display: block !important;
  margin-top: 8px !important;
  font-size: 11.5px !important;
  line-height: 1.55 !important;
  color: #c4bdd4 !important;
}

trend,
.mufy_ai_message_bubble trend {
  display: none !important;
}

/* ========== 焦点卡 / 主角面板 ========== */
.hero-card,
div.hero-card,
.mufy_ai_message_bubble .hero-card {
  padding: 4px 0 8px !important;
}

.hero-card .profile-block,
.mufy_ai_message_bubble .hero-card .profile-block {
  margin: 8px 10px 10px !important;
}

.gal-player__body,
.mufy_ai_message_bubble .gal-player__body {
  padding: 0 !important;
}

.gal-player__body details,
.hero-card details,
.mufy_ai_message_bubble .gal-player__body details,
.mufy_ai_message_bubble .hero-card details {
  margin: 0 10px 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 4px !important;
  background-color: #16121c !important;
  box-shadow: none !important;
}

.gal-player__body details > summary,
.hero-card details > summary,
.mufy_ai_message_bubble .gal-player__body details > summary,
.mufy_ai_message_bubble .hero-card details > summary {
  padding: 9px 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  color: #c4bdd4 !important;
  background-color: #221c2c !important;
}

.gal-player__body details[open] > summary,
.hero-card details[open] > summary,
.mufy_ai_message_bubble .gal-player__body details[open] > summary,
.mufy_ai_message_bubble .hero-card details[open] > summary {
  border-bottom: 1px solid rgba(212, 114, 132, 0.22) !important;
}

/* ========== 手机 · 霓虹东京 ========== */
.phone-panel,
div.phone-panel,
.mufy_ai_message_bubble .phone-panel {
  padding: 16px 12px 18px !important;
  background: linear-gradient(180deg, rgba(212, 114, 132, 0.12) 0%, rgba(12, 10, 16, 0.95) 100%) !important;
  border-radius: 0 0 14px 14px !important;
}

.phone-device,
div.phone-device,
.mufy_ai_message_bubble .phone-device {
  position: relative !important;
  max-width: 300px !important;
  margin: 0 auto !important;
  padding: 6px 6px 8px !important;
  background: linear-gradient(160deg, #2a2434, #0c0a10) !important;
  border: 1px solid rgba(212, 114, 132, 0.25) !important;
  border-radius: 32px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(212, 114, 132, 0.12) !important;
}

.phone-island,
div.phone-island,
.mufy_ai_message_bubble .phone-island {
  position: absolute !important;
  top: 14px !important;
  left: 50% !important;
  z-index: 5 !important;
  width: 68px !important;
  height: 18px !important;
  margin: 0 0 0 -34px !important;
  background: #08060a !important;
  border-radius: 12px !important;
  pointer-events: none !important;
}

.phone-screen,
div.phone-screen,
.mufy_ai_message_bubble .phone-screen {
  margin: 0 !important;
  border-radius: 26px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #1e1828 0%, #16121c 100%) !important;
}

.phone-statusbar,
div.phone-statusbar,
.mufy_ai_message_bubble .phone-statusbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 26px 18px 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #f5f2f8 !important;
  background: linear-gradient(180deg, rgba(212, 114, 132, 0.35), rgba(22, 18, 28, 0.95)) !important;
}

.phone-statusbar__icons,
span.phone-statusbar__icons,
.mufy_ai_message_bubble .phone-statusbar__icons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.phone-net,
span.phone-net,
.mufy_ai_message_bubble .phone-net {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #6ec4e8 !important;
}

.phone-bars,
span.phone-bars,
.mufy_ai_message_bubble .phone-bars {
  display: inline-flex !important;
  align-items: flex-end !important;
  gap: 1.5px !important;
  height: 10px !important;
  padding: 0 2px !important;
}

.phone-bars i,
.mufy_ai_message_bubble .phone-bars i {
  display: block !important;
  width: 2.5px !important;
  background: #efb0bc !important;
  border-radius: 1px !important;
}

.phone-bars i:nth-child(1),
.mufy_ai_message_bubble .phone-bars i:nth-child(1) { height: 3px !important; }
.phone-bars i:nth-child(2),
.mufy_ai_message_bubble .phone-bars i:nth-child(2) { height: 5px !important; }
.phone-bars i:nth-child(3),
.mufy_ai_message_bubble .phone-bars i:nth-child(3) { height: 7px !important; }
.phone-bars i:nth-child(4),
.mufy_ai_message_bubble .phone-bars i:nth-child(4) { height: 9px !important; }

.phone-batt,
span.phone-batt,
.mufy_ai_message_bubble .phone-batt {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #e8c898 !important;
}

.phone-batt::before,
.mufy_ai_message_bubble .phone-batt::before {
  content: "🔋" !important;
  margin-right: 2px !important;
  font-size: 10px !important;
}

.phone-scroll,
div.phone-scroll,
.mufy_ai_message_bubble .phone-scroll {
  padding: 10px 10px 14px !important;
  max-height: none !important;
}

.phone-card,
div.phone-card,
.mufy_ai_message_bubble .phone-card {
  margin-bottom: 10px !important;
  background: #221c2c !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.phone-card:last-child,
.mufy_ai_message_bubble .phone-card:last-child {
  margin-bottom: 0 !important;
}

.phone-card__head,
div.phone-card__head,
.mufy_ai_message_bubble .phone-card__head {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 14px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #fff !important;
}

.phone-card__head--wx,
.mufy_ai_message_bubble .phone-card__head--wx {
  background: linear-gradient(90deg, #9e4a5a, #d47284) !important;
}

.phone-card__head--group,
.mufy_ai_message_bubble .phone-card__head--group {
  background: linear-gradient(90deg, #6a5088, #9a7ab8) !important;
}

.phone-card__head--cal,
.mufy_ai_message_bubble .phone-card__head--cal {
  background: linear-gradient(90deg, #4a88a8, #6ec4e8) !important;
}

.phone-card__icon,
span.phone-card__icon,
.mufy_ai_message_bubble .phone-card__icon {
  font-size: 15px !important;
  line-height: 1 !important;
}

.phone-card__body,
div.phone-card__body,
.mufy_ai_message_bubble .phone-card__body {
  padding: 4px 0 !important;
}

.phone-msg,
div.phone-msg,
.mufy_ai_message_bubble .phone-msg {
  padding: 10px 14px !important;
  background: #1a1522 !important;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.06) !important;
}

.phone-msg:last-child,
.mufy_ai_message_bubble .phone-msg:last-child {
  border-bottom: none !important;
}

.phone-msg--me,
.mufy_ai_message_bubble .phone-msg--me {
  background: rgba(212, 114, 132, 0.1) !important;
}

.phone-msg__meta,
p.phone-msg__meta,
.mufy_ai_message_bubble .phone-msg__meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  margin: 0 0 4px !important;
  font-size: 12px !important;
}

.phone-msg__meta strong,
.mufy_ai_message_bubble .phone-msg__meta strong {
  color: #efb0bc !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

.phone-msg__meta time,
.mufy_ai_message_bubble .phone-msg__meta time {
  font-size: 11px !important;
  color: #9a92a8 !important;
  font-style: normal !important;
}

.phone-msg__text,
p.phone-msg__text,
.mufy_ai_message_bubble .phone-msg__text {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #e4dff0 !important;
  font-weight: 500 !important;
}

.phone-msg--me .phone-msg__text,
.mufy_ai_message_bubble .phone-msg--me .phone-msg__text {
  color: #ffb7c9 !important;
}

/* ========== 脉冲 / 杂项 ========== */
pulse,
.pulse,
.mufy_ai_message_bubble pulse {
  display: block !important;
  margin: 4px 0 6px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  border-radius: 4px !important;
}

pulse.pulse--love,
.mufy_ai_message_bubble pulse.pulse--love {
  color: #efb0bc !important;
  background-color: rgba(212, 114, 132, 0.12) !important;
}

pulse.pulse--hate,
.mufy_ai_message_bubble pulse.pulse--hate {
  color: #ff8fab !important;
  background-color: rgba(158, 74, 90, 0.2) !important;
}

@media (max-width: 520px) {
  .profile-basic,
  .mufy_ai_message_bubble .profile-basic {
    flex-direction: column !important;
  }

  .profile-portrait,
  .mufy_ai_message_bubble .profile-portrait {
    width: 100% !important;
    max-width: 200px !important;
    margin: 8px auto 10px !important;
  }

  suggest.sticky-note,
  .sticky-note,
  .mufy_ai_message_bubble suggest.sticky-note {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }

  .gal-text,
  div.gal-text,
  .mufy_ai_message_bubble .gal-text {
    padding: 18px 16px 20px !important;
  }
}

/* ===== 顶部栏区域 ===== */
.sticky.w-full.top-0.flex.items-center {
  background: linear-gradient(135deg, rgba(8, 6, 10, 0.95), rgba(25, 15, 30, 0.92)) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  border-bottom: 1px solid rgba(212, 114, 132, 0.4) !important;
  box-shadow: 0 4px 16px rgba(212, 114, 132, 0.15), 0 0 40px rgba(100, 150, 255, 0.08) !important;
}

/* 模型选择器容器 */
#ai-model-selector .group.flex.items-center {
  background: linear-gradient(135deg, rgba(15, 10, 20, 0.85), rgba(30, 20, 35, 0.8)) !important;
  border: 1px solid rgba(212, 114, 132, 0.35) !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
  box-shadow: 0 2px 12px rgba(212, 114, 132, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.05) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#ai-model-selector .group.flex.items-center:hover {
  border-color: rgba(212, 114, 132, 0.65) !important;
  box-shadow: 0 4px 20px rgba(212, 114, 132, 0.35), 0 0 30px rgba(212, 114, 132, 0.15) !important;
  transform: translateY(-1px) !important;
}

/* 模型名称文字 */
#ai-model-selector .truncate.text-\[13px\] {
  color: rgba(255, 200, 220, 0.95) !important;
  font-weight: 500 !important;
  text-shadow: 0 0 8px rgba(212, 114, 132, 0.4) !important;
}

/* 下拉箭头 */
#ai-model-selector .shrink-0.flex.items-center svg {
  color: rgba(212, 114, 132, 0.8) !important;
  filter: drop-shadow(0 0 4px rgba(212, 114, 132, 0.5)) !important;
  transition: transform 0.3s ease !important;
}

#ai-model-selector .group.flex.items-center:hover .shrink-0.flex.items-center svg {
  transform: translateY(2px) !important;
}

/* 历史记录图标（移动端） */
.sticky.w-full.top-0 svg.lucide-clock-8 {
  color: rgba(100, 150, 255, 0.75) !important;
  filter: drop-shadow(0 0 6px rgba(100, 150, 255, 0.5)) !important;
  transition: all 0.3s ease !important;
}

.sticky.w-full.top-0 svg.lucide-clock-8:hover {
  color: rgba(100, 150, 255, 1) !important;
  filter: drop-shadow(0 0 12px rgba(100, 150, 255, 0.8)) !important;
}

/* 历史记录未读角标 */
.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
  background: linear-gradient(135deg, #d47284, #ff6b9d) !important;
  box-shadow: 0 0 8px rgba(212, 114, 132, 0.8) !important;
}

/* 音乐按钮 */
.sticky.w-full.top-0 button.MuiIconButton-root:has(svg.lucide-music-2) {
  background: rgba(212, 114, 132, 0.12) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.sticky.w-full.top-0 button.MuiIconButton-root:has(svg.lucide-music-2):hover {
  background: rgba(212, 114, 132, 0.25) !important;
  box-shadow: 0 0 16px rgba(212, 114, 132, 0.4) !important;
}

.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2 {
  color: rgba(212, 114, 132, 0.9) !important;
  filter: drop-shadow(0 0 4px rgba(212, 114, 132, 0.5)) !important;
}

/* 移动端设置图标 */
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]) {
  color: rgba(212, 114, 132, 0.85) !important;
  filter: drop-shadow(0 0 6px rgba(212, 114, 132, 0.5)) !important;
  transition: all 0.3s ease !important;
}

.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]):hover {
  filter: drop-shadow(0 0 12px rgba(212, 114, 132, 0.8)) !important;
  transform: rotate(90deg) !important;
}

/* 设置按钮 */
#header-setting-button {
  background: rgba(212, 114, 132, 0.12) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

#header-setting-button:hover {
  background: rgba(212, 114, 132, 0.25) !important;
  box-shadow: 0 0 16px rgba(212, 114, 132, 0.4) !important;
}

#header-setting-button svg {
  color: rgba(212, 114, 132, 0.9) !important;
  filter: drop-shadow(0 0 4px rgba(212, 114, 132, 0.5)) !important;
  transition: transform 0.3s ease !important;
}

#header-setting-button:hover svg {
  transform: rotate(45deg) !important;
}

/* ===== 开场白选择器 ===== */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"],
div.h-9.rounded-md.cursor-pointer.group:has(svg[data-icon="SlidersH"]) {
  background: linear-gradient(135deg, rgba(15, 10, 20, 0.85), rgba(30, 20, 35, 0.8)) !important;
  border: 1px solid rgba(212, 114, 132, 0.35) !important;
  box-shadow: 0 2px 12px rgba(212, 114, 132, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.05) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover,
div.h-9.rounded-md.cursor-pointer.group:has(svg[data-icon="SlidersH"]):hover {
  border-color: rgba(212, 114, 132, 0.65) !important;
  box-shadow: 0 4px 20px rgba(212, 114, 132, 0.35), 0 0 30px rgba(212, 114, 132, 0.15) !important;
  transform: translateY(-1px) !important;
}

div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"],
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="ChevronDown"] {
  color: rgba(212, 114, 132, 0.8) !important;
  filter: drop-shadow(0 0 4px rgba(212, 114, 132, 0.5)) !important;
}

/* ===== 底部栏区域 ===== */
.bg-gradient-to-t {
  background: linear-gradient(to top, rgba(8, 6, 10, 0.98), rgba(8, 6, 10, 0.85)) !important;
}

/* 输入框容器 */
#ai-chat-bottom-input {
  background: linear-gradient(135deg, rgba(15, 10, 20, 0.9), rgba(30, 20, 35, 0.85)) !important;
  border: 1px solid rgba(212, 114, 132, 0.4) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 24px rgba(212, 114, 132, 0.2), 0 0 40px rgba(100, 150, 255, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.05) !important;
  transition: all 0.3s ease !important;
}

#ai-chat-bottom-input:focus-within {
  border-color: rgba(212, 114, 132, 0.7) !important;
  box-shadow: 0 6px 32px rgba(212, 114, 132, 0.35), 0 0 60px rgba(212, 114, 132, 0.15) !important;
}

/* 主输入框 */
#ai-chat-input {
  color: rgba(255, 200, 220, 0.95) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  caret-color: #d47284 !important;
}

#ai-chat-input::placeholder {
  color: rgba(212, 114, 132, 0.45) !important;
  font-style: italic !important;
}

#ai-chat-input::selection {
  background: rgba(212, 114, 132, 0.35) !important;
  color: rgba(255, 255, 255, 0.95) !important;
}

/* ===== 评论区域 ===== */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: linear-gradient(135deg, rgba(8, 6, 10, 0.96), rgba(20, 12, 25, 0.94)) !important;
  backdrop-filter: blur(12px) !important;
}

/* 评论区标题 */
div.text-lg.font-bold {
  color: rgba(255, 200, 220, 0.95) !important;
  text-shadow: 0 0 12px rgba(212, 114, 132, 0.4) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* 个人评分文字 */
p.MuiTypography-body1.text-grey-600 {
  color: rgba(180, 150, 200, 0.75) !important;
}

/* 未选中星星 */
span.MuiRating-iconEmpty svg {
  color: rgba(212, 114, 132, 0.25) !important;
}

/* 选中星星 */
span.MuiRating-iconFilled svg {
  color: #d47284 !important;
  filter: drop-shadow(0 0 6px rgba(212, 114, 132, 0.6)) !important;
}

/* 评分数字 */
span.text-orange-500 {
  color: #d47284 !important;
  text-shadow: 0 0 8px rgba(212, 114, 132, 0.5) !important;
}

/* 输入框容器 */
div.flex.flex-col.border-gray-200 {
  background: linear-gradient(135deg, rgba(15, 10, 20, 0.7), rgba(30, 20, 35, 0.65)) !important;
  border: 1px solid rgba(212, 114, 132, 0.3) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(212, 114, 132, 0.15) !important;
}

/* 评论输入框 */
textarea.rc-textarea {
  color: rgba(255, 200, 220, 0.9) !important;
  background: transparent !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  caret-color: #d47284 !important;
}

textarea.rc-textarea::placeholder {
  color: rgba(212, 114, 132, 0.4) !important;
}

textarea.rc-textarea::selection {
  background: rgba(212, 114, 132, 0.3) !important;
}

/* 字数统计 */
div.bg-gray-100.text-gray-500 {
  background: rgba(212, 114, 132, 0.08) !important;
  color: rgba(212, 114, 132, 0.6) !important;
}

/* 发送评论按钮 */
div.cursor-pointer.group.flex.items-center.justify-center {
  background: linear-gradient(135deg, rgba(212, 114, 132, 0.8), rgba(212, 114, 132, 0.6)) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover {
  background: linear-gradient(135deg, rgba(212, 114, 132, 1), rgba(212, 114, 132, 0.85)) !important;
  box-shadow: 0 0 20px rgba(212, 114, 132, 0.6) !important;
  transform: scale(1.05) !important;
}

div[data-state="closed"] svg[data-icon="Send03"] {
  color: rgba(255, 255, 255, 0.95) !important;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5)) !important;
}

/* 分割线 */
div.style_divider__mW0YX {
  background: linear-gradient(90deg, transparent, rgba(212, 114, 132, 0.3), transparent) !important;
  height: 1px !important;
}

/* 排序按钮 */
button.MuiButton-containedPrimary {
  background: linear-gradient(135deg, rgba(212, 114, 132, 0.8), rgba(212, 114, 132, 0.6)) !important;
  border: 1px solid rgba(212, 114, 132, 0.5) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 0 12px rgba(212, 114, 132, 0.4) !important;
}

button.MuiButton-outlinedPrimary {
  background: rgba(15, 10, 20, 0.6) !important;
  border: 1px solid rgba(212, 114, 132, 0.35) !important;
  color: rgba(212, 114, 132, 0.85) !important;
  transition: all 0.3s ease !important;
}

button.MuiButton-outlinedPrimary:hover {
  background: rgba(212, 114, 132, 0.15) !important;
  border-color: rgba(212, 114, 132, 0.55) !important;
}

/* 评论列表容器 */
div.p-3.overflow-y-auto {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(212, 114, 132, 0.5) rgba(15, 10, 20, 0.3) !important;
}

/* 用户头像 */
div.group img.rounded-full {
  border: 2px solid rgba(212, 114, 132, 0.4) !important;
  box-shadow: 0 0 12px rgba(212, 114, 132, 0.3) !important;
}

/* 用户名 */
div.text-sm.text-grey-600 span.font-bold {
  color: rgba(255, 200, 220, 0.9) !important;
  text-shadow: 0 0 6px rgba(212, 114, 132, 0.3) !important;
}

/* "（你）"标签 */
span.text-\[10px\] {
  color: rgba(212, 114, 132, 0.8) !important;
  background: rgba(212, 114, 132, 0.15) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

/* 评论内容 */
div.break-all {
  color: rgba(230, 220, 240, 0.85) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* 时间戳 */
div.text-xs.text-grey-600 {
  color: rgba(180, 150, 200, 0.6) !important;
}

/* 点赞按钮 */
button.text-gray-400 {
  color: rgba(212, 114, 132, 0.5) !important;
  transition: all 0.3s ease !important;
}

button.text-gray-400:hover {
  color: rgba(212, 114, 132, 0.9) !important;
}

button.text-gray-400 svg {
  filter: drop-shadow(0 0 4px rgba(212, 114, 132, 0.3)) !important;
}

button.text-gray-400:hover svg {
  filter: drop-shadow(0 0 8px rgba(212, 114, 132, 0.6)) !important;
}

/* 回复文字 */
span.cursor-pointer {
  color: rgba(100, 150, 255, 0.75) !important;
  transition: all 0.3s ease !important;
}

span.cursor-pointer:hover {
  color: rgba(100, 150, 255, 1) !important;
  text-shadow: 0 0 8px rgba(100, 150, 255, 0.5) !important;
}

/* 回复区域边框 */
div.ml-8.border-l {
  border-color: rgba(212, 114, 132, 0.25) !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
  box-shadow: 0 0 20px rgba(212, 114, 132, 0.5) !important;
  border-color: rgba(212, 114, 132, 0.7) !important;
}

/* ========== 对话气泡 · 淡紫毛玻璃（参考 galgame shell-ui-v3） ========== */

/* 滚动区透明，毛玻璃只留在外层气泡 */
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;
}

/* 用户输入 + AI 输出 · 共用淡紫玻璃壳 */
#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*="justify-end"] > div[class*="bg-white"],
div[class*="justify-end"] > div[class*="rounded-lg"],
div[class*="justify-end"] > div[class*="rounded-xl"],
div[class*="bg-blue-500"],
div[class*="bg-primary"] {
  background: rgba(232, 226, 240, 0.38) !important;
  background-color: rgba(232, 226, 240, 0.38) !important;
  background-image: linear-gradient(
    180deg,
    rgba(245, 242, 248, 0.32) 0%,
    rgba(196, 189, 212, 0.14) 52%,
    rgba(212, 114, 132, 0.06) 100%
  ) !important;
  border: 1px solid rgba(196, 189, 212, 0.48) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(12px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.12) !important;
  box-shadow:
    0 8px 28px rgba(8, 6, 10, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(212, 114, 132, 0.1) !important;
  padding: 12px 14px !important;
  margin: 10px 0 !important;
}

/* 用户气泡 · 左玫瑰条 */
#customized-question-content,
.mufy_user_message_bubble,
div[class*="justify-end"] > div[class*="bg-white"],
div[class*="justify-end"] > div[class*="rounded-lg"],
div[class*="justify-end"] > div[class*="rounded-xl"] {
  border-left: 3px solid rgba(212, 114, 132, 0.55) !important;
  color: #3a2e48 !important;
}

/* AI 气泡 · 右香槟条（内侧 HTML 面板仍走上方 reply 样式） */
#customized-answer-content,
div[class*="relative"][class*="group"]:has(.mufy_ai_message_bubble) {
  border-right: 3px solid rgba(201, 168, 118, 0.45) !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*="bg-white"]:has(div[class*="markdown"]),
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(div.markdown-body) div[class*="bg-white"]:not([class*="opacity-0"]),
div[class*="bg-white"][class*="p-"]:has(> div.markdown-body),
div[class*="bg-white"][class*="rounded"]:has(div.markdown-body),
div[class*="bg-white"][class*="shadow"]:has(div.markdown-body),
#customized-answer-content > div[class*="bg-white"],
#customized-question-content > div[class*="bg-white"] {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

div[class*="flex-col"]:has(#ai-chat-input) div[class*="bg-white"]:not(:has(div.text-lg.font-bold)),
div[class*="flex-col"]:has(#mufy_chat_input_box) div[class*="bg-white"]:not(:has(div.text-lg.font-bold)) {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* AI 内壳保持透明，让 gal 面板浮在毛玻璃上 */
#customized-answer-content .mufy_ai_message_bubble,
.mufy_ai_message_bubble {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
}

/* 用户气泡正文 */
#customized-question-content,
.mufy_user_message_bubble,
#customized-question-content div.markdown-body,
.mufy_user_message_bubble div.markdown-body,
#customized-question-content div.markdown-body p,
.mufy_user_message_bubble div.markdown-body p {
  color: #3a2e48 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35) !important;
}

#customized-question-content div.markdown-body,
.mufy_user_message_bubble div.markdown-body {
  line-height: 1.7 !important;
  position: relative !important;
  z-index: 1 !important;
}

#customized-question-content div.markdown-body p,
.mufy_user_message_bubble div.markdown-body p {
  margin: 8px 0 !important;
}

#customized-question-content div.markdown-body a,
.mufy_user_message_bubble div.markdown-body a {
  color: #9e4a5a !important;
}

#customized-question-content div.markdown-body a:hover,
.mufy_user_message_bubble div.markdown-body a:hover {
  color: #d47284 !important;
}

/* AI 气泡区 markdown 兜底（非 gal HTML 时） */
#customized-answer-content div.markdown-body {
  color: #e4dff0 !important;
  line-height: 1.7 !important;
  position: relative !important;
  z-index: 1 !important;
}

#customized-answer-content div.markdown-body p {
  color: #e4dff0 !important;
  margin: 8px 0 !important;
}

@keyframes rain {
  0% { transform: translateY(-100vh); opacity: 0.6; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.sticky.w-full.top-0.flex.items-center::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 100% !important;
  background: linear-gradient(transparent 50%, rgba(100, 150, 255, 0.03) 50%) !important;
  background-size: 2px 20px !important;
  animation: rain 1.5s linear infinite !important;
  pointer-events: none !important;
}

#ai-mod-button2 button.MuiButton-root {
  background: linear-gradient(135deg, rgba(212, 114, 132, 0.2), rgba(100, 150, 255, 0.15)) !important;
  border: 1px solid rgba(212, 114, 132, 0.4) !important;
  color: rgba(255, 200, 220, 0.9) !important;
  transition: all 0.3s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
  box-shadow: 0 0 20px rgba(212, 114, 132, 0.5) !important;
  border-color: rgba(212, 114, 132, 0.7) !important;
}
